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 EntUser
- type EntUserClient
- func (c *EntUserClient) Create() *EntUserCreate
- func (c *EntUserClient) CreateBulk(builders ...*EntUserCreate) *EntUserCreateBulk
- func (c *EntUserClient) Delete() *EntUserDelete
- func (c *EntUserClient) DeleteOne(eu *EntUser) *EntUserDeleteOne
- func (c *EntUserClient) DeleteOneID(id uuid.UUID) *EntUserDeleteOne
- func (c *EntUserClient) Get(ctx context.Context, id uuid.UUID) (*EntUser, error)
- func (c *EntUserClient) GetX(ctx context.Context, id uuid.UUID) *EntUser
- func (c *EntUserClient) Hooks() []Hook
- func (c *EntUserClient) Intercept(interceptors ...Interceptor)
- func (c *EntUserClient) Interceptors() []Interceptor
- func (c *EntUserClient) Query() *EntUserQuery
- func (c *EntUserClient) QueryEntUserNames(eu *EntUser) *EntUserNameQuery
- func (c *EntUserClient) Update() *EntUserUpdate
- func (c *EntUserClient) UpdateOne(eu *EntUser) *EntUserUpdateOne
- func (c *EntUserClient) UpdateOneID(id uuid.UUID) *EntUserUpdateOne
- func (c *EntUserClient) Use(hooks ...Hook)
- type EntUserCreate
- func (euc *EntUserCreate) AddEntUserNameIDs(ids ...uuid.UUID) *EntUserCreate
- func (euc *EntUserCreate) AddEntUserNames(e ...*EntUserName) *EntUserCreate
- func (euc *EntUserCreate) Exec(ctx context.Context) error
- func (euc *EntUserCreate) ExecX(ctx context.Context)
- func (euc *EntUserCreate) Mutation() *EntUserMutation
- func (euc *EntUserCreate) Save(ctx context.Context) (*EntUser, error)
- func (euc *EntUserCreate) SaveX(ctx context.Context) *EntUser
- func (euc *EntUserCreate) SetCreatedAt(t time.Time) *EntUserCreate
- func (euc *EntUserCreate) SetDeleted(b bool) *EntUserCreate
- func (euc *EntUserCreate) SetID(u uuid.UUID) *EntUserCreate
- func (euc *EntUserCreate) SetNillableCreatedAt(t *time.Time) *EntUserCreate
- func (euc *EntUserCreate) SetNillableDeleted(b *bool) *EntUserCreate
- func (euc *EntUserCreate) SetNillableID(u *uuid.UUID) *EntUserCreate
- func (euc *EntUserCreate) SetNillableUpdatedAt(t *time.Time) *EntUserCreate
- func (euc *EntUserCreate) SetUpdatedAt(t time.Time) *EntUserCreate
- type EntUserCreateBulk
- type EntUserDelete
- type EntUserDeleteOne
- type EntUserEdges
- type EntUserGroupBy
- func (eugb *EntUserGroupBy) Aggregate(fns ...AggregateFunc) *EntUserGroupBy
- func (s *EntUserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntUserGroupBy) BoolX(ctx context.Context) bool
- func (s *EntUserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EntUserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EntUserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntUserGroupBy) Float64X(ctx context.Context) float64
- func (s *EntUserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntUserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EntUserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EntUserGroupBy) IntX(ctx context.Context) int
- func (s *EntUserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EntUserGroupBy) IntsX(ctx context.Context) []int
- func (eugb *EntUserGroupBy) Scan(ctx context.Context, v any) error
- func (s *EntUserGroupBy) ScanX(ctx context.Context, v any)
- func (s *EntUserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EntUserGroupBy) StringX(ctx context.Context) string
- func (s *EntUserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EntUserGroupBy) StringsX(ctx context.Context) []string
- type EntUserMutation
- func (m *EntUserMutation) AddEntUserNameIDs(ids ...uuid.UUID)
- func (m *EntUserMutation) AddField(name string, value ent.Value) error
- func (m *EntUserMutation) AddedEdges() []string
- func (m *EntUserMutation) AddedField(name string) (ent.Value, bool)
- func (m *EntUserMutation) AddedFields() []string
- func (m *EntUserMutation) AddedIDs(name string) []ent.Value
- func (m *EntUserMutation) ClearEdge(name string) error
- func (m *EntUserMutation) ClearEntUserNames()
- func (m *EntUserMutation) ClearField(name string) error
- func (m *EntUserMutation) ClearedEdges() []string
- func (m *EntUserMutation) ClearedFields() []string
- func (m EntUserMutation) Client() *Client
- func (m *EntUserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *EntUserMutation) Deleted() (r bool, exists bool)
- func (m *EntUserMutation) EdgeCleared(name string) bool
- func (m *EntUserMutation) EntUserNamesCleared() bool
- func (m *EntUserMutation) EntUserNamesIDs() (ids []uuid.UUID)
- func (m *EntUserMutation) Field(name string) (ent.Value, bool)
- func (m *EntUserMutation) FieldCleared(name string) bool
- func (m *EntUserMutation) Fields() []string
- func (m *EntUserMutation) ID() (id uuid.UUID, exists bool)
- func (m *EntUserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *EntUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EntUserMutation) OldDeleted(ctx context.Context) (v bool, err error)
- func (m *EntUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EntUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EntUserMutation) Op() Op
- func (m *EntUserMutation) RemoveEntUserNameIDs(ids ...uuid.UUID)
- func (m *EntUserMutation) RemovedEdges() []string
- func (m *EntUserMutation) RemovedEntUserNamesIDs() (ids []uuid.UUID)
- func (m *EntUserMutation) RemovedIDs(name string) []ent.Value
- func (m *EntUserMutation) ResetCreatedAt()
- func (m *EntUserMutation) ResetDeleted()
- func (m *EntUserMutation) ResetEdge(name string) error
- func (m *EntUserMutation) ResetEntUserNames()
- func (m *EntUserMutation) ResetField(name string) error
- func (m *EntUserMutation) ResetUpdatedAt()
- func (m *EntUserMutation) SetCreatedAt(t time.Time)
- func (m *EntUserMutation) SetDeleted(b bool)
- func (m *EntUserMutation) SetField(name string, value ent.Value) error
- func (m *EntUserMutation) SetID(id uuid.UUID)
- func (m *EntUserMutation) SetOp(op Op)
- func (m *EntUserMutation) SetUpdatedAt(t time.Time)
- func (m EntUserMutation) Tx() (*Tx, error)
- func (m *EntUserMutation) Type() string
- func (m *EntUserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *EntUserMutation) Where(ps ...predicate.EntUser)
- func (m *EntUserMutation) WhereP(ps ...func(*sql.Selector))
- type EntUserName
- type EntUserNameClient
- func (c *EntUserNameClient) Create() *EntUserNameCreate
- func (c *EntUserNameClient) CreateBulk(builders ...*EntUserNameCreate) *EntUserNameCreateBulk
- func (c *EntUserNameClient) Delete() *EntUserNameDelete
- func (c *EntUserNameClient) DeleteOne(eun *EntUserName) *EntUserNameDeleteOne
- func (c *EntUserNameClient) DeleteOneID(id uuid.UUID) *EntUserNameDeleteOne
- func (c *EntUserNameClient) Get(ctx context.Context, id uuid.UUID) (*EntUserName, error)
- func (c *EntUserNameClient) GetX(ctx context.Context, id uuid.UUID) *EntUserName
- func (c *EntUserNameClient) Hooks() []Hook
- func (c *EntUserNameClient) Intercept(interceptors ...Interceptor)
- func (c *EntUserNameClient) Interceptors() []Interceptor
- func (c *EntUserNameClient) Query() *EntUserNameQuery
- func (c *EntUserNameClient) QueryEntUser(eun *EntUserName) *EntUserQuery
- func (c *EntUserNameClient) Update() *EntUserNameUpdate
- func (c *EntUserNameClient) UpdateOne(eun *EntUserName) *EntUserNameUpdateOne
- func (c *EntUserNameClient) UpdateOneID(id uuid.UUID) *EntUserNameUpdateOne
- func (c *EntUserNameClient) Use(hooks ...Hook)
- type EntUserNameCreate
- func (eunc *EntUserNameCreate) Exec(ctx context.Context) error
- func (eunc *EntUserNameCreate) ExecX(ctx context.Context)
- func (eunc *EntUserNameCreate) Mutation() *EntUserNameMutation
- func (eunc *EntUserNameCreate) Save(ctx context.Context) (*EntUserName, error)
- func (eunc *EntUserNameCreate) SaveX(ctx context.Context) *EntUserName
- func (eunc *EntUserNameCreate) SetCreatedAt(t time.Time) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetDeleted(b bool) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetEntUser(e *EntUser) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetEntUserID(id uuid.UUID) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetID(u uuid.UUID) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetNillableCreatedAt(t *time.Time) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetNillableDeleted(b *bool) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetNillableID(u *uuid.UUID) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetNillableUpdatedAt(t *time.Time) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetUpdatedAt(t time.Time) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetUserID(u uuid.UUID) *EntUserNameCreate
- func (eunc *EntUserNameCreate) SetValue(s string) *EntUserNameCreate
- type EntUserNameCreateBulk
- type EntUserNameDelete
- type EntUserNameDeleteOne
- type EntUserNameEdges
- type EntUserNameGroupBy
- func (eungb *EntUserNameGroupBy) Aggregate(fns ...AggregateFunc) *EntUserNameGroupBy
- func (s *EntUserNameGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntUserNameGroupBy) BoolX(ctx context.Context) bool
- func (s *EntUserNameGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EntUserNameGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EntUserNameGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntUserNameGroupBy) Float64X(ctx context.Context) float64
- func (s *EntUserNameGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntUserNameGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EntUserNameGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EntUserNameGroupBy) IntX(ctx context.Context) int
- func (s *EntUserNameGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EntUserNameGroupBy) IntsX(ctx context.Context) []int
- func (eungb *EntUserNameGroupBy) Scan(ctx context.Context, v any) error
- func (s *EntUserNameGroupBy) ScanX(ctx context.Context, v any)
- func (s *EntUserNameGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EntUserNameGroupBy) StringX(ctx context.Context) string
- func (s *EntUserNameGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EntUserNameGroupBy) StringsX(ctx context.Context) []string
- type EntUserNameMutation
- func (m *EntUserNameMutation) AddField(name string, value ent.Value) error
- func (m *EntUserNameMutation) AddedEdges() []string
- func (m *EntUserNameMutation) AddedField(name string) (ent.Value, bool)
- func (m *EntUserNameMutation) AddedFields() []string
- func (m *EntUserNameMutation) AddedIDs(name string) []ent.Value
- func (m *EntUserNameMutation) ClearEdge(name string) error
- func (m *EntUserNameMutation) ClearEntUser()
- func (m *EntUserNameMutation) ClearField(name string) error
- func (m *EntUserNameMutation) ClearedEdges() []string
- func (m *EntUserNameMutation) ClearedFields() []string
- func (m EntUserNameMutation) Client() *Client
- func (m *EntUserNameMutation) CreatedAt() (r time.Time, exists bool)
- func (m *EntUserNameMutation) Deleted() (r bool, exists bool)
- func (m *EntUserNameMutation) EdgeCleared(name string) bool
- func (m *EntUserNameMutation) EntUserCleared() bool
- func (m *EntUserNameMutation) EntUserID() (id uuid.UUID, exists bool)
- func (m *EntUserNameMutation) EntUserIDs() (ids []uuid.UUID)
- func (m *EntUserNameMutation) Field(name string) (ent.Value, bool)
- func (m *EntUserNameMutation) FieldCleared(name string) bool
- func (m *EntUserNameMutation) Fields() []string
- func (m *EntUserNameMutation) ID() (id uuid.UUID, exists bool)
- func (m *EntUserNameMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *EntUserNameMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EntUserNameMutation) OldDeleted(ctx context.Context) (v bool, err error)
- func (m *EntUserNameMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EntUserNameMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EntUserNameMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *EntUserNameMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *EntUserNameMutation) Op() Op
- func (m *EntUserNameMutation) RemovedEdges() []string
- func (m *EntUserNameMutation) RemovedIDs(name string) []ent.Value
- func (m *EntUserNameMutation) ResetCreatedAt()
- func (m *EntUserNameMutation) ResetDeleted()
- func (m *EntUserNameMutation) ResetEdge(name string) error
- func (m *EntUserNameMutation) ResetEntUser()
- func (m *EntUserNameMutation) ResetField(name string) error
- func (m *EntUserNameMutation) ResetUpdatedAt()
- func (m *EntUserNameMutation) ResetUserID()
- func (m *EntUserNameMutation) ResetValue()
- func (m *EntUserNameMutation) SetCreatedAt(t time.Time)
- func (m *EntUserNameMutation) SetDeleted(b bool)
- func (m *EntUserNameMutation) SetEntUserID(id uuid.UUID)
- func (m *EntUserNameMutation) SetField(name string, value ent.Value) error
- func (m *EntUserNameMutation) SetID(id uuid.UUID)
- func (m *EntUserNameMutation) SetOp(op Op)
- func (m *EntUserNameMutation) SetUpdatedAt(t time.Time)
- func (m *EntUserNameMutation) SetUserID(u uuid.UUID)
- func (m *EntUserNameMutation) SetValue(s string)
- func (m EntUserNameMutation) Tx() (*Tx, error)
- func (m *EntUserNameMutation) Type() string
- func (m *EntUserNameMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *EntUserNameMutation) UserID() (r uuid.UUID, exists bool)
- func (m *EntUserNameMutation) Value() (r string, exists bool)
- func (m *EntUserNameMutation) Where(ps ...predicate.EntUserName)
- func (m *EntUserNameMutation) WhereP(ps ...func(*sql.Selector))
- type EntUserNameQuery
- func (eunq *EntUserNameQuery) Aggregate(fns ...AggregateFunc) *EntUserNameSelect
- func (eunq *EntUserNameQuery) All(ctx context.Context) ([]*EntUserName, error)
- func (eunq *EntUserNameQuery) AllX(ctx context.Context) []*EntUserName
- func (eunq *EntUserNameQuery) Clone() *EntUserNameQuery
- func (eunq *EntUserNameQuery) Count(ctx context.Context) (int, error)
- func (eunq *EntUserNameQuery) CountX(ctx context.Context) int
- func (eunq *EntUserNameQuery) Exist(ctx context.Context) (bool, error)
- func (eunq *EntUserNameQuery) ExistX(ctx context.Context) bool
- func (eunq *EntUserNameQuery) First(ctx context.Context) (*EntUserName, error)
- func (eunq *EntUserNameQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (eunq *EntUserNameQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (eunq *EntUserNameQuery) FirstX(ctx context.Context) *EntUserName
- func (eunq *EntUserNameQuery) GroupBy(field string, fields ...string) *EntUserNameGroupBy
- func (eunq *EntUserNameQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (eunq *EntUserNameQuery) IDsX(ctx context.Context) []uuid.UUID
- func (eunq *EntUserNameQuery) Limit(limit int) *EntUserNameQuery
- func (eunq *EntUserNameQuery) Offset(offset int) *EntUserNameQuery
- func (eunq *EntUserNameQuery) Only(ctx context.Context) (*EntUserName, error)
- func (eunq *EntUserNameQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (eunq *EntUserNameQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (eunq *EntUserNameQuery) OnlyX(ctx context.Context) *EntUserName
- func (eunq *EntUserNameQuery) Order(o ...entusername.OrderOption) *EntUserNameQuery
- func (eunq *EntUserNameQuery) QueryEntUser() *EntUserQuery
- func (eunq *EntUserNameQuery) Select(fields ...string) *EntUserNameSelect
- func (eunq *EntUserNameQuery) Unique(unique bool) *EntUserNameQuery
- func (eunq *EntUserNameQuery) Where(ps ...predicate.EntUserName) *EntUserNameQuery
- func (eunq *EntUserNameQuery) WithEntUser(opts ...func(*EntUserQuery)) *EntUserNameQuery
- type EntUserNameSelect
- func (euns *EntUserNameSelect) Aggregate(fns ...AggregateFunc) *EntUserNameSelect
- func (s *EntUserNameSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntUserNameSelect) BoolX(ctx context.Context) bool
- func (s *EntUserNameSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EntUserNameSelect) BoolsX(ctx context.Context) []bool
- func (s *EntUserNameSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntUserNameSelect) Float64X(ctx context.Context) float64
- func (s *EntUserNameSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntUserNameSelect) Float64sX(ctx context.Context) []float64
- func (s *EntUserNameSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EntUserNameSelect) IntX(ctx context.Context) int
- func (s *EntUserNameSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EntUserNameSelect) IntsX(ctx context.Context) []int
- func (euns *EntUserNameSelect) Scan(ctx context.Context, v any) error
- func (s *EntUserNameSelect) ScanX(ctx context.Context, v any)
- func (s *EntUserNameSelect) String(ctx context.Context) (_ string, err error)
- func (s *EntUserNameSelect) StringX(ctx context.Context) string
- func (s *EntUserNameSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EntUserNameSelect) StringsX(ctx context.Context) []string
- type EntUserNameUpdate
- func (eunu *EntUserNameUpdate) ClearEntUser() *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) Exec(ctx context.Context) error
- func (eunu *EntUserNameUpdate) ExecX(ctx context.Context)
- func (eunu *EntUserNameUpdate) Mutation() *EntUserNameMutation
- func (eunu *EntUserNameUpdate) Save(ctx context.Context) (int, error)
- func (eunu *EntUserNameUpdate) SaveX(ctx context.Context) int
- func (eunu *EntUserNameUpdate) SetCreatedAt(t time.Time) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetDeleted(b bool) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetEntUser(e *EntUser) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetEntUserID(id uuid.UUID) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetNillableCreatedAt(t *time.Time) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetNillableDeleted(b *bool) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetUpdatedAt(t time.Time) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetUserID(u uuid.UUID) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) SetValue(s string) *EntUserNameUpdate
- func (eunu *EntUserNameUpdate) Where(ps ...predicate.EntUserName) *EntUserNameUpdate
- type EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) ClearEntUser() *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) Exec(ctx context.Context) error
- func (eunuo *EntUserNameUpdateOne) ExecX(ctx context.Context)
- func (eunuo *EntUserNameUpdateOne) Mutation() *EntUserNameMutation
- func (eunuo *EntUserNameUpdateOne) Save(ctx context.Context) (*EntUserName, error)
- func (eunuo *EntUserNameUpdateOne) SaveX(ctx context.Context) *EntUserName
- func (eunuo *EntUserNameUpdateOne) Select(field string, fields ...string) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetCreatedAt(t time.Time) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetDeleted(b bool) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetEntUser(e *EntUser) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetEntUserID(id uuid.UUID) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetNillableCreatedAt(t *time.Time) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetNillableDeleted(b *bool) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetUpdatedAt(t time.Time) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetUserID(u uuid.UUID) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) SetValue(s string) *EntUserNameUpdateOne
- func (eunuo *EntUserNameUpdateOne) Where(ps ...predicate.EntUserName) *EntUserNameUpdateOne
- type EntUserNames
- type EntUserQuery
- func (euq *EntUserQuery) Aggregate(fns ...AggregateFunc) *EntUserSelect
- func (euq *EntUserQuery) All(ctx context.Context) ([]*EntUser, error)
- func (euq *EntUserQuery) AllX(ctx context.Context) []*EntUser
- func (euq *EntUserQuery) Clone() *EntUserQuery
- func (euq *EntUserQuery) Count(ctx context.Context) (int, error)
- func (euq *EntUserQuery) CountX(ctx context.Context) int
- func (euq *EntUserQuery) Exist(ctx context.Context) (bool, error)
- func (euq *EntUserQuery) ExistX(ctx context.Context) bool
- func (euq *EntUserQuery) First(ctx context.Context) (*EntUser, error)
- func (euq *EntUserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (euq *EntUserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (euq *EntUserQuery) FirstX(ctx context.Context) *EntUser
- func (euq *EntUserQuery) GroupBy(field string, fields ...string) *EntUserGroupBy
- func (euq *EntUserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (euq *EntUserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (euq *EntUserQuery) Limit(limit int) *EntUserQuery
- func (euq *EntUserQuery) Offset(offset int) *EntUserQuery
- func (euq *EntUserQuery) Only(ctx context.Context) (*EntUser, error)
- func (euq *EntUserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (euq *EntUserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (euq *EntUserQuery) OnlyX(ctx context.Context) *EntUser
- func (euq *EntUserQuery) Order(o ...entuser.OrderOption) *EntUserQuery
- func (euq *EntUserQuery) QueryEntUserNames() *EntUserNameQuery
- func (euq *EntUserQuery) Select(fields ...string) *EntUserSelect
- func (euq *EntUserQuery) Unique(unique bool) *EntUserQuery
- func (euq *EntUserQuery) Where(ps ...predicate.EntUser) *EntUserQuery
- func (euq *EntUserQuery) WithEntUserNames(opts ...func(*EntUserNameQuery)) *EntUserQuery
- type EntUserSelect
- func (eus *EntUserSelect) Aggregate(fns ...AggregateFunc) *EntUserSelect
- func (s *EntUserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EntUserSelect) BoolX(ctx context.Context) bool
- func (s *EntUserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EntUserSelect) BoolsX(ctx context.Context) []bool
- func (s *EntUserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EntUserSelect) Float64X(ctx context.Context) float64
- func (s *EntUserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EntUserSelect) Float64sX(ctx context.Context) []float64
- func (s *EntUserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EntUserSelect) IntX(ctx context.Context) int
- func (s *EntUserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EntUserSelect) IntsX(ctx context.Context) []int
- func (eus *EntUserSelect) Scan(ctx context.Context, v any) error
- func (s *EntUserSelect) ScanX(ctx context.Context, v any)
- func (s *EntUserSelect) String(ctx context.Context) (_ string, err error)
- func (s *EntUserSelect) StringX(ctx context.Context) string
- func (s *EntUserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EntUserSelect) StringsX(ctx context.Context) []string
- type EntUserUpdate
- func (euu *EntUserUpdate) AddEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdate
- func (euu *EntUserUpdate) AddEntUserNames(e ...*EntUserName) *EntUserUpdate
- func (euu *EntUserUpdate) ClearEntUserNames() *EntUserUpdate
- func (euu *EntUserUpdate) Exec(ctx context.Context) error
- func (euu *EntUserUpdate) ExecX(ctx context.Context)
- func (euu *EntUserUpdate) Mutation() *EntUserMutation
- func (euu *EntUserUpdate) RemoveEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdate
- func (euu *EntUserUpdate) RemoveEntUserNames(e ...*EntUserName) *EntUserUpdate
- func (euu *EntUserUpdate) Save(ctx context.Context) (int, error)
- func (euu *EntUserUpdate) SaveX(ctx context.Context) int
- func (euu *EntUserUpdate) SetCreatedAt(t time.Time) *EntUserUpdate
- func (euu *EntUserUpdate) SetDeleted(b bool) *EntUserUpdate
- func (euu *EntUserUpdate) SetNillableCreatedAt(t *time.Time) *EntUserUpdate
- func (euu *EntUserUpdate) SetNillableDeleted(b *bool) *EntUserUpdate
- func (euu *EntUserUpdate) SetUpdatedAt(t time.Time) *EntUserUpdate
- func (euu *EntUserUpdate) Where(ps ...predicate.EntUser) *EntUserUpdate
- type EntUserUpdateOne
- func (euuo *EntUserUpdateOne) AddEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) AddEntUserNames(e ...*EntUserName) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) ClearEntUserNames() *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) Exec(ctx context.Context) error
- func (euuo *EntUserUpdateOne) ExecX(ctx context.Context)
- func (euuo *EntUserUpdateOne) Mutation() *EntUserMutation
- func (euuo *EntUserUpdateOne) RemoveEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) RemoveEntUserNames(e ...*EntUserName) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) Save(ctx context.Context) (*EntUser, error)
- func (euuo *EntUserUpdateOne) SaveX(ctx context.Context) *EntUser
- func (euuo *EntUserUpdateOne) Select(field string, fields ...string) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) SetCreatedAt(t time.Time) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) SetDeleted(b bool) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) SetNillableCreatedAt(t *time.Time) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) SetNillableDeleted(b *bool) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) SetUpdatedAt(t time.Time) *EntUserUpdateOne
- func (euuo *EntUserUpdateOne) Where(ps ...predicate.EntUser) *EntUserUpdateOne
- type EntUsers
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeEntUser = "EntUser" TypeEntUserName = "EntUserName" )
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 // EntUser is the client for interacting with the EntUser builders. EntUser *EntUserClient // EntUserName is the client for interacting with the EntUserName builders. EntUserName *EntUserNameClient // 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(). EntUser. 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 EntUser ¶
type EntUser struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EntUserQuery when eager-loading is set. Edges EntUserEdges `json:"edges"` // contains filtered or unexported fields }
EntUser is the model entity for the EntUser schema.
func (*EntUser) QueryEntUserNames ¶
func (eu *EntUser) QueryEntUserNames() *EntUserNameQuery
QueryEntUserNames queries the "ent_user_names" edge of the EntUser entity.
func (*EntUser) Unwrap ¶
Unwrap unwraps the EntUser 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 (*EntUser) Update ¶
func (eu *EntUser) Update() *EntUserUpdateOne
Update returns a builder for updating this EntUser. Note that you need to call EntUser.Unwrap() before calling this method if this EntUser was returned from a transaction, and the transaction was committed or rolled back.
type EntUserClient ¶
type EntUserClient struct {
// contains filtered or unexported fields
}
EntUserClient is a client for the EntUser schema.
func NewEntUserClient ¶
func NewEntUserClient(c config) *EntUserClient
NewEntUserClient returns a client for the EntUser from the given config.
func (*EntUserClient) Create ¶
func (c *EntUserClient) Create() *EntUserCreate
Create returns a builder for creating a EntUser entity.
func (*EntUserClient) CreateBulk ¶
func (c *EntUserClient) CreateBulk(builders ...*EntUserCreate) *EntUserCreateBulk
CreateBulk returns a builder for creating a bulk of EntUser entities.
func (*EntUserClient) Delete ¶
func (c *EntUserClient) Delete() *EntUserDelete
Delete returns a delete builder for EntUser.
func (*EntUserClient) DeleteOne ¶
func (c *EntUserClient) DeleteOne(eu *EntUser) *EntUserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EntUserClient) DeleteOneID ¶
func (c *EntUserClient) DeleteOneID(id uuid.UUID) *EntUserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EntUserClient) Hooks ¶
func (c *EntUserClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EntUserClient) Intercept ¶
func (c *EntUserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `entuser.Intercept(f(g(h())))`.
func (*EntUserClient) Interceptors ¶
func (c *EntUserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EntUserClient) Query ¶
func (c *EntUserClient) Query() *EntUserQuery
Query returns a query builder for EntUser.
func (*EntUserClient) QueryEntUserNames ¶
func (c *EntUserClient) QueryEntUserNames(eu *EntUser) *EntUserNameQuery
QueryEntUserNames queries the ent_user_names edge of a EntUser.
func (*EntUserClient) Update ¶
func (c *EntUserClient) Update() *EntUserUpdate
Update returns an update builder for EntUser.
func (*EntUserClient) UpdateOne ¶
func (c *EntUserClient) UpdateOne(eu *EntUser) *EntUserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EntUserClient) UpdateOneID ¶
func (c *EntUserClient) UpdateOneID(id uuid.UUID) *EntUserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EntUserClient) Use ¶
func (c *EntUserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entuser.Hooks(f(g(h())))`.
type EntUserCreate ¶
type EntUserCreate struct {
// contains filtered or unexported fields
}
EntUserCreate is the builder for creating a EntUser entity.
func (*EntUserCreate) AddEntUserNameIDs ¶
func (euc *EntUserCreate) AddEntUserNameIDs(ids ...uuid.UUID) *EntUserCreate
AddEntUserNameIDs adds the "ent_user_names" edge to the EntUserName entity by IDs.
func (*EntUserCreate) AddEntUserNames ¶
func (euc *EntUserCreate) AddEntUserNames(e ...*EntUserName) *EntUserCreate
AddEntUserNames adds the "ent_user_names" edges to the EntUserName entity.
func (*EntUserCreate) Exec ¶
func (euc *EntUserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntUserCreate) ExecX ¶
func (euc *EntUserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserCreate) Mutation ¶
func (euc *EntUserCreate) Mutation() *EntUserMutation
Mutation returns the EntUserMutation object of the builder.
func (*EntUserCreate) Save ¶
func (euc *EntUserCreate) Save(ctx context.Context) (*EntUser, error)
Save creates the EntUser in the database.
func (*EntUserCreate) SaveX ¶
func (euc *EntUserCreate) SaveX(ctx context.Context) *EntUser
SaveX calls Save and panics if Save returns an error.
func (*EntUserCreate) SetCreatedAt ¶
func (euc *EntUserCreate) SetCreatedAt(t time.Time) *EntUserCreate
SetCreatedAt sets the "created_at" field.
func (*EntUserCreate) SetDeleted ¶
func (euc *EntUserCreate) SetDeleted(b bool) *EntUserCreate
SetDeleted sets the "deleted" field.
func (*EntUserCreate) SetID ¶
func (euc *EntUserCreate) SetID(u uuid.UUID) *EntUserCreate
SetID sets the "id" field.
func (*EntUserCreate) SetNillableCreatedAt ¶
func (euc *EntUserCreate) SetNillableCreatedAt(t *time.Time) *EntUserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EntUserCreate) SetNillableDeleted ¶
func (euc *EntUserCreate) SetNillableDeleted(b *bool) *EntUserCreate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*EntUserCreate) SetNillableID ¶
func (euc *EntUserCreate) SetNillableID(u *uuid.UUID) *EntUserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*EntUserCreate) SetNillableUpdatedAt ¶
func (euc *EntUserCreate) SetNillableUpdatedAt(t *time.Time) *EntUserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*EntUserCreate) SetUpdatedAt ¶
func (euc *EntUserCreate) SetUpdatedAt(t time.Time) *EntUserCreate
SetUpdatedAt sets the "updated_at" field.
type EntUserCreateBulk ¶
type EntUserCreateBulk struct {
// contains filtered or unexported fields
}
EntUserCreateBulk is the builder for creating many EntUser entities in bulk.
func (*EntUserCreateBulk) Exec ¶
func (eucb *EntUserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EntUserCreateBulk) ExecX ¶
func (eucb *EntUserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EntUserDelete ¶
type EntUserDelete struct {
// contains filtered or unexported fields
}
EntUserDelete is the builder for deleting a EntUser entity.
func (*EntUserDelete) Exec ¶
func (eud *EntUserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EntUserDelete) ExecX ¶
func (eud *EntUserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EntUserDelete) Where ¶
func (eud *EntUserDelete) Where(ps ...predicate.EntUser) *EntUserDelete
Where appends a list predicates to the EntUserDelete builder.
type EntUserDeleteOne ¶
type EntUserDeleteOne struct {
// contains filtered or unexported fields
}
EntUserDeleteOne is the builder for deleting a single EntUser entity.
func (*EntUserDeleteOne) Exec ¶
func (eudo *EntUserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EntUserDeleteOne) ExecX ¶
func (eudo *EntUserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserDeleteOne) Where ¶
func (eudo *EntUserDeleteOne) Where(ps ...predicate.EntUser) *EntUserDeleteOne
Where appends a list predicates to the EntUserDelete builder.
type EntUserEdges ¶
type EntUserEdges struct { // EntUserNames holds the value of the ent_user_names edge. EntUserNames []*EntUserName `json:"ent_user_names,omitempty"` // contains filtered or unexported fields }
EntUserEdges holds the relations/edges for other nodes in the graph.
func (EntUserEdges) EntUserNamesOrErr ¶
func (e EntUserEdges) EntUserNamesOrErr() ([]*EntUserName, error)
EntUserNamesOrErr returns the EntUserNames value or an error if the edge was not loaded in eager-loading.
type EntUserGroupBy ¶
type EntUserGroupBy struct {
// contains filtered or unexported fields
}
EntUserGroupBy is the group-by builder for EntUser entities.
func (*EntUserGroupBy) Aggregate ¶
func (eugb *EntUserGroupBy) Aggregate(fns ...AggregateFunc) *EntUserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EntUserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntUserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EntUserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntUserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntUserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntUserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EntUserGroupBy) Scan ¶
func (eugb *EntUserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntUserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntUserMutation ¶
type EntUserMutation struct {
// contains filtered or unexported fields
}
EntUserMutation represents an operation that mutates the EntUser nodes in the graph.
func (*EntUserMutation) AddEntUserNameIDs ¶
func (m *EntUserMutation) AddEntUserNameIDs(ids ...uuid.UUID)
AddEntUserNameIDs adds the "ent_user_names" edge to the EntUserName entity by ids.
func (*EntUserMutation) AddField ¶
func (m *EntUserMutation) 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 (*EntUserMutation) AddedEdges ¶
func (m *EntUserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EntUserMutation) AddedField ¶
func (m *EntUserMutation) 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 (*EntUserMutation) AddedFields ¶
func (m *EntUserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EntUserMutation) AddedIDs ¶
func (m *EntUserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EntUserMutation) ClearEdge ¶
func (m *EntUserMutation) 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 (*EntUserMutation) ClearEntUserNames ¶
func (m *EntUserMutation) ClearEntUserNames()
ClearEntUserNames clears the "ent_user_names" edge to the EntUserName entity.
func (*EntUserMutation) ClearField ¶
func (m *EntUserMutation) 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 (*EntUserMutation) ClearedEdges ¶
func (m *EntUserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EntUserMutation) ClearedFields ¶
func (m *EntUserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EntUserMutation) Client ¶
func (m EntUserMutation) 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 (*EntUserMutation) CreatedAt ¶
func (m *EntUserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*EntUserMutation) Deleted ¶
func (m *EntUserMutation) Deleted() (r bool, exists bool)
Deleted returns the value of the "deleted" field in the mutation.
func (*EntUserMutation) EdgeCleared ¶
func (m *EntUserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EntUserMutation) EntUserNamesCleared ¶
func (m *EntUserMutation) EntUserNamesCleared() bool
EntUserNamesCleared reports if the "ent_user_names" edge to the EntUserName entity was cleared.
func (*EntUserMutation) EntUserNamesIDs ¶
func (m *EntUserMutation) EntUserNamesIDs() (ids []uuid.UUID)
EntUserNamesIDs returns the "ent_user_names" edge IDs in the mutation.
func (*EntUserMutation) Field ¶
func (m *EntUserMutation) 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 (*EntUserMutation) FieldCleared ¶
func (m *EntUserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EntUserMutation) Fields ¶
func (m *EntUserMutation) 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 (*EntUserMutation) ID ¶
func (m *EntUserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*EntUserMutation) IDs ¶
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 (*EntUserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the EntUser entity. If the EntUser 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 (*EntUserMutation) OldDeleted ¶
func (m *EntUserMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old "deleted" field's value of the EntUser entity. If the EntUser 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 (*EntUserMutation) 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 (*EntUserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the EntUser entity. If the EntUser 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 (*EntUserMutation) RemoveEntUserNameIDs ¶
func (m *EntUserMutation) RemoveEntUserNameIDs(ids ...uuid.UUID)
RemoveEntUserNameIDs removes the "ent_user_names" edge to the EntUserName entity by IDs.
func (*EntUserMutation) RemovedEdges ¶
func (m *EntUserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EntUserMutation) RemovedEntUserNamesIDs ¶
func (m *EntUserMutation) RemovedEntUserNamesIDs() (ids []uuid.UUID)
RemovedEntUserNames returns the removed IDs of the "ent_user_names" edge to the EntUserName entity.
func (*EntUserMutation) RemovedIDs ¶
func (m *EntUserMutation) 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 (*EntUserMutation) ResetCreatedAt ¶
func (m *EntUserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*EntUserMutation) ResetDeleted ¶
func (m *EntUserMutation) ResetDeleted()
ResetDeleted resets all changes to the "deleted" field.
func (*EntUserMutation) ResetEdge ¶
func (m *EntUserMutation) 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 (*EntUserMutation) ResetEntUserNames ¶
func (m *EntUserMutation) ResetEntUserNames()
ResetEntUserNames resets all changes to the "ent_user_names" edge.
func (*EntUserMutation) ResetField ¶
func (m *EntUserMutation) 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 (*EntUserMutation) ResetUpdatedAt ¶
func (m *EntUserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*EntUserMutation) SetCreatedAt ¶
func (m *EntUserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*EntUserMutation) SetDeleted ¶
func (m *EntUserMutation) SetDeleted(b bool)
SetDeleted sets the "deleted" field.
func (*EntUserMutation) SetField ¶
func (m *EntUserMutation) 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 (*EntUserMutation) SetID ¶
func (m *EntUserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of EntUser entities.
func (*EntUserMutation) SetOp ¶
func (m *EntUserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EntUserMutation) SetUpdatedAt ¶
func (m *EntUserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (EntUserMutation) Tx ¶
func (m EntUserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EntUserMutation) Type ¶
func (m *EntUserMutation) Type() string
Type returns the node type of this mutation (EntUser).
func (*EntUserMutation) UpdatedAt ¶
func (m *EntUserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*EntUserMutation) Where ¶
func (m *EntUserMutation) Where(ps ...predicate.EntUser)
Where appends a list predicates to the EntUserMutation builder.
func (*EntUserMutation) WhereP ¶
func (m *EntUserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EntUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EntUserName ¶
type EntUserName struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Deleted holds the value of the "deleted" field. Deleted bool `json:"deleted,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EntUserNameQuery when eager-loading is set. Edges EntUserNameEdges `json:"edges"` // contains filtered or unexported fields }
EntUserName is the model entity for the EntUserName schema.
func (*EntUserName) GetValue ¶
func (eun *EntUserName) GetValue(name string) (ent.Value, error)
GetValue returns the ent.Value that was dynamically selected and assigned to the EntUserName. This includes values selected through modifiers, order, etc.
func (*EntUserName) QueryEntUser ¶
func (eun *EntUserName) QueryEntUser() *EntUserQuery
QueryEntUser queries the "ent_user" edge of the EntUserName entity.
func (*EntUserName) String ¶
func (eun *EntUserName) String() string
String implements the fmt.Stringer.
func (*EntUserName) Unwrap ¶
func (eun *EntUserName) Unwrap() *EntUserName
Unwrap unwraps the EntUserName 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 (*EntUserName) Update ¶
func (eun *EntUserName) Update() *EntUserNameUpdateOne
Update returns a builder for updating this EntUserName. Note that you need to call EntUserName.Unwrap() before calling this method if this EntUserName was returned from a transaction, and the transaction was committed or rolled back.
type EntUserNameClient ¶
type EntUserNameClient struct {
// contains filtered or unexported fields
}
EntUserNameClient is a client for the EntUserName schema.
func NewEntUserNameClient ¶
func NewEntUserNameClient(c config) *EntUserNameClient
NewEntUserNameClient returns a client for the EntUserName from the given config.
func (*EntUserNameClient) Create ¶
func (c *EntUserNameClient) Create() *EntUserNameCreate
Create returns a builder for creating a EntUserName entity.
func (*EntUserNameClient) CreateBulk ¶
func (c *EntUserNameClient) CreateBulk(builders ...*EntUserNameCreate) *EntUserNameCreateBulk
CreateBulk returns a builder for creating a bulk of EntUserName entities.
func (*EntUserNameClient) Delete ¶
func (c *EntUserNameClient) Delete() *EntUserNameDelete
Delete returns a delete builder for EntUserName.
func (*EntUserNameClient) DeleteOne ¶
func (c *EntUserNameClient) DeleteOne(eun *EntUserName) *EntUserNameDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EntUserNameClient) DeleteOneID ¶
func (c *EntUserNameClient) DeleteOneID(id uuid.UUID) *EntUserNameDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EntUserNameClient) Get ¶
func (c *EntUserNameClient) Get(ctx context.Context, id uuid.UUID) (*EntUserName, error)
Get returns a EntUserName entity by its id.
func (*EntUserNameClient) GetX ¶
func (c *EntUserNameClient) GetX(ctx context.Context, id uuid.UUID) *EntUserName
GetX is like Get, but panics if an error occurs.
func (*EntUserNameClient) Hooks ¶
func (c *EntUserNameClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EntUserNameClient) Intercept ¶
func (c *EntUserNameClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `entusername.Intercept(f(g(h())))`.
func (*EntUserNameClient) Interceptors ¶
func (c *EntUserNameClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EntUserNameClient) Query ¶
func (c *EntUserNameClient) Query() *EntUserNameQuery
Query returns a query builder for EntUserName.
func (*EntUserNameClient) QueryEntUser ¶
func (c *EntUserNameClient) QueryEntUser(eun *EntUserName) *EntUserQuery
QueryEntUser queries the ent_user edge of a EntUserName.
func (*EntUserNameClient) Update ¶
func (c *EntUserNameClient) Update() *EntUserNameUpdate
Update returns an update builder for EntUserName.
func (*EntUserNameClient) UpdateOne ¶
func (c *EntUserNameClient) UpdateOne(eun *EntUserName) *EntUserNameUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EntUserNameClient) UpdateOneID ¶
func (c *EntUserNameClient) UpdateOneID(id uuid.UUID) *EntUserNameUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EntUserNameClient) Use ¶
func (c *EntUserNameClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entusername.Hooks(f(g(h())))`.
type EntUserNameCreate ¶
type EntUserNameCreate struct {
// contains filtered or unexported fields
}
EntUserNameCreate is the builder for creating a EntUserName entity.
func (*EntUserNameCreate) Exec ¶
func (eunc *EntUserNameCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntUserNameCreate) ExecX ¶
func (eunc *EntUserNameCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserNameCreate) Mutation ¶
func (eunc *EntUserNameCreate) Mutation() *EntUserNameMutation
Mutation returns the EntUserNameMutation object of the builder.
func (*EntUserNameCreate) Save ¶
func (eunc *EntUserNameCreate) Save(ctx context.Context) (*EntUserName, error)
Save creates the EntUserName in the database.
func (*EntUserNameCreate) SaveX ¶
func (eunc *EntUserNameCreate) SaveX(ctx context.Context) *EntUserName
SaveX calls Save and panics if Save returns an error.
func (*EntUserNameCreate) SetCreatedAt ¶
func (eunc *EntUserNameCreate) SetCreatedAt(t time.Time) *EntUserNameCreate
SetCreatedAt sets the "created_at" field.
func (*EntUserNameCreate) SetDeleted ¶
func (eunc *EntUserNameCreate) SetDeleted(b bool) *EntUserNameCreate
SetDeleted sets the "deleted" field.
func (*EntUserNameCreate) SetEntUser ¶
func (eunc *EntUserNameCreate) SetEntUser(e *EntUser) *EntUserNameCreate
SetEntUser sets the "ent_user" edge to the EntUser entity.
func (*EntUserNameCreate) SetEntUserID ¶
func (eunc *EntUserNameCreate) SetEntUserID(id uuid.UUID) *EntUserNameCreate
SetEntUserID sets the "ent_user" edge to the EntUser entity by ID.
func (*EntUserNameCreate) SetID ¶
func (eunc *EntUserNameCreate) SetID(u uuid.UUID) *EntUserNameCreate
SetID sets the "id" field.
func (*EntUserNameCreate) SetNillableCreatedAt ¶
func (eunc *EntUserNameCreate) SetNillableCreatedAt(t *time.Time) *EntUserNameCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EntUserNameCreate) SetNillableDeleted ¶
func (eunc *EntUserNameCreate) SetNillableDeleted(b *bool) *EntUserNameCreate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*EntUserNameCreate) SetNillableID ¶
func (eunc *EntUserNameCreate) SetNillableID(u *uuid.UUID) *EntUserNameCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*EntUserNameCreate) SetNillableUpdatedAt ¶
func (eunc *EntUserNameCreate) SetNillableUpdatedAt(t *time.Time) *EntUserNameCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*EntUserNameCreate) SetUpdatedAt ¶
func (eunc *EntUserNameCreate) SetUpdatedAt(t time.Time) *EntUserNameCreate
SetUpdatedAt sets the "updated_at" field.
func (*EntUserNameCreate) SetUserID ¶
func (eunc *EntUserNameCreate) SetUserID(u uuid.UUID) *EntUserNameCreate
SetUserID sets the "user_id" field.
func (*EntUserNameCreate) SetValue ¶
func (eunc *EntUserNameCreate) SetValue(s string) *EntUserNameCreate
SetValue sets the "value" field.
type EntUserNameCreateBulk ¶
type EntUserNameCreateBulk struct {
// contains filtered or unexported fields
}
EntUserNameCreateBulk is the builder for creating many EntUserName entities in bulk.
func (*EntUserNameCreateBulk) Exec ¶
func (euncb *EntUserNameCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EntUserNameCreateBulk) ExecX ¶
func (euncb *EntUserNameCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserNameCreateBulk) Save ¶
func (euncb *EntUserNameCreateBulk) Save(ctx context.Context) ([]*EntUserName, error)
Save creates the EntUserName entities in the database.
func (*EntUserNameCreateBulk) SaveX ¶
func (euncb *EntUserNameCreateBulk) SaveX(ctx context.Context) []*EntUserName
SaveX is like Save, but panics if an error occurs.
type EntUserNameDelete ¶
type EntUserNameDelete struct {
// contains filtered or unexported fields
}
EntUserNameDelete is the builder for deleting a EntUserName entity.
func (*EntUserNameDelete) Exec ¶
func (eund *EntUserNameDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EntUserNameDelete) ExecX ¶
func (eund *EntUserNameDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EntUserNameDelete) Where ¶
func (eund *EntUserNameDelete) Where(ps ...predicate.EntUserName) *EntUserNameDelete
Where appends a list predicates to the EntUserNameDelete builder.
type EntUserNameDeleteOne ¶
type EntUserNameDeleteOne struct {
// contains filtered or unexported fields
}
EntUserNameDeleteOne is the builder for deleting a single EntUserName entity.
func (*EntUserNameDeleteOne) Exec ¶
func (eundo *EntUserNameDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EntUserNameDeleteOne) ExecX ¶
func (eundo *EntUserNameDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserNameDeleteOne) Where ¶
func (eundo *EntUserNameDeleteOne) Where(ps ...predicate.EntUserName) *EntUserNameDeleteOne
Where appends a list predicates to the EntUserNameDelete builder.
type EntUserNameEdges ¶
type EntUserNameEdges struct { // EntUser holds the value of the ent_user edge. EntUser *EntUser `json:"ent_user,omitempty"` // contains filtered or unexported fields }
EntUserNameEdges holds the relations/edges for other nodes in the graph.
func (EntUserNameEdges) EntUserOrErr ¶
func (e EntUserNameEdges) EntUserOrErr() (*EntUser, error)
EntUserOrErr returns the EntUser value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type EntUserNameGroupBy ¶
type EntUserNameGroupBy struct {
// contains filtered or unexported fields
}
EntUserNameGroupBy is the group-by builder for EntUserName entities.
func (*EntUserNameGroupBy) Aggregate ¶
func (eungb *EntUserNameGroupBy) Aggregate(fns ...AggregateFunc) *EntUserNameGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EntUserNameGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntUserNameGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EntUserNameGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntUserNameGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntUserNameGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntUserNameGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EntUserNameGroupBy) Scan ¶
func (eungb *EntUserNameGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntUserNameGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntUserNameMutation ¶
type EntUserNameMutation struct {
// contains filtered or unexported fields
}
EntUserNameMutation represents an operation that mutates the EntUserName nodes in the graph.
func (*EntUserNameMutation) AddField ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) AddedEdges ¶
func (m *EntUserNameMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EntUserNameMutation) AddedField ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) AddedFields ¶
func (m *EntUserNameMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EntUserNameMutation) AddedIDs ¶
func (m *EntUserNameMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EntUserNameMutation) ClearEdge ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) ClearEntUser ¶
func (m *EntUserNameMutation) ClearEntUser()
ClearEntUser clears the "ent_user" edge to the EntUser entity.
func (*EntUserNameMutation) ClearField ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) ClearedEdges ¶
func (m *EntUserNameMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EntUserNameMutation) ClearedFields ¶
func (m *EntUserNameMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EntUserNameMutation) Client ¶
func (m EntUserNameMutation) 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 (*EntUserNameMutation) CreatedAt ¶
func (m *EntUserNameMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*EntUserNameMutation) Deleted ¶
func (m *EntUserNameMutation) Deleted() (r bool, exists bool)
Deleted returns the value of the "deleted" field in the mutation.
func (*EntUserNameMutation) EdgeCleared ¶
func (m *EntUserNameMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EntUserNameMutation) EntUserCleared ¶
func (m *EntUserNameMutation) EntUserCleared() bool
EntUserCleared reports if the "ent_user" edge to the EntUser entity was cleared.
func (*EntUserNameMutation) EntUserID ¶
func (m *EntUserNameMutation) EntUserID() (id uuid.UUID, exists bool)
EntUserID returns the "ent_user" edge ID in the mutation.
func (*EntUserNameMutation) EntUserIDs ¶
func (m *EntUserNameMutation) EntUserIDs() (ids []uuid.UUID)
EntUserIDs returns the "ent_user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EntUserID instead. It exists only for internal usage by the builders.
func (*EntUserNameMutation) Field ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) FieldCleared ¶
func (m *EntUserNameMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EntUserNameMutation) Fields ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) ID ¶
func (m *EntUserNameMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*EntUserNameMutation) IDs ¶
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 (*EntUserNameMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the EntUserName entity. If the EntUserName 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 (*EntUserNameMutation) OldDeleted ¶
func (m *EntUserNameMutation) OldDeleted(ctx context.Context) (v bool, err error)
OldDeleted returns the old "deleted" field's value of the EntUserName entity. If the EntUserName 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 (*EntUserNameMutation) 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 (*EntUserNameMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the EntUserName entity. If the EntUserName 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 (*EntUserNameMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the EntUserName entity. If the EntUserName 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 (*EntUserNameMutation) OldValue ¶
func (m *EntUserNameMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the EntUserName entity. If the EntUserName 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 (*EntUserNameMutation) Op ¶
func (m *EntUserNameMutation) Op() Op
Op returns the operation name.
func (*EntUserNameMutation) RemovedEdges ¶
func (m *EntUserNameMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EntUserNameMutation) RemovedIDs ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) ResetCreatedAt ¶
func (m *EntUserNameMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*EntUserNameMutation) ResetDeleted ¶
func (m *EntUserNameMutation) ResetDeleted()
ResetDeleted resets all changes to the "deleted" field.
func (*EntUserNameMutation) ResetEdge ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) ResetEntUser ¶
func (m *EntUserNameMutation) ResetEntUser()
ResetEntUser resets all changes to the "ent_user" edge.
func (*EntUserNameMutation) ResetField ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) ResetUpdatedAt ¶
func (m *EntUserNameMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*EntUserNameMutation) ResetUserID ¶
func (m *EntUserNameMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*EntUserNameMutation) ResetValue ¶
func (m *EntUserNameMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*EntUserNameMutation) SetCreatedAt ¶
func (m *EntUserNameMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*EntUserNameMutation) SetDeleted ¶
func (m *EntUserNameMutation) SetDeleted(b bool)
SetDeleted sets the "deleted" field.
func (*EntUserNameMutation) SetEntUserID ¶
func (m *EntUserNameMutation) SetEntUserID(id uuid.UUID)
SetEntUserID sets the "ent_user" edge to the EntUser entity by id.
func (*EntUserNameMutation) SetField ¶
func (m *EntUserNameMutation) 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 (*EntUserNameMutation) SetID ¶
func (m *EntUserNameMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of EntUserName entities.
func (*EntUserNameMutation) SetOp ¶
func (m *EntUserNameMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EntUserNameMutation) SetUpdatedAt ¶
func (m *EntUserNameMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*EntUserNameMutation) SetUserID ¶
func (m *EntUserNameMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (*EntUserNameMutation) SetValue ¶
func (m *EntUserNameMutation) SetValue(s string)
SetValue sets the "value" field.
func (EntUserNameMutation) Tx ¶
func (m EntUserNameMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EntUserNameMutation) Type ¶
func (m *EntUserNameMutation) Type() string
Type returns the node type of this mutation (EntUserName).
func (*EntUserNameMutation) UpdatedAt ¶
func (m *EntUserNameMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*EntUserNameMutation) UserID ¶
func (m *EntUserNameMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*EntUserNameMutation) Value ¶
func (m *EntUserNameMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*EntUserNameMutation) Where ¶
func (m *EntUserNameMutation) Where(ps ...predicate.EntUserName)
Where appends a list predicates to the EntUserNameMutation builder.
func (*EntUserNameMutation) WhereP ¶
func (m *EntUserNameMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EntUserNameMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EntUserNameQuery ¶
type EntUserNameQuery struct {
// contains filtered or unexported fields
}
EntUserNameQuery is the builder for querying EntUserName entities.
func (*EntUserNameQuery) Aggregate ¶
func (eunq *EntUserNameQuery) Aggregate(fns ...AggregateFunc) *EntUserNameSelect
Aggregate returns a EntUserNameSelect configured with the given aggregations.
func (*EntUserNameQuery) All ¶
func (eunq *EntUserNameQuery) All(ctx context.Context) ([]*EntUserName, error)
All executes the query and returns a list of EntUserNames.
func (*EntUserNameQuery) AllX ¶
func (eunq *EntUserNameQuery) AllX(ctx context.Context) []*EntUserName
AllX is like All, but panics if an error occurs.
func (*EntUserNameQuery) Clone ¶
func (eunq *EntUserNameQuery) Clone() *EntUserNameQuery
Clone returns a duplicate of the EntUserNameQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EntUserNameQuery) Count ¶
func (eunq *EntUserNameQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EntUserNameQuery) CountX ¶
func (eunq *EntUserNameQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EntUserNameQuery) Exist ¶
func (eunq *EntUserNameQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EntUserNameQuery) ExistX ¶
func (eunq *EntUserNameQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EntUserNameQuery) First ¶
func (eunq *EntUserNameQuery) First(ctx context.Context) (*EntUserName, error)
First returns the first EntUserName entity from the query. Returns a *NotFoundError when no EntUserName was found.
func (*EntUserNameQuery) FirstID ¶
FirstID returns the first EntUserName ID from the query. Returns a *NotFoundError when no EntUserName ID was found.
func (*EntUserNameQuery) FirstIDX ¶
func (eunq *EntUserNameQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*EntUserNameQuery) FirstX ¶
func (eunq *EntUserNameQuery) FirstX(ctx context.Context) *EntUserName
FirstX is like First, but panics if an error occurs.
func (*EntUserNameQuery) GroupBy ¶
func (eunq *EntUserNameQuery) GroupBy(field string, fields ...string) *EntUserNameGroupBy
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 { UserID uuid.UUID `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.EntUserName.Query(). GroupBy(entusername.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EntUserNameQuery) IDsX ¶
func (eunq *EntUserNameQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*EntUserNameQuery) Limit ¶
func (eunq *EntUserNameQuery) Limit(limit int) *EntUserNameQuery
Limit the number of records to be returned by this query.
func (*EntUserNameQuery) Offset ¶
func (eunq *EntUserNameQuery) Offset(offset int) *EntUserNameQuery
Offset to start from.
func (*EntUserNameQuery) Only ¶
func (eunq *EntUserNameQuery) Only(ctx context.Context) (*EntUserName, error)
Only returns a single EntUserName entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EntUserName entity is found. Returns a *NotFoundError when no EntUserName entities are found.
func (*EntUserNameQuery) OnlyID ¶
OnlyID is like Only, but returns the only EntUserName ID in the query. Returns a *NotSingularError when more than one EntUserName ID is found. Returns a *NotFoundError when no entities are found.
func (*EntUserNameQuery) OnlyIDX ¶
func (eunq *EntUserNameQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EntUserNameQuery) OnlyX ¶
func (eunq *EntUserNameQuery) OnlyX(ctx context.Context) *EntUserName
OnlyX is like Only, but panics if an error occurs.
func (*EntUserNameQuery) Order ¶
func (eunq *EntUserNameQuery) Order(o ...entusername.OrderOption) *EntUserNameQuery
Order specifies how the records should be ordered.
func (*EntUserNameQuery) QueryEntUser ¶
func (eunq *EntUserNameQuery) QueryEntUser() *EntUserQuery
QueryEntUser chains the current query on the "ent_user" edge.
func (*EntUserNameQuery) Select ¶
func (eunq *EntUserNameQuery) Select(fields ...string) *EntUserNameSelect
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 { UserID uuid.UUID `json:"user_id,omitempty"` } client.EntUserName.Query(). Select(entusername.FieldUserID). Scan(ctx, &v)
func (*EntUserNameQuery) Unique ¶
func (eunq *EntUserNameQuery) Unique(unique bool) *EntUserNameQuery
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 (*EntUserNameQuery) Where ¶
func (eunq *EntUserNameQuery) Where(ps ...predicate.EntUserName) *EntUserNameQuery
Where adds a new predicate for the EntUserNameQuery builder.
func (*EntUserNameQuery) WithEntUser ¶
func (eunq *EntUserNameQuery) WithEntUser(opts ...func(*EntUserQuery)) *EntUserNameQuery
WithEntUser tells the query-builder to eager-load the nodes that are connected to the "ent_user" edge. The optional arguments are used to configure the query builder of the edge.
type EntUserNameSelect ¶
type EntUserNameSelect struct { *EntUserNameQuery // contains filtered or unexported fields }
EntUserNameSelect is the builder for selecting fields of EntUserName entities.
func (*EntUserNameSelect) Aggregate ¶
func (euns *EntUserNameSelect) Aggregate(fns ...AggregateFunc) *EntUserNameSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EntUserNameSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntUserNameSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EntUserNameSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntUserNameSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntUserNameSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntUserNameSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EntUserNameSelect) Scan ¶
func (euns *EntUserNameSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntUserNameSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntUserNameUpdate ¶
type EntUserNameUpdate struct {
// contains filtered or unexported fields
}
EntUserNameUpdate is the builder for updating EntUserName entities.
func (*EntUserNameUpdate) ClearEntUser ¶
func (eunu *EntUserNameUpdate) ClearEntUser() *EntUserNameUpdate
ClearEntUser clears the "ent_user" edge to the EntUser entity.
func (*EntUserNameUpdate) Exec ¶
func (eunu *EntUserNameUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntUserNameUpdate) ExecX ¶
func (eunu *EntUserNameUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserNameUpdate) Mutation ¶
func (eunu *EntUserNameUpdate) Mutation() *EntUserNameMutation
Mutation returns the EntUserNameMutation object of the builder.
func (*EntUserNameUpdate) Save ¶
func (eunu *EntUserNameUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EntUserNameUpdate) SaveX ¶
func (eunu *EntUserNameUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EntUserNameUpdate) SetCreatedAt ¶
func (eunu *EntUserNameUpdate) SetCreatedAt(t time.Time) *EntUserNameUpdate
SetCreatedAt sets the "created_at" field.
func (*EntUserNameUpdate) SetDeleted ¶
func (eunu *EntUserNameUpdate) SetDeleted(b bool) *EntUserNameUpdate
SetDeleted sets the "deleted" field.
func (*EntUserNameUpdate) SetEntUser ¶
func (eunu *EntUserNameUpdate) SetEntUser(e *EntUser) *EntUserNameUpdate
SetEntUser sets the "ent_user" edge to the EntUser entity.
func (*EntUserNameUpdate) SetEntUserID ¶
func (eunu *EntUserNameUpdate) SetEntUserID(id uuid.UUID) *EntUserNameUpdate
SetEntUserID sets the "ent_user" edge to the EntUser entity by ID.
func (*EntUserNameUpdate) SetNillableCreatedAt ¶
func (eunu *EntUserNameUpdate) SetNillableCreatedAt(t *time.Time) *EntUserNameUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EntUserNameUpdate) SetNillableDeleted ¶
func (eunu *EntUserNameUpdate) SetNillableDeleted(b *bool) *EntUserNameUpdate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*EntUserNameUpdate) SetUpdatedAt ¶
func (eunu *EntUserNameUpdate) SetUpdatedAt(t time.Time) *EntUserNameUpdate
SetUpdatedAt sets the "updated_at" field.
func (*EntUserNameUpdate) SetUserID ¶
func (eunu *EntUserNameUpdate) SetUserID(u uuid.UUID) *EntUserNameUpdate
SetUserID sets the "user_id" field.
func (*EntUserNameUpdate) SetValue ¶
func (eunu *EntUserNameUpdate) SetValue(s string) *EntUserNameUpdate
SetValue sets the "value" field.
func (*EntUserNameUpdate) Where ¶
func (eunu *EntUserNameUpdate) Where(ps ...predicate.EntUserName) *EntUserNameUpdate
Where appends a list predicates to the EntUserNameUpdate builder.
type EntUserNameUpdateOne ¶
type EntUserNameUpdateOne struct {
// contains filtered or unexported fields
}
EntUserNameUpdateOne is the builder for updating a single EntUserName entity.
func (*EntUserNameUpdateOne) ClearEntUser ¶
func (eunuo *EntUserNameUpdateOne) ClearEntUser() *EntUserNameUpdateOne
ClearEntUser clears the "ent_user" edge to the EntUser entity.
func (*EntUserNameUpdateOne) Exec ¶
func (eunuo *EntUserNameUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EntUserNameUpdateOne) ExecX ¶
func (eunuo *EntUserNameUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserNameUpdateOne) Mutation ¶
func (eunuo *EntUserNameUpdateOne) Mutation() *EntUserNameMutation
Mutation returns the EntUserNameMutation object of the builder.
func (*EntUserNameUpdateOne) Save ¶
func (eunuo *EntUserNameUpdateOne) Save(ctx context.Context) (*EntUserName, error)
Save executes the query and returns the updated EntUserName entity.
func (*EntUserNameUpdateOne) SaveX ¶
func (eunuo *EntUserNameUpdateOne) SaveX(ctx context.Context) *EntUserName
SaveX is like Save, but panics if an error occurs.
func (*EntUserNameUpdateOne) Select ¶
func (eunuo *EntUserNameUpdateOne) Select(field string, fields ...string) *EntUserNameUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EntUserNameUpdateOne) SetCreatedAt ¶
func (eunuo *EntUserNameUpdateOne) SetCreatedAt(t time.Time) *EntUserNameUpdateOne
SetCreatedAt sets the "created_at" field.
func (*EntUserNameUpdateOne) SetDeleted ¶
func (eunuo *EntUserNameUpdateOne) SetDeleted(b bool) *EntUserNameUpdateOne
SetDeleted sets the "deleted" field.
func (*EntUserNameUpdateOne) SetEntUser ¶
func (eunuo *EntUserNameUpdateOne) SetEntUser(e *EntUser) *EntUserNameUpdateOne
SetEntUser sets the "ent_user" edge to the EntUser entity.
func (*EntUserNameUpdateOne) SetEntUserID ¶
func (eunuo *EntUserNameUpdateOne) SetEntUserID(id uuid.UUID) *EntUserNameUpdateOne
SetEntUserID sets the "ent_user" edge to the EntUser entity by ID.
func (*EntUserNameUpdateOne) SetNillableCreatedAt ¶
func (eunuo *EntUserNameUpdateOne) SetNillableCreatedAt(t *time.Time) *EntUserNameUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EntUserNameUpdateOne) SetNillableDeleted ¶
func (eunuo *EntUserNameUpdateOne) SetNillableDeleted(b *bool) *EntUserNameUpdateOne
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*EntUserNameUpdateOne) SetUpdatedAt ¶
func (eunuo *EntUserNameUpdateOne) SetUpdatedAt(t time.Time) *EntUserNameUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*EntUserNameUpdateOne) SetUserID ¶
func (eunuo *EntUserNameUpdateOne) SetUserID(u uuid.UUID) *EntUserNameUpdateOne
SetUserID sets the "user_id" field.
func (*EntUserNameUpdateOne) SetValue ¶
func (eunuo *EntUserNameUpdateOne) SetValue(s string) *EntUserNameUpdateOne
SetValue sets the "value" field.
func (*EntUserNameUpdateOne) Where ¶
func (eunuo *EntUserNameUpdateOne) Where(ps ...predicate.EntUserName) *EntUserNameUpdateOne
Where appends a list predicates to the EntUserNameUpdate builder.
type EntUserNames ¶
type EntUserNames []*EntUserName
EntUserNames is a parsable slice of EntUserName.
type EntUserQuery ¶
type EntUserQuery struct {
// contains filtered or unexported fields
}
EntUserQuery is the builder for querying EntUser entities.
func (*EntUserQuery) Aggregate ¶
func (euq *EntUserQuery) Aggregate(fns ...AggregateFunc) *EntUserSelect
Aggregate returns a EntUserSelect configured with the given aggregations.
func (*EntUserQuery) All ¶
func (euq *EntUserQuery) All(ctx context.Context) ([]*EntUser, error)
All executes the query and returns a list of EntUsers.
func (*EntUserQuery) AllX ¶
func (euq *EntUserQuery) AllX(ctx context.Context) []*EntUser
AllX is like All, but panics if an error occurs.
func (*EntUserQuery) Clone ¶
func (euq *EntUserQuery) Clone() *EntUserQuery
Clone returns a duplicate of the EntUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EntUserQuery) Count ¶
func (euq *EntUserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EntUserQuery) CountX ¶
func (euq *EntUserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EntUserQuery) Exist ¶
func (euq *EntUserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EntUserQuery) ExistX ¶
func (euq *EntUserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EntUserQuery) First ¶
func (euq *EntUserQuery) First(ctx context.Context) (*EntUser, error)
First returns the first EntUser entity from the query. Returns a *NotFoundError when no EntUser was found.
func (*EntUserQuery) FirstID ¶
FirstID returns the first EntUser ID from the query. Returns a *NotFoundError when no EntUser ID was found.
func (*EntUserQuery) FirstIDX ¶
func (euq *EntUserQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*EntUserQuery) FirstX ¶
func (euq *EntUserQuery) FirstX(ctx context.Context) *EntUser
FirstX is like First, but panics if an error occurs.
func (*EntUserQuery) GroupBy ¶
func (euq *EntUserQuery) GroupBy(field string, fields ...string) *EntUserGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.EntUser.Query(). GroupBy(entuser.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EntUserQuery) IDsX ¶
func (euq *EntUserQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*EntUserQuery) Limit ¶
func (euq *EntUserQuery) Limit(limit int) *EntUserQuery
Limit the number of records to be returned by this query.
func (*EntUserQuery) Offset ¶
func (euq *EntUserQuery) Offset(offset int) *EntUserQuery
Offset to start from.
func (*EntUserQuery) Only ¶
func (euq *EntUserQuery) Only(ctx context.Context) (*EntUser, error)
Only returns a single EntUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EntUser entity is found. Returns a *NotFoundError when no EntUser entities are found.
func (*EntUserQuery) OnlyID ¶
OnlyID is like Only, but returns the only EntUser ID in the query. Returns a *NotSingularError when more than one EntUser ID is found. Returns a *NotFoundError when no entities are found.
func (*EntUserQuery) OnlyIDX ¶
func (euq *EntUserQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EntUserQuery) OnlyX ¶
func (euq *EntUserQuery) OnlyX(ctx context.Context) *EntUser
OnlyX is like Only, but panics if an error occurs.
func (*EntUserQuery) Order ¶
func (euq *EntUserQuery) Order(o ...entuser.OrderOption) *EntUserQuery
Order specifies how the records should be ordered.
func (*EntUserQuery) QueryEntUserNames ¶
func (euq *EntUserQuery) QueryEntUserNames() *EntUserNameQuery
QueryEntUserNames chains the current query on the "ent_user_names" edge.
func (*EntUserQuery) Select ¶
func (euq *EntUserQuery) Select(fields ...string) *EntUserSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.EntUser.Query(). Select(entuser.FieldCreatedAt). Scan(ctx, &v)
func (*EntUserQuery) Unique ¶
func (euq *EntUserQuery) Unique(unique bool) *EntUserQuery
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 (*EntUserQuery) Where ¶
func (euq *EntUserQuery) Where(ps ...predicate.EntUser) *EntUserQuery
Where adds a new predicate for the EntUserQuery builder.
func (*EntUserQuery) WithEntUserNames ¶
func (euq *EntUserQuery) WithEntUserNames(opts ...func(*EntUserNameQuery)) *EntUserQuery
WithEntUserNames tells the query-builder to eager-load the nodes that are connected to the "ent_user_names" edge. The optional arguments are used to configure the query builder of the edge.
type EntUserSelect ¶
type EntUserSelect struct { *EntUserQuery // contains filtered or unexported fields }
EntUserSelect is the builder for selecting fields of EntUser entities.
func (*EntUserSelect) Aggregate ¶
func (eus *EntUserSelect) Aggregate(fns ...AggregateFunc) *EntUserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EntUserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EntUserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EntUserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EntUserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EntUserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EntUserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EntUserSelect) Scan ¶
func (eus *EntUserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EntUserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EntUserUpdate ¶
type EntUserUpdate struct {
// contains filtered or unexported fields
}
EntUserUpdate is the builder for updating EntUser entities.
func (*EntUserUpdate) AddEntUserNameIDs ¶
func (euu *EntUserUpdate) AddEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdate
AddEntUserNameIDs adds the "ent_user_names" edge to the EntUserName entity by IDs.
func (*EntUserUpdate) AddEntUserNames ¶
func (euu *EntUserUpdate) AddEntUserNames(e ...*EntUserName) *EntUserUpdate
AddEntUserNames adds the "ent_user_names" edges to the EntUserName entity.
func (*EntUserUpdate) ClearEntUserNames ¶
func (euu *EntUserUpdate) ClearEntUserNames() *EntUserUpdate
ClearEntUserNames clears all "ent_user_names" edges to the EntUserName entity.
func (*EntUserUpdate) Exec ¶
func (euu *EntUserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EntUserUpdate) ExecX ¶
func (euu *EntUserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserUpdate) Mutation ¶
func (euu *EntUserUpdate) Mutation() *EntUserMutation
Mutation returns the EntUserMutation object of the builder.
func (*EntUserUpdate) RemoveEntUserNameIDs ¶
func (euu *EntUserUpdate) RemoveEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdate
RemoveEntUserNameIDs removes the "ent_user_names" edge to EntUserName entities by IDs.
func (*EntUserUpdate) RemoveEntUserNames ¶
func (euu *EntUserUpdate) RemoveEntUserNames(e ...*EntUserName) *EntUserUpdate
RemoveEntUserNames removes "ent_user_names" edges to EntUserName entities.
func (*EntUserUpdate) Save ¶
func (euu *EntUserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EntUserUpdate) SaveX ¶
func (euu *EntUserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EntUserUpdate) SetCreatedAt ¶
func (euu *EntUserUpdate) SetCreatedAt(t time.Time) *EntUserUpdate
SetCreatedAt sets the "created_at" field.
func (*EntUserUpdate) SetDeleted ¶
func (euu *EntUserUpdate) SetDeleted(b bool) *EntUserUpdate
SetDeleted sets the "deleted" field.
func (*EntUserUpdate) SetNillableCreatedAt ¶
func (euu *EntUserUpdate) SetNillableCreatedAt(t *time.Time) *EntUserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EntUserUpdate) SetNillableDeleted ¶
func (euu *EntUserUpdate) SetNillableDeleted(b *bool) *EntUserUpdate
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*EntUserUpdate) SetUpdatedAt ¶
func (euu *EntUserUpdate) SetUpdatedAt(t time.Time) *EntUserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*EntUserUpdate) Where ¶
func (euu *EntUserUpdate) Where(ps ...predicate.EntUser) *EntUserUpdate
Where appends a list predicates to the EntUserUpdate builder.
type EntUserUpdateOne ¶
type EntUserUpdateOne struct {
// contains filtered or unexported fields
}
EntUserUpdateOne is the builder for updating a single EntUser entity.
func (*EntUserUpdateOne) AddEntUserNameIDs ¶
func (euuo *EntUserUpdateOne) AddEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdateOne
AddEntUserNameIDs adds the "ent_user_names" edge to the EntUserName entity by IDs.
func (*EntUserUpdateOne) AddEntUserNames ¶
func (euuo *EntUserUpdateOne) AddEntUserNames(e ...*EntUserName) *EntUserUpdateOne
AddEntUserNames adds the "ent_user_names" edges to the EntUserName entity.
func (*EntUserUpdateOne) ClearEntUserNames ¶
func (euuo *EntUserUpdateOne) ClearEntUserNames() *EntUserUpdateOne
ClearEntUserNames clears all "ent_user_names" edges to the EntUserName entity.
func (*EntUserUpdateOne) Exec ¶
func (euuo *EntUserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EntUserUpdateOne) ExecX ¶
func (euuo *EntUserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EntUserUpdateOne) Mutation ¶
func (euuo *EntUserUpdateOne) Mutation() *EntUserMutation
Mutation returns the EntUserMutation object of the builder.
func (*EntUserUpdateOne) RemoveEntUserNameIDs ¶
func (euuo *EntUserUpdateOne) RemoveEntUserNameIDs(ids ...uuid.UUID) *EntUserUpdateOne
RemoveEntUserNameIDs removes the "ent_user_names" edge to EntUserName entities by IDs.
func (*EntUserUpdateOne) RemoveEntUserNames ¶
func (euuo *EntUserUpdateOne) RemoveEntUserNames(e ...*EntUserName) *EntUserUpdateOne
RemoveEntUserNames removes "ent_user_names" edges to EntUserName entities.
func (*EntUserUpdateOne) Save ¶
func (euuo *EntUserUpdateOne) Save(ctx context.Context) (*EntUser, error)
Save executes the query and returns the updated EntUser entity.
func (*EntUserUpdateOne) SaveX ¶
func (euuo *EntUserUpdateOne) SaveX(ctx context.Context) *EntUser
SaveX is like Save, but panics if an error occurs.
func (*EntUserUpdateOne) Select ¶
func (euuo *EntUserUpdateOne) Select(field string, fields ...string) *EntUserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EntUserUpdateOne) SetCreatedAt ¶
func (euuo *EntUserUpdateOne) SetCreatedAt(t time.Time) *EntUserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*EntUserUpdateOne) SetDeleted ¶
func (euuo *EntUserUpdateOne) SetDeleted(b bool) *EntUserUpdateOne
SetDeleted sets the "deleted" field.
func (*EntUserUpdateOne) SetNillableCreatedAt ¶
func (euuo *EntUserUpdateOne) SetNillableCreatedAt(t *time.Time) *EntUserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EntUserUpdateOne) SetNillableDeleted ¶
func (euuo *EntUserUpdateOne) SetNillableDeleted(b *bool) *EntUserUpdateOne
SetNillableDeleted sets the "deleted" field if the given value is not nil.
func (*EntUserUpdateOne) SetUpdatedAt ¶
func (euuo *EntUserUpdateOne) SetUpdatedAt(t time.Time) *EntUserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*EntUserUpdateOne) Where ¶
func (euuo *EntUserUpdateOne) Where(ps ...predicate.EntUser) *EntUserUpdateOne
Where appends a list predicates to the EntUserUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // EntUser is the client for interacting with the EntUser builders. EntUser *EntUserClient // EntUserName is the client for interacting with the EntUserName builders. EntUserName *EntUserNameClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.