Documentation ¶
Index ¶
- Constants
- 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 Attachment
- type AttachmentClient
- func (c *AttachmentClient) Create() *AttachmentCreate
- func (c *AttachmentClient) CreateBulk(builders ...*AttachmentCreate) *AttachmentCreateBulk
- func (c *AttachmentClient) Delete() *AttachmentDelete
- func (c *AttachmentClient) DeleteOne(a *Attachment) *AttachmentDeleteOne
- func (c *AttachmentClient) DeleteOneID(id uuid.UUID) *AttachmentDeleteOne
- func (c *AttachmentClient) Get(ctx context.Context, id uuid.UUID) (*Attachment, error)
- func (c *AttachmentClient) GetX(ctx context.Context, id uuid.UUID) *Attachment
- func (c *AttachmentClient) Hooks() []Hook
- func (c *AttachmentClient) Query() *AttachmentQuery
- func (c *AttachmentClient) QueryRecipients(a *Attachment) *UserQuery
- func (c *AttachmentClient) QueryUser(a *Attachment) *UserQuery
- func (c *AttachmentClient) Update() *AttachmentUpdate
- func (c *AttachmentClient) UpdateOne(a *Attachment) *AttachmentUpdateOne
- func (c *AttachmentClient) UpdateOneID(id uuid.UUID) *AttachmentUpdateOne
- func (c *AttachmentClient) Use(hooks ...Hook)
- type AttachmentCreate
- func (ac *AttachmentCreate) AddRecipientIDs(ids ...int) *AttachmentCreate
- func (ac *AttachmentCreate) AddRecipients(u ...*User) *AttachmentCreate
- func (ac *AttachmentCreate) Exec(ctx context.Context) error
- func (ac *AttachmentCreate) ExecX(ctx context.Context)
- func (ac *AttachmentCreate) Mutation() *AttachmentMutation
- func (ac *AttachmentCreate) Save(ctx context.Context) (*Attachment, error)
- func (ac *AttachmentCreate) SaveX(ctx context.Context) *Attachment
- func (ac *AttachmentCreate) SetID(u uuid.UUID) *AttachmentCreate
- func (ac *AttachmentCreate) SetNillableID(u *uuid.UUID) *AttachmentCreate
- func (ac *AttachmentCreate) SetNillableUserID(id *int) *AttachmentCreate
- func (ac *AttachmentCreate) SetUser(u *User) *AttachmentCreate
- func (ac *AttachmentCreate) SetUserID(id int) *AttachmentCreate
- type AttachmentCreateBulk
- type AttachmentDelete
- type AttachmentDeleteOne
- type AttachmentEdges
- type AttachmentGroupBy
- func (agb *AttachmentGroupBy) Aggregate(fns ...AggregateFunc) *AttachmentGroupBy
- func (s *AttachmentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachmentGroupBy) BoolX(ctx context.Context) bool
- func (s *AttachmentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachmentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AttachmentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachmentGroupBy) Float64X(ctx context.Context) float64
- func (s *AttachmentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachmentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AttachmentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AttachmentGroupBy) IntX(ctx context.Context) int
- func (s *AttachmentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AttachmentGroupBy) IntsX(ctx context.Context) []int
- func (agb *AttachmentGroupBy) Scan(ctx context.Context, v any) error
- func (s *AttachmentGroupBy) ScanX(ctx context.Context, v any)
- func (s *AttachmentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AttachmentGroupBy) StringX(ctx context.Context) string
- func (s *AttachmentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AttachmentGroupBy) StringsX(ctx context.Context) []string
- type AttachmentMutation
- func (m *AttachmentMutation) AddField(name string, value ent.Value) error
- func (m *AttachmentMutation) AddRecipientIDs(ids ...int)
- func (m *AttachmentMutation) AddedEdges() []string
- func (m *AttachmentMutation) AddedField(name string) (ent.Value, bool)
- func (m *AttachmentMutation) AddedFields() []string
- func (m *AttachmentMutation) AddedIDs(name string) []ent.Value
- func (m *AttachmentMutation) ClearEdge(name string) error
- func (m *AttachmentMutation) ClearField(name string) error
- func (m *AttachmentMutation) ClearRecipients()
- func (m *AttachmentMutation) ClearUser()
- func (m *AttachmentMutation) ClearedEdges() []string
- func (m *AttachmentMutation) ClearedFields() []string
- func (m AttachmentMutation) Client() *Client
- func (m *AttachmentMutation) EdgeCleared(name string) bool
- func (m *AttachmentMutation) Field(name string) (ent.Value, bool)
- func (m *AttachmentMutation) FieldCleared(name string) bool
- func (m *AttachmentMutation) Fields() []string
- func (m *AttachmentMutation) ID() (id uuid.UUID, exists bool)
- func (m *AttachmentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AttachmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AttachmentMutation) Op() Op
- func (m *AttachmentMutation) RecipientsCleared() bool
- func (m *AttachmentMutation) RecipientsIDs() (ids []int)
- func (m *AttachmentMutation) RemoveRecipientIDs(ids ...int)
- func (m *AttachmentMutation) RemovedEdges() []string
- func (m *AttachmentMutation) RemovedIDs(name string) []ent.Value
- func (m *AttachmentMutation) RemovedRecipientsIDs() (ids []int)
- func (m *AttachmentMutation) ResetEdge(name string) error
- func (m *AttachmentMutation) ResetField(name string) error
- func (m *AttachmentMutation) ResetRecipients()
- func (m *AttachmentMutation) ResetUser()
- func (m *AttachmentMutation) SetField(name string, value ent.Value) error
- func (m *AttachmentMutation) SetID(id uuid.UUID)
- func (m *AttachmentMutation) SetUserID(id int)
- func (m AttachmentMutation) Tx() (*Tx, error)
- func (m *AttachmentMutation) Type() string
- func (m *AttachmentMutation) UserCleared() bool
- func (m *AttachmentMutation) UserID() (id int, exists bool)
- func (m *AttachmentMutation) UserIDs() (ids []int)
- func (m *AttachmentMutation) Where(ps ...predicate.Attachment)
- type AttachmentQuery
- func (aq *AttachmentQuery) All(ctx context.Context) ([]*Attachment, error)
- func (aq *AttachmentQuery) AllX(ctx context.Context) []*Attachment
- func (aq *AttachmentQuery) Clone() *AttachmentQuery
- func (aq *AttachmentQuery) Count(ctx context.Context) (int, error)
- func (aq *AttachmentQuery) CountX(ctx context.Context) int
- func (aq *AttachmentQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AttachmentQuery) ExistX(ctx context.Context) bool
- func (aq *AttachmentQuery) First(ctx context.Context) (*Attachment, error)
- func (aq *AttachmentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AttachmentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (aq *AttachmentQuery) FirstX(ctx context.Context) *Attachment
- func (aq *AttachmentQuery) GroupBy(field string, fields ...string) *AttachmentGroupBy
- func (aq *AttachmentQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (aq *AttachmentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AttachmentQuery) Limit(limit int) *AttachmentQuery
- func (aq *AttachmentQuery) Offset(offset int) *AttachmentQuery
- func (aq *AttachmentQuery) Only(ctx context.Context) (*Attachment, error)
- func (aq *AttachmentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AttachmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (aq *AttachmentQuery) OnlyX(ctx context.Context) *Attachment
- func (aq *AttachmentQuery) Order(o ...OrderFunc) *AttachmentQuery
- func (aq *AttachmentQuery) QueryRecipients() *UserQuery
- func (aq *AttachmentQuery) QueryUser() *UserQuery
- func (aq *AttachmentQuery) Select(fields ...string) *AttachmentSelect
- func (aq *AttachmentQuery) Unique(unique bool) *AttachmentQuery
- func (aq *AttachmentQuery) Where(ps ...predicate.Attachment) *AttachmentQuery
- func (aq *AttachmentQuery) WithRecipients(opts ...func(*UserQuery)) *AttachmentQuery
- func (aq *AttachmentQuery) WithUser(opts ...func(*UserQuery)) *AttachmentQuery
- type AttachmentSelect
- func (s *AttachmentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachmentSelect) BoolX(ctx context.Context) bool
- func (s *AttachmentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachmentSelect) BoolsX(ctx context.Context) []bool
- func (s *AttachmentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachmentSelect) Float64X(ctx context.Context) float64
- func (s *AttachmentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachmentSelect) Float64sX(ctx context.Context) []float64
- func (s *AttachmentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AttachmentSelect) IntX(ctx context.Context) int
- func (s *AttachmentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AttachmentSelect) IntsX(ctx context.Context) []int
- func (as *AttachmentSelect) Scan(ctx context.Context, v any) error
- func (s *AttachmentSelect) ScanX(ctx context.Context, v any)
- func (s *AttachmentSelect) String(ctx context.Context) (_ string, err error)
- func (s *AttachmentSelect) StringX(ctx context.Context) string
- func (s *AttachmentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AttachmentSelect) StringsX(ctx context.Context) []string
- type AttachmentUpdate
- func (au *AttachmentUpdate) AddRecipientIDs(ids ...int) *AttachmentUpdate
- func (au *AttachmentUpdate) AddRecipients(u ...*User) *AttachmentUpdate
- func (au *AttachmentUpdate) ClearRecipients() *AttachmentUpdate
- func (au *AttachmentUpdate) ClearUser() *AttachmentUpdate
- func (au *AttachmentUpdate) Exec(ctx context.Context) error
- func (au *AttachmentUpdate) ExecX(ctx context.Context)
- func (au *AttachmentUpdate) Mutation() *AttachmentMutation
- func (au *AttachmentUpdate) RemoveRecipientIDs(ids ...int) *AttachmentUpdate
- func (au *AttachmentUpdate) RemoveRecipients(u ...*User) *AttachmentUpdate
- func (au *AttachmentUpdate) Save(ctx context.Context) (int, error)
- func (au *AttachmentUpdate) SaveX(ctx context.Context) int
- func (au *AttachmentUpdate) SetNillableUserID(id *int) *AttachmentUpdate
- func (au *AttachmentUpdate) SetUser(u *User) *AttachmentUpdate
- func (au *AttachmentUpdate) SetUserID(id int) *AttachmentUpdate
- func (au *AttachmentUpdate) Where(ps ...predicate.Attachment) *AttachmentUpdate
- type AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) AddRecipientIDs(ids ...int) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) AddRecipients(u ...*User) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) ClearRecipients() *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) ClearUser() *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) Exec(ctx context.Context) error
- func (auo *AttachmentUpdateOne) ExecX(ctx context.Context)
- func (auo *AttachmentUpdateOne) Mutation() *AttachmentMutation
- func (auo *AttachmentUpdateOne) RemoveRecipientIDs(ids ...int) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) RemoveRecipients(u ...*User) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) Save(ctx context.Context) (*Attachment, error)
- func (auo *AttachmentUpdateOne) SaveX(ctx context.Context) *Attachment
- func (auo *AttachmentUpdateOne) Select(field string, fields ...string) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetNillableUserID(id *int) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetUser(u *User) *AttachmentUpdateOne
- func (auo *AttachmentUpdateOne) SetUserID(id int) *AttachmentUpdateOne
- type Attachments
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Group
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
- func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id int) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupCreate
- func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
- func (gc *GroupCreate) Exec(ctx context.Context) error
- func (gc *GroupCreate) ExecX(ctx context.Context)
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- type GroupCreateBulk
- type GroupDelete
- type GroupDeleteOne
- type GroupEdges
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (s *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupGroupBy) IntX(ctx context.Context) int
- func (s *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupGroupBy) StringX(ctx context.Context) string
- func (s *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupMutation
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddUserIDs(ids ...int)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearUsers()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) ID() (id int, exists bool)
- func (m *GroupMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) RemoveUserIDs(ids ...int)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) RemovedUsersIDs() (ids []int)
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetUsers()
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetName(s string)
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UsersCleared() bool
- func (m *GroupMutation) UsersIDs() (ids []int)
- func (m *GroupMutation) Where(ps ...predicate.Group)
- type GroupQuery
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) int
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) ([]int, error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []int
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
- func (gq *GroupQuery) QueryUsers() *UserQuery
- func (gq *GroupQuery) Select(fields ...string) *GroupSelect
- func (gq *GroupQuery) Unique(unique bool) *GroupQuery
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
- type GroupSelect
- func (s *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupSelect) BoolX(ctx context.Context) bool
- func (s *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupSelect) Float64X(ctx context.Context) float64
- func (s *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupSelect) IntX(ctx context.Context) int
- func (s *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupSelect) IntsX(ctx context.Context) []int
- func (gs *GroupSelect) Scan(ctx context.Context, v any) error
- func (s *GroupSelect) ScanX(ctx context.Context, v any)
- func (s *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupSelect) StringX(ctx context.Context) string
- func (s *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupSelect) StringsX(ctx context.Context) []string
- type GroupUpdate
- func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) ClearUsers() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- type Groups
- type Hook
- type MultiWordSchema
- type MultiWordSchemaClient
- func (c *MultiWordSchemaClient) Create() *MultiWordSchemaCreate
- func (c *MultiWordSchemaClient) CreateBulk(builders ...*MultiWordSchemaCreate) *MultiWordSchemaCreateBulk
- func (c *MultiWordSchemaClient) Delete() *MultiWordSchemaDelete
- func (c *MultiWordSchemaClient) DeleteOne(mws *MultiWordSchema) *MultiWordSchemaDeleteOne
- func (c *MultiWordSchemaClient) DeleteOneID(id int) *MultiWordSchemaDeleteOne
- func (c *MultiWordSchemaClient) Get(ctx context.Context, id int) (*MultiWordSchema, error)
- func (c *MultiWordSchemaClient) GetX(ctx context.Context, id int) *MultiWordSchema
- func (c *MultiWordSchemaClient) Hooks() []Hook
- func (c *MultiWordSchemaClient) Query() *MultiWordSchemaQuery
- func (c *MultiWordSchemaClient) Update() *MultiWordSchemaUpdate
- func (c *MultiWordSchemaClient) UpdateOne(mws *MultiWordSchema) *MultiWordSchemaUpdateOne
- func (c *MultiWordSchemaClient) UpdateOneID(id int) *MultiWordSchemaUpdateOne
- func (c *MultiWordSchemaClient) Use(hooks ...Hook)
- type MultiWordSchemaCreate
- func (mwsc *MultiWordSchemaCreate) Exec(ctx context.Context) error
- func (mwsc *MultiWordSchemaCreate) ExecX(ctx context.Context)
- func (mwsc *MultiWordSchemaCreate) Mutation() *MultiWordSchemaMutation
- func (mwsc *MultiWordSchemaCreate) Save(ctx context.Context) (*MultiWordSchema, error)
- func (mwsc *MultiWordSchemaCreate) SaveX(ctx context.Context) *MultiWordSchema
- func (mwsc *MultiWordSchemaCreate) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaCreate
- func (mwsc *MultiWordSchemaCreate) SetUnit(m multiwordschema.Unit) *MultiWordSchemaCreate
- type MultiWordSchemaCreateBulk
- func (mwscb *MultiWordSchemaCreateBulk) Exec(ctx context.Context) error
- func (mwscb *MultiWordSchemaCreateBulk) ExecX(ctx context.Context)
- func (mwscb *MultiWordSchemaCreateBulk) Save(ctx context.Context) ([]*MultiWordSchema, error)
- func (mwscb *MultiWordSchemaCreateBulk) SaveX(ctx context.Context) []*MultiWordSchema
- type MultiWordSchemaDelete
- type MultiWordSchemaDeleteOne
- type MultiWordSchemaGroupBy
- func (mwsgb *MultiWordSchemaGroupBy) Aggregate(fns ...AggregateFunc) *MultiWordSchemaGroupBy
- func (s *MultiWordSchemaGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MultiWordSchemaGroupBy) BoolX(ctx context.Context) bool
- func (s *MultiWordSchemaGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MultiWordSchemaGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MultiWordSchemaGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MultiWordSchemaGroupBy) Float64X(ctx context.Context) float64
- func (s *MultiWordSchemaGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MultiWordSchemaGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MultiWordSchemaGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MultiWordSchemaGroupBy) IntX(ctx context.Context) int
- func (s *MultiWordSchemaGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MultiWordSchemaGroupBy) IntsX(ctx context.Context) []int
- func (mwsgb *MultiWordSchemaGroupBy) Scan(ctx context.Context, v any) error
- func (s *MultiWordSchemaGroupBy) ScanX(ctx context.Context, v any)
- func (s *MultiWordSchemaGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MultiWordSchemaGroupBy) StringX(ctx context.Context) string
- func (s *MultiWordSchemaGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MultiWordSchemaGroupBy) StringsX(ctx context.Context) []string
- type MultiWordSchemaMutation
- func (m *MultiWordSchemaMutation) AddField(name string, value ent.Value) error
- func (m *MultiWordSchemaMutation) AddedEdges() []string
- func (m *MultiWordSchemaMutation) AddedField(name string) (ent.Value, bool)
- func (m *MultiWordSchemaMutation) AddedFields() []string
- func (m *MultiWordSchemaMutation) AddedIDs(name string) []ent.Value
- func (m *MultiWordSchemaMutation) ClearEdge(name string) error
- func (m *MultiWordSchemaMutation) ClearField(name string) error
- func (m *MultiWordSchemaMutation) ClearedEdges() []string
- func (m *MultiWordSchemaMutation) ClearedFields() []string
- func (m MultiWordSchemaMutation) Client() *Client
- func (m *MultiWordSchemaMutation) EdgeCleared(name string) bool
- func (m *MultiWordSchemaMutation) Field(name string) (ent.Value, bool)
- func (m *MultiWordSchemaMutation) FieldCleared(name string) bool
- func (m *MultiWordSchemaMutation) Fields() []string
- func (m *MultiWordSchemaMutation) ID() (id int, exists bool)
- func (m *MultiWordSchemaMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MultiWordSchemaMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MultiWordSchemaMutation) OldUnit(ctx context.Context) (v multiwordschema.Unit, err error)
- func (m *MultiWordSchemaMutation) Op() Op
- func (m *MultiWordSchemaMutation) RemovedEdges() []string
- func (m *MultiWordSchemaMutation) RemovedIDs(name string) []ent.Value
- func (m *MultiWordSchemaMutation) ResetEdge(name string) error
- func (m *MultiWordSchemaMutation) ResetField(name string) error
- func (m *MultiWordSchemaMutation) ResetUnit()
- func (m *MultiWordSchemaMutation) SetField(name string, value ent.Value) error
- func (m *MultiWordSchemaMutation) SetUnit(value multiwordschema.Unit)
- func (m MultiWordSchemaMutation) Tx() (*Tx, error)
- func (m *MultiWordSchemaMutation) Type() string
- func (m *MultiWordSchemaMutation) Unit() (r multiwordschema.Unit, exists bool)
- func (m *MultiWordSchemaMutation) Where(ps ...predicate.MultiWordSchema)
- type MultiWordSchemaQuery
- func (mwsq *MultiWordSchemaQuery) All(ctx context.Context) ([]*MultiWordSchema, error)
- func (mwsq *MultiWordSchemaQuery) AllX(ctx context.Context) []*MultiWordSchema
- func (mwsq *MultiWordSchemaQuery) Clone() *MultiWordSchemaQuery
- func (mwsq *MultiWordSchemaQuery) Count(ctx context.Context) (int, error)
- func (mwsq *MultiWordSchemaQuery) CountX(ctx context.Context) int
- func (mwsq *MultiWordSchemaQuery) Exist(ctx context.Context) (bool, error)
- func (mwsq *MultiWordSchemaQuery) ExistX(ctx context.Context) bool
- func (mwsq *MultiWordSchemaQuery) First(ctx context.Context) (*MultiWordSchema, error)
- func (mwsq *MultiWordSchemaQuery) FirstID(ctx context.Context) (id int, err error)
- func (mwsq *MultiWordSchemaQuery) FirstIDX(ctx context.Context) int
- func (mwsq *MultiWordSchemaQuery) FirstX(ctx context.Context) *MultiWordSchema
- func (mwsq *MultiWordSchemaQuery) GroupBy(field string, fields ...string) *MultiWordSchemaGroupBy
- func (mwsq *MultiWordSchemaQuery) IDs(ctx context.Context) ([]int, error)
- func (mwsq *MultiWordSchemaQuery) IDsX(ctx context.Context) []int
- func (mwsq *MultiWordSchemaQuery) Limit(limit int) *MultiWordSchemaQuery
- func (mwsq *MultiWordSchemaQuery) Offset(offset int) *MultiWordSchemaQuery
- func (mwsq *MultiWordSchemaQuery) Only(ctx context.Context) (*MultiWordSchema, error)
- func (mwsq *MultiWordSchemaQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mwsq *MultiWordSchemaQuery) OnlyIDX(ctx context.Context) int
- func (mwsq *MultiWordSchemaQuery) OnlyX(ctx context.Context) *MultiWordSchema
- func (mwsq *MultiWordSchemaQuery) Order(o ...OrderFunc) *MultiWordSchemaQuery
- func (mwsq *MultiWordSchemaQuery) Select(fields ...string) *MultiWordSchemaSelect
- func (mwsq *MultiWordSchemaQuery) Unique(unique bool) *MultiWordSchemaQuery
- func (mwsq *MultiWordSchemaQuery) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaQuery
- type MultiWordSchemaSelect
- func (s *MultiWordSchemaSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MultiWordSchemaSelect) BoolX(ctx context.Context) bool
- func (s *MultiWordSchemaSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MultiWordSchemaSelect) BoolsX(ctx context.Context) []bool
- func (s *MultiWordSchemaSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MultiWordSchemaSelect) Float64X(ctx context.Context) float64
- func (s *MultiWordSchemaSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MultiWordSchemaSelect) Float64sX(ctx context.Context) []float64
- func (s *MultiWordSchemaSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MultiWordSchemaSelect) IntX(ctx context.Context) int
- func (s *MultiWordSchemaSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MultiWordSchemaSelect) IntsX(ctx context.Context) []int
- func (mwss *MultiWordSchemaSelect) Scan(ctx context.Context, v any) error
- func (s *MultiWordSchemaSelect) ScanX(ctx context.Context, v any)
- func (s *MultiWordSchemaSelect) String(ctx context.Context) (_ string, err error)
- func (s *MultiWordSchemaSelect) StringX(ctx context.Context) string
- func (s *MultiWordSchemaSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MultiWordSchemaSelect) StringsX(ctx context.Context) []string
- type MultiWordSchemaUpdate
- func (mwsu *MultiWordSchemaUpdate) Exec(ctx context.Context) error
- func (mwsu *MultiWordSchemaUpdate) ExecX(ctx context.Context)
- func (mwsu *MultiWordSchemaUpdate) Mutation() *MultiWordSchemaMutation
- func (mwsu *MultiWordSchemaUpdate) Save(ctx context.Context) (int, error)
- func (mwsu *MultiWordSchemaUpdate) SaveX(ctx context.Context) int
- func (mwsu *MultiWordSchemaUpdate) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaUpdate
- func (mwsu *MultiWordSchemaUpdate) SetUnit(m multiwordschema.Unit) *MultiWordSchemaUpdate
- func (mwsu *MultiWordSchemaUpdate) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaUpdate
- type MultiWordSchemaUpdateOne
- func (mwsuo *MultiWordSchemaUpdateOne) Exec(ctx context.Context) error
- func (mwsuo *MultiWordSchemaUpdateOne) ExecX(ctx context.Context)
- func (mwsuo *MultiWordSchemaUpdateOne) Mutation() *MultiWordSchemaMutation
- func (mwsuo *MultiWordSchemaUpdateOne) Save(ctx context.Context) (*MultiWordSchema, error)
- func (mwsuo *MultiWordSchemaUpdateOne) SaveX(ctx context.Context) *MultiWordSchema
- func (mwsuo *MultiWordSchemaUpdateOne) Select(field string, fields ...string) *MultiWordSchemaUpdateOne
- func (mwsuo *MultiWordSchemaUpdateOne) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaUpdateOne
- func (mwsuo *MultiWordSchemaUpdateOne) SetUnit(m multiwordschema.Unit) *MultiWordSchemaUpdateOne
- type MultiWordSchemas
- type MutateFunc
- type Mutation
- type Mutator
- type NilExample
- type NilExampleClient
- func (c *NilExampleClient) Create() *NilExampleCreate
- func (c *NilExampleClient) CreateBulk(builders ...*NilExampleCreate) *NilExampleCreateBulk
- func (c *NilExampleClient) Delete() *NilExampleDelete
- func (c *NilExampleClient) DeleteOne(ne *NilExample) *NilExampleDeleteOne
- func (c *NilExampleClient) DeleteOneID(id int) *NilExampleDeleteOne
- func (c *NilExampleClient) Get(ctx context.Context, id int) (*NilExample, error)
- func (c *NilExampleClient) GetX(ctx context.Context, id int) *NilExample
- func (c *NilExampleClient) Hooks() []Hook
- func (c *NilExampleClient) Query() *NilExampleQuery
- func (c *NilExampleClient) Update() *NilExampleUpdate
- func (c *NilExampleClient) UpdateOne(ne *NilExample) *NilExampleUpdateOne
- func (c *NilExampleClient) UpdateOneID(id int) *NilExampleUpdateOne
- func (c *NilExampleClient) Use(hooks ...Hook)
- type NilExampleCreate
- func (nec *NilExampleCreate) Exec(ctx context.Context) error
- func (nec *NilExampleCreate) ExecX(ctx context.Context)
- func (nec *NilExampleCreate) Mutation() *NilExampleMutation
- func (nec *NilExampleCreate) Save(ctx context.Context) (*NilExample, error)
- func (nec *NilExampleCreate) SaveX(ctx context.Context) *NilExample
- func (nec *NilExampleCreate) SetNillableStrNil(s *string) *NilExampleCreate
- func (nec *NilExampleCreate) SetNillableTimeNil(t *time.Time) *NilExampleCreate
- func (nec *NilExampleCreate) SetStrNil(s string) *NilExampleCreate
- func (nec *NilExampleCreate) SetTimeNil(t time.Time) *NilExampleCreate
- type NilExampleCreateBulk
- type NilExampleDelete
- type NilExampleDeleteOne
- type NilExampleGroupBy
- func (negb *NilExampleGroupBy) Aggregate(fns ...AggregateFunc) *NilExampleGroupBy
- func (s *NilExampleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NilExampleGroupBy) BoolX(ctx context.Context) bool
- func (s *NilExampleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NilExampleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NilExampleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NilExampleGroupBy) Float64X(ctx context.Context) float64
- func (s *NilExampleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NilExampleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NilExampleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NilExampleGroupBy) IntX(ctx context.Context) int
- func (s *NilExampleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NilExampleGroupBy) IntsX(ctx context.Context) []int
- func (negb *NilExampleGroupBy) Scan(ctx context.Context, v any) error
- func (s *NilExampleGroupBy) ScanX(ctx context.Context, v any)
- func (s *NilExampleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NilExampleGroupBy) StringX(ctx context.Context) string
- func (s *NilExampleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NilExampleGroupBy) StringsX(ctx context.Context) []string
- type NilExampleMutation
- func (m *NilExampleMutation) AddField(name string, value ent.Value) error
- func (m *NilExampleMutation) AddedEdges() []string
- func (m *NilExampleMutation) AddedField(name string) (ent.Value, bool)
- func (m *NilExampleMutation) AddedFields() []string
- func (m *NilExampleMutation) AddedIDs(name string) []ent.Value
- func (m *NilExampleMutation) ClearEdge(name string) error
- func (m *NilExampleMutation) ClearField(name string) error
- func (m *NilExampleMutation) ClearStrNil()
- func (m *NilExampleMutation) ClearTimeNil()
- func (m *NilExampleMutation) ClearedEdges() []string
- func (m *NilExampleMutation) ClearedFields() []string
- func (m NilExampleMutation) Client() *Client
- func (m *NilExampleMutation) EdgeCleared(name string) bool
- func (m *NilExampleMutation) Field(name string) (ent.Value, bool)
- func (m *NilExampleMutation) FieldCleared(name string) bool
- func (m *NilExampleMutation) Fields() []string
- func (m *NilExampleMutation) ID() (id int, exists bool)
- func (m *NilExampleMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NilExampleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NilExampleMutation) OldStrNil(ctx context.Context) (v *string, err error)
- func (m *NilExampleMutation) OldTimeNil(ctx context.Context) (v *time.Time, err error)
- func (m *NilExampleMutation) Op() Op
- func (m *NilExampleMutation) RemovedEdges() []string
- func (m *NilExampleMutation) RemovedIDs(name string) []ent.Value
- func (m *NilExampleMutation) ResetEdge(name string) error
- func (m *NilExampleMutation) ResetField(name string) error
- func (m *NilExampleMutation) ResetStrNil()
- func (m *NilExampleMutation) ResetTimeNil()
- func (m *NilExampleMutation) SetField(name string, value ent.Value) error
- func (m *NilExampleMutation) SetStrNil(s string)
- func (m *NilExampleMutation) SetTimeNil(t time.Time)
- func (m *NilExampleMutation) StrNil() (r string, exists bool)
- func (m *NilExampleMutation) StrNilCleared() bool
- func (m *NilExampleMutation) TimeNil() (r time.Time, exists bool)
- func (m *NilExampleMutation) TimeNilCleared() bool
- func (m NilExampleMutation) Tx() (*Tx, error)
- func (m *NilExampleMutation) Type() string
- func (m *NilExampleMutation) Where(ps ...predicate.NilExample)
- type NilExampleQuery
- func (neq *NilExampleQuery) All(ctx context.Context) ([]*NilExample, error)
- func (neq *NilExampleQuery) AllX(ctx context.Context) []*NilExample
- func (neq *NilExampleQuery) Clone() *NilExampleQuery
- func (neq *NilExampleQuery) Count(ctx context.Context) (int, error)
- func (neq *NilExampleQuery) CountX(ctx context.Context) int
- func (neq *NilExampleQuery) Exist(ctx context.Context) (bool, error)
- func (neq *NilExampleQuery) ExistX(ctx context.Context) bool
- func (neq *NilExampleQuery) First(ctx context.Context) (*NilExample, error)
- func (neq *NilExampleQuery) FirstID(ctx context.Context) (id int, err error)
- func (neq *NilExampleQuery) FirstIDX(ctx context.Context) int
- func (neq *NilExampleQuery) FirstX(ctx context.Context) *NilExample
- func (neq *NilExampleQuery) GroupBy(field string, fields ...string) *NilExampleGroupBy
- func (neq *NilExampleQuery) IDs(ctx context.Context) ([]int, error)
- func (neq *NilExampleQuery) IDsX(ctx context.Context) []int
- func (neq *NilExampleQuery) Limit(limit int) *NilExampleQuery
- func (neq *NilExampleQuery) Offset(offset int) *NilExampleQuery
- func (neq *NilExampleQuery) Only(ctx context.Context) (*NilExample, error)
- func (neq *NilExampleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (neq *NilExampleQuery) OnlyIDX(ctx context.Context) int
- func (neq *NilExampleQuery) OnlyX(ctx context.Context) *NilExample
- func (neq *NilExampleQuery) Order(o ...OrderFunc) *NilExampleQuery
- func (neq *NilExampleQuery) Select(fields ...string) *NilExampleSelect
- func (neq *NilExampleQuery) Unique(unique bool) *NilExampleQuery
- func (neq *NilExampleQuery) Where(ps ...predicate.NilExample) *NilExampleQuery
- type NilExampleSelect
- func (s *NilExampleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NilExampleSelect) BoolX(ctx context.Context) bool
- func (s *NilExampleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NilExampleSelect) BoolsX(ctx context.Context) []bool
- func (s *NilExampleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NilExampleSelect) Float64X(ctx context.Context) float64
- func (s *NilExampleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NilExampleSelect) Float64sX(ctx context.Context) []float64
- func (s *NilExampleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NilExampleSelect) IntX(ctx context.Context) int
- func (s *NilExampleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NilExampleSelect) IntsX(ctx context.Context) []int
- func (nes *NilExampleSelect) Scan(ctx context.Context, v any) error
- func (s *NilExampleSelect) ScanX(ctx context.Context, v any)
- func (s *NilExampleSelect) String(ctx context.Context) (_ string, err error)
- func (s *NilExampleSelect) StringX(ctx context.Context) string
- func (s *NilExampleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NilExampleSelect) StringsX(ctx context.Context) []string
- type NilExampleUpdate
- func (neu *NilExampleUpdate) ClearStrNil() *NilExampleUpdate
- func (neu *NilExampleUpdate) ClearTimeNil() *NilExampleUpdate
- func (neu *NilExampleUpdate) Exec(ctx context.Context) error
- func (neu *NilExampleUpdate) ExecX(ctx context.Context)
- func (neu *NilExampleUpdate) Mutation() *NilExampleMutation
- func (neu *NilExampleUpdate) Save(ctx context.Context) (int, error)
- func (neu *NilExampleUpdate) SaveX(ctx context.Context) int
- func (neu *NilExampleUpdate) SetNillableStrNil(s *string) *NilExampleUpdate
- func (neu *NilExampleUpdate) SetNillableTimeNil(t *time.Time) *NilExampleUpdate
- func (neu *NilExampleUpdate) SetStrNil(s string) *NilExampleUpdate
- func (neu *NilExampleUpdate) SetTimeNil(t time.Time) *NilExampleUpdate
- func (neu *NilExampleUpdate) Where(ps ...predicate.NilExample) *NilExampleUpdate
- type NilExampleUpdateOne
- func (neuo *NilExampleUpdateOne) ClearStrNil() *NilExampleUpdateOne
- func (neuo *NilExampleUpdateOne) ClearTimeNil() *NilExampleUpdateOne
- func (neuo *NilExampleUpdateOne) Exec(ctx context.Context) error
- func (neuo *NilExampleUpdateOne) ExecX(ctx context.Context)
- func (neuo *NilExampleUpdateOne) Mutation() *NilExampleMutation
- func (neuo *NilExampleUpdateOne) Save(ctx context.Context) (*NilExample, error)
- func (neuo *NilExampleUpdateOne) SaveX(ctx context.Context) *NilExample
- func (neuo *NilExampleUpdateOne) Select(field string, fields ...string) *NilExampleUpdateOne
- func (neuo *NilExampleUpdateOne) SetNillableStrNil(s *string) *NilExampleUpdateOne
- func (neuo *NilExampleUpdateOne) SetNillableTimeNil(t *time.Time) *NilExampleUpdateOne
- func (neuo *NilExampleUpdateOne) SetStrNil(s string) *NilExampleUpdateOne
- func (neuo *NilExampleUpdateOne) SetTimeNil(t time.Time) *NilExampleUpdateOne
- type NilExamples
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Pet
- type PetClient
- func (c *PetClient) Create() *PetCreate
- func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk
- func (c *PetClient) Delete() *PetDelete
- func (c *PetClient) DeleteOne(pe *Pet) *PetDeleteOne
- func (c *PetClient) DeleteOneID(id int) *PetDeleteOne
- func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error)
- func (c *PetClient) GetX(ctx context.Context, id int) *Pet
- func (c *PetClient) Hooks() []Hook
- func (c *PetClient) Query() *PetQuery
- func (c *PetClient) QueryAttachment(pe *Pet) *AttachmentQuery
- func (c *PetClient) QueryOwner(pe *Pet) *UserQuery
- func (c *PetClient) Update() *PetUpdate
- func (c *PetClient) UpdateOne(pe *Pet) *PetUpdateOne
- func (c *PetClient) UpdateOneID(id int) *PetUpdateOne
- func (c *PetClient) Use(hooks ...Hook)
- type PetCreate
- func (pc *PetCreate) AddAttachment(a ...*Attachment) *PetCreate
- func (pc *PetCreate) AddAttachmentIDs(ids ...uuid.UUID) *PetCreate
- func (pc *PetCreate) Exec(ctx context.Context) error
- func (pc *PetCreate) ExecX(ctx context.Context)
- func (pc *PetCreate) Mutation() *PetMutation
- func (pc *PetCreate) Save(ctx context.Context) (*Pet, error)
- func (pc *PetCreate) SaveX(ctx context.Context) *Pet
- func (pc *PetCreate) SetNillableOwnerID(id *int) *PetCreate
- func (pc *PetCreate) SetOwner(u *User) *PetCreate
- func (pc *PetCreate) SetOwnerID(id int) *PetCreate
- type PetCreateBulk
- type PetDelete
- type PetDeleteOne
- type PetEdges
- type PetGroupBy
- func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy
- func (s *PetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PetGroupBy) BoolX(ctx context.Context) bool
- func (s *PetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PetGroupBy) Float64X(ctx context.Context) float64
- func (s *PetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PetGroupBy) IntX(ctx context.Context) int
- func (s *PetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PetGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PetGroupBy) Scan(ctx context.Context, v any) error
- func (s *PetGroupBy) ScanX(ctx context.Context, v any)
- func (s *PetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PetGroupBy) StringX(ctx context.Context) string
- func (s *PetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PetGroupBy) StringsX(ctx context.Context) []string
- type PetMutation
- func (m *PetMutation) AddAttachmentIDs(ids ...uuid.UUID)
- func (m *PetMutation) AddField(name string, value ent.Value) error
- func (m *PetMutation) AddedEdges() []string
- func (m *PetMutation) AddedField(name string) (ent.Value, bool)
- func (m *PetMutation) AddedFields() []string
- func (m *PetMutation) AddedIDs(name string) []ent.Value
- func (m *PetMutation) AttachmentCleared() bool
- func (m *PetMutation) AttachmentIDs() (ids []uuid.UUID)
- func (m *PetMutation) ClearAttachment()
- func (m *PetMutation) ClearEdge(name string) error
- func (m *PetMutation) ClearField(name string) error
- func (m *PetMutation) ClearOwner()
- func (m *PetMutation) ClearedEdges() []string
- func (m *PetMutation) ClearedFields() []string
- func (m PetMutation) Client() *Client
- func (m *PetMutation) EdgeCleared(name string) bool
- func (m *PetMutation) Field(name string) (ent.Value, bool)
- func (m *PetMutation) FieldCleared(name string) bool
- func (m *PetMutation) Fields() []string
- func (m *PetMutation) ID() (id int, exists bool)
- func (m *PetMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PetMutation) Op() Op
- func (m *PetMutation) OwnerCleared() bool
- func (m *PetMutation) OwnerID() (id int, exists bool)
- func (m *PetMutation) OwnerIDs() (ids []int)
- func (m *PetMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
- func (m *PetMutation) RemovedAttachmentIDs() (ids []uuid.UUID)
- func (m *PetMutation) RemovedEdges() []string
- func (m *PetMutation) RemovedIDs(name string) []ent.Value
- func (m *PetMutation) ResetAttachment()
- func (m *PetMutation) ResetEdge(name string) error
- func (m *PetMutation) ResetField(name string) error
- func (m *PetMutation) ResetOwner()
- func (m *PetMutation) SetField(name string, value ent.Value) error
- func (m *PetMutation) SetOwnerID(id int)
- func (m PetMutation) Tx() (*Tx, error)
- func (m *PetMutation) Type() string
- func (m *PetMutation) Where(ps ...predicate.Pet)
- type PetQuery
- func (pq *PetQuery) All(ctx context.Context) ([]*Pet, error)
- func (pq *PetQuery) AllX(ctx context.Context) []*Pet
- func (pq *PetQuery) Clone() *PetQuery
- func (pq *PetQuery) Count(ctx context.Context) (int, error)
- func (pq *PetQuery) CountX(ctx context.Context) int
- func (pq *PetQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PetQuery) ExistX(ctx context.Context) bool
- func (pq *PetQuery) First(ctx context.Context) (*Pet, error)
- func (pq *PetQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PetQuery) FirstIDX(ctx context.Context) int
- func (pq *PetQuery) FirstX(ctx context.Context) *Pet
- func (pq *PetQuery) GroupBy(field string, fields ...string) *PetGroupBy
- func (pq *PetQuery) IDs(ctx context.Context) ([]int, error)
- func (pq *PetQuery) IDsX(ctx context.Context) []int
- func (pq *PetQuery) Limit(limit int) *PetQuery
- func (pq *PetQuery) Offset(offset int) *PetQuery
- func (pq *PetQuery) Only(ctx context.Context) (*Pet, error)
- func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PetQuery) OnlyIDX(ctx context.Context) int
- func (pq *PetQuery) OnlyX(ctx context.Context) *Pet
- func (pq *PetQuery) Order(o ...OrderFunc) *PetQuery
- func (pq *PetQuery) QueryAttachment() *AttachmentQuery
- func (pq *PetQuery) QueryOwner() *UserQuery
- func (pq *PetQuery) Select(fields ...string) *PetSelect
- func (pq *PetQuery) Unique(unique bool) *PetQuery
- func (pq *PetQuery) Where(ps ...predicate.Pet) *PetQuery
- func (pq *PetQuery) WithAttachment(opts ...func(*AttachmentQuery)) *PetQuery
- func (pq *PetQuery) WithOwner(opts ...func(*UserQuery)) *PetQuery
- type PetSelect
- func (s *PetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PetSelect) BoolX(ctx context.Context) bool
- func (s *PetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PetSelect) BoolsX(ctx context.Context) []bool
- func (s *PetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PetSelect) Float64X(ctx context.Context) float64
- func (s *PetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PetSelect) Float64sX(ctx context.Context) []float64
- func (s *PetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PetSelect) IntX(ctx context.Context) int
- func (s *PetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PetSelect) IntsX(ctx context.Context) []int
- func (ps *PetSelect) Scan(ctx context.Context, v any) error
- func (s *PetSelect) ScanX(ctx context.Context, v any)
- func (s *PetSelect) String(ctx context.Context) (_ string, err error)
- func (s *PetSelect) StringX(ctx context.Context) string
- func (s *PetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PetSelect) StringsX(ctx context.Context) []string
- type PetUpdate
- func (pu *PetUpdate) AddAttachment(a ...*Attachment) *PetUpdate
- func (pu *PetUpdate) AddAttachmentIDs(ids ...uuid.UUID) *PetUpdate
- func (pu *PetUpdate) ClearAttachment() *PetUpdate
- func (pu *PetUpdate) ClearOwner() *PetUpdate
- func (pu *PetUpdate) Exec(ctx context.Context) error
- func (pu *PetUpdate) ExecX(ctx context.Context)
- func (pu *PetUpdate) Mutation() *PetMutation
- func (pu *PetUpdate) RemoveAttachment(a ...*Attachment) *PetUpdate
- func (pu *PetUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *PetUpdate
- func (pu *PetUpdate) Save(ctx context.Context) (int, error)
- func (pu *PetUpdate) SaveX(ctx context.Context) int
- func (pu *PetUpdate) SetNillableOwnerID(id *int) *PetUpdate
- func (pu *PetUpdate) SetOwner(u *User) *PetUpdate
- func (pu *PetUpdate) SetOwnerID(id int) *PetUpdate
- func (pu *PetUpdate) Where(ps ...predicate.Pet) *PetUpdate
- type PetUpdateOne
- func (puo *PetUpdateOne) AddAttachment(a ...*Attachment) *PetUpdateOne
- func (puo *PetUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *PetUpdateOne
- func (puo *PetUpdateOne) ClearAttachment() *PetUpdateOne
- func (puo *PetUpdateOne) ClearOwner() *PetUpdateOne
- func (puo *PetUpdateOne) Exec(ctx context.Context) error
- func (puo *PetUpdateOne) ExecX(ctx context.Context)
- func (puo *PetUpdateOne) Mutation() *PetMutation
- func (puo *PetUpdateOne) RemoveAttachment(a ...*Attachment) *PetUpdateOne
- func (puo *PetUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *PetUpdateOne
- func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error)
- func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet
- func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne
- func (puo *PetUpdateOne) SetNillableOwnerID(id *int) *PetUpdateOne
- func (puo *PetUpdateOne) SetOwner(u *User) *PetUpdateOne
- func (puo *PetUpdateOne) SetOwnerID(id int) *PetUpdateOne
- type Pets
- type Policy
- type Ponies
- type Pony
- type PonyClient
- func (c *PonyClient) Create() *PonyCreate
- func (c *PonyClient) CreateBulk(builders ...*PonyCreate) *PonyCreateBulk
- func (c *PonyClient) Delete() *PonyDelete
- func (c *PonyClient) DeleteOne(po *Pony) *PonyDeleteOne
- func (c *PonyClient) DeleteOneID(id int) *PonyDeleteOne
- func (c *PonyClient) Get(ctx context.Context, id int) (*Pony, error)
- func (c *PonyClient) GetX(ctx context.Context, id int) *Pony
- func (c *PonyClient) Hooks() []Hook
- func (c *PonyClient) Query() *PonyQuery
- func (c *PonyClient) Update() *PonyUpdate
- func (c *PonyClient) UpdateOne(po *Pony) *PonyUpdateOne
- func (c *PonyClient) UpdateOneID(id int) *PonyUpdateOne
- func (c *PonyClient) Use(hooks ...Hook)
- type PonyCreate
- func (pc *PonyCreate) Exec(ctx context.Context) error
- func (pc *PonyCreate) ExecX(ctx context.Context)
- func (pc *PonyCreate) Mutation() *PonyMutation
- func (pc *PonyCreate) Save(ctx context.Context) (*Pony, error)
- func (pc *PonyCreate) SaveX(ctx context.Context) *Pony
- func (pc *PonyCreate) SetName(s string) *PonyCreate
- type PonyCreateBulk
- type PonyDelete
- type PonyDeleteOne
- type PonyGroupBy
- func (pgb *PonyGroupBy) Aggregate(fns ...AggregateFunc) *PonyGroupBy
- func (s *PonyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PonyGroupBy) BoolX(ctx context.Context) bool
- func (s *PonyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PonyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PonyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PonyGroupBy) Float64X(ctx context.Context) float64
- func (s *PonyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PonyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PonyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PonyGroupBy) IntX(ctx context.Context) int
- func (s *PonyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PonyGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PonyGroupBy) Scan(ctx context.Context, v any) error
- func (s *PonyGroupBy) ScanX(ctx context.Context, v any)
- func (s *PonyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PonyGroupBy) StringX(ctx context.Context) string
- func (s *PonyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PonyGroupBy) StringsX(ctx context.Context) []string
- type PonyMutation
- func (m *PonyMutation) AddField(name string, value ent.Value) error
- func (m *PonyMutation) AddedEdges() []string
- func (m *PonyMutation) AddedField(name string) (ent.Value, bool)
- func (m *PonyMutation) AddedFields() []string
- func (m *PonyMutation) AddedIDs(name string) []ent.Value
- func (m *PonyMutation) ClearEdge(name string) error
- func (m *PonyMutation) ClearField(name string) error
- func (m *PonyMutation) ClearedEdges() []string
- func (m *PonyMutation) ClearedFields() []string
- func (m PonyMutation) Client() *Client
- func (m *PonyMutation) EdgeCleared(name string) bool
- func (m *PonyMutation) Field(name string) (ent.Value, bool)
- func (m *PonyMutation) FieldCleared(name string) bool
- func (m *PonyMutation) Fields() []string
- func (m *PonyMutation) ID() (id int, exists bool)
- func (m *PonyMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PonyMutation) Name() (r string, exists bool)
- func (m *PonyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PonyMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PonyMutation) Op() Op
- func (m *PonyMutation) RemovedEdges() []string
- func (m *PonyMutation) RemovedIDs(name string) []ent.Value
- func (m *PonyMutation) ResetEdge(name string) error
- func (m *PonyMutation) ResetField(name string) error
- func (m *PonyMutation) ResetName()
- func (m *PonyMutation) SetField(name string, value ent.Value) error
- func (m *PonyMutation) SetName(s string)
- func (m PonyMutation) Tx() (*Tx, error)
- func (m *PonyMutation) Type() string
- func (m *PonyMutation) Where(ps ...predicate.Pony)
- type PonyQuery
- func (pq *PonyQuery) All(ctx context.Context) ([]*Pony, error)
- func (pq *PonyQuery) AllX(ctx context.Context) []*Pony
- func (pq *PonyQuery) Clone() *PonyQuery
- func (pq *PonyQuery) Count(ctx context.Context) (int, error)
- func (pq *PonyQuery) CountX(ctx context.Context) int
- func (pq *PonyQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PonyQuery) ExistX(ctx context.Context) bool
- func (pq *PonyQuery) First(ctx context.Context) (*Pony, error)
- func (pq *PonyQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PonyQuery) FirstIDX(ctx context.Context) int
- func (pq *PonyQuery) FirstX(ctx context.Context) *Pony
- func (pq *PonyQuery) GroupBy(field string, fields ...string) *PonyGroupBy
- func (pq *PonyQuery) IDs(ctx context.Context) ([]int, error)
- func (pq *PonyQuery) IDsX(ctx context.Context) []int
- func (pq *PonyQuery) Limit(limit int) *PonyQuery
- func (pq *PonyQuery) Offset(offset int) *PonyQuery
- func (pq *PonyQuery) Only(ctx context.Context) (*Pony, error)
- func (pq *PonyQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PonyQuery) OnlyIDX(ctx context.Context) int
- func (pq *PonyQuery) OnlyX(ctx context.Context) *Pony
- func (pq *PonyQuery) Order(o ...OrderFunc) *PonyQuery
- func (pq *PonyQuery) Select(fields ...string) *PonySelect
- func (pq *PonyQuery) Unique(unique bool) *PonyQuery
- func (pq *PonyQuery) Where(ps ...predicate.Pony) *PonyQuery
- type PonySelect
- func (s *PonySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PonySelect) BoolX(ctx context.Context) bool
- func (s *PonySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PonySelect) BoolsX(ctx context.Context) []bool
- func (s *PonySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PonySelect) Float64X(ctx context.Context) float64
- func (s *PonySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PonySelect) Float64sX(ctx context.Context) []float64
- func (s *PonySelect) Int(ctx context.Context) (_ int, err error)
- func (s *PonySelect) IntX(ctx context.Context) int
- func (s *PonySelect) Ints(ctx context.Context) ([]int, error)
- func (s *PonySelect) IntsX(ctx context.Context) []int
- func (ps *PonySelect) Scan(ctx context.Context, v any) error
- func (s *PonySelect) ScanX(ctx context.Context, v any)
- func (s *PonySelect) String(ctx context.Context) (_ string, err error)
- func (s *PonySelect) StringX(ctx context.Context) string
- func (s *PonySelect) Strings(ctx context.Context) ([]string, error)
- func (s *PonySelect) StringsX(ctx context.Context) []string
- type PonyUpdate
- func (pu *PonyUpdate) Exec(ctx context.Context) error
- func (pu *PonyUpdate) ExecX(ctx context.Context)
- func (pu *PonyUpdate) Mutation() *PonyMutation
- func (pu *PonyUpdate) Save(ctx context.Context) (int, error)
- func (pu *PonyUpdate) SaveX(ctx context.Context) int
- func (pu *PonyUpdate) SetName(s string) *PonyUpdate
- func (pu *PonyUpdate) Where(ps ...predicate.Pony) *PonyUpdate
- type PonyUpdateOne
- func (puo *PonyUpdateOne) Exec(ctx context.Context) error
- func (puo *PonyUpdateOne) ExecX(ctx context.Context)
- func (puo *PonyUpdateOne) Mutation() *PonyMutation
- func (puo *PonyUpdateOne) Save(ctx context.Context) (*Pony, error)
- func (puo *PonyUpdateOne) SaveX(ctx context.Context) *Pony
- func (puo *PonyUpdateOne) Select(field string, fields ...string) *PonyUpdateOne
- func (puo *PonyUpdateOne) SetName(s string) *PonyUpdateOne
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type SkipEdgeExample
- type SkipEdgeExampleClient
- func (c *SkipEdgeExampleClient) Create() *SkipEdgeExampleCreate
- func (c *SkipEdgeExampleClient) CreateBulk(builders ...*SkipEdgeExampleCreate) *SkipEdgeExampleCreateBulk
- func (c *SkipEdgeExampleClient) Delete() *SkipEdgeExampleDelete
- func (c *SkipEdgeExampleClient) DeleteOne(see *SkipEdgeExample) *SkipEdgeExampleDeleteOne
- func (c *SkipEdgeExampleClient) DeleteOneID(id int) *SkipEdgeExampleDeleteOne
- func (c *SkipEdgeExampleClient) Get(ctx context.Context, id int) (*SkipEdgeExample, error)
- func (c *SkipEdgeExampleClient) GetX(ctx context.Context, id int) *SkipEdgeExample
- func (c *SkipEdgeExampleClient) Hooks() []Hook
- func (c *SkipEdgeExampleClient) Query() *SkipEdgeExampleQuery
- func (c *SkipEdgeExampleClient) QueryUser(see *SkipEdgeExample) *UserQuery
- func (c *SkipEdgeExampleClient) Update() *SkipEdgeExampleUpdate
- func (c *SkipEdgeExampleClient) UpdateOne(see *SkipEdgeExample) *SkipEdgeExampleUpdateOne
- func (c *SkipEdgeExampleClient) UpdateOneID(id int) *SkipEdgeExampleUpdateOne
- func (c *SkipEdgeExampleClient) Use(hooks ...Hook)
- type SkipEdgeExampleCreate
- func (seec *SkipEdgeExampleCreate) Exec(ctx context.Context) error
- func (seec *SkipEdgeExampleCreate) ExecX(ctx context.Context)
- func (seec *SkipEdgeExampleCreate) Mutation() *SkipEdgeExampleMutation
- func (seec *SkipEdgeExampleCreate) Save(ctx context.Context) (*SkipEdgeExample, error)
- func (seec *SkipEdgeExampleCreate) SaveX(ctx context.Context) *SkipEdgeExample
- func (seec *SkipEdgeExampleCreate) SetNillableUserID(id *int) *SkipEdgeExampleCreate
- func (seec *SkipEdgeExampleCreate) SetUser(u *User) *SkipEdgeExampleCreate
- func (seec *SkipEdgeExampleCreate) SetUserID(id int) *SkipEdgeExampleCreate
- type SkipEdgeExampleCreateBulk
- func (seecb *SkipEdgeExampleCreateBulk) Exec(ctx context.Context) error
- func (seecb *SkipEdgeExampleCreateBulk) ExecX(ctx context.Context)
- func (seecb *SkipEdgeExampleCreateBulk) Save(ctx context.Context) ([]*SkipEdgeExample, error)
- func (seecb *SkipEdgeExampleCreateBulk) SaveX(ctx context.Context) []*SkipEdgeExample
- type SkipEdgeExampleDelete
- type SkipEdgeExampleDeleteOne
- type SkipEdgeExampleEdges
- type SkipEdgeExampleGroupBy
- func (seegb *SkipEdgeExampleGroupBy) Aggregate(fns ...AggregateFunc) *SkipEdgeExampleGroupBy
- func (s *SkipEdgeExampleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SkipEdgeExampleGroupBy) BoolX(ctx context.Context) bool
- func (s *SkipEdgeExampleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SkipEdgeExampleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SkipEdgeExampleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SkipEdgeExampleGroupBy) Float64X(ctx context.Context) float64
- func (s *SkipEdgeExampleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SkipEdgeExampleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SkipEdgeExampleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SkipEdgeExampleGroupBy) IntX(ctx context.Context) int
- func (s *SkipEdgeExampleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SkipEdgeExampleGroupBy) IntsX(ctx context.Context) []int
- func (seegb *SkipEdgeExampleGroupBy) Scan(ctx context.Context, v any) error
- func (s *SkipEdgeExampleGroupBy) ScanX(ctx context.Context, v any)
- func (s *SkipEdgeExampleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SkipEdgeExampleGroupBy) StringX(ctx context.Context) string
- func (s *SkipEdgeExampleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SkipEdgeExampleGroupBy) StringsX(ctx context.Context) []string
- type SkipEdgeExampleMutation
- func (m *SkipEdgeExampleMutation) AddField(name string, value ent.Value) error
- func (m *SkipEdgeExampleMutation) AddedEdges() []string
- func (m *SkipEdgeExampleMutation) AddedField(name string) (ent.Value, bool)
- func (m *SkipEdgeExampleMutation) AddedFields() []string
- func (m *SkipEdgeExampleMutation) AddedIDs(name string) []ent.Value
- func (m *SkipEdgeExampleMutation) ClearEdge(name string) error
- func (m *SkipEdgeExampleMutation) ClearField(name string) error
- func (m *SkipEdgeExampleMutation) ClearUser()
- func (m *SkipEdgeExampleMutation) ClearedEdges() []string
- func (m *SkipEdgeExampleMutation) ClearedFields() []string
- func (m SkipEdgeExampleMutation) Client() *Client
- func (m *SkipEdgeExampleMutation) EdgeCleared(name string) bool
- func (m *SkipEdgeExampleMutation) Field(name string) (ent.Value, bool)
- func (m *SkipEdgeExampleMutation) FieldCleared(name string) bool
- func (m *SkipEdgeExampleMutation) Fields() []string
- func (m *SkipEdgeExampleMutation) ID() (id int, exists bool)
- func (m *SkipEdgeExampleMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SkipEdgeExampleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SkipEdgeExampleMutation) Op() Op
- func (m *SkipEdgeExampleMutation) RemovedEdges() []string
- func (m *SkipEdgeExampleMutation) RemovedIDs(name string) []ent.Value
- func (m *SkipEdgeExampleMutation) ResetEdge(name string) error
- func (m *SkipEdgeExampleMutation) ResetField(name string) error
- func (m *SkipEdgeExampleMutation) ResetUser()
- func (m *SkipEdgeExampleMutation) SetField(name string, value ent.Value) error
- func (m *SkipEdgeExampleMutation) SetUserID(id int)
- func (m SkipEdgeExampleMutation) Tx() (*Tx, error)
- func (m *SkipEdgeExampleMutation) Type() string
- func (m *SkipEdgeExampleMutation) UserCleared() bool
- func (m *SkipEdgeExampleMutation) UserID() (id int, exists bool)
- func (m *SkipEdgeExampleMutation) UserIDs() (ids []int)
- func (m *SkipEdgeExampleMutation) Where(ps ...predicate.SkipEdgeExample)
- type SkipEdgeExampleQuery
- func (seeq *SkipEdgeExampleQuery) All(ctx context.Context) ([]*SkipEdgeExample, error)
- func (seeq *SkipEdgeExampleQuery) AllX(ctx context.Context) []*SkipEdgeExample
- func (seeq *SkipEdgeExampleQuery) Clone() *SkipEdgeExampleQuery
- func (seeq *SkipEdgeExampleQuery) Count(ctx context.Context) (int, error)
- func (seeq *SkipEdgeExampleQuery) CountX(ctx context.Context) int
- func (seeq *SkipEdgeExampleQuery) Exist(ctx context.Context) (bool, error)
- func (seeq *SkipEdgeExampleQuery) ExistX(ctx context.Context) bool
- func (seeq *SkipEdgeExampleQuery) First(ctx context.Context) (*SkipEdgeExample, error)
- func (seeq *SkipEdgeExampleQuery) FirstID(ctx context.Context) (id int, err error)
- func (seeq *SkipEdgeExampleQuery) FirstIDX(ctx context.Context) int
- func (seeq *SkipEdgeExampleQuery) FirstX(ctx context.Context) *SkipEdgeExample
- func (seeq *SkipEdgeExampleQuery) GroupBy(field string, fields ...string) *SkipEdgeExampleGroupBy
- func (seeq *SkipEdgeExampleQuery) IDs(ctx context.Context) ([]int, error)
- func (seeq *SkipEdgeExampleQuery) IDsX(ctx context.Context) []int
- func (seeq *SkipEdgeExampleQuery) Limit(limit int) *SkipEdgeExampleQuery
- func (seeq *SkipEdgeExampleQuery) Offset(offset int) *SkipEdgeExampleQuery
- func (seeq *SkipEdgeExampleQuery) Only(ctx context.Context) (*SkipEdgeExample, error)
- func (seeq *SkipEdgeExampleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (seeq *SkipEdgeExampleQuery) OnlyIDX(ctx context.Context) int
- func (seeq *SkipEdgeExampleQuery) OnlyX(ctx context.Context) *SkipEdgeExample
- func (seeq *SkipEdgeExampleQuery) Order(o ...OrderFunc) *SkipEdgeExampleQuery
- func (seeq *SkipEdgeExampleQuery) QueryUser() *UserQuery
- func (seeq *SkipEdgeExampleQuery) Select(fields ...string) *SkipEdgeExampleSelect
- func (seeq *SkipEdgeExampleQuery) Unique(unique bool) *SkipEdgeExampleQuery
- func (seeq *SkipEdgeExampleQuery) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleQuery
- func (seeq *SkipEdgeExampleQuery) WithUser(opts ...func(*UserQuery)) *SkipEdgeExampleQuery
- type SkipEdgeExampleSelect
- func (s *SkipEdgeExampleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SkipEdgeExampleSelect) BoolX(ctx context.Context) bool
- func (s *SkipEdgeExampleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SkipEdgeExampleSelect) BoolsX(ctx context.Context) []bool
- func (s *SkipEdgeExampleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SkipEdgeExampleSelect) Float64X(ctx context.Context) float64
- func (s *SkipEdgeExampleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SkipEdgeExampleSelect) Float64sX(ctx context.Context) []float64
- func (s *SkipEdgeExampleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SkipEdgeExampleSelect) IntX(ctx context.Context) int
- func (s *SkipEdgeExampleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SkipEdgeExampleSelect) IntsX(ctx context.Context) []int
- func (sees *SkipEdgeExampleSelect) Scan(ctx context.Context, v any) error
- func (s *SkipEdgeExampleSelect) ScanX(ctx context.Context, v any)
- func (s *SkipEdgeExampleSelect) String(ctx context.Context) (_ string, err error)
- func (s *SkipEdgeExampleSelect) StringX(ctx context.Context) string
- func (s *SkipEdgeExampleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SkipEdgeExampleSelect) StringsX(ctx context.Context) []string
- type SkipEdgeExampleUpdate
- func (seeu *SkipEdgeExampleUpdate) ClearUser() *SkipEdgeExampleUpdate
- func (seeu *SkipEdgeExampleUpdate) Exec(ctx context.Context) error
- func (seeu *SkipEdgeExampleUpdate) ExecX(ctx context.Context)
- func (seeu *SkipEdgeExampleUpdate) Mutation() *SkipEdgeExampleMutation
- func (seeu *SkipEdgeExampleUpdate) Save(ctx context.Context) (int, error)
- func (seeu *SkipEdgeExampleUpdate) SaveX(ctx context.Context) int
- func (seeu *SkipEdgeExampleUpdate) SetNillableUserID(id *int) *SkipEdgeExampleUpdate
- func (seeu *SkipEdgeExampleUpdate) SetUser(u *User) *SkipEdgeExampleUpdate
- func (seeu *SkipEdgeExampleUpdate) SetUserID(id int) *SkipEdgeExampleUpdate
- func (seeu *SkipEdgeExampleUpdate) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleUpdate
- type SkipEdgeExampleUpdateOne
- func (seeuo *SkipEdgeExampleUpdateOne) ClearUser() *SkipEdgeExampleUpdateOne
- func (seeuo *SkipEdgeExampleUpdateOne) Exec(ctx context.Context) error
- func (seeuo *SkipEdgeExampleUpdateOne) ExecX(ctx context.Context)
- func (seeuo *SkipEdgeExampleUpdateOne) Mutation() *SkipEdgeExampleMutation
- func (seeuo *SkipEdgeExampleUpdateOne) Save(ctx context.Context) (*SkipEdgeExample, error)
- func (seeuo *SkipEdgeExampleUpdateOne) SaveX(ctx context.Context) *SkipEdgeExample
- func (seeuo *SkipEdgeExampleUpdateOne) Select(field string, fields ...string) *SkipEdgeExampleUpdateOne
- func (seeuo *SkipEdgeExampleUpdateOne) SetNillableUserID(id *int) *SkipEdgeExampleUpdateOne
- func (seeuo *SkipEdgeExampleUpdateOne) SetUser(u *User) *SkipEdgeExampleUpdateOne
- func (seeuo *SkipEdgeExampleUpdateOne) SetUserID(id int) *SkipEdgeExampleUpdateOne
- type SkipEdgeExamples
- type Todo
- type TodoClient
- func (c *TodoClient) Create() *TodoCreate
- func (c *TodoClient) CreateBulk(builders ...*TodoCreate) *TodoCreateBulk
- func (c *TodoClient) Delete() *TodoDelete
- func (c *TodoClient) DeleteOne(t *Todo) *TodoDeleteOne
- func (c *TodoClient) DeleteOneID(id int) *TodoDeleteOne
- func (c *TodoClient) Get(ctx context.Context, id int) (*Todo, error)
- func (c *TodoClient) GetX(ctx context.Context, id int) *Todo
- func (c *TodoClient) Hooks() []Hook
- func (c *TodoClient) Query() *TodoQuery
- func (c *TodoClient) QueryUser(t *Todo) *UserQuery
- func (c *TodoClient) Update() *TodoUpdate
- func (c *TodoClient) UpdateOne(t *Todo) *TodoUpdateOne
- func (c *TodoClient) UpdateOneID(id int) *TodoUpdateOne
- func (c *TodoClient) Use(hooks ...Hook)
- type TodoCreate
- func (tc *TodoCreate) Exec(ctx context.Context) error
- func (tc *TodoCreate) ExecX(ctx context.Context)
- func (tc *TodoCreate) Mutation() *TodoMutation
- func (tc *TodoCreate) Save(ctx context.Context) (*Todo, error)
- func (tc *TodoCreate) SaveX(ctx context.Context) *Todo
- func (tc *TodoCreate) SetNillableStatus(t *todo.Status) *TodoCreate
- func (tc *TodoCreate) SetNillableUserID(id *int) *TodoCreate
- func (tc *TodoCreate) SetStatus(t todo.Status) *TodoCreate
- func (tc *TodoCreate) SetTask(s string) *TodoCreate
- func (tc *TodoCreate) SetUser(u *User) *TodoCreate
- func (tc *TodoCreate) SetUserID(id int) *TodoCreate
- type TodoCreateBulk
- type TodoDelete
- type TodoDeleteOne
- type TodoEdges
- type TodoGroupBy
- func (tgb *TodoGroupBy) Aggregate(fns ...AggregateFunc) *TodoGroupBy
- func (s *TodoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TodoGroupBy) BoolX(ctx context.Context) bool
- func (s *TodoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TodoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TodoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TodoGroupBy) Float64X(ctx context.Context) float64
- func (s *TodoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TodoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TodoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TodoGroupBy) IntX(ctx context.Context) int
- func (s *TodoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TodoGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TodoGroupBy) Scan(ctx context.Context, v any) error
- func (s *TodoGroupBy) ScanX(ctx context.Context, v any)
- func (s *TodoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TodoGroupBy) StringX(ctx context.Context) string
- func (s *TodoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TodoGroupBy) StringsX(ctx context.Context) []string
- type TodoMutation
- func (m *TodoMutation) AddField(name string, value ent.Value) error
- func (m *TodoMutation) AddedEdges() []string
- func (m *TodoMutation) AddedField(name string) (ent.Value, bool)
- func (m *TodoMutation) AddedFields() []string
- func (m *TodoMutation) AddedIDs(name string) []ent.Value
- func (m *TodoMutation) ClearEdge(name string) error
- func (m *TodoMutation) ClearField(name string) error
- func (m *TodoMutation) ClearUser()
- func (m *TodoMutation) ClearedEdges() []string
- func (m *TodoMutation) ClearedFields() []string
- func (m TodoMutation) Client() *Client
- func (m *TodoMutation) EdgeCleared(name string) bool
- func (m *TodoMutation) Field(name string) (ent.Value, bool)
- func (m *TodoMutation) FieldCleared(name string) bool
- func (m *TodoMutation) Fields() []string
- func (m *TodoMutation) ID() (id int, exists bool)
- func (m *TodoMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TodoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TodoMutation) OldStatus(ctx context.Context) (v todo.Status, err error)
- func (m *TodoMutation) OldTask(ctx context.Context) (v string, err error)
- func (m *TodoMutation) Op() Op
- func (m *TodoMutation) RemovedEdges() []string
- func (m *TodoMutation) RemovedIDs(name string) []ent.Value
- func (m *TodoMutation) ResetEdge(name string) error
- func (m *TodoMutation) ResetField(name string) error
- func (m *TodoMutation) ResetStatus()
- func (m *TodoMutation) ResetTask()
- func (m *TodoMutation) ResetUser()
- func (m *TodoMutation) SetField(name string, value ent.Value) error
- func (m *TodoMutation) SetStatus(t todo.Status)
- func (m *TodoMutation) SetTask(s string)
- func (m *TodoMutation) SetUserID(id int)
- func (m *TodoMutation) Status() (r todo.Status, exists bool)
- func (m *TodoMutation) Task() (r string, exists bool)
- func (m TodoMutation) Tx() (*Tx, error)
- func (m *TodoMutation) Type() string
- func (m *TodoMutation) UserCleared() bool
- func (m *TodoMutation) UserID() (id int, exists bool)
- func (m *TodoMutation) UserIDs() (ids []int)
- func (m *TodoMutation) Where(ps ...predicate.Todo)
- type TodoQuery
- func (tq *TodoQuery) All(ctx context.Context) ([]*Todo, error)
- func (tq *TodoQuery) AllX(ctx context.Context) []*Todo
- func (tq *TodoQuery) Clone() *TodoQuery
- func (tq *TodoQuery) Count(ctx context.Context) (int, error)
- func (tq *TodoQuery) CountX(ctx context.Context) int
- func (tq *TodoQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TodoQuery) ExistX(ctx context.Context) bool
- func (tq *TodoQuery) First(ctx context.Context) (*Todo, error)
- func (tq *TodoQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TodoQuery) FirstIDX(ctx context.Context) int
- func (tq *TodoQuery) FirstX(ctx context.Context) *Todo
- func (tq *TodoQuery) GroupBy(field string, fields ...string) *TodoGroupBy
- func (tq *TodoQuery) IDs(ctx context.Context) ([]int, error)
- func (tq *TodoQuery) IDsX(ctx context.Context) []int
- func (tq *TodoQuery) Limit(limit int) *TodoQuery
- func (tq *TodoQuery) Offset(offset int) *TodoQuery
- func (tq *TodoQuery) Only(ctx context.Context) (*Todo, error)
- func (tq *TodoQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TodoQuery) OnlyIDX(ctx context.Context) int
- func (tq *TodoQuery) OnlyX(ctx context.Context) *Todo
- func (tq *TodoQuery) Order(o ...OrderFunc) *TodoQuery
- func (tq *TodoQuery) QueryUser() *UserQuery
- func (tq *TodoQuery) Select(fields ...string) *TodoSelect
- func (tq *TodoQuery) Unique(unique bool) *TodoQuery
- func (tq *TodoQuery) Where(ps ...predicate.Todo) *TodoQuery
- func (tq *TodoQuery) WithUser(opts ...func(*UserQuery)) *TodoQuery
- type TodoSelect
- func (s *TodoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TodoSelect) BoolX(ctx context.Context) bool
- func (s *TodoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TodoSelect) BoolsX(ctx context.Context) []bool
- func (s *TodoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TodoSelect) Float64X(ctx context.Context) float64
- func (s *TodoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TodoSelect) Float64sX(ctx context.Context) []float64
- func (s *TodoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TodoSelect) IntX(ctx context.Context) int
- func (s *TodoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TodoSelect) IntsX(ctx context.Context) []int
- func (ts *TodoSelect) Scan(ctx context.Context, v any) error
- func (s *TodoSelect) ScanX(ctx context.Context, v any)
- func (s *TodoSelect) String(ctx context.Context) (_ string, err error)
- func (s *TodoSelect) StringX(ctx context.Context) string
- func (s *TodoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TodoSelect) StringsX(ctx context.Context) []string
- type TodoUpdate
- func (tu *TodoUpdate) ClearUser() *TodoUpdate
- func (tu *TodoUpdate) Exec(ctx context.Context) error
- func (tu *TodoUpdate) ExecX(ctx context.Context)
- func (tu *TodoUpdate) Mutation() *TodoMutation
- func (tu *TodoUpdate) Save(ctx context.Context) (int, error)
- func (tu *TodoUpdate) SaveX(ctx context.Context) int
- func (tu *TodoUpdate) SetNillableStatus(t *todo.Status) *TodoUpdate
- func (tu *TodoUpdate) SetNillableUserID(id *int) *TodoUpdate
- func (tu *TodoUpdate) SetStatus(t todo.Status) *TodoUpdate
- func (tu *TodoUpdate) SetTask(s string) *TodoUpdate
- func (tu *TodoUpdate) SetUser(u *User) *TodoUpdate
- func (tu *TodoUpdate) SetUserID(id int) *TodoUpdate
- func (tu *TodoUpdate) Where(ps ...predicate.Todo) *TodoUpdate
- type TodoUpdateOne
- func (tuo *TodoUpdateOne) ClearUser() *TodoUpdateOne
- func (tuo *TodoUpdateOne) Exec(ctx context.Context) error
- func (tuo *TodoUpdateOne) ExecX(ctx context.Context)
- func (tuo *TodoUpdateOne) Mutation() *TodoMutation
- func (tuo *TodoUpdateOne) Save(ctx context.Context) (*Todo, error)
- func (tuo *TodoUpdateOne) SaveX(ctx context.Context) *Todo
- func (tuo *TodoUpdateOne) Select(field string, fields ...string) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetNillableStatus(t *todo.Status) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetNillableUserID(id *int) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetStatus(t todo.Status) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetTask(s string) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetUser(u *User) *TodoUpdateOne
- func (tuo *TodoUpdateOne) SetUserID(id int) *TodoUpdateOne
- type Todos
- type Tx
- type User
- func (u *User) QueryAttachment() *AttachmentQuery
- func (u *User) QueryGroup() *GroupQuery
- func (u *User) QueryPet() *PetQuery
- func (u *User) QueryReceived1() *AttachmentQuery
- func (u *User) QuerySkipEdge() *SkipEdgeExampleQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryAttachment(u *User) *AttachmentQuery
- func (c *UserClient) QueryGroup(u *User) *GroupQuery
- func (c *UserClient) QueryPet(u *User) *PetQuery
- func (c *UserClient) QueryReceived1(u *User) *AttachmentQuery
- func (c *UserClient) QuerySkipEdge(u *User) *SkipEdgeExampleQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddReceived1(a ...*Attachment) *UserCreate
- func (uc *UserCreate) AddReceived1IDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAccountBalance(f float64) *UserCreate
- func (uc *UserCreate) SetAttachment(a *Attachment) *UserCreate
- func (uc *UserCreate) SetAttachmentID(id uuid.UUID) *UserCreate
- func (uc *UserCreate) SetBUser1(i int) *UserCreate
- func (uc *UserCreate) SetBanned(b bool) *UserCreate
- func (uc *UserCreate) SetBigInt(si schema.BigInt) *UserCreate
- func (uc *UserCreate) SetCrmID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetCustomPb(u uint8) *UserCreate
- func (uc *UserCreate) SetDeviceType(ut user.DeviceType) *UserCreate
- func (uc *UserCreate) SetExp(u uint64) *UserCreate
- func (uc *UserCreate) SetExternalID(i int) *UserCreate
- func (uc *UserCreate) SetGroup(g *Group) *UserCreate
- func (uc *UserCreate) SetGroupID(id int) *UserCreate
- func (uc *UserCreate) SetHeightInCm(f float32) *UserCreate
- func (uc *UserCreate) SetJoined(t time.Time) *UserCreate
- func (uc *UserCreate) SetLabels(s []string) *UserCreate
- func (uc *UserCreate) SetNillableAccountBalance(f *float64) *UserCreate
- func (uc *UserCreate) SetNillableAttachmentID(id *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableBUser1(i *int) *UserCreate
- func (uc *UserCreate) SetNillableBanned(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableBigInt(si *schema.BigInt) *UserCreate
- func (uc *UserCreate) SetNillableDeviceType(ut *user.DeviceType) *UserCreate
- func (uc *UserCreate) SetNillableGroupID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableHeightInCm(f *float32) *UserCreate
- func (uc *UserCreate) SetNillableOptBool(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableOptNum(i *int) *UserCreate
- func (uc *UserCreate) SetNillableOptStr(s *string) *UserCreate
- func (uc *UserCreate) SetNillablePetID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableSkipEdgeID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableType(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUnnecessary(s *string) *UserCreate
- func (uc *UserCreate) SetOptBool(b bool) *UserCreate
- func (uc *UserCreate) SetOptNum(i int) *UserCreate
- func (uc *UserCreate) SetOptStr(s string) *UserCreate
- func (uc *UserCreate) SetPet(p *Pet) *UserCreate
- func (uc *UserCreate) SetPetID(id int) *UserCreate
- func (uc *UserCreate) SetPoints(u uint) *UserCreate
- func (uc *UserCreate) SetSkipEdge(s *SkipEdgeExample) *UserCreate
- func (uc *UserCreate) SetSkipEdgeID(id int) *UserCreate
- func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
- func (uc *UserCreate) SetType(s string) *UserCreate
- func (uc *UserCreate) SetUnnecessary(s string) *UserCreate
- func (uc *UserCreate) SetUserName(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AccountBalance() (r float64, exists bool)
- func (m *UserMutation) AddAccountBalance(f float64)
- func (m *UserMutation) AddBUser1(i int)
- func (m *UserMutation) AddCustomPb(u int8)
- func (m *UserMutation) AddExp(u int64)
- func (m *UserMutation) AddExternalID(i int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddHeightInCm(f float32)
- func (m *UserMutation) AddOptNum(i int)
- func (m *UserMutation) AddPoints(u int)
- func (m *UserMutation) AddReceived1IDs(ids ...uuid.UUID)
- func (m *UserMutation) AddedAccountBalance() (r float64, exists bool)
- func (m *UserMutation) AddedBUser1() (r int, exists bool)
- func (m *UserMutation) AddedCustomPb() (r int8, exists bool)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedExp() (r int64, exists bool)
- func (m *UserMutation) AddedExternalID() (r int, exists bool)
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedHeightInCm() (r float32, exists bool)
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedOptNum() (r int, exists bool)
- func (m *UserMutation) AddedPoints() (r int, exists bool)
- func (m *UserMutation) AppendLabels(s []string)
- func (m *UserMutation) AppendedLabels() ([]string, bool)
- func (m *UserMutation) AttachmentCleared() bool
- func (m *UserMutation) AttachmentID() (id uuid.UUID, exists bool)
- func (m *UserMutation) AttachmentIDs() (ids []uuid.UUID)
- func (m *UserMutation) BUser1() (r int, exists bool)
- func (m *UserMutation) BUser1Cleared() bool
- func (m *UserMutation) Banned() (r bool, exists bool)
- func (m *UserMutation) BigInt() (r schema.BigInt, exists bool)
- func (m *UserMutation) BigIntCleared() bool
- func (m *UserMutation) ClearAttachment()
- func (m *UserMutation) ClearBUser1()
- func (m *UserMutation) ClearBigInt()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearGroup()
- func (m *UserMutation) ClearLabels()
- func (m *UserMutation) ClearOptBool()
- func (m *UserMutation) ClearOptNum()
- func (m *UserMutation) ClearOptStr()
- func (m *UserMutation) ClearPet()
- func (m *UserMutation) ClearReceived1()
- func (m *UserMutation) ClearSkipEdge()
- func (m *UserMutation) ClearType()
- func (m *UserMutation) ClearUnnecessary()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CrmID() (r uuid.UUID, exists bool)
- func (m *UserMutation) CustomPb() (r uint8, exists bool)
- func (m *UserMutation) DeviceType() (r user.DeviceType, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Exp() (r uint64, exists bool)
- func (m *UserMutation) ExternalID() (r int, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) GetType() (r string, exists bool)
- func (m *UserMutation) GroupCleared() bool
- func (m *UserMutation) GroupID() (id int, exists bool)
- func (m *UserMutation) GroupIDs() (ids []int)
- func (m *UserMutation) HeightInCm() (r float32, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) Joined() (r time.Time, exists bool)
- func (m *UserMutation) Labels() (r []string, exists bool)
- func (m *UserMutation) LabelsCleared() bool
- func (m *UserMutation) OldAccountBalance(ctx context.Context) (v float64, err error)
- func (m *UserMutation) OldBUser1(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldBanned(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldBigInt(ctx context.Context) (v schema.BigInt, err error)
- func (m *UserMutation) OldCrmID(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserMutation) OldCustomPb(ctx context.Context) (v uint8, err error)
- func (m *UserMutation) OldDeviceType(ctx context.Context) (v user.DeviceType, err error)
- func (m *UserMutation) OldExp(ctx context.Context) (v uint64, err error)
- func (m *UserMutation) OldExternalID(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldHeightInCm(ctx context.Context) (v float32, err error)
- func (m *UserMutation) OldJoined(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldLabels(ctx context.Context) (v []string, err error)
- func (m *UserMutation) OldOptBool(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldOptNum(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldOptStr(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPoints(ctx context.Context) (v uint, err error)
- func (m *UserMutation) OldStatus(ctx context.Context) (v user.Status, err error)
- func (m *UserMutation) OldType(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUnnecessary(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) OptBool() (r bool, exists bool)
- func (m *UserMutation) OptBoolCleared() bool
- func (m *UserMutation) OptNum() (r int, exists bool)
- func (m *UserMutation) OptNumCleared() bool
- func (m *UserMutation) OptStr() (r string, exists bool)
- func (m *UserMutation) OptStrCleared() bool
- func (m *UserMutation) PetCleared() bool
- func (m *UserMutation) PetID() (id int, exists bool)
- func (m *UserMutation) PetIDs() (ids []int)
- func (m *UserMutation) Points() (r uint, exists bool)
- func (m *UserMutation) Received1Cleared() bool
- func (m *UserMutation) Received1IDs() (ids []uuid.UUID)
- func (m *UserMutation) RemoveReceived1IDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedReceived1IDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetAccountBalance()
- func (m *UserMutation) ResetAttachment()
- func (m *UserMutation) ResetBUser1()
- func (m *UserMutation) ResetBanned()
- func (m *UserMutation) ResetBigInt()
- func (m *UserMutation) ResetCrmID()
- func (m *UserMutation) ResetCustomPb()
- func (m *UserMutation) ResetDeviceType()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetExp()
- func (m *UserMutation) ResetExternalID()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGroup()
- func (m *UserMutation) ResetHeightInCm()
- func (m *UserMutation) ResetJoined()
- func (m *UserMutation) ResetLabels()
- func (m *UserMutation) ResetOptBool()
- func (m *UserMutation) ResetOptNum()
- func (m *UserMutation) ResetOptStr()
- func (m *UserMutation) ResetPet()
- func (m *UserMutation) ResetPoints()
- func (m *UserMutation) ResetReceived1()
- func (m *UserMutation) ResetSkipEdge()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetType()
- func (m *UserMutation) ResetUnnecessary()
- func (m *UserMutation) ResetUserName()
- func (m *UserMutation) SetAccountBalance(f float64)
- func (m *UserMutation) SetAttachmentID(id uuid.UUID)
- func (m *UserMutation) SetBUser1(i int)
- func (m *UserMutation) SetBanned(b bool)
- func (m *UserMutation) SetBigInt(si schema.BigInt)
- func (m *UserMutation) SetCrmID(u uuid.UUID)
- func (m *UserMutation) SetCustomPb(u uint8)
- func (m *UserMutation) SetDeviceType(ut user.DeviceType)
- func (m *UserMutation) SetExp(u uint64)
- func (m *UserMutation) SetExternalID(i int)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGroupID(id int)
- func (m *UserMutation) SetHeightInCm(f float32)
- func (m *UserMutation) SetJoined(t time.Time)
- func (m *UserMutation) SetLabels(s []string)
- func (m *UserMutation) SetOptBool(b bool)
- func (m *UserMutation) SetOptNum(i int)
- func (m *UserMutation) SetOptStr(s string)
- func (m *UserMutation) SetPetID(id int)
- func (m *UserMutation) SetPoints(u uint)
- func (m *UserMutation) SetSkipEdgeID(id int)
- func (m *UserMutation) SetStatus(u user.Status)
- func (m *UserMutation) SetType(s string)
- func (m *UserMutation) SetUnnecessary(s string)
- func (m *UserMutation) SetUserName(s string)
- func (m *UserMutation) SkipEdgeCleared() bool
- func (m *UserMutation) SkipEdgeID() (id int, exists bool)
- func (m *UserMutation) SkipEdgeIDs() (ids []int)
- func (m *UserMutation) Status() (r user.Status, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) TypeCleared() bool
- func (m *UserMutation) Unnecessary() (r string, exists bool)
- func (m *UserMutation) UnnecessaryCleared() bool
- func (m *UserMutation) UserName() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryAttachment() *AttachmentQuery
- func (uq *UserQuery) QueryGroup() *GroupQuery
- func (uq *UserQuery) QueryPet() *PetQuery
- func (uq *UserQuery) QueryReceived1() *AttachmentQuery
- func (uq *UserQuery) QuerySkipEdge() *SkipEdgeExampleQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithAttachment(opts ...func(*AttachmentQuery)) *UserQuery
- func (uq *UserQuery) WithGroup(opts ...func(*GroupQuery)) *UserQuery
- func (uq *UserQuery) WithPet(opts ...func(*PetQuery)) *UserQuery
- func (uq *UserQuery) WithReceived1(opts ...func(*AttachmentQuery)) *UserQuery
- func (uq *UserQuery) WithSkipEdge(opts ...func(*SkipEdgeExampleQuery)) *UserQuery
- type UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddAccountBalance(f float64) *UserUpdate
- func (uu *UserUpdate) AddBUser1(i int) *UserUpdate
- func (uu *UserUpdate) AddCustomPb(u int8) *UserUpdate
- func (uu *UserUpdate) AddExp(u int64) *UserUpdate
- func (uu *UserUpdate) AddExternalID(i int) *UserUpdate
- func (uu *UserUpdate) AddHeightInCm(f float32) *UserUpdate
- func (uu *UserUpdate) AddOptNum(i int) *UserUpdate
- func (uu *UserUpdate) AddPoints(u int) *UserUpdate
- func (uu *UserUpdate) AddReceived1(a ...*Attachment) *UserUpdate
- func (uu *UserUpdate) AddReceived1IDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AppendLabels(s []string) *UserUpdate
- func (uu *UserUpdate) ClearAttachment() *UserUpdate
- func (uu *UserUpdate) ClearBUser1() *UserUpdate
- func (uu *UserUpdate) ClearBigInt() *UserUpdate
- func (uu *UserUpdate) ClearGroup() *UserUpdate
- func (uu *UserUpdate) ClearLabels() *UserUpdate
- func (uu *UserUpdate) ClearOptBool() *UserUpdate
- func (uu *UserUpdate) ClearOptNum() *UserUpdate
- func (uu *UserUpdate) ClearOptStr() *UserUpdate
- func (uu *UserUpdate) ClearPet() *UserUpdate
- func (uu *UserUpdate) ClearReceived1() *UserUpdate
- func (uu *UserUpdate) ClearSkipEdge() *UserUpdate
- func (uu *UserUpdate) ClearType() *UserUpdate
- func (uu *UserUpdate) ClearUnnecessary() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveReceived1(a ...*Attachment) *UserUpdate
- func (uu *UserUpdate) RemoveReceived1IDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAccountBalance(f float64) *UserUpdate
- func (uu *UserUpdate) SetAttachment(a *Attachment) *UserUpdate
- func (uu *UserUpdate) SetAttachmentID(id uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetBUser1(i int) *UserUpdate
- func (uu *UserUpdate) SetBanned(b bool) *UserUpdate
- func (uu *UserUpdate) SetBigInt(si schema.BigInt) *UserUpdate
- func (uu *UserUpdate) SetCrmID(u uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetCustomPb(u uint8) *UserUpdate
- func (uu *UserUpdate) SetDeviceType(ut user.DeviceType) *UserUpdate
- func (uu *UserUpdate) SetExp(u uint64) *UserUpdate
- func (uu *UserUpdate) SetExternalID(i int) *UserUpdate
- func (uu *UserUpdate) SetGroup(g *Group) *UserUpdate
- func (uu *UserUpdate) SetGroupID(id int) *UserUpdate
- func (uu *UserUpdate) SetHeightInCm(f float32) *UserUpdate
- func (uu *UserUpdate) SetLabels(s []string) *UserUpdate
- func (uu *UserUpdate) SetNillableAccountBalance(f *float64) *UserUpdate
- func (uu *UserUpdate) SetNillableAttachmentID(id *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetNillableBUser1(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableBanned(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableBigInt(si *schema.BigInt) *UserUpdate
- func (uu *UserUpdate) SetNillableDeviceType(ut *user.DeviceType) *UserUpdate
- func (uu *UserUpdate) SetNillableGroupID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillableHeightInCm(f *float32) *UserUpdate
- func (uu *UserUpdate) SetNillableOptBool(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableOptNum(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillableOptStr(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePetID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillableSkipEdgeID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillableType(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUnnecessary(s *string) *UserUpdate
- func (uu *UserUpdate) SetOptBool(b bool) *UserUpdate
- func (uu *UserUpdate) SetOptNum(i int) *UserUpdate
- func (uu *UserUpdate) SetOptStr(s string) *UserUpdate
- func (uu *UserUpdate) SetPet(p *Pet) *UserUpdate
- func (uu *UserUpdate) SetPetID(id int) *UserUpdate
- func (uu *UserUpdate) SetPoints(u uint) *UserUpdate
- func (uu *UserUpdate) SetSkipEdge(s *SkipEdgeExample) *UserUpdate
- func (uu *UserUpdate) SetSkipEdgeID(id int) *UserUpdate
- func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
- func (uu *UserUpdate) SetType(s string) *UserUpdate
- func (uu *UserUpdate) SetUnnecessary(s string) *UserUpdate
- func (uu *UserUpdate) SetUserName(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAccountBalance(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddBUser1(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCustomPb(u int8) *UserUpdateOne
- func (uuo *UserUpdateOne) AddExp(u int64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddExternalID(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddHeightInCm(f float32) *UserUpdateOne
- func (uuo *UserUpdateOne) AddOptNum(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPoints(u int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReceived1(a ...*Attachment) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReceived1IDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AppendLabels(s []string) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAttachment() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBUser1() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBigInt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroup() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLabels() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOptBool() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOptNum() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOptStr() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPet() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearReceived1() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSkipEdge() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearType() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUnnecessary() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveReceived1(a ...*Attachment) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveReceived1IDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAccountBalance(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAttachment(a *Attachment) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAttachmentID(id uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBUser1(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBanned(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBigInt(si schema.BigInt) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCrmID(u uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCustomPb(u uint8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeviceType(ut user.DeviceType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetExp(u uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetExternalID(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGroup(g *Group) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGroupID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetHeightInCm(f float32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLabels(s []string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAccountBalance(f *float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAttachmentID(id *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBUser1(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBanned(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBigInt(si *schema.BigInt) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeviceType(ut *user.DeviceType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableGroupID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableHeightInCm(f *float32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOptBool(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOptNum(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOptStr(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePetID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSkipEdgeID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableType(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUnnecessary(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOptBool(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOptNum(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOptStr(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPet(p *Pet) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPetID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPoints(u uint) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSkipEdge(s *SkipEdgeExample) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSkipEdgeID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetType(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUnnecessary(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAttachment = "Attachment" TypeGroup = "Group" TypeMultiWordSchema = "MultiWordSchema" TypeNilExample = "NilExample" TypePet = "Pet" TypePony = "Pony" TypeSkipEdgeExample = "SkipEdgeExample" TypeTodo = "Todo" TypeUser = "User" )
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 Attachment ¶
type Attachment struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AttachmentQuery when eager-loading is set. Edges AttachmentEdges `json:"edges"` // contains filtered or unexported fields }
Attachment is the model entity for the Attachment schema.
func (*Attachment) QueryRecipients ¶
func (a *Attachment) QueryRecipients() *UserQuery
QueryRecipients queries the "recipients" edge of the Attachment entity.
func (*Attachment) QueryUser ¶
func (a *Attachment) QueryUser() *UserQuery
QueryUser queries the "user" edge of the Attachment entity.
func (*Attachment) String ¶
func (a *Attachment) String() string
String implements the fmt.Stringer.
func (*Attachment) Unwrap ¶
func (a *Attachment) Unwrap() *Attachment
Unwrap unwraps the Attachment 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 (*Attachment) Update ¶
func (a *Attachment) Update() *AttachmentUpdateOne
Update returns a builder for updating this Attachment. Note that you need to call Attachment.Unwrap() before calling this method if this Attachment was returned from a transaction, and the transaction was committed or rolled back.
type AttachmentClient ¶
type AttachmentClient struct {
// contains filtered or unexported fields
}
AttachmentClient is a client for the Attachment schema.
func NewAttachmentClient ¶
func NewAttachmentClient(c config) *AttachmentClient
NewAttachmentClient returns a client for the Attachment from the given config.
func (*AttachmentClient) Create ¶
func (c *AttachmentClient) Create() *AttachmentCreate
Create returns a builder for creating a Attachment entity.
func (*AttachmentClient) CreateBulk ¶
func (c *AttachmentClient) CreateBulk(builders ...*AttachmentCreate) *AttachmentCreateBulk
CreateBulk returns a builder for creating a bulk of Attachment entities.
func (*AttachmentClient) Delete ¶
func (c *AttachmentClient) Delete() *AttachmentDelete
Delete returns a delete builder for Attachment.
func (*AttachmentClient) DeleteOne ¶
func (c *AttachmentClient) DeleteOne(a *Attachment) *AttachmentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AttachmentClient) DeleteOneID ¶
func (c *AttachmentClient) DeleteOneID(id uuid.UUID) *AttachmentDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*AttachmentClient) Get ¶
func (c *AttachmentClient) Get(ctx context.Context, id uuid.UUID) (*Attachment, error)
Get returns a Attachment entity by its id.
func (*AttachmentClient) GetX ¶
func (c *AttachmentClient) GetX(ctx context.Context, id uuid.UUID) *Attachment
GetX is like Get, but panics if an error occurs.
func (*AttachmentClient) Hooks ¶
func (c *AttachmentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AttachmentClient) Query ¶
func (c *AttachmentClient) Query() *AttachmentQuery
Query returns a query builder for Attachment.
func (*AttachmentClient) QueryRecipients ¶
func (c *AttachmentClient) QueryRecipients(a *Attachment) *UserQuery
QueryRecipients queries the recipients edge of a Attachment.
func (*AttachmentClient) QueryUser ¶
func (c *AttachmentClient) QueryUser(a *Attachment) *UserQuery
QueryUser queries the user edge of a Attachment.
func (*AttachmentClient) Update ¶
func (c *AttachmentClient) Update() *AttachmentUpdate
Update returns an update builder for Attachment.
func (*AttachmentClient) UpdateOne ¶
func (c *AttachmentClient) UpdateOne(a *Attachment) *AttachmentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AttachmentClient) UpdateOneID ¶
func (c *AttachmentClient) UpdateOneID(id uuid.UUID) *AttachmentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AttachmentClient) Use ¶
func (c *AttachmentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `attachment.Hooks(f(g(h())))`.
type AttachmentCreate ¶
type AttachmentCreate struct {
// contains filtered or unexported fields
}
AttachmentCreate is the builder for creating a Attachment entity.
func (*AttachmentCreate) AddRecipientIDs ¶
func (ac *AttachmentCreate) AddRecipientIDs(ids ...int) *AttachmentCreate
AddRecipientIDs adds the "recipients" edge to the User entity by IDs.
func (*AttachmentCreate) AddRecipients ¶
func (ac *AttachmentCreate) AddRecipients(u ...*User) *AttachmentCreate
AddRecipients adds the "recipients" edges to the User entity.
func (*AttachmentCreate) Exec ¶ added in v0.2.0
func (ac *AttachmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreate) ExecX ¶ added in v0.2.0
func (ac *AttachmentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentCreate) Mutation ¶
func (ac *AttachmentCreate) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentCreate) Save ¶
func (ac *AttachmentCreate) Save(ctx context.Context) (*Attachment, error)
Save creates the Attachment in the database.
func (*AttachmentCreate) SaveX ¶
func (ac *AttachmentCreate) SaveX(ctx context.Context) *Attachment
SaveX calls Save and panics if Save returns an error.
func (*AttachmentCreate) SetID ¶
func (ac *AttachmentCreate) SetID(u uuid.UUID) *AttachmentCreate
SetID sets the "id" field.
func (*AttachmentCreate) SetNillableID ¶ added in v0.3.0
func (ac *AttachmentCreate) SetNillableID(u *uuid.UUID) *AttachmentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AttachmentCreate) SetNillableUserID ¶
func (ac *AttachmentCreate) SetNillableUserID(id *int) *AttachmentCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AttachmentCreate) SetUser ¶
func (ac *AttachmentCreate) SetUser(u *User) *AttachmentCreate
SetUser sets the "user" edge to the User entity.
func (*AttachmentCreate) SetUserID ¶
func (ac *AttachmentCreate) SetUserID(id int) *AttachmentCreate
SetUserID sets the "user" edge to the User entity by ID.
type AttachmentCreateBulk ¶
type AttachmentCreateBulk struct {
// contains filtered or unexported fields
}
AttachmentCreateBulk is the builder for creating many Attachment entities in bulk.
func (*AttachmentCreateBulk) Exec ¶ added in v0.2.0
func (acb *AttachmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreateBulk) ExecX ¶ added in v0.2.0
func (acb *AttachmentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentCreateBulk) Save ¶
func (acb *AttachmentCreateBulk) Save(ctx context.Context) ([]*Attachment, error)
Save creates the Attachment entities in the database.
func (*AttachmentCreateBulk) SaveX ¶
func (acb *AttachmentCreateBulk) SaveX(ctx context.Context) []*Attachment
SaveX is like Save, but panics if an error occurs.
type AttachmentDelete ¶
type AttachmentDelete struct {
// contains filtered or unexported fields
}
AttachmentDelete is the builder for deleting a Attachment entity.
func (*AttachmentDelete) Exec ¶
func (ad *AttachmentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AttachmentDelete) ExecX ¶
func (ad *AttachmentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentDelete) Where ¶
func (ad *AttachmentDelete) Where(ps ...predicate.Attachment) *AttachmentDelete
Where appends a list predicates to the AttachmentDelete builder.
type AttachmentDeleteOne ¶
type AttachmentDeleteOne struct {
// contains filtered or unexported fields
}
AttachmentDeleteOne is the builder for deleting a single Attachment entity.
func (*AttachmentDeleteOne) Exec ¶
func (ado *AttachmentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AttachmentDeleteOne) ExecX ¶
func (ado *AttachmentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AttachmentEdges ¶
type AttachmentEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Recipients holds the value of the recipients edge. Recipients []*User `json:"recipients,omitempty"` // contains filtered or unexported fields }
AttachmentEdges holds the relations/edges for other nodes in the graph.
func (AttachmentEdges) RecipientsOrErr ¶
func (e AttachmentEdges) RecipientsOrErr() ([]*User, error)
RecipientsOrErr returns the Recipients value or an error if the edge was not loaded in eager-loading.
func (AttachmentEdges) UserOrErr ¶
func (e AttachmentEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AttachmentGroupBy ¶
type AttachmentGroupBy struct {
// contains filtered or unexported fields
}
AttachmentGroupBy is the group-by builder for Attachment entities.
func (*AttachmentGroupBy) Aggregate ¶
func (agb *AttachmentGroupBy) Aggregate(fns ...AggregateFunc) *AttachmentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AttachmentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Scan ¶
func (agb *AttachmentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*AttachmentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AttachmentMutation ¶
type AttachmentMutation struct {
// contains filtered or unexported fields
}
AttachmentMutation represents an operation that mutates the Attachment nodes in the graph.
func (*AttachmentMutation) AddField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) AddRecipientIDs ¶
func (m *AttachmentMutation) AddRecipientIDs(ids ...int)
AddRecipientIDs adds the "recipients" edge to the User entity by ids.
func (*AttachmentMutation) AddedEdges ¶
func (m *AttachmentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AttachmentMutation) AddedField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) AddedFields ¶
func (m *AttachmentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AttachmentMutation) AddedIDs ¶
func (m *AttachmentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AttachmentMutation) ClearEdge ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ClearField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ClearRecipients ¶
func (m *AttachmentMutation) ClearRecipients()
ClearRecipients clears the "recipients" edge to the User entity.
func (*AttachmentMutation) ClearUser ¶
func (m *AttachmentMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*AttachmentMutation) ClearedEdges ¶
func (m *AttachmentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AttachmentMutation) ClearedFields ¶
func (m *AttachmentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AttachmentMutation) Client ¶
func (m AttachmentMutation) 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 (*AttachmentMutation) EdgeCleared ¶
func (m *AttachmentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AttachmentMutation) Field ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) FieldCleared ¶
func (m *AttachmentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AttachmentMutation) Fields ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ID ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) IDs ¶ added in v0.3.0
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 (*AttachmentMutation) 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 (*AttachmentMutation) RecipientsCleared ¶
func (m *AttachmentMutation) RecipientsCleared() bool
RecipientsCleared reports if the "recipients" edge to the User entity was cleared.
func (*AttachmentMutation) RecipientsIDs ¶
func (m *AttachmentMutation) RecipientsIDs() (ids []int)
RecipientsIDs returns the "recipients" edge IDs in the mutation.
func (*AttachmentMutation) RemoveRecipientIDs ¶
func (m *AttachmentMutation) RemoveRecipientIDs(ids ...int)
RemoveRecipientIDs removes the "recipients" edge to the User entity by IDs.
func (*AttachmentMutation) RemovedEdges ¶
func (m *AttachmentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AttachmentMutation) RemovedIDs ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) RemovedRecipientsIDs ¶
func (m *AttachmentMutation) RemovedRecipientsIDs() (ids []int)
RemovedRecipients returns the removed IDs of the "recipients" edge to the User entity.
func (*AttachmentMutation) ResetEdge ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetRecipients ¶
func (m *AttachmentMutation) ResetRecipients()
ResetRecipients resets all changes to the "recipients" edge.
func (*AttachmentMutation) ResetUser ¶
func (m *AttachmentMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*AttachmentMutation) SetField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) SetID ¶
func (m *AttachmentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Attachment entities.
func (*AttachmentMutation) SetUserID ¶
func (m *AttachmentMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (AttachmentMutation) Tx ¶
func (m AttachmentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AttachmentMutation) Type ¶
func (m *AttachmentMutation) Type() string
Type returns the node type of this mutation (Attachment).
func (*AttachmentMutation) UserCleared ¶
func (m *AttachmentMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*AttachmentMutation) UserID ¶
func (m *AttachmentMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*AttachmentMutation) UserIDs ¶
func (m *AttachmentMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*AttachmentMutation) Where ¶ added in v0.2.0
func (m *AttachmentMutation) Where(ps ...predicate.Attachment)
Where appends a list predicates to the AttachmentMutation builder.
type AttachmentQuery ¶
type AttachmentQuery struct {
// contains filtered or unexported fields
}
AttachmentQuery is the builder for querying Attachment entities.
func (*AttachmentQuery) All ¶
func (aq *AttachmentQuery) All(ctx context.Context) ([]*Attachment, error)
All executes the query and returns a list of Attachments.
func (*AttachmentQuery) AllX ¶
func (aq *AttachmentQuery) AllX(ctx context.Context) []*Attachment
AllX is like All, but panics if an error occurs.
func (*AttachmentQuery) Clone ¶
func (aq *AttachmentQuery) Clone() *AttachmentQuery
Clone returns a duplicate of the AttachmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AttachmentQuery) Count ¶
func (aq *AttachmentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AttachmentQuery) CountX ¶
func (aq *AttachmentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AttachmentQuery) Exist ¶
func (aq *AttachmentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AttachmentQuery) ExistX ¶
func (aq *AttachmentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AttachmentQuery) First ¶
func (aq *AttachmentQuery) First(ctx context.Context) (*Attachment, error)
First returns the first Attachment entity from the query. Returns a *NotFoundError when no Attachment was found.
func (*AttachmentQuery) FirstID ¶
FirstID returns the first Attachment ID from the query. Returns a *NotFoundError when no Attachment ID was found.
func (*AttachmentQuery) FirstIDX ¶
func (aq *AttachmentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AttachmentQuery) FirstX ¶
func (aq *AttachmentQuery) FirstX(ctx context.Context) *Attachment
FirstX is like First, but panics if an error occurs.
func (*AttachmentQuery) GroupBy ¶
func (aq *AttachmentQuery) GroupBy(field string, fields ...string) *AttachmentGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*AttachmentQuery) IDsX ¶
func (aq *AttachmentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AttachmentQuery) Limit ¶
func (aq *AttachmentQuery) Limit(limit int) *AttachmentQuery
Limit adds a limit step to the query.
func (*AttachmentQuery) Offset ¶
func (aq *AttachmentQuery) Offset(offset int) *AttachmentQuery
Offset adds an offset step to the query.
func (*AttachmentQuery) Only ¶
func (aq *AttachmentQuery) Only(ctx context.Context) (*Attachment, error)
Only returns a single Attachment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Attachment entity is found. Returns a *NotFoundError when no Attachment entities are found.
func (*AttachmentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Attachment ID in the query. Returns a *NotSingularError when more than one Attachment ID is found. Returns a *NotFoundError when no entities are found.
func (*AttachmentQuery) OnlyIDX ¶
func (aq *AttachmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AttachmentQuery) OnlyX ¶
func (aq *AttachmentQuery) OnlyX(ctx context.Context) *Attachment
OnlyX is like Only, but panics if an error occurs.
func (*AttachmentQuery) Order ¶
func (aq *AttachmentQuery) Order(o ...OrderFunc) *AttachmentQuery
Order adds an order step to the query.
func (*AttachmentQuery) QueryRecipients ¶
func (aq *AttachmentQuery) QueryRecipients() *UserQuery
QueryRecipients chains the current query on the "recipients" edge.
func (*AttachmentQuery) QueryUser ¶
func (aq *AttachmentQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*AttachmentQuery) Select ¶
func (aq *AttachmentQuery) Select(fields ...string) *AttachmentSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*AttachmentQuery) Unique ¶
func (aq *AttachmentQuery) Unique(unique bool) *AttachmentQuery
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 (*AttachmentQuery) Where ¶
func (aq *AttachmentQuery) Where(ps ...predicate.Attachment) *AttachmentQuery
Where adds a new predicate for the AttachmentQuery builder.
func (*AttachmentQuery) WithRecipients ¶
func (aq *AttachmentQuery) WithRecipients(opts ...func(*UserQuery)) *AttachmentQuery
WithRecipients tells the query-builder to eager-load the nodes that are connected to the "recipients" edge. The optional arguments are used to configure the query builder of the edge.
func (*AttachmentQuery) WithUser ¶
func (aq *AttachmentQuery) WithUser(opts ...func(*UserQuery)) *AttachmentQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type AttachmentSelect ¶
type AttachmentSelect struct { *AttachmentQuery // contains filtered or unexported fields }
AttachmentSelect is the builder for selecting fields of Attachment entities.
func (*AttachmentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Scan ¶
func (as *AttachmentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AttachmentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AttachmentUpdate ¶
type AttachmentUpdate struct {
// contains filtered or unexported fields
}
AttachmentUpdate is the builder for updating Attachment entities.
func (*AttachmentUpdate) AddRecipientIDs ¶
func (au *AttachmentUpdate) AddRecipientIDs(ids ...int) *AttachmentUpdate
AddRecipientIDs adds the "recipients" edge to the User entity by IDs.
func (*AttachmentUpdate) AddRecipients ¶
func (au *AttachmentUpdate) AddRecipients(u ...*User) *AttachmentUpdate
AddRecipients adds the "recipients" edges to the User entity.
func (*AttachmentUpdate) ClearRecipients ¶
func (au *AttachmentUpdate) ClearRecipients() *AttachmentUpdate
ClearRecipients clears all "recipients" edges to the User entity.
func (*AttachmentUpdate) ClearUser ¶
func (au *AttachmentUpdate) ClearUser() *AttachmentUpdate
ClearUser clears the "user" edge to the User entity.
func (*AttachmentUpdate) Exec ¶
func (au *AttachmentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentUpdate) ExecX ¶
func (au *AttachmentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentUpdate) Mutation ¶
func (au *AttachmentUpdate) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentUpdate) RemoveRecipientIDs ¶
func (au *AttachmentUpdate) RemoveRecipientIDs(ids ...int) *AttachmentUpdate
RemoveRecipientIDs removes the "recipients" edge to User entities by IDs.
func (*AttachmentUpdate) RemoveRecipients ¶
func (au *AttachmentUpdate) RemoveRecipients(u ...*User) *AttachmentUpdate
RemoveRecipients removes "recipients" edges to User entities.
func (*AttachmentUpdate) Save ¶
func (au *AttachmentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AttachmentUpdate) SaveX ¶
func (au *AttachmentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AttachmentUpdate) SetNillableUserID ¶
func (au *AttachmentUpdate) SetNillableUserID(id *int) *AttachmentUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AttachmentUpdate) SetUser ¶
func (au *AttachmentUpdate) SetUser(u *User) *AttachmentUpdate
SetUser sets the "user" edge to the User entity.
func (*AttachmentUpdate) SetUserID ¶
func (au *AttachmentUpdate) SetUserID(id int) *AttachmentUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*AttachmentUpdate) Where ¶
func (au *AttachmentUpdate) Where(ps ...predicate.Attachment) *AttachmentUpdate
Where appends a list predicates to the AttachmentUpdate builder.
type AttachmentUpdateOne ¶
type AttachmentUpdateOne struct {
// contains filtered or unexported fields
}
AttachmentUpdateOne is the builder for updating a single Attachment entity.
func (*AttachmentUpdateOne) AddRecipientIDs ¶
func (auo *AttachmentUpdateOne) AddRecipientIDs(ids ...int) *AttachmentUpdateOne
AddRecipientIDs adds the "recipients" edge to the User entity by IDs.
func (*AttachmentUpdateOne) AddRecipients ¶
func (auo *AttachmentUpdateOne) AddRecipients(u ...*User) *AttachmentUpdateOne
AddRecipients adds the "recipients" edges to the User entity.
func (*AttachmentUpdateOne) ClearRecipients ¶
func (auo *AttachmentUpdateOne) ClearRecipients() *AttachmentUpdateOne
ClearRecipients clears all "recipients" edges to the User entity.
func (*AttachmentUpdateOne) ClearUser ¶
func (auo *AttachmentUpdateOne) ClearUser() *AttachmentUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*AttachmentUpdateOne) Exec ¶
func (auo *AttachmentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AttachmentUpdateOne) ExecX ¶
func (auo *AttachmentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentUpdateOne) Mutation ¶
func (auo *AttachmentUpdateOne) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentUpdateOne) RemoveRecipientIDs ¶
func (auo *AttachmentUpdateOne) RemoveRecipientIDs(ids ...int) *AttachmentUpdateOne
RemoveRecipientIDs removes the "recipients" edge to User entities by IDs.
func (*AttachmentUpdateOne) RemoveRecipients ¶
func (auo *AttachmentUpdateOne) RemoveRecipients(u ...*User) *AttachmentUpdateOne
RemoveRecipients removes "recipients" edges to User entities.
func (*AttachmentUpdateOne) Save ¶
func (auo *AttachmentUpdateOne) Save(ctx context.Context) (*Attachment, error)
Save executes the query and returns the updated Attachment entity.
func (*AttachmentUpdateOne) SaveX ¶
func (auo *AttachmentUpdateOne) SaveX(ctx context.Context) *Attachment
SaveX is like Save, but panics if an error occurs.
func (*AttachmentUpdateOne) Select ¶
func (auo *AttachmentUpdateOne) Select(field string, fields ...string) *AttachmentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AttachmentUpdateOne) SetNillableUserID ¶
func (auo *AttachmentUpdateOne) SetNillableUserID(id *int) *AttachmentUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AttachmentUpdateOne) SetUser ¶
func (auo *AttachmentUpdateOne) SetUser(u *User) *AttachmentUpdateOne
SetUser sets the "user" edge to the User entity.
func (*AttachmentUpdateOne) SetUserID ¶
func (auo *AttachmentUpdateOne) SetUserID(id int) *AttachmentUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Attachment is the client for interacting with the Attachment builders. Attachment *AttachmentClient // Group is the client for interacting with the Group builders. Group *GroupClient // MultiWordSchema is the client for interacting with the MultiWordSchema builders. MultiWordSchema *MultiWordSchemaClient // NilExample is the client for interacting with the NilExample builders. NilExample *NilExampleClient // Pet is the client for interacting with the Pet builders. Pet *PetClient // Pony is the client for interacting with the Pony builders. Pony *PonyClient // SkipEdgeExample is the client for interacting with the SkipEdgeExample builders. SkipEdgeExample *SkipEdgeExampleClient // Todo is the client for interacting with the Todo builders. Todo *TodoClient // User is the client for interacting with the User builders. User *UserClient // 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(). Attachment. Query(). Count(ctx)
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 Group ¶
type Group struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupQuery when eager-loading is set. Edges GroupEdges `json:"edges"` // contains filtered or unexported fields }
Group is the model entity for the Group schema.
func (*Group) QueryUsers ¶
QueryUsers queries the "users" edge of the Group entity.
func (*Group) Unwrap ¶
Unwrap unwraps the Group 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 (*Group) Update ¶
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that you need to call Group.Unwrap() before calling this method if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶
func (c *GroupClient) Create() *GroupCreate
Create returns a builder for creating a Group entity.
func (*GroupClient) CreateBulk ¶
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupClient) DeleteOneID ¶
func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*GroupClient) GetX ¶
func (c *GroupClient) GetX(ctx context.Context, id int) *Group
GetX is like Get, but panics if an error occurs.
func (*GroupClient) Query ¶
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryUsers ¶
func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
QueryUsers queries the users edge of a Group.
func (*GroupClient) Update ¶
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶
func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `group.Hooks(f(g(h())))`.
type GroupCreate ¶
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddUserIDs ¶
func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupCreate) AddUsers ¶
func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
AddUsers adds the "users" edges to the User entity.
func (*GroupCreate) Exec ¶ added in v0.2.0
func (gc *GroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreate) ExecX ¶ added in v0.2.0
func (gc *GroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreate) Mutation ¶
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) Save ¶
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetName ¶
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the "name" field.
type GroupCreateBulk ¶
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating many Group entities in bulk.
func (*GroupCreateBulk) Exec ¶ added in v0.2.0
func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreateBulk) ExecX ¶ added in v0.2.0
func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupDelete ¶
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecX ¶
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) Where ¶
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where appends a list predicates to the GroupDelete builder.
type GroupDeleteOne ¶
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupEdges ¶
type GroupEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) UsersOrErr ¶
func (e GroupEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type GroupGroupBy ¶
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the group-by builder for Group entities.
func (*GroupGroupBy) Aggregate ¶
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Scan ¶
func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*GroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupMutation ¶
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutates the Group nodes in the graph.
func (*GroupMutation) AddField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddUserIDs ¶
func (m *GroupMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*GroupMutation) AddedEdges ¶
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddedFields ¶
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupMutation) AddedIDs ¶
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupMutation) ClearEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearField ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearUsers ¶
func (m *GroupMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*GroupMutation) ClearedEdges ¶
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶
func (m GroupMutation) 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 (*GroupMutation) EdgeCleared ¶
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupMutation) Field ¶
func (m *GroupMutation) 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 (*GroupMutation) FieldCleared ¶
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupMutation) Fields ¶
func (m *GroupMutation) 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 (*GroupMutation) ID ¶
func (m *GroupMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroupMutation) IDs ¶ added in v0.3.0
func (m *GroupMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroupMutation) Name ¶
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroupMutation) 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 (*GroupMutation) OldName ¶
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Group entity. If the Group 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 (*GroupMutation) RemoveUserIDs ¶
func (m *GroupMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*GroupMutation) RemovedEdges ¶
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedIDs ¶
func (m *GroupMutation) 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 (*GroupMutation) RemovedUsersIDs ¶
func (m *GroupMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*GroupMutation) ResetEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetField ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetName ¶
func (m *GroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroupMutation) ResetUsers ¶
func (m *GroupMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*GroupMutation) SetField ¶
func (m *GroupMutation) 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 (*GroupMutation) SetName ¶
func (m *GroupMutation) SetName(s string)
SetName sets the "name" field.
func (GroupMutation) Tx ¶
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UsersCleared ¶
func (m *GroupMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*GroupMutation) UsersIDs ¶
func (m *GroupMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
func (*GroupMutation) Where ¶ added in v0.2.0
func (m *GroupMutation) Where(ps ...predicate.Group)
Where appends a list predicates to the GroupMutation builder.
type GroupQuery ¶
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) All ¶
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶
func (gq *GroupQuery) Clone() *GroupQuery
Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupQuery) Count ¶
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) Exist ¶
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) First ¶
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.
func (*GroupQuery) FirstID ¶
func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.
func (*GroupQuery) FirstIDX ¶
func (gq *GroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Group.Query(). GroupBy(group.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupQuery) IDs ¶
func (gq *GroupQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Group IDs.
func (*GroupQuery) IDsX ¶
func (gq *GroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit adds a limit step to the query.
func (*GroupQuery) Offset ¶
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset adds an offset step to the query.
func (*GroupQuery) Only ¶
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Group entity is found. Returns a *NotFoundError when no Group entities are found.
func (*GroupQuery) OnlyID ¶
func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when more than one Group ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupQuery) OnlyIDX ¶
func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶
func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
Order adds an order step to the query.
func (*GroupQuery) QueryUsers ¶
func (gq *GroupQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*GroupQuery) Select ¶
func (gq *GroupQuery) Select(fields ...string) *GroupSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Group.Query(). Select(group.FieldName). Scan(ctx, &v)
func (*GroupQuery) Unique ¶
func (gq *GroupQuery) Unique(unique bool) *GroupQuery
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 (*GroupQuery) Where ¶
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the GroupQuery builder.
func (*GroupQuery) WithUsers ¶
func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type GroupSelect ¶
type GroupSelect struct { *GroupQuery // contains filtered or unexported fields }
GroupSelect is the builder for selecting fields of Group entities.
func (*GroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Scan ¶
func (gs *GroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupUpdate ¶
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddUserIDs ¶
func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdate) AddUsers ¶
func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdate) ClearUsers ¶
func (gu *GroupUpdate) ClearUsers() *GroupUpdate
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdate) Exec ¶
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecX ¶
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) RemoveUserIDs ¶
func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdate) RemoveUsers ¶
func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdate) Save ¶
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetName ¶
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the "name" field.
func (*GroupUpdate) Where ¶
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where appends a list predicates to the GroupUpdate builder.
type GroupUpdateOne ¶
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddUserIDs ¶
func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdateOne) AddUsers ¶
func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdateOne) ClearUsers ¶
func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdateOne) Exec ¶
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecX ¶
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) RemoveUserIDs ¶
func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdateOne) RemoveUsers ¶
func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdateOne) Save ¶
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated Group entity.
func (*GroupUpdateOne) SaveX ¶
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) Select ¶
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUpdateOne) SetName ¶
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the "name" field.
type MultiWordSchema ¶ added in v0.2.0
type MultiWordSchema struct { // ID of the ent. ID int `json:"id,omitempty"` // Unit holds the value of the "unit" field. Unit multiwordschema.Unit `json:"unit,omitempty"` // contains filtered or unexported fields }
MultiWordSchema is the model entity for the MultiWordSchema schema.
func (*MultiWordSchema) String ¶ added in v0.2.0
func (mws *MultiWordSchema) String() string
String implements the fmt.Stringer.
func (*MultiWordSchema) Unwrap ¶ added in v0.2.0
func (mws *MultiWordSchema) Unwrap() *MultiWordSchema
Unwrap unwraps the MultiWordSchema 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 (*MultiWordSchema) Update ¶ added in v0.2.0
func (mws *MultiWordSchema) Update() *MultiWordSchemaUpdateOne
Update returns a builder for updating this MultiWordSchema. Note that you need to call MultiWordSchema.Unwrap() before calling this method if this MultiWordSchema was returned from a transaction, and the transaction was committed or rolled back.
type MultiWordSchemaClient ¶ added in v0.2.0
type MultiWordSchemaClient struct {
// contains filtered or unexported fields
}
MultiWordSchemaClient is a client for the MultiWordSchema schema.
func NewMultiWordSchemaClient ¶ added in v0.2.0
func NewMultiWordSchemaClient(c config) *MultiWordSchemaClient
NewMultiWordSchemaClient returns a client for the MultiWordSchema from the given config.
func (*MultiWordSchemaClient) Create ¶ added in v0.2.0
func (c *MultiWordSchemaClient) Create() *MultiWordSchemaCreate
Create returns a builder for creating a MultiWordSchema entity.
func (*MultiWordSchemaClient) CreateBulk ¶ added in v0.2.0
func (c *MultiWordSchemaClient) CreateBulk(builders ...*MultiWordSchemaCreate) *MultiWordSchemaCreateBulk
CreateBulk returns a builder for creating a bulk of MultiWordSchema entities.
func (*MultiWordSchemaClient) Delete ¶ added in v0.2.0
func (c *MultiWordSchemaClient) Delete() *MultiWordSchemaDelete
Delete returns a delete builder for MultiWordSchema.
func (*MultiWordSchemaClient) DeleteOne ¶ added in v0.2.0
func (c *MultiWordSchemaClient) DeleteOne(mws *MultiWordSchema) *MultiWordSchemaDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MultiWordSchemaClient) DeleteOneID ¶ added in v0.2.0
func (c *MultiWordSchemaClient) DeleteOneID(id int) *MultiWordSchemaDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*MultiWordSchemaClient) Get ¶ added in v0.2.0
func (c *MultiWordSchemaClient) Get(ctx context.Context, id int) (*MultiWordSchema, error)
Get returns a MultiWordSchema entity by its id.
func (*MultiWordSchemaClient) GetX ¶ added in v0.2.0
func (c *MultiWordSchemaClient) GetX(ctx context.Context, id int) *MultiWordSchema
GetX is like Get, but panics if an error occurs.
func (*MultiWordSchemaClient) Hooks ¶ added in v0.2.0
func (c *MultiWordSchemaClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MultiWordSchemaClient) Query ¶ added in v0.2.0
func (c *MultiWordSchemaClient) Query() *MultiWordSchemaQuery
Query returns a query builder for MultiWordSchema.
func (*MultiWordSchemaClient) Update ¶ added in v0.2.0
func (c *MultiWordSchemaClient) Update() *MultiWordSchemaUpdate
Update returns an update builder for MultiWordSchema.
func (*MultiWordSchemaClient) UpdateOne ¶ added in v0.2.0
func (c *MultiWordSchemaClient) UpdateOne(mws *MultiWordSchema) *MultiWordSchemaUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MultiWordSchemaClient) UpdateOneID ¶ added in v0.2.0
func (c *MultiWordSchemaClient) UpdateOneID(id int) *MultiWordSchemaUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MultiWordSchemaClient) Use ¶ added in v0.2.0
func (c *MultiWordSchemaClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `multiwordschema.Hooks(f(g(h())))`.
type MultiWordSchemaCreate ¶ added in v0.2.0
type MultiWordSchemaCreate struct {
// contains filtered or unexported fields
}
MultiWordSchemaCreate is the builder for creating a MultiWordSchema entity.
func (*MultiWordSchemaCreate) Exec ¶ added in v0.2.0
func (mwsc *MultiWordSchemaCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MultiWordSchemaCreate) ExecX ¶ added in v0.2.0
func (mwsc *MultiWordSchemaCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaCreate) Mutation ¶ added in v0.2.0
func (mwsc *MultiWordSchemaCreate) Mutation() *MultiWordSchemaMutation
Mutation returns the MultiWordSchemaMutation object of the builder.
func (*MultiWordSchemaCreate) Save ¶ added in v0.2.0
func (mwsc *MultiWordSchemaCreate) Save(ctx context.Context) (*MultiWordSchema, error)
Save creates the MultiWordSchema in the database.
func (*MultiWordSchemaCreate) SaveX ¶ added in v0.2.0
func (mwsc *MultiWordSchemaCreate) SaveX(ctx context.Context) *MultiWordSchema
SaveX calls Save and panics if Save returns an error.
func (*MultiWordSchemaCreate) SetNillableUnit ¶ added in v0.2.0
func (mwsc *MultiWordSchemaCreate) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaCreate
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*MultiWordSchemaCreate) SetUnit ¶ added in v0.2.0
func (mwsc *MultiWordSchemaCreate) SetUnit(m multiwordschema.Unit) *MultiWordSchemaCreate
SetUnit sets the "unit" field.
type MultiWordSchemaCreateBulk ¶ added in v0.2.0
type MultiWordSchemaCreateBulk struct {
// contains filtered or unexported fields
}
MultiWordSchemaCreateBulk is the builder for creating many MultiWordSchema entities in bulk.
func (*MultiWordSchemaCreateBulk) Exec ¶ added in v0.2.0
func (mwscb *MultiWordSchemaCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MultiWordSchemaCreateBulk) ExecX ¶ added in v0.2.0
func (mwscb *MultiWordSchemaCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaCreateBulk) Save ¶ added in v0.2.0
func (mwscb *MultiWordSchemaCreateBulk) Save(ctx context.Context) ([]*MultiWordSchema, error)
Save creates the MultiWordSchema entities in the database.
func (*MultiWordSchemaCreateBulk) SaveX ¶ added in v0.2.0
func (mwscb *MultiWordSchemaCreateBulk) SaveX(ctx context.Context) []*MultiWordSchema
SaveX is like Save, but panics if an error occurs.
type MultiWordSchemaDelete ¶ added in v0.2.0
type MultiWordSchemaDelete struct {
// contains filtered or unexported fields
}
MultiWordSchemaDelete is the builder for deleting a MultiWordSchema entity.
func (*MultiWordSchemaDelete) Exec ¶ added in v0.2.0
func (mwsd *MultiWordSchemaDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MultiWordSchemaDelete) ExecX ¶ added in v0.2.0
func (mwsd *MultiWordSchemaDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaDelete) Where ¶ added in v0.2.0
func (mwsd *MultiWordSchemaDelete) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaDelete
Where appends a list predicates to the MultiWordSchemaDelete builder.
type MultiWordSchemaDeleteOne ¶ added in v0.2.0
type MultiWordSchemaDeleteOne struct {
// contains filtered or unexported fields
}
MultiWordSchemaDeleteOne is the builder for deleting a single MultiWordSchema entity.
func (*MultiWordSchemaDeleteOne) Exec ¶ added in v0.2.0
func (mwsdo *MultiWordSchemaDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MultiWordSchemaDeleteOne) ExecX ¶ added in v0.2.0
func (mwsdo *MultiWordSchemaDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MultiWordSchemaGroupBy ¶ added in v0.2.0
type MultiWordSchemaGroupBy struct {
// contains filtered or unexported fields
}
MultiWordSchemaGroupBy is the group-by builder for MultiWordSchema entities.
func (*MultiWordSchemaGroupBy) Aggregate ¶ added in v0.2.0
func (mwsgb *MultiWordSchemaGroupBy) Aggregate(fns ...AggregateFunc) *MultiWordSchemaGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MultiWordSchemaGroupBy) Bool ¶ added in v0.2.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) BoolX ¶ added in v0.2.0
BoolX is like Bool, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) Bools ¶ added in v0.2.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) BoolsX ¶ added in v0.2.0
BoolsX is like Bools, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) Float64 ¶ added in v0.2.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Float64X ¶ added in v0.2.0
Float64X is like Float64, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) Float64s ¶ added in v0.2.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Float64sX ¶ added in v0.2.0
Float64sX is like Float64s, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) Int ¶ added in v0.2.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) IntX ¶ added in v0.2.0
IntX is like Int, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) Ints ¶ added in v0.2.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) IntsX ¶ added in v0.2.0
IntsX is like Ints, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) Scan ¶ added in v0.2.0
func (mwsgb *MultiWordSchemaGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*MultiWordSchemaGroupBy) ScanX ¶ added in v0.2.0
ScanX is like Scan, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) String ¶ added in v0.2.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) StringX ¶ added in v0.2.0
StringX is like String, but panics if an error occurs.
type MultiWordSchemaMutation ¶ added in v0.2.0
type MultiWordSchemaMutation struct {
// contains filtered or unexported fields
}
MultiWordSchemaMutation represents an operation that mutates the MultiWordSchema nodes in the graph.
func (*MultiWordSchemaMutation) AddField ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) AddedEdges ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MultiWordSchemaMutation) AddedField ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) AddedFields ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MultiWordSchemaMutation) AddedIDs ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MultiWordSchemaMutation) ClearEdge ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) ClearField ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) ClearedEdges ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MultiWordSchemaMutation) ClearedFields ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MultiWordSchemaMutation) Client ¶ added in v0.2.0
func (m MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) EdgeCleared ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MultiWordSchemaMutation) Field ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) FieldCleared ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MultiWordSchemaMutation) Fields ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) ID ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MultiWordSchemaMutation) IDs ¶ added in v0.3.0
func (m *MultiWordSchemaMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MultiWordSchemaMutation) OldField ¶ added in v0.2.0
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 (*MultiWordSchemaMutation) OldUnit ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) OldUnit(ctx context.Context) (v multiwordschema.Unit, err error)
OldUnit returns the old "unit" field's value of the MultiWordSchema entity. If the MultiWordSchema 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 (*MultiWordSchemaMutation) Op ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) Op() Op
Op returns the operation name.
func (*MultiWordSchemaMutation) RemovedEdges ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MultiWordSchemaMutation) RemovedIDs ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) ResetEdge ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) ResetField ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) ResetUnit ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) ResetUnit()
ResetUnit resets all changes to the "unit" field.
func (*MultiWordSchemaMutation) SetField ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) 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 (*MultiWordSchemaMutation) SetUnit ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) SetUnit(value multiwordschema.Unit)
SetUnit sets the "unit" field.
func (MultiWordSchemaMutation) Tx ¶ added in v0.2.0
func (m MultiWordSchemaMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MultiWordSchemaMutation) Type ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) Type() string
Type returns the node type of this mutation (MultiWordSchema).
func (*MultiWordSchemaMutation) Unit ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) Unit() (r multiwordschema.Unit, exists bool)
Unit returns the value of the "unit" field in the mutation.
func (*MultiWordSchemaMutation) Where ¶ added in v0.2.0
func (m *MultiWordSchemaMutation) Where(ps ...predicate.MultiWordSchema)
Where appends a list predicates to the MultiWordSchemaMutation builder.
type MultiWordSchemaQuery ¶ added in v0.2.0
type MultiWordSchemaQuery struct {
// contains filtered or unexported fields
}
MultiWordSchemaQuery is the builder for querying MultiWordSchema entities.
func (*MultiWordSchemaQuery) All ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) All(ctx context.Context) ([]*MultiWordSchema, error)
All executes the query and returns a list of MultiWordSchemas.
func (*MultiWordSchemaQuery) AllX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) AllX(ctx context.Context) []*MultiWordSchema
AllX is like All, but panics if an error occurs.
func (*MultiWordSchemaQuery) Clone ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Clone() *MultiWordSchemaQuery
Clone returns a duplicate of the MultiWordSchemaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MultiWordSchemaQuery) Count ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MultiWordSchemaQuery) CountX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MultiWordSchemaQuery) Exist ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MultiWordSchemaQuery) ExistX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MultiWordSchemaQuery) First ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) First(ctx context.Context) (*MultiWordSchema, error)
First returns the first MultiWordSchema entity from the query. Returns a *NotFoundError when no MultiWordSchema was found.
func (*MultiWordSchemaQuery) FirstID ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MultiWordSchema ID from the query. Returns a *NotFoundError when no MultiWordSchema ID was found.
func (*MultiWordSchemaQuery) FirstIDX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MultiWordSchemaQuery) FirstX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) FirstX(ctx context.Context) *MultiWordSchema
FirstX is like First, but panics if an error occurs.
func (*MultiWordSchemaQuery) GroupBy ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) GroupBy(field string, fields ...string) *MultiWordSchemaGroupBy
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 { Unit multiwordschema.Unit `json:"unit,omitempty"` Count int `json:"count,omitempty"` } client.MultiWordSchema.Query(). GroupBy(multiwordschema.FieldUnit). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MultiWordSchemaQuery) IDs ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MultiWordSchema IDs.
func (*MultiWordSchemaQuery) IDsX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MultiWordSchemaQuery) Limit ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Limit(limit int) *MultiWordSchemaQuery
Limit adds a limit step to the query.
func (*MultiWordSchemaQuery) Offset ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Offset(offset int) *MultiWordSchemaQuery
Offset adds an offset step to the query.
func (*MultiWordSchemaQuery) Only ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Only(ctx context.Context) (*MultiWordSchema, error)
Only returns a single MultiWordSchema entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MultiWordSchema entity is found. Returns a *NotFoundError when no MultiWordSchema entities are found.
func (*MultiWordSchemaQuery) OnlyID ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MultiWordSchema ID in the query. Returns a *NotSingularError when more than one MultiWordSchema ID is found. Returns a *NotFoundError when no entities are found.
func (*MultiWordSchemaQuery) OnlyIDX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MultiWordSchemaQuery) OnlyX ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) OnlyX(ctx context.Context) *MultiWordSchema
OnlyX is like Only, but panics if an error occurs.
func (*MultiWordSchemaQuery) Order ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Order(o ...OrderFunc) *MultiWordSchemaQuery
Order adds an order step to the query.
func (*MultiWordSchemaQuery) Select ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Select(fields ...string) *MultiWordSchemaSelect
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 { Unit multiwordschema.Unit `json:"unit,omitempty"` } client.MultiWordSchema.Query(). Select(multiwordschema.FieldUnit). Scan(ctx, &v)
func (*MultiWordSchemaQuery) Unique ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Unique(unique bool) *MultiWordSchemaQuery
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 (*MultiWordSchemaQuery) Where ¶ added in v0.2.0
func (mwsq *MultiWordSchemaQuery) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaQuery
Where adds a new predicate for the MultiWordSchemaQuery builder.
type MultiWordSchemaSelect ¶ added in v0.2.0
type MultiWordSchemaSelect struct { *MultiWordSchemaQuery // contains filtered or unexported fields }
MultiWordSchemaSelect is the builder for selecting fields of MultiWordSchema entities.
func (*MultiWordSchemaSelect) Bool ¶ added in v0.2.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) BoolX ¶ added in v0.2.0
BoolX is like Bool, but panics if an error occurs.
func (*MultiWordSchemaSelect) Bools ¶ added in v0.2.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) BoolsX ¶ added in v0.2.0
BoolsX is like Bools, but panics if an error occurs.
func (*MultiWordSchemaSelect) Float64 ¶ added in v0.2.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Float64X ¶ added in v0.2.0
Float64X is like Float64, but panics if an error occurs.
func (*MultiWordSchemaSelect) Float64s ¶ added in v0.2.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Float64sX ¶ added in v0.2.0
Float64sX is like Float64s, but panics if an error occurs.
func (*MultiWordSchemaSelect) Int ¶ added in v0.2.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) IntX ¶ added in v0.2.0
IntX is like Int, but panics if an error occurs.
func (*MultiWordSchemaSelect) Ints ¶ added in v0.2.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) IntsX ¶ added in v0.2.0
IntsX is like Ints, but panics if an error occurs.
func (*MultiWordSchemaSelect) Scan ¶ added in v0.2.0
func (mwss *MultiWordSchemaSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MultiWordSchemaSelect) ScanX ¶ added in v0.2.0
ScanX is like Scan, but panics if an error occurs.
func (*MultiWordSchemaSelect) String ¶ added in v0.2.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) StringX ¶ added in v0.2.0
StringX is like String, but panics if an error occurs.
type MultiWordSchemaUpdate ¶ added in v0.2.0
type MultiWordSchemaUpdate struct {
// contains filtered or unexported fields
}
MultiWordSchemaUpdate is the builder for updating MultiWordSchema entities.
func (*MultiWordSchemaUpdate) Exec ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MultiWordSchemaUpdate) ExecX ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaUpdate) Mutation ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) Mutation() *MultiWordSchemaMutation
Mutation returns the MultiWordSchemaMutation object of the builder.
func (*MultiWordSchemaUpdate) Save ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MultiWordSchemaUpdate) SaveX ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MultiWordSchemaUpdate) SetNillableUnit ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaUpdate
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*MultiWordSchemaUpdate) SetUnit ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) SetUnit(m multiwordschema.Unit) *MultiWordSchemaUpdate
SetUnit sets the "unit" field.
func (*MultiWordSchemaUpdate) Where ¶ added in v0.2.0
func (mwsu *MultiWordSchemaUpdate) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaUpdate
Where appends a list predicates to the MultiWordSchemaUpdate builder.
type MultiWordSchemaUpdateOne ¶ added in v0.2.0
type MultiWordSchemaUpdateOne struct {
// contains filtered or unexported fields
}
MultiWordSchemaUpdateOne is the builder for updating a single MultiWordSchema entity.
func (*MultiWordSchemaUpdateOne) Exec ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MultiWordSchemaUpdateOne) ExecX ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaUpdateOne) Mutation ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) Mutation() *MultiWordSchemaMutation
Mutation returns the MultiWordSchemaMutation object of the builder.
func (*MultiWordSchemaUpdateOne) Save ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) Save(ctx context.Context) (*MultiWordSchema, error)
Save executes the query and returns the updated MultiWordSchema entity.
func (*MultiWordSchemaUpdateOne) SaveX ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) SaveX(ctx context.Context) *MultiWordSchema
SaveX is like Save, but panics if an error occurs.
func (*MultiWordSchemaUpdateOne) Select ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) Select(field string, fields ...string) *MultiWordSchemaUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MultiWordSchemaUpdateOne) SetNillableUnit ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaUpdateOne
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*MultiWordSchemaUpdateOne) SetUnit ¶ added in v0.2.0
func (mwsuo *MultiWordSchemaUpdateOne) SetUnit(m multiwordschema.Unit) *MultiWordSchemaUpdateOne
SetUnit sets the "unit" field.
type MultiWordSchemas ¶ added in v0.2.0
type MultiWordSchemas []*MultiWordSchema
MultiWordSchemas is a parsable slice of MultiWordSchema.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NilExample ¶ added in v0.2.0
type NilExample struct { // ID of the ent. ID int `json:"id,omitempty"` // StrNil holds the value of the "str_nil" field. StrNil *string `json:"str_nil,omitempty"` // TimeNil holds the value of the "time_nil" field. TimeNil *time.Time `json:"time_nil,omitempty"` // contains filtered or unexported fields }
NilExample is the model entity for the NilExample schema.
func (*NilExample) String ¶ added in v0.2.0
func (ne *NilExample) String() string
String implements the fmt.Stringer.
func (*NilExample) Unwrap ¶ added in v0.2.0
func (ne *NilExample) Unwrap() *NilExample
Unwrap unwraps the NilExample 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 (*NilExample) Update ¶ added in v0.2.0
func (ne *NilExample) Update() *NilExampleUpdateOne
Update returns a builder for updating this NilExample. Note that you need to call NilExample.Unwrap() before calling this method if this NilExample was returned from a transaction, and the transaction was committed or rolled back.
type NilExampleClient ¶ added in v0.2.0
type NilExampleClient struct {
// contains filtered or unexported fields
}
NilExampleClient is a client for the NilExample schema.
func NewNilExampleClient ¶ added in v0.2.0
func NewNilExampleClient(c config) *NilExampleClient
NewNilExampleClient returns a client for the NilExample from the given config.
func (*NilExampleClient) Create ¶ added in v0.2.0
func (c *NilExampleClient) Create() *NilExampleCreate
Create returns a builder for creating a NilExample entity.
func (*NilExampleClient) CreateBulk ¶ added in v0.2.0
func (c *NilExampleClient) CreateBulk(builders ...*NilExampleCreate) *NilExampleCreateBulk
CreateBulk returns a builder for creating a bulk of NilExample entities.
func (*NilExampleClient) Delete ¶ added in v0.2.0
func (c *NilExampleClient) Delete() *NilExampleDelete
Delete returns a delete builder for NilExample.
func (*NilExampleClient) DeleteOne ¶ added in v0.2.0
func (c *NilExampleClient) DeleteOne(ne *NilExample) *NilExampleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NilExampleClient) DeleteOneID ¶ added in v0.2.0
func (c *NilExampleClient) DeleteOneID(id int) *NilExampleDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*NilExampleClient) Get ¶ added in v0.2.0
func (c *NilExampleClient) Get(ctx context.Context, id int) (*NilExample, error)
Get returns a NilExample entity by its id.
func (*NilExampleClient) GetX ¶ added in v0.2.0
func (c *NilExampleClient) GetX(ctx context.Context, id int) *NilExample
GetX is like Get, but panics if an error occurs.
func (*NilExampleClient) Hooks ¶ added in v0.2.0
func (c *NilExampleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NilExampleClient) Query ¶ added in v0.2.0
func (c *NilExampleClient) Query() *NilExampleQuery
Query returns a query builder for NilExample.
func (*NilExampleClient) Update ¶ added in v0.2.0
func (c *NilExampleClient) Update() *NilExampleUpdate
Update returns an update builder for NilExample.
func (*NilExampleClient) UpdateOne ¶ added in v0.2.0
func (c *NilExampleClient) UpdateOne(ne *NilExample) *NilExampleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NilExampleClient) UpdateOneID ¶ added in v0.2.0
func (c *NilExampleClient) UpdateOneID(id int) *NilExampleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NilExampleClient) Use ¶ added in v0.2.0
func (c *NilExampleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nilexample.Hooks(f(g(h())))`.
type NilExampleCreate ¶ added in v0.2.0
type NilExampleCreate struct {
// contains filtered or unexported fields
}
NilExampleCreate is the builder for creating a NilExample entity.
func (*NilExampleCreate) Exec ¶ added in v0.2.0
func (nec *NilExampleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NilExampleCreate) ExecX ¶ added in v0.2.0
func (nec *NilExampleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleCreate) Mutation ¶ added in v0.2.0
func (nec *NilExampleCreate) Mutation() *NilExampleMutation
Mutation returns the NilExampleMutation object of the builder.
func (*NilExampleCreate) Save ¶ added in v0.2.0
func (nec *NilExampleCreate) Save(ctx context.Context) (*NilExample, error)
Save creates the NilExample in the database.
func (*NilExampleCreate) SaveX ¶ added in v0.2.0
func (nec *NilExampleCreate) SaveX(ctx context.Context) *NilExample
SaveX calls Save and panics if Save returns an error.
func (*NilExampleCreate) SetNillableStrNil ¶ added in v0.2.0
func (nec *NilExampleCreate) SetNillableStrNil(s *string) *NilExampleCreate
SetNillableStrNil sets the "str_nil" field if the given value is not nil.
func (*NilExampleCreate) SetNillableTimeNil ¶ added in v0.2.0
func (nec *NilExampleCreate) SetNillableTimeNil(t *time.Time) *NilExampleCreate
SetNillableTimeNil sets the "time_nil" field if the given value is not nil.
func (*NilExampleCreate) SetStrNil ¶ added in v0.2.0
func (nec *NilExampleCreate) SetStrNil(s string) *NilExampleCreate
SetStrNil sets the "str_nil" field.
func (*NilExampleCreate) SetTimeNil ¶ added in v0.2.0
func (nec *NilExampleCreate) SetTimeNil(t time.Time) *NilExampleCreate
SetTimeNil sets the "time_nil" field.
type NilExampleCreateBulk ¶ added in v0.2.0
type NilExampleCreateBulk struct {
// contains filtered or unexported fields
}
NilExampleCreateBulk is the builder for creating many NilExample entities in bulk.
func (*NilExampleCreateBulk) Exec ¶ added in v0.2.0
func (necb *NilExampleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NilExampleCreateBulk) ExecX ¶ added in v0.2.0
func (necb *NilExampleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleCreateBulk) Save ¶ added in v0.2.0
func (necb *NilExampleCreateBulk) Save(ctx context.Context) ([]*NilExample, error)
Save creates the NilExample entities in the database.
func (*NilExampleCreateBulk) SaveX ¶ added in v0.2.0
func (necb *NilExampleCreateBulk) SaveX(ctx context.Context) []*NilExample
SaveX is like Save, but panics if an error occurs.
type NilExampleDelete ¶ added in v0.2.0
type NilExampleDelete struct {
// contains filtered or unexported fields
}
NilExampleDelete is the builder for deleting a NilExample entity.
func (*NilExampleDelete) Exec ¶ added in v0.2.0
func (ned *NilExampleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NilExampleDelete) ExecX ¶ added in v0.2.0
func (ned *NilExampleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleDelete) Where ¶ added in v0.2.0
func (ned *NilExampleDelete) Where(ps ...predicate.NilExample) *NilExampleDelete
Where appends a list predicates to the NilExampleDelete builder.
type NilExampleDeleteOne ¶ added in v0.2.0
type NilExampleDeleteOne struct {
// contains filtered or unexported fields
}
NilExampleDeleteOne is the builder for deleting a single NilExample entity.
func (*NilExampleDeleteOne) Exec ¶ added in v0.2.0
func (nedo *NilExampleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NilExampleDeleteOne) ExecX ¶ added in v0.2.0
func (nedo *NilExampleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NilExampleGroupBy ¶ added in v0.2.0
type NilExampleGroupBy struct {
// contains filtered or unexported fields
}
NilExampleGroupBy is the group-by builder for NilExample entities.
func (*NilExampleGroupBy) Aggregate ¶ added in v0.2.0
func (negb *NilExampleGroupBy) Aggregate(fns ...AggregateFunc) *NilExampleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NilExampleGroupBy) Bool ¶ added in v0.2.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) BoolX ¶ added in v0.2.0
BoolX is like Bool, but panics if an error occurs.
func (*NilExampleGroupBy) Bools ¶ added in v0.2.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) BoolsX ¶ added in v0.2.0
BoolsX is like Bools, but panics if an error occurs.
func (*NilExampleGroupBy) Float64 ¶ added in v0.2.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Float64X ¶ added in v0.2.0
Float64X is like Float64, but panics if an error occurs.
func (*NilExampleGroupBy) Float64s ¶ added in v0.2.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Float64sX ¶ added in v0.2.0
Float64sX is like Float64s, but panics if an error occurs.
func (*NilExampleGroupBy) Int ¶ added in v0.2.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Ints ¶ added in v0.2.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) IntsX ¶ added in v0.2.0
IntsX is like Ints, but panics if an error occurs.
func (*NilExampleGroupBy) Scan ¶ added in v0.2.0
func (negb *NilExampleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*NilExampleGroupBy) ScanX ¶ added in v0.2.0
ScanX is like Scan, but panics if an error occurs.
func (*NilExampleGroupBy) String ¶ added in v0.2.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) StringX ¶ added in v0.2.0
StringX is like String, but panics if an error occurs.
type NilExampleMutation ¶ added in v0.2.0
type NilExampleMutation struct {
// contains filtered or unexported fields
}
NilExampleMutation represents an operation that mutates the NilExample nodes in the graph.
func (*NilExampleMutation) AddField ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) AddedEdges ¶ added in v0.2.0
func (m *NilExampleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NilExampleMutation) AddedField ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) AddedFields ¶ added in v0.2.0
func (m *NilExampleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NilExampleMutation) AddedIDs ¶ added in v0.2.0
func (m *NilExampleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NilExampleMutation) ClearEdge ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) ClearField ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) ClearStrNil ¶ added in v0.2.0
func (m *NilExampleMutation) ClearStrNil()
ClearStrNil clears the value of the "str_nil" field.
func (*NilExampleMutation) ClearTimeNil ¶ added in v0.2.0
func (m *NilExampleMutation) ClearTimeNil()
ClearTimeNil clears the value of the "time_nil" field.
func (*NilExampleMutation) ClearedEdges ¶ added in v0.2.0
func (m *NilExampleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NilExampleMutation) ClearedFields ¶ added in v0.2.0
func (m *NilExampleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NilExampleMutation) Client ¶ added in v0.2.0
func (m NilExampleMutation) 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 (*NilExampleMutation) EdgeCleared ¶ added in v0.2.0
func (m *NilExampleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NilExampleMutation) Field ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) FieldCleared ¶ added in v0.2.0
func (m *NilExampleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NilExampleMutation) Fields ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) ID ¶ added in v0.2.0
func (m *NilExampleMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NilExampleMutation) IDs ¶ added in v0.3.0
func (m *NilExampleMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NilExampleMutation) OldField ¶ added in v0.2.0
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 (*NilExampleMutation) OldStrNil ¶ added in v0.2.0
func (m *NilExampleMutation) OldStrNil(ctx context.Context) (v *string, err error)
OldStrNil returns the old "str_nil" field's value of the NilExample entity. If the NilExample 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 (*NilExampleMutation) OldTimeNil ¶ added in v0.2.0
OldTimeNil returns the old "time_nil" field's value of the NilExample entity. If the NilExample 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 (*NilExampleMutation) Op ¶ added in v0.2.0
func (m *NilExampleMutation) Op() Op
Op returns the operation name.
func (*NilExampleMutation) RemovedEdges ¶ added in v0.2.0
func (m *NilExampleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NilExampleMutation) RemovedIDs ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) ResetEdge ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) ResetField ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) ResetStrNil ¶ added in v0.2.0
func (m *NilExampleMutation) ResetStrNil()
ResetStrNil resets all changes to the "str_nil" field.
func (*NilExampleMutation) ResetTimeNil ¶ added in v0.2.0
func (m *NilExampleMutation) ResetTimeNil()
ResetTimeNil resets all changes to the "time_nil" field.
func (*NilExampleMutation) SetField ¶ added in v0.2.0
func (m *NilExampleMutation) 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 (*NilExampleMutation) SetStrNil ¶ added in v0.2.0
func (m *NilExampleMutation) SetStrNil(s string)
SetStrNil sets the "str_nil" field.
func (*NilExampleMutation) SetTimeNil ¶ added in v0.2.0
func (m *NilExampleMutation) SetTimeNil(t time.Time)
SetTimeNil sets the "time_nil" field.
func (*NilExampleMutation) StrNil ¶ added in v0.2.0
func (m *NilExampleMutation) StrNil() (r string, exists bool)
StrNil returns the value of the "str_nil" field in the mutation.
func (*NilExampleMutation) StrNilCleared ¶ added in v0.2.0
func (m *NilExampleMutation) StrNilCleared() bool
StrNilCleared returns if the "str_nil" field was cleared in this mutation.
func (*NilExampleMutation) TimeNil ¶ added in v0.2.0
func (m *NilExampleMutation) TimeNil() (r time.Time, exists bool)
TimeNil returns the value of the "time_nil" field in the mutation.
func (*NilExampleMutation) TimeNilCleared ¶ added in v0.2.0
func (m *NilExampleMutation) TimeNilCleared() bool
TimeNilCleared returns if the "time_nil" field was cleared in this mutation.
func (NilExampleMutation) Tx ¶ added in v0.2.0
func (m NilExampleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NilExampleMutation) Type ¶ added in v0.2.0
func (m *NilExampleMutation) Type() string
Type returns the node type of this mutation (NilExample).
func (*NilExampleMutation) Where ¶ added in v0.2.0
func (m *NilExampleMutation) Where(ps ...predicate.NilExample)
Where appends a list predicates to the NilExampleMutation builder.
type NilExampleQuery ¶ added in v0.2.0
type NilExampleQuery struct {
// contains filtered or unexported fields
}
NilExampleQuery is the builder for querying NilExample entities.
func (*NilExampleQuery) All ¶ added in v0.2.0
func (neq *NilExampleQuery) All(ctx context.Context) ([]*NilExample, error)
All executes the query and returns a list of NilExamples.
func (*NilExampleQuery) AllX ¶ added in v0.2.0
func (neq *NilExampleQuery) AllX(ctx context.Context) []*NilExample
AllX is like All, but panics if an error occurs.
func (*NilExampleQuery) Clone ¶ added in v0.2.0
func (neq *NilExampleQuery) Clone() *NilExampleQuery
Clone returns a duplicate of the NilExampleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NilExampleQuery) Count ¶ added in v0.2.0
func (neq *NilExampleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NilExampleQuery) CountX ¶ added in v0.2.0
func (neq *NilExampleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NilExampleQuery) Exist ¶ added in v0.2.0
func (neq *NilExampleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NilExampleQuery) ExistX ¶ added in v0.2.0
func (neq *NilExampleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NilExampleQuery) First ¶ added in v0.2.0
func (neq *NilExampleQuery) First(ctx context.Context) (*NilExample, error)
First returns the first NilExample entity from the query. Returns a *NotFoundError when no NilExample was found.
func (*NilExampleQuery) FirstID ¶ added in v0.2.0
func (neq *NilExampleQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NilExample ID from the query. Returns a *NotFoundError when no NilExample ID was found.
func (*NilExampleQuery) FirstIDX ¶ added in v0.2.0
func (neq *NilExampleQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NilExampleQuery) FirstX ¶ added in v0.2.0
func (neq *NilExampleQuery) FirstX(ctx context.Context) *NilExample
FirstX is like First, but panics if an error occurs.
func (*NilExampleQuery) GroupBy ¶ added in v0.2.0
func (neq *NilExampleQuery) GroupBy(field string, fields ...string) *NilExampleGroupBy
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 { StrNil string `json:"str_nil,omitempty"` Count int `json:"count,omitempty"` } client.NilExample.Query(). GroupBy(nilexample.FieldStrNil). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NilExampleQuery) IDs ¶ added in v0.2.0
func (neq *NilExampleQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NilExample IDs.
func (*NilExampleQuery) IDsX ¶ added in v0.2.0
func (neq *NilExampleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NilExampleQuery) Limit ¶ added in v0.2.0
func (neq *NilExampleQuery) Limit(limit int) *NilExampleQuery
Limit adds a limit step to the query.
func (*NilExampleQuery) Offset ¶ added in v0.2.0
func (neq *NilExampleQuery) Offset(offset int) *NilExampleQuery
Offset adds an offset step to the query.
func (*NilExampleQuery) Only ¶ added in v0.2.0
func (neq *NilExampleQuery) Only(ctx context.Context) (*NilExample, error)
Only returns a single NilExample entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NilExample entity is found. Returns a *NotFoundError when no NilExample entities are found.
func (*NilExampleQuery) OnlyID ¶ added in v0.2.0
func (neq *NilExampleQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NilExample ID in the query. Returns a *NotSingularError when more than one NilExample ID is found. Returns a *NotFoundError when no entities are found.
func (*NilExampleQuery) OnlyIDX ¶ added in v0.2.0
func (neq *NilExampleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NilExampleQuery) OnlyX ¶ added in v0.2.0
func (neq *NilExampleQuery) OnlyX(ctx context.Context) *NilExample
OnlyX is like Only, but panics if an error occurs.
func (*NilExampleQuery) Order ¶ added in v0.2.0
func (neq *NilExampleQuery) Order(o ...OrderFunc) *NilExampleQuery
Order adds an order step to the query.
func (*NilExampleQuery) Select ¶ added in v0.2.0
func (neq *NilExampleQuery) Select(fields ...string) *NilExampleSelect
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 { StrNil string `json:"str_nil,omitempty"` } client.NilExample.Query(). Select(nilexample.FieldStrNil). Scan(ctx, &v)
func (*NilExampleQuery) Unique ¶ added in v0.2.0
func (neq *NilExampleQuery) Unique(unique bool) *NilExampleQuery
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 (*NilExampleQuery) Where ¶ added in v0.2.0
func (neq *NilExampleQuery) Where(ps ...predicate.NilExample) *NilExampleQuery
Where adds a new predicate for the NilExampleQuery builder.
type NilExampleSelect ¶ added in v0.2.0
type NilExampleSelect struct { *NilExampleQuery // contains filtered or unexported fields }
NilExampleSelect is the builder for selecting fields of NilExample entities.
func (*NilExampleSelect) Bool ¶ added in v0.2.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Bools ¶ added in v0.2.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) BoolsX ¶ added in v0.2.0
BoolsX is like Bools, but panics if an error occurs.
func (*NilExampleSelect) Float64 ¶ added in v0.2.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Float64X ¶ added in v0.2.0
Float64X is like Float64, but panics if an error occurs.
func (*NilExampleSelect) Float64s ¶ added in v0.2.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Float64sX ¶ added in v0.2.0
Float64sX is like Float64s, but panics if an error occurs.
func (*NilExampleSelect) Int ¶ added in v0.2.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Ints ¶ added in v0.2.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Scan ¶ added in v0.2.0
func (nes *NilExampleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NilExampleSelect) String ¶ added in v0.2.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) StringX ¶ added in v0.2.0
StringX is like String, but panics if an error occurs.
type NilExampleUpdate ¶ added in v0.2.0
type NilExampleUpdate struct {
// contains filtered or unexported fields
}
NilExampleUpdate is the builder for updating NilExample entities.
func (*NilExampleUpdate) ClearStrNil ¶ added in v0.2.0
func (neu *NilExampleUpdate) ClearStrNil() *NilExampleUpdate
ClearStrNil clears the value of the "str_nil" field.
func (*NilExampleUpdate) ClearTimeNil ¶ added in v0.2.0
func (neu *NilExampleUpdate) ClearTimeNil() *NilExampleUpdate
ClearTimeNil clears the value of the "time_nil" field.
func (*NilExampleUpdate) Exec ¶ added in v0.2.0
func (neu *NilExampleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NilExampleUpdate) ExecX ¶ added in v0.2.0
func (neu *NilExampleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleUpdate) Mutation ¶ added in v0.2.0
func (neu *NilExampleUpdate) Mutation() *NilExampleMutation
Mutation returns the NilExampleMutation object of the builder.
func (*NilExampleUpdate) Save ¶ added in v0.2.0
func (neu *NilExampleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NilExampleUpdate) SaveX ¶ added in v0.2.0
func (neu *NilExampleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NilExampleUpdate) SetNillableStrNil ¶ added in v0.2.0
func (neu *NilExampleUpdate) SetNillableStrNil(s *string) *NilExampleUpdate
SetNillableStrNil sets the "str_nil" field if the given value is not nil.
func (*NilExampleUpdate) SetNillableTimeNil ¶ added in v0.2.0
func (neu *NilExampleUpdate) SetNillableTimeNil(t *time.Time) *NilExampleUpdate
SetNillableTimeNil sets the "time_nil" field if the given value is not nil.
func (*NilExampleUpdate) SetStrNil ¶ added in v0.2.0
func (neu *NilExampleUpdate) SetStrNil(s string) *NilExampleUpdate
SetStrNil sets the "str_nil" field.
func (*NilExampleUpdate) SetTimeNil ¶ added in v0.2.0
func (neu *NilExampleUpdate) SetTimeNil(t time.Time) *NilExampleUpdate
SetTimeNil sets the "time_nil" field.
func (*NilExampleUpdate) Where ¶ added in v0.2.0
func (neu *NilExampleUpdate) Where(ps ...predicate.NilExample) *NilExampleUpdate
Where appends a list predicates to the NilExampleUpdate builder.
type NilExampleUpdateOne ¶ added in v0.2.0
type NilExampleUpdateOne struct {
// contains filtered or unexported fields
}
NilExampleUpdateOne is the builder for updating a single NilExample entity.
func (*NilExampleUpdateOne) ClearStrNil ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) ClearStrNil() *NilExampleUpdateOne
ClearStrNil clears the value of the "str_nil" field.
func (*NilExampleUpdateOne) ClearTimeNil ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) ClearTimeNil() *NilExampleUpdateOne
ClearTimeNil clears the value of the "time_nil" field.
func (*NilExampleUpdateOne) Exec ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NilExampleUpdateOne) ExecX ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleUpdateOne) Mutation ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) Mutation() *NilExampleMutation
Mutation returns the NilExampleMutation object of the builder.
func (*NilExampleUpdateOne) Save ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) Save(ctx context.Context) (*NilExample, error)
Save executes the query and returns the updated NilExample entity.
func (*NilExampleUpdateOne) SaveX ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) SaveX(ctx context.Context) *NilExample
SaveX is like Save, but panics if an error occurs.
func (*NilExampleUpdateOne) Select ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) Select(field string, fields ...string) *NilExampleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NilExampleUpdateOne) SetNillableStrNil ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) SetNillableStrNil(s *string) *NilExampleUpdateOne
SetNillableStrNil sets the "str_nil" field if the given value is not nil.
func (*NilExampleUpdateOne) SetNillableTimeNil ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) SetNillableTimeNil(t *time.Time) *NilExampleUpdateOne
SetNillableTimeNil sets the "time_nil" field if the given value is not nil.
func (*NilExampleUpdateOne) SetStrNil ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) SetStrNil(s string) *NilExampleUpdateOne
SetStrNil sets the "str_nil" field.
func (*NilExampleUpdateOne) SetTimeNil ¶ added in v0.2.0
func (neuo *NilExampleUpdateOne) SetTimeNil(t time.Time) *NilExampleUpdateOne
SetTimeNil sets the "time_nil" field.
type NilExamples ¶ added in v0.2.0
type NilExamples []*NilExample
NilExamples is a parsable slice of NilExample.
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 Pet ¶ added in v0.3.0
type Pet struct { // ID of the ent. ID int `json:"id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PetQuery when eager-loading is set. Edges PetEdges `json:"edges"` // contains filtered or unexported fields }
Pet is the model entity for the Pet schema.
func (*Pet) QueryAttachment ¶ added in v0.3.0
func (pe *Pet) QueryAttachment() *AttachmentQuery
QueryAttachment queries the "attachment" edge of the Pet entity.
func (*Pet) QueryOwner ¶ added in v0.3.0
QueryOwner queries the "owner" edge of the Pet entity.
func (*Pet) Unwrap ¶ added in v0.3.0
Unwrap unwraps the Pet 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 (*Pet) Update ¶ added in v0.3.0
func (pe *Pet) Update() *PetUpdateOne
Update returns a builder for updating this Pet. Note that you need to call Pet.Unwrap() before calling this method if this Pet was returned from a transaction, and the transaction was committed or rolled back.
type PetClient ¶ added in v0.3.0
type PetClient struct {
// contains filtered or unexported fields
}
PetClient is a client for the Pet schema.
func NewPetClient ¶ added in v0.3.0
func NewPetClient(c config) *PetClient
NewPetClient returns a client for the Pet from the given config.
func (*PetClient) CreateBulk ¶ added in v0.3.0
func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk
CreateBulk returns a builder for creating a bulk of Pet entities.
func (*PetClient) DeleteOne ¶ added in v0.3.0
func (c *PetClient) DeleteOne(pe *Pet) *PetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PetClient) DeleteOneID ¶ added in v0.3.0
func (c *PetClient) DeleteOneID(id int) *PetDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*PetClient) QueryAttachment ¶ added in v0.3.0
func (c *PetClient) QueryAttachment(pe *Pet) *AttachmentQuery
QueryAttachment queries the attachment edge of a Pet.
func (*PetClient) QueryOwner ¶ added in v0.3.0
QueryOwner queries the owner edge of a Pet.
func (*PetClient) UpdateOne ¶ added in v0.3.0
func (c *PetClient) UpdateOne(pe *Pet) *PetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PetClient) UpdateOneID ¶ added in v0.3.0
func (c *PetClient) UpdateOneID(id int) *PetUpdateOne
UpdateOneID returns an update builder for the given id.
type PetCreate ¶ added in v0.3.0
type PetCreate struct {
// contains filtered or unexported fields
}
PetCreate is the builder for creating a Pet entity.
func (*PetCreate) AddAttachment ¶ added in v0.3.0
func (pc *PetCreate) AddAttachment(a ...*Attachment) *PetCreate
AddAttachment adds the "attachment" edges to the Attachment entity.
func (*PetCreate) AddAttachmentIDs ¶ added in v0.3.0
AddAttachmentIDs adds the "attachment" edge to the Attachment entity by IDs.
func (*PetCreate) Mutation ¶ added in v0.3.0
func (pc *PetCreate) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetCreate) SetNillableOwnerID ¶ added in v0.3.0
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*PetCreate) SetOwnerID ¶ added in v0.3.0
SetOwnerID sets the "owner" edge to the User entity by ID.
type PetCreateBulk ¶ added in v0.3.0
type PetCreateBulk struct {
// contains filtered or unexported fields
}
PetCreateBulk is the builder for creating many Pet entities in bulk.
func (*PetCreateBulk) Exec ¶ added in v0.3.0
func (pcb *PetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PetCreateBulk) ExecX ¶ added in v0.3.0
func (pcb *PetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PetDelete ¶ added in v0.3.0
type PetDelete struct {
// contains filtered or unexported fields
}
PetDelete is the builder for deleting a Pet entity.
func (*PetDelete) Exec ¶ added in v0.3.0
Exec executes the deletion query and returns how many vertices were deleted.
type PetDeleteOne ¶ added in v0.3.0
type PetDeleteOne struct {
// contains filtered or unexported fields
}
PetDeleteOne is the builder for deleting a single Pet entity.
func (*PetDeleteOne) Exec ¶ added in v0.3.0
func (pdo *PetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PetDeleteOne) ExecX ¶ added in v0.3.0
func (pdo *PetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PetEdges ¶ added in v0.3.0
type PetEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // Attachment holds the value of the attachment edge. Attachment []*Attachment `json:"attachment,omitempty"` // contains filtered or unexported fields }
PetEdges holds the relations/edges for other nodes in the graph.
func (PetEdges) AttachmentOrErr ¶ added in v0.3.0
func (e PetEdges) AttachmentOrErr() ([]*Attachment, error)
AttachmentOrErr returns the Attachment value or an error if the edge was not loaded in eager-loading.
func (PetEdges) OwnerOrErr ¶ added in v0.3.0
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PetGroupBy ¶ added in v0.3.0
type PetGroupBy struct {
// contains filtered or unexported fields
}
PetGroupBy is the group-by builder for Pet entities.
func (*PetGroupBy) Aggregate ¶ added in v0.3.0
func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PetGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*PetGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*PetGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Scan ¶ added in v0.3.0
func (pgb *PetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*PetGroupBy) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
type PetMutation ¶ added in v0.3.0
type PetMutation struct {
// contains filtered or unexported fields
}
PetMutation represents an operation that mutates the Pet nodes in the graph.
func (*PetMutation) AddAttachmentIDs ¶ added in v0.3.0
func (m *PetMutation) AddAttachmentIDs(ids ...uuid.UUID)
AddAttachmentIDs adds the "attachment" edge to the Attachment entity by ids.
func (*PetMutation) AddField ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) AddedEdges ¶ added in v0.3.0
func (m *PetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PetMutation) AddedField ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) AddedFields ¶ added in v0.3.0
func (m *PetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PetMutation) AddedIDs ¶ added in v0.3.0
func (m *PetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PetMutation) AttachmentCleared ¶ added in v0.3.0
func (m *PetMutation) AttachmentCleared() bool
AttachmentCleared reports if the "attachment" edge to the Attachment entity was cleared.
func (*PetMutation) AttachmentIDs ¶ added in v0.3.0
func (m *PetMutation) AttachmentIDs() (ids []uuid.UUID)
AttachmentIDs returns the "attachment" edge IDs in the mutation.
func (*PetMutation) ClearAttachment ¶ added in v0.3.0
func (m *PetMutation) ClearAttachment()
ClearAttachment clears the "attachment" edge to the Attachment entity.
func (*PetMutation) ClearEdge ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) ClearField ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) ClearOwner ¶ added in v0.3.0
func (m *PetMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*PetMutation) ClearedEdges ¶ added in v0.3.0
func (m *PetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PetMutation) ClearedFields ¶ added in v0.3.0
func (m *PetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PetMutation) Client ¶ added in v0.3.0
func (m PetMutation) 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 (*PetMutation) EdgeCleared ¶ added in v0.3.0
func (m *PetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PetMutation) Field ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) FieldCleared ¶ added in v0.3.0
func (m *PetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PetMutation) Fields ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) ID ¶ added in v0.3.0
func (m *PetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PetMutation) IDs ¶ added in v0.3.0
func (m *PetMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PetMutation) OldField ¶ added in v0.3.0
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 (*PetMutation) Op ¶ added in v0.3.0
func (m *PetMutation) Op() Op
Op returns the operation name.
func (*PetMutation) OwnerCleared ¶ added in v0.3.0
func (m *PetMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*PetMutation) OwnerID ¶ added in v0.3.0
func (m *PetMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*PetMutation) OwnerIDs ¶ added in v0.3.0
func (m *PetMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*PetMutation) RemoveAttachmentIDs ¶ added in v0.3.0
func (m *PetMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
RemoveAttachmentIDs removes the "attachment" edge to the Attachment entity by IDs.
func (*PetMutation) RemovedAttachmentIDs ¶ added in v0.3.0
func (m *PetMutation) RemovedAttachmentIDs() (ids []uuid.UUID)
RemovedAttachment returns the removed IDs of the "attachment" edge to the Attachment entity.
func (*PetMutation) RemovedEdges ¶ added in v0.3.0
func (m *PetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PetMutation) RemovedIDs ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) ResetAttachment ¶ added in v0.3.0
func (m *PetMutation) ResetAttachment()
ResetAttachment resets all changes to the "attachment" edge.
func (*PetMutation) ResetEdge ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) ResetField ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) ResetOwner ¶ added in v0.3.0
func (m *PetMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*PetMutation) SetField ¶ added in v0.3.0
func (m *PetMutation) 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 (*PetMutation) SetOwnerID ¶ added in v0.3.0
func (m *PetMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (PetMutation) Tx ¶ added in v0.3.0
func (m PetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PetMutation) Type ¶ added in v0.3.0
func (m *PetMutation) Type() string
Type returns the node type of this mutation (Pet).
func (*PetMutation) Where ¶ added in v0.3.0
func (m *PetMutation) Where(ps ...predicate.Pet)
Where appends a list predicates to the PetMutation builder.
type PetQuery ¶ added in v0.3.0
type PetQuery struct {
// contains filtered or unexported fields
}
PetQuery is the builder for querying Pet entities.
func (*PetQuery) Clone ¶ added in v0.3.0
Clone returns a duplicate of the PetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PetQuery) First ¶ added in v0.3.0
First returns the first Pet entity from the query. Returns a *NotFoundError when no Pet was found.
func (*PetQuery) FirstID ¶ added in v0.3.0
FirstID returns the first Pet ID from the query. Returns a *NotFoundError when no Pet ID was found.
func (*PetQuery) FirstIDX ¶ added in v0.3.0
FirstIDX is like FirstID, but panics if an error occurs.
func (*PetQuery) GroupBy ¶ added in v0.3.0
func (pq *PetQuery) GroupBy(field string, fields ...string) *PetGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*PetQuery) Only ¶ added in v0.3.0
Only returns a single Pet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Pet entity is found. Returns a *NotFoundError when no Pet entities are found.
func (*PetQuery) OnlyID ¶ added in v0.3.0
OnlyID is like Only, but returns the only Pet ID in the query. Returns a *NotSingularError when more than one Pet ID is found. Returns a *NotFoundError when no entities are found.
func (*PetQuery) QueryAttachment ¶ added in v0.3.0
func (pq *PetQuery) QueryAttachment() *AttachmentQuery
QueryAttachment chains the current query on the "attachment" edge.
func (*PetQuery) QueryOwner ¶ added in v0.3.0
QueryOwner chains the current query on the "owner" edge.
func (*PetQuery) Select ¶ added in v0.3.0
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*PetQuery) Unique ¶ added in v0.3.0
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 (*PetQuery) WithAttachment ¶ added in v0.3.0
func (pq *PetQuery) WithAttachment(opts ...func(*AttachmentQuery)) *PetQuery
WithAttachment tells the query-builder to eager-load the nodes that are connected to the "attachment" edge. The optional arguments are used to configure the query builder of the edge.
type PetSelect ¶ added in v0.3.0
type PetSelect struct { *PetQuery // contains filtered or unexported fields }
PetSelect is the builder for selecting fields of Pet entities.
func (*PetSelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PetSelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PetSelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PetSelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*PetSelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PetSelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*PetSelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PetSelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PetSelect) Scan ¶ added in v0.3.0
Scan applies the selector query and scans the result into the given value.
func (*PetSelect) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
type PetUpdate ¶ added in v0.3.0
type PetUpdate struct {
// contains filtered or unexported fields
}
PetUpdate is the builder for updating Pet entities.
func (*PetUpdate) AddAttachment ¶ added in v0.3.0
func (pu *PetUpdate) AddAttachment(a ...*Attachment) *PetUpdate
AddAttachment adds the "attachment" edges to the Attachment entity.
func (*PetUpdate) AddAttachmentIDs ¶ added in v0.3.0
AddAttachmentIDs adds the "attachment" edge to the Attachment entity by IDs.
func (*PetUpdate) ClearAttachment ¶ added in v0.3.0
ClearAttachment clears all "attachment" edges to the Attachment entity.
func (*PetUpdate) ClearOwner ¶ added in v0.3.0
ClearOwner clears the "owner" edge to the User entity.
func (*PetUpdate) Mutation ¶ added in v0.3.0
func (pu *PetUpdate) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetUpdate) RemoveAttachment ¶ added in v0.3.0
func (pu *PetUpdate) RemoveAttachment(a ...*Attachment) *PetUpdate
RemoveAttachment removes "attachment" edges to Attachment entities.
func (*PetUpdate) RemoveAttachmentIDs ¶ added in v0.3.0
RemoveAttachmentIDs removes the "attachment" edge to Attachment entities by IDs.
func (*PetUpdate) Save ¶ added in v0.3.0
Save executes the query and returns the number of nodes affected by the update operation.
func (*PetUpdate) SetNillableOwnerID ¶ added in v0.3.0
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*PetUpdate) SetOwnerID ¶ added in v0.3.0
SetOwnerID sets the "owner" edge to the User entity by ID.
type PetUpdateOne ¶ added in v0.3.0
type PetUpdateOne struct {
// contains filtered or unexported fields
}
PetUpdateOne is the builder for updating a single Pet entity.
func (*PetUpdateOne) AddAttachment ¶ added in v0.3.0
func (puo *PetUpdateOne) AddAttachment(a ...*Attachment) *PetUpdateOne
AddAttachment adds the "attachment" edges to the Attachment entity.
func (*PetUpdateOne) AddAttachmentIDs ¶ added in v0.3.0
func (puo *PetUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *PetUpdateOne
AddAttachmentIDs adds the "attachment" edge to the Attachment entity by IDs.
func (*PetUpdateOne) ClearAttachment ¶ added in v0.3.0
func (puo *PetUpdateOne) ClearAttachment() *PetUpdateOne
ClearAttachment clears all "attachment" edges to the Attachment entity.
func (*PetUpdateOne) ClearOwner ¶ added in v0.3.0
func (puo *PetUpdateOne) ClearOwner() *PetUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*PetUpdateOne) Exec ¶ added in v0.3.0
func (puo *PetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PetUpdateOne) ExecX ¶ added in v0.3.0
func (puo *PetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PetUpdateOne) Mutation ¶ added in v0.3.0
func (puo *PetUpdateOne) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetUpdateOne) RemoveAttachment ¶ added in v0.3.0
func (puo *PetUpdateOne) RemoveAttachment(a ...*Attachment) *PetUpdateOne
RemoveAttachment removes "attachment" edges to Attachment entities.
func (*PetUpdateOne) RemoveAttachmentIDs ¶ added in v0.3.0
func (puo *PetUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *PetUpdateOne
RemoveAttachmentIDs removes the "attachment" edge to Attachment entities by IDs.
func (*PetUpdateOne) Save ¶ added in v0.3.0
func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error)
Save executes the query and returns the updated Pet entity.
func (*PetUpdateOne) SaveX ¶ added in v0.3.0
func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet
SaveX is like Save, but panics if an error occurs.
func (*PetUpdateOne) Select ¶ added in v0.3.0
func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PetUpdateOne) SetNillableOwnerID ¶ added in v0.3.0
func (puo *PetUpdateOne) SetNillableOwnerID(id *int) *PetUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*PetUpdateOne) SetOwner ¶ added in v0.3.0
func (puo *PetUpdateOne) SetOwner(u *User) *PetUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*PetUpdateOne) SetOwnerID ¶ added in v0.3.0
func (puo *PetUpdateOne) SetOwnerID(id int) *PetUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
type Pony ¶ added in v0.3.0
type Pony struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // contains filtered or unexported fields }
Pony is the model entity for the Pony schema.
func (*Pony) Unwrap ¶ added in v0.3.0
Unwrap unwraps the Pony 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 (*Pony) Update ¶ added in v0.3.0
func (po *Pony) Update() *PonyUpdateOne
Update returns a builder for updating this Pony. Note that you need to call Pony.Unwrap() before calling this method if this Pony was returned from a transaction, and the transaction was committed or rolled back.
type PonyClient ¶ added in v0.3.0
type PonyClient struct {
// contains filtered or unexported fields
}
PonyClient is a client for the Pony schema.
func NewPonyClient ¶ added in v0.3.0
func NewPonyClient(c config) *PonyClient
NewPonyClient returns a client for the Pony from the given config.
func (*PonyClient) Create ¶ added in v0.3.0
func (c *PonyClient) Create() *PonyCreate
Create returns a builder for creating a Pony entity.
func (*PonyClient) CreateBulk ¶ added in v0.3.0
func (c *PonyClient) CreateBulk(builders ...*PonyCreate) *PonyCreateBulk
CreateBulk returns a builder for creating a bulk of Pony entities.
func (*PonyClient) Delete ¶ added in v0.3.0
func (c *PonyClient) Delete() *PonyDelete
Delete returns a delete builder for Pony.
func (*PonyClient) DeleteOne ¶ added in v0.3.0
func (c *PonyClient) DeleteOne(po *Pony) *PonyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PonyClient) DeleteOneID ¶ added in v0.3.0
func (c *PonyClient) DeleteOneID(id int) *PonyDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*PonyClient) GetX ¶ added in v0.3.0
func (c *PonyClient) GetX(ctx context.Context, id int) *Pony
GetX is like Get, but panics if an error occurs.
func (*PonyClient) Hooks ¶ added in v0.3.0
func (c *PonyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PonyClient) Query ¶ added in v0.3.0
func (c *PonyClient) Query() *PonyQuery
Query returns a query builder for Pony.
func (*PonyClient) Update ¶ added in v0.3.0
func (c *PonyClient) Update() *PonyUpdate
Update returns an update builder for Pony.
func (*PonyClient) UpdateOne ¶ added in v0.3.0
func (c *PonyClient) UpdateOne(po *Pony) *PonyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PonyClient) UpdateOneID ¶ added in v0.3.0
func (c *PonyClient) UpdateOneID(id int) *PonyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PonyClient) Use ¶ added in v0.3.0
func (c *PonyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pony.Hooks(f(g(h())))`.
type PonyCreate ¶ added in v0.3.0
type PonyCreate struct {
// contains filtered or unexported fields
}
PonyCreate is the builder for creating a Pony entity.
func (*PonyCreate) Exec ¶ added in v0.3.0
func (pc *PonyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PonyCreate) ExecX ¶ added in v0.3.0
func (pc *PonyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PonyCreate) Mutation ¶ added in v0.3.0
func (pc *PonyCreate) Mutation() *PonyMutation
Mutation returns the PonyMutation object of the builder.
func (*PonyCreate) Save ¶ added in v0.3.0
func (pc *PonyCreate) Save(ctx context.Context) (*Pony, error)
Save creates the Pony in the database.
func (*PonyCreate) SaveX ¶ added in v0.3.0
func (pc *PonyCreate) SaveX(ctx context.Context) *Pony
SaveX calls Save and panics if Save returns an error.
func (*PonyCreate) SetName ¶ added in v0.3.0
func (pc *PonyCreate) SetName(s string) *PonyCreate
SetName sets the "name" field.
type PonyCreateBulk ¶ added in v0.3.0
type PonyCreateBulk struct {
// contains filtered or unexported fields
}
PonyCreateBulk is the builder for creating many Pony entities in bulk.
func (*PonyCreateBulk) Exec ¶ added in v0.3.0
func (pcb *PonyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PonyCreateBulk) ExecX ¶ added in v0.3.0
func (pcb *PonyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PonyDelete ¶ added in v0.3.0
type PonyDelete struct {
// contains filtered or unexported fields
}
PonyDelete is the builder for deleting a Pony entity.
func (*PonyDelete) Exec ¶ added in v0.3.0
func (pd *PonyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PonyDelete) ExecX ¶ added in v0.3.0
func (pd *PonyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PonyDelete) Where ¶ added in v0.3.0
func (pd *PonyDelete) Where(ps ...predicate.Pony) *PonyDelete
Where appends a list predicates to the PonyDelete builder.
type PonyDeleteOne ¶ added in v0.3.0
type PonyDeleteOne struct {
// contains filtered or unexported fields
}
PonyDeleteOne is the builder for deleting a single Pony entity.
func (*PonyDeleteOne) Exec ¶ added in v0.3.0
func (pdo *PonyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PonyDeleteOne) ExecX ¶ added in v0.3.0
func (pdo *PonyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PonyGroupBy ¶ added in v0.3.0
type PonyGroupBy struct {
// contains filtered or unexported fields
}
PonyGroupBy is the group-by builder for Pony entities.
func (*PonyGroupBy) Aggregate ¶ added in v0.3.0
func (pgb *PonyGroupBy) Aggregate(fns ...AggregateFunc) *PonyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PonyGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PonyGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PonyGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PonyGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*PonyGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PonyGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*PonyGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PonyGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PonyGroupBy) Scan ¶ added in v0.3.0
func (pgb *PonyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*PonyGroupBy) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*PonyGroupBy) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type PonyMutation ¶ added in v0.3.0
type PonyMutation struct {
// contains filtered or unexported fields
}
PonyMutation represents an operation that mutates the Pony nodes in the graph.
func (*PonyMutation) AddField ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) AddedEdges ¶ added in v0.3.0
func (m *PonyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PonyMutation) AddedField ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) AddedFields ¶ added in v0.3.0
func (m *PonyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PonyMutation) AddedIDs ¶ added in v0.3.0
func (m *PonyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PonyMutation) ClearEdge ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) ClearField ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) ClearedEdges ¶ added in v0.3.0
func (m *PonyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PonyMutation) ClearedFields ¶ added in v0.3.0
func (m *PonyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PonyMutation) Client ¶ added in v0.3.0
func (m PonyMutation) 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 (*PonyMutation) EdgeCleared ¶ added in v0.3.0
func (m *PonyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PonyMutation) Field ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) FieldCleared ¶ added in v0.3.0
func (m *PonyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PonyMutation) Fields ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) ID ¶ added in v0.3.0
func (m *PonyMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PonyMutation) IDs ¶ added in v0.3.0
func (m *PonyMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PonyMutation) Name ¶ added in v0.3.0
func (m *PonyMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PonyMutation) OldField ¶ added in v0.3.0
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 (*PonyMutation) OldName ¶ added in v0.3.0
func (m *PonyMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Pony entity. If the Pony 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 (*PonyMutation) Op ¶ added in v0.3.0
func (m *PonyMutation) Op() Op
Op returns the operation name.
func (*PonyMutation) RemovedEdges ¶ added in v0.3.0
func (m *PonyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PonyMutation) RemovedIDs ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) ResetEdge ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) ResetField ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) ResetName ¶ added in v0.3.0
func (m *PonyMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PonyMutation) SetField ¶ added in v0.3.0
func (m *PonyMutation) 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 (*PonyMutation) SetName ¶ added in v0.3.0
func (m *PonyMutation) SetName(s string)
SetName sets the "name" field.
func (PonyMutation) Tx ¶ added in v0.3.0
func (m PonyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PonyMutation) Type ¶ added in v0.3.0
func (m *PonyMutation) Type() string
Type returns the node type of this mutation (Pony).
func (*PonyMutation) Where ¶ added in v0.3.0
func (m *PonyMutation) Where(ps ...predicate.Pony)
Where appends a list predicates to the PonyMutation builder.
type PonyQuery ¶ added in v0.3.0
type PonyQuery struct {
// contains filtered or unexported fields
}
PonyQuery is the builder for querying Pony entities.
func (*PonyQuery) Clone ¶ added in v0.3.0
Clone returns a duplicate of the PonyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PonyQuery) Exist ¶ added in v0.3.0
Exist returns true if the query has elements in the graph.
func (*PonyQuery) First ¶ added in v0.3.0
First returns the first Pony entity from the query. Returns a *NotFoundError when no Pony was found.
func (*PonyQuery) FirstID ¶ added in v0.3.0
FirstID returns the first Pony ID from the query. Returns a *NotFoundError when no Pony ID was found.
func (*PonyQuery) FirstIDX ¶ added in v0.3.0
FirstIDX is like FirstID, but panics if an error occurs.
func (*PonyQuery) GroupBy ¶ added in v0.3.0
func (pq *PonyQuery) GroupBy(field string, fields ...string) *PonyGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Pony.Query(). GroupBy(pony.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PonyQuery) Only ¶ added in v0.3.0
Only returns a single Pony entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Pony entity is found. Returns a *NotFoundError when no Pony entities are found.
func (*PonyQuery) OnlyID ¶ added in v0.3.0
OnlyID is like Only, but returns the only Pony ID in the query. Returns a *NotSingularError when more than one Pony ID is found. Returns a *NotFoundError when no entities are found.
func (*PonyQuery) Select ¶ added in v0.3.0
func (pq *PonyQuery) Select(fields ...string) *PonySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Pony.Query(). Select(pony.FieldName). Scan(ctx, &v)
type PonySelect ¶ added in v0.3.0
type PonySelect struct { *PonyQuery // contains filtered or unexported fields }
PonySelect is the builder for selecting fields of Pony entities.
func (*PonySelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PonySelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PonySelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PonySelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*PonySelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PonySelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*PonySelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PonySelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PonySelect) Scan ¶ added in v0.3.0
func (ps *PonySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PonySelect) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
type PonyUpdate ¶ added in v0.3.0
type PonyUpdate struct {
// contains filtered or unexported fields
}
PonyUpdate is the builder for updating Pony entities.
func (*PonyUpdate) Exec ¶ added in v0.3.0
func (pu *PonyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PonyUpdate) ExecX ¶ added in v0.3.0
func (pu *PonyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PonyUpdate) Mutation ¶ added in v0.3.0
func (pu *PonyUpdate) Mutation() *PonyMutation
Mutation returns the PonyMutation object of the builder.
func (*PonyUpdate) Save ¶ added in v0.3.0
func (pu *PonyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PonyUpdate) SaveX ¶ added in v0.3.0
func (pu *PonyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PonyUpdate) SetName ¶ added in v0.3.0
func (pu *PonyUpdate) SetName(s string) *PonyUpdate
SetName sets the "name" field.
func (*PonyUpdate) Where ¶ added in v0.3.0
func (pu *PonyUpdate) Where(ps ...predicate.Pony) *PonyUpdate
Where appends a list predicates to the PonyUpdate builder.
type PonyUpdateOne ¶ added in v0.3.0
type PonyUpdateOne struct {
// contains filtered or unexported fields
}
PonyUpdateOne is the builder for updating a single Pony entity.
func (*PonyUpdateOne) Exec ¶ added in v0.3.0
func (puo *PonyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PonyUpdateOne) ExecX ¶ added in v0.3.0
func (puo *PonyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PonyUpdateOne) Mutation ¶ added in v0.3.0
func (puo *PonyUpdateOne) Mutation() *PonyMutation
Mutation returns the PonyMutation object of the builder.
func (*PonyUpdateOne) Save ¶ added in v0.3.0
func (puo *PonyUpdateOne) Save(ctx context.Context) (*Pony, error)
Save executes the query and returns the updated Pony entity.
func (*PonyUpdateOne) SaveX ¶ added in v0.3.0
func (puo *PonyUpdateOne) SaveX(ctx context.Context) *Pony
SaveX is like Save, but panics if an error occurs.
func (*PonyUpdateOne) Select ¶ added in v0.3.0
func (puo *PonyUpdateOne) Select(field string, fields ...string) *PonyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PonyUpdateOne) SetName ¶ added in v0.3.0
func (puo *PonyUpdateOne) SetName(s string) *PonyUpdateOne
SetName sets the "name" field.
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 SkipEdgeExample ¶ added in v0.3.0
type SkipEdgeExample struct { // ID of the ent. ID int `json:"id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SkipEdgeExampleQuery when eager-loading is set. Edges SkipEdgeExampleEdges `json:"edges"` // contains filtered or unexported fields }
SkipEdgeExample is the model entity for the SkipEdgeExample schema.
func (*SkipEdgeExample) QueryUser ¶ added in v0.3.0
func (see *SkipEdgeExample) QueryUser() *UserQuery
QueryUser queries the "user" edge of the SkipEdgeExample entity.
func (*SkipEdgeExample) String ¶ added in v0.3.0
func (see *SkipEdgeExample) String() string
String implements the fmt.Stringer.
func (*SkipEdgeExample) Unwrap ¶ added in v0.3.0
func (see *SkipEdgeExample) Unwrap() *SkipEdgeExample
Unwrap unwraps the SkipEdgeExample 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 (*SkipEdgeExample) Update ¶ added in v0.3.0
func (see *SkipEdgeExample) Update() *SkipEdgeExampleUpdateOne
Update returns a builder for updating this SkipEdgeExample. Note that you need to call SkipEdgeExample.Unwrap() before calling this method if this SkipEdgeExample was returned from a transaction, and the transaction was committed or rolled back.
type SkipEdgeExampleClient ¶ added in v0.3.0
type SkipEdgeExampleClient struct {
// contains filtered or unexported fields
}
SkipEdgeExampleClient is a client for the SkipEdgeExample schema.
func NewSkipEdgeExampleClient ¶ added in v0.3.0
func NewSkipEdgeExampleClient(c config) *SkipEdgeExampleClient
NewSkipEdgeExampleClient returns a client for the SkipEdgeExample from the given config.
func (*SkipEdgeExampleClient) Create ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) Create() *SkipEdgeExampleCreate
Create returns a builder for creating a SkipEdgeExample entity.
func (*SkipEdgeExampleClient) CreateBulk ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) CreateBulk(builders ...*SkipEdgeExampleCreate) *SkipEdgeExampleCreateBulk
CreateBulk returns a builder for creating a bulk of SkipEdgeExample entities.
func (*SkipEdgeExampleClient) Delete ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) Delete() *SkipEdgeExampleDelete
Delete returns a delete builder for SkipEdgeExample.
func (*SkipEdgeExampleClient) DeleteOne ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) DeleteOne(see *SkipEdgeExample) *SkipEdgeExampleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SkipEdgeExampleClient) DeleteOneID ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) DeleteOneID(id int) *SkipEdgeExampleDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*SkipEdgeExampleClient) Get ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) Get(ctx context.Context, id int) (*SkipEdgeExample, error)
Get returns a SkipEdgeExample entity by its id.
func (*SkipEdgeExampleClient) GetX ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) GetX(ctx context.Context, id int) *SkipEdgeExample
GetX is like Get, but panics if an error occurs.
func (*SkipEdgeExampleClient) Hooks ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SkipEdgeExampleClient) Query ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) Query() *SkipEdgeExampleQuery
Query returns a query builder for SkipEdgeExample.
func (*SkipEdgeExampleClient) QueryUser ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) QueryUser(see *SkipEdgeExample) *UserQuery
QueryUser queries the user edge of a SkipEdgeExample.
func (*SkipEdgeExampleClient) Update ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) Update() *SkipEdgeExampleUpdate
Update returns an update builder for SkipEdgeExample.
func (*SkipEdgeExampleClient) UpdateOne ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) UpdateOne(see *SkipEdgeExample) *SkipEdgeExampleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SkipEdgeExampleClient) UpdateOneID ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) UpdateOneID(id int) *SkipEdgeExampleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SkipEdgeExampleClient) Use ¶ added in v0.3.0
func (c *SkipEdgeExampleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `skipedgeexample.Hooks(f(g(h())))`.
type SkipEdgeExampleCreate ¶ added in v0.3.0
type SkipEdgeExampleCreate struct {
// contains filtered or unexported fields
}
SkipEdgeExampleCreate is the builder for creating a SkipEdgeExample entity.
func (*SkipEdgeExampleCreate) Exec ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SkipEdgeExampleCreate) ExecX ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleCreate) Mutation ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) Mutation() *SkipEdgeExampleMutation
Mutation returns the SkipEdgeExampleMutation object of the builder.
func (*SkipEdgeExampleCreate) Save ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) Save(ctx context.Context) (*SkipEdgeExample, error)
Save creates the SkipEdgeExample in the database.
func (*SkipEdgeExampleCreate) SaveX ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) SaveX(ctx context.Context) *SkipEdgeExample
SaveX calls Save and panics if Save returns an error.
func (*SkipEdgeExampleCreate) SetNillableUserID ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) SetNillableUserID(id *int) *SkipEdgeExampleCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*SkipEdgeExampleCreate) SetUser ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) SetUser(u *User) *SkipEdgeExampleCreate
SetUser sets the "user" edge to the User entity.
func (*SkipEdgeExampleCreate) SetUserID ¶ added in v0.3.0
func (seec *SkipEdgeExampleCreate) SetUserID(id int) *SkipEdgeExampleCreate
SetUserID sets the "user" edge to the User entity by ID.
type SkipEdgeExampleCreateBulk ¶ added in v0.3.0
type SkipEdgeExampleCreateBulk struct {
// contains filtered or unexported fields
}
SkipEdgeExampleCreateBulk is the builder for creating many SkipEdgeExample entities in bulk.
func (*SkipEdgeExampleCreateBulk) Exec ¶ added in v0.3.0
func (seecb *SkipEdgeExampleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SkipEdgeExampleCreateBulk) ExecX ¶ added in v0.3.0
func (seecb *SkipEdgeExampleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleCreateBulk) Save ¶ added in v0.3.0
func (seecb *SkipEdgeExampleCreateBulk) Save(ctx context.Context) ([]*SkipEdgeExample, error)
Save creates the SkipEdgeExample entities in the database.
func (*SkipEdgeExampleCreateBulk) SaveX ¶ added in v0.3.0
func (seecb *SkipEdgeExampleCreateBulk) SaveX(ctx context.Context) []*SkipEdgeExample
SaveX is like Save, but panics if an error occurs.
type SkipEdgeExampleDelete ¶ added in v0.3.0
type SkipEdgeExampleDelete struct {
// contains filtered or unexported fields
}
SkipEdgeExampleDelete is the builder for deleting a SkipEdgeExample entity.
func (*SkipEdgeExampleDelete) Exec ¶ added in v0.3.0
func (seed *SkipEdgeExampleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SkipEdgeExampleDelete) ExecX ¶ added in v0.3.0
func (seed *SkipEdgeExampleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleDelete) Where ¶ added in v0.3.0
func (seed *SkipEdgeExampleDelete) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleDelete
Where appends a list predicates to the SkipEdgeExampleDelete builder.
type SkipEdgeExampleDeleteOne ¶ added in v0.3.0
type SkipEdgeExampleDeleteOne struct {
// contains filtered or unexported fields
}
SkipEdgeExampleDeleteOne is the builder for deleting a single SkipEdgeExample entity.
func (*SkipEdgeExampleDeleteOne) Exec ¶ added in v0.3.0
func (seedo *SkipEdgeExampleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SkipEdgeExampleDeleteOne) ExecX ¶ added in v0.3.0
func (seedo *SkipEdgeExampleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SkipEdgeExampleEdges ¶ added in v0.3.0
type SkipEdgeExampleEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
SkipEdgeExampleEdges holds the relations/edges for other nodes in the graph.
func (SkipEdgeExampleEdges) UserOrErr ¶ added in v0.3.0
func (e SkipEdgeExampleEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SkipEdgeExampleGroupBy ¶ added in v0.3.0
type SkipEdgeExampleGroupBy struct {
// contains filtered or unexported fields
}
SkipEdgeExampleGroupBy is the group-by builder for SkipEdgeExample entities.
func (*SkipEdgeExampleGroupBy) Aggregate ¶ added in v0.3.0
func (seegb *SkipEdgeExampleGroupBy) Aggregate(fns ...AggregateFunc) *SkipEdgeExampleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SkipEdgeExampleGroupBy) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) BoolX ¶ added in v0.3.0
BoolX is like Bool, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) BoolsX ¶ added in v0.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) IntX ¶ added in v0.3.0
IntX is like Int, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) IntsX ¶ added in v0.3.0
IntsX is like Ints, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) Scan ¶ added in v0.3.0
func (seegb *SkipEdgeExampleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*SkipEdgeExampleGroupBy) ScanX ¶ added in v0.3.0
ScanX is like Scan, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type SkipEdgeExampleMutation ¶ added in v0.3.0
type SkipEdgeExampleMutation struct {
// contains filtered or unexported fields
}
SkipEdgeExampleMutation represents an operation that mutates the SkipEdgeExample nodes in the graph.
func (*SkipEdgeExampleMutation) AddField ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) AddedEdges ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SkipEdgeExampleMutation) AddedField ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) AddedFields ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SkipEdgeExampleMutation) AddedIDs ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SkipEdgeExampleMutation) ClearEdge ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ClearField ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ClearUser ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*SkipEdgeExampleMutation) ClearedEdges ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SkipEdgeExampleMutation) ClearedFields ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SkipEdgeExampleMutation) Client ¶ added in v0.3.0
func (m SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) EdgeCleared ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SkipEdgeExampleMutation) Field ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) FieldCleared ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SkipEdgeExampleMutation) Fields ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ID ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SkipEdgeExampleMutation) IDs ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SkipEdgeExampleMutation) OldField ¶ added in v0.3.0
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 (*SkipEdgeExampleMutation) Op ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) Op() Op
Op returns the operation name.
func (*SkipEdgeExampleMutation) RemovedEdges ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SkipEdgeExampleMutation) RemovedIDs ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ResetEdge ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ResetField ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ResetUser ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*SkipEdgeExampleMutation) SetField ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) SetUserID ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (SkipEdgeExampleMutation) Tx ¶ added in v0.3.0
func (m SkipEdgeExampleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SkipEdgeExampleMutation) Type ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) Type() string
Type returns the node type of this mutation (SkipEdgeExample).
func (*SkipEdgeExampleMutation) UserCleared ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*SkipEdgeExampleMutation) UserID ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*SkipEdgeExampleMutation) UserIDs ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*SkipEdgeExampleMutation) Where ¶ added in v0.3.0
func (m *SkipEdgeExampleMutation) Where(ps ...predicate.SkipEdgeExample)
Where appends a list predicates to the SkipEdgeExampleMutation builder.
type SkipEdgeExampleQuery ¶ added in v0.3.0
type SkipEdgeExampleQuery struct {
// contains filtered or unexported fields
}
SkipEdgeExampleQuery is the builder for querying SkipEdgeExample entities.
func (*SkipEdgeExampleQuery) All ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) All(ctx context.Context) ([]*SkipEdgeExample, error)
All executes the query and returns a list of SkipEdgeExamples.
func (*SkipEdgeExampleQuery) AllX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) AllX(ctx context.Context) []*SkipEdgeExample
AllX is like All, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Clone ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Clone() *SkipEdgeExampleQuery
Clone returns a duplicate of the SkipEdgeExampleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SkipEdgeExampleQuery) Count ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SkipEdgeExampleQuery) CountX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Exist ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SkipEdgeExampleQuery) ExistX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SkipEdgeExampleQuery) First ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) First(ctx context.Context) (*SkipEdgeExample, error)
First returns the first SkipEdgeExample entity from the query. Returns a *NotFoundError when no SkipEdgeExample was found.
func (*SkipEdgeExampleQuery) FirstID ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SkipEdgeExample ID from the query. Returns a *NotFoundError when no SkipEdgeExample ID was found.
func (*SkipEdgeExampleQuery) FirstIDX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SkipEdgeExampleQuery) FirstX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) FirstX(ctx context.Context) *SkipEdgeExample
FirstX is like First, but panics if an error occurs.
func (*SkipEdgeExampleQuery) GroupBy ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) GroupBy(field string, fields ...string) *SkipEdgeExampleGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*SkipEdgeExampleQuery) IDs ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SkipEdgeExample IDs.
func (*SkipEdgeExampleQuery) IDsX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Limit ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Limit(limit int) *SkipEdgeExampleQuery
Limit adds a limit step to the query.
func (*SkipEdgeExampleQuery) Offset ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Offset(offset int) *SkipEdgeExampleQuery
Offset adds an offset step to the query.
func (*SkipEdgeExampleQuery) Only ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Only(ctx context.Context) (*SkipEdgeExample, error)
Only returns a single SkipEdgeExample entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SkipEdgeExample entity is found. Returns a *NotFoundError when no SkipEdgeExample entities are found.
func (*SkipEdgeExampleQuery) OnlyID ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SkipEdgeExample ID in the query. Returns a *NotSingularError when more than one SkipEdgeExample ID is found. Returns a *NotFoundError when no entities are found.
func (*SkipEdgeExampleQuery) OnlyIDX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SkipEdgeExampleQuery) OnlyX ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) OnlyX(ctx context.Context) *SkipEdgeExample
OnlyX is like Only, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Order ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Order(o ...OrderFunc) *SkipEdgeExampleQuery
Order adds an order step to the query.
func (*SkipEdgeExampleQuery) QueryUser ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*SkipEdgeExampleQuery) Select ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Select(fields ...string) *SkipEdgeExampleSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*SkipEdgeExampleQuery) Unique ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Unique(unique bool) *SkipEdgeExampleQuery
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 (*SkipEdgeExampleQuery) Where ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleQuery
Where adds a new predicate for the SkipEdgeExampleQuery builder.
func (*SkipEdgeExampleQuery) WithUser ¶ added in v0.3.0
func (seeq *SkipEdgeExampleQuery) WithUser(opts ...func(*UserQuery)) *SkipEdgeExampleQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type SkipEdgeExampleSelect ¶ added in v0.3.0
type SkipEdgeExampleSelect struct { *SkipEdgeExampleQuery // contains filtered or unexported fields }
SkipEdgeExampleSelect is the builder for selecting fields of SkipEdgeExample entities.
func (*SkipEdgeExampleSelect) Bool ¶ added in v0.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) BoolX ¶ added in v0.3.0
BoolX is like Bool, but panics if an error occurs.
func (*SkipEdgeExampleSelect) Bools ¶ added in v0.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) BoolsX ¶ added in v0.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*SkipEdgeExampleSelect) Float64 ¶ added in v0.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Float64X ¶ added in v0.3.0
Float64X is like Float64, but panics if an error occurs.
func (*SkipEdgeExampleSelect) Float64s ¶ added in v0.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Float64sX ¶ added in v0.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*SkipEdgeExampleSelect) Int ¶ added in v0.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) IntX ¶ added in v0.3.0
IntX is like Int, but panics if an error occurs.
func (*SkipEdgeExampleSelect) Ints ¶ added in v0.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) IntsX ¶ added in v0.3.0
IntsX is like Ints, but panics if an error occurs.
func (*SkipEdgeExampleSelect) Scan ¶ added in v0.3.0
func (sees *SkipEdgeExampleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SkipEdgeExampleSelect) ScanX ¶ added in v0.3.0
ScanX is like Scan, but panics if an error occurs.
func (*SkipEdgeExampleSelect) String ¶ added in v0.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) StringX ¶ added in v0.3.0
StringX is like String, but panics if an error occurs.
type SkipEdgeExampleUpdate ¶ added in v0.3.0
type SkipEdgeExampleUpdate struct {
// contains filtered or unexported fields
}
SkipEdgeExampleUpdate is the builder for updating SkipEdgeExample entities.
func (*SkipEdgeExampleUpdate) ClearUser ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) ClearUser() *SkipEdgeExampleUpdate
ClearUser clears the "user" edge to the User entity.
func (*SkipEdgeExampleUpdate) Exec ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SkipEdgeExampleUpdate) ExecX ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleUpdate) Mutation ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) Mutation() *SkipEdgeExampleMutation
Mutation returns the SkipEdgeExampleMutation object of the builder.
func (*SkipEdgeExampleUpdate) Save ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SkipEdgeExampleUpdate) SaveX ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SkipEdgeExampleUpdate) SetNillableUserID ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) SetNillableUserID(id *int) *SkipEdgeExampleUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*SkipEdgeExampleUpdate) SetUser ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) SetUser(u *User) *SkipEdgeExampleUpdate
SetUser sets the "user" edge to the User entity.
func (*SkipEdgeExampleUpdate) SetUserID ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) SetUserID(id int) *SkipEdgeExampleUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*SkipEdgeExampleUpdate) Where ¶ added in v0.3.0
func (seeu *SkipEdgeExampleUpdate) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleUpdate
Where appends a list predicates to the SkipEdgeExampleUpdate builder.
type SkipEdgeExampleUpdateOne ¶ added in v0.3.0
type SkipEdgeExampleUpdateOne struct {
// contains filtered or unexported fields
}
SkipEdgeExampleUpdateOne is the builder for updating a single SkipEdgeExample entity.
func (*SkipEdgeExampleUpdateOne) ClearUser ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) ClearUser() *SkipEdgeExampleUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*SkipEdgeExampleUpdateOne) Exec ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SkipEdgeExampleUpdateOne) ExecX ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleUpdateOne) Mutation ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) Mutation() *SkipEdgeExampleMutation
Mutation returns the SkipEdgeExampleMutation object of the builder.
func (*SkipEdgeExampleUpdateOne) Save ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) Save(ctx context.Context) (*SkipEdgeExample, error)
Save executes the query and returns the updated SkipEdgeExample entity.
func (*SkipEdgeExampleUpdateOne) SaveX ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) SaveX(ctx context.Context) *SkipEdgeExample
SaveX is like Save, but panics if an error occurs.
func (*SkipEdgeExampleUpdateOne) Select ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) Select(field string, fields ...string) *SkipEdgeExampleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SkipEdgeExampleUpdateOne) SetNillableUserID ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) SetNillableUserID(id *int) *SkipEdgeExampleUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*SkipEdgeExampleUpdateOne) SetUser ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) SetUser(u *User) *SkipEdgeExampleUpdateOne
SetUser sets the "user" edge to the User entity.
func (*SkipEdgeExampleUpdateOne) SetUserID ¶ added in v0.3.0
func (seeuo *SkipEdgeExampleUpdateOne) SetUserID(id int) *SkipEdgeExampleUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type SkipEdgeExamples ¶ added in v0.3.0
type SkipEdgeExamples []*SkipEdgeExample
SkipEdgeExamples is a parsable slice of SkipEdgeExample.
type Todo ¶
type Todo struct { // ID of the ent. ID int `json:"id,omitempty"` // Task holds the value of the "task" field. Task string `json:"task,omitempty"` // Status holds the value of the "status" field. Status todo.Status `json:"status,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TodoQuery when eager-loading is set. Edges TodoEdges `json:"edges"` // contains filtered or unexported fields }
Todo is the model entity for the Todo schema.
func (*Todo) Unwrap ¶
Unwrap unwraps the Todo 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 (*Todo) Update ¶
func (t *Todo) Update() *TodoUpdateOne
Update returns a builder for updating this Todo. Note that you need to call Todo.Unwrap() before calling this method if this Todo was returned from a transaction, and the transaction was committed or rolled back.
type TodoClient ¶
type TodoClient struct {
// contains filtered or unexported fields
}
TodoClient is a client for the Todo schema.
func NewTodoClient ¶
func NewTodoClient(c config) *TodoClient
NewTodoClient returns a client for the Todo from the given config.
func (*TodoClient) Create ¶
func (c *TodoClient) Create() *TodoCreate
Create returns a builder for creating a Todo entity.
func (*TodoClient) CreateBulk ¶
func (c *TodoClient) CreateBulk(builders ...*TodoCreate) *TodoCreateBulk
CreateBulk returns a builder for creating a bulk of Todo entities.
func (*TodoClient) Delete ¶
func (c *TodoClient) Delete() *TodoDelete
Delete returns a delete builder for Todo.
func (*TodoClient) DeleteOne ¶
func (c *TodoClient) DeleteOne(t *Todo) *TodoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TodoClient) DeleteOneID ¶
func (c *TodoClient) DeleteOneID(id int) *TodoDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*TodoClient) GetX ¶
func (c *TodoClient) GetX(ctx context.Context, id int) *Todo
GetX is like Get, but panics if an error occurs.
func (*TodoClient) Query ¶
func (c *TodoClient) Query() *TodoQuery
Query returns a query builder for Todo.
func (*TodoClient) QueryUser ¶
func (c *TodoClient) QueryUser(t *Todo) *UserQuery
QueryUser queries the user edge of a Todo.
func (*TodoClient) Update ¶
func (c *TodoClient) Update() *TodoUpdate
Update returns an update builder for Todo.
func (*TodoClient) UpdateOne ¶
func (c *TodoClient) UpdateOne(t *Todo) *TodoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TodoClient) UpdateOneID ¶
func (c *TodoClient) UpdateOneID(id int) *TodoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TodoClient) Use ¶
func (c *TodoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `todo.Hooks(f(g(h())))`.
type TodoCreate ¶
type TodoCreate struct {
// contains filtered or unexported fields
}
TodoCreate is the builder for creating a Todo entity.
func (*TodoCreate) Exec ¶ added in v0.2.0
func (tc *TodoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoCreate) ExecX ¶ added in v0.2.0
func (tc *TodoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TodoCreate) Mutation ¶
func (tc *TodoCreate) Mutation() *TodoMutation
Mutation returns the TodoMutation object of the builder.
func (*TodoCreate) Save ¶
func (tc *TodoCreate) Save(ctx context.Context) (*Todo, error)
Save creates the Todo in the database.
func (*TodoCreate) SaveX ¶
func (tc *TodoCreate) SaveX(ctx context.Context) *Todo
SaveX calls Save and panics if Save returns an error.
func (*TodoCreate) SetNillableStatus ¶
func (tc *TodoCreate) SetNillableStatus(t *todo.Status) *TodoCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TodoCreate) SetNillableUserID ¶
func (tc *TodoCreate) SetNillableUserID(id *int) *TodoCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*TodoCreate) SetStatus ¶
func (tc *TodoCreate) SetStatus(t todo.Status) *TodoCreate
SetStatus sets the "status" field.
func (*TodoCreate) SetTask ¶
func (tc *TodoCreate) SetTask(s string) *TodoCreate
SetTask sets the "task" field.
func (*TodoCreate) SetUser ¶
func (tc *TodoCreate) SetUser(u *User) *TodoCreate
SetUser sets the "user" edge to the User entity.
func (*TodoCreate) SetUserID ¶
func (tc *TodoCreate) SetUserID(id int) *TodoCreate
SetUserID sets the "user" edge to the User entity by ID.
type TodoCreateBulk ¶
type TodoCreateBulk struct {
// contains filtered or unexported fields
}
TodoCreateBulk is the builder for creating many Todo entities in bulk.
func (*TodoCreateBulk) Exec ¶ added in v0.2.0
func (tcb *TodoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoCreateBulk) ExecX ¶ added in v0.2.0
func (tcb *TodoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TodoDelete ¶
type TodoDelete struct {
// contains filtered or unexported fields
}
TodoDelete is the builder for deleting a Todo entity.
func (*TodoDelete) Exec ¶
func (td *TodoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TodoDelete) ExecX ¶
func (td *TodoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TodoDelete) Where ¶
func (td *TodoDelete) Where(ps ...predicate.Todo) *TodoDelete
Where appends a list predicates to the TodoDelete builder.
type TodoDeleteOne ¶
type TodoDeleteOne struct {
// contains filtered or unexported fields
}
TodoDeleteOne is the builder for deleting a single Todo entity.
func (*TodoDeleteOne) Exec ¶
func (tdo *TodoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TodoDeleteOne) ExecX ¶
func (tdo *TodoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TodoEdges ¶
type TodoEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
TodoEdges holds the relations/edges for other nodes in the graph.
type TodoGroupBy ¶
type TodoGroupBy struct {
// contains filtered or unexported fields
}
TodoGroupBy is the group-by builder for Todo entities.
func (*TodoGroupBy) Aggregate ¶
func (tgb *TodoGroupBy) Aggregate(fns ...AggregateFunc) *TodoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TodoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TodoGroupBy) Scan ¶
func (tgb *TodoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*TodoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TodoMutation ¶
type TodoMutation struct {
// contains filtered or unexported fields
}
TodoMutation represents an operation that mutates the Todo nodes in the graph.
func (*TodoMutation) AddField ¶
func (m *TodoMutation) 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 (*TodoMutation) AddedEdges ¶
func (m *TodoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TodoMutation) AddedField ¶
func (m *TodoMutation) 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 (*TodoMutation) AddedFields ¶
func (m *TodoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TodoMutation) AddedIDs ¶
func (m *TodoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TodoMutation) ClearEdge ¶
func (m *TodoMutation) 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 (*TodoMutation) ClearField ¶
func (m *TodoMutation) 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 (*TodoMutation) ClearUser ¶
func (m *TodoMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*TodoMutation) ClearedEdges ¶
func (m *TodoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TodoMutation) ClearedFields ¶
func (m *TodoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TodoMutation) Client ¶
func (m TodoMutation) 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 (*TodoMutation) EdgeCleared ¶
func (m *TodoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TodoMutation) Field ¶
func (m *TodoMutation) 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 (*TodoMutation) FieldCleared ¶
func (m *TodoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TodoMutation) Fields ¶
func (m *TodoMutation) 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 (*TodoMutation) ID ¶
func (m *TodoMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TodoMutation) IDs ¶ added in v0.3.0
func (m *TodoMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TodoMutation) 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 (*TodoMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Todo entity. If the Todo 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 (*TodoMutation) OldTask ¶
func (m *TodoMutation) OldTask(ctx context.Context) (v string, err error)
OldTask returns the old "task" field's value of the Todo entity. If the Todo 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 (*TodoMutation) RemovedEdges ¶
func (m *TodoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TodoMutation) RemovedIDs ¶
func (m *TodoMutation) 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 (*TodoMutation) ResetEdge ¶
func (m *TodoMutation) 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 (*TodoMutation) ResetField ¶
func (m *TodoMutation) 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 (*TodoMutation) ResetStatus ¶
func (m *TodoMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TodoMutation) ResetTask ¶
func (m *TodoMutation) ResetTask()
ResetTask resets all changes to the "task" field.
func (*TodoMutation) ResetUser ¶
func (m *TodoMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*TodoMutation) SetField ¶
func (m *TodoMutation) 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 (*TodoMutation) SetStatus ¶
func (m *TodoMutation) SetStatus(t todo.Status)
SetStatus sets the "status" field.
func (*TodoMutation) SetTask ¶
func (m *TodoMutation) SetTask(s string)
SetTask sets the "task" field.
func (*TodoMutation) SetUserID ¶
func (m *TodoMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*TodoMutation) Status ¶
func (m *TodoMutation) Status() (r todo.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*TodoMutation) Task ¶
func (m *TodoMutation) Task() (r string, exists bool)
Task returns the value of the "task" field in the mutation.
func (TodoMutation) Tx ¶
func (m TodoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TodoMutation) Type ¶
func (m *TodoMutation) Type() string
Type returns the node type of this mutation (Todo).
func (*TodoMutation) UserCleared ¶
func (m *TodoMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*TodoMutation) UserID ¶
func (m *TodoMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*TodoMutation) UserIDs ¶
func (m *TodoMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*TodoMutation) Where ¶ added in v0.2.0
func (m *TodoMutation) Where(ps ...predicate.Todo)
Where appends a list predicates to the TodoMutation builder.
type TodoQuery ¶
type TodoQuery struct {
// contains filtered or unexported fields
}
TodoQuery is the builder for querying Todo entities.
func (*TodoQuery) Clone ¶
Clone returns a duplicate of the TodoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TodoQuery) First ¶
First returns the first Todo entity from the query. Returns a *NotFoundError when no Todo was found.
func (*TodoQuery) FirstID ¶
FirstID returns the first Todo ID from the query. Returns a *NotFoundError when no Todo ID was found.
func (*TodoQuery) GroupBy ¶
func (tq *TodoQuery) GroupBy(field string, fields ...string) *TodoGroupBy
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 { Task string `json:"task,omitempty"` Count int `json:"count,omitempty"` } client.Todo.Query(). GroupBy(todo.FieldTask). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TodoQuery) Only ¶
Only returns a single Todo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Todo entity is found. Returns a *NotFoundError when no Todo entities are found.
func (*TodoQuery) OnlyID ¶
OnlyID is like Only, but returns the only Todo ID in the query. Returns a *NotSingularError when more than one Todo ID is found. Returns a *NotFoundError when no entities are found.
func (*TodoQuery) Select ¶
func (tq *TodoQuery) Select(fields ...string) *TodoSelect
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 { Task string `json:"task,omitempty"` } client.Todo.Query(). Select(todo.FieldTask). Scan(ctx, &v)
func (*TodoQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type TodoSelect ¶
type TodoSelect struct { *TodoQuery // contains filtered or unexported fields }
TodoSelect is the builder for selecting fields of Todo entities.
func (*TodoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TodoSelect) Scan ¶
func (ts *TodoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TodoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TodoUpdate ¶
type TodoUpdate struct {
// contains filtered or unexported fields
}
TodoUpdate is the builder for updating Todo entities.
func (*TodoUpdate) ClearUser ¶
func (tu *TodoUpdate) ClearUser() *TodoUpdate
ClearUser clears the "user" edge to the User entity.
func (*TodoUpdate) Exec ¶
func (tu *TodoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoUpdate) ExecX ¶
func (tu *TodoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TodoUpdate) Mutation ¶
func (tu *TodoUpdate) Mutation() *TodoMutation
Mutation returns the TodoMutation object of the builder.
func (*TodoUpdate) Save ¶
func (tu *TodoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TodoUpdate) SaveX ¶
func (tu *TodoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TodoUpdate) SetNillableStatus ¶
func (tu *TodoUpdate) SetNillableStatus(t *todo.Status) *TodoUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TodoUpdate) SetNillableUserID ¶
func (tu *TodoUpdate) SetNillableUserID(id *int) *TodoUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*TodoUpdate) SetStatus ¶
func (tu *TodoUpdate) SetStatus(t todo.Status) *TodoUpdate
SetStatus sets the "status" field.
func (*TodoUpdate) SetTask ¶
func (tu *TodoUpdate) SetTask(s string) *TodoUpdate
SetTask sets the "task" field.
func (*TodoUpdate) SetUser ¶
func (tu *TodoUpdate) SetUser(u *User) *TodoUpdate
SetUser sets the "user" edge to the User entity.
func (*TodoUpdate) SetUserID ¶
func (tu *TodoUpdate) SetUserID(id int) *TodoUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*TodoUpdate) Where ¶
func (tu *TodoUpdate) Where(ps ...predicate.Todo) *TodoUpdate
Where appends a list predicates to the TodoUpdate builder.
type TodoUpdateOne ¶
type TodoUpdateOne struct {
// contains filtered or unexported fields
}
TodoUpdateOne is the builder for updating a single Todo entity.
func (*TodoUpdateOne) ClearUser ¶
func (tuo *TodoUpdateOne) ClearUser() *TodoUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*TodoUpdateOne) Exec ¶
func (tuo *TodoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TodoUpdateOne) ExecX ¶
func (tuo *TodoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TodoUpdateOne) Mutation ¶
func (tuo *TodoUpdateOne) Mutation() *TodoMutation
Mutation returns the TodoMutation object of the builder.
func (*TodoUpdateOne) Save ¶
func (tuo *TodoUpdateOne) Save(ctx context.Context) (*Todo, error)
Save executes the query and returns the updated Todo entity.
func (*TodoUpdateOne) SaveX ¶
func (tuo *TodoUpdateOne) SaveX(ctx context.Context) *Todo
SaveX is like Save, but panics if an error occurs.
func (*TodoUpdateOne) Select ¶
func (tuo *TodoUpdateOne) Select(field string, fields ...string) *TodoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TodoUpdateOne) SetNillableStatus ¶
func (tuo *TodoUpdateOne) SetNillableStatus(t *todo.Status) *TodoUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TodoUpdateOne) SetNillableUserID ¶
func (tuo *TodoUpdateOne) SetNillableUserID(id *int) *TodoUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*TodoUpdateOne) SetStatus ¶
func (tuo *TodoUpdateOne) SetStatus(t todo.Status) *TodoUpdateOne
SetStatus sets the "status" field.
func (*TodoUpdateOne) SetTask ¶
func (tuo *TodoUpdateOne) SetTask(s string) *TodoUpdateOne
SetTask sets the "task" field.
func (*TodoUpdateOne) SetUser ¶
func (tuo *TodoUpdateOne) SetUser(u *User) *TodoUpdateOne
SetUser sets the "user" edge to the User entity.
func (*TodoUpdateOne) SetUserID ¶
func (tuo *TodoUpdateOne) SetUserID(id int) *TodoUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type Tx ¶
type Tx struct { // Attachment is the client for interacting with the Attachment builders. Attachment *AttachmentClient // Group is the client for interacting with the Group builders. Group *GroupClient // MultiWordSchema is the client for interacting with the MultiWordSchema builders. MultiWordSchema *MultiWordSchemaClient // NilExample is the client for interacting with the NilExample builders. NilExample *NilExampleClient // Pet is the client for interacting with the Pet builders. Pet *PetClient // Pony is the client for interacting with the Pony builders. Pony *PonyClient // SkipEdgeExample is the client for interacting with the SkipEdgeExample builders. SkipEdgeExample *SkipEdgeExampleClient // Todo is the client for interacting with the Todo builders. Todo *TodoClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // UserName holds the value of the "user_name" field. UserName string `json:"user_name,omitempty"` // Joined holds the value of the "joined" field. Joined time.Time `json:"joined,omitempty"` // Points holds the value of the "points" field. Points uint `json:"points,omitempty"` // Exp holds the value of the "exp" field. Exp uint64 `json:"exp,omitempty"` // Status holds the value of the "status" field. Status user.Status `json:"status,omitempty"` // ExternalID holds the value of the "external_id" field. ExternalID int `json:"external_id,omitempty"` // CrmID holds the value of the "crm_id" field. CrmID uuid.UUID `json:"crm_id,omitempty"` // Banned holds the value of the "banned" field. Banned bool `json:"banned,omitempty"` // CustomPb holds the value of the "custom_pb" field. CustomPb uint8 `json:"custom_pb,omitempty"` // OptNum holds the value of the "opt_num" field. OptNum int `json:"opt_num,omitempty"` // OptStr holds the value of the "opt_str" field. OptStr string `json:"opt_str,omitempty"` // OptBool holds the value of the "opt_bool" field. OptBool bool `json:"opt_bool,omitempty"` // BigInt holds the value of the "big_int" field. BigInt schema.BigInt `json:"big_int,omitempty"` // BUser1 holds the value of the "b_user_1" field. BUser1 int `json:"b_user_1,omitempty"` // HeightInCm holds the value of the "height_in_cm" field. HeightInCm float32 `json:"height_in_cm,omitempty"` // AccountBalance holds the value of the "account_balance" field. AccountBalance float64 `json:"account_balance,omitempty"` // Unnecessary holds the value of the "unnecessary" field. Unnecessary string `json:"unnecessary,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // Labels holds the value of the "labels" field. Labels []string `json:"labels,omitempty"` // DeviceType holds the value of the "device_type" field. DeviceType user.DeviceType `json:"device_type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryAttachment ¶
func (u *User) QueryAttachment() *AttachmentQuery
QueryAttachment queries the "attachment" edge of the User entity.
func (*User) QueryGroup ¶
func (u *User) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the User entity.
func (*User) QueryReceived1 ¶ added in v0.2.0
func (u *User) QueryReceived1() *AttachmentQuery
QueryReceived1 queries the "received_1" edge of the User entity.
func (*User) QuerySkipEdge ¶ added in v0.3.0
func (u *User) QuerySkipEdge() *SkipEdgeExampleQuery
QuerySkipEdge queries the "skip_edge" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryAttachment ¶
func (c *UserClient) QueryAttachment(u *User) *AttachmentQuery
QueryAttachment queries the attachment edge of a User.
func (*UserClient) QueryGroup ¶
func (c *UserClient) QueryGroup(u *User) *GroupQuery
QueryGroup queries the group edge of a User.
func (*UserClient) QueryPet ¶ added in v0.3.0
func (c *UserClient) QueryPet(u *User) *PetQuery
QueryPet queries the pet edge of a User.
func (*UserClient) QueryReceived1 ¶ added in v0.2.0
func (c *UserClient) QueryReceived1(u *User) *AttachmentQuery
QueryReceived1 queries the received_1 edge of a User.
func (*UserClient) QuerySkipEdge ¶ added in v0.3.0
func (c *UserClient) QuerySkipEdge(u *User) *SkipEdgeExampleQuery
QuerySkipEdge queries the skip_edge edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddReceived1 ¶ added in v0.2.0
func (uc *UserCreate) AddReceived1(a ...*Attachment) *UserCreate
AddReceived1 adds the "received_1" edges to the Attachment entity.
func (*UserCreate) AddReceived1IDs ¶ added in v0.2.0
func (uc *UserCreate) AddReceived1IDs(ids ...uuid.UUID) *UserCreate
AddReceived1IDs adds the "received_1" edge to the Attachment entity by IDs.
func (*UserCreate) Exec ¶ added in v0.2.0
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶ added in v0.2.0
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAccountBalance ¶ added in v0.2.0
func (uc *UserCreate) SetAccountBalance(f float64) *UserCreate
SetAccountBalance sets the "account_balance" field.
func (*UserCreate) SetAttachment ¶
func (uc *UserCreate) SetAttachment(a *Attachment) *UserCreate
SetAttachment sets the "attachment" edge to the Attachment entity.
func (*UserCreate) SetAttachmentID ¶
func (uc *UserCreate) SetAttachmentID(id uuid.UUID) *UserCreate
SetAttachmentID sets the "attachment" edge to the Attachment entity by ID.
func (*UserCreate) SetBUser1 ¶ added in v0.2.0
func (uc *UserCreate) SetBUser1(i int) *UserCreate
SetBUser1 sets the "b_user_1" field.
func (*UserCreate) SetBanned ¶
func (uc *UserCreate) SetBanned(b bool) *UserCreate
SetBanned sets the "banned" field.
func (*UserCreate) SetBigInt ¶
func (uc *UserCreate) SetBigInt(si schema.BigInt) *UserCreate
SetBigInt sets the "big_int" field.
func (*UserCreate) SetCrmID ¶
func (uc *UserCreate) SetCrmID(u uuid.UUID) *UserCreate
SetCrmID sets the "crm_id" field.
func (*UserCreate) SetCustomPb ¶
func (uc *UserCreate) SetCustomPb(u uint8) *UserCreate
SetCustomPb sets the "custom_pb" field.
func (*UserCreate) SetDeviceType ¶ added in v0.3.0
func (uc *UserCreate) SetDeviceType(ut user.DeviceType) *UserCreate
SetDeviceType sets the "device_type" field.
func (*UserCreate) SetExp ¶
func (uc *UserCreate) SetExp(u uint64) *UserCreate
SetExp sets the "exp" field.
func (*UserCreate) SetExternalID ¶
func (uc *UserCreate) SetExternalID(i int) *UserCreate
SetExternalID sets the "external_id" field.
func (*UserCreate) SetGroup ¶
func (uc *UserCreate) SetGroup(g *Group) *UserCreate
SetGroup sets the "group" edge to the Group entity.
func (*UserCreate) SetGroupID ¶
func (uc *UserCreate) SetGroupID(id int) *UserCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserCreate) SetHeightInCm ¶ added in v0.2.0
func (uc *UserCreate) SetHeightInCm(f float32) *UserCreate
SetHeightInCm sets the "height_in_cm" field.
func (*UserCreate) SetJoined ¶
func (uc *UserCreate) SetJoined(t time.Time) *UserCreate
SetJoined sets the "joined" field.
func (*UserCreate) SetLabels ¶ added in v0.3.0
func (uc *UserCreate) SetLabels(s []string) *UserCreate
SetLabels sets the "labels" field.
func (*UserCreate) SetNillableAccountBalance ¶ added in v0.2.0
func (uc *UserCreate) SetNillableAccountBalance(f *float64) *UserCreate
SetNillableAccountBalance sets the "account_balance" field if the given value is not nil.
func (*UserCreate) SetNillableAttachmentID ¶
func (uc *UserCreate) SetNillableAttachmentID(id *uuid.UUID) *UserCreate
SetNillableAttachmentID sets the "attachment" edge to the Attachment entity by ID if the given value is not nil.
func (*UserCreate) SetNillableBUser1 ¶ added in v0.2.0
func (uc *UserCreate) SetNillableBUser1(i *int) *UserCreate
SetNillableBUser1 sets the "b_user_1" field if the given value is not nil.
func (*UserCreate) SetNillableBanned ¶
func (uc *UserCreate) SetNillableBanned(b *bool) *UserCreate
SetNillableBanned sets the "banned" field if the given value is not nil.
func (*UserCreate) SetNillableBigInt ¶
func (uc *UserCreate) SetNillableBigInt(si *schema.BigInt) *UserCreate
SetNillableBigInt sets the "big_int" field if the given value is not nil.
func (*UserCreate) SetNillableDeviceType ¶ added in v0.3.0
func (uc *UserCreate) SetNillableDeviceType(ut *user.DeviceType) *UserCreate
SetNillableDeviceType sets the "device_type" field if the given value is not nil.
func (*UserCreate) SetNillableGroupID ¶
func (uc *UserCreate) SetNillableGroupID(id *int) *UserCreate
SetNillableGroupID sets the "group" edge to the Group entity by ID if the given value is not nil.
func (*UserCreate) SetNillableHeightInCm ¶ added in v0.2.0
func (uc *UserCreate) SetNillableHeightInCm(f *float32) *UserCreate
SetNillableHeightInCm sets the "height_in_cm" field if the given value is not nil.
func (*UserCreate) SetNillableOptBool ¶
func (uc *UserCreate) SetNillableOptBool(b *bool) *UserCreate
SetNillableOptBool sets the "opt_bool" field if the given value is not nil.
func (*UserCreate) SetNillableOptNum ¶
func (uc *UserCreate) SetNillableOptNum(i *int) *UserCreate
SetNillableOptNum sets the "opt_num" field if the given value is not nil.
func (*UserCreate) SetNillableOptStr ¶
func (uc *UserCreate) SetNillableOptStr(s *string) *UserCreate
SetNillableOptStr sets the "opt_str" field if the given value is not nil.
func (*UserCreate) SetNillablePetID ¶ added in v0.3.0
func (uc *UserCreate) SetNillablePetID(id *int) *UserCreate
SetNillablePetID sets the "pet" edge to the Pet entity by ID if the given value is not nil.
func (*UserCreate) SetNillableSkipEdgeID ¶ added in v0.3.0
func (uc *UserCreate) SetNillableSkipEdgeID(id *int) *UserCreate
SetNillableSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID if the given value is not nil.
func (*UserCreate) SetNillableType ¶ added in v0.3.0
func (uc *UserCreate) SetNillableType(s *string) *UserCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserCreate) SetNillableUnnecessary ¶ added in v0.3.0
func (uc *UserCreate) SetNillableUnnecessary(s *string) *UserCreate
SetNillableUnnecessary sets the "unnecessary" field if the given value is not nil.
func (*UserCreate) SetOptBool ¶
func (uc *UserCreate) SetOptBool(b bool) *UserCreate
SetOptBool sets the "opt_bool" field.
func (*UserCreate) SetOptNum ¶
func (uc *UserCreate) SetOptNum(i int) *UserCreate
SetOptNum sets the "opt_num" field.
func (*UserCreate) SetOptStr ¶
func (uc *UserCreate) SetOptStr(s string) *UserCreate
SetOptStr sets the "opt_str" field.
func (*UserCreate) SetPet ¶ added in v0.3.0
func (uc *UserCreate) SetPet(p *Pet) *UserCreate
SetPet sets the "pet" edge to the Pet entity.
func (*UserCreate) SetPetID ¶ added in v0.3.0
func (uc *UserCreate) SetPetID(id int) *UserCreate
SetPetID sets the "pet" edge to the Pet entity by ID.
func (*UserCreate) SetPoints ¶
func (uc *UserCreate) SetPoints(u uint) *UserCreate
SetPoints sets the "points" field.
func (*UserCreate) SetSkipEdge ¶ added in v0.3.0
func (uc *UserCreate) SetSkipEdge(s *SkipEdgeExample) *UserCreate
SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserCreate) SetSkipEdgeID ¶ added in v0.3.0
func (uc *UserCreate) SetSkipEdgeID(id int) *UserCreate
SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetType ¶ added in v0.3.0
func (uc *UserCreate) SetType(s string) *UserCreate
SetType sets the "type" field.
func (*UserCreate) SetUnnecessary ¶ added in v0.3.0
func (uc *UserCreate) SetUnnecessary(s string) *UserCreate
SetUnnecessary sets the "unnecessary" field.
func (*UserCreate) SetUserName ¶
func (uc *UserCreate) SetUserName(s string) *UserCreate
SetUserName sets the "user_name" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶ added in v0.2.0
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶ added in v0.2.0
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // Attachment holds the value of the attachment edge. Attachment *Attachment `json:"attachment,omitempty"` // Received1 holds the value of the received_1 edge. Received1 []*Attachment `json:"received_1,omitempty"` // Pet holds the value of the pet edge. Pet *Pet `json:"pet,omitempty"` // SkipEdge holds the value of the skip_edge edge. SkipEdge *SkipEdgeExample `json:"skip_edge,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) AttachmentOrErr ¶
func (e UserEdges) AttachmentOrErr() (*Attachment, error)
AttachmentOrErr returns the Attachment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) GroupOrErr ¶
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) PetOrErr ¶ added in v0.3.0
PetOrErr returns the Pet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) Received1OrErr ¶ added in v0.2.0
func (e UserEdges) Received1OrErr() ([]*Attachment, error)
Received1OrErr returns the Received1 value or an error if the edge was not loaded in eager-loading.
func (UserEdges) SkipEdgeOrErr ¶ added in v0.3.0
func (e UserEdges) SkipEdgeOrErr() (*SkipEdgeExample, error)
SkipEdgeOrErr returns the SkipEdge value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AccountBalance ¶ added in v0.2.0
func (m *UserMutation) AccountBalance() (r float64, exists bool)
AccountBalance returns the value of the "account_balance" field in the mutation.
func (*UserMutation) AddAccountBalance ¶ added in v0.2.0
func (m *UserMutation) AddAccountBalance(f float64)
AddAccountBalance adds f to the "account_balance" field.
func (*UserMutation) AddBUser1 ¶ added in v0.2.0
func (m *UserMutation) AddBUser1(i int)
AddBUser1 adds i to the "b_user_1" field.
func (*UserMutation) AddCustomPb ¶
func (m *UserMutation) AddCustomPb(u int8)
AddCustomPb adds u to the "custom_pb" field.
func (*UserMutation) AddExp ¶
func (m *UserMutation) AddExp(u int64)
AddExp adds u to the "exp" field.
func (*UserMutation) AddExternalID ¶
func (m *UserMutation) AddExternalID(i int)
AddExternalID adds i to the "external_id" field.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddHeightInCm ¶ added in v0.2.0
func (m *UserMutation) AddHeightInCm(f float32)
AddHeightInCm adds f to the "height_in_cm" field.
func (*UserMutation) AddOptNum ¶
func (m *UserMutation) AddOptNum(i int)
AddOptNum adds i to the "opt_num" field.
func (*UserMutation) AddPoints ¶
func (m *UserMutation) AddPoints(u int)
AddPoints adds u to the "points" field.
func (*UserMutation) AddReceived1IDs ¶ added in v0.2.0
func (m *UserMutation) AddReceived1IDs(ids ...uuid.UUID)
AddReceived1IDs adds the "received_1" edge to the Attachment entity by ids.
func (*UserMutation) AddedAccountBalance ¶ added in v0.2.0
func (m *UserMutation) AddedAccountBalance() (r float64, exists bool)
AddedAccountBalance returns the value that was added to the "account_balance" field in this mutation.
func (*UserMutation) AddedBUser1 ¶ added in v0.2.0
func (m *UserMutation) AddedBUser1() (r int, exists bool)
AddedBUser1 returns the value that was added to the "b_user_1" field in this mutation.
func (*UserMutation) AddedCustomPb ¶
func (m *UserMutation) AddedCustomPb() (r int8, exists bool)
AddedCustomPb returns the value that was added to the "custom_pb" field in this mutation.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedExp ¶
func (m *UserMutation) AddedExp() (r int64, exists bool)
AddedExp returns the value that was added to the "exp" field in this mutation.
func (*UserMutation) AddedExternalID ¶
func (m *UserMutation) AddedExternalID() (r int, exists bool)
AddedExternalID returns the value that was added to the "external_id" field in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedHeightInCm ¶ added in v0.2.0
func (m *UserMutation) AddedHeightInCm() (r float32, exists bool)
AddedHeightInCm returns the value that was added to the "height_in_cm" field in this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedOptNum ¶
func (m *UserMutation) AddedOptNum() (r int, exists bool)
AddedOptNum returns the value that was added to the "opt_num" field in this mutation.
func (*UserMutation) AddedPoints ¶
func (m *UserMutation) AddedPoints() (r int, exists bool)
AddedPoints returns the value that was added to the "points" field in this mutation.
func (*UserMutation) AppendLabels ¶ added in v0.3.3
func (m *UserMutation) AppendLabels(s []string)
AppendLabels adds s to the "labels" field.
func (*UserMutation) AppendedLabels ¶ added in v0.3.3
func (m *UserMutation) AppendedLabels() ([]string, bool)
AppendedLabels returns the list of values that were appended to the "labels" field in this mutation.
func (*UserMutation) AttachmentCleared ¶
func (m *UserMutation) AttachmentCleared() bool
AttachmentCleared reports if the "attachment" edge to the Attachment entity was cleared.
func (*UserMutation) AttachmentID ¶
func (m *UserMutation) AttachmentID() (id uuid.UUID, exists bool)
AttachmentID returns the "attachment" edge ID in the mutation.
func (*UserMutation) AttachmentIDs ¶
func (m *UserMutation) AttachmentIDs() (ids []uuid.UUID)
AttachmentIDs returns the "attachment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AttachmentID instead. It exists only for internal usage by the builders.
func (*UserMutation) BUser1 ¶ added in v0.2.0
func (m *UserMutation) BUser1() (r int, exists bool)
BUser1 returns the value of the "b_user_1" field in the mutation.
func (*UserMutation) BUser1Cleared ¶ added in v0.2.0
func (m *UserMutation) BUser1Cleared() bool
BUser1Cleared returns if the "b_user_1" field was cleared in this mutation.
func (*UserMutation) Banned ¶
func (m *UserMutation) Banned() (r bool, exists bool)
Banned returns the value of the "banned" field in the mutation.
func (*UserMutation) BigInt ¶
func (m *UserMutation) BigInt() (r schema.BigInt, exists bool)
BigInt returns the value of the "big_int" field in the mutation.
func (*UserMutation) BigIntCleared ¶
func (m *UserMutation) BigIntCleared() bool
BigIntCleared returns if the "big_int" field was cleared in this mutation.
func (*UserMutation) ClearAttachment ¶
func (m *UserMutation) ClearAttachment()
ClearAttachment clears the "attachment" edge to the Attachment entity.
func (*UserMutation) ClearBUser1 ¶ added in v0.2.0
func (m *UserMutation) ClearBUser1()
ClearBUser1 clears the value of the "b_user_1" field.
func (*UserMutation) ClearBigInt ¶
func (m *UserMutation) ClearBigInt()
ClearBigInt clears the value of the "big_int" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearGroup ¶
func (m *UserMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*UserMutation) ClearLabels ¶ added in v0.3.0
func (m *UserMutation) ClearLabels()
ClearLabels clears the value of the "labels" field.
func (*UserMutation) ClearOptBool ¶
func (m *UserMutation) ClearOptBool()
ClearOptBool clears the value of the "opt_bool" field.
func (*UserMutation) ClearOptNum ¶
func (m *UserMutation) ClearOptNum()
ClearOptNum clears the value of the "opt_num" field.
func (*UserMutation) ClearOptStr ¶
func (m *UserMutation) ClearOptStr()
ClearOptStr clears the value of the "opt_str" field.
func (*UserMutation) ClearPet ¶ added in v0.3.0
func (m *UserMutation) ClearPet()
ClearPet clears the "pet" edge to the Pet entity.
func (*UserMutation) ClearReceived1 ¶ added in v0.2.0
func (m *UserMutation) ClearReceived1()
ClearReceived1 clears the "received_1" edge to the Attachment entity.
func (*UserMutation) ClearSkipEdge ¶ added in v0.3.0
func (m *UserMutation) ClearSkipEdge()
ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserMutation) ClearType ¶ added in v0.3.0
func (m *UserMutation) ClearType()
ClearType clears the value of the "type" field.
func (*UserMutation) ClearUnnecessary ¶ added in v0.3.0
func (m *UserMutation) ClearUnnecessary()
ClearUnnecessary clears the value of the "unnecessary" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CrmID ¶
func (m *UserMutation) CrmID() (r uuid.UUID, exists bool)
CrmID returns the value of the "crm_id" field in the mutation.
func (*UserMutation) CustomPb ¶
func (m *UserMutation) CustomPb() (r uint8, exists bool)
CustomPb returns the value of the "custom_pb" field in the mutation.
func (*UserMutation) DeviceType ¶ added in v0.3.0
func (m *UserMutation) DeviceType() (r user.DeviceType, exists bool)
DeviceType returns the value of the "device_type" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Exp ¶
func (m *UserMutation) Exp() (r uint64, exists bool)
Exp returns the value of the "exp" field in the mutation.
func (*UserMutation) ExternalID ¶
func (m *UserMutation) ExternalID() (r int, exists bool)
ExternalID returns the value of the "external_id" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) GetType ¶ added in v0.3.0
func (m *UserMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserMutation) GroupCleared ¶
func (m *UserMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*UserMutation) GroupID ¶
func (m *UserMutation) GroupID() (id int, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*UserMutation) GroupIDs ¶
func (m *UserMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*UserMutation) HeightInCm ¶ added in v0.2.0
func (m *UserMutation) HeightInCm() (r float32, exists bool)
HeightInCm returns the value of the "height_in_cm" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶ added in v0.3.0
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) Joined ¶
func (m *UserMutation) Joined() (r time.Time, exists bool)
Joined returns the value of the "joined" field in the mutation.
func (*UserMutation) Labels ¶ added in v0.3.0
func (m *UserMutation) Labels() (r []string, exists bool)
Labels returns the value of the "labels" field in the mutation.
func (*UserMutation) LabelsCleared ¶ added in v0.3.0
func (m *UserMutation) LabelsCleared() bool
LabelsCleared returns if the "labels" field was cleared in this mutation.
func (*UserMutation) OldAccountBalance ¶ added in v0.2.0
func (m *UserMutation) OldAccountBalance(ctx context.Context) (v float64, err error)
OldAccountBalance returns the old "account_balance" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBUser1 ¶ added in v0.2.0
func (m *UserMutation) OldBUser1(ctx context.Context) (v int, err error)
OldBUser1 returns the old "b_user_1" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBanned ¶
func (m *UserMutation) OldBanned(ctx context.Context) (v bool, err error)
OldBanned returns the old "banned" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBigInt ¶
OldBigInt returns the old "big_int" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCrmID ¶
OldCrmID returns the old "crm_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCustomPb ¶
func (m *UserMutation) OldCustomPb(ctx context.Context) (v uint8, err error)
OldCustomPb returns the old "custom_pb" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldDeviceType ¶ added in v0.3.0
func (m *UserMutation) OldDeviceType(ctx context.Context) (v user.DeviceType, err error)
OldDeviceType returns the old "device_type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldExp ¶
func (m *UserMutation) OldExp(ctx context.Context) (v uint64, err error)
OldExp returns the old "exp" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldExternalID ¶
func (m *UserMutation) OldExternalID(ctx context.Context) (v int, err error)
OldExternalID returns the old "external_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldHeightInCm ¶ added in v0.2.0
func (m *UserMutation) OldHeightInCm(ctx context.Context) (v float32, err error)
OldHeightInCm returns the old "height_in_cm" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldJoined ¶
OldJoined returns the old "joined" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLabels ¶ added in v0.3.0
func (m *UserMutation) OldLabels(ctx context.Context) (v []string, err error)
OldLabels returns the old "labels" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldOptBool ¶
func (m *UserMutation) OldOptBool(ctx context.Context) (v bool, err error)
OldOptBool returns the old "opt_bool" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldOptNum ¶
func (m *UserMutation) OldOptNum(ctx context.Context) (v int, err error)
OldOptNum returns the old "opt_num" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldOptStr ¶
func (m *UserMutation) OldOptStr(ctx context.Context) (v string, err error)
OldOptStr returns the old "opt_str" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPoints ¶
func (m *UserMutation) OldPoints(ctx context.Context) (v uint, err error)
OldPoints returns the old "points" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldType ¶ added in v0.3.0
func (m *UserMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUnnecessary ¶ added in v0.3.0
func (m *UserMutation) OldUnnecessary(ctx context.Context) (v string, err error)
OldUnnecessary returns the old "unnecessary" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUserName ¶
func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
OldUserName returns the old "user_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OptBool ¶
func (m *UserMutation) OptBool() (r bool, exists bool)
OptBool returns the value of the "opt_bool" field in the mutation.
func (*UserMutation) OptBoolCleared ¶
func (m *UserMutation) OptBoolCleared() bool
OptBoolCleared returns if the "opt_bool" field was cleared in this mutation.
func (*UserMutation) OptNum ¶
func (m *UserMutation) OptNum() (r int, exists bool)
OptNum returns the value of the "opt_num" field in the mutation.
func (*UserMutation) OptNumCleared ¶
func (m *UserMutation) OptNumCleared() bool
OptNumCleared returns if the "opt_num" field was cleared in this mutation.
func (*UserMutation) OptStr ¶
func (m *UserMutation) OptStr() (r string, exists bool)
OptStr returns the value of the "opt_str" field in the mutation.
func (*UserMutation) OptStrCleared ¶
func (m *UserMutation) OptStrCleared() bool
OptStrCleared returns if the "opt_str" field was cleared in this mutation.
func (*UserMutation) PetCleared ¶ added in v0.3.0
func (m *UserMutation) PetCleared() bool
PetCleared reports if the "pet" edge to the Pet entity was cleared.
func (*UserMutation) PetID ¶ added in v0.3.0
func (m *UserMutation) PetID() (id int, exists bool)
PetID returns the "pet" edge ID in the mutation.
func (*UserMutation) PetIDs ¶ added in v0.3.0
func (m *UserMutation) PetIDs() (ids []int)
PetIDs returns the "pet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PetID instead. It exists only for internal usage by the builders.
func (*UserMutation) Points ¶
func (m *UserMutation) Points() (r uint, exists bool)
Points returns the value of the "points" field in the mutation.
func (*UserMutation) Received1Cleared ¶ added in v0.2.0
func (m *UserMutation) Received1Cleared() bool
Received1Cleared reports if the "received_1" edge to the Attachment entity was cleared.
func (*UserMutation) Received1IDs ¶ added in v0.2.0
func (m *UserMutation) Received1IDs() (ids []uuid.UUID)
Received1IDs returns the "received_1" edge IDs in the mutation.
func (*UserMutation) RemoveReceived1IDs ¶ added in v0.2.0
func (m *UserMutation) RemoveReceived1IDs(ids ...uuid.UUID)
RemoveReceived1IDs removes the "received_1" edge to the Attachment entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedReceived1IDs ¶ added in v0.2.0
func (m *UserMutation) RemovedReceived1IDs() (ids []uuid.UUID)
RemovedReceived1 returns the removed IDs of the "received_1" edge to the Attachment entity.
func (*UserMutation) ResetAccountBalance ¶ added in v0.2.0
func (m *UserMutation) ResetAccountBalance()
ResetAccountBalance resets all changes to the "account_balance" field.
func (*UserMutation) ResetAttachment ¶
func (m *UserMutation) ResetAttachment()
ResetAttachment resets all changes to the "attachment" edge.
func (*UserMutation) ResetBUser1 ¶ added in v0.2.0
func (m *UserMutation) ResetBUser1()
ResetBUser1 resets all changes to the "b_user_1" field.
func (*UserMutation) ResetBanned ¶
func (m *UserMutation) ResetBanned()
ResetBanned resets all changes to the "banned" field.
func (*UserMutation) ResetBigInt ¶
func (m *UserMutation) ResetBigInt()
ResetBigInt resets all changes to the "big_int" field.
func (*UserMutation) ResetCrmID ¶
func (m *UserMutation) ResetCrmID()
ResetCrmID resets all changes to the "crm_id" field.
func (*UserMutation) ResetCustomPb ¶
func (m *UserMutation) ResetCustomPb()
ResetCustomPb resets all changes to the "custom_pb" field.
func (*UserMutation) ResetDeviceType ¶ added in v0.3.0
func (m *UserMutation) ResetDeviceType()
ResetDeviceType resets all changes to the "device_type" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetExp ¶
func (m *UserMutation) ResetExp()
ResetExp resets all changes to the "exp" field.
func (*UserMutation) ResetExternalID ¶
func (m *UserMutation) ResetExternalID()
ResetExternalID resets all changes to the "external_id" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetGroup ¶
func (m *UserMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*UserMutation) ResetHeightInCm ¶ added in v0.2.0
func (m *UserMutation) ResetHeightInCm()
ResetHeightInCm resets all changes to the "height_in_cm" field.
func (*UserMutation) ResetJoined ¶
func (m *UserMutation) ResetJoined()
ResetJoined resets all changes to the "joined" field.
func (*UserMutation) ResetLabels ¶ added in v0.3.0
func (m *UserMutation) ResetLabels()
ResetLabels resets all changes to the "labels" field.
func (*UserMutation) ResetOptBool ¶
func (m *UserMutation) ResetOptBool()
ResetOptBool resets all changes to the "opt_bool" field.
func (*UserMutation) ResetOptNum ¶
func (m *UserMutation) ResetOptNum()
ResetOptNum resets all changes to the "opt_num" field.
func (*UserMutation) ResetOptStr ¶
func (m *UserMutation) ResetOptStr()
ResetOptStr resets all changes to the "opt_str" field.
func (*UserMutation) ResetPet ¶ added in v0.3.0
func (m *UserMutation) ResetPet()
ResetPet resets all changes to the "pet" edge.
func (*UserMutation) ResetPoints ¶
func (m *UserMutation) ResetPoints()
ResetPoints resets all changes to the "points" field.
func (*UserMutation) ResetReceived1 ¶ added in v0.2.0
func (m *UserMutation) ResetReceived1()
ResetReceived1 resets all changes to the "received_1" edge.
func (*UserMutation) ResetSkipEdge ¶ added in v0.3.0
func (m *UserMutation) ResetSkipEdge()
ResetSkipEdge resets all changes to the "skip_edge" edge.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetType ¶ added in v0.3.0
func (m *UserMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserMutation) ResetUnnecessary ¶ added in v0.3.0
func (m *UserMutation) ResetUnnecessary()
ResetUnnecessary resets all changes to the "unnecessary" field.
func (*UserMutation) ResetUserName ¶
func (m *UserMutation) ResetUserName()
ResetUserName resets all changes to the "user_name" field.
func (*UserMutation) SetAccountBalance ¶ added in v0.2.0
func (m *UserMutation) SetAccountBalance(f float64)
SetAccountBalance sets the "account_balance" field.
func (*UserMutation) SetAttachmentID ¶
func (m *UserMutation) SetAttachmentID(id uuid.UUID)
SetAttachmentID sets the "attachment" edge to the Attachment entity by id.
func (*UserMutation) SetBUser1 ¶ added in v0.2.0
func (m *UserMutation) SetBUser1(i int)
SetBUser1 sets the "b_user_1" field.
func (*UserMutation) SetBanned ¶
func (m *UserMutation) SetBanned(b bool)
SetBanned sets the "banned" field.
func (*UserMutation) SetBigInt ¶
func (m *UserMutation) SetBigInt(si schema.BigInt)
SetBigInt sets the "big_int" field.
func (*UserMutation) SetCrmID ¶
func (m *UserMutation) SetCrmID(u uuid.UUID)
SetCrmID sets the "crm_id" field.
func (*UserMutation) SetCustomPb ¶
func (m *UserMutation) SetCustomPb(u uint8)
SetCustomPb sets the "custom_pb" field.
func (*UserMutation) SetDeviceType ¶ added in v0.3.0
func (m *UserMutation) SetDeviceType(ut user.DeviceType)
SetDeviceType sets the "device_type" field.
func (*UserMutation) SetExternalID ¶
func (m *UserMutation) SetExternalID(i int)
SetExternalID sets the "external_id" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetGroupID ¶
func (m *UserMutation) SetGroupID(id int)
SetGroupID sets the "group" edge to the Group entity by id.
func (*UserMutation) SetHeightInCm ¶ added in v0.2.0
func (m *UserMutation) SetHeightInCm(f float32)
SetHeightInCm sets the "height_in_cm" field.
func (*UserMutation) SetJoined ¶
func (m *UserMutation) SetJoined(t time.Time)
SetJoined sets the "joined" field.
func (*UserMutation) SetLabels ¶ added in v0.3.0
func (m *UserMutation) SetLabels(s []string)
SetLabels sets the "labels" field.
func (*UserMutation) SetOptBool ¶
func (m *UserMutation) SetOptBool(b bool)
SetOptBool sets the "opt_bool" field.
func (*UserMutation) SetOptNum ¶
func (m *UserMutation) SetOptNum(i int)
SetOptNum sets the "opt_num" field.
func (*UserMutation) SetOptStr ¶
func (m *UserMutation) SetOptStr(s string)
SetOptStr sets the "opt_str" field.
func (*UserMutation) SetPetID ¶ added in v0.3.0
func (m *UserMutation) SetPetID(id int)
SetPetID sets the "pet" edge to the Pet entity by id.
func (*UserMutation) SetPoints ¶
func (m *UserMutation) SetPoints(u uint)
SetPoints sets the "points" field.
func (*UserMutation) SetSkipEdgeID ¶ added in v0.3.0
func (m *UserMutation) SetSkipEdgeID(id int)
SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by id.
func (*UserMutation) SetStatus ¶
func (m *UserMutation) SetStatus(u user.Status)
SetStatus sets the "status" field.
func (*UserMutation) SetType ¶ added in v0.3.0
func (m *UserMutation) SetType(s string)
SetType sets the "type" field.
func (*UserMutation) SetUnnecessary ¶ added in v0.3.0
func (m *UserMutation) SetUnnecessary(s string)
SetUnnecessary sets the "unnecessary" field.
func (*UserMutation) SetUserName ¶
func (m *UserMutation) SetUserName(s string)
SetUserName sets the "user_name" field.
func (*UserMutation) SkipEdgeCleared ¶ added in v0.3.0
func (m *UserMutation) SkipEdgeCleared() bool
SkipEdgeCleared reports if the "skip_edge" edge to the SkipEdgeExample entity was cleared.
func (*UserMutation) SkipEdgeID ¶ added in v0.3.0
func (m *UserMutation) SkipEdgeID() (id int, exists bool)
SkipEdgeID returns the "skip_edge" edge ID in the mutation.
func (*UserMutation) SkipEdgeIDs ¶ added in v0.3.0
func (m *UserMutation) SkipEdgeIDs() (ids []int)
SkipEdgeIDs returns the "skip_edge" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SkipEdgeID instead. It exists only for internal usage by the builders.
func (*UserMutation) Status ¶
func (m *UserMutation) Status() (r user.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) TypeCleared ¶ added in v0.3.0
func (m *UserMutation) TypeCleared() bool
TypeCleared returns if the "type" field was cleared in this mutation.
func (*UserMutation) Unnecessary ¶ added in v0.3.0
func (m *UserMutation) Unnecessary() (r string, exists bool)
Unnecessary returns the value of the "unnecessary" field in the mutation.
func (*UserMutation) UnnecessaryCleared ¶ added in v0.3.0
func (m *UserMutation) UnnecessaryCleared() bool
UnnecessaryCleared returns if the "unnecessary" field was cleared in this mutation.
func (*UserMutation) UserName ¶
func (m *UserMutation) UserName() (r string, exists bool)
UserName returns the value of the "user_name" field in the mutation.
func (*UserMutation) Where ¶ added in v0.2.0
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserName string `json:"user_name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUserName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryAttachment ¶
func (uq *UserQuery) QueryAttachment() *AttachmentQuery
QueryAttachment chains the current query on the "attachment" edge.
func (*UserQuery) QueryGroup ¶
func (uq *UserQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*UserQuery) QueryReceived1 ¶ added in v0.2.0
func (uq *UserQuery) QueryReceived1() *AttachmentQuery
QueryReceived1 chains the current query on the "received_1" edge.
func (*UserQuery) QuerySkipEdge ¶ added in v0.3.0
func (uq *UserQuery) QuerySkipEdge() *SkipEdgeExampleQuery
QuerySkipEdge chains the current query on the "skip_edge" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserName string `json:"user_name,omitempty"` } client.User.Query(). Select(user.FieldUserName). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithAttachment ¶
func (uq *UserQuery) WithAttachment(opts ...func(*AttachmentQuery)) *UserQuery
WithAttachment tells the query-builder to eager-load the nodes that are connected to the "attachment" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroup ¶
func (uq *UserQuery) WithGroup(opts ...func(*GroupQuery)) *UserQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPet ¶ added in v0.3.0
WithPet tells the query-builder to eager-load the nodes that are connected to the "pet" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithReceived1 ¶ added in v0.2.0
func (uq *UserQuery) WithReceived1(opts ...func(*AttachmentQuery)) *UserQuery
WithReceived1 tells the query-builder to eager-load the nodes that are connected to the "received_1" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSkipEdge ¶ added in v0.3.0
func (uq *UserQuery) WithSkipEdge(opts ...func(*SkipEdgeExampleQuery)) *UserQuery
WithSkipEdge tells the query-builder to eager-load the nodes that are connected to the "skip_edge" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddAccountBalance ¶ added in v0.2.0
func (uu *UserUpdate) AddAccountBalance(f float64) *UserUpdate
AddAccountBalance adds f to the "account_balance" field.
func (*UserUpdate) AddBUser1 ¶ added in v0.2.0
func (uu *UserUpdate) AddBUser1(i int) *UserUpdate
AddBUser1 adds i to the "b_user_1" field.
func (*UserUpdate) AddCustomPb ¶
func (uu *UserUpdate) AddCustomPb(u int8) *UserUpdate
AddCustomPb adds u to the "custom_pb" field.
func (*UserUpdate) AddExp ¶
func (uu *UserUpdate) AddExp(u int64) *UserUpdate
AddExp adds u to the "exp" field.
func (*UserUpdate) AddExternalID ¶
func (uu *UserUpdate) AddExternalID(i int) *UserUpdate
AddExternalID adds i to the "external_id" field.
func (*UserUpdate) AddHeightInCm ¶ added in v0.2.0
func (uu *UserUpdate) AddHeightInCm(f float32) *UserUpdate
AddHeightInCm adds f to the "height_in_cm" field.
func (*UserUpdate) AddOptNum ¶
func (uu *UserUpdate) AddOptNum(i int) *UserUpdate
AddOptNum adds i to the "opt_num" field.
func (*UserUpdate) AddPoints ¶
func (uu *UserUpdate) AddPoints(u int) *UserUpdate
AddPoints adds u to the "points" field.
func (*UserUpdate) AddReceived1 ¶ added in v0.2.0
func (uu *UserUpdate) AddReceived1(a ...*Attachment) *UserUpdate
AddReceived1 adds the "received_1" edges to the Attachment entity.
func (*UserUpdate) AddReceived1IDs ¶ added in v0.2.0
func (uu *UserUpdate) AddReceived1IDs(ids ...uuid.UUID) *UserUpdate
AddReceived1IDs adds the "received_1" edge to the Attachment entity by IDs.
func (*UserUpdate) AppendLabels ¶ added in v0.3.3
func (uu *UserUpdate) AppendLabels(s []string) *UserUpdate
AppendLabels appends s to the "labels" field.
func (*UserUpdate) ClearAttachment ¶
func (uu *UserUpdate) ClearAttachment() *UserUpdate
ClearAttachment clears the "attachment" edge to the Attachment entity.
func (*UserUpdate) ClearBUser1 ¶ added in v0.2.0
func (uu *UserUpdate) ClearBUser1() *UserUpdate
ClearBUser1 clears the value of the "b_user_1" field.
func (*UserUpdate) ClearBigInt ¶
func (uu *UserUpdate) ClearBigInt() *UserUpdate
ClearBigInt clears the value of the "big_int" field.
func (*UserUpdate) ClearGroup ¶
func (uu *UserUpdate) ClearGroup() *UserUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*UserUpdate) ClearLabels ¶ added in v0.3.0
func (uu *UserUpdate) ClearLabels() *UserUpdate
ClearLabels clears the value of the "labels" field.
func (*UserUpdate) ClearOptBool ¶
func (uu *UserUpdate) ClearOptBool() *UserUpdate
ClearOptBool clears the value of the "opt_bool" field.
func (*UserUpdate) ClearOptNum ¶
func (uu *UserUpdate) ClearOptNum() *UserUpdate
ClearOptNum clears the value of the "opt_num" field.
func (*UserUpdate) ClearOptStr ¶
func (uu *UserUpdate) ClearOptStr() *UserUpdate
ClearOptStr clears the value of the "opt_str" field.
func (*UserUpdate) ClearPet ¶ added in v0.3.0
func (uu *UserUpdate) ClearPet() *UserUpdate
ClearPet clears the "pet" edge to the Pet entity.
func (*UserUpdate) ClearReceived1 ¶ added in v0.2.0
func (uu *UserUpdate) ClearReceived1() *UserUpdate
ClearReceived1 clears all "received_1" edges to the Attachment entity.
func (*UserUpdate) ClearSkipEdge ¶ added in v0.3.0
func (uu *UserUpdate) ClearSkipEdge() *UserUpdate
ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdate) ClearType ¶ added in v0.3.0
func (uu *UserUpdate) ClearType() *UserUpdate
ClearType clears the value of the "type" field.
func (*UserUpdate) ClearUnnecessary ¶ added in v0.3.0
func (uu *UserUpdate) ClearUnnecessary() *UserUpdate
ClearUnnecessary clears the value of the "unnecessary" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveReceived1 ¶ added in v0.2.0
func (uu *UserUpdate) RemoveReceived1(a ...*Attachment) *UserUpdate
RemoveReceived1 removes "received_1" edges to Attachment entities.
func (*UserUpdate) RemoveReceived1IDs ¶ added in v0.2.0
func (uu *UserUpdate) RemoveReceived1IDs(ids ...uuid.UUID) *UserUpdate
RemoveReceived1IDs removes the "received_1" edge to Attachment entities by IDs.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAccountBalance ¶ added in v0.2.0
func (uu *UserUpdate) SetAccountBalance(f float64) *UserUpdate
SetAccountBalance sets the "account_balance" field.
func (*UserUpdate) SetAttachment ¶
func (uu *UserUpdate) SetAttachment(a *Attachment) *UserUpdate
SetAttachment sets the "attachment" edge to the Attachment entity.
func (*UserUpdate) SetAttachmentID ¶
func (uu *UserUpdate) SetAttachmentID(id uuid.UUID) *UserUpdate
SetAttachmentID sets the "attachment" edge to the Attachment entity by ID.
func (*UserUpdate) SetBUser1 ¶ added in v0.2.0
func (uu *UserUpdate) SetBUser1(i int) *UserUpdate
SetBUser1 sets the "b_user_1" field.
func (*UserUpdate) SetBanned ¶
func (uu *UserUpdate) SetBanned(b bool) *UserUpdate
SetBanned sets the "banned" field.
func (*UserUpdate) SetBigInt ¶
func (uu *UserUpdate) SetBigInt(si schema.BigInt) *UserUpdate
SetBigInt sets the "big_int" field.
func (*UserUpdate) SetCrmID ¶
func (uu *UserUpdate) SetCrmID(u uuid.UUID) *UserUpdate
SetCrmID sets the "crm_id" field.
func (*UserUpdate) SetCustomPb ¶
func (uu *UserUpdate) SetCustomPb(u uint8) *UserUpdate
SetCustomPb sets the "custom_pb" field.
func (*UserUpdate) SetDeviceType ¶ added in v0.3.0
func (uu *UserUpdate) SetDeviceType(ut user.DeviceType) *UserUpdate
SetDeviceType sets the "device_type" field.
func (*UserUpdate) SetExp ¶
func (uu *UserUpdate) SetExp(u uint64) *UserUpdate
SetExp sets the "exp" field.
func (*UserUpdate) SetExternalID ¶
func (uu *UserUpdate) SetExternalID(i int) *UserUpdate
SetExternalID sets the "external_id" field.
func (*UserUpdate) SetGroup ¶
func (uu *UserUpdate) SetGroup(g *Group) *UserUpdate
SetGroup sets the "group" edge to the Group entity.
func (*UserUpdate) SetGroupID ¶
func (uu *UserUpdate) SetGroupID(id int) *UserUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserUpdate) SetHeightInCm ¶ added in v0.2.0
func (uu *UserUpdate) SetHeightInCm(f float32) *UserUpdate
SetHeightInCm sets the "height_in_cm" field.
func (*UserUpdate) SetLabels ¶ added in v0.3.0
func (uu *UserUpdate) SetLabels(s []string) *UserUpdate
SetLabels sets the "labels" field.
func (*UserUpdate) SetNillableAccountBalance ¶ added in v0.2.0
func (uu *UserUpdate) SetNillableAccountBalance(f *float64) *UserUpdate
SetNillableAccountBalance sets the "account_balance" field if the given value is not nil.
func (*UserUpdate) SetNillableAttachmentID ¶
func (uu *UserUpdate) SetNillableAttachmentID(id *uuid.UUID) *UserUpdate
SetNillableAttachmentID sets the "attachment" edge to the Attachment entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableBUser1 ¶ added in v0.2.0
func (uu *UserUpdate) SetNillableBUser1(i *int) *UserUpdate
SetNillableBUser1 sets the "b_user_1" field if the given value is not nil.
func (*UserUpdate) SetNillableBanned ¶
func (uu *UserUpdate) SetNillableBanned(b *bool) *UserUpdate
SetNillableBanned sets the "banned" field if the given value is not nil.
func (*UserUpdate) SetNillableBigInt ¶
func (uu *UserUpdate) SetNillableBigInt(si *schema.BigInt) *UserUpdate
SetNillableBigInt sets the "big_int" field if the given value is not nil.
func (*UserUpdate) SetNillableDeviceType ¶ added in v0.3.0
func (uu *UserUpdate) SetNillableDeviceType(ut *user.DeviceType) *UserUpdate
SetNillableDeviceType sets the "device_type" field if the given value is not nil.
func (*UserUpdate) SetNillableGroupID ¶
func (uu *UserUpdate) SetNillableGroupID(id *int) *UserUpdate
SetNillableGroupID sets the "group" edge to the Group entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableHeightInCm ¶ added in v0.2.0
func (uu *UserUpdate) SetNillableHeightInCm(f *float32) *UserUpdate
SetNillableHeightInCm sets the "height_in_cm" field if the given value is not nil.
func (*UserUpdate) SetNillableOptBool ¶
func (uu *UserUpdate) SetNillableOptBool(b *bool) *UserUpdate
SetNillableOptBool sets the "opt_bool" field if the given value is not nil.
func (*UserUpdate) SetNillableOptNum ¶
func (uu *UserUpdate) SetNillableOptNum(i *int) *UserUpdate
SetNillableOptNum sets the "opt_num" field if the given value is not nil.
func (*UserUpdate) SetNillableOptStr ¶
func (uu *UserUpdate) SetNillableOptStr(s *string) *UserUpdate
SetNillableOptStr sets the "opt_str" field if the given value is not nil.
func (*UserUpdate) SetNillablePetID ¶ added in v0.3.0
func (uu *UserUpdate) SetNillablePetID(id *int) *UserUpdate
SetNillablePetID sets the "pet" edge to the Pet entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableSkipEdgeID ¶ added in v0.3.0
func (uu *UserUpdate) SetNillableSkipEdgeID(id *int) *UserUpdate
SetNillableSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableType ¶ added in v0.3.0
func (uu *UserUpdate) SetNillableType(s *string) *UserUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdate) SetNillableUnnecessary ¶ added in v0.3.0
func (uu *UserUpdate) SetNillableUnnecessary(s *string) *UserUpdate
SetNillableUnnecessary sets the "unnecessary" field if the given value is not nil.
func (*UserUpdate) SetOptBool ¶
func (uu *UserUpdate) SetOptBool(b bool) *UserUpdate
SetOptBool sets the "opt_bool" field.
func (*UserUpdate) SetOptNum ¶
func (uu *UserUpdate) SetOptNum(i int) *UserUpdate
SetOptNum sets the "opt_num" field.
func (*UserUpdate) SetOptStr ¶
func (uu *UserUpdate) SetOptStr(s string) *UserUpdate
SetOptStr sets the "opt_str" field.
func (*UserUpdate) SetPet ¶ added in v0.3.0
func (uu *UserUpdate) SetPet(p *Pet) *UserUpdate
SetPet sets the "pet" edge to the Pet entity.
func (*UserUpdate) SetPetID ¶ added in v0.3.0
func (uu *UserUpdate) SetPetID(id int) *UserUpdate
SetPetID sets the "pet" edge to the Pet entity by ID.
func (*UserUpdate) SetPoints ¶
func (uu *UserUpdate) SetPoints(u uint) *UserUpdate
SetPoints sets the "points" field.
func (*UserUpdate) SetSkipEdge ¶ added in v0.3.0
func (uu *UserUpdate) SetSkipEdge(s *SkipEdgeExample) *UserUpdate
SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdate) SetSkipEdgeID ¶ added in v0.3.0
func (uu *UserUpdate) SetSkipEdgeID(id int) *UserUpdate
SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetType ¶ added in v0.3.0
func (uu *UserUpdate) SetType(s string) *UserUpdate
SetType sets the "type" field.
func (*UserUpdate) SetUnnecessary ¶ added in v0.3.0
func (uu *UserUpdate) SetUnnecessary(s string) *UserUpdate
SetUnnecessary sets the "unnecessary" field.
func (*UserUpdate) SetUserName ¶
func (uu *UserUpdate) SetUserName(s string) *UserUpdate
SetUserName sets the "user_name" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddAccountBalance ¶ added in v0.2.0
func (uuo *UserUpdateOne) AddAccountBalance(f float64) *UserUpdateOne
AddAccountBalance adds f to the "account_balance" field.
func (*UserUpdateOne) AddBUser1 ¶ added in v0.2.0
func (uuo *UserUpdateOne) AddBUser1(i int) *UserUpdateOne
AddBUser1 adds i to the "b_user_1" field.
func (*UserUpdateOne) AddCustomPb ¶
func (uuo *UserUpdateOne) AddCustomPb(u int8) *UserUpdateOne
AddCustomPb adds u to the "custom_pb" field.
func (*UserUpdateOne) AddExp ¶
func (uuo *UserUpdateOne) AddExp(u int64) *UserUpdateOne
AddExp adds u to the "exp" field.
func (*UserUpdateOne) AddExternalID ¶
func (uuo *UserUpdateOne) AddExternalID(i int) *UserUpdateOne
AddExternalID adds i to the "external_id" field.
func (*UserUpdateOne) AddHeightInCm ¶ added in v0.2.0
func (uuo *UserUpdateOne) AddHeightInCm(f float32) *UserUpdateOne
AddHeightInCm adds f to the "height_in_cm" field.
func (*UserUpdateOne) AddOptNum ¶
func (uuo *UserUpdateOne) AddOptNum(i int) *UserUpdateOne
AddOptNum adds i to the "opt_num" field.
func (*UserUpdateOne) AddPoints ¶
func (uuo *UserUpdateOne) AddPoints(u int) *UserUpdateOne
AddPoints adds u to the "points" field.
func (*UserUpdateOne) AddReceived1 ¶ added in v0.2.0
func (uuo *UserUpdateOne) AddReceived1(a ...*Attachment) *UserUpdateOne
AddReceived1 adds the "received_1" edges to the Attachment entity.
func (*UserUpdateOne) AddReceived1IDs ¶ added in v0.2.0
func (uuo *UserUpdateOne) AddReceived1IDs(ids ...uuid.UUID) *UserUpdateOne
AddReceived1IDs adds the "received_1" edge to the Attachment entity by IDs.
func (*UserUpdateOne) AppendLabels ¶ added in v0.3.3
func (uuo *UserUpdateOne) AppendLabels(s []string) *UserUpdateOne
AppendLabels appends s to the "labels" field.
func (*UserUpdateOne) ClearAttachment ¶
func (uuo *UserUpdateOne) ClearAttachment() *UserUpdateOne
ClearAttachment clears the "attachment" edge to the Attachment entity.
func (*UserUpdateOne) ClearBUser1 ¶ added in v0.2.0
func (uuo *UserUpdateOne) ClearBUser1() *UserUpdateOne
ClearBUser1 clears the value of the "b_user_1" field.
func (*UserUpdateOne) ClearBigInt ¶
func (uuo *UserUpdateOne) ClearBigInt() *UserUpdateOne
ClearBigInt clears the value of the "big_int" field.
func (*UserUpdateOne) ClearGroup ¶
func (uuo *UserUpdateOne) ClearGroup() *UserUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*UserUpdateOne) ClearLabels ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearLabels() *UserUpdateOne
ClearLabels clears the value of the "labels" field.
func (*UserUpdateOne) ClearOptBool ¶
func (uuo *UserUpdateOne) ClearOptBool() *UserUpdateOne
ClearOptBool clears the value of the "opt_bool" field.
func (*UserUpdateOne) ClearOptNum ¶
func (uuo *UserUpdateOne) ClearOptNum() *UserUpdateOne
ClearOptNum clears the value of the "opt_num" field.
func (*UserUpdateOne) ClearOptStr ¶
func (uuo *UserUpdateOne) ClearOptStr() *UserUpdateOne
ClearOptStr clears the value of the "opt_str" field.
func (*UserUpdateOne) ClearPet ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearPet() *UserUpdateOne
ClearPet clears the "pet" edge to the Pet entity.
func (*UserUpdateOne) ClearReceived1 ¶ added in v0.2.0
func (uuo *UserUpdateOne) ClearReceived1() *UserUpdateOne
ClearReceived1 clears all "received_1" edges to the Attachment entity.
func (*UserUpdateOne) ClearSkipEdge ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearSkipEdge() *UserUpdateOne
ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdateOne) ClearType ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearType() *UserUpdateOne
ClearType clears the value of the "type" field.
func (*UserUpdateOne) ClearUnnecessary ¶ added in v0.3.0
func (uuo *UserUpdateOne) ClearUnnecessary() *UserUpdateOne
ClearUnnecessary clears the value of the "unnecessary" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveReceived1 ¶ added in v0.2.0
func (uuo *UserUpdateOne) RemoveReceived1(a ...*Attachment) *UserUpdateOne
RemoveReceived1 removes "received_1" edges to Attachment entities.
func (*UserUpdateOne) RemoveReceived1IDs ¶ added in v0.2.0
func (uuo *UserUpdateOne) RemoveReceived1IDs(ids ...uuid.UUID) *UserUpdateOne
RemoveReceived1IDs removes the "received_1" edge to Attachment entities by IDs.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAccountBalance ¶ added in v0.2.0
func (uuo *UserUpdateOne) SetAccountBalance(f float64) *UserUpdateOne
SetAccountBalance sets the "account_balance" field.
func (*UserUpdateOne) SetAttachment ¶
func (uuo *UserUpdateOne) SetAttachment(a *Attachment) *UserUpdateOne
SetAttachment sets the "attachment" edge to the Attachment entity.
func (*UserUpdateOne) SetAttachmentID ¶
func (uuo *UserUpdateOne) SetAttachmentID(id uuid.UUID) *UserUpdateOne
SetAttachmentID sets the "attachment" edge to the Attachment entity by ID.
func (*UserUpdateOne) SetBUser1 ¶ added in v0.2.0
func (uuo *UserUpdateOne) SetBUser1(i int) *UserUpdateOne
SetBUser1 sets the "b_user_1" field.
func (*UserUpdateOne) SetBanned ¶
func (uuo *UserUpdateOne) SetBanned(b bool) *UserUpdateOne
SetBanned sets the "banned" field.
func (*UserUpdateOne) SetBigInt ¶
func (uuo *UserUpdateOne) SetBigInt(si schema.BigInt) *UserUpdateOne
SetBigInt sets the "big_int" field.
func (*UserUpdateOne) SetCrmID ¶
func (uuo *UserUpdateOne) SetCrmID(u uuid.UUID) *UserUpdateOne
SetCrmID sets the "crm_id" field.
func (*UserUpdateOne) SetCustomPb ¶
func (uuo *UserUpdateOne) SetCustomPb(u uint8) *UserUpdateOne
SetCustomPb sets the "custom_pb" field.
func (*UserUpdateOne) SetDeviceType ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetDeviceType(ut user.DeviceType) *UserUpdateOne
SetDeviceType sets the "device_type" field.
func (*UserUpdateOne) SetExp ¶
func (uuo *UserUpdateOne) SetExp(u uint64) *UserUpdateOne
SetExp sets the "exp" field.
func (*UserUpdateOne) SetExternalID ¶
func (uuo *UserUpdateOne) SetExternalID(i int) *UserUpdateOne
SetExternalID sets the "external_id" field.
func (*UserUpdateOne) SetGroup ¶
func (uuo *UserUpdateOne) SetGroup(g *Group) *UserUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*UserUpdateOne) SetGroupID ¶
func (uuo *UserUpdateOne) SetGroupID(id int) *UserUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*UserUpdateOne) SetHeightInCm ¶ added in v0.2.0
func (uuo *UserUpdateOne) SetHeightInCm(f float32) *UserUpdateOne
SetHeightInCm sets the "height_in_cm" field.
func (*UserUpdateOne) SetLabels ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetLabels(s []string) *UserUpdateOne
SetLabels sets the "labels" field.
func (*UserUpdateOne) SetNillableAccountBalance ¶ added in v0.2.0
func (uuo *UserUpdateOne) SetNillableAccountBalance(f *float64) *UserUpdateOne
SetNillableAccountBalance sets the "account_balance" field if the given value is not nil.
func (*UserUpdateOne) SetNillableAttachmentID ¶
func (uuo *UserUpdateOne) SetNillableAttachmentID(id *uuid.UUID) *UserUpdateOne
SetNillableAttachmentID sets the "attachment" edge to the Attachment entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableBUser1 ¶ added in v0.2.0
func (uuo *UserUpdateOne) SetNillableBUser1(i *int) *UserUpdateOne
SetNillableBUser1 sets the "b_user_1" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBanned ¶
func (uuo *UserUpdateOne) SetNillableBanned(b *bool) *UserUpdateOne
SetNillableBanned sets the "banned" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBigInt ¶
func (uuo *UserUpdateOne) SetNillableBigInt(si *schema.BigInt) *UserUpdateOne
SetNillableBigInt sets the "big_int" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeviceType ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetNillableDeviceType(ut *user.DeviceType) *UserUpdateOne
SetNillableDeviceType sets the "device_type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableGroupID ¶
func (uuo *UserUpdateOne) SetNillableGroupID(id *int) *UserUpdateOne
SetNillableGroupID sets the "group" edge to the Group entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableHeightInCm ¶ added in v0.2.0
func (uuo *UserUpdateOne) SetNillableHeightInCm(f *float32) *UserUpdateOne
SetNillableHeightInCm sets the "height_in_cm" field if the given value is not nil.
func (*UserUpdateOne) SetNillableOptBool ¶
func (uuo *UserUpdateOne) SetNillableOptBool(b *bool) *UserUpdateOne
SetNillableOptBool sets the "opt_bool" field if the given value is not nil.
func (*UserUpdateOne) SetNillableOptNum ¶
func (uuo *UserUpdateOne) SetNillableOptNum(i *int) *UserUpdateOne
SetNillableOptNum sets the "opt_num" field if the given value is not nil.
func (*UserUpdateOne) SetNillableOptStr ¶
func (uuo *UserUpdateOne) SetNillableOptStr(s *string) *UserUpdateOne
SetNillableOptStr sets the "opt_str" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePetID ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetNillablePetID(id *int) *UserUpdateOne
SetNillablePetID sets the "pet" edge to the Pet entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableSkipEdgeID ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetNillableSkipEdgeID(id *int) *UserUpdateOne
SetNillableSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableType ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetNillableType(s *string) *UserUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUnnecessary ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetNillableUnnecessary(s *string) *UserUpdateOne
SetNillableUnnecessary sets the "unnecessary" field if the given value is not nil.
func (*UserUpdateOne) SetOptBool ¶
func (uuo *UserUpdateOne) SetOptBool(b bool) *UserUpdateOne
SetOptBool sets the "opt_bool" field.
func (*UserUpdateOne) SetOptNum ¶
func (uuo *UserUpdateOne) SetOptNum(i int) *UserUpdateOne
SetOptNum sets the "opt_num" field.
func (*UserUpdateOne) SetOptStr ¶
func (uuo *UserUpdateOne) SetOptStr(s string) *UserUpdateOne
SetOptStr sets the "opt_str" field.
func (*UserUpdateOne) SetPet ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetPet(p *Pet) *UserUpdateOne
SetPet sets the "pet" edge to the Pet entity.
func (*UserUpdateOne) SetPetID ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetPetID(id int) *UserUpdateOne
SetPetID sets the "pet" edge to the Pet entity by ID.
func (*UserUpdateOne) SetPoints ¶
func (uuo *UserUpdateOne) SetPoints(u uint) *UserUpdateOne
SetPoints sets the "points" field.
func (*UserUpdateOne) SetSkipEdge ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetSkipEdge(s *SkipEdgeExample) *UserUpdateOne
SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdateOne) SetSkipEdgeID ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetSkipEdgeID(id int) *UserUpdateOne
SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetType ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetType(s string) *UserUpdateOne
SetType sets the "type" field.
func (*UserUpdateOne) SetUnnecessary ¶ added in v0.3.0
func (uuo *UserUpdateOne) SetUnnecessary(s string) *UserUpdateOne
SetUnnecessary sets the "unnecessary" field.
func (*UserUpdateOne) SetUserName ¶
func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
SetUserName sets the "user_name" field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- attachment.go
- attachment_create.go
- attachment_delete.go
- attachment_query.go
- attachment_update.go
- client.go
- config.go
- context.go
- ent.go
- generate.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- multiwordschema.go
- multiwordschema_create.go
- multiwordschema_delete.go
- multiwordschema_query.go
- multiwordschema_update.go
- mutation.go
- nilexample.go
- nilexample_create.go
- nilexample_delete.go
- nilexample_query.go
- nilexample_update.go
- pet.go
- pet_create.go
- pet_delete.go
- pet_query.go
- pet_update.go
- pony.go
- pony_create.go
- pony_delete.go
- pony_query.go
- pony_update.go
- runtime.go
- skipedgeexample.go
- skipedgeexample_create.go
- skipedgeexample_delete.go
- skipedgeexample_query.go
- skipedgeexample_update.go
- todo.go
- todo_create.go
- todo_delete.go
- todo_query.go
- todo_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go