Documentation ¶
Index ¶
- Constants
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Texture
- func (t *Texture) QueryCreatedUser() *UserQuery
- func (t *Texture) QueryUserProfile() *UserProfileQuery
- func (t *Texture) QueryUsertexture() *UserTextureQuery
- func (t *Texture) String() string
- func (t *Texture) Unwrap() *Texture
- func (t *Texture) Update() *TextureUpdateOne
- func (t *Texture) Value(name string) (ent.Value, error)
- type TextureClient
- func (c *TextureClient) Create() *TextureCreate
- func (c *TextureClient) CreateBulk(builders ...*TextureCreate) *TextureCreateBulk
- func (c *TextureClient) Delete() *TextureDelete
- func (c *TextureClient) DeleteOne(t *Texture) *TextureDeleteOne
- func (c *TextureClient) DeleteOneID(id int) *TextureDeleteOne
- func (c *TextureClient) Get(ctx context.Context, id int) (*Texture, error)
- func (c *TextureClient) GetX(ctx context.Context, id int) *Texture
- func (c *TextureClient) Hooks() []Hook
- func (c *TextureClient) Intercept(interceptors ...Interceptor)
- func (c *TextureClient) Interceptors() []Interceptor
- func (c *TextureClient) Query() *TextureQuery
- func (c *TextureClient) QueryCreatedUser(t *Texture) *UserQuery
- func (c *TextureClient) QueryUserProfile(t *Texture) *UserProfileQuery
- func (c *TextureClient) QueryUsertexture(t *Texture) *UserTextureQuery
- func (c *TextureClient) Update() *TextureUpdate
- func (c *TextureClient) UpdateOne(t *Texture) *TextureUpdateOne
- func (c *TextureClient) UpdateOneID(id int) *TextureUpdateOne
- func (c *TextureClient) Use(hooks ...Hook)
- type TextureCreate
- func (tc *TextureCreate) AddUserProfile(u ...*UserProfile) *TextureCreate
- func (tc *TextureCreate) AddUserProfileIDs(ids ...int) *TextureCreate
- func (tc *TextureCreate) AddUsertexture(u ...*UserTexture) *TextureCreate
- func (tc *TextureCreate) AddUsertextureIDs(ids ...int) *TextureCreate
- func (tc *TextureCreate) Exec(ctx context.Context) error
- func (tc *TextureCreate) ExecX(ctx context.Context)
- func (tc *TextureCreate) Mutation() *TextureMutation
- func (tc *TextureCreate) Save(ctx context.Context) (*Texture, error)
- func (tc *TextureCreate) SaveX(ctx context.Context) *Texture
- func (tc *TextureCreate) SetCreatedUser(u *User) *TextureCreate
- func (tc *TextureCreate) SetCreatedUserID(id int) *TextureCreate
- func (tc *TextureCreate) SetTextureHash(s string) *TextureCreate
- type TextureCreateBulk
- type TextureDelete
- type TextureDeleteOne
- type TextureEdges
- type TextureGroupBy
- func (tgb *TextureGroupBy) Aggregate(fns ...AggregateFunc) *TextureGroupBy
- func (s *TextureGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TextureGroupBy) BoolX(ctx context.Context) bool
- func (s *TextureGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TextureGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TextureGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TextureGroupBy) Float64X(ctx context.Context) float64
- func (s *TextureGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TextureGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TextureGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TextureGroupBy) IntX(ctx context.Context) int
- func (s *TextureGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TextureGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TextureGroupBy) Scan(ctx context.Context, v any) error
- func (s *TextureGroupBy) ScanX(ctx context.Context, v any)
- func (s *TextureGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TextureGroupBy) StringX(ctx context.Context) string
- func (s *TextureGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TextureGroupBy) StringsX(ctx context.Context) []string
- type TextureMutation
- func (m *TextureMutation) AddField(name string, value ent.Value) error
- func (m *TextureMutation) AddUserProfileIDs(ids ...int)
- func (m *TextureMutation) AddUsertextureIDs(ids ...int)
- func (m *TextureMutation) AddedEdges() []string
- func (m *TextureMutation) AddedField(name string) (ent.Value, bool)
- func (m *TextureMutation) AddedFields() []string
- func (m *TextureMutation) AddedIDs(name string) []ent.Value
- func (m *TextureMutation) ClearCreatedUser()
- func (m *TextureMutation) ClearEdge(name string) error
- func (m *TextureMutation) ClearField(name string) error
- func (m *TextureMutation) ClearUserProfile()
- func (m *TextureMutation) ClearUsertexture()
- func (m *TextureMutation) ClearedEdges() []string
- func (m *TextureMutation) ClearedFields() []string
- func (m TextureMutation) Client() *Client
- func (m *TextureMutation) CreatedUserCleared() bool
- func (m *TextureMutation) CreatedUserID() (id int, exists bool)
- func (m *TextureMutation) CreatedUserIDs() (ids []int)
- func (m *TextureMutation) EdgeCleared(name string) bool
- func (m *TextureMutation) Field(name string) (ent.Value, bool)
- func (m *TextureMutation) FieldCleared(name string) bool
- func (m *TextureMutation) Fields() []string
- func (m *TextureMutation) ID() (id int, exists bool)
- func (m *TextureMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TextureMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TextureMutation) OldTextureHash(ctx context.Context) (v string, err error)
- func (m *TextureMutation) Op() Op
- func (m *TextureMutation) RemoveUserProfileIDs(ids ...int)
- func (m *TextureMutation) RemoveUsertextureIDs(ids ...int)
- func (m *TextureMutation) RemovedEdges() []string
- func (m *TextureMutation) RemovedIDs(name string) []ent.Value
- func (m *TextureMutation) RemovedUserProfileIDs() (ids []int)
- func (m *TextureMutation) RemovedUsertextureIDs() (ids []int)
- func (m *TextureMutation) ResetCreatedUser()
- func (m *TextureMutation) ResetEdge(name string) error
- func (m *TextureMutation) ResetField(name string) error
- func (m *TextureMutation) ResetTextureHash()
- func (m *TextureMutation) ResetUserProfile()
- func (m *TextureMutation) ResetUsertexture()
- func (m *TextureMutation) SetCreatedUserID(id int)
- func (m *TextureMutation) SetField(name string, value ent.Value) error
- func (m *TextureMutation) SetOp(op Op)
- func (m *TextureMutation) SetTextureHash(s string)
- func (m *TextureMutation) TextureHash() (r string, exists bool)
- func (m TextureMutation) Tx() (*Tx, error)
- func (m *TextureMutation) Type() string
- func (m *TextureMutation) UserProfileCleared() bool
- func (m *TextureMutation) UserProfileIDs() (ids []int)
- func (m *TextureMutation) UsertextureCleared() bool
- func (m *TextureMutation) UsertextureIDs() (ids []int)
- func (m *TextureMutation) Where(ps ...predicate.Texture)
- func (m *TextureMutation) WhereP(ps ...func(*sql.Selector))
- type TextureQuery
- func (tq *TextureQuery) Aggregate(fns ...AggregateFunc) *TextureSelect
- func (tq *TextureQuery) All(ctx context.Context) ([]*Texture, error)
- func (tq *TextureQuery) AllX(ctx context.Context) []*Texture
- func (tq *TextureQuery) Clone() *TextureQuery
- func (tq *TextureQuery) Count(ctx context.Context) (int, error)
- func (tq *TextureQuery) CountX(ctx context.Context) int
- func (tq *TextureQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TextureQuery) ExistX(ctx context.Context) bool
- func (tq *TextureQuery) First(ctx context.Context) (*Texture, error)
- func (tq *TextureQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TextureQuery) FirstIDX(ctx context.Context) int
- func (tq *TextureQuery) FirstX(ctx context.Context) *Texture
- func (tq *TextureQuery) ForShare(opts ...sql.LockOption) *TextureQuery
- func (tq *TextureQuery) ForShareA(opts ...sql.LockOption) *TextureQuery
- func (tq *TextureQuery) ForUpdate(opts ...sql.LockOption) *TextureQuery
- func (tq *TextureQuery) ForUpdateA(opts ...sql.LockOption) *TextureQuery
- func (tq *TextureQuery) GroupBy(field string, fields ...string) *TextureGroupBy
- func (tq *TextureQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TextureQuery) IDsX(ctx context.Context) []int
- func (tq *TextureQuery) Limit(limit int) *TextureQuery
- func (tq *TextureQuery) Offset(offset int) *TextureQuery
- func (tq *TextureQuery) Only(ctx context.Context) (*Texture, error)
- func (tq *TextureQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TextureQuery) OnlyIDX(ctx context.Context) int
- func (tq *TextureQuery) OnlyX(ctx context.Context) *Texture
- func (tq *TextureQuery) Order(o ...texture.OrderOption) *TextureQuery
- func (tq *TextureQuery) QueryCreatedUser() *UserQuery
- func (tq *TextureQuery) QueryUserProfile() *UserProfileQuery
- func (tq *TextureQuery) QueryUsertexture() *UserTextureQuery
- func (tq *TextureQuery) Select(fields ...string) *TextureSelect
- func (tq *TextureQuery) Unique(unique bool) *TextureQuery
- func (tq *TextureQuery) Where(ps ...predicate.Texture) *TextureQuery
- func (tq *TextureQuery) WithCreatedUser(opts ...func(*UserQuery)) *TextureQuery
- func (tq *TextureQuery) WithUserProfile(opts ...func(*UserProfileQuery)) *TextureQuery
- func (tq *TextureQuery) WithUsertexture(opts ...func(*UserTextureQuery)) *TextureQuery
- type TextureSelect
- func (ts *TextureSelect) Aggregate(fns ...AggregateFunc) *TextureSelect
- func (s *TextureSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TextureSelect) BoolX(ctx context.Context) bool
- func (s *TextureSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TextureSelect) BoolsX(ctx context.Context) []bool
- func (s *TextureSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TextureSelect) Float64X(ctx context.Context) float64
- func (s *TextureSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TextureSelect) Float64sX(ctx context.Context) []float64
- func (s *TextureSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TextureSelect) IntX(ctx context.Context) int
- func (s *TextureSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TextureSelect) IntsX(ctx context.Context) []int
- func (ts *TextureSelect) Scan(ctx context.Context, v any) error
- func (s *TextureSelect) ScanX(ctx context.Context, v any)
- func (s *TextureSelect) String(ctx context.Context) (_ string, err error)
- func (s *TextureSelect) StringX(ctx context.Context) string
- func (s *TextureSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TextureSelect) StringsX(ctx context.Context) []string
- type TextureUpdate
- func (tu *TextureUpdate) AddUserProfile(u ...*UserProfile) *TextureUpdate
- func (tu *TextureUpdate) AddUserProfileIDs(ids ...int) *TextureUpdate
- func (tu *TextureUpdate) AddUsertexture(u ...*UserTexture) *TextureUpdate
- func (tu *TextureUpdate) AddUsertextureIDs(ids ...int) *TextureUpdate
- func (tu *TextureUpdate) ClearCreatedUser() *TextureUpdate
- func (tu *TextureUpdate) ClearUserProfile() *TextureUpdate
- func (tu *TextureUpdate) ClearUsertexture() *TextureUpdate
- func (tu *TextureUpdate) Exec(ctx context.Context) error
- func (tu *TextureUpdate) ExecX(ctx context.Context)
- func (tu *TextureUpdate) Mutation() *TextureMutation
- func (tu *TextureUpdate) RemoveUserProfile(u ...*UserProfile) *TextureUpdate
- func (tu *TextureUpdate) RemoveUserProfileIDs(ids ...int) *TextureUpdate
- func (tu *TextureUpdate) RemoveUsertexture(u ...*UserTexture) *TextureUpdate
- func (tu *TextureUpdate) RemoveUsertextureIDs(ids ...int) *TextureUpdate
- func (tu *TextureUpdate) Save(ctx context.Context) (int, error)
- func (tu *TextureUpdate) SaveX(ctx context.Context) int
- func (tu *TextureUpdate) SetCreatedUser(u *User) *TextureUpdate
- func (tu *TextureUpdate) SetCreatedUserID(id int) *TextureUpdate
- func (tu *TextureUpdate) SetTextureHash(s string) *TextureUpdate
- func (tu *TextureUpdate) Where(ps ...predicate.Texture) *TextureUpdate
- type TextureUpdateOne
- func (tuo *TextureUpdateOne) AddUserProfile(u ...*UserProfile) *TextureUpdateOne
- func (tuo *TextureUpdateOne) AddUserProfileIDs(ids ...int) *TextureUpdateOne
- func (tuo *TextureUpdateOne) AddUsertexture(u ...*UserTexture) *TextureUpdateOne
- func (tuo *TextureUpdateOne) AddUsertextureIDs(ids ...int) *TextureUpdateOne
- func (tuo *TextureUpdateOne) ClearCreatedUser() *TextureUpdateOne
- func (tuo *TextureUpdateOne) ClearUserProfile() *TextureUpdateOne
- func (tuo *TextureUpdateOne) ClearUsertexture() *TextureUpdateOne
- func (tuo *TextureUpdateOne) Exec(ctx context.Context) error
- func (tuo *TextureUpdateOne) ExecX(ctx context.Context)
- func (tuo *TextureUpdateOne) Mutation() *TextureMutation
- func (tuo *TextureUpdateOne) RemoveUserProfile(u ...*UserProfile) *TextureUpdateOne
- func (tuo *TextureUpdateOne) RemoveUserProfileIDs(ids ...int) *TextureUpdateOne
- func (tuo *TextureUpdateOne) RemoveUsertexture(u ...*UserTexture) *TextureUpdateOne
- func (tuo *TextureUpdateOne) RemoveUsertextureIDs(ids ...int) *TextureUpdateOne
- func (tuo *TextureUpdateOne) Save(ctx context.Context) (*Texture, error)
- func (tuo *TextureUpdateOne) SaveX(ctx context.Context) *Texture
- func (tuo *TextureUpdateOne) Select(field string, fields ...string) *TextureUpdateOne
- func (tuo *TextureUpdateOne) SetCreatedUser(u *User) *TextureUpdateOne
- func (tuo *TextureUpdateOne) SetCreatedUserID(id int) *TextureUpdateOne
- func (tuo *TextureUpdateOne) SetTextureHash(s string) *TextureUpdateOne
- func (tuo *TextureUpdateOne) Where(ps ...predicate.Texture) *TextureUpdateOne
- type Textures
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryCreatedTexture(u *User) *TextureQuery
- func (c *UserClient) QueryProfile(u *User) *UserProfileQuery
- func (c *UserClient) QueryToken(u *User) *UserTokenQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddCreatedTexture(t ...*Texture) *UserCreate
- func (uc *UserCreate) AddCreatedTextureIDs(ids ...int) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetNillableProfileID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableTokenID(id *int) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetProfile(u *UserProfile) *UserCreate
- func (uc *UserCreate) SetProfileID(id int) *UserCreate
- func (uc *UserCreate) SetRegIP(s string) *UserCreate
- func (uc *UserCreate) SetRegTime(i int64) *UserCreate
- func (uc *UserCreate) SetSalt(s string) *UserCreate
- func (uc *UserCreate) SetState(i int) *UserCreate
- func (uc *UserCreate) SetToken(u *UserToken) *UserCreate
- func (uc *UserCreate) SetTokenID(id int) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddCreatedTextureIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddRegTime(i int64)
- func (m *UserMutation) AddState(i int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedRegTime() (r int64, exists bool)
- func (m *UserMutation) AddedState() (r int, exists bool)
- func (m *UserMutation) ClearCreatedTexture()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearProfile()
- func (m *UserMutation) ClearToken()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedTextureCleared() bool
- func (m *UserMutation) CreatedTextureIDs() (ids []int)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldRegIP(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldRegTime(ctx context.Context) (v int64, err error)
- func (m *UserMutation) OldSalt(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldState(ctx context.Context) (v int, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) ProfileCleared() bool
- func (m *UserMutation) ProfileID() (id int, exists bool)
- func (m *UserMutation) ProfileIDs() (ids []int)
- func (m *UserMutation) RegIP() (r string, exists bool)
- func (m *UserMutation) RegTime() (r int64, exists bool)
- func (m *UserMutation) RemoveCreatedTextureIDs(ids ...int)
- func (m *UserMutation) RemovedCreatedTextureIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedTexture()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetProfile()
- func (m *UserMutation) ResetRegIP()
- func (m *UserMutation) ResetRegTime()
- func (m *UserMutation) ResetSalt()
- func (m *UserMutation) ResetState()
- func (m *UserMutation) ResetToken()
- func (m *UserMutation) Salt() (r string, exists bool)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetProfileID(id int)
- func (m *UserMutation) SetRegIP(s string)
- func (m *UserMutation) SetRegTime(i int64)
- func (m *UserMutation) SetSalt(s string)
- func (m *UserMutation) SetState(i int)
- func (m *UserMutation) SetTokenID(id int)
- func (m *UserMutation) State() (r int, exists bool)
- func (m *UserMutation) TokenCleared() bool
- func (m *UserMutation) TokenID() (id int, exists bool)
- func (m *UserMutation) TokenIDs() (ids []int)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserProfile
- func (up *UserProfile) QueryTexture() *TextureQuery
- func (up *UserProfile) QueryUser() *UserQuery
- func (up *UserProfile) QueryUsertexture() *UserTextureQuery
- func (up *UserProfile) String() string
- func (up *UserProfile) Unwrap() *UserProfile
- func (up *UserProfile) Update() *UserProfileUpdateOne
- func (up *UserProfile) Value(name string) (ent.Value, error)
- type UserProfileClient
- func (c *UserProfileClient) Create() *UserProfileCreate
- func (c *UserProfileClient) CreateBulk(builders ...*UserProfileCreate) *UserProfileCreateBulk
- func (c *UserProfileClient) Delete() *UserProfileDelete
- func (c *UserProfileClient) DeleteOne(up *UserProfile) *UserProfileDeleteOne
- func (c *UserProfileClient) DeleteOneID(id int) *UserProfileDeleteOne
- func (c *UserProfileClient) Get(ctx context.Context, id int) (*UserProfile, error)
- func (c *UserProfileClient) GetX(ctx context.Context, id int) *UserProfile
- func (c *UserProfileClient) Hooks() []Hook
- func (c *UserProfileClient) Intercept(interceptors ...Interceptor)
- func (c *UserProfileClient) Interceptors() []Interceptor
- func (c *UserProfileClient) Query() *UserProfileQuery
- func (c *UserProfileClient) QueryTexture(up *UserProfile) *TextureQuery
- func (c *UserProfileClient) QueryUser(up *UserProfile) *UserQuery
- func (c *UserProfileClient) QueryUsertexture(up *UserProfile) *UserTextureQuery
- func (c *UserProfileClient) Update() *UserProfileUpdate
- func (c *UserProfileClient) UpdateOne(up *UserProfile) *UserProfileUpdateOne
- func (c *UserProfileClient) UpdateOneID(id int) *UserProfileUpdateOne
- func (c *UserProfileClient) Use(hooks ...Hook)
- type UserProfileCreate
- func (upc *UserProfileCreate) AddTexture(t ...*Texture) *UserProfileCreate
- func (upc *UserProfileCreate) AddTextureIDs(ids ...int) *UserProfileCreate
- func (upc *UserProfileCreate) AddUsertexture(u ...*UserTexture) *UserProfileCreate
- func (upc *UserProfileCreate) AddUsertextureIDs(ids ...int) *UserProfileCreate
- func (upc *UserProfileCreate) Exec(ctx context.Context) error
- func (upc *UserProfileCreate) ExecX(ctx context.Context)
- func (upc *UserProfileCreate) Mutation() *UserProfileMutation
- func (upc *UserProfileCreate) Save(ctx context.Context) (*UserProfile, error)
- func (upc *UserProfileCreate) SaveX(ctx context.Context) *UserProfile
- func (upc *UserProfileCreate) SetName(s string) *UserProfileCreate
- func (upc *UserProfileCreate) SetUUID(s string) *UserProfileCreate
- func (upc *UserProfileCreate) SetUser(u *User) *UserProfileCreate
- func (upc *UserProfileCreate) SetUserID(id int) *UserProfileCreate
- type UserProfileCreateBulk
- type UserProfileDelete
- type UserProfileDeleteOne
- type UserProfileEdges
- type UserProfileGroupBy
- func (upgb *UserProfileGroupBy) Aggregate(fns ...AggregateFunc) *UserProfileGroupBy
- func (s *UserProfileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserProfileGroupBy) BoolX(ctx context.Context) bool
- func (s *UserProfileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserProfileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserProfileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserProfileGroupBy) Float64X(ctx context.Context) float64
- func (s *UserProfileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserProfileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserProfileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserProfileGroupBy) IntX(ctx context.Context) int
- func (s *UserProfileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserProfileGroupBy) IntsX(ctx context.Context) []int
- func (upgb *UserProfileGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserProfileGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserProfileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserProfileGroupBy) StringX(ctx context.Context) string
- func (s *UserProfileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserProfileGroupBy) StringsX(ctx context.Context) []string
- type UserProfileMutation
- func (m *UserProfileMutation) AddField(name string, value ent.Value) error
- func (m *UserProfileMutation) AddTextureIDs(ids ...int)
- func (m *UserProfileMutation) AddUsertextureIDs(ids ...int)
- func (m *UserProfileMutation) AddedEdges() []string
- func (m *UserProfileMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserProfileMutation) AddedFields() []string
- func (m *UserProfileMutation) AddedIDs(name string) []ent.Value
- func (m *UserProfileMutation) ClearEdge(name string) error
- func (m *UserProfileMutation) ClearField(name string) error
- func (m *UserProfileMutation) ClearTexture()
- func (m *UserProfileMutation) ClearUser()
- func (m *UserProfileMutation) ClearUsertexture()
- func (m *UserProfileMutation) ClearedEdges() []string
- func (m *UserProfileMutation) ClearedFields() []string
- func (m UserProfileMutation) Client() *Client
- func (m *UserProfileMutation) EdgeCleared(name string) bool
- func (m *UserProfileMutation) Field(name string) (ent.Value, bool)
- func (m *UserProfileMutation) FieldCleared(name string) bool
- func (m *UserProfileMutation) Fields() []string
- func (m *UserProfileMutation) ID() (id int, exists bool)
- func (m *UserProfileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserProfileMutation) Name() (r string, exists bool)
- func (m *UserProfileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserProfileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserProfileMutation) OldUUID(ctx context.Context) (v string, err error)
- func (m *UserProfileMutation) Op() Op
- func (m *UserProfileMutation) RemoveTextureIDs(ids ...int)
- func (m *UserProfileMutation) RemoveUsertextureIDs(ids ...int)
- func (m *UserProfileMutation) RemovedEdges() []string
- func (m *UserProfileMutation) RemovedIDs(name string) []ent.Value
- func (m *UserProfileMutation) RemovedTextureIDs() (ids []int)
- func (m *UserProfileMutation) RemovedUsertextureIDs() (ids []int)
- func (m *UserProfileMutation) ResetEdge(name string) error
- func (m *UserProfileMutation) ResetField(name string) error
- func (m *UserProfileMutation) ResetName()
- func (m *UserProfileMutation) ResetTexture()
- func (m *UserProfileMutation) ResetUUID()
- func (m *UserProfileMutation) ResetUser()
- func (m *UserProfileMutation) ResetUsertexture()
- func (m *UserProfileMutation) SetField(name string, value ent.Value) error
- func (m *UserProfileMutation) SetName(s string)
- func (m *UserProfileMutation) SetOp(op Op)
- func (m *UserProfileMutation) SetUUID(s string)
- func (m *UserProfileMutation) SetUserID(id int)
- func (m *UserProfileMutation) TextureCleared() bool
- func (m *UserProfileMutation) TextureIDs() (ids []int)
- func (m UserProfileMutation) Tx() (*Tx, error)
- func (m *UserProfileMutation) Type() string
- func (m *UserProfileMutation) UUID() (r string, exists bool)
- func (m *UserProfileMutation) UserCleared() bool
- func (m *UserProfileMutation) UserID() (id int, exists bool)
- func (m *UserProfileMutation) UserIDs() (ids []int)
- func (m *UserProfileMutation) UsertextureCleared() bool
- func (m *UserProfileMutation) UsertextureIDs() (ids []int)
- func (m *UserProfileMutation) Where(ps ...predicate.UserProfile)
- func (m *UserProfileMutation) WhereP(ps ...func(*sql.Selector))
- type UserProfileQuery
- func (upq *UserProfileQuery) Aggregate(fns ...AggregateFunc) *UserProfileSelect
- func (upq *UserProfileQuery) All(ctx context.Context) ([]*UserProfile, error)
- func (upq *UserProfileQuery) AllX(ctx context.Context) []*UserProfile
- func (upq *UserProfileQuery) Clone() *UserProfileQuery
- func (upq *UserProfileQuery) Count(ctx context.Context) (int, error)
- func (upq *UserProfileQuery) CountX(ctx context.Context) int
- func (upq *UserProfileQuery) Exist(ctx context.Context) (bool, error)
- func (upq *UserProfileQuery) ExistX(ctx context.Context) bool
- func (upq *UserProfileQuery) First(ctx context.Context) (*UserProfile, error)
- func (upq *UserProfileQuery) FirstID(ctx context.Context) (id int, err error)
- func (upq *UserProfileQuery) FirstIDX(ctx context.Context) int
- func (upq *UserProfileQuery) FirstX(ctx context.Context) *UserProfile
- func (upq *UserProfileQuery) ForShare(opts ...sql.LockOption) *UserProfileQuery
- func (upq *UserProfileQuery) ForShareA(opts ...sql.LockOption) *UserProfileQuery
- func (upq *UserProfileQuery) ForUpdate(opts ...sql.LockOption) *UserProfileQuery
- func (upq *UserProfileQuery) ForUpdateA(opts ...sql.LockOption) *UserProfileQuery
- func (upq *UserProfileQuery) GroupBy(field string, fields ...string) *UserProfileGroupBy
- func (upq *UserProfileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (upq *UserProfileQuery) IDsX(ctx context.Context) []int
- func (upq *UserProfileQuery) Limit(limit int) *UserProfileQuery
- func (upq *UserProfileQuery) Offset(offset int) *UserProfileQuery
- func (upq *UserProfileQuery) Only(ctx context.Context) (*UserProfile, error)
- func (upq *UserProfileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (upq *UserProfileQuery) OnlyIDX(ctx context.Context) int
- func (upq *UserProfileQuery) OnlyX(ctx context.Context) *UserProfile
- func (upq *UserProfileQuery) Order(o ...userprofile.OrderOption) *UserProfileQuery
- func (upq *UserProfileQuery) QueryTexture() *TextureQuery
- func (upq *UserProfileQuery) QueryUser() *UserQuery
- func (upq *UserProfileQuery) QueryUsertexture() *UserTextureQuery
- func (upq *UserProfileQuery) Select(fields ...string) *UserProfileSelect
- func (upq *UserProfileQuery) Unique(unique bool) *UserProfileQuery
- func (upq *UserProfileQuery) Where(ps ...predicate.UserProfile) *UserProfileQuery
- func (upq *UserProfileQuery) WithTexture(opts ...func(*TextureQuery)) *UserProfileQuery
- func (upq *UserProfileQuery) WithUser(opts ...func(*UserQuery)) *UserProfileQuery
- func (upq *UserProfileQuery) WithUsertexture(opts ...func(*UserTextureQuery)) *UserProfileQuery
- type UserProfileSelect
- func (ups *UserProfileSelect) Aggregate(fns ...AggregateFunc) *UserProfileSelect
- func (s *UserProfileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserProfileSelect) BoolX(ctx context.Context) bool
- func (s *UserProfileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserProfileSelect) BoolsX(ctx context.Context) []bool
- func (s *UserProfileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserProfileSelect) Float64X(ctx context.Context) float64
- func (s *UserProfileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserProfileSelect) Float64sX(ctx context.Context) []float64
- func (s *UserProfileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserProfileSelect) IntX(ctx context.Context) int
- func (s *UserProfileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserProfileSelect) IntsX(ctx context.Context) []int
- func (ups *UserProfileSelect) Scan(ctx context.Context, v any) error
- func (s *UserProfileSelect) ScanX(ctx context.Context, v any)
- func (s *UserProfileSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserProfileSelect) StringX(ctx context.Context) string
- func (s *UserProfileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserProfileSelect) StringsX(ctx context.Context) []string
- type UserProfileUpdate
- func (upu *UserProfileUpdate) AddTexture(t ...*Texture) *UserProfileUpdate
- func (upu *UserProfileUpdate) AddTextureIDs(ids ...int) *UserProfileUpdate
- func (upu *UserProfileUpdate) AddUsertexture(u ...*UserTexture) *UserProfileUpdate
- func (upu *UserProfileUpdate) AddUsertextureIDs(ids ...int) *UserProfileUpdate
- func (upu *UserProfileUpdate) ClearTexture() *UserProfileUpdate
- func (upu *UserProfileUpdate) ClearUser() *UserProfileUpdate
- func (upu *UserProfileUpdate) ClearUsertexture() *UserProfileUpdate
- func (upu *UserProfileUpdate) Exec(ctx context.Context) error
- func (upu *UserProfileUpdate) ExecX(ctx context.Context)
- func (upu *UserProfileUpdate) Mutation() *UserProfileMutation
- func (upu *UserProfileUpdate) RemoveTexture(t ...*Texture) *UserProfileUpdate
- func (upu *UserProfileUpdate) RemoveTextureIDs(ids ...int) *UserProfileUpdate
- func (upu *UserProfileUpdate) RemoveUsertexture(u ...*UserTexture) *UserProfileUpdate
- func (upu *UserProfileUpdate) RemoveUsertextureIDs(ids ...int) *UserProfileUpdate
- func (upu *UserProfileUpdate) Save(ctx context.Context) (int, error)
- func (upu *UserProfileUpdate) SaveX(ctx context.Context) int
- func (upu *UserProfileUpdate) SetName(s string) *UserProfileUpdate
- func (upu *UserProfileUpdate) SetUUID(s string) *UserProfileUpdate
- func (upu *UserProfileUpdate) SetUser(u *User) *UserProfileUpdate
- func (upu *UserProfileUpdate) SetUserID(id int) *UserProfileUpdate
- func (upu *UserProfileUpdate) Where(ps ...predicate.UserProfile) *UserProfileUpdate
- type UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) AddTexture(t ...*Texture) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) AddTextureIDs(ids ...int) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) AddUsertexture(u ...*UserTexture) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) AddUsertextureIDs(ids ...int) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) ClearTexture() *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) ClearUser() *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) ClearUsertexture() *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) Exec(ctx context.Context) error
- func (upuo *UserProfileUpdateOne) ExecX(ctx context.Context)
- func (upuo *UserProfileUpdateOne) Mutation() *UserProfileMutation
- func (upuo *UserProfileUpdateOne) RemoveTexture(t ...*Texture) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) RemoveTextureIDs(ids ...int) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) RemoveUsertexture(u ...*UserTexture) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) RemoveUsertextureIDs(ids ...int) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) Save(ctx context.Context) (*UserProfile, error)
- func (upuo *UserProfileUpdateOne) SaveX(ctx context.Context) *UserProfile
- func (upuo *UserProfileUpdateOne) Select(field string, fields ...string) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) SetName(s string) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) SetUUID(s string) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) SetUser(u *User) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) SetUserID(id int) *UserProfileUpdateOne
- func (upuo *UserProfileUpdateOne) Where(ps ...predicate.UserProfile) *UserProfileUpdateOne
- type UserProfiles
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForShareA(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForUpdateA(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryCreatedTexture() *TextureQuery
- func (uq *UserQuery) QueryProfile() *UserProfileQuery
- func (uq *UserQuery) QueryToken() *UserTokenQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithCreatedTexture(opts ...func(*TextureQuery)) *UserQuery
- func (uq *UserQuery) WithProfile(opts ...func(*UserProfileQuery)) *UserQuery
- func (uq *UserQuery) WithToken(opts ...func(*UserTokenQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserTexture
- func (ut *UserTexture) QueryTexture() *TextureQuery
- func (ut *UserTexture) QueryUserProfile() *UserProfileQuery
- func (ut *UserTexture) String() string
- func (ut *UserTexture) Unwrap() *UserTexture
- func (ut *UserTexture) Update() *UserTextureUpdateOne
- func (ut *UserTexture) Value(name string) (ent.Value, error)
- type UserTextureClient
- func (c *UserTextureClient) Create() *UserTextureCreate
- func (c *UserTextureClient) CreateBulk(builders ...*UserTextureCreate) *UserTextureCreateBulk
- func (c *UserTextureClient) Delete() *UserTextureDelete
- func (c *UserTextureClient) DeleteOne(ut *UserTexture) *UserTextureDeleteOne
- func (c *UserTextureClient) DeleteOneID(id int) *UserTextureDeleteOne
- func (c *UserTextureClient) Get(ctx context.Context, id int) (*UserTexture, error)
- func (c *UserTextureClient) GetX(ctx context.Context, id int) *UserTexture
- func (c *UserTextureClient) Hooks() []Hook
- func (c *UserTextureClient) Intercept(interceptors ...Interceptor)
- func (c *UserTextureClient) Interceptors() []Interceptor
- func (c *UserTextureClient) Query() *UserTextureQuery
- func (c *UserTextureClient) QueryTexture(ut *UserTexture) *TextureQuery
- func (c *UserTextureClient) QueryUserProfile(ut *UserTexture) *UserProfileQuery
- func (c *UserTextureClient) Update() *UserTextureUpdate
- func (c *UserTextureClient) UpdateOne(ut *UserTexture) *UserTextureUpdateOne
- func (c *UserTextureClient) UpdateOneID(id int) *UserTextureUpdateOne
- func (c *UserTextureClient) Use(hooks ...Hook)
- type UserTextureCreate
- func (utc *UserTextureCreate) Exec(ctx context.Context) error
- func (utc *UserTextureCreate) ExecX(ctx context.Context)
- func (utc *UserTextureCreate) Mutation() *UserTextureMutation
- func (utc *UserTextureCreate) Save(ctx context.Context) (*UserTexture, error)
- func (utc *UserTextureCreate) SaveX(ctx context.Context) *UserTexture
- func (utc *UserTextureCreate) SetTexture(t *Texture) *UserTextureCreate
- func (utc *UserTextureCreate) SetTextureID(i int) *UserTextureCreate
- func (utc *UserTextureCreate) SetType(s string) *UserTextureCreate
- func (utc *UserTextureCreate) SetUserProfile(u *UserProfile) *UserTextureCreate
- func (utc *UserTextureCreate) SetUserProfileID(i int) *UserTextureCreate
- func (utc *UserTextureCreate) SetVariant(s string) *UserTextureCreate
- type UserTextureCreateBulk
- type UserTextureDelete
- type UserTextureDeleteOne
- type UserTextureEdges
- type UserTextureGroupBy
- func (utgb *UserTextureGroupBy) Aggregate(fns ...AggregateFunc) *UserTextureGroupBy
- func (s *UserTextureGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserTextureGroupBy) BoolX(ctx context.Context) bool
- func (s *UserTextureGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserTextureGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserTextureGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserTextureGroupBy) Float64X(ctx context.Context) float64
- func (s *UserTextureGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserTextureGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserTextureGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserTextureGroupBy) IntX(ctx context.Context) int
- func (s *UserTextureGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserTextureGroupBy) IntsX(ctx context.Context) []int
- func (utgb *UserTextureGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserTextureGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserTextureGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserTextureGroupBy) StringX(ctx context.Context) string
- func (s *UserTextureGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserTextureGroupBy) StringsX(ctx context.Context) []string
- type UserTextureMutation
- func (m *UserTextureMutation) AddField(name string, value ent.Value) error
- func (m *UserTextureMutation) AddedEdges() []string
- func (m *UserTextureMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserTextureMutation) AddedFields() []string
- func (m *UserTextureMutation) AddedIDs(name string) []ent.Value
- func (m *UserTextureMutation) ClearEdge(name string) error
- func (m *UserTextureMutation) ClearField(name string) error
- func (m *UserTextureMutation) ClearTexture()
- func (m *UserTextureMutation) ClearUserProfile()
- func (m *UserTextureMutation) ClearedEdges() []string
- func (m *UserTextureMutation) ClearedFields() []string
- func (m UserTextureMutation) Client() *Client
- func (m *UserTextureMutation) EdgeCleared(name string) bool
- func (m *UserTextureMutation) Field(name string) (ent.Value, bool)
- func (m *UserTextureMutation) FieldCleared(name string) bool
- func (m *UserTextureMutation) Fields() []string
- func (m *UserTextureMutation) GetType() (r string, exists bool)
- func (m *UserTextureMutation) ID() (id int, exists bool)
- func (m *UserTextureMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserTextureMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserTextureMutation) OldTextureID(ctx context.Context) (v int, err error)
- func (m *UserTextureMutation) OldType(ctx context.Context) (v string, err error)
- func (m *UserTextureMutation) OldUserProfileID(ctx context.Context) (v int, err error)
- func (m *UserTextureMutation) OldVariant(ctx context.Context) (v string, err error)
- func (m *UserTextureMutation) Op() Op
- func (m *UserTextureMutation) RemovedEdges() []string
- func (m *UserTextureMutation) RemovedIDs(name string) []ent.Value
- func (m *UserTextureMutation) ResetEdge(name string) error
- func (m *UserTextureMutation) ResetField(name string) error
- func (m *UserTextureMutation) ResetTexture()
- func (m *UserTextureMutation) ResetTextureID()
- func (m *UserTextureMutation) ResetType()
- func (m *UserTextureMutation) ResetUserProfile()
- func (m *UserTextureMutation) ResetUserProfileID()
- func (m *UserTextureMutation) ResetVariant()
- func (m *UserTextureMutation) SetField(name string, value ent.Value) error
- func (m *UserTextureMutation) SetOp(op Op)
- func (m *UserTextureMutation) SetTextureID(i int)
- func (m *UserTextureMutation) SetType(s string)
- func (m *UserTextureMutation) SetUserProfileID(i int)
- func (m *UserTextureMutation) SetVariant(s string)
- func (m *UserTextureMutation) TextureCleared() bool
- func (m *UserTextureMutation) TextureID() (r int, exists bool)
- func (m *UserTextureMutation) TextureIDs() (ids []int)
- func (m UserTextureMutation) Tx() (*Tx, error)
- func (m *UserTextureMutation) Type() string
- func (m *UserTextureMutation) UserProfileCleared() bool
- func (m *UserTextureMutation) UserProfileID() (r int, exists bool)
- func (m *UserTextureMutation) UserProfileIDs() (ids []int)
- func (m *UserTextureMutation) Variant() (r string, exists bool)
- func (m *UserTextureMutation) Where(ps ...predicate.UserTexture)
- func (m *UserTextureMutation) WhereP(ps ...func(*sql.Selector))
- type UserTextureQuery
- func (utq *UserTextureQuery) Aggregate(fns ...AggregateFunc) *UserTextureSelect
- func (utq *UserTextureQuery) All(ctx context.Context) ([]*UserTexture, error)
- func (utq *UserTextureQuery) AllX(ctx context.Context) []*UserTexture
- func (utq *UserTextureQuery) Clone() *UserTextureQuery
- func (utq *UserTextureQuery) Count(ctx context.Context) (int, error)
- func (utq *UserTextureQuery) CountX(ctx context.Context) int
- func (utq *UserTextureQuery) Exist(ctx context.Context) (bool, error)
- func (utq *UserTextureQuery) ExistX(ctx context.Context) bool
- func (utq *UserTextureQuery) First(ctx context.Context) (*UserTexture, error)
- func (utq *UserTextureQuery) FirstID(ctx context.Context) (id int, err error)
- func (utq *UserTextureQuery) FirstIDX(ctx context.Context) int
- func (utq *UserTextureQuery) FirstX(ctx context.Context) *UserTexture
- func (utq *UserTextureQuery) ForShare(opts ...sql.LockOption) *UserTextureQuery
- func (utq *UserTextureQuery) ForShareA(opts ...sql.LockOption) *UserTextureQuery
- func (utq *UserTextureQuery) ForUpdate(opts ...sql.LockOption) *UserTextureQuery
- func (utq *UserTextureQuery) ForUpdateA(opts ...sql.LockOption) *UserTextureQuery
- func (utq *UserTextureQuery) GroupBy(field string, fields ...string) *UserTextureGroupBy
- func (utq *UserTextureQuery) IDs(ctx context.Context) (ids []int, err error)
- func (utq *UserTextureQuery) IDsX(ctx context.Context) []int
- func (utq *UserTextureQuery) Limit(limit int) *UserTextureQuery
- func (utq *UserTextureQuery) Offset(offset int) *UserTextureQuery
- func (utq *UserTextureQuery) Only(ctx context.Context) (*UserTexture, error)
- func (utq *UserTextureQuery) OnlyID(ctx context.Context) (id int, err error)
- func (utq *UserTextureQuery) OnlyIDX(ctx context.Context) int
- func (utq *UserTextureQuery) OnlyX(ctx context.Context) *UserTexture
- func (utq *UserTextureQuery) Order(o ...usertexture.OrderOption) *UserTextureQuery
- func (utq *UserTextureQuery) QueryTexture() *TextureQuery
- func (utq *UserTextureQuery) QueryUserProfile() *UserProfileQuery
- func (utq *UserTextureQuery) Select(fields ...string) *UserTextureSelect
- func (utq *UserTextureQuery) Unique(unique bool) *UserTextureQuery
- func (utq *UserTextureQuery) Where(ps ...predicate.UserTexture) *UserTextureQuery
- func (utq *UserTextureQuery) WithTexture(opts ...func(*TextureQuery)) *UserTextureQuery
- func (utq *UserTextureQuery) WithUserProfile(opts ...func(*UserProfileQuery)) *UserTextureQuery
- type UserTextureSelect
- func (uts *UserTextureSelect) Aggregate(fns ...AggregateFunc) *UserTextureSelect
- func (s *UserTextureSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserTextureSelect) BoolX(ctx context.Context) bool
- func (s *UserTextureSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserTextureSelect) BoolsX(ctx context.Context) []bool
- func (s *UserTextureSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserTextureSelect) Float64X(ctx context.Context) float64
- func (s *UserTextureSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserTextureSelect) Float64sX(ctx context.Context) []float64
- func (s *UserTextureSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserTextureSelect) IntX(ctx context.Context) int
- func (s *UserTextureSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserTextureSelect) IntsX(ctx context.Context) []int
- func (uts *UserTextureSelect) Scan(ctx context.Context, v any) error
- func (s *UserTextureSelect) ScanX(ctx context.Context, v any)
- func (s *UserTextureSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserTextureSelect) StringX(ctx context.Context) string
- func (s *UserTextureSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserTextureSelect) StringsX(ctx context.Context) []string
- type UserTextureUpdate
- func (utu *UserTextureUpdate) ClearTexture() *UserTextureUpdate
- func (utu *UserTextureUpdate) ClearUserProfile() *UserTextureUpdate
- func (utu *UserTextureUpdate) Exec(ctx context.Context) error
- func (utu *UserTextureUpdate) ExecX(ctx context.Context)
- func (utu *UserTextureUpdate) Mutation() *UserTextureMutation
- func (utu *UserTextureUpdate) Save(ctx context.Context) (int, error)
- func (utu *UserTextureUpdate) SaveX(ctx context.Context) int
- func (utu *UserTextureUpdate) SetTexture(t *Texture) *UserTextureUpdate
- func (utu *UserTextureUpdate) SetTextureID(i int) *UserTextureUpdate
- func (utu *UserTextureUpdate) SetType(s string) *UserTextureUpdate
- func (utu *UserTextureUpdate) SetUserProfile(u *UserProfile) *UserTextureUpdate
- func (utu *UserTextureUpdate) SetUserProfileID(i int) *UserTextureUpdate
- func (utu *UserTextureUpdate) SetVariant(s string) *UserTextureUpdate
- func (utu *UserTextureUpdate) Where(ps ...predicate.UserTexture) *UserTextureUpdate
- type UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) ClearTexture() *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) ClearUserProfile() *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) Exec(ctx context.Context) error
- func (utuo *UserTextureUpdateOne) ExecX(ctx context.Context)
- func (utuo *UserTextureUpdateOne) Mutation() *UserTextureMutation
- func (utuo *UserTextureUpdateOne) Save(ctx context.Context) (*UserTexture, error)
- func (utuo *UserTextureUpdateOne) SaveX(ctx context.Context) *UserTexture
- func (utuo *UserTextureUpdateOne) Select(field string, fields ...string) *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) SetTexture(t *Texture) *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) SetTextureID(i int) *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) SetType(s string) *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) SetUserProfile(u *UserProfile) *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) SetUserProfileID(i int) *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) SetVariant(s string) *UserTextureUpdateOne
- func (utuo *UserTextureUpdateOne) Where(ps ...predicate.UserTexture) *UserTextureUpdateOne
- type UserTextures
- type UserToken
- type UserTokenClient
- func (c *UserTokenClient) Create() *UserTokenCreate
- func (c *UserTokenClient) CreateBulk(builders ...*UserTokenCreate) *UserTokenCreateBulk
- func (c *UserTokenClient) Delete() *UserTokenDelete
- func (c *UserTokenClient) DeleteOne(ut *UserToken) *UserTokenDeleteOne
- func (c *UserTokenClient) DeleteOneID(id int) *UserTokenDeleteOne
- func (c *UserTokenClient) Get(ctx context.Context, id int) (*UserToken, error)
- func (c *UserTokenClient) GetX(ctx context.Context, id int) *UserToken
- func (c *UserTokenClient) Hooks() []Hook
- func (c *UserTokenClient) Intercept(interceptors ...Interceptor)
- func (c *UserTokenClient) Interceptors() []Interceptor
- func (c *UserTokenClient) Query() *UserTokenQuery
- func (c *UserTokenClient) QueryUser(ut *UserToken) *UserQuery
- func (c *UserTokenClient) Update() *UserTokenUpdate
- func (c *UserTokenClient) UpdateOne(ut *UserToken) *UserTokenUpdateOne
- func (c *UserTokenClient) UpdateOneID(id int) *UserTokenUpdateOne
- func (c *UserTokenClient) Use(hooks ...Hook)
- type UserTokenCreate
- func (utc *UserTokenCreate) Exec(ctx context.Context) error
- func (utc *UserTokenCreate) ExecX(ctx context.Context)
- func (utc *UserTokenCreate) Mutation() *UserTokenMutation
- func (utc *UserTokenCreate) Save(ctx context.Context) (*UserToken, error)
- func (utc *UserTokenCreate) SaveX(ctx context.Context) *UserToken
- func (utc *UserTokenCreate) SetNillableUserID(id *int) *UserTokenCreate
- func (utc *UserTokenCreate) SetTokenID(u uint64) *UserTokenCreate
- func (utc *UserTokenCreate) SetUser(u *User) *UserTokenCreate
- func (utc *UserTokenCreate) SetUserID(id int) *UserTokenCreate
- type UserTokenCreateBulk
- type UserTokenDelete
- type UserTokenDeleteOne
- type UserTokenEdges
- type UserTokenGroupBy
- func (utgb *UserTokenGroupBy) Aggregate(fns ...AggregateFunc) *UserTokenGroupBy
- func (s *UserTokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserTokenGroupBy) BoolX(ctx context.Context) bool
- func (s *UserTokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserTokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserTokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserTokenGroupBy) Float64X(ctx context.Context) float64
- func (s *UserTokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserTokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserTokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserTokenGroupBy) IntX(ctx context.Context) int
- func (s *UserTokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserTokenGroupBy) IntsX(ctx context.Context) []int
- func (utgb *UserTokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserTokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserTokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserTokenGroupBy) StringX(ctx context.Context) string
- func (s *UserTokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserTokenGroupBy) StringsX(ctx context.Context) []string
- type UserTokenMutation
- func (m *UserTokenMutation) AddField(name string, value ent.Value) error
- func (m *UserTokenMutation) AddTokenID(u int64)
- func (m *UserTokenMutation) AddedEdges() []string
- func (m *UserTokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserTokenMutation) AddedFields() []string
- func (m *UserTokenMutation) AddedIDs(name string) []ent.Value
- func (m *UserTokenMutation) AddedTokenID() (r int64, exists bool)
- func (m *UserTokenMutation) ClearEdge(name string) error
- func (m *UserTokenMutation) ClearField(name string) error
- func (m *UserTokenMutation) ClearUser()
- func (m *UserTokenMutation) ClearedEdges() []string
- func (m *UserTokenMutation) ClearedFields() []string
- func (m UserTokenMutation) Client() *Client
- func (m *UserTokenMutation) EdgeCleared(name string) bool
- func (m *UserTokenMutation) Field(name string) (ent.Value, bool)
- func (m *UserTokenMutation) FieldCleared(name string) bool
- func (m *UserTokenMutation) Fields() []string
- func (m *UserTokenMutation) ID() (id int, exists bool)
- func (m *UserTokenMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserTokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserTokenMutation) OldTokenID(ctx context.Context) (v uint64, err error)
- func (m *UserTokenMutation) Op() Op
- func (m *UserTokenMutation) RemovedEdges() []string
- func (m *UserTokenMutation) RemovedIDs(name string) []ent.Value
- func (m *UserTokenMutation) ResetEdge(name string) error
- func (m *UserTokenMutation) ResetField(name string) error
- func (m *UserTokenMutation) ResetTokenID()
- func (m *UserTokenMutation) ResetUser()
- func (m *UserTokenMutation) SetField(name string, value ent.Value) error
- func (m *UserTokenMutation) SetOp(op Op)
- func (m *UserTokenMutation) SetTokenID(u uint64)
- func (m *UserTokenMutation) SetUserID(id int)
- func (m *UserTokenMutation) TokenID() (r uint64, exists bool)
- func (m UserTokenMutation) Tx() (*Tx, error)
- func (m *UserTokenMutation) Type() string
- func (m *UserTokenMutation) UserCleared() bool
- func (m *UserTokenMutation) UserID() (id int, exists bool)
- func (m *UserTokenMutation) UserIDs() (ids []int)
- func (m *UserTokenMutation) Where(ps ...predicate.UserToken)
- func (m *UserTokenMutation) WhereP(ps ...func(*sql.Selector))
- type UserTokenQuery
- func (utq *UserTokenQuery) Aggregate(fns ...AggregateFunc) *UserTokenSelect
- func (utq *UserTokenQuery) All(ctx context.Context) ([]*UserToken, error)
- func (utq *UserTokenQuery) AllX(ctx context.Context) []*UserToken
- func (utq *UserTokenQuery) Clone() *UserTokenQuery
- func (utq *UserTokenQuery) Count(ctx context.Context) (int, error)
- func (utq *UserTokenQuery) CountX(ctx context.Context) int
- func (utq *UserTokenQuery) Exist(ctx context.Context) (bool, error)
- func (utq *UserTokenQuery) ExistX(ctx context.Context) bool
- func (utq *UserTokenQuery) First(ctx context.Context) (*UserToken, error)
- func (utq *UserTokenQuery) FirstID(ctx context.Context) (id int, err error)
- func (utq *UserTokenQuery) FirstIDX(ctx context.Context) int
- func (utq *UserTokenQuery) FirstX(ctx context.Context) *UserToken
- func (utq *UserTokenQuery) ForShare(opts ...sql.LockOption) *UserTokenQuery
- func (utq *UserTokenQuery) ForShareA(opts ...sql.LockOption) *UserTokenQuery
- func (utq *UserTokenQuery) ForUpdate(opts ...sql.LockOption) *UserTokenQuery
- func (utq *UserTokenQuery) ForUpdateA(opts ...sql.LockOption) *UserTokenQuery
- func (utq *UserTokenQuery) GroupBy(field string, fields ...string) *UserTokenGroupBy
- func (utq *UserTokenQuery) IDs(ctx context.Context) (ids []int, err error)
- func (utq *UserTokenQuery) IDsX(ctx context.Context) []int
- func (utq *UserTokenQuery) Limit(limit int) *UserTokenQuery
- func (utq *UserTokenQuery) Offset(offset int) *UserTokenQuery
- func (utq *UserTokenQuery) Only(ctx context.Context) (*UserToken, error)
- func (utq *UserTokenQuery) OnlyID(ctx context.Context) (id int, err error)
- func (utq *UserTokenQuery) OnlyIDX(ctx context.Context) int
- func (utq *UserTokenQuery) OnlyX(ctx context.Context) *UserToken
- func (utq *UserTokenQuery) Order(o ...usertoken.OrderOption) *UserTokenQuery
- func (utq *UserTokenQuery) QueryUser() *UserQuery
- func (utq *UserTokenQuery) Select(fields ...string) *UserTokenSelect
- func (utq *UserTokenQuery) Unique(unique bool) *UserTokenQuery
- func (utq *UserTokenQuery) Where(ps ...predicate.UserToken) *UserTokenQuery
- func (utq *UserTokenQuery) WithUser(opts ...func(*UserQuery)) *UserTokenQuery
- type UserTokenSelect
- func (uts *UserTokenSelect) Aggregate(fns ...AggregateFunc) *UserTokenSelect
- func (s *UserTokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserTokenSelect) BoolX(ctx context.Context) bool
- func (s *UserTokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserTokenSelect) BoolsX(ctx context.Context) []bool
- func (s *UserTokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserTokenSelect) Float64X(ctx context.Context) float64
- func (s *UserTokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserTokenSelect) Float64sX(ctx context.Context) []float64
- func (s *UserTokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserTokenSelect) IntX(ctx context.Context) int
- func (s *UserTokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserTokenSelect) IntsX(ctx context.Context) []int
- func (uts *UserTokenSelect) Scan(ctx context.Context, v any) error
- func (s *UserTokenSelect) ScanX(ctx context.Context, v any)
- func (s *UserTokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserTokenSelect) StringX(ctx context.Context) string
- func (s *UserTokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserTokenSelect) StringsX(ctx context.Context) []string
- type UserTokenUpdate
- func (utu *UserTokenUpdate) AddTokenID(u int64) *UserTokenUpdate
- func (utu *UserTokenUpdate) ClearUser() *UserTokenUpdate
- func (utu *UserTokenUpdate) Exec(ctx context.Context) error
- func (utu *UserTokenUpdate) ExecX(ctx context.Context)
- func (utu *UserTokenUpdate) Mutation() *UserTokenMutation
- func (utu *UserTokenUpdate) Save(ctx context.Context) (int, error)
- func (utu *UserTokenUpdate) SaveX(ctx context.Context) int
- func (utu *UserTokenUpdate) SetNillableUserID(id *int) *UserTokenUpdate
- func (utu *UserTokenUpdate) SetTokenID(u uint64) *UserTokenUpdate
- func (utu *UserTokenUpdate) SetUser(u *User) *UserTokenUpdate
- func (utu *UserTokenUpdate) SetUserID(id int) *UserTokenUpdate
- func (utu *UserTokenUpdate) Where(ps ...predicate.UserToken) *UserTokenUpdate
- type UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) AddTokenID(u int64) *UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) ClearUser() *UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) Exec(ctx context.Context) error
- func (utuo *UserTokenUpdateOne) ExecX(ctx context.Context)
- func (utuo *UserTokenUpdateOne) Mutation() *UserTokenMutation
- func (utuo *UserTokenUpdateOne) Save(ctx context.Context) (*UserToken, error)
- func (utuo *UserTokenUpdateOne) SaveX(ctx context.Context) *UserToken
- func (utuo *UserTokenUpdateOne) Select(field string, fields ...string) *UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) SetNillableUserID(id *int) *UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) SetTokenID(u uint64) *UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) SetUser(u *User) *UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) SetUserID(id int) *UserTokenUpdateOne
- func (utuo *UserTokenUpdateOne) Where(ps ...predicate.UserToken) *UserTokenUpdateOne
- type UserTokens
- type UserUpdate
- func (uu *UserUpdate) AddCreatedTexture(t ...*Texture) *UserUpdate
- func (uu *UserUpdate) AddCreatedTextureIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddRegTime(i int64) *UserUpdate
- func (uu *UserUpdate) AddState(i int) *UserUpdate
- func (uu *UserUpdate) ClearCreatedTexture() *UserUpdate
- func (uu *UserUpdate) ClearProfile() *UserUpdate
- func (uu *UserUpdate) ClearToken() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveCreatedTexture(t ...*Texture) *UserUpdate
- func (uu *UserUpdate) RemoveCreatedTextureIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableProfileID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillableTokenID(id *int) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetProfile(u *UserProfile) *UserUpdate
- func (uu *UserUpdate) SetProfileID(id int) *UserUpdate
- func (uu *UserUpdate) SetRegIP(s string) *UserUpdate
- func (uu *UserUpdate) SetRegTime(i int64) *UserUpdate
- func (uu *UserUpdate) SetSalt(s string) *UserUpdate
- func (uu *UserUpdate) SetState(i int) *UserUpdate
- func (uu *UserUpdate) SetToken(u *UserToken) *UserUpdate
- func (uu *UserUpdate) SetTokenID(id int) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddCreatedTexture(t ...*Texture) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCreatedTextureIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRegTime(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddState(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCreatedTexture() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearProfile() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearToken() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveCreatedTexture(t ...*Texture) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveCreatedTextureIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableProfileID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableTokenID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProfile(u *UserProfile) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProfileID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRegIP(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRegTime(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSalt(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetState(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetToken(u *UserToken) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTokenID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeTexture = "Texture" TypeUser = "User" TypeUserProfile = "UserProfile" TypeUserTexture = "UserTexture" TypeUserToken = "UserToken" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Texture is the client for interacting with the Texture builders. Texture *TextureClient // User is the client for interacting with the User builders. User *UserClient // UserProfile is the client for interacting with the UserProfile builders. UserProfile *UserProfileClient // UserTexture is the client for interacting with the UserTexture builders. UserTexture *UserTextureClient // UserToken is the client for interacting with the UserToken builders. UserToken *UserTokenClient // 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(). Texture. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Texture ¶
type Texture struct { // ID of the ent. ID int `json:"id,omitempty"` // TextureHash holds the value of the "texture_hash" field. TextureHash string `json:"texture_hash,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TextureQuery when eager-loading is set. Edges TextureEdges `json:"edges"` // contains filtered or unexported fields }
Texture is the model entity for the Texture schema.
func (*Texture) QueryCreatedUser ¶
QueryCreatedUser queries the "created_user" edge of the Texture entity.
func (*Texture) QueryUserProfile ¶
func (t *Texture) QueryUserProfile() *UserProfileQuery
QueryUserProfile queries the "user_profile" edge of the Texture entity.
func (*Texture) QueryUsertexture ¶
func (t *Texture) QueryUsertexture() *UserTextureQuery
QueryUsertexture queries the "usertexture" edge of the Texture entity.
func (*Texture) Unwrap ¶
Unwrap unwraps the Texture 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 (*Texture) Update ¶
func (t *Texture) Update() *TextureUpdateOne
Update returns a builder for updating this Texture. Note that you need to call Texture.Unwrap() before calling this method if this Texture was returned from a transaction, and the transaction was committed or rolled back.
type TextureClient ¶
type TextureClient struct {
// contains filtered or unexported fields
}
TextureClient is a client for the Texture schema.
func NewTextureClient ¶
func NewTextureClient(c config) *TextureClient
NewTextureClient returns a client for the Texture from the given config.
func (*TextureClient) Create ¶
func (c *TextureClient) Create() *TextureCreate
Create returns a builder for creating a Texture entity.
func (*TextureClient) CreateBulk ¶
func (c *TextureClient) CreateBulk(builders ...*TextureCreate) *TextureCreateBulk
CreateBulk returns a builder for creating a bulk of Texture entities.
func (*TextureClient) Delete ¶
func (c *TextureClient) Delete() *TextureDelete
Delete returns a delete builder for Texture.
func (*TextureClient) DeleteOne ¶
func (c *TextureClient) DeleteOne(t *Texture) *TextureDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TextureClient) DeleteOneID ¶
func (c *TextureClient) DeleteOneID(id int) *TextureDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TextureClient) GetX ¶
func (c *TextureClient) GetX(ctx context.Context, id int) *Texture
GetX is like Get, but panics if an error occurs.
func (*TextureClient) Hooks ¶
func (c *TextureClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TextureClient) Intercept ¶
func (c *TextureClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `texture.Intercept(f(g(h())))`.
func (*TextureClient) Interceptors ¶
func (c *TextureClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TextureClient) Query ¶
func (c *TextureClient) Query() *TextureQuery
Query returns a query builder for Texture.
func (*TextureClient) QueryCreatedUser ¶
func (c *TextureClient) QueryCreatedUser(t *Texture) *UserQuery
QueryCreatedUser queries the created_user edge of a Texture.
func (*TextureClient) QueryUserProfile ¶
func (c *TextureClient) QueryUserProfile(t *Texture) *UserProfileQuery
QueryUserProfile queries the user_profile edge of a Texture.
func (*TextureClient) QueryUsertexture ¶
func (c *TextureClient) QueryUsertexture(t *Texture) *UserTextureQuery
QueryUsertexture queries the usertexture edge of a Texture.
func (*TextureClient) Update ¶
func (c *TextureClient) Update() *TextureUpdate
Update returns an update builder for Texture.
func (*TextureClient) UpdateOne ¶
func (c *TextureClient) UpdateOne(t *Texture) *TextureUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TextureClient) UpdateOneID ¶
func (c *TextureClient) UpdateOneID(id int) *TextureUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TextureClient) Use ¶
func (c *TextureClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `texture.Hooks(f(g(h())))`.
type TextureCreate ¶
type TextureCreate struct {
// contains filtered or unexported fields
}
TextureCreate is the builder for creating a Texture entity.
func (*TextureCreate) AddUserProfile ¶
func (tc *TextureCreate) AddUserProfile(u ...*UserProfile) *TextureCreate
AddUserProfile adds the "user_profile" edges to the UserProfile entity.
func (*TextureCreate) AddUserProfileIDs ¶
func (tc *TextureCreate) AddUserProfileIDs(ids ...int) *TextureCreate
AddUserProfileIDs adds the "user_profile" edge to the UserProfile entity by IDs.
func (*TextureCreate) AddUsertexture ¶
func (tc *TextureCreate) AddUsertexture(u ...*UserTexture) *TextureCreate
AddUsertexture adds the "usertexture" edges to the UserTexture entity.
func (*TextureCreate) AddUsertextureIDs ¶
func (tc *TextureCreate) AddUsertextureIDs(ids ...int) *TextureCreate
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by IDs.
func (*TextureCreate) Exec ¶
func (tc *TextureCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TextureCreate) ExecX ¶
func (tc *TextureCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextureCreate) Mutation ¶
func (tc *TextureCreate) Mutation() *TextureMutation
Mutation returns the TextureMutation object of the builder.
func (*TextureCreate) Save ¶
func (tc *TextureCreate) Save(ctx context.Context) (*Texture, error)
Save creates the Texture in the database.
func (*TextureCreate) SaveX ¶
func (tc *TextureCreate) SaveX(ctx context.Context) *Texture
SaveX calls Save and panics if Save returns an error.
func (*TextureCreate) SetCreatedUser ¶
func (tc *TextureCreate) SetCreatedUser(u *User) *TextureCreate
SetCreatedUser sets the "created_user" edge to the User entity.
func (*TextureCreate) SetCreatedUserID ¶
func (tc *TextureCreate) SetCreatedUserID(id int) *TextureCreate
SetCreatedUserID sets the "created_user" edge to the User entity by ID.
func (*TextureCreate) SetTextureHash ¶
func (tc *TextureCreate) SetTextureHash(s string) *TextureCreate
SetTextureHash sets the "texture_hash" field.
type TextureCreateBulk ¶
type TextureCreateBulk struct {
// contains filtered or unexported fields
}
TextureCreateBulk is the builder for creating many Texture entities in bulk.
func (*TextureCreateBulk) Exec ¶
func (tcb *TextureCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TextureCreateBulk) ExecX ¶
func (tcb *TextureCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TextureDelete ¶
type TextureDelete struct {
// contains filtered or unexported fields
}
TextureDelete is the builder for deleting a Texture entity.
func (*TextureDelete) Exec ¶
func (td *TextureDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TextureDelete) ExecX ¶
func (td *TextureDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TextureDelete) Where ¶
func (td *TextureDelete) Where(ps ...predicate.Texture) *TextureDelete
Where appends a list predicates to the TextureDelete builder.
type TextureDeleteOne ¶
type TextureDeleteOne struct {
// contains filtered or unexported fields
}
TextureDeleteOne is the builder for deleting a single Texture entity.
func (*TextureDeleteOne) Exec ¶
func (tdo *TextureDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TextureDeleteOne) ExecX ¶
func (tdo *TextureDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextureDeleteOne) Where ¶
func (tdo *TextureDeleteOne) Where(ps ...predicate.Texture) *TextureDeleteOne
Where appends a list predicates to the TextureDelete builder.
type TextureEdges ¶
type TextureEdges struct { // CreatedUser holds the value of the created_user edge. CreatedUser *User `json:"created_user,omitempty"` // UserProfile holds the value of the user_profile edge. UserProfile []*UserProfile `json:"user_profile,omitempty"` // Usertexture holds the value of the usertexture edge. Usertexture []*UserTexture `json:"usertexture,omitempty"` // contains filtered or unexported fields }
TextureEdges holds the relations/edges for other nodes in the graph.
func (TextureEdges) CreatedUserOrErr ¶
func (e TextureEdges) CreatedUserOrErr() (*User, error)
CreatedUserOrErr returns the CreatedUser value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TextureEdges) UserProfileOrErr ¶
func (e TextureEdges) UserProfileOrErr() ([]*UserProfile, error)
UserProfileOrErr returns the UserProfile value or an error if the edge was not loaded in eager-loading.
func (TextureEdges) UsertextureOrErr ¶
func (e TextureEdges) UsertextureOrErr() ([]*UserTexture, error)
UsertextureOrErr returns the Usertexture value or an error if the edge was not loaded in eager-loading.
type TextureGroupBy ¶
type TextureGroupBy struct {
// contains filtered or unexported fields
}
TextureGroupBy is the group-by builder for Texture entities.
func (*TextureGroupBy) Aggregate ¶
func (tgb *TextureGroupBy) Aggregate(fns ...AggregateFunc) *TextureGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TextureGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TextureGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TextureGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TextureGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TextureGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TextureGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TextureGroupBy) Scan ¶
func (tgb *TextureGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TextureGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TextureMutation ¶
type TextureMutation struct {
// contains filtered or unexported fields
}
TextureMutation represents an operation that mutates the Texture nodes in the graph.
func (*TextureMutation) AddField ¶
func (m *TextureMutation) 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 (*TextureMutation) AddUserProfileIDs ¶
func (m *TextureMutation) AddUserProfileIDs(ids ...int)
AddUserProfileIDs adds the "user_profile" edge to the UserProfile entity by ids.
func (*TextureMutation) AddUsertextureIDs ¶
func (m *TextureMutation) AddUsertextureIDs(ids ...int)
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by ids.
func (*TextureMutation) AddedEdges ¶
func (m *TextureMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TextureMutation) AddedField ¶
func (m *TextureMutation) 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 (*TextureMutation) AddedFields ¶
func (m *TextureMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TextureMutation) AddedIDs ¶
func (m *TextureMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TextureMutation) ClearCreatedUser ¶
func (m *TextureMutation) ClearCreatedUser()
ClearCreatedUser clears the "created_user" edge to the User entity.
func (*TextureMutation) ClearEdge ¶
func (m *TextureMutation) 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 (*TextureMutation) ClearField ¶
func (m *TextureMutation) 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 (*TextureMutation) ClearUserProfile ¶
func (m *TextureMutation) ClearUserProfile()
ClearUserProfile clears the "user_profile" edge to the UserProfile entity.
func (*TextureMutation) ClearUsertexture ¶
func (m *TextureMutation) ClearUsertexture()
ClearUsertexture clears the "usertexture" edge to the UserTexture entity.
func (*TextureMutation) ClearedEdges ¶
func (m *TextureMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TextureMutation) ClearedFields ¶
func (m *TextureMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TextureMutation) Client ¶
func (m TextureMutation) 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 (*TextureMutation) CreatedUserCleared ¶
func (m *TextureMutation) CreatedUserCleared() bool
CreatedUserCleared reports if the "created_user" edge to the User entity was cleared.
func (*TextureMutation) CreatedUserID ¶
func (m *TextureMutation) CreatedUserID() (id int, exists bool)
CreatedUserID returns the "created_user" edge ID in the mutation.
func (*TextureMutation) CreatedUserIDs ¶
func (m *TextureMutation) CreatedUserIDs() (ids []int)
CreatedUserIDs returns the "created_user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatedUserID instead. It exists only for internal usage by the builders.
func (*TextureMutation) EdgeCleared ¶
func (m *TextureMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TextureMutation) Field ¶
func (m *TextureMutation) 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 (*TextureMutation) FieldCleared ¶
func (m *TextureMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TextureMutation) Fields ¶
func (m *TextureMutation) 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 (*TextureMutation) ID ¶
func (m *TextureMutation) 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 (*TextureMutation) IDs ¶
func (m *TextureMutation) 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 (*TextureMutation) 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 (*TextureMutation) OldTextureHash ¶
func (m *TextureMutation) OldTextureHash(ctx context.Context) (v string, err error)
OldTextureHash returns the old "texture_hash" field's value of the Texture entity. If the Texture object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TextureMutation) RemoveUserProfileIDs ¶
func (m *TextureMutation) RemoveUserProfileIDs(ids ...int)
RemoveUserProfileIDs removes the "user_profile" edge to the UserProfile entity by IDs.
func (*TextureMutation) RemoveUsertextureIDs ¶
func (m *TextureMutation) RemoveUsertextureIDs(ids ...int)
RemoveUsertextureIDs removes the "usertexture" edge to the UserTexture entity by IDs.
func (*TextureMutation) RemovedEdges ¶
func (m *TextureMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TextureMutation) RemovedIDs ¶
func (m *TextureMutation) 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 (*TextureMutation) RemovedUserProfileIDs ¶
func (m *TextureMutation) RemovedUserProfileIDs() (ids []int)
RemovedUserProfile returns the removed IDs of the "user_profile" edge to the UserProfile entity.
func (*TextureMutation) RemovedUsertextureIDs ¶
func (m *TextureMutation) RemovedUsertextureIDs() (ids []int)
RemovedUsertexture returns the removed IDs of the "usertexture" edge to the UserTexture entity.
func (*TextureMutation) ResetCreatedUser ¶
func (m *TextureMutation) ResetCreatedUser()
ResetCreatedUser resets all changes to the "created_user" edge.
func (*TextureMutation) ResetEdge ¶
func (m *TextureMutation) 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 (*TextureMutation) ResetField ¶
func (m *TextureMutation) 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 (*TextureMutation) ResetTextureHash ¶
func (m *TextureMutation) ResetTextureHash()
ResetTextureHash resets all changes to the "texture_hash" field.
func (*TextureMutation) ResetUserProfile ¶
func (m *TextureMutation) ResetUserProfile()
ResetUserProfile resets all changes to the "user_profile" edge.
func (*TextureMutation) ResetUsertexture ¶
func (m *TextureMutation) ResetUsertexture()
ResetUsertexture resets all changes to the "usertexture" edge.
func (*TextureMutation) SetCreatedUserID ¶
func (m *TextureMutation) SetCreatedUserID(id int)
SetCreatedUserID sets the "created_user" edge to the User entity by id.
func (*TextureMutation) SetField ¶
func (m *TextureMutation) 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 (*TextureMutation) SetOp ¶
func (m *TextureMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TextureMutation) SetTextureHash ¶
func (m *TextureMutation) SetTextureHash(s string)
SetTextureHash sets the "texture_hash" field.
func (*TextureMutation) TextureHash ¶
func (m *TextureMutation) TextureHash() (r string, exists bool)
TextureHash returns the value of the "texture_hash" field in the mutation.
func (TextureMutation) Tx ¶
func (m TextureMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TextureMutation) Type ¶
func (m *TextureMutation) Type() string
Type returns the node type of this mutation (Texture).
func (*TextureMutation) UserProfileCleared ¶
func (m *TextureMutation) UserProfileCleared() bool
UserProfileCleared reports if the "user_profile" edge to the UserProfile entity was cleared.
func (*TextureMutation) UserProfileIDs ¶
func (m *TextureMutation) UserProfileIDs() (ids []int)
UserProfileIDs returns the "user_profile" edge IDs in the mutation.
func (*TextureMutation) UsertextureCleared ¶
func (m *TextureMutation) UsertextureCleared() bool
UsertextureCleared reports if the "usertexture" edge to the UserTexture entity was cleared.
func (*TextureMutation) UsertextureIDs ¶
func (m *TextureMutation) UsertextureIDs() (ids []int)
UsertextureIDs returns the "usertexture" edge IDs in the mutation.
func (*TextureMutation) Where ¶
func (m *TextureMutation) Where(ps ...predicate.Texture)
Where appends a list predicates to the TextureMutation builder.
func (*TextureMutation) WhereP ¶
func (m *TextureMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TextureMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TextureQuery ¶
type TextureQuery struct {
// contains filtered or unexported fields
}
TextureQuery is the builder for querying Texture entities.
func (*TextureQuery) Aggregate ¶
func (tq *TextureQuery) Aggregate(fns ...AggregateFunc) *TextureSelect
Aggregate returns a TextureSelect configured with the given aggregations.
func (*TextureQuery) All ¶
func (tq *TextureQuery) All(ctx context.Context) ([]*Texture, error)
All executes the query and returns a list of Textures.
func (*TextureQuery) AllX ¶
func (tq *TextureQuery) AllX(ctx context.Context) []*Texture
AllX is like All, but panics if an error occurs.
func (*TextureQuery) Clone ¶
func (tq *TextureQuery) Clone() *TextureQuery
Clone returns a duplicate of the TextureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TextureQuery) Count ¶
func (tq *TextureQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TextureQuery) CountX ¶
func (tq *TextureQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TextureQuery) Exist ¶
func (tq *TextureQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TextureQuery) ExistX ¶
func (tq *TextureQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TextureQuery) First ¶
func (tq *TextureQuery) First(ctx context.Context) (*Texture, error)
First returns the first Texture entity from the query. Returns a *NotFoundError when no Texture was found.
func (*TextureQuery) FirstID ¶
func (tq *TextureQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Texture ID from the query. Returns a *NotFoundError when no Texture ID was found.
func (*TextureQuery) FirstIDX ¶
func (tq *TextureQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TextureQuery) FirstX ¶
func (tq *TextureQuery) FirstX(ctx context.Context) *Texture
FirstX is like First, but panics if an error occurs.
func (*TextureQuery) ForShare ¶
func (tq *TextureQuery) ForShare(opts ...sql.LockOption) *TextureQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*TextureQuery) ForShareA ¶
func (tq *TextureQuery) ForShareA(opts ...sql.LockOption) *TextureQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*TextureQuery) ForUpdate ¶
func (tq *TextureQuery) ForUpdate(opts ...sql.LockOption) *TextureQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*TextureQuery) ForUpdateA ¶
func (tq *TextureQuery) ForUpdateA(opts ...sql.LockOption) *TextureQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*TextureQuery) GroupBy ¶
func (tq *TextureQuery) GroupBy(field string, fields ...string) *TextureGroupBy
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 { TextureHash string `json:"texture_hash,omitempty"` Count int `json:"count,omitempty"` } client.Texture.Query(). GroupBy(texture.FieldTextureHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TextureQuery) IDs ¶
func (tq *TextureQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Texture IDs.
func (*TextureQuery) IDsX ¶
func (tq *TextureQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TextureQuery) Limit ¶
func (tq *TextureQuery) Limit(limit int) *TextureQuery
Limit the number of records to be returned by this query.
func (*TextureQuery) Offset ¶
func (tq *TextureQuery) Offset(offset int) *TextureQuery
Offset to start from.
func (*TextureQuery) Only ¶
func (tq *TextureQuery) Only(ctx context.Context) (*Texture, error)
Only returns a single Texture entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Texture entity is found. Returns a *NotFoundError when no Texture entities are found.
func (*TextureQuery) OnlyID ¶
func (tq *TextureQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Texture ID in the query. Returns a *NotSingularError when more than one Texture ID is found. Returns a *NotFoundError when no entities are found.
func (*TextureQuery) OnlyIDX ¶
func (tq *TextureQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TextureQuery) OnlyX ¶
func (tq *TextureQuery) OnlyX(ctx context.Context) *Texture
OnlyX is like Only, but panics if an error occurs.
func (*TextureQuery) Order ¶
func (tq *TextureQuery) Order(o ...texture.OrderOption) *TextureQuery
Order specifies how the records should be ordered.
func (*TextureQuery) QueryCreatedUser ¶
func (tq *TextureQuery) QueryCreatedUser() *UserQuery
QueryCreatedUser chains the current query on the "created_user" edge.
func (*TextureQuery) QueryUserProfile ¶
func (tq *TextureQuery) QueryUserProfile() *UserProfileQuery
QueryUserProfile chains the current query on the "user_profile" edge.
func (*TextureQuery) QueryUsertexture ¶
func (tq *TextureQuery) QueryUsertexture() *UserTextureQuery
QueryUsertexture chains the current query on the "usertexture" edge.
func (*TextureQuery) Select ¶
func (tq *TextureQuery) Select(fields ...string) *TextureSelect
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 { TextureHash string `json:"texture_hash,omitempty"` } client.Texture.Query(). Select(texture.FieldTextureHash). Scan(ctx, &v)
func (*TextureQuery) Unique ¶
func (tq *TextureQuery) Unique(unique bool) *TextureQuery
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 (*TextureQuery) Where ¶
func (tq *TextureQuery) Where(ps ...predicate.Texture) *TextureQuery
Where adds a new predicate for the TextureQuery builder.
func (*TextureQuery) WithCreatedUser ¶
func (tq *TextureQuery) WithCreatedUser(opts ...func(*UserQuery)) *TextureQuery
WithCreatedUser tells the query-builder to eager-load the nodes that are connected to the "created_user" edge. The optional arguments are used to configure the query builder of the edge.
func (*TextureQuery) WithUserProfile ¶
func (tq *TextureQuery) WithUserProfile(opts ...func(*UserProfileQuery)) *TextureQuery
WithUserProfile tells the query-builder to eager-load the nodes that are connected to the "user_profile" edge. The optional arguments are used to configure the query builder of the edge.
func (*TextureQuery) WithUsertexture ¶
func (tq *TextureQuery) WithUsertexture(opts ...func(*UserTextureQuery)) *TextureQuery
WithUsertexture tells the query-builder to eager-load the nodes that are connected to the "usertexture" edge. The optional arguments are used to configure the query builder of the edge.
type TextureSelect ¶
type TextureSelect struct { *TextureQuery // contains filtered or unexported fields }
TextureSelect is the builder for selecting fields of Texture entities.
func (*TextureSelect) Aggregate ¶
func (ts *TextureSelect) Aggregate(fns ...AggregateFunc) *TextureSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TextureSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TextureSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TextureSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TextureSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TextureSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TextureSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TextureSelect) Scan ¶
func (ts *TextureSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TextureSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TextureUpdate ¶
type TextureUpdate struct {
// contains filtered or unexported fields
}
TextureUpdate is the builder for updating Texture entities.
func (*TextureUpdate) AddUserProfile ¶
func (tu *TextureUpdate) AddUserProfile(u ...*UserProfile) *TextureUpdate
AddUserProfile adds the "user_profile" edges to the UserProfile entity.
func (*TextureUpdate) AddUserProfileIDs ¶
func (tu *TextureUpdate) AddUserProfileIDs(ids ...int) *TextureUpdate
AddUserProfileIDs adds the "user_profile" edge to the UserProfile entity by IDs.
func (*TextureUpdate) AddUsertexture ¶
func (tu *TextureUpdate) AddUsertexture(u ...*UserTexture) *TextureUpdate
AddUsertexture adds the "usertexture" edges to the UserTexture entity.
func (*TextureUpdate) AddUsertextureIDs ¶
func (tu *TextureUpdate) AddUsertextureIDs(ids ...int) *TextureUpdate
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by IDs.
func (*TextureUpdate) ClearCreatedUser ¶
func (tu *TextureUpdate) ClearCreatedUser() *TextureUpdate
ClearCreatedUser clears the "created_user" edge to the User entity.
func (*TextureUpdate) ClearUserProfile ¶
func (tu *TextureUpdate) ClearUserProfile() *TextureUpdate
ClearUserProfile clears all "user_profile" edges to the UserProfile entity.
func (*TextureUpdate) ClearUsertexture ¶
func (tu *TextureUpdate) ClearUsertexture() *TextureUpdate
ClearUsertexture clears all "usertexture" edges to the UserTexture entity.
func (*TextureUpdate) Exec ¶
func (tu *TextureUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TextureUpdate) ExecX ¶
func (tu *TextureUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextureUpdate) Mutation ¶
func (tu *TextureUpdate) Mutation() *TextureMutation
Mutation returns the TextureMutation object of the builder.
func (*TextureUpdate) RemoveUserProfile ¶
func (tu *TextureUpdate) RemoveUserProfile(u ...*UserProfile) *TextureUpdate
RemoveUserProfile removes "user_profile" edges to UserProfile entities.
func (*TextureUpdate) RemoveUserProfileIDs ¶
func (tu *TextureUpdate) RemoveUserProfileIDs(ids ...int) *TextureUpdate
RemoveUserProfileIDs removes the "user_profile" edge to UserProfile entities by IDs.
func (*TextureUpdate) RemoveUsertexture ¶
func (tu *TextureUpdate) RemoveUsertexture(u ...*UserTexture) *TextureUpdate
RemoveUsertexture removes "usertexture" edges to UserTexture entities.
func (*TextureUpdate) RemoveUsertextureIDs ¶
func (tu *TextureUpdate) RemoveUsertextureIDs(ids ...int) *TextureUpdate
RemoveUsertextureIDs removes the "usertexture" edge to UserTexture entities by IDs.
func (*TextureUpdate) Save ¶
func (tu *TextureUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TextureUpdate) SaveX ¶
func (tu *TextureUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TextureUpdate) SetCreatedUser ¶
func (tu *TextureUpdate) SetCreatedUser(u *User) *TextureUpdate
SetCreatedUser sets the "created_user" edge to the User entity.
func (*TextureUpdate) SetCreatedUserID ¶
func (tu *TextureUpdate) SetCreatedUserID(id int) *TextureUpdate
SetCreatedUserID sets the "created_user" edge to the User entity by ID.
func (*TextureUpdate) SetTextureHash ¶
func (tu *TextureUpdate) SetTextureHash(s string) *TextureUpdate
SetTextureHash sets the "texture_hash" field.
func (*TextureUpdate) Where ¶
func (tu *TextureUpdate) Where(ps ...predicate.Texture) *TextureUpdate
Where appends a list predicates to the TextureUpdate builder.
type TextureUpdateOne ¶
type TextureUpdateOne struct {
// contains filtered or unexported fields
}
TextureUpdateOne is the builder for updating a single Texture entity.
func (*TextureUpdateOne) AddUserProfile ¶
func (tuo *TextureUpdateOne) AddUserProfile(u ...*UserProfile) *TextureUpdateOne
AddUserProfile adds the "user_profile" edges to the UserProfile entity.
func (*TextureUpdateOne) AddUserProfileIDs ¶
func (tuo *TextureUpdateOne) AddUserProfileIDs(ids ...int) *TextureUpdateOne
AddUserProfileIDs adds the "user_profile" edge to the UserProfile entity by IDs.
func (*TextureUpdateOne) AddUsertexture ¶
func (tuo *TextureUpdateOne) AddUsertexture(u ...*UserTexture) *TextureUpdateOne
AddUsertexture adds the "usertexture" edges to the UserTexture entity.
func (*TextureUpdateOne) AddUsertextureIDs ¶
func (tuo *TextureUpdateOne) AddUsertextureIDs(ids ...int) *TextureUpdateOne
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by IDs.
func (*TextureUpdateOne) ClearCreatedUser ¶
func (tuo *TextureUpdateOne) ClearCreatedUser() *TextureUpdateOne
ClearCreatedUser clears the "created_user" edge to the User entity.
func (*TextureUpdateOne) ClearUserProfile ¶
func (tuo *TextureUpdateOne) ClearUserProfile() *TextureUpdateOne
ClearUserProfile clears all "user_profile" edges to the UserProfile entity.
func (*TextureUpdateOne) ClearUsertexture ¶
func (tuo *TextureUpdateOne) ClearUsertexture() *TextureUpdateOne
ClearUsertexture clears all "usertexture" edges to the UserTexture entity.
func (*TextureUpdateOne) Exec ¶
func (tuo *TextureUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TextureUpdateOne) ExecX ¶
func (tuo *TextureUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextureUpdateOne) Mutation ¶
func (tuo *TextureUpdateOne) Mutation() *TextureMutation
Mutation returns the TextureMutation object of the builder.
func (*TextureUpdateOne) RemoveUserProfile ¶
func (tuo *TextureUpdateOne) RemoveUserProfile(u ...*UserProfile) *TextureUpdateOne
RemoveUserProfile removes "user_profile" edges to UserProfile entities.
func (*TextureUpdateOne) RemoveUserProfileIDs ¶
func (tuo *TextureUpdateOne) RemoveUserProfileIDs(ids ...int) *TextureUpdateOne
RemoveUserProfileIDs removes the "user_profile" edge to UserProfile entities by IDs.
func (*TextureUpdateOne) RemoveUsertexture ¶
func (tuo *TextureUpdateOne) RemoveUsertexture(u ...*UserTexture) *TextureUpdateOne
RemoveUsertexture removes "usertexture" edges to UserTexture entities.
func (*TextureUpdateOne) RemoveUsertextureIDs ¶
func (tuo *TextureUpdateOne) RemoveUsertextureIDs(ids ...int) *TextureUpdateOne
RemoveUsertextureIDs removes the "usertexture" edge to UserTexture entities by IDs.
func (*TextureUpdateOne) Save ¶
func (tuo *TextureUpdateOne) Save(ctx context.Context) (*Texture, error)
Save executes the query and returns the updated Texture entity.
func (*TextureUpdateOne) SaveX ¶
func (tuo *TextureUpdateOne) SaveX(ctx context.Context) *Texture
SaveX is like Save, but panics if an error occurs.
func (*TextureUpdateOne) Select ¶
func (tuo *TextureUpdateOne) Select(field string, fields ...string) *TextureUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TextureUpdateOne) SetCreatedUser ¶
func (tuo *TextureUpdateOne) SetCreatedUser(u *User) *TextureUpdateOne
SetCreatedUser sets the "created_user" edge to the User entity.
func (*TextureUpdateOne) SetCreatedUserID ¶
func (tuo *TextureUpdateOne) SetCreatedUserID(id int) *TextureUpdateOne
SetCreatedUserID sets the "created_user" edge to the User entity by ID.
func (*TextureUpdateOne) SetTextureHash ¶
func (tuo *TextureUpdateOne) SetTextureHash(s string) *TextureUpdateOne
SetTextureHash sets the "texture_hash" field.
func (*TextureUpdateOne) Where ¶
func (tuo *TextureUpdateOne) Where(ps ...predicate.Texture) *TextureUpdateOne
Where appends a list predicates to the TextureUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Texture is the client for interacting with the Texture builders. Texture *TextureClient // User is the client for interacting with the User builders. User *UserClient // UserProfile is the client for interacting with the UserProfile builders. UserProfile *UserProfileClient // UserTexture is the client for interacting with the UserTexture builders. UserTexture *UserTextureClient // UserToken is the client for interacting with the UserToken builders. UserToken *UserTokenClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // Salt holds the value of the "salt" field. Salt string `json:"salt,omitempty"` // RegIP holds the value of the "reg_ip" field. RegIP string `json:"reg_ip,omitempty"` // State holds the value of the "state" field. State int `json:"state,omitempty"` // RegTime holds the value of the "reg_time" field. RegTime int64 `json:"reg_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryCreatedTexture ¶
func (u *User) QueryCreatedTexture() *TextureQuery
QueryCreatedTexture queries the "created_texture" edge of the User entity.
func (*User) QueryProfile ¶
func (u *User) QueryProfile() *UserProfileQuery
QueryProfile queries the "profile" edge of the User entity.
func (*User) QueryToken ¶
func (u *User) QueryToken() *UserTokenQuery
QueryToken queries the "token" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryCreatedTexture ¶
func (c *UserClient) QueryCreatedTexture(u *User) *TextureQuery
QueryCreatedTexture queries the created_texture edge of a User.
func (*UserClient) QueryProfile ¶
func (c *UserClient) QueryProfile(u *User) *UserProfileQuery
QueryProfile queries the profile edge of a User.
func (*UserClient) QueryToken ¶
func (c *UserClient) QueryToken(u *User) *UserTokenQuery
QueryToken queries the token edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddCreatedTexture ¶
func (uc *UserCreate) AddCreatedTexture(t ...*Texture) *UserCreate
AddCreatedTexture adds the "created_texture" edges to the Texture entity.
func (*UserCreate) AddCreatedTextureIDs ¶
func (uc *UserCreate) AddCreatedTextureIDs(ids ...int) *UserCreate
AddCreatedTextureIDs adds the "created_texture" edge to the Texture entity by IDs.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetNillableProfileID ¶
func (uc *UserCreate) SetNillableProfileID(id *int) *UserCreate
SetNillableProfileID sets the "profile" edge to the UserProfile entity by ID if the given value is not nil.
func (*UserCreate) SetNillableTokenID ¶
func (uc *UserCreate) SetNillableTokenID(id *int) *UserCreate
SetNillableTokenID sets the "token" edge to the UserToken entity by ID if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetProfile ¶
func (uc *UserCreate) SetProfile(u *UserProfile) *UserCreate
SetProfile sets the "profile" edge to the UserProfile entity.
func (*UserCreate) SetProfileID ¶
func (uc *UserCreate) SetProfileID(id int) *UserCreate
SetProfileID sets the "profile" edge to the UserProfile entity by ID.
func (*UserCreate) SetRegIP ¶
func (uc *UserCreate) SetRegIP(s string) *UserCreate
SetRegIP sets the "reg_ip" field.
func (*UserCreate) SetRegTime ¶
func (uc *UserCreate) SetRegTime(i int64) *UserCreate
SetRegTime sets the "reg_time" field.
func (*UserCreate) SetSalt ¶
func (uc *UserCreate) SetSalt(s string) *UserCreate
SetSalt sets the "salt" field.
func (*UserCreate) SetState ¶
func (uc *UserCreate) SetState(i int) *UserCreate
SetState sets the "state" field.
func (*UserCreate) SetToken ¶
func (uc *UserCreate) SetToken(u *UserToken) *UserCreate
SetToken sets the "token" edge to the UserToken entity.
func (*UserCreate) SetTokenID ¶
func (uc *UserCreate) SetTokenID(id int) *UserCreate
SetTokenID sets the "token" edge to the UserToken entity by ID.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // CreatedTexture holds the value of the created_texture edge. CreatedTexture []*Texture `json:"created_texture,omitempty"` // Profile holds the value of the profile edge. Profile *UserProfile `json:"profile,omitempty"` // Token holds the value of the token edge. Token *UserToken `json:"token,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) CreatedTextureOrErr ¶
CreatedTextureOrErr returns the CreatedTexture value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ProfileOrErr ¶
func (e UserEdges) ProfileOrErr() (*UserProfile, error)
ProfileOrErr returns the Profile value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) TokenOrErr ¶
TokenOrErr returns the Token value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddCreatedTextureIDs ¶
func (m *UserMutation) AddCreatedTextureIDs(ids ...int)
AddCreatedTextureIDs adds the "created_texture" edge to the Texture entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddRegTime ¶
func (m *UserMutation) AddRegTime(i int64)
AddRegTime adds i to the "reg_time" field.
func (*UserMutation) AddState ¶
func (m *UserMutation) AddState(i int)
AddState adds i to the "state" field.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedRegTime ¶
func (m *UserMutation) AddedRegTime() (r int64, exists bool)
AddedRegTime returns the value that was added to the "reg_time" field in this mutation.
func (*UserMutation) AddedState ¶
func (m *UserMutation) AddedState() (r int, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*UserMutation) ClearCreatedTexture ¶
func (m *UserMutation) ClearCreatedTexture()
ClearCreatedTexture clears the "created_texture" edge to the Texture entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearProfile ¶
func (m *UserMutation) ClearProfile()
ClearProfile clears the "profile" edge to the UserProfile entity.
func (*UserMutation) ClearToken ¶
func (m *UserMutation) ClearToken()
ClearToken clears the "token" edge to the UserToken entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedTextureCleared ¶
func (m *UserMutation) CreatedTextureCleared() bool
CreatedTextureCleared reports if the "created_texture" edge to the Texture entity was cleared.
func (*UserMutation) CreatedTextureIDs ¶
func (m *UserMutation) CreatedTextureIDs() (ids []int)
CreatedTextureIDs returns the "created_texture" edge IDs in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id 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 (*UserMutation) IDs ¶
func (m *UserMutation) 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 (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldRegIP ¶
func (m *UserMutation) OldRegIP(ctx context.Context) (v string, err error)
OldRegIP returns the old "reg_ip" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldRegTime ¶
func (m *UserMutation) OldRegTime(ctx context.Context) (v int64, err error)
OldRegTime returns the old "reg_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldSalt ¶
func (m *UserMutation) OldSalt(ctx context.Context) (v string, err error)
OldSalt returns the old "salt" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldState ¶
func (m *UserMutation) OldState(ctx context.Context) (v int, err error)
OldState returns the old "state" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) ProfileCleared ¶
func (m *UserMutation) ProfileCleared() bool
ProfileCleared reports if the "profile" edge to the UserProfile entity was cleared.
func (*UserMutation) ProfileID ¶
func (m *UserMutation) ProfileID() (id int, exists bool)
ProfileID returns the "profile" edge ID in the mutation.
func (*UserMutation) ProfileIDs ¶
func (m *UserMutation) ProfileIDs() (ids []int)
ProfileIDs returns the "profile" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProfileID instead. It exists only for internal usage by the builders.
func (*UserMutation) RegIP ¶
func (m *UserMutation) RegIP() (r string, exists bool)
RegIP returns the value of the "reg_ip" field in the mutation.
func (*UserMutation) RegTime ¶
func (m *UserMutation) RegTime() (r int64, exists bool)
RegTime returns the value of the "reg_time" field in the mutation.
func (*UserMutation) RemoveCreatedTextureIDs ¶
func (m *UserMutation) RemoveCreatedTextureIDs(ids ...int)
RemoveCreatedTextureIDs removes the "created_texture" edge to the Texture entity by IDs.
func (*UserMutation) RemovedCreatedTextureIDs ¶
func (m *UserMutation) RemovedCreatedTextureIDs() (ids []int)
RemovedCreatedTexture returns the removed IDs of the "created_texture" edge to the Texture entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) ResetCreatedTexture ¶
func (m *UserMutation) ResetCreatedTexture()
ResetCreatedTexture resets all changes to the "created_texture" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetProfile ¶
func (m *UserMutation) ResetProfile()
ResetProfile resets all changes to the "profile" edge.
func (*UserMutation) ResetRegIP ¶
func (m *UserMutation) ResetRegIP()
ResetRegIP resets all changes to the "reg_ip" field.
func (*UserMutation) ResetRegTime ¶
func (m *UserMutation) ResetRegTime()
ResetRegTime resets all changes to the "reg_time" field.
func (*UserMutation) ResetSalt ¶
func (m *UserMutation) ResetSalt()
ResetSalt resets all changes to the "salt" field.
func (*UserMutation) ResetState ¶
func (m *UserMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*UserMutation) ResetToken ¶
func (m *UserMutation) ResetToken()
ResetToken resets all changes to the "token" edge.
func (*UserMutation) Salt ¶
func (m *UserMutation) Salt() (r string, exists bool)
Salt returns the value of the "salt" field in the mutation.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetProfileID ¶
func (m *UserMutation) SetProfileID(id int)
SetProfileID sets the "profile" edge to the UserProfile entity by id.
func (*UserMutation) SetRegIP ¶
func (m *UserMutation) SetRegIP(s string)
SetRegIP sets the "reg_ip" field.
func (*UserMutation) SetRegTime ¶
func (m *UserMutation) SetRegTime(i int64)
SetRegTime sets the "reg_time" field.
func (*UserMutation) SetSalt ¶
func (m *UserMutation) SetSalt(s string)
SetSalt sets the "salt" field.
func (*UserMutation) SetState ¶
func (m *UserMutation) SetState(i int)
SetState sets the "state" field.
func (*UserMutation) SetTokenID ¶
func (m *UserMutation) SetTokenID(id int)
SetTokenID sets the "token" edge to the UserToken entity by id.
func (*UserMutation) State ¶
func (m *UserMutation) State() (r int, exists bool)
State returns the value of the "state" field in the mutation.
func (*UserMutation) TokenCleared ¶
func (m *UserMutation) TokenCleared() bool
TokenCleared reports if the "token" edge to the UserToken entity was cleared.
func (*UserMutation) TokenID ¶
func (m *UserMutation) TokenID() (id int, exists bool)
TokenID returns the "token" edge ID in the mutation.
func (*UserMutation) TokenIDs ¶
func (m *UserMutation) TokenIDs() (ids []int)
TokenIDs returns the "token" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TokenID instead. It exists only for internal usage by the builders.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserProfile ¶
type UserProfile struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // UUID holds the value of the "uuid" field. UUID string `json:"uuid,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserProfileQuery when eager-loading is set. Edges UserProfileEdges `json:"edges"` // contains filtered or unexported fields }
UserProfile is the model entity for the UserProfile schema.
func (*UserProfile) QueryTexture ¶
func (up *UserProfile) QueryTexture() *TextureQuery
QueryTexture queries the "texture" edge of the UserProfile entity.
func (*UserProfile) QueryUser ¶
func (up *UserProfile) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserProfile entity.
func (*UserProfile) QueryUsertexture ¶
func (up *UserProfile) QueryUsertexture() *UserTextureQuery
QueryUsertexture queries the "usertexture" edge of the UserProfile entity.
func (*UserProfile) String ¶
func (up *UserProfile) String() string
String implements the fmt.Stringer.
func (*UserProfile) Unwrap ¶
func (up *UserProfile) Unwrap() *UserProfile
Unwrap unwraps the UserProfile 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 (*UserProfile) Update ¶
func (up *UserProfile) Update() *UserProfileUpdateOne
Update returns a builder for updating this UserProfile. Note that you need to call UserProfile.Unwrap() before calling this method if this UserProfile was returned from a transaction, and the transaction was committed or rolled back.
type UserProfileClient ¶
type UserProfileClient struct {
// contains filtered or unexported fields
}
UserProfileClient is a client for the UserProfile schema.
func NewUserProfileClient ¶
func NewUserProfileClient(c config) *UserProfileClient
NewUserProfileClient returns a client for the UserProfile from the given config.
func (*UserProfileClient) Create ¶
func (c *UserProfileClient) Create() *UserProfileCreate
Create returns a builder for creating a UserProfile entity.
func (*UserProfileClient) CreateBulk ¶
func (c *UserProfileClient) CreateBulk(builders ...*UserProfileCreate) *UserProfileCreateBulk
CreateBulk returns a builder for creating a bulk of UserProfile entities.
func (*UserProfileClient) Delete ¶
func (c *UserProfileClient) Delete() *UserProfileDelete
Delete returns a delete builder for UserProfile.
func (*UserProfileClient) DeleteOne ¶
func (c *UserProfileClient) DeleteOne(up *UserProfile) *UserProfileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserProfileClient) DeleteOneID ¶
func (c *UserProfileClient) DeleteOneID(id int) *UserProfileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserProfileClient) Get ¶
func (c *UserProfileClient) Get(ctx context.Context, id int) (*UserProfile, error)
Get returns a UserProfile entity by its id.
func (*UserProfileClient) GetX ¶
func (c *UserProfileClient) GetX(ctx context.Context, id int) *UserProfile
GetX is like Get, but panics if an error occurs.
func (*UserProfileClient) Hooks ¶
func (c *UserProfileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserProfileClient) Intercept ¶
func (c *UserProfileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userprofile.Intercept(f(g(h())))`.
func (*UserProfileClient) Interceptors ¶
func (c *UserProfileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserProfileClient) Query ¶
func (c *UserProfileClient) Query() *UserProfileQuery
Query returns a query builder for UserProfile.
func (*UserProfileClient) QueryTexture ¶
func (c *UserProfileClient) QueryTexture(up *UserProfile) *TextureQuery
QueryTexture queries the texture edge of a UserProfile.
func (*UserProfileClient) QueryUser ¶
func (c *UserProfileClient) QueryUser(up *UserProfile) *UserQuery
QueryUser queries the user edge of a UserProfile.
func (*UserProfileClient) QueryUsertexture ¶
func (c *UserProfileClient) QueryUsertexture(up *UserProfile) *UserTextureQuery
QueryUsertexture queries the usertexture edge of a UserProfile.
func (*UserProfileClient) Update ¶
func (c *UserProfileClient) Update() *UserProfileUpdate
Update returns an update builder for UserProfile.
func (*UserProfileClient) UpdateOne ¶
func (c *UserProfileClient) UpdateOne(up *UserProfile) *UserProfileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserProfileClient) UpdateOneID ¶
func (c *UserProfileClient) UpdateOneID(id int) *UserProfileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserProfileClient) Use ¶
func (c *UserProfileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userprofile.Hooks(f(g(h())))`.
type UserProfileCreate ¶
type UserProfileCreate struct {
// contains filtered or unexported fields
}
UserProfileCreate is the builder for creating a UserProfile entity.
func (*UserProfileCreate) AddTexture ¶
func (upc *UserProfileCreate) AddTexture(t ...*Texture) *UserProfileCreate
AddTexture adds the "texture" edges to the Texture entity.
func (*UserProfileCreate) AddTextureIDs ¶
func (upc *UserProfileCreate) AddTextureIDs(ids ...int) *UserProfileCreate
AddTextureIDs adds the "texture" edge to the Texture entity by IDs.
func (*UserProfileCreate) AddUsertexture ¶
func (upc *UserProfileCreate) AddUsertexture(u ...*UserTexture) *UserProfileCreate
AddUsertexture adds the "usertexture" edges to the UserTexture entity.
func (*UserProfileCreate) AddUsertextureIDs ¶
func (upc *UserProfileCreate) AddUsertextureIDs(ids ...int) *UserProfileCreate
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by IDs.
func (*UserProfileCreate) Exec ¶
func (upc *UserProfileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserProfileCreate) ExecX ¶
func (upc *UserProfileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserProfileCreate) Mutation ¶
func (upc *UserProfileCreate) Mutation() *UserProfileMutation
Mutation returns the UserProfileMutation object of the builder.
func (*UserProfileCreate) Save ¶
func (upc *UserProfileCreate) Save(ctx context.Context) (*UserProfile, error)
Save creates the UserProfile in the database.
func (*UserProfileCreate) SaveX ¶
func (upc *UserProfileCreate) SaveX(ctx context.Context) *UserProfile
SaveX calls Save and panics if Save returns an error.
func (*UserProfileCreate) SetName ¶
func (upc *UserProfileCreate) SetName(s string) *UserProfileCreate
SetName sets the "name" field.
func (*UserProfileCreate) SetUUID ¶
func (upc *UserProfileCreate) SetUUID(s string) *UserProfileCreate
SetUUID sets the "uuid" field.
func (*UserProfileCreate) SetUser ¶
func (upc *UserProfileCreate) SetUser(u *User) *UserProfileCreate
SetUser sets the "user" edge to the User entity.
func (*UserProfileCreate) SetUserID ¶
func (upc *UserProfileCreate) SetUserID(id int) *UserProfileCreate
SetUserID sets the "user" edge to the User entity by ID.
type UserProfileCreateBulk ¶
type UserProfileCreateBulk struct {
// contains filtered or unexported fields
}
UserProfileCreateBulk is the builder for creating many UserProfile entities in bulk.
func (*UserProfileCreateBulk) Exec ¶
func (upcb *UserProfileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserProfileCreateBulk) ExecX ¶
func (upcb *UserProfileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserProfileCreateBulk) Save ¶
func (upcb *UserProfileCreateBulk) Save(ctx context.Context) ([]*UserProfile, error)
Save creates the UserProfile entities in the database.
func (*UserProfileCreateBulk) SaveX ¶
func (upcb *UserProfileCreateBulk) SaveX(ctx context.Context) []*UserProfile
SaveX is like Save, but panics if an error occurs.
type UserProfileDelete ¶
type UserProfileDelete struct {
// contains filtered or unexported fields
}
UserProfileDelete is the builder for deleting a UserProfile entity.
func (*UserProfileDelete) Exec ¶
func (upd *UserProfileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserProfileDelete) ExecX ¶
func (upd *UserProfileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserProfileDelete) Where ¶
func (upd *UserProfileDelete) Where(ps ...predicate.UserProfile) *UserProfileDelete
Where appends a list predicates to the UserProfileDelete builder.
type UserProfileDeleteOne ¶
type UserProfileDeleteOne struct {
// contains filtered or unexported fields
}
UserProfileDeleteOne is the builder for deleting a single UserProfile entity.
func (*UserProfileDeleteOne) Exec ¶
func (updo *UserProfileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserProfileDeleteOne) ExecX ¶
func (updo *UserProfileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserProfileDeleteOne) Where ¶
func (updo *UserProfileDeleteOne) Where(ps ...predicate.UserProfile) *UserProfileDeleteOne
Where appends a list predicates to the UserProfileDelete builder.
type UserProfileEdges ¶
type UserProfileEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Texture holds the value of the texture edge. Texture []*Texture `json:"texture,omitempty"` // Usertexture holds the value of the usertexture edge. Usertexture []*UserTexture `json:"usertexture,omitempty"` // contains filtered or unexported fields }
UserProfileEdges holds the relations/edges for other nodes in the graph.
func (UserProfileEdges) TextureOrErr ¶
func (e UserProfileEdges) TextureOrErr() ([]*Texture, error)
TextureOrErr returns the Texture value or an error if the edge was not loaded in eager-loading.
func (UserProfileEdges) UserOrErr ¶
func (e UserProfileEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserProfileEdges) UsertextureOrErr ¶
func (e UserProfileEdges) UsertextureOrErr() ([]*UserTexture, error)
UsertextureOrErr returns the Usertexture value or an error if the edge was not loaded in eager-loading.
type UserProfileGroupBy ¶
type UserProfileGroupBy struct {
// contains filtered or unexported fields
}
UserProfileGroupBy is the group-by builder for UserProfile entities.
func (*UserProfileGroupBy) Aggregate ¶
func (upgb *UserProfileGroupBy) Aggregate(fns ...AggregateFunc) *UserProfileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserProfileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserProfileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserProfileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserProfileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserProfileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserProfileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserProfileGroupBy) Scan ¶
func (upgb *UserProfileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserProfileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserProfileMutation ¶
type UserProfileMutation struct {
// contains filtered or unexported fields
}
UserProfileMutation represents an operation that mutates the UserProfile nodes in the graph.
func (*UserProfileMutation) AddField ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) AddTextureIDs ¶
func (m *UserProfileMutation) AddTextureIDs(ids ...int)
AddTextureIDs adds the "texture" edge to the Texture entity by ids.
func (*UserProfileMutation) AddUsertextureIDs ¶
func (m *UserProfileMutation) AddUsertextureIDs(ids ...int)
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by ids.
func (*UserProfileMutation) AddedEdges ¶
func (m *UserProfileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserProfileMutation) AddedField ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) AddedFields ¶
func (m *UserProfileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserProfileMutation) AddedIDs ¶
func (m *UserProfileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserProfileMutation) ClearEdge ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) ClearField ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) ClearTexture ¶
func (m *UserProfileMutation) ClearTexture()
ClearTexture clears the "texture" edge to the Texture entity.
func (*UserProfileMutation) ClearUser ¶
func (m *UserProfileMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserProfileMutation) ClearUsertexture ¶
func (m *UserProfileMutation) ClearUsertexture()
ClearUsertexture clears the "usertexture" edge to the UserTexture entity.
func (*UserProfileMutation) ClearedEdges ¶
func (m *UserProfileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserProfileMutation) ClearedFields ¶
func (m *UserProfileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserProfileMutation) Client ¶
func (m UserProfileMutation) 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 (*UserProfileMutation) EdgeCleared ¶
func (m *UserProfileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserProfileMutation) Field ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) FieldCleared ¶
func (m *UserProfileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserProfileMutation) Fields ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) ID ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) IDs ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) Name ¶
func (m *UserProfileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserProfileMutation) 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 (*UserProfileMutation) OldName ¶
func (m *UserProfileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the UserProfile entity. If the UserProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserProfileMutation) OldUUID ¶
func (m *UserProfileMutation) OldUUID(ctx context.Context) (v string, err error)
OldUUID returns the old "uuid" field's value of the UserProfile entity. If the UserProfile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserProfileMutation) Op ¶
func (m *UserProfileMutation) Op() Op
Op returns the operation name.
func (*UserProfileMutation) RemoveTextureIDs ¶
func (m *UserProfileMutation) RemoveTextureIDs(ids ...int)
RemoveTextureIDs removes the "texture" edge to the Texture entity by IDs.
func (*UserProfileMutation) RemoveUsertextureIDs ¶
func (m *UserProfileMutation) RemoveUsertextureIDs(ids ...int)
RemoveUsertextureIDs removes the "usertexture" edge to the UserTexture entity by IDs.
func (*UserProfileMutation) RemovedEdges ¶
func (m *UserProfileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserProfileMutation) RemovedIDs ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) RemovedTextureIDs ¶
func (m *UserProfileMutation) RemovedTextureIDs() (ids []int)
RemovedTexture returns the removed IDs of the "texture" edge to the Texture entity.
func (*UserProfileMutation) RemovedUsertextureIDs ¶
func (m *UserProfileMutation) RemovedUsertextureIDs() (ids []int)
RemovedUsertexture returns the removed IDs of the "usertexture" edge to the UserTexture entity.
func (*UserProfileMutation) ResetEdge ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) ResetField ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) ResetName ¶
func (m *UserProfileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserProfileMutation) ResetTexture ¶
func (m *UserProfileMutation) ResetTexture()
ResetTexture resets all changes to the "texture" edge.
func (*UserProfileMutation) ResetUUID ¶
func (m *UserProfileMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*UserProfileMutation) ResetUser ¶
func (m *UserProfileMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserProfileMutation) ResetUsertexture ¶
func (m *UserProfileMutation) ResetUsertexture()
ResetUsertexture resets all changes to the "usertexture" edge.
func (*UserProfileMutation) SetField ¶
func (m *UserProfileMutation) 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 (*UserProfileMutation) SetName ¶
func (m *UserProfileMutation) SetName(s string)
SetName sets the "name" field.
func (*UserProfileMutation) SetOp ¶
func (m *UserProfileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserProfileMutation) SetUUID ¶
func (m *UserProfileMutation) SetUUID(s string)
SetUUID sets the "uuid" field.
func (*UserProfileMutation) SetUserID ¶
func (m *UserProfileMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*UserProfileMutation) TextureCleared ¶
func (m *UserProfileMutation) TextureCleared() bool
TextureCleared reports if the "texture" edge to the Texture entity was cleared.
func (*UserProfileMutation) TextureIDs ¶
func (m *UserProfileMutation) TextureIDs() (ids []int)
TextureIDs returns the "texture" edge IDs in the mutation.
func (UserProfileMutation) Tx ¶
func (m UserProfileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserProfileMutation) Type ¶
func (m *UserProfileMutation) Type() string
Type returns the node type of this mutation (UserProfile).
func (*UserProfileMutation) UUID ¶
func (m *UserProfileMutation) UUID() (r string, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*UserProfileMutation) UserCleared ¶
func (m *UserProfileMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserProfileMutation) UserID ¶
func (m *UserProfileMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*UserProfileMutation) UserIDs ¶
func (m *UserProfileMutation) UserIDs() (ids []int)
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 (*UserProfileMutation) UsertextureCleared ¶
func (m *UserProfileMutation) UsertextureCleared() bool
UsertextureCleared reports if the "usertexture" edge to the UserTexture entity was cleared.
func (*UserProfileMutation) UsertextureIDs ¶
func (m *UserProfileMutation) UsertextureIDs() (ids []int)
UsertextureIDs returns the "usertexture" edge IDs in the mutation.
func (*UserProfileMutation) Where ¶
func (m *UserProfileMutation) Where(ps ...predicate.UserProfile)
Where appends a list predicates to the UserProfileMutation builder.
func (*UserProfileMutation) WhereP ¶
func (m *UserProfileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserProfileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserProfileQuery ¶
type UserProfileQuery struct {
// contains filtered or unexported fields
}
UserProfileQuery is the builder for querying UserProfile entities.
func (*UserProfileQuery) Aggregate ¶
func (upq *UserProfileQuery) Aggregate(fns ...AggregateFunc) *UserProfileSelect
Aggregate returns a UserProfileSelect configured with the given aggregations.
func (*UserProfileQuery) All ¶
func (upq *UserProfileQuery) All(ctx context.Context) ([]*UserProfile, error)
All executes the query and returns a list of UserProfiles.
func (*UserProfileQuery) AllX ¶
func (upq *UserProfileQuery) AllX(ctx context.Context) []*UserProfile
AllX is like All, but panics if an error occurs.
func (*UserProfileQuery) Clone ¶
func (upq *UserProfileQuery) Clone() *UserProfileQuery
Clone returns a duplicate of the UserProfileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserProfileQuery) Count ¶
func (upq *UserProfileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserProfileQuery) CountX ¶
func (upq *UserProfileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserProfileQuery) Exist ¶
func (upq *UserProfileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserProfileQuery) ExistX ¶
func (upq *UserProfileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserProfileQuery) First ¶
func (upq *UserProfileQuery) First(ctx context.Context) (*UserProfile, error)
First returns the first UserProfile entity from the query. Returns a *NotFoundError when no UserProfile was found.
func (*UserProfileQuery) FirstID ¶
func (upq *UserProfileQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserProfile ID from the query. Returns a *NotFoundError when no UserProfile ID was found.
func (*UserProfileQuery) FirstIDX ¶
func (upq *UserProfileQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserProfileQuery) FirstX ¶
func (upq *UserProfileQuery) FirstX(ctx context.Context) *UserProfile
FirstX is like First, but panics if an error occurs.
func (*UserProfileQuery) ForShare ¶
func (upq *UserProfileQuery) ForShare(opts ...sql.LockOption) *UserProfileQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserProfileQuery) ForShareA ¶
func (upq *UserProfileQuery) ForShareA(opts ...sql.LockOption) *UserProfileQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserProfileQuery) ForUpdate ¶
func (upq *UserProfileQuery) ForUpdate(opts ...sql.LockOption) *UserProfileQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserProfileQuery) ForUpdateA ¶
func (upq *UserProfileQuery) ForUpdateA(opts ...sql.LockOption) *UserProfileQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserProfileQuery) GroupBy ¶
func (upq *UserProfileQuery) GroupBy(field string, fields ...string) *UserProfileGroupBy
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.UserProfile.Query(). GroupBy(userprofile.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserProfileQuery) IDs ¶
func (upq *UserProfileQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserProfile IDs.
func (*UserProfileQuery) IDsX ¶
func (upq *UserProfileQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserProfileQuery) Limit ¶
func (upq *UserProfileQuery) Limit(limit int) *UserProfileQuery
Limit the number of records to be returned by this query.
func (*UserProfileQuery) Offset ¶
func (upq *UserProfileQuery) Offset(offset int) *UserProfileQuery
Offset to start from.
func (*UserProfileQuery) Only ¶
func (upq *UserProfileQuery) Only(ctx context.Context) (*UserProfile, error)
Only returns a single UserProfile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserProfile entity is found. Returns a *NotFoundError when no UserProfile entities are found.
func (*UserProfileQuery) OnlyID ¶
func (upq *UserProfileQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserProfile ID in the query. Returns a *NotSingularError when more than one UserProfile ID is found. Returns a *NotFoundError when no entities are found.
func (*UserProfileQuery) OnlyIDX ¶
func (upq *UserProfileQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserProfileQuery) OnlyX ¶
func (upq *UserProfileQuery) OnlyX(ctx context.Context) *UserProfile
OnlyX is like Only, but panics if an error occurs.
func (*UserProfileQuery) Order ¶
func (upq *UserProfileQuery) Order(o ...userprofile.OrderOption) *UserProfileQuery
Order specifies how the records should be ordered.
func (*UserProfileQuery) QueryTexture ¶
func (upq *UserProfileQuery) QueryTexture() *TextureQuery
QueryTexture chains the current query on the "texture" edge.
func (*UserProfileQuery) QueryUser ¶
func (upq *UserProfileQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserProfileQuery) QueryUsertexture ¶
func (upq *UserProfileQuery) QueryUsertexture() *UserTextureQuery
QueryUsertexture chains the current query on the "usertexture" edge.
func (*UserProfileQuery) Select ¶
func (upq *UserProfileQuery) Select(fields ...string) *UserProfileSelect
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.UserProfile.Query(). Select(userprofile.FieldName). Scan(ctx, &v)
func (*UserProfileQuery) Unique ¶
func (upq *UserProfileQuery) Unique(unique bool) *UserProfileQuery
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 (*UserProfileQuery) Where ¶
func (upq *UserProfileQuery) Where(ps ...predicate.UserProfile) *UserProfileQuery
Where adds a new predicate for the UserProfileQuery builder.
func (*UserProfileQuery) WithTexture ¶
func (upq *UserProfileQuery) WithTexture(opts ...func(*TextureQuery)) *UserProfileQuery
WithTexture tells the query-builder to eager-load the nodes that are connected to the "texture" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserProfileQuery) WithUser ¶
func (upq *UserProfileQuery) WithUser(opts ...func(*UserQuery)) *UserProfileQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserProfileQuery) WithUsertexture ¶
func (upq *UserProfileQuery) WithUsertexture(opts ...func(*UserTextureQuery)) *UserProfileQuery
WithUsertexture tells the query-builder to eager-load the nodes that are connected to the "usertexture" edge. The optional arguments are used to configure the query builder of the edge.
type UserProfileSelect ¶
type UserProfileSelect struct { *UserProfileQuery // contains filtered or unexported fields }
UserProfileSelect is the builder for selecting fields of UserProfile entities.
func (*UserProfileSelect) Aggregate ¶
func (ups *UserProfileSelect) Aggregate(fns ...AggregateFunc) *UserProfileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserProfileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserProfileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserProfileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserProfileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserProfileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserProfileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserProfileSelect) Scan ¶
func (ups *UserProfileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserProfileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserProfileUpdate ¶
type UserProfileUpdate struct {
// contains filtered or unexported fields
}
UserProfileUpdate is the builder for updating UserProfile entities.
func (*UserProfileUpdate) AddTexture ¶
func (upu *UserProfileUpdate) AddTexture(t ...*Texture) *UserProfileUpdate
AddTexture adds the "texture" edges to the Texture entity.
func (*UserProfileUpdate) AddTextureIDs ¶
func (upu *UserProfileUpdate) AddTextureIDs(ids ...int) *UserProfileUpdate
AddTextureIDs adds the "texture" edge to the Texture entity by IDs.
func (*UserProfileUpdate) AddUsertexture ¶
func (upu *UserProfileUpdate) AddUsertexture(u ...*UserTexture) *UserProfileUpdate
AddUsertexture adds the "usertexture" edges to the UserTexture entity.
func (*UserProfileUpdate) AddUsertextureIDs ¶
func (upu *UserProfileUpdate) AddUsertextureIDs(ids ...int) *UserProfileUpdate
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by IDs.
func (*UserProfileUpdate) ClearTexture ¶
func (upu *UserProfileUpdate) ClearTexture() *UserProfileUpdate
ClearTexture clears all "texture" edges to the Texture entity.
func (*UserProfileUpdate) ClearUser ¶
func (upu *UserProfileUpdate) ClearUser() *UserProfileUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserProfileUpdate) ClearUsertexture ¶
func (upu *UserProfileUpdate) ClearUsertexture() *UserProfileUpdate
ClearUsertexture clears all "usertexture" edges to the UserTexture entity.
func (*UserProfileUpdate) Exec ¶
func (upu *UserProfileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserProfileUpdate) ExecX ¶
func (upu *UserProfileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserProfileUpdate) Mutation ¶
func (upu *UserProfileUpdate) Mutation() *UserProfileMutation
Mutation returns the UserProfileMutation object of the builder.
func (*UserProfileUpdate) RemoveTexture ¶
func (upu *UserProfileUpdate) RemoveTexture(t ...*Texture) *UserProfileUpdate
RemoveTexture removes "texture" edges to Texture entities.
func (*UserProfileUpdate) RemoveTextureIDs ¶
func (upu *UserProfileUpdate) RemoveTextureIDs(ids ...int) *UserProfileUpdate
RemoveTextureIDs removes the "texture" edge to Texture entities by IDs.
func (*UserProfileUpdate) RemoveUsertexture ¶
func (upu *UserProfileUpdate) RemoveUsertexture(u ...*UserTexture) *UserProfileUpdate
RemoveUsertexture removes "usertexture" edges to UserTexture entities.
func (*UserProfileUpdate) RemoveUsertextureIDs ¶
func (upu *UserProfileUpdate) RemoveUsertextureIDs(ids ...int) *UserProfileUpdate
RemoveUsertextureIDs removes the "usertexture" edge to UserTexture entities by IDs.
func (*UserProfileUpdate) Save ¶
func (upu *UserProfileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserProfileUpdate) SaveX ¶
func (upu *UserProfileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserProfileUpdate) SetName ¶
func (upu *UserProfileUpdate) SetName(s string) *UserProfileUpdate
SetName sets the "name" field.
func (*UserProfileUpdate) SetUUID ¶
func (upu *UserProfileUpdate) SetUUID(s string) *UserProfileUpdate
SetUUID sets the "uuid" field.
func (*UserProfileUpdate) SetUser ¶
func (upu *UserProfileUpdate) SetUser(u *User) *UserProfileUpdate
SetUser sets the "user" edge to the User entity.
func (*UserProfileUpdate) SetUserID ¶
func (upu *UserProfileUpdate) SetUserID(id int) *UserProfileUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*UserProfileUpdate) Where ¶
func (upu *UserProfileUpdate) Where(ps ...predicate.UserProfile) *UserProfileUpdate
Where appends a list predicates to the UserProfileUpdate builder.
type UserProfileUpdateOne ¶
type UserProfileUpdateOne struct {
// contains filtered or unexported fields
}
UserProfileUpdateOne is the builder for updating a single UserProfile entity.
func (*UserProfileUpdateOne) AddTexture ¶
func (upuo *UserProfileUpdateOne) AddTexture(t ...*Texture) *UserProfileUpdateOne
AddTexture adds the "texture" edges to the Texture entity.
func (*UserProfileUpdateOne) AddTextureIDs ¶
func (upuo *UserProfileUpdateOne) AddTextureIDs(ids ...int) *UserProfileUpdateOne
AddTextureIDs adds the "texture" edge to the Texture entity by IDs.
func (*UserProfileUpdateOne) AddUsertexture ¶
func (upuo *UserProfileUpdateOne) AddUsertexture(u ...*UserTexture) *UserProfileUpdateOne
AddUsertexture adds the "usertexture" edges to the UserTexture entity.
func (*UserProfileUpdateOne) AddUsertextureIDs ¶
func (upuo *UserProfileUpdateOne) AddUsertextureIDs(ids ...int) *UserProfileUpdateOne
AddUsertextureIDs adds the "usertexture" edge to the UserTexture entity by IDs.
func (*UserProfileUpdateOne) ClearTexture ¶
func (upuo *UserProfileUpdateOne) ClearTexture() *UserProfileUpdateOne
ClearTexture clears all "texture" edges to the Texture entity.
func (*UserProfileUpdateOne) ClearUser ¶
func (upuo *UserProfileUpdateOne) ClearUser() *UserProfileUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserProfileUpdateOne) ClearUsertexture ¶
func (upuo *UserProfileUpdateOne) ClearUsertexture() *UserProfileUpdateOne
ClearUsertexture clears all "usertexture" edges to the UserTexture entity.
func (*UserProfileUpdateOne) Exec ¶
func (upuo *UserProfileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserProfileUpdateOne) ExecX ¶
func (upuo *UserProfileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserProfileUpdateOne) Mutation ¶
func (upuo *UserProfileUpdateOne) Mutation() *UserProfileMutation
Mutation returns the UserProfileMutation object of the builder.
func (*UserProfileUpdateOne) RemoveTexture ¶
func (upuo *UserProfileUpdateOne) RemoveTexture(t ...*Texture) *UserProfileUpdateOne
RemoveTexture removes "texture" edges to Texture entities.
func (*UserProfileUpdateOne) RemoveTextureIDs ¶
func (upuo *UserProfileUpdateOne) RemoveTextureIDs(ids ...int) *UserProfileUpdateOne
RemoveTextureIDs removes the "texture" edge to Texture entities by IDs.
func (*UserProfileUpdateOne) RemoveUsertexture ¶
func (upuo *UserProfileUpdateOne) RemoveUsertexture(u ...*UserTexture) *UserProfileUpdateOne
RemoveUsertexture removes "usertexture" edges to UserTexture entities.
func (*UserProfileUpdateOne) RemoveUsertextureIDs ¶
func (upuo *UserProfileUpdateOne) RemoveUsertextureIDs(ids ...int) *UserProfileUpdateOne
RemoveUsertextureIDs removes the "usertexture" edge to UserTexture entities by IDs.
func (*UserProfileUpdateOne) Save ¶
func (upuo *UserProfileUpdateOne) Save(ctx context.Context) (*UserProfile, error)
Save executes the query and returns the updated UserProfile entity.
func (*UserProfileUpdateOne) SaveX ¶
func (upuo *UserProfileUpdateOne) SaveX(ctx context.Context) *UserProfile
SaveX is like Save, but panics if an error occurs.
func (*UserProfileUpdateOne) Select ¶
func (upuo *UserProfileUpdateOne) Select(field string, fields ...string) *UserProfileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserProfileUpdateOne) SetName ¶
func (upuo *UserProfileUpdateOne) SetName(s string) *UserProfileUpdateOne
SetName sets the "name" field.
func (*UserProfileUpdateOne) SetUUID ¶
func (upuo *UserProfileUpdateOne) SetUUID(s string) *UserProfileUpdateOne
SetUUID sets the "uuid" field.
func (*UserProfileUpdateOne) SetUser ¶
func (upuo *UserProfileUpdateOne) SetUser(u *User) *UserProfileUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserProfileUpdateOne) SetUserID ¶
func (upuo *UserProfileUpdateOne) SetUserID(id int) *UserProfileUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*UserProfileUpdateOne) Where ¶
func (upuo *UserProfileUpdateOne) Where(ps ...predicate.UserProfile) *UserProfileUpdateOne
Where appends a list predicates to the UserProfileUpdate builder.
type UserProfiles ¶
type UserProfiles []*UserProfile
UserProfiles is a parsable slice of UserProfile.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) ForShare ¶
func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserQuery) ForShareA ¶
func (uq *UserQuery) ForShareA(opts ...sql.LockOption) *UserQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserQuery) ForUpdate ¶
func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserQuery) ForUpdateA ¶
func (uq *UserQuery) ForUpdateA(opts ...sql.LockOption) *UserQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Email string `json:"email,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldEmail). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryCreatedTexture ¶
func (uq *UserQuery) QueryCreatedTexture() *TextureQuery
QueryCreatedTexture chains the current query on the "created_texture" edge.
func (*UserQuery) QueryProfile ¶
func (uq *UserQuery) QueryProfile() *UserProfileQuery
QueryProfile chains the current query on the "profile" edge.
func (*UserQuery) QueryToken ¶
func (uq *UserQuery) QueryToken() *UserTokenQuery
QueryToken chains the current query on the "token" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Email string `json:"email,omitempty"` } client.User.Query(). Select(user.FieldEmail). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithCreatedTexture ¶
func (uq *UserQuery) WithCreatedTexture(opts ...func(*TextureQuery)) *UserQuery
WithCreatedTexture tells the query-builder to eager-load the nodes that are connected to the "created_texture" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithProfile ¶
func (uq *UserQuery) WithProfile(opts ...func(*UserProfileQuery)) *UserQuery
WithProfile tells the query-builder to eager-load the nodes that are connected to the "profile" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithToken ¶
func (uq *UserQuery) WithToken(opts ...func(*UserTokenQuery)) *UserQuery
WithToken tells the query-builder to eager-load the nodes that are connected to the "token" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTexture ¶
type UserTexture struct { // ID of the ent. ID int `json:"id,omitempty"` // UserProfileID holds the value of the "user_profile_id" field. UserProfileID int `json:"user_profile_id,omitempty"` // TextureID holds the value of the "texture_id" field. TextureID int `json:"texture_id,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // Variant holds the value of the "variant" field. Variant string `json:"variant,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserTextureQuery when eager-loading is set. Edges UserTextureEdges `json:"edges"` // contains filtered or unexported fields }
UserTexture is the model entity for the UserTexture schema.
func (*UserTexture) QueryTexture ¶
func (ut *UserTexture) QueryTexture() *TextureQuery
QueryTexture queries the "texture" edge of the UserTexture entity.
func (*UserTexture) QueryUserProfile ¶
func (ut *UserTexture) QueryUserProfile() *UserProfileQuery
QueryUserProfile queries the "user_profile" edge of the UserTexture entity.
func (*UserTexture) String ¶
func (ut *UserTexture) String() string
String implements the fmt.Stringer.
func (*UserTexture) Unwrap ¶
func (ut *UserTexture) Unwrap() *UserTexture
Unwrap unwraps the UserTexture 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 (*UserTexture) Update ¶
func (ut *UserTexture) Update() *UserTextureUpdateOne
Update returns a builder for updating this UserTexture. Note that you need to call UserTexture.Unwrap() before calling this method if this UserTexture was returned from a transaction, and the transaction was committed or rolled back.
type UserTextureClient ¶
type UserTextureClient struct {
// contains filtered or unexported fields
}
UserTextureClient is a client for the UserTexture schema.
func NewUserTextureClient ¶
func NewUserTextureClient(c config) *UserTextureClient
NewUserTextureClient returns a client for the UserTexture from the given config.
func (*UserTextureClient) Create ¶
func (c *UserTextureClient) Create() *UserTextureCreate
Create returns a builder for creating a UserTexture entity.
func (*UserTextureClient) CreateBulk ¶
func (c *UserTextureClient) CreateBulk(builders ...*UserTextureCreate) *UserTextureCreateBulk
CreateBulk returns a builder for creating a bulk of UserTexture entities.
func (*UserTextureClient) Delete ¶
func (c *UserTextureClient) Delete() *UserTextureDelete
Delete returns a delete builder for UserTexture.
func (*UserTextureClient) DeleteOne ¶
func (c *UserTextureClient) DeleteOne(ut *UserTexture) *UserTextureDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserTextureClient) DeleteOneID ¶
func (c *UserTextureClient) DeleteOneID(id int) *UserTextureDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserTextureClient) Get ¶
func (c *UserTextureClient) Get(ctx context.Context, id int) (*UserTexture, error)
Get returns a UserTexture entity by its id.
func (*UserTextureClient) GetX ¶
func (c *UserTextureClient) GetX(ctx context.Context, id int) *UserTexture
GetX is like Get, but panics if an error occurs.
func (*UserTextureClient) Hooks ¶
func (c *UserTextureClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserTextureClient) Intercept ¶
func (c *UserTextureClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usertexture.Intercept(f(g(h())))`.
func (*UserTextureClient) Interceptors ¶
func (c *UserTextureClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserTextureClient) Query ¶
func (c *UserTextureClient) Query() *UserTextureQuery
Query returns a query builder for UserTexture.
func (*UserTextureClient) QueryTexture ¶
func (c *UserTextureClient) QueryTexture(ut *UserTexture) *TextureQuery
QueryTexture queries the texture edge of a UserTexture.
func (*UserTextureClient) QueryUserProfile ¶
func (c *UserTextureClient) QueryUserProfile(ut *UserTexture) *UserProfileQuery
QueryUserProfile queries the user_profile edge of a UserTexture.
func (*UserTextureClient) Update ¶
func (c *UserTextureClient) Update() *UserTextureUpdate
Update returns an update builder for UserTexture.
func (*UserTextureClient) UpdateOne ¶
func (c *UserTextureClient) UpdateOne(ut *UserTexture) *UserTextureUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserTextureClient) UpdateOneID ¶
func (c *UserTextureClient) UpdateOneID(id int) *UserTextureUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserTextureClient) Use ¶
func (c *UserTextureClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usertexture.Hooks(f(g(h())))`.
type UserTextureCreate ¶
type UserTextureCreate struct {
// contains filtered or unexported fields
}
UserTextureCreate is the builder for creating a UserTexture entity.
func (*UserTextureCreate) Exec ¶
func (utc *UserTextureCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTextureCreate) ExecX ¶
func (utc *UserTextureCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTextureCreate) Mutation ¶
func (utc *UserTextureCreate) Mutation() *UserTextureMutation
Mutation returns the UserTextureMutation object of the builder.
func (*UserTextureCreate) Save ¶
func (utc *UserTextureCreate) Save(ctx context.Context) (*UserTexture, error)
Save creates the UserTexture in the database.
func (*UserTextureCreate) SaveX ¶
func (utc *UserTextureCreate) SaveX(ctx context.Context) *UserTexture
SaveX calls Save and panics if Save returns an error.
func (*UserTextureCreate) SetTexture ¶
func (utc *UserTextureCreate) SetTexture(t *Texture) *UserTextureCreate
SetTexture sets the "texture" edge to the Texture entity.
func (*UserTextureCreate) SetTextureID ¶
func (utc *UserTextureCreate) SetTextureID(i int) *UserTextureCreate
SetTextureID sets the "texture_id" field.
func (*UserTextureCreate) SetType ¶
func (utc *UserTextureCreate) SetType(s string) *UserTextureCreate
SetType sets the "type" field.
func (*UserTextureCreate) SetUserProfile ¶
func (utc *UserTextureCreate) SetUserProfile(u *UserProfile) *UserTextureCreate
SetUserProfile sets the "user_profile" edge to the UserProfile entity.
func (*UserTextureCreate) SetUserProfileID ¶
func (utc *UserTextureCreate) SetUserProfileID(i int) *UserTextureCreate
SetUserProfileID sets the "user_profile_id" field.
func (*UserTextureCreate) SetVariant ¶
func (utc *UserTextureCreate) SetVariant(s string) *UserTextureCreate
SetVariant sets the "variant" field.
type UserTextureCreateBulk ¶
type UserTextureCreateBulk struct {
// contains filtered or unexported fields
}
UserTextureCreateBulk is the builder for creating many UserTexture entities in bulk.
func (*UserTextureCreateBulk) Exec ¶
func (utcb *UserTextureCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTextureCreateBulk) ExecX ¶
func (utcb *UserTextureCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTextureCreateBulk) Save ¶
func (utcb *UserTextureCreateBulk) Save(ctx context.Context) ([]*UserTexture, error)
Save creates the UserTexture entities in the database.
func (*UserTextureCreateBulk) SaveX ¶
func (utcb *UserTextureCreateBulk) SaveX(ctx context.Context) []*UserTexture
SaveX is like Save, but panics if an error occurs.
type UserTextureDelete ¶
type UserTextureDelete struct {
// contains filtered or unexported fields
}
UserTextureDelete is the builder for deleting a UserTexture entity.
func (*UserTextureDelete) Exec ¶
func (utd *UserTextureDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserTextureDelete) ExecX ¶
func (utd *UserTextureDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserTextureDelete) Where ¶
func (utd *UserTextureDelete) Where(ps ...predicate.UserTexture) *UserTextureDelete
Where appends a list predicates to the UserTextureDelete builder.
type UserTextureDeleteOne ¶
type UserTextureDeleteOne struct {
// contains filtered or unexported fields
}
UserTextureDeleteOne is the builder for deleting a single UserTexture entity.
func (*UserTextureDeleteOne) Exec ¶
func (utdo *UserTextureDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserTextureDeleteOne) ExecX ¶
func (utdo *UserTextureDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTextureDeleteOne) Where ¶
func (utdo *UserTextureDeleteOne) Where(ps ...predicate.UserTexture) *UserTextureDeleteOne
Where appends a list predicates to the UserTextureDelete builder.
type UserTextureEdges ¶
type UserTextureEdges struct { // UserProfile holds the value of the user_profile edge. UserProfile *UserProfile `json:"user_profile,omitempty"` // Texture holds the value of the texture edge. Texture *Texture `json:"texture,omitempty"` // contains filtered or unexported fields }
UserTextureEdges holds the relations/edges for other nodes in the graph.
func (UserTextureEdges) TextureOrErr ¶
func (e UserTextureEdges) TextureOrErr() (*Texture, error)
TextureOrErr returns the Texture value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserTextureEdges) UserProfileOrErr ¶
func (e UserTextureEdges) UserProfileOrErr() (*UserProfile, error)
UserProfileOrErr returns the UserProfile value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserTextureGroupBy ¶
type UserTextureGroupBy struct {
// contains filtered or unexported fields
}
UserTextureGroupBy is the group-by builder for UserTexture entities.
func (*UserTextureGroupBy) Aggregate ¶
func (utgb *UserTextureGroupBy) Aggregate(fns ...AggregateFunc) *UserTextureGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserTextureGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserTextureGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserTextureGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserTextureGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserTextureGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserTextureGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserTextureGroupBy) Scan ¶
func (utgb *UserTextureGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserTextureGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTextureMutation ¶
type UserTextureMutation struct {
// contains filtered or unexported fields
}
UserTextureMutation represents an operation that mutates the UserTexture nodes in the graph.
func (*UserTextureMutation) AddField ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) AddedEdges ¶
func (m *UserTextureMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserTextureMutation) AddedField ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) AddedFields ¶
func (m *UserTextureMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserTextureMutation) AddedIDs ¶
func (m *UserTextureMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserTextureMutation) ClearEdge ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) ClearField ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) ClearTexture ¶
func (m *UserTextureMutation) ClearTexture()
ClearTexture clears the "texture" edge to the Texture entity.
func (*UserTextureMutation) ClearUserProfile ¶
func (m *UserTextureMutation) ClearUserProfile()
ClearUserProfile clears the "user_profile" edge to the UserProfile entity.
func (*UserTextureMutation) ClearedEdges ¶
func (m *UserTextureMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserTextureMutation) ClearedFields ¶
func (m *UserTextureMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserTextureMutation) Client ¶
func (m UserTextureMutation) 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 (*UserTextureMutation) EdgeCleared ¶
func (m *UserTextureMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserTextureMutation) Field ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) FieldCleared ¶
func (m *UserTextureMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserTextureMutation) Fields ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) GetType ¶
func (m *UserTextureMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserTextureMutation) ID ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) IDs ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) 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 (*UserTextureMutation) OldTextureID ¶
func (m *UserTextureMutation) OldTextureID(ctx context.Context) (v int, err error)
OldTextureID returns the old "texture_id" field's value of the UserTexture entity. If the UserTexture object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTextureMutation) OldType ¶
func (m *UserTextureMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the UserTexture entity. If the UserTexture object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTextureMutation) OldUserProfileID ¶
func (m *UserTextureMutation) OldUserProfileID(ctx context.Context) (v int, err error)
OldUserProfileID returns the old "user_profile_id" field's value of the UserTexture entity. If the UserTexture object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTextureMutation) OldVariant ¶
func (m *UserTextureMutation) OldVariant(ctx context.Context) (v string, err error)
OldVariant returns the old "variant" field's value of the UserTexture entity. If the UserTexture object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTextureMutation) Op ¶
func (m *UserTextureMutation) Op() Op
Op returns the operation name.
func (*UserTextureMutation) RemovedEdges ¶
func (m *UserTextureMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserTextureMutation) RemovedIDs ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) ResetEdge ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) ResetField ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) ResetTexture ¶
func (m *UserTextureMutation) ResetTexture()
ResetTexture resets all changes to the "texture" edge.
func (*UserTextureMutation) ResetTextureID ¶
func (m *UserTextureMutation) ResetTextureID()
ResetTextureID resets all changes to the "texture_id" field.
func (*UserTextureMutation) ResetType ¶
func (m *UserTextureMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserTextureMutation) ResetUserProfile ¶
func (m *UserTextureMutation) ResetUserProfile()
ResetUserProfile resets all changes to the "user_profile" edge.
func (*UserTextureMutation) ResetUserProfileID ¶
func (m *UserTextureMutation) ResetUserProfileID()
ResetUserProfileID resets all changes to the "user_profile_id" field.
func (*UserTextureMutation) ResetVariant ¶
func (m *UserTextureMutation) ResetVariant()
ResetVariant resets all changes to the "variant" field.
func (*UserTextureMutation) SetField ¶
func (m *UserTextureMutation) 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 (*UserTextureMutation) SetOp ¶
func (m *UserTextureMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserTextureMutation) SetTextureID ¶
func (m *UserTextureMutation) SetTextureID(i int)
SetTextureID sets the "texture_id" field.
func (*UserTextureMutation) SetType ¶
func (m *UserTextureMutation) SetType(s string)
SetType sets the "type" field.
func (*UserTextureMutation) SetUserProfileID ¶
func (m *UserTextureMutation) SetUserProfileID(i int)
SetUserProfileID sets the "user_profile_id" field.
func (*UserTextureMutation) SetVariant ¶
func (m *UserTextureMutation) SetVariant(s string)
SetVariant sets the "variant" field.
func (*UserTextureMutation) TextureCleared ¶
func (m *UserTextureMutation) TextureCleared() bool
TextureCleared reports if the "texture" edge to the Texture entity was cleared.
func (*UserTextureMutation) TextureID ¶
func (m *UserTextureMutation) TextureID() (r int, exists bool)
TextureID returns the value of the "texture_id" field in the mutation.
func (*UserTextureMutation) TextureIDs ¶
func (m *UserTextureMutation) TextureIDs() (ids []int)
TextureIDs returns the "texture" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TextureID instead. It exists only for internal usage by the builders.
func (UserTextureMutation) Tx ¶
func (m UserTextureMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserTextureMutation) Type ¶
func (m *UserTextureMutation) Type() string
Type returns the node type of this mutation (UserTexture).
func (*UserTextureMutation) UserProfileCleared ¶
func (m *UserTextureMutation) UserProfileCleared() bool
UserProfileCleared reports if the "user_profile" edge to the UserProfile entity was cleared.
func (*UserTextureMutation) UserProfileID ¶
func (m *UserTextureMutation) UserProfileID() (r int, exists bool)
UserProfileID returns the value of the "user_profile_id" field in the mutation.
func (*UserTextureMutation) UserProfileIDs ¶
func (m *UserTextureMutation) UserProfileIDs() (ids []int)
UserProfileIDs returns the "user_profile" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserProfileID instead. It exists only for internal usage by the builders.
func (*UserTextureMutation) Variant ¶
func (m *UserTextureMutation) Variant() (r string, exists bool)
Variant returns the value of the "variant" field in the mutation.
func (*UserTextureMutation) Where ¶
func (m *UserTextureMutation) Where(ps ...predicate.UserTexture)
Where appends a list predicates to the UserTextureMutation builder.
func (*UserTextureMutation) WhereP ¶
func (m *UserTextureMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserTextureMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserTextureQuery ¶
type UserTextureQuery struct {
// contains filtered or unexported fields
}
UserTextureQuery is the builder for querying UserTexture entities.
func (*UserTextureQuery) Aggregate ¶
func (utq *UserTextureQuery) Aggregate(fns ...AggregateFunc) *UserTextureSelect
Aggregate returns a UserTextureSelect configured with the given aggregations.
func (*UserTextureQuery) All ¶
func (utq *UserTextureQuery) All(ctx context.Context) ([]*UserTexture, error)
All executes the query and returns a list of UserTextures.
func (*UserTextureQuery) AllX ¶
func (utq *UserTextureQuery) AllX(ctx context.Context) []*UserTexture
AllX is like All, but panics if an error occurs.
func (*UserTextureQuery) Clone ¶
func (utq *UserTextureQuery) Clone() *UserTextureQuery
Clone returns a duplicate of the UserTextureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserTextureQuery) Count ¶
func (utq *UserTextureQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserTextureQuery) CountX ¶
func (utq *UserTextureQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserTextureQuery) Exist ¶
func (utq *UserTextureQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserTextureQuery) ExistX ¶
func (utq *UserTextureQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserTextureQuery) First ¶
func (utq *UserTextureQuery) First(ctx context.Context) (*UserTexture, error)
First returns the first UserTexture entity from the query. Returns a *NotFoundError when no UserTexture was found.
func (*UserTextureQuery) FirstID ¶
func (utq *UserTextureQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserTexture ID from the query. Returns a *NotFoundError when no UserTexture ID was found.
func (*UserTextureQuery) FirstIDX ¶
func (utq *UserTextureQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserTextureQuery) FirstX ¶
func (utq *UserTextureQuery) FirstX(ctx context.Context) *UserTexture
FirstX is like First, but panics if an error occurs.
func (*UserTextureQuery) ForShare ¶
func (utq *UserTextureQuery) ForShare(opts ...sql.LockOption) *UserTextureQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserTextureQuery) ForShareA ¶
func (utq *UserTextureQuery) ForShareA(opts ...sql.LockOption) *UserTextureQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserTextureQuery) ForUpdate ¶
func (utq *UserTextureQuery) ForUpdate(opts ...sql.LockOption) *UserTextureQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserTextureQuery) ForUpdateA ¶
func (utq *UserTextureQuery) ForUpdateA(opts ...sql.LockOption) *UserTextureQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserTextureQuery) GroupBy ¶
func (utq *UserTextureQuery) GroupBy(field string, fields ...string) *UserTextureGroupBy
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 { UserProfileID int `json:"user_profile_id,omitempty"` Count int `json:"count,omitempty"` } client.UserTexture.Query(). GroupBy(usertexture.FieldUserProfileID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserTextureQuery) IDs ¶
func (utq *UserTextureQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserTexture IDs.
func (*UserTextureQuery) IDsX ¶
func (utq *UserTextureQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserTextureQuery) Limit ¶
func (utq *UserTextureQuery) Limit(limit int) *UserTextureQuery
Limit the number of records to be returned by this query.
func (*UserTextureQuery) Offset ¶
func (utq *UserTextureQuery) Offset(offset int) *UserTextureQuery
Offset to start from.
func (*UserTextureQuery) Only ¶
func (utq *UserTextureQuery) Only(ctx context.Context) (*UserTexture, error)
Only returns a single UserTexture entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserTexture entity is found. Returns a *NotFoundError when no UserTexture entities are found.
func (*UserTextureQuery) OnlyID ¶
func (utq *UserTextureQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserTexture ID in the query. Returns a *NotSingularError when more than one UserTexture ID is found. Returns a *NotFoundError when no entities are found.
func (*UserTextureQuery) OnlyIDX ¶
func (utq *UserTextureQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserTextureQuery) OnlyX ¶
func (utq *UserTextureQuery) OnlyX(ctx context.Context) *UserTexture
OnlyX is like Only, but panics if an error occurs.
func (*UserTextureQuery) Order ¶
func (utq *UserTextureQuery) Order(o ...usertexture.OrderOption) *UserTextureQuery
Order specifies how the records should be ordered.
func (*UserTextureQuery) QueryTexture ¶
func (utq *UserTextureQuery) QueryTexture() *TextureQuery
QueryTexture chains the current query on the "texture" edge.
func (*UserTextureQuery) QueryUserProfile ¶
func (utq *UserTextureQuery) QueryUserProfile() *UserProfileQuery
QueryUserProfile chains the current query on the "user_profile" edge.
func (*UserTextureQuery) Select ¶
func (utq *UserTextureQuery) Select(fields ...string) *UserTextureSelect
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 { UserProfileID int `json:"user_profile_id,omitempty"` } client.UserTexture.Query(). Select(usertexture.FieldUserProfileID). Scan(ctx, &v)
func (*UserTextureQuery) Unique ¶
func (utq *UserTextureQuery) Unique(unique bool) *UserTextureQuery
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 (*UserTextureQuery) Where ¶
func (utq *UserTextureQuery) Where(ps ...predicate.UserTexture) *UserTextureQuery
Where adds a new predicate for the UserTextureQuery builder.
func (*UserTextureQuery) WithTexture ¶
func (utq *UserTextureQuery) WithTexture(opts ...func(*TextureQuery)) *UserTextureQuery
WithTexture tells the query-builder to eager-load the nodes that are connected to the "texture" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserTextureQuery) WithUserProfile ¶
func (utq *UserTextureQuery) WithUserProfile(opts ...func(*UserProfileQuery)) *UserTextureQuery
WithUserProfile tells the query-builder to eager-load the nodes that are connected to the "user_profile" edge. The optional arguments are used to configure the query builder of the edge.
type UserTextureSelect ¶
type UserTextureSelect struct { *UserTextureQuery // contains filtered or unexported fields }
UserTextureSelect is the builder for selecting fields of UserTexture entities.
func (*UserTextureSelect) Aggregate ¶
func (uts *UserTextureSelect) Aggregate(fns ...AggregateFunc) *UserTextureSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserTextureSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserTextureSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserTextureSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserTextureSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserTextureSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserTextureSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserTextureSelect) Scan ¶
func (uts *UserTextureSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserTextureSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTextureUpdate ¶
type UserTextureUpdate struct {
// contains filtered or unexported fields
}
UserTextureUpdate is the builder for updating UserTexture entities.
func (*UserTextureUpdate) ClearTexture ¶
func (utu *UserTextureUpdate) ClearTexture() *UserTextureUpdate
ClearTexture clears the "texture" edge to the Texture entity.
func (*UserTextureUpdate) ClearUserProfile ¶
func (utu *UserTextureUpdate) ClearUserProfile() *UserTextureUpdate
ClearUserProfile clears the "user_profile" edge to the UserProfile entity.
func (*UserTextureUpdate) Exec ¶
func (utu *UserTextureUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTextureUpdate) ExecX ¶
func (utu *UserTextureUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTextureUpdate) Mutation ¶
func (utu *UserTextureUpdate) Mutation() *UserTextureMutation
Mutation returns the UserTextureMutation object of the builder.
func (*UserTextureUpdate) Save ¶
func (utu *UserTextureUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserTextureUpdate) SaveX ¶
func (utu *UserTextureUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserTextureUpdate) SetTexture ¶
func (utu *UserTextureUpdate) SetTexture(t *Texture) *UserTextureUpdate
SetTexture sets the "texture" edge to the Texture entity.
func (*UserTextureUpdate) SetTextureID ¶
func (utu *UserTextureUpdate) SetTextureID(i int) *UserTextureUpdate
SetTextureID sets the "texture_id" field.
func (*UserTextureUpdate) SetType ¶
func (utu *UserTextureUpdate) SetType(s string) *UserTextureUpdate
SetType sets the "type" field.
func (*UserTextureUpdate) SetUserProfile ¶
func (utu *UserTextureUpdate) SetUserProfile(u *UserProfile) *UserTextureUpdate
SetUserProfile sets the "user_profile" edge to the UserProfile entity.
func (*UserTextureUpdate) SetUserProfileID ¶
func (utu *UserTextureUpdate) SetUserProfileID(i int) *UserTextureUpdate
SetUserProfileID sets the "user_profile_id" field.
func (*UserTextureUpdate) SetVariant ¶
func (utu *UserTextureUpdate) SetVariant(s string) *UserTextureUpdate
SetVariant sets the "variant" field.
func (*UserTextureUpdate) Where ¶
func (utu *UserTextureUpdate) Where(ps ...predicate.UserTexture) *UserTextureUpdate
Where appends a list predicates to the UserTextureUpdate builder.
type UserTextureUpdateOne ¶
type UserTextureUpdateOne struct {
// contains filtered or unexported fields
}
UserTextureUpdateOne is the builder for updating a single UserTexture entity.
func (*UserTextureUpdateOne) ClearTexture ¶
func (utuo *UserTextureUpdateOne) ClearTexture() *UserTextureUpdateOne
ClearTexture clears the "texture" edge to the Texture entity.
func (*UserTextureUpdateOne) ClearUserProfile ¶
func (utuo *UserTextureUpdateOne) ClearUserProfile() *UserTextureUpdateOne
ClearUserProfile clears the "user_profile" edge to the UserProfile entity.
func (*UserTextureUpdateOne) Exec ¶
func (utuo *UserTextureUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserTextureUpdateOne) ExecX ¶
func (utuo *UserTextureUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTextureUpdateOne) Mutation ¶
func (utuo *UserTextureUpdateOne) Mutation() *UserTextureMutation
Mutation returns the UserTextureMutation object of the builder.
func (*UserTextureUpdateOne) Save ¶
func (utuo *UserTextureUpdateOne) Save(ctx context.Context) (*UserTexture, error)
Save executes the query and returns the updated UserTexture entity.
func (*UserTextureUpdateOne) SaveX ¶
func (utuo *UserTextureUpdateOne) SaveX(ctx context.Context) *UserTexture
SaveX is like Save, but panics if an error occurs.
func (*UserTextureUpdateOne) Select ¶
func (utuo *UserTextureUpdateOne) Select(field string, fields ...string) *UserTextureUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserTextureUpdateOne) SetTexture ¶
func (utuo *UserTextureUpdateOne) SetTexture(t *Texture) *UserTextureUpdateOne
SetTexture sets the "texture" edge to the Texture entity.
func (*UserTextureUpdateOne) SetTextureID ¶
func (utuo *UserTextureUpdateOne) SetTextureID(i int) *UserTextureUpdateOne
SetTextureID sets the "texture_id" field.
func (*UserTextureUpdateOne) SetType ¶
func (utuo *UserTextureUpdateOne) SetType(s string) *UserTextureUpdateOne
SetType sets the "type" field.
func (*UserTextureUpdateOne) SetUserProfile ¶
func (utuo *UserTextureUpdateOne) SetUserProfile(u *UserProfile) *UserTextureUpdateOne
SetUserProfile sets the "user_profile" edge to the UserProfile entity.
func (*UserTextureUpdateOne) SetUserProfileID ¶
func (utuo *UserTextureUpdateOne) SetUserProfileID(i int) *UserTextureUpdateOne
SetUserProfileID sets the "user_profile_id" field.
func (*UserTextureUpdateOne) SetVariant ¶
func (utuo *UserTextureUpdateOne) SetVariant(s string) *UserTextureUpdateOne
SetVariant sets the "variant" field.
func (*UserTextureUpdateOne) Where ¶
func (utuo *UserTextureUpdateOne) Where(ps ...predicate.UserTexture) *UserTextureUpdateOne
Where appends a list predicates to the UserTextureUpdate builder.
type UserTextures ¶
type UserTextures []*UserTexture
UserTextures is a parsable slice of UserTexture.
type UserToken ¶
type UserToken struct { // ID of the ent. ID int `json:"id,omitempty"` // TokenID holds the value of the "token_id" field. TokenID uint64 `json:"token_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserTokenQuery when eager-loading is set. Edges UserTokenEdges `json:"edges"` // contains filtered or unexported fields }
UserToken is the model entity for the UserToken schema.
func (*UserToken) Unwrap ¶
Unwrap unwraps the UserToken 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 (*UserToken) Update ¶
func (ut *UserToken) Update() *UserTokenUpdateOne
Update returns a builder for updating this UserToken. Note that you need to call UserToken.Unwrap() before calling this method if this UserToken was returned from a transaction, and the transaction was committed or rolled back.
type UserTokenClient ¶
type UserTokenClient struct {
// contains filtered or unexported fields
}
UserTokenClient is a client for the UserToken schema.
func NewUserTokenClient ¶
func NewUserTokenClient(c config) *UserTokenClient
NewUserTokenClient returns a client for the UserToken from the given config.
func (*UserTokenClient) Create ¶
func (c *UserTokenClient) Create() *UserTokenCreate
Create returns a builder for creating a UserToken entity.
func (*UserTokenClient) CreateBulk ¶
func (c *UserTokenClient) CreateBulk(builders ...*UserTokenCreate) *UserTokenCreateBulk
CreateBulk returns a builder for creating a bulk of UserToken entities.
func (*UserTokenClient) Delete ¶
func (c *UserTokenClient) Delete() *UserTokenDelete
Delete returns a delete builder for UserToken.
func (*UserTokenClient) DeleteOne ¶
func (c *UserTokenClient) DeleteOne(ut *UserToken) *UserTokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserTokenClient) DeleteOneID ¶
func (c *UserTokenClient) DeleteOneID(id int) *UserTokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserTokenClient) GetX ¶
func (c *UserTokenClient) GetX(ctx context.Context, id int) *UserToken
GetX is like Get, but panics if an error occurs.
func (*UserTokenClient) Hooks ¶
func (c *UserTokenClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserTokenClient) Intercept ¶
func (c *UserTokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usertoken.Intercept(f(g(h())))`.
func (*UserTokenClient) Interceptors ¶
func (c *UserTokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserTokenClient) Query ¶
func (c *UserTokenClient) Query() *UserTokenQuery
Query returns a query builder for UserToken.
func (*UserTokenClient) QueryUser ¶
func (c *UserTokenClient) QueryUser(ut *UserToken) *UserQuery
QueryUser queries the user edge of a UserToken.
func (*UserTokenClient) Update ¶
func (c *UserTokenClient) Update() *UserTokenUpdate
Update returns an update builder for UserToken.
func (*UserTokenClient) UpdateOne ¶
func (c *UserTokenClient) UpdateOne(ut *UserToken) *UserTokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserTokenClient) UpdateOneID ¶
func (c *UserTokenClient) UpdateOneID(id int) *UserTokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserTokenClient) Use ¶
func (c *UserTokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usertoken.Hooks(f(g(h())))`.
type UserTokenCreate ¶
type UserTokenCreate struct {
// contains filtered or unexported fields
}
UserTokenCreate is the builder for creating a UserToken entity.
func (*UserTokenCreate) Exec ¶
func (utc *UserTokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTokenCreate) ExecX ¶
func (utc *UserTokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTokenCreate) Mutation ¶
func (utc *UserTokenCreate) Mutation() *UserTokenMutation
Mutation returns the UserTokenMutation object of the builder.
func (*UserTokenCreate) Save ¶
func (utc *UserTokenCreate) Save(ctx context.Context) (*UserToken, error)
Save creates the UserToken in the database.
func (*UserTokenCreate) SaveX ¶
func (utc *UserTokenCreate) SaveX(ctx context.Context) *UserToken
SaveX calls Save and panics if Save returns an error.
func (*UserTokenCreate) SetNillableUserID ¶
func (utc *UserTokenCreate) SetNillableUserID(id *int) *UserTokenCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*UserTokenCreate) SetTokenID ¶
func (utc *UserTokenCreate) SetTokenID(u uint64) *UserTokenCreate
SetTokenID sets the "token_id" field.
func (*UserTokenCreate) SetUser ¶
func (utc *UserTokenCreate) SetUser(u *User) *UserTokenCreate
SetUser sets the "user" edge to the User entity.
func (*UserTokenCreate) SetUserID ¶
func (utc *UserTokenCreate) SetUserID(id int) *UserTokenCreate
SetUserID sets the "user" edge to the User entity by ID.
type UserTokenCreateBulk ¶
type UserTokenCreateBulk struct {
// contains filtered or unexported fields
}
UserTokenCreateBulk is the builder for creating many UserToken entities in bulk.
func (*UserTokenCreateBulk) Exec ¶
func (utcb *UserTokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTokenCreateBulk) ExecX ¶
func (utcb *UserTokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserTokenDelete ¶
type UserTokenDelete struct {
// contains filtered or unexported fields
}
UserTokenDelete is the builder for deleting a UserToken entity.
func (*UserTokenDelete) Exec ¶
func (utd *UserTokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserTokenDelete) ExecX ¶
func (utd *UserTokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserTokenDelete) Where ¶
func (utd *UserTokenDelete) Where(ps ...predicate.UserToken) *UserTokenDelete
Where appends a list predicates to the UserTokenDelete builder.
type UserTokenDeleteOne ¶
type UserTokenDeleteOne struct {
// contains filtered or unexported fields
}
UserTokenDeleteOne is the builder for deleting a single UserToken entity.
func (*UserTokenDeleteOne) Exec ¶
func (utdo *UserTokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserTokenDeleteOne) ExecX ¶
func (utdo *UserTokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTokenDeleteOne) Where ¶
func (utdo *UserTokenDeleteOne) Where(ps ...predicate.UserToken) *UserTokenDeleteOne
Where appends a list predicates to the UserTokenDelete builder.
type UserTokenEdges ¶
type UserTokenEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
UserTokenEdges holds the relations/edges for other nodes in the graph.
func (UserTokenEdges) UserOrErr ¶
func (e UserTokenEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserTokenGroupBy ¶
type UserTokenGroupBy struct {
// contains filtered or unexported fields
}
UserTokenGroupBy is the group-by builder for UserToken entities.
func (*UserTokenGroupBy) Aggregate ¶
func (utgb *UserTokenGroupBy) Aggregate(fns ...AggregateFunc) *UserTokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserTokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserTokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserTokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserTokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserTokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserTokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserTokenGroupBy) Scan ¶
func (utgb *UserTokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserTokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTokenMutation ¶
type UserTokenMutation struct {
// contains filtered or unexported fields
}
UserTokenMutation represents an operation that mutates the UserToken nodes in the graph.
func (*UserTokenMutation) AddField ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) AddTokenID ¶
func (m *UserTokenMutation) AddTokenID(u int64)
AddTokenID adds u to the "token_id" field.
func (*UserTokenMutation) AddedEdges ¶
func (m *UserTokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserTokenMutation) AddedField ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) AddedFields ¶
func (m *UserTokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserTokenMutation) AddedIDs ¶
func (m *UserTokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserTokenMutation) AddedTokenID ¶
func (m *UserTokenMutation) AddedTokenID() (r int64, exists bool)
AddedTokenID returns the value that was added to the "token_id" field in this mutation.
func (*UserTokenMutation) ClearEdge ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) ClearField ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) ClearUser ¶
func (m *UserTokenMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserTokenMutation) ClearedEdges ¶
func (m *UserTokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserTokenMutation) ClearedFields ¶
func (m *UserTokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserTokenMutation) Client ¶
func (m UserTokenMutation) 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 (*UserTokenMutation) EdgeCleared ¶
func (m *UserTokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserTokenMutation) Field ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) FieldCleared ¶
func (m *UserTokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserTokenMutation) Fields ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) ID ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) IDs ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) 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 (*UserTokenMutation) OldTokenID ¶
func (m *UserTokenMutation) OldTokenID(ctx context.Context) (v uint64, err error)
OldTokenID returns the old "token_id" field's value of the UserToken entity. If the UserToken object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTokenMutation) RemovedEdges ¶
func (m *UserTokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserTokenMutation) RemovedIDs ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) ResetEdge ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) ResetField ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) ResetTokenID ¶
func (m *UserTokenMutation) ResetTokenID()
ResetTokenID resets all changes to the "token_id" field.
func (*UserTokenMutation) ResetUser ¶
func (m *UserTokenMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserTokenMutation) SetField ¶
func (m *UserTokenMutation) 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 (*UserTokenMutation) SetOp ¶
func (m *UserTokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserTokenMutation) SetTokenID ¶
func (m *UserTokenMutation) SetTokenID(u uint64)
SetTokenID sets the "token_id" field.
func (*UserTokenMutation) SetUserID ¶
func (m *UserTokenMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*UserTokenMutation) TokenID ¶
func (m *UserTokenMutation) TokenID() (r uint64, exists bool)
TokenID returns the value of the "token_id" field in the mutation.
func (UserTokenMutation) Tx ¶
func (m UserTokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserTokenMutation) Type ¶
func (m *UserTokenMutation) Type() string
Type returns the node type of this mutation (UserToken).
func (*UserTokenMutation) UserCleared ¶
func (m *UserTokenMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserTokenMutation) UserID ¶
func (m *UserTokenMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*UserTokenMutation) UserIDs ¶
func (m *UserTokenMutation) UserIDs() (ids []int)
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 (*UserTokenMutation) Where ¶
func (m *UserTokenMutation) Where(ps ...predicate.UserToken)
Where appends a list predicates to the UserTokenMutation builder.
func (*UserTokenMutation) WhereP ¶
func (m *UserTokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserTokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserTokenQuery ¶
type UserTokenQuery struct {
// contains filtered or unexported fields
}
UserTokenQuery is the builder for querying UserToken entities.
func (*UserTokenQuery) Aggregate ¶
func (utq *UserTokenQuery) Aggregate(fns ...AggregateFunc) *UserTokenSelect
Aggregate returns a UserTokenSelect configured with the given aggregations.
func (*UserTokenQuery) All ¶
func (utq *UserTokenQuery) All(ctx context.Context) ([]*UserToken, error)
All executes the query and returns a list of UserTokens.
func (*UserTokenQuery) AllX ¶
func (utq *UserTokenQuery) AllX(ctx context.Context) []*UserToken
AllX is like All, but panics if an error occurs.
func (*UserTokenQuery) Clone ¶
func (utq *UserTokenQuery) Clone() *UserTokenQuery
Clone returns a duplicate of the UserTokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserTokenQuery) Count ¶
func (utq *UserTokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserTokenQuery) CountX ¶
func (utq *UserTokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserTokenQuery) Exist ¶
func (utq *UserTokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserTokenQuery) ExistX ¶
func (utq *UserTokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserTokenQuery) First ¶
func (utq *UserTokenQuery) First(ctx context.Context) (*UserToken, error)
First returns the first UserToken entity from the query. Returns a *NotFoundError when no UserToken was found.
func (*UserTokenQuery) FirstID ¶
func (utq *UserTokenQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserToken ID from the query. Returns a *NotFoundError when no UserToken ID was found.
func (*UserTokenQuery) FirstIDX ¶
func (utq *UserTokenQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserTokenQuery) FirstX ¶
func (utq *UserTokenQuery) FirstX(ctx context.Context) *UserToken
FirstX is like First, but panics if an error occurs.
func (*UserTokenQuery) ForShare ¶
func (utq *UserTokenQuery) ForShare(opts ...sql.LockOption) *UserTokenQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserTokenQuery) ForShareA ¶
func (utq *UserTokenQuery) ForShareA(opts ...sql.LockOption) *UserTokenQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserTokenQuery) ForUpdate ¶
func (utq *UserTokenQuery) ForUpdate(opts ...sql.LockOption) *UserTokenQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserTokenQuery) ForUpdateA ¶
func (utq *UserTokenQuery) ForUpdateA(opts ...sql.LockOption) *UserTokenQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserTokenQuery) GroupBy ¶
func (utq *UserTokenQuery) GroupBy(field string, fields ...string) *UserTokenGroupBy
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 { TokenID uint64 `json:"token_id,omitempty"` Count int `json:"count,omitempty"` } client.UserToken.Query(). GroupBy(usertoken.FieldTokenID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserTokenQuery) IDs ¶
func (utq *UserTokenQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserToken IDs.
func (*UserTokenQuery) IDsX ¶
func (utq *UserTokenQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserTokenQuery) Limit ¶
func (utq *UserTokenQuery) Limit(limit int) *UserTokenQuery
Limit the number of records to be returned by this query.
func (*UserTokenQuery) Offset ¶
func (utq *UserTokenQuery) Offset(offset int) *UserTokenQuery
Offset to start from.
func (*UserTokenQuery) Only ¶
func (utq *UserTokenQuery) Only(ctx context.Context) (*UserToken, error)
Only returns a single UserToken entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserToken entity is found. Returns a *NotFoundError when no UserToken entities are found.
func (*UserTokenQuery) OnlyID ¶
func (utq *UserTokenQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserToken ID in the query. Returns a *NotSingularError when more than one UserToken ID is found. Returns a *NotFoundError when no entities are found.
func (*UserTokenQuery) OnlyIDX ¶
func (utq *UserTokenQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserTokenQuery) OnlyX ¶
func (utq *UserTokenQuery) OnlyX(ctx context.Context) *UserToken
OnlyX is like Only, but panics if an error occurs.
func (*UserTokenQuery) Order ¶
func (utq *UserTokenQuery) Order(o ...usertoken.OrderOption) *UserTokenQuery
Order specifies how the records should be ordered.
func (*UserTokenQuery) QueryUser ¶
func (utq *UserTokenQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserTokenQuery) Select ¶
func (utq *UserTokenQuery) Select(fields ...string) *UserTokenSelect
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 { TokenID uint64 `json:"token_id,omitempty"` } client.UserToken.Query(). Select(usertoken.FieldTokenID). Scan(ctx, &v)
func (*UserTokenQuery) Unique ¶
func (utq *UserTokenQuery) Unique(unique bool) *UserTokenQuery
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 (*UserTokenQuery) Where ¶
func (utq *UserTokenQuery) Where(ps ...predicate.UserToken) *UserTokenQuery
Where adds a new predicate for the UserTokenQuery builder.
func (*UserTokenQuery) WithUser ¶
func (utq *UserTokenQuery) WithUser(opts ...func(*UserQuery)) *UserTokenQuery
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 UserTokenSelect ¶
type UserTokenSelect struct { *UserTokenQuery // contains filtered or unexported fields }
UserTokenSelect is the builder for selecting fields of UserToken entities.
func (*UserTokenSelect) Aggregate ¶
func (uts *UserTokenSelect) Aggregate(fns ...AggregateFunc) *UserTokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserTokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserTokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserTokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserTokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserTokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserTokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserTokenSelect) Scan ¶
func (uts *UserTokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserTokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTokenUpdate ¶
type UserTokenUpdate struct {
// contains filtered or unexported fields
}
UserTokenUpdate is the builder for updating UserToken entities.
func (*UserTokenUpdate) AddTokenID ¶
func (utu *UserTokenUpdate) AddTokenID(u int64) *UserTokenUpdate
AddTokenID adds u to the "token_id" field.
func (*UserTokenUpdate) ClearUser ¶
func (utu *UserTokenUpdate) ClearUser() *UserTokenUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserTokenUpdate) Exec ¶
func (utu *UserTokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTokenUpdate) ExecX ¶
func (utu *UserTokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTokenUpdate) Mutation ¶
func (utu *UserTokenUpdate) Mutation() *UserTokenMutation
Mutation returns the UserTokenMutation object of the builder.
func (*UserTokenUpdate) Save ¶
func (utu *UserTokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserTokenUpdate) SaveX ¶
func (utu *UserTokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserTokenUpdate) SetNillableUserID ¶
func (utu *UserTokenUpdate) SetNillableUserID(id *int) *UserTokenUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*UserTokenUpdate) SetTokenID ¶
func (utu *UserTokenUpdate) SetTokenID(u uint64) *UserTokenUpdate
SetTokenID sets the "token_id" field.
func (*UserTokenUpdate) SetUser ¶
func (utu *UserTokenUpdate) SetUser(u *User) *UserTokenUpdate
SetUser sets the "user" edge to the User entity.
func (*UserTokenUpdate) SetUserID ¶
func (utu *UserTokenUpdate) SetUserID(id int) *UserTokenUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*UserTokenUpdate) Where ¶
func (utu *UserTokenUpdate) Where(ps ...predicate.UserToken) *UserTokenUpdate
Where appends a list predicates to the UserTokenUpdate builder.
type UserTokenUpdateOne ¶
type UserTokenUpdateOne struct {
// contains filtered or unexported fields
}
UserTokenUpdateOne is the builder for updating a single UserToken entity.
func (*UserTokenUpdateOne) AddTokenID ¶
func (utuo *UserTokenUpdateOne) AddTokenID(u int64) *UserTokenUpdateOne
AddTokenID adds u to the "token_id" field.
func (*UserTokenUpdateOne) ClearUser ¶
func (utuo *UserTokenUpdateOne) ClearUser() *UserTokenUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserTokenUpdateOne) Exec ¶
func (utuo *UserTokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserTokenUpdateOne) ExecX ¶
func (utuo *UserTokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTokenUpdateOne) Mutation ¶
func (utuo *UserTokenUpdateOne) Mutation() *UserTokenMutation
Mutation returns the UserTokenMutation object of the builder.
func (*UserTokenUpdateOne) Save ¶
func (utuo *UserTokenUpdateOne) Save(ctx context.Context) (*UserToken, error)
Save executes the query and returns the updated UserToken entity.
func (*UserTokenUpdateOne) SaveX ¶
func (utuo *UserTokenUpdateOne) SaveX(ctx context.Context) *UserToken
SaveX is like Save, but panics if an error occurs.
func (*UserTokenUpdateOne) Select ¶
func (utuo *UserTokenUpdateOne) Select(field string, fields ...string) *UserTokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserTokenUpdateOne) SetNillableUserID ¶
func (utuo *UserTokenUpdateOne) SetNillableUserID(id *int) *UserTokenUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*UserTokenUpdateOne) SetTokenID ¶
func (utuo *UserTokenUpdateOne) SetTokenID(u uint64) *UserTokenUpdateOne
SetTokenID sets the "token_id" field.
func (*UserTokenUpdateOne) SetUser ¶
func (utuo *UserTokenUpdateOne) SetUser(u *User) *UserTokenUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserTokenUpdateOne) SetUserID ¶
func (utuo *UserTokenUpdateOne) SetUserID(id int) *UserTokenUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*UserTokenUpdateOne) Where ¶
func (utuo *UserTokenUpdateOne) Where(ps ...predicate.UserToken) *UserTokenUpdateOne
Where appends a list predicates to the UserTokenUpdate builder.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddCreatedTexture ¶
func (uu *UserUpdate) AddCreatedTexture(t ...*Texture) *UserUpdate
AddCreatedTexture adds the "created_texture" edges to the Texture entity.
func (*UserUpdate) AddCreatedTextureIDs ¶
func (uu *UserUpdate) AddCreatedTextureIDs(ids ...int) *UserUpdate
AddCreatedTextureIDs adds the "created_texture" edge to the Texture entity by IDs.
func (*UserUpdate) AddRegTime ¶
func (uu *UserUpdate) AddRegTime(i int64) *UserUpdate
AddRegTime adds i to the "reg_time" field.
func (*UserUpdate) AddState ¶
func (uu *UserUpdate) AddState(i int) *UserUpdate
AddState adds i to the "state" field.
func (*UserUpdate) ClearCreatedTexture ¶
func (uu *UserUpdate) ClearCreatedTexture() *UserUpdate
ClearCreatedTexture clears all "created_texture" edges to the Texture entity.
func (*UserUpdate) ClearProfile ¶
func (uu *UserUpdate) ClearProfile() *UserUpdate
ClearProfile clears the "profile" edge to the UserProfile entity.
func (*UserUpdate) ClearToken ¶
func (uu *UserUpdate) ClearToken() *UserUpdate
ClearToken clears the "token" edge to the UserToken entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveCreatedTexture ¶
func (uu *UserUpdate) RemoveCreatedTexture(t ...*Texture) *UserUpdate
RemoveCreatedTexture removes "created_texture" edges to Texture entities.
func (*UserUpdate) RemoveCreatedTextureIDs ¶
func (uu *UserUpdate) RemoveCreatedTextureIDs(ids ...int) *UserUpdate
RemoveCreatedTextureIDs removes the "created_texture" edge to Texture entities by IDs.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetNillableProfileID ¶
func (uu *UserUpdate) SetNillableProfileID(id *int) *UserUpdate
SetNillableProfileID sets the "profile" edge to the UserProfile entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableTokenID ¶
func (uu *UserUpdate) SetNillableTokenID(id *int) *UserUpdate
SetNillableTokenID sets the "token" edge to the UserToken entity by ID if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetProfile ¶
func (uu *UserUpdate) SetProfile(u *UserProfile) *UserUpdate
SetProfile sets the "profile" edge to the UserProfile entity.
func (*UserUpdate) SetProfileID ¶
func (uu *UserUpdate) SetProfileID(id int) *UserUpdate
SetProfileID sets the "profile" edge to the UserProfile entity by ID.
func (*UserUpdate) SetRegIP ¶
func (uu *UserUpdate) SetRegIP(s string) *UserUpdate
SetRegIP sets the "reg_ip" field.
func (*UserUpdate) SetRegTime ¶
func (uu *UserUpdate) SetRegTime(i int64) *UserUpdate
SetRegTime sets the "reg_time" field.
func (*UserUpdate) SetSalt ¶
func (uu *UserUpdate) SetSalt(s string) *UserUpdate
SetSalt sets the "salt" field.
func (*UserUpdate) SetState ¶
func (uu *UserUpdate) SetState(i int) *UserUpdate
SetState sets the "state" field.
func (*UserUpdate) SetToken ¶
func (uu *UserUpdate) SetToken(u *UserToken) *UserUpdate
SetToken sets the "token" edge to the UserToken entity.
func (*UserUpdate) SetTokenID ¶
func (uu *UserUpdate) SetTokenID(id int) *UserUpdate
SetTokenID sets the "token" edge to the UserToken entity by ID.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddCreatedTexture ¶
func (uuo *UserUpdateOne) AddCreatedTexture(t ...*Texture) *UserUpdateOne
AddCreatedTexture adds the "created_texture" edges to the Texture entity.
func (*UserUpdateOne) AddCreatedTextureIDs ¶
func (uuo *UserUpdateOne) AddCreatedTextureIDs(ids ...int) *UserUpdateOne
AddCreatedTextureIDs adds the "created_texture" edge to the Texture entity by IDs.
func (*UserUpdateOne) AddRegTime ¶
func (uuo *UserUpdateOne) AddRegTime(i int64) *UserUpdateOne
AddRegTime adds i to the "reg_time" field.
func (*UserUpdateOne) AddState ¶
func (uuo *UserUpdateOne) AddState(i int) *UserUpdateOne
AddState adds i to the "state" field.
func (*UserUpdateOne) ClearCreatedTexture ¶
func (uuo *UserUpdateOne) ClearCreatedTexture() *UserUpdateOne
ClearCreatedTexture clears all "created_texture" edges to the Texture entity.
func (*UserUpdateOne) ClearProfile ¶
func (uuo *UserUpdateOne) ClearProfile() *UserUpdateOne
ClearProfile clears the "profile" edge to the UserProfile entity.
func (*UserUpdateOne) ClearToken ¶
func (uuo *UserUpdateOne) ClearToken() *UserUpdateOne
ClearToken clears the "token" edge to the UserToken entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveCreatedTexture ¶
func (uuo *UserUpdateOne) RemoveCreatedTexture(t ...*Texture) *UserUpdateOne
RemoveCreatedTexture removes "created_texture" edges to Texture entities.
func (*UserUpdateOne) RemoveCreatedTextureIDs ¶
func (uuo *UserUpdateOne) RemoveCreatedTextureIDs(ids ...int) *UserUpdateOne
RemoveCreatedTextureIDs removes the "created_texture" edge to Texture entities by IDs.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetNillableProfileID ¶
func (uuo *UserUpdateOne) SetNillableProfileID(id *int) *UserUpdateOne
SetNillableProfileID sets the "profile" edge to the UserProfile entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableTokenID ¶
func (uuo *UserUpdateOne) SetNillableTokenID(id *int) *UserUpdateOne
SetNillableTokenID sets the "token" edge to the UserToken entity by ID if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetProfile ¶
func (uuo *UserUpdateOne) SetProfile(u *UserProfile) *UserUpdateOne
SetProfile sets the "profile" edge to the UserProfile entity.
func (*UserUpdateOne) SetProfileID ¶
func (uuo *UserUpdateOne) SetProfileID(id int) *UserUpdateOne
SetProfileID sets the "profile" edge to the UserProfile entity by ID.
func (*UserUpdateOne) SetRegIP ¶
func (uuo *UserUpdateOne) SetRegIP(s string) *UserUpdateOne
SetRegIP sets the "reg_ip" field.
func (*UserUpdateOne) SetRegTime ¶
func (uuo *UserUpdateOne) SetRegTime(i int64) *UserUpdateOne
SetRegTime sets the "reg_time" field.
func (*UserUpdateOne) SetSalt ¶
func (uuo *UserUpdateOne) SetSalt(s string) *UserUpdateOne
SetSalt sets the "salt" field.
func (*UserUpdateOne) SetState ¶
func (uuo *UserUpdateOne) SetState(i int) *UserUpdateOne
SetState sets the "state" field.
func (*UserUpdateOne) SetToken ¶
func (uuo *UserUpdateOne) SetToken(u *UserToken) *UserUpdateOne
SetToken sets the "token" edge to the UserToken entity.
func (*UserUpdateOne) SetTokenID ¶
func (uuo *UserUpdateOne) SetTokenID(id int) *UserUpdateOne
SetTokenID sets the "token" edge to the UserToken entity by ID.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate 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.
Source Files ¶
- client.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- texture.go
- texture_create.go
- texture_delete.go
- texture_query.go
- texture_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userprofile.go
- userprofile_create.go
- userprofile_delete.go
- userprofile_query.go
- userprofile_update.go
- usertexture.go
- usertexture_create.go
- usertexture_delete.go
- usertexture_query.go
- usertexture_update.go
- usertoken.go
- usertoken_create.go
- usertoken_delete.go
- usertoken_query.go
- usertoken_update.go