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 interface{}) error
- func (s *AttachmentGroupBy) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *AttachmentSelect) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *GroupGroupBy) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *GroupSelect) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *MultiWordSchemaGroupBy) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *MultiWordSchemaSelect) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *NilExampleGroupBy) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *NilExampleSelect) ScanX(ctx context.Context, v interface{})
- 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) 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) 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 interface{}) error
- func (s *PetGroupBy) ScanX(ctx context.Context, v interface{})
- 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) 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) 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) RemovedEdges() []string
- func (m *PetMutation) RemovedIDs(name string) []ent.Value
- 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) 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) 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 interface{}) error
- func (s *PetSelect) ScanX(ctx context.Context, v interface{})
- 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) 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) 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) 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) 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 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 interface{}) error
- func (s *SkipEdgeExampleGroupBy) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *SkipEdgeExampleSelect) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *TodoGroupBy) ScanX(ctx context.Context, v interface{})
- 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 interface{}) error
- func (s *TodoSelect) ScanX(ctx context.Context, v interface{})
- 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) 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) 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) 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 interface{}) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v interface{})
- 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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 interface{}) error
- func (s *UserSelect) ScanX(ctx context.Context, v interface{})
- 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) ClearAttachment() *UserUpdate
- func (uu *UserUpdate) ClearBUser1() *UserUpdate
- func (uu *UserUpdate) ClearBigInt() *UserUpdate
- func (uu *UserUpdate) ClearGroup() *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) 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) 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) 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) ClearAttachment() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBUser1() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBigInt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroup() *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) 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) 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) 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" 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 create builder for Attachment.
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 delete builder for the given entity.
func (*AttachmentClient) DeleteOneID ¶
func (c *AttachmentClient) DeleteOneID(id uuid.UUID) *AttachmentDeleteOne
DeleteOneID returns a delete builder for the given 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 ¶
func (ac *AttachmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreate) ExecX ¶
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 ¶
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 ¶
func (acb *AttachmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreateBulk) ExecX ¶
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 interface{}) 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 ¶
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 ¶
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 interface{}) 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 // 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 create builder for Group.
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 delete builder for the given entity.
func (*GroupClient) DeleteOneID ¶
func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
DeleteOneID returns a delete builder for the given 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 ¶
func (gc *GroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreate) ExecX ¶
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 ¶
func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreateBulk) ExecX ¶
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 interface{}) 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 ¶
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 ¶
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 interface{}) 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 ¶
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 ¶
func (mws *MultiWordSchema) String() string
String implements the fmt.Stringer.
func (*MultiWordSchema) Unwrap ¶
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 ¶
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 ¶
type MultiWordSchemaClient struct {
// contains filtered or unexported fields
}
MultiWordSchemaClient is a client for the MultiWordSchema schema.
func NewMultiWordSchemaClient ¶
func NewMultiWordSchemaClient(c config) *MultiWordSchemaClient
NewMultiWordSchemaClient returns a client for the MultiWordSchema from the given config.
func (*MultiWordSchemaClient) Create ¶
func (c *MultiWordSchemaClient) Create() *MultiWordSchemaCreate
Create returns a create builder for MultiWordSchema.
func (*MultiWordSchemaClient) CreateBulk ¶
func (c *MultiWordSchemaClient) CreateBulk(builders ...*MultiWordSchemaCreate) *MultiWordSchemaCreateBulk
CreateBulk returns a builder for creating a bulk of MultiWordSchema entities.
func (*MultiWordSchemaClient) Delete ¶
func (c *MultiWordSchemaClient) Delete() *MultiWordSchemaDelete
Delete returns a delete builder for MultiWordSchema.
func (*MultiWordSchemaClient) DeleteOne ¶
func (c *MultiWordSchemaClient) DeleteOne(mws *MultiWordSchema) *MultiWordSchemaDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*MultiWordSchemaClient) DeleteOneID ¶
func (c *MultiWordSchemaClient) DeleteOneID(id int) *MultiWordSchemaDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*MultiWordSchemaClient) Get ¶
func (c *MultiWordSchemaClient) Get(ctx context.Context, id int) (*MultiWordSchema, error)
Get returns a MultiWordSchema entity by its id.
func (*MultiWordSchemaClient) GetX ¶
func (c *MultiWordSchemaClient) GetX(ctx context.Context, id int) *MultiWordSchema
GetX is like Get, but panics if an error occurs.
func (*MultiWordSchemaClient) Hooks ¶
func (c *MultiWordSchemaClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MultiWordSchemaClient) Query ¶
func (c *MultiWordSchemaClient) Query() *MultiWordSchemaQuery
Query returns a query builder for MultiWordSchema.
func (*MultiWordSchemaClient) Update ¶
func (c *MultiWordSchemaClient) Update() *MultiWordSchemaUpdate
Update returns an update builder for MultiWordSchema.
func (*MultiWordSchemaClient) UpdateOne ¶
func (c *MultiWordSchemaClient) UpdateOne(mws *MultiWordSchema) *MultiWordSchemaUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MultiWordSchemaClient) UpdateOneID ¶
func (c *MultiWordSchemaClient) UpdateOneID(id int) *MultiWordSchemaUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MultiWordSchemaClient) Use ¶
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 ¶
type MultiWordSchemaCreate struct {
// contains filtered or unexported fields
}
MultiWordSchemaCreate is the builder for creating a MultiWordSchema entity.
func (*MultiWordSchemaCreate) Exec ¶
func (mwsc *MultiWordSchemaCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MultiWordSchemaCreate) ExecX ¶
func (mwsc *MultiWordSchemaCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaCreate) Mutation ¶
func (mwsc *MultiWordSchemaCreate) Mutation() *MultiWordSchemaMutation
Mutation returns the MultiWordSchemaMutation object of the builder.
func (*MultiWordSchemaCreate) Save ¶
func (mwsc *MultiWordSchemaCreate) Save(ctx context.Context) (*MultiWordSchema, error)
Save creates the MultiWordSchema in the database.
func (*MultiWordSchemaCreate) SaveX ¶
func (mwsc *MultiWordSchemaCreate) SaveX(ctx context.Context) *MultiWordSchema
SaveX calls Save and panics if Save returns an error.
func (*MultiWordSchemaCreate) SetNillableUnit ¶
func (mwsc *MultiWordSchemaCreate) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaCreate
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*MultiWordSchemaCreate) SetUnit ¶
func (mwsc *MultiWordSchemaCreate) SetUnit(m multiwordschema.Unit) *MultiWordSchemaCreate
SetUnit sets the "unit" field.
type MultiWordSchemaCreateBulk ¶
type MultiWordSchemaCreateBulk struct {
// contains filtered or unexported fields
}
MultiWordSchemaCreateBulk is the builder for creating many MultiWordSchema entities in bulk.
func (*MultiWordSchemaCreateBulk) Exec ¶
func (mwscb *MultiWordSchemaCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MultiWordSchemaCreateBulk) ExecX ¶
func (mwscb *MultiWordSchemaCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaCreateBulk) Save ¶
func (mwscb *MultiWordSchemaCreateBulk) Save(ctx context.Context) ([]*MultiWordSchema, error)
Save creates the MultiWordSchema entities in the database.
func (*MultiWordSchemaCreateBulk) SaveX ¶
func (mwscb *MultiWordSchemaCreateBulk) SaveX(ctx context.Context) []*MultiWordSchema
SaveX is like Save, but panics if an error occurs.
type MultiWordSchemaDelete ¶
type MultiWordSchemaDelete struct {
// contains filtered or unexported fields
}
MultiWordSchemaDelete is the builder for deleting a MultiWordSchema entity.
func (*MultiWordSchemaDelete) Exec ¶
func (mwsd *MultiWordSchemaDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MultiWordSchemaDelete) ExecX ¶
func (mwsd *MultiWordSchemaDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaDelete) Where ¶
func (mwsd *MultiWordSchemaDelete) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaDelete
Where appends a list predicates to the MultiWordSchemaDelete builder.
type MultiWordSchemaDeleteOne ¶
type MultiWordSchemaDeleteOne struct {
// contains filtered or unexported fields
}
MultiWordSchemaDeleteOne is the builder for deleting a single MultiWordSchema entity.
func (*MultiWordSchemaDeleteOne) Exec ¶
func (mwsdo *MultiWordSchemaDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MultiWordSchemaDeleteOne) ExecX ¶
func (mwsdo *MultiWordSchemaDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MultiWordSchemaGroupBy ¶
type MultiWordSchemaGroupBy struct {
// contains filtered or unexported fields
}
MultiWordSchemaGroupBy is the group-by builder for MultiWordSchema entities.
func (*MultiWordSchemaGroupBy) Aggregate ¶
func (mwsgb *MultiWordSchemaGroupBy) Aggregate(fns ...AggregateFunc) *MultiWordSchemaGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MultiWordSchemaGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MultiWordSchemaGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaGroupBy) Scan ¶
func (mwsgb *MultiWordSchemaGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*MultiWordSchemaGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MultiWordSchemaMutation ¶
type MultiWordSchemaMutation struct {
// contains filtered or unexported fields
}
MultiWordSchemaMutation represents an operation that mutates the MultiWordSchema nodes in the graph.
func (*MultiWordSchemaMutation) AddField ¶
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 ¶
func (m *MultiWordSchemaMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MultiWordSchemaMutation) AddedField ¶
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 ¶
func (m *MultiWordSchemaMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MultiWordSchemaMutation) AddedIDs ¶
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 ¶
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 ¶
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 ¶
func (m *MultiWordSchemaMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MultiWordSchemaMutation) ClearedFields ¶
func (m *MultiWordSchemaMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MultiWordSchemaMutation) Client ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (m *MultiWordSchemaMutation) Op() Op
Op returns the operation name.
func (*MultiWordSchemaMutation) RemovedEdges ¶
func (m *MultiWordSchemaMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MultiWordSchemaMutation) RemovedIDs ¶
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 ¶
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 ¶
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 ¶
func (m *MultiWordSchemaMutation) ResetUnit()
ResetUnit resets all changes to the "unit" field.
func (*MultiWordSchemaMutation) SetField ¶
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 ¶
func (m *MultiWordSchemaMutation) SetUnit(value multiwordschema.Unit)
SetUnit sets the "unit" field.
func (MultiWordSchemaMutation) Tx ¶
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 ¶
func (m *MultiWordSchemaMutation) Type() string
Type returns the node type of this mutation (MultiWordSchema).
func (*MultiWordSchemaMutation) Unit ¶
func (m *MultiWordSchemaMutation) Unit() (r multiwordschema.Unit, exists bool)
Unit returns the value of the "unit" field in the mutation.
func (*MultiWordSchemaMutation) Where ¶
func (m *MultiWordSchemaMutation) Where(ps ...predicate.MultiWordSchema)
Where appends a list predicates to the MultiWordSchemaMutation builder.
type MultiWordSchemaQuery ¶
type MultiWordSchemaQuery struct {
// contains filtered or unexported fields
}
MultiWordSchemaQuery is the builder for querying MultiWordSchema entities.
func (*MultiWordSchemaQuery) All ¶
func (mwsq *MultiWordSchemaQuery) All(ctx context.Context) ([]*MultiWordSchema, error)
All executes the query and returns a list of MultiWordSchemas.
func (*MultiWordSchemaQuery) AllX ¶
func (mwsq *MultiWordSchemaQuery) AllX(ctx context.Context) []*MultiWordSchema
AllX is like All, but panics if an error occurs.
func (*MultiWordSchemaQuery) Clone ¶
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 ¶
func (mwsq *MultiWordSchemaQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MultiWordSchemaQuery) CountX ¶
func (mwsq *MultiWordSchemaQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MultiWordSchemaQuery) Exist ¶
func (mwsq *MultiWordSchemaQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MultiWordSchemaQuery) ExistX ¶
func (mwsq *MultiWordSchemaQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MultiWordSchemaQuery) First ¶
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 ¶
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 ¶
func (mwsq *MultiWordSchemaQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MultiWordSchemaQuery) FirstX ¶
func (mwsq *MultiWordSchemaQuery) FirstX(ctx context.Context) *MultiWordSchema
FirstX is like First, but panics if an error occurs.
func (*MultiWordSchemaQuery) GroupBy ¶
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 ¶
func (mwsq *MultiWordSchemaQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of MultiWordSchema IDs.
func (*MultiWordSchemaQuery) IDsX ¶
func (mwsq *MultiWordSchemaQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MultiWordSchemaQuery) Limit ¶
func (mwsq *MultiWordSchemaQuery) Limit(limit int) *MultiWordSchemaQuery
Limit adds a limit step to the query.
func (*MultiWordSchemaQuery) Offset ¶
func (mwsq *MultiWordSchemaQuery) Offset(offset int) *MultiWordSchemaQuery
Offset adds an offset step to the query.
func (*MultiWordSchemaQuery) Only ¶
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 ¶
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 ¶
func (mwsq *MultiWordSchemaQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MultiWordSchemaQuery) OnlyX ¶
func (mwsq *MultiWordSchemaQuery) OnlyX(ctx context.Context) *MultiWordSchema
OnlyX is like Only, but panics if an error occurs.
func (*MultiWordSchemaQuery) Order ¶
func (mwsq *MultiWordSchemaQuery) Order(o ...OrderFunc) *MultiWordSchemaQuery
Order adds an order step to the query.
func (*MultiWordSchemaQuery) Select ¶
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 ¶
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 ¶
func (mwsq *MultiWordSchemaQuery) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaQuery
Where adds a new predicate for the MultiWordSchemaQuery builder.
type MultiWordSchemaSelect ¶
type MultiWordSchemaSelect struct { *MultiWordSchemaQuery // contains filtered or unexported fields }
MultiWordSchemaSelect is the builder for selecting fields of MultiWordSchema entities.
func (*MultiWordSchemaSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MultiWordSchemaSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MultiWordSchemaSelect) Scan ¶
func (mwss *MultiWordSchemaSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*MultiWordSchemaSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MultiWordSchemaUpdate ¶
type MultiWordSchemaUpdate struct {
// contains filtered or unexported fields
}
MultiWordSchemaUpdate is the builder for updating MultiWordSchema entities.
func (*MultiWordSchemaUpdate) Exec ¶
func (mwsu *MultiWordSchemaUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MultiWordSchemaUpdate) ExecX ¶
func (mwsu *MultiWordSchemaUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaUpdate) Mutation ¶
func (mwsu *MultiWordSchemaUpdate) Mutation() *MultiWordSchemaMutation
Mutation returns the MultiWordSchemaMutation object of the builder.
func (*MultiWordSchemaUpdate) Save ¶
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 ¶
func (mwsu *MultiWordSchemaUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MultiWordSchemaUpdate) SetNillableUnit ¶
func (mwsu *MultiWordSchemaUpdate) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaUpdate
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*MultiWordSchemaUpdate) SetUnit ¶
func (mwsu *MultiWordSchemaUpdate) SetUnit(m multiwordschema.Unit) *MultiWordSchemaUpdate
SetUnit sets the "unit" field.
func (*MultiWordSchemaUpdate) Where ¶
func (mwsu *MultiWordSchemaUpdate) Where(ps ...predicate.MultiWordSchema) *MultiWordSchemaUpdate
Where appends a list predicates to the MultiWordSchemaUpdate builder.
type MultiWordSchemaUpdateOne ¶
type MultiWordSchemaUpdateOne struct {
// contains filtered or unexported fields
}
MultiWordSchemaUpdateOne is the builder for updating a single MultiWordSchema entity.
func (*MultiWordSchemaUpdateOne) Exec ¶
func (mwsuo *MultiWordSchemaUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MultiWordSchemaUpdateOne) ExecX ¶
func (mwsuo *MultiWordSchemaUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MultiWordSchemaUpdateOne) Mutation ¶
func (mwsuo *MultiWordSchemaUpdateOne) Mutation() *MultiWordSchemaMutation
Mutation returns the MultiWordSchemaMutation object of the builder.
func (*MultiWordSchemaUpdateOne) Save ¶
func (mwsuo *MultiWordSchemaUpdateOne) Save(ctx context.Context) (*MultiWordSchema, error)
Save executes the query and returns the updated MultiWordSchema entity.
func (*MultiWordSchemaUpdateOne) SaveX ¶
func (mwsuo *MultiWordSchemaUpdateOne) SaveX(ctx context.Context) *MultiWordSchema
SaveX is like Save, but panics if an error occurs.
func (*MultiWordSchemaUpdateOne) Select ¶
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 ¶
func (mwsuo *MultiWordSchemaUpdateOne) SetNillableUnit(m *multiwordschema.Unit) *MultiWordSchemaUpdateOne
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*MultiWordSchemaUpdateOne) SetUnit ¶
func (mwsuo *MultiWordSchemaUpdateOne) SetUnit(m multiwordschema.Unit) *MultiWordSchemaUpdateOne
SetUnit sets the "unit" field.
type MultiWordSchemas ¶
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 ¶
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 ¶
func (ne *NilExample) String() string
String implements the fmt.Stringer.
func (*NilExample) Unwrap ¶
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 ¶
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 ¶
type NilExampleClient struct {
// contains filtered or unexported fields
}
NilExampleClient is a client for the NilExample schema.
func NewNilExampleClient ¶
func NewNilExampleClient(c config) *NilExampleClient
NewNilExampleClient returns a client for the NilExample from the given config.
func (*NilExampleClient) Create ¶
func (c *NilExampleClient) Create() *NilExampleCreate
Create returns a create builder for NilExample.
func (*NilExampleClient) CreateBulk ¶
func (c *NilExampleClient) CreateBulk(builders ...*NilExampleCreate) *NilExampleCreateBulk
CreateBulk returns a builder for creating a bulk of NilExample entities.
func (*NilExampleClient) Delete ¶
func (c *NilExampleClient) Delete() *NilExampleDelete
Delete returns a delete builder for NilExample.
func (*NilExampleClient) DeleteOne ¶
func (c *NilExampleClient) DeleteOne(ne *NilExample) *NilExampleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*NilExampleClient) DeleteOneID ¶
func (c *NilExampleClient) DeleteOneID(id int) *NilExampleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*NilExampleClient) Get ¶
func (c *NilExampleClient) Get(ctx context.Context, id int) (*NilExample, error)
Get returns a NilExample entity by its id.
func (*NilExampleClient) GetX ¶
func (c *NilExampleClient) GetX(ctx context.Context, id int) *NilExample
GetX is like Get, but panics if an error occurs.
func (*NilExampleClient) Hooks ¶
func (c *NilExampleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NilExampleClient) Query ¶
func (c *NilExampleClient) Query() *NilExampleQuery
Query returns a query builder for NilExample.
func (*NilExampleClient) Update ¶
func (c *NilExampleClient) Update() *NilExampleUpdate
Update returns an update builder for NilExample.
func (*NilExampleClient) UpdateOne ¶
func (c *NilExampleClient) UpdateOne(ne *NilExample) *NilExampleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NilExampleClient) UpdateOneID ¶
func (c *NilExampleClient) UpdateOneID(id int) *NilExampleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NilExampleClient) Use ¶
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 ¶
type NilExampleCreate struct {
// contains filtered or unexported fields
}
NilExampleCreate is the builder for creating a NilExample entity.
func (*NilExampleCreate) Exec ¶
func (nec *NilExampleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NilExampleCreate) ExecX ¶
func (nec *NilExampleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleCreate) Mutation ¶
func (nec *NilExampleCreate) Mutation() *NilExampleMutation
Mutation returns the NilExampleMutation object of the builder.
func (*NilExampleCreate) Save ¶
func (nec *NilExampleCreate) Save(ctx context.Context) (*NilExample, error)
Save creates the NilExample in the database.
func (*NilExampleCreate) SaveX ¶
func (nec *NilExampleCreate) SaveX(ctx context.Context) *NilExample
SaveX calls Save and panics if Save returns an error.
func (*NilExampleCreate) SetNillableStrNil ¶
func (nec *NilExampleCreate) SetNillableStrNil(s *string) *NilExampleCreate
SetNillableStrNil sets the "str_nil" field if the given value is not nil.
func (*NilExampleCreate) SetNillableTimeNil ¶
func (nec *NilExampleCreate) SetNillableTimeNil(t *time.Time) *NilExampleCreate
SetNillableTimeNil sets the "time_nil" field if the given value is not nil.
func (*NilExampleCreate) SetStrNil ¶
func (nec *NilExampleCreate) SetStrNil(s string) *NilExampleCreate
SetStrNil sets the "str_nil" field.
func (*NilExampleCreate) SetTimeNil ¶
func (nec *NilExampleCreate) SetTimeNil(t time.Time) *NilExampleCreate
SetTimeNil sets the "time_nil" field.
type NilExampleCreateBulk ¶
type NilExampleCreateBulk struct {
// contains filtered or unexported fields
}
NilExampleCreateBulk is the builder for creating many NilExample entities in bulk.
func (*NilExampleCreateBulk) Exec ¶
func (necb *NilExampleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NilExampleCreateBulk) ExecX ¶
func (necb *NilExampleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleCreateBulk) Save ¶
func (necb *NilExampleCreateBulk) Save(ctx context.Context) ([]*NilExample, error)
Save creates the NilExample entities in the database.
func (*NilExampleCreateBulk) SaveX ¶
func (necb *NilExampleCreateBulk) SaveX(ctx context.Context) []*NilExample
SaveX is like Save, but panics if an error occurs.
type NilExampleDelete ¶
type NilExampleDelete struct {
// contains filtered or unexported fields
}
NilExampleDelete is the builder for deleting a NilExample entity.
func (*NilExampleDelete) Exec ¶
func (ned *NilExampleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NilExampleDelete) ExecX ¶
func (ned *NilExampleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleDelete) Where ¶
func (ned *NilExampleDelete) Where(ps ...predicate.NilExample) *NilExampleDelete
Where appends a list predicates to the NilExampleDelete builder.
type NilExampleDeleteOne ¶
type NilExampleDeleteOne struct {
// contains filtered or unexported fields
}
NilExampleDeleteOne is the builder for deleting a single NilExample entity.
func (*NilExampleDeleteOne) Exec ¶
func (nedo *NilExampleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NilExampleDeleteOne) ExecX ¶
func (nedo *NilExampleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NilExampleGroupBy ¶
type NilExampleGroupBy struct {
// contains filtered or unexported fields
}
NilExampleGroupBy is the group-by builder for NilExample entities.
func (*NilExampleGroupBy) Aggregate ¶
func (negb *NilExampleGroupBy) Aggregate(fns ...AggregateFunc) *NilExampleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NilExampleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NilExampleGroupBy) Scan ¶
func (negb *NilExampleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*NilExampleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NilExampleMutation ¶
type NilExampleMutation struct {
// contains filtered or unexported fields
}
NilExampleMutation represents an operation that mutates the NilExample nodes in the graph.
func (*NilExampleMutation) AddField ¶
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 ¶
func (m *NilExampleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NilExampleMutation) AddedField ¶
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 ¶
func (m *NilExampleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NilExampleMutation) AddedIDs ¶
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 ¶
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 ¶
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 ¶
func (m *NilExampleMutation) ClearStrNil()
ClearStrNil clears the value of the "str_nil" field.
func (*NilExampleMutation) ClearTimeNil ¶
func (m *NilExampleMutation) ClearTimeNil()
ClearTimeNil clears the value of the "time_nil" field.
func (*NilExampleMutation) ClearedEdges ¶
func (m *NilExampleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NilExampleMutation) ClearedFields ¶
func (m *NilExampleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NilExampleMutation) Client ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) RemovedEdges ¶
func (m *NilExampleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NilExampleMutation) RemovedIDs ¶
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 ¶
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 ¶
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 ¶
func (m *NilExampleMutation) ResetStrNil()
ResetStrNil resets all changes to the "str_nil" field.
func (*NilExampleMutation) ResetTimeNil ¶
func (m *NilExampleMutation) ResetTimeNil()
ResetTimeNil resets all changes to the "time_nil" field.
func (*NilExampleMutation) SetField ¶
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 ¶
func (m *NilExampleMutation) SetStrNil(s string)
SetStrNil sets the "str_nil" field.
func (*NilExampleMutation) SetTimeNil ¶
func (m *NilExampleMutation) SetTimeNil(t time.Time)
SetTimeNil sets the "time_nil" field.
func (*NilExampleMutation) StrNil ¶
func (m *NilExampleMutation) StrNil() (r string, exists bool)
StrNil returns the value of the "str_nil" field in the mutation.
func (*NilExampleMutation) StrNilCleared ¶
func (m *NilExampleMutation) StrNilCleared() bool
StrNilCleared returns if the "str_nil" field was cleared in this mutation.
func (*NilExampleMutation) TimeNil ¶
func (m *NilExampleMutation) TimeNil() (r time.Time, exists bool)
TimeNil returns the value of the "time_nil" field in the mutation.
func (*NilExampleMutation) TimeNilCleared ¶
func (m *NilExampleMutation) TimeNilCleared() bool
TimeNilCleared returns if the "time_nil" field was cleared in this mutation.
func (NilExampleMutation) Tx ¶
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 ¶
func (m *NilExampleMutation) Type() string
Type returns the node type of this mutation (NilExample).
func (*NilExampleMutation) Where ¶
func (m *NilExampleMutation) Where(ps ...predicate.NilExample)
Where appends a list predicates to the NilExampleMutation builder.
type NilExampleQuery ¶
type NilExampleQuery struct {
// contains filtered or unexported fields
}
NilExampleQuery is the builder for querying NilExample entities.
func (*NilExampleQuery) All ¶
func (neq *NilExampleQuery) All(ctx context.Context) ([]*NilExample, error)
All executes the query and returns a list of NilExamples.
func (*NilExampleQuery) AllX ¶
func (neq *NilExampleQuery) AllX(ctx context.Context) []*NilExample
AllX is like All, but panics if an error occurs.
func (*NilExampleQuery) Clone ¶
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 ¶
func (neq *NilExampleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NilExampleQuery) CountX ¶
func (neq *NilExampleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NilExampleQuery) Exist ¶
func (neq *NilExampleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NilExampleQuery) ExistX ¶
func (neq *NilExampleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NilExampleQuery) First ¶
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 ¶
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 ¶
func (neq *NilExampleQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NilExampleQuery) FirstX ¶
func (neq *NilExampleQuery) FirstX(ctx context.Context) *NilExample
FirstX is like First, but panics if an error occurs.
func (*NilExampleQuery) GroupBy ¶
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 ¶
func (neq *NilExampleQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of NilExample IDs.
func (*NilExampleQuery) IDsX ¶
func (neq *NilExampleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NilExampleQuery) Limit ¶
func (neq *NilExampleQuery) Limit(limit int) *NilExampleQuery
Limit adds a limit step to the query.
func (*NilExampleQuery) Offset ¶
func (neq *NilExampleQuery) Offset(offset int) *NilExampleQuery
Offset adds an offset step to the query.
func (*NilExampleQuery) Only ¶
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 ¶
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 ¶
func (neq *NilExampleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NilExampleQuery) OnlyX ¶
func (neq *NilExampleQuery) OnlyX(ctx context.Context) *NilExample
OnlyX is like Only, but panics if an error occurs.
func (*NilExampleQuery) Order ¶
func (neq *NilExampleQuery) Order(o ...OrderFunc) *NilExampleQuery
Order adds an order step to the query.
func (*NilExampleQuery) Select ¶
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 ¶
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 ¶
func (neq *NilExampleQuery) Where(ps ...predicate.NilExample) *NilExampleQuery
Where adds a new predicate for the NilExampleQuery builder.
type NilExampleSelect ¶
type NilExampleSelect struct { *NilExampleQuery // contains filtered or unexported fields }
NilExampleSelect is the builder for selecting fields of NilExample entities.
func (*NilExampleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NilExampleSelect) Scan ¶
func (nes *NilExampleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*NilExampleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NilExampleUpdate ¶
type NilExampleUpdate struct {
// contains filtered or unexported fields
}
NilExampleUpdate is the builder for updating NilExample entities.
func (*NilExampleUpdate) ClearStrNil ¶
func (neu *NilExampleUpdate) ClearStrNil() *NilExampleUpdate
ClearStrNil clears the value of the "str_nil" field.
func (*NilExampleUpdate) ClearTimeNil ¶
func (neu *NilExampleUpdate) ClearTimeNil() *NilExampleUpdate
ClearTimeNil clears the value of the "time_nil" field.
func (*NilExampleUpdate) Exec ¶
func (neu *NilExampleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NilExampleUpdate) ExecX ¶
func (neu *NilExampleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleUpdate) Mutation ¶
func (neu *NilExampleUpdate) Mutation() *NilExampleMutation
Mutation returns the NilExampleMutation object of the builder.
func (*NilExampleUpdate) Save ¶
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 ¶
func (neu *NilExampleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NilExampleUpdate) SetNillableStrNil ¶
func (neu *NilExampleUpdate) SetNillableStrNil(s *string) *NilExampleUpdate
SetNillableStrNil sets the "str_nil" field if the given value is not nil.
func (*NilExampleUpdate) SetNillableTimeNil ¶
func (neu *NilExampleUpdate) SetNillableTimeNil(t *time.Time) *NilExampleUpdate
SetNillableTimeNil sets the "time_nil" field if the given value is not nil.
func (*NilExampleUpdate) SetStrNil ¶
func (neu *NilExampleUpdate) SetStrNil(s string) *NilExampleUpdate
SetStrNil sets the "str_nil" field.
func (*NilExampleUpdate) SetTimeNil ¶
func (neu *NilExampleUpdate) SetTimeNil(t time.Time) *NilExampleUpdate
SetTimeNil sets the "time_nil" field.
func (*NilExampleUpdate) Where ¶
func (neu *NilExampleUpdate) Where(ps ...predicate.NilExample) *NilExampleUpdate
Where appends a list predicates to the NilExampleUpdate builder.
type NilExampleUpdateOne ¶
type NilExampleUpdateOne struct {
// contains filtered or unexported fields
}
NilExampleUpdateOne is the builder for updating a single NilExample entity.
func (*NilExampleUpdateOne) ClearStrNil ¶
func (neuo *NilExampleUpdateOne) ClearStrNil() *NilExampleUpdateOne
ClearStrNil clears the value of the "str_nil" field.
func (*NilExampleUpdateOne) ClearTimeNil ¶
func (neuo *NilExampleUpdateOne) ClearTimeNil() *NilExampleUpdateOne
ClearTimeNil clears the value of the "time_nil" field.
func (*NilExampleUpdateOne) Exec ¶
func (neuo *NilExampleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NilExampleUpdateOne) ExecX ¶
func (neuo *NilExampleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NilExampleUpdateOne) Mutation ¶
func (neuo *NilExampleUpdateOne) Mutation() *NilExampleMutation
Mutation returns the NilExampleMutation object of the builder.
func (*NilExampleUpdateOne) Save ¶
func (neuo *NilExampleUpdateOne) Save(ctx context.Context) (*NilExample, error)
Save executes the query and returns the updated NilExample entity.
func (*NilExampleUpdateOne) SaveX ¶
func (neuo *NilExampleUpdateOne) SaveX(ctx context.Context) *NilExample
SaveX is like Save, but panics if an error occurs.
func (*NilExampleUpdateOne) Select ¶
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 ¶
func (neuo *NilExampleUpdateOne) SetNillableStrNil(s *string) *NilExampleUpdateOne
SetNillableStrNil sets the "str_nil" field if the given value is not nil.
func (*NilExampleUpdateOne) SetNillableTimeNil ¶
func (neuo *NilExampleUpdateOne) SetNillableTimeNil(t *time.Time) *NilExampleUpdateOne
SetNillableTimeNil sets the "time_nil" field if the given value is not nil.
func (*NilExampleUpdateOne) SetStrNil ¶
func (neuo *NilExampleUpdateOne) SetStrNil(s string) *NilExampleUpdateOne
SetStrNil sets the "str_nil" field.
func (*NilExampleUpdateOne) SetTimeNil ¶
func (neuo *NilExampleUpdateOne) SetTimeNil(t time.Time) *NilExampleUpdateOne
SetTimeNil sets the "time_nil" field.
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 ¶
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) QueryOwner ¶
QueryOwner queries the "owner" edge of the Pet entity.
func (*Pet) Unwrap ¶
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 ¶
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 ¶
type PetClient struct {
// contains filtered or unexported fields
}
PetClient is a client for the Pet schema.
func NewPetClient ¶
func NewPetClient(c config) *PetClient
NewPetClient returns a client for the Pet from the given config.
func (*PetClient) CreateBulk ¶
func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk
CreateBulk returns a builder for creating a bulk of Pet entities.
func (*PetClient) DeleteOne ¶
func (c *PetClient) DeleteOne(pe *Pet) *PetDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*PetClient) DeleteOneID ¶
func (c *PetClient) DeleteOneID(id int) *PetDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*PetClient) QueryOwner ¶
QueryOwner queries the owner edge of a Pet.
func (*PetClient) UpdateOne ¶
func (c *PetClient) UpdateOne(pe *Pet) *PetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PetClient) UpdateOneID ¶
func (c *PetClient) UpdateOneID(id int) *PetUpdateOne
UpdateOneID returns an update builder for the given id.
type PetCreate ¶
type PetCreate struct {
// contains filtered or unexported fields
}
PetCreate is the builder for creating a Pet entity.
func (*PetCreate) Mutation ¶
func (pc *PetCreate) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetCreate) SetNillableOwnerID ¶
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*PetCreate) SetOwnerID ¶
SetOwnerID sets the "owner" edge to the User entity by ID.
type PetCreateBulk ¶
type PetCreateBulk struct {
// contains filtered or unexported fields
}
PetCreateBulk is the builder for creating many Pet entities in bulk.
func (*PetCreateBulk) Exec ¶
func (pcb *PetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PetCreateBulk) ExecX ¶
func (pcb *PetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PetDelete ¶
type PetDelete struct {
// contains filtered or unexported fields
}
PetDelete is the builder for deleting a Pet entity.
func (*PetDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type PetDeleteOne ¶
type PetDeleteOne struct {
// contains filtered or unexported fields
}
PetDeleteOne is the builder for deleting a single Pet entity.
func (*PetDeleteOne) Exec ¶
func (pdo *PetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PetDeleteOne) ExecX ¶
func (pdo *PetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PetEdges ¶
type PetEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
PetEdges holds the relations/edges for other nodes in the graph.
func (PetEdges) OwnerOrErr ¶
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 ¶
type PetGroupBy struct {
// contains filtered or unexported fields
}
PetGroupBy is the group-by builder for Pet entities.
func (*PetGroupBy) Aggregate ¶
func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PetGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Scan ¶
func (pgb *PetGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*PetGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PetMutation ¶
type PetMutation struct {
// contains filtered or unexported fields
}
PetMutation represents an operation that mutates the Pet nodes in the graph.
func (*PetMutation) AddField ¶
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 ¶
func (m *PetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PetMutation) AddedField ¶
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 ¶
func (m *PetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PetMutation) AddedIDs ¶
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) ClearEdge ¶
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 ¶
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 ¶
func (m *PetMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*PetMutation) ClearedEdges ¶
func (m *PetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PetMutation) ClearedFields ¶
func (m *PetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PetMutation) Client ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) OwnerCleared ¶
func (m *PetMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*PetMutation) OwnerID ¶
func (m *PetMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*PetMutation) OwnerIDs ¶
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) RemovedEdges ¶
func (m *PetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PetMutation) RemovedIDs ¶
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) ResetEdge ¶
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 ¶
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 ¶
func (m *PetMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*PetMutation) SetField ¶
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 ¶
func (m *PetMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (PetMutation) Tx ¶
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 ¶
func (m *PetMutation) Type() string
Type returns the node type of this mutation (Pet).
func (*PetMutation) Where ¶
func (m *PetMutation) Where(ps ...predicate.Pet)
Where appends a list predicates to the PetMutation builder.
type PetQuery ¶
type PetQuery struct {
// contains filtered or unexported fields
}
PetQuery is the builder for querying Pet entities.
func (*PetQuery) Clone ¶
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 ¶
First returns the first Pet entity from the query. Returns a *NotFoundError when no Pet was found.
func (*PetQuery) FirstID ¶
FirstID returns the first Pet ID from the query. Returns a *NotFoundError when no Pet ID was found.
func (*PetQuery) GroupBy ¶
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 ¶
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 ¶
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) QueryOwner ¶
QueryOwner chains the current query on the "owner" edge.
func (*PetQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*PetQuery) 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 PetSelect ¶
type PetSelect struct { *PetQuery // contains filtered or unexported fields }
PetSelect is the builder for selecting fields of Pet entities.
func (*PetSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PetSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PetSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PetSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PetSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PetSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PetSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PetUpdate ¶
type PetUpdate struct {
// contains filtered or unexported fields
}
PetUpdate is the builder for updating Pet entities.
func (*PetUpdate) ClearOwner ¶
ClearOwner clears the "owner" edge to the User entity.
func (*PetUpdate) Mutation ¶
func (pu *PetUpdate) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*PetUpdate) SetNillableOwnerID ¶
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*PetUpdate) SetOwnerID ¶
SetOwnerID sets the "owner" edge to the User entity by ID.
type PetUpdateOne ¶
type PetUpdateOne struct {
// contains filtered or unexported fields
}
PetUpdateOne is the builder for updating a single Pet entity.
func (*PetUpdateOne) ClearOwner ¶
func (puo *PetUpdateOne) ClearOwner() *PetUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*PetUpdateOne) Exec ¶
func (puo *PetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PetUpdateOne) ExecX ¶
func (puo *PetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PetUpdateOne) Mutation ¶
func (puo *PetUpdateOne) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetUpdateOne) Save ¶
func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error)
Save executes the query and returns the updated Pet entity.
func (*PetUpdateOne) SaveX ¶
func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet
SaveX is like Save, but panics if an error occurs.
func (*PetUpdateOne) Select ¶
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 ¶
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 ¶
func (puo *PetUpdateOne) SetOwner(u *User) *PetUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*PetUpdateOne) SetOwnerID ¶
func (puo *PetUpdateOne) SetOwnerID(id int) *PetUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
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 ¶
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 ¶
func (see *SkipEdgeExample) QueryUser() *UserQuery
QueryUser queries the "user" edge of the SkipEdgeExample entity.
func (*SkipEdgeExample) String ¶
func (see *SkipEdgeExample) String() string
String implements the fmt.Stringer.
func (*SkipEdgeExample) Unwrap ¶
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 ¶
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 ¶
type SkipEdgeExampleClient struct {
// contains filtered or unexported fields
}
SkipEdgeExampleClient is a client for the SkipEdgeExample schema.
func NewSkipEdgeExampleClient ¶
func NewSkipEdgeExampleClient(c config) *SkipEdgeExampleClient
NewSkipEdgeExampleClient returns a client for the SkipEdgeExample from the given config.
func (*SkipEdgeExampleClient) Create ¶
func (c *SkipEdgeExampleClient) Create() *SkipEdgeExampleCreate
Create returns a create builder for SkipEdgeExample.
func (*SkipEdgeExampleClient) CreateBulk ¶
func (c *SkipEdgeExampleClient) CreateBulk(builders ...*SkipEdgeExampleCreate) *SkipEdgeExampleCreateBulk
CreateBulk returns a builder for creating a bulk of SkipEdgeExample entities.
func (*SkipEdgeExampleClient) Delete ¶
func (c *SkipEdgeExampleClient) Delete() *SkipEdgeExampleDelete
Delete returns a delete builder for SkipEdgeExample.
func (*SkipEdgeExampleClient) DeleteOne ¶
func (c *SkipEdgeExampleClient) DeleteOne(see *SkipEdgeExample) *SkipEdgeExampleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SkipEdgeExampleClient) DeleteOneID ¶
func (c *SkipEdgeExampleClient) DeleteOneID(id int) *SkipEdgeExampleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SkipEdgeExampleClient) Get ¶
func (c *SkipEdgeExampleClient) Get(ctx context.Context, id int) (*SkipEdgeExample, error)
Get returns a SkipEdgeExample entity by its id.
func (*SkipEdgeExampleClient) GetX ¶
func (c *SkipEdgeExampleClient) GetX(ctx context.Context, id int) *SkipEdgeExample
GetX is like Get, but panics if an error occurs.
func (*SkipEdgeExampleClient) Hooks ¶
func (c *SkipEdgeExampleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SkipEdgeExampleClient) Query ¶
func (c *SkipEdgeExampleClient) Query() *SkipEdgeExampleQuery
Query returns a query builder for SkipEdgeExample.
func (*SkipEdgeExampleClient) QueryUser ¶
func (c *SkipEdgeExampleClient) QueryUser(see *SkipEdgeExample) *UserQuery
QueryUser queries the user edge of a SkipEdgeExample.
func (*SkipEdgeExampleClient) Update ¶
func (c *SkipEdgeExampleClient) Update() *SkipEdgeExampleUpdate
Update returns an update builder for SkipEdgeExample.
func (*SkipEdgeExampleClient) UpdateOne ¶
func (c *SkipEdgeExampleClient) UpdateOne(see *SkipEdgeExample) *SkipEdgeExampleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SkipEdgeExampleClient) UpdateOneID ¶
func (c *SkipEdgeExampleClient) UpdateOneID(id int) *SkipEdgeExampleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SkipEdgeExampleClient) Use ¶
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 ¶
type SkipEdgeExampleCreate struct {
// contains filtered or unexported fields
}
SkipEdgeExampleCreate is the builder for creating a SkipEdgeExample entity.
func (*SkipEdgeExampleCreate) Exec ¶
func (seec *SkipEdgeExampleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SkipEdgeExampleCreate) ExecX ¶
func (seec *SkipEdgeExampleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleCreate) Mutation ¶
func (seec *SkipEdgeExampleCreate) Mutation() *SkipEdgeExampleMutation
Mutation returns the SkipEdgeExampleMutation object of the builder.
func (*SkipEdgeExampleCreate) Save ¶
func (seec *SkipEdgeExampleCreate) Save(ctx context.Context) (*SkipEdgeExample, error)
Save creates the SkipEdgeExample in the database.
func (*SkipEdgeExampleCreate) SaveX ¶
func (seec *SkipEdgeExampleCreate) SaveX(ctx context.Context) *SkipEdgeExample
SaveX calls Save and panics if Save returns an error.
func (*SkipEdgeExampleCreate) SetNillableUserID ¶
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 ¶
func (seec *SkipEdgeExampleCreate) SetUser(u *User) *SkipEdgeExampleCreate
SetUser sets the "user" edge to the User entity.
func (*SkipEdgeExampleCreate) SetUserID ¶
func (seec *SkipEdgeExampleCreate) SetUserID(id int) *SkipEdgeExampleCreate
SetUserID sets the "user" edge to the User entity by ID.
type SkipEdgeExampleCreateBulk ¶
type SkipEdgeExampleCreateBulk struct {
// contains filtered or unexported fields
}
SkipEdgeExampleCreateBulk is the builder for creating many SkipEdgeExample entities in bulk.
func (*SkipEdgeExampleCreateBulk) Exec ¶
func (seecb *SkipEdgeExampleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SkipEdgeExampleCreateBulk) ExecX ¶
func (seecb *SkipEdgeExampleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleCreateBulk) Save ¶
func (seecb *SkipEdgeExampleCreateBulk) Save(ctx context.Context) ([]*SkipEdgeExample, error)
Save creates the SkipEdgeExample entities in the database.
func (*SkipEdgeExampleCreateBulk) SaveX ¶
func (seecb *SkipEdgeExampleCreateBulk) SaveX(ctx context.Context) []*SkipEdgeExample
SaveX is like Save, but panics if an error occurs.
type SkipEdgeExampleDelete ¶
type SkipEdgeExampleDelete struct {
// contains filtered or unexported fields
}
SkipEdgeExampleDelete is the builder for deleting a SkipEdgeExample entity.
func (*SkipEdgeExampleDelete) Exec ¶
func (seed *SkipEdgeExampleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SkipEdgeExampleDelete) ExecX ¶
func (seed *SkipEdgeExampleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleDelete) Where ¶
func (seed *SkipEdgeExampleDelete) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleDelete
Where appends a list predicates to the SkipEdgeExampleDelete builder.
type SkipEdgeExampleDeleteOne ¶
type SkipEdgeExampleDeleteOne struct {
// contains filtered or unexported fields
}
SkipEdgeExampleDeleteOne is the builder for deleting a single SkipEdgeExample entity.
func (*SkipEdgeExampleDeleteOne) Exec ¶
func (seedo *SkipEdgeExampleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SkipEdgeExampleDeleteOne) ExecX ¶
func (seedo *SkipEdgeExampleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SkipEdgeExampleEdges ¶
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 ¶
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 ¶
type SkipEdgeExampleGroupBy struct {
// contains filtered or unexported fields
}
SkipEdgeExampleGroupBy is the group-by builder for SkipEdgeExample entities.
func (*SkipEdgeExampleGroupBy) Aggregate ¶
func (seegb *SkipEdgeExampleGroupBy) Aggregate(fns ...AggregateFunc) *SkipEdgeExampleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SkipEdgeExampleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*SkipEdgeExampleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleGroupBy) Scan ¶
func (seegb *SkipEdgeExampleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SkipEdgeExampleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SkipEdgeExampleMutation ¶
type SkipEdgeExampleMutation struct {
// contains filtered or unexported fields
}
SkipEdgeExampleMutation represents an operation that mutates the SkipEdgeExample nodes in the graph.
func (*SkipEdgeExampleMutation) AddField ¶
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 ¶
func (m *SkipEdgeExampleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SkipEdgeExampleMutation) AddedField ¶
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 ¶
func (m *SkipEdgeExampleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SkipEdgeExampleMutation) AddedIDs ¶
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 ¶
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 ¶
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 ¶
func (m *SkipEdgeExampleMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*SkipEdgeExampleMutation) ClearedEdges ¶
func (m *SkipEdgeExampleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SkipEdgeExampleMutation) ClearedFields ¶
func (m *SkipEdgeExampleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SkipEdgeExampleMutation) Client ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (m *SkipEdgeExampleMutation) Op() Op
Op returns the operation name.
func (*SkipEdgeExampleMutation) RemovedEdges ¶
func (m *SkipEdgeExampleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SkipEdgeExampleMutation) RemovedIDs ¶
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 ¶
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 ¶
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 ¶
func (m *SkipEdgeExampleMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*SkipEdgeExampleMutation) SetField ¶
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 ¶
func (m *SkipEdgeExampleMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (SkipEdgeExampleMutation) Tx ¶
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 ¶
func (m *SkipEdgeExampleMutation) Type() string
Type returns the node type of this mutation (SkipEdgeExample).
func (*SkipEdgeExampleMutation) UserCleared ¶
func (m *SkipEdgeExampleMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*SkipEdgeExampleMutation) UserID ¶
func (m *SkipEdgeExampleMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*SkipEdgeExampleMutation) UserIDs ¶
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 ¶
func (m *SkipEdgeExampleMutation) Where(ps ...predicate.SkipEdgeExample)
Where appends a list predicates to the SkipEdgeExampleMutation builder.
type SkipEdgeExampleQuery ¶
type SkipEdgeExampleQuery struct {
// contains filtered or unexported fields
}
SkipEdgeExampleQuery is the builder for querying SkipEdgeExample entities.
func (*SkipEdgeExampleQuery) All ¶
func (seeq *SkipEdgeExampleQuery) All(ctx context.Context) ([]*SkipEdgeExample, error)
All executes the query and returns a list of SkipEdgeExamples.
func (*SkipEdgeExampleQuery) AllX ¶
func (seeq *SkipEdgeExampleQuery) AllX(ctx context.Context) []*SkipEdgeExample
AllX is like All, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Clone ¶
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 ¶
func (seeq *SkipEdgeExampleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SkipEdgeExampleQuery) CountX ¶
func (seeq *SkipEdgeExampleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Exist ¶
func (seeq *SkipEdgeExampleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SkipEdgeExampleQuery) ExistX ¶
func (seeq *SkipEdgeExampleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SkipEdgeExampleQuery) First ¶
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 ¶
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 ¶
func (seeq *SkipEdgeExampleQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SkipEdgeExampleQuery) FirstX ¶
func (seeq *SkipEdgeExampleQuery) FirstX(ctx context.Context) *SkipEdgeExample
FirstX is like First, but panics if an error occurs.
func (*SkipEdgeExampleQuery) GroupBy ¶
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 ¶
func (seeq *SkipEdgeExampleQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SkipEdgeExample IDs.
func (*SkipEdgeExampleQuery) IDsX ¶
func (seeq *SkipEdgeExampleQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Limit ¶
func (seeq *SkipEdgeExampleQuery) Limit(limit int) *SkipEdgeExampleQuery
Limit adds a limit step to the query.
func (*SkipEdgeExampleQuery) Offset ¶
func (seeq *SkipEdgeExampleQuery) Offset(offset int) *SkipEdgeExampleQuery
Offset adds an offset step to the query.
func (*SkipEdgeExampleQuery) Only ¶
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 ¶
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 ¶
func (seeq *SkipEdgeExampleQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SkipEdgeExampleQuery) OnlyX ¶
func (seeq *SkipEdgeExampleQuery) OnlyX(ctx context.Context) *SkipEdgeExample
OnlyX is like Only, but panics if an error occurs.
func (*SkipEdgeExampleQuery) Order ¶
func (seeq *SkipEdgeExampleQuery) Order(o ...OrderFunc) *SkipEdgeExampleQuery
Order adds an order step to the query.
func (*SkipEdgeExampleQuery) QueryUser ¶
func (seeq *SkipEdgeExampleQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*SkipEdgeExampleQuery) Select ¶
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 ¶
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 ¶
func (seeq *SkipEdgeExampleQuery) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleQuery
Where adds a new predicate for the SkipEdgeExampleQuery builder.
func (*SkipEdgeExampleQuery) WithUser ¶
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 ¶
type SkipEdgeExampleSelect struct { *SkipEdgeExampleQuery // contains filtered or unexported fields }
SkipEdgeExampleSelect is the builder for selecting fields of SkipEdgeExample entities.
func (*SkipEdgeExampleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*SkipEdgeExampleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SkipEdgeExampleSelect) Scan ¶
func (sees *SkipEdgeExampleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SkipEdgeExampleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SkipEdgeExampleUpdate ¶
type SkipEdgeExampleUpdate struct {
// contains filtered or unexported fields
}
SkipEdgeExampleUpdate is the builder for updating SkipEdgeExample entities.
func (*SkipEdgeExampleUpdate) ClearUser ¶
func (seeu *SkipEdgeExampleUpdate) ClearUser() *SkipEdgeExampleUpdate
ClearUser clears the "user" edge to the User entity.
func (*SkipEdgeExampleUpdate) Exec ¶
func (seeu *SkipEdgeExampleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SkipEdgeExampleUpdate) ExecX ¶
func (seeu *SkipEdgeExampleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleUpdate) Mutation ¶
func (seeu *SkipEdgeExampleUpdate) Mutation() *SkipEdgeExampleMutation
Mutation returns the SkipEdgeExampleMutation object of the builder.
func (*SkipEdgeExampleUpdate) Save ¶
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 ¶
func (seeu *SkipEdgeExampleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SkipEdgeExampleUpdate) SetNillableUserID ¶
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 ¶
func (seeu *SkipEdgeExampleUpdate) SetUser(u *User) *SkipEdgeExampleUpdate
SetUser sets the "user" edge to the User entity.
func (*SkipEdgeExampleUpdate) SetUserID ¶
func (seeu *SkipEdgeExampleUpdate) SetUserID(id int) *SkipEdgeExampleUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*SkipEdgeExampleUpdate) Where ¶
func (seeu *SkipEdgeExampleUpdate) Where(ps ...predicate.SkipEdgeExample) *SkipEdgeExampleUpdate
Where appends a list predicates to the SkipEdgeExampleUpdate builder.
type SkipEdgeExampleUpdateOne ¶
type SkipEdgeExampleUpdateOne struct {
// contains filtered or unexported fields
}
SkipEdgeExampleUpdateOne is the builder for updating a single SkipEdgeExample entity.
func (*SkipEdgeExampleUpdateOne) ClearUser ¶
func (seeuo *SkipEdgeExampleUpdateOne) ClearUser() *SkipEdgeExampleUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*SkipEdgeExampleUpdateOne) Exec ¶
func (seeuo *SkipEdgeExampleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SkipEdgeExampleUpdateOne) ExecX ¶
func (seeuo *SkipEdgeExampleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkipEdgeExampleUpdateOne) Mutation ¶
func (seeuo *SkipEdgeExampleUpdateOne) Mutation() *SkipEdgeExampleMutation
Mutation returns the SkipEdgeExampleMutation object of the builder.
func (*SkipEdgeExampleUpdateOne) Save ¶
func (seeuo *SkipEdgeExampleUpdateOne) Save(ctx context.Context) (*SkipEdgeExample, error)
Save executes the query and returns the updated SkipEdgeExample entity.
func (*SkipEdgeExampleUpdateOne) SaveX ¶
func (seeuo *SkipEdgeExampleUpdateOne) SaveX(ctx context.Context) *SkipEdgeExample
SaveX is like Save, but panics if an error occurs.
func (*SkipEdgeExampleUpdateOne) Select ¶
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 ¶
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 ¶
func (seeuo *SkipEdgeExampleUpdateOne) SetUser(u *User) *SkipEdgeExampleUpdateOne
SetUser sets the "user" edge to the User entity.
func (*SkipEdgeExampleUpdateOne) SetUserID ¶
func (seeuo *SkipEdgeExampleUpdateOne) SetUserID(id int) *SkipEdgeExampleUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
type SkipEdgeExamples ¶
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 create builder for Todo.
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 delete builder for the given entity.
func (*TodoClient) DeleteOneID ¶
func (c *TodoClient) DeleteOneID(id int) *TodoDeleteOne
DeleteOneID returns a delete builder for the given 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 ¶
func (tc *TodoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoCreate) ExecX ¶
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 ¶
func (tcb *TodoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TodoCreateBulk) ExecX ¶
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 interface{}) 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 ¶
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 ¶
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 interface{}) 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 // 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"` // 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 ¶
func (u *User) QueryReceived1() *AttachmentQuery
QueryReceived1 queries the "received_1" edge of the User entity.
func (*User) QuerySkipEdge ¶
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 create builder for User.
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 delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a delete builder for the given 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 ¶
func (c *UserClient) QueryPet(u *User) *PetQuery
QueryPet queries the pet edge of a User.
func (*UserClient) QueryReceived1 ¶
func (c *UserClient) QueryReceived1(u *User) *AttachmentQuery
QueryReceived1 queries the received_1 edge of a User.
func (*UserClient) QuerySkipEdge ¶
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 ¶
func (uc *UserCreate) AddReceived1(a ...*Attachment) *UserCreate
AddReceived1 adds the "received_1" edges to the Attachment entity.
func (*UserCreate) AddReceived1IDs ¶
func (uc *UserCreate) AddReceived1IDs(ids ...uuid.UUID) *UserCreate
AddReceived1IDs adds the "received_1" edge to the Attachment entity by IDs.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAccountBalance ¶
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 ¶
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) 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 ¶
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) SetNillableAccountBalance ¶
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 ¶
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) 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 ¶
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 ¶
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 ¶
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 ¶
func (uc *UserCreate) SetNillableType(s *string) *UserCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserCreate) SetNillableUnnecessary ¶
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 ¶
func (uc *UserCreate) SetPet(p *Pet) *UserCreate
SetPet sets the "pet" edge to the Pet entity.
func (*UserCreate) SetPetID ¶
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 ¶
func (uc *UserCreate) SetSkipEdge(s *SkipEdgeExample) *UserCreate
SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserCreate) SetSkipEdgeID ¶
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 ¶
func (uc *UserCreate) SetType(s string) *UserCreate
SetType sets the "type" field.
func (*UserCreate) SetUnnecessary ¶
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 ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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 ¶
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 ¶
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 ¶
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 interface{}) 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 ¶
func (m *UserMutation) AccountBalance() (r float64, exists bool)
AccountBalance returns the value of the "account_balance" field in the mutation.
func (*UserMutation) AddAccountBalance ¶
func (m *UserMutation) AddAccountBalance(f float64)
AddAccountBalance adds f to the "account_balance" field.
func (*UserMutation) AddBUser1 ¶
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 ¶
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 ¶
func (m *UserMutation) AddReceived1IDs(ids ...uuid.UUID)
AddReceived1IDs adds the "received_1" edge to the Attachment entity by ids.
func (*UserMutation) AddedAccountBalance ¶
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 ¶
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 ¶
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) 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 ¶
func (m *UserMutation) BUser1() (r int, exists bool)
BUser1 returns the value of the "b_user_1" field in the mutation.
func (*UserMutation) BUser1Cleared ¶
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 ¶
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) 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 ¶
func (m *UserMutation) ClearPet()
ClearPet clears the "pet" edge to the Pet entity.
func (*UserMutation) ClearReceived1 ¶
func (m *UserMutation) ClearReceived1()
ClearReceived1 clears the "received_1" edge to the Attachment entity.
func (*UserMutation) ClearSkipEdge ¶
func (m *UserMutation) ClearSkipEdge()
ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserMutation) ClearType ¶
func (m *UserMutation) ClearType()
ClearType clears the value of the "type" field.
func (*UserMutation) ClearUnnecessary ¶
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) 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 ¶
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 ¶
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 ¶
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) OldAccountBalance ¶
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 ¶
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) 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 ¶
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) 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 ¶
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 ¶
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 ¶
func (m *UserMutation) PetCleared() bool
PetCleared reports if the "pet" edge to the Pet entity was cleared.
func (*UserMutation) PetID ¶
func (m *UserMutation) PetID() (id int, exists bool)
PetID returns the "pet" edge ID in the mutation.
func (*UserMutation) PetIDs ¶
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 ¶
func (m *UserMutation) Received1Cleared() bool
Received1Cleared reports if the "received_1" edge to the Attachment entity was cleared.
func (*UserMutation) Received1IDs ¶
func (m *UserMutation) Received1IDs() (ids []uuid.UUID)
Received1IDs returns the "received_1" edge IDs in the mutation.
func (*UserMutation) RemoveReceived1IDs ¶
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 ¶
func (m *UserMutation) RemovedReceived1IDs() (ids []uuid.UUID)
RemovedReceived1 returns the removed IDs of the "received_1" edge to the Attachment entity.
func (*UserMutation) ResetAccountBalance ¶
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 ¶
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) 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 ¶
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) 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 ¶
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 ¶
func (m *UserMutation) ResetReceived1()
ResetReceived1 resets all changes to the "received_1" edge.
func (*UserMutation) ResetSkipEdge ¶
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 ¶
func (m *UserMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserMutation) ResetUnnecessary ¶
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 ¶
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 ¶
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) 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 ¶
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) 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 ¶
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 ¶
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 ¶
func (m *UserMutation) SetType(s string)
SetType sets the "type" field.
func (*UserMutation) SetUnnecessary ¶
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 ¶
func (m *UserMutation) SkipEdgeCleared() bool
SkipEdgeCleared reports if the "skip_edge" edge to the SkipEdgeExample entity was cleared.
func (*UserMutation) SkipEdgeID ¶
func (m *UserMutation) SkipEdgeID() (id int, exists bool)
SkipEdgeID returns the "skip_edge" edge ID in the mutation.
func (*UserMutation) SkipEdgeIDs ¶
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 ¶
func (m *UserMutation) TypeCleared() bool
TypeCleared returns if the "type" field was cleared in this mutation.
func (*UserMutation) Unnecessary ¶
func (m *UserMutation) Unnecessary() (r string, exists bool)
Unnecessary returns the value of the "unnecessary" field in the mutation.
func (*UserMutation) UnnecessaryCleared ¶
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 ¶
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 ¶
func (uq *UserQuery) QueryReceived1() *AttachmentQuery
QueryReceived1 chains the current query on the "received_1" edge.
func (*UserQuery) QuerySkipEdge ¶
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 ¶
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 ¶
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 ¶
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 interface{}) 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 ¶
func (uu *UserUpdate) AddAccountBalance(f float64) *UserUpdate
AddAccountBalance adds f to the "account_balance" field.
func (*UserUpdate) AddBUser1 ¶
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 ¶
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 ¶
func (uu *UserUpdate) AddReceived1(a ...*Attachment) *UserUpdate
AddReceived1 adds the "received_1" edges to the Attachment entity.
func (*UserUpdate) AddReceived1IDs ¶
func (uu *UserUpdate) AddReceived1IDs(ids ...uuid.UUID) *UserUpdate
AddReceived1IDs adds the "received_1" edge to the Attachment entity by IDs.
func (*UserUpdate) ClearAttachment ¶
func (uu *UserUpdate) ClearAttachment() *UserUpdate
ClearAttachment clears the "attachment" edge to the Attachment entity.
func (*UserUpdate) ClearBUser1 ¶
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) 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 ¶
func (uu *UserUpdate) ClearPet() *UserUpdate
ClearPet clears the "pet" edge to the Pet entity.
func (*UserUpdate) ClearReceived1 ¶
func (uu *UserUpdate) ClearReceived1() *UserUpdate
ClearReceived1 clears all "received_1" edges to the Attachment entity.
func (*UserUpdate) ClearSkipEdge ¶
func (uu *UserUpdate) ClearSkipEdge() *UserUpdate
ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdate) ClearType ¶
func (uu *UserUpdate) ClearType() *UserUpdate
ClearType clears the value of the "type" field.
func (*UserUpdate) ClearUnnecessary ¶
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 ¶
func (uu *UserUpdate) RemoveReceived1(a ...*Attachment) *UserUpdate
RemoveReceived1 removes "received_1" edges to Attachment entities.
func (*UserUpdate) RemoveReceived1IDs ¶
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 ¶
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 ¶
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) 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 ¶
func (uu *UserUpdate) SetHeightInCm(f float32) *UserUpdate
SetHeightInCm sets the "height_in_cm" field.
func (*UserUpdate) SetNillableAccountBalance ¶
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 ¶
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) 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 ¶
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 ¶
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 ¶
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 ¶
func (uu *UserUpdate) SetNillableType(s *string) *UserUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdate) SetNillableUnnecessary ¶
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 ¶
func (uu *UserUpdate) SetPet(p *Pet) *UserUpdate
SetPet sets the "pet" edge to the Pet entity.
func (*UserUpdate) SetPetID ¶
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 ¶
func (uu *UserUpdate) SetSkipEdge(s *SkipEdgeExample) *UserUpdate
SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdate) SetSkipEdgeID ¶
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 ¶
func (uu *UserUpdate) SetType(s string) *UserUpdate
SetType sets the "type" field.
func (*UserUpdate) SetUnnecessary ¶
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 ¶
func (uuo *UserUpdateOne) AddAccountBalance(f float64) *UserUpdateOne
AddAccountBalance adds f to the "account_balance" field.
func (*UserUpdateOne) AddBUser1 ¶
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 ¶
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 ¶
func (uuo *UserUpdateOne) AddReceived1(a ...*Attachment) *UserUpdateOne
AddReceived1 adds the "received_1" edges to the Attachment entity.
func (*UserUpdateOne) AddReceived1IDs ¶
func (uuo *UserUpdateOne) AddReceived1IDs(ids ...uuid.UUID) *UserUpdateOne
AddReceived1IDs adds the "received_1" edge to the Attachment entity by IDs.
func (*UserUpdateOne) ClearAttachment ¶
func (uuo *UserUpdateOne) ClearAttachment() *UserUpdateOne
ClearAttachment clears the "attachment" edge to the Attachment entity.
func (*UserUpdateOne) ClearBUser1 ¶
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) 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 ¶
func (uuo *UserUpdateOne) ClearPet() *UserUpdateOne
ClearPet clears the "pet" edge to the Pet entity.
func (*UserUpdateOne) ClearReceived1 ¶
func (uuo *UserUpdateOne) ClearReceived1() *UserUpdateOne
ClearReceived1 clears all "received_1" edges to the Attachment entity.
func (*UserUpdateOne) ClearSkipEdge ¶
func (uuo *UserUpdateOne) ClearSkipEdge() *UserUpdateOne
ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdateOne) ClearType ¶
func (uuo *UserUpdateOne) ClearType() *UserUpdateOne
ClearType clears the value of the "type" field.
func (*UserUpdateOne) ClearUnnecessary ¶
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 ¶
func (uuo *UserUpdateOne) RemoveReceived1(a ...*Attachment) *UserUpdateOne
RemoveReceived1 removes "received_1" edges to Attachment entities.
func (*UserUpdateOne) RemoveReceived1IDs ¶
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 ¶
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 ¶
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) 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 ¶
func (uuo *UserUpdateOne) SetHeightInCm(f float32) *UserUpdateOne
SetHeightInCm sets the "height_in_cm" field.
func (*UserUpdateOne) SetNillableAccountBalance ¶
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 ¶
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) 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 ¶
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 ¶
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 ¶
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 ¶
func (uuo *UserUpdateOne) SetNillableType(s *string) *UserUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUnnecessary ¶
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 ¶
func (uuo *UserUpdateOne) SetPet(p *Pet) *UserUpdateOne
SetPet sets the "pet" edge to the Pet entity.
func (*UserUpdateOne) SetPetID ¶
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 ¶
func (uuo *UserUpdateOne) SetSkipEdge(s *SkipEdgeExample) *UserUpdateOne
SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.
func (*UserUpdateOne) SetSkipEdgeID ¶
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 ¶
func (uuo *UserUpdateOne) SetType(s string) *UserUpdateOne
SetType sets the "type" field.
func (*UserUpdateOne) SetUnnecessary ¶
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
- 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