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 Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- 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
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- 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) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- 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
- type Users
- type ValidationError
- type Value
- type WithFields
- type WithFieldsClient
- func (c *WithFieldsClient) Create() *WithFieldsCreate
- func (c *WithFieldsClient) CreateBulk(builders ...*WithFieldsCreate) *WithFieldsCreateBulk
- func (c *WithFieldsClient) Delete() *WithFieldsDelete
- func (c *WithFieldsClient) DeleteOne(wf *WithFields) *WithFieldsDeleteOne
- func (c *WithFieldsClient) DeleteOneID(id int) *WithFieldsDeleteOne
- func (c *WithFieldsClient) Get(ctx context.Context, id int) (*WithFields, error)
- func (c *WithFieldsClient) GetX(ctx context.Context, id int) *WithFields
- func (c *WithFieldsClient) Hooks() []Hook
- func (c *WithFieldsClient) Query() *WithFieldsQuery
- func (c *WithFieldsClient) Update() *WithFieldsUpdate
- func (c *WithFieldsClient) UpdateOne(wf *WithFields) *WithFieldsUpdateOne
- func (c *WithFieldsClient) UpdateOneID(id int) *WithFieldsUpdateOne
- func (c *WithFieldsClient) Use(hooks ...Hook)
- type WithFieldsCreate
- func (wfc *WithFieldsCreate) Exec(ctx context.Context) error
- func (wfc *WithFieldsCreate) ExecX(ctx context.Context)
- func (wfc *WithFieldsCreate) Mutation() *WithFieldsMutation
- func (wfc *WithFieldsCreate) Save(ctx context.Context) (*WithFields, error)
- func (wfc *WithFieldsCreate) SaveX(ctx context.Context) *WithFields
- func (wfc *WithFieldsCreate) SetExisting(s string) *WithFieldsCreate
- type WithFieldsCreateBulk
- type WithFieldsDelete
- type WithFieldsDeleteOne
- type WithFieldsGroupBy
- func (wfgb *WithFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithFieldsGroupBy
- func (s *WithFieldsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithFieldsGroupBy) BoolX(ctx context.Context) bool
- func (s *WithFieldsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WithFieldsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WithFieldsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithFieldsGroupBy) Float64X(ctx context.Context) float64
- func (s *WithFieldsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithFieldsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WithFieldsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WithFieldsGroupBy) IntX(ctx context.Context) int
- func (s *WithFieldsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WithFieldsGroupBy) IntsX(ctx context.Context) []int
- func (wfgb *WithFieldsGroupBy) Scan(ctx context.Context, v any) error
- func (s *WithFieldsGroupBy) ScanX(ctx context.Context, v any)
- func (s *WithFieldsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WithFieldsGroupBy) StringX(ctx context.Context) string
- func (s *WithFieldsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WithFieldsGroupBy) StringsX(ctx context.Context) []string
- type WithFieldsMutation
- func (m *WithFieldsMutation) AddField(name string, value ent.Value) error
- func (m *WithFieldsMutation) AddedEdges() []string
- func (m *WithFieldsMutation) AddedField(name string) (ent.Value, bool)
- func (m *WithFieldsMutation) AddedFields() []string
- func (m *WithFieldsMutation) AddedIDs(name string) []ent.Value
- func (m *WithFieldsMutation) ClearEdge(name string) error
- func (m *WithFieldsMutation) ClearField(name string) error
- func (m *WithFieldsMutation) ClearedEdges() []string
- func (m *WithFieldsMutation) ClearedFields() []string
- func (m WithFieldsMutation) Client() *Client
- func (m *WithFieldsMutation) EdgeCleared(name string) bool
- func (m *WithFieldsMutation) Existing() (r string, exists bool)
- func (m *WithFieldsMutation) Field(name string) (ent.Value, bool)
- func (m *WithFieldsMutation) FieldCleared(name string) bool
- func (m *WithFieldsMutation) Fields() []string
- func (m *WithFieldsMutation) ID() (id int, exists bool)
- func (m *WithFieldsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WithFieldsMutation) OldExisting(ctx context.Context) (v string, err error)
- func (m *WithFieldsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WithFieldsMutation) Op() Op
- func (m *WithFieldsMutation) RemovedEdges() []string
- func (m *WithFieldsMutation) RemovedIDs(name string) []ent.Value
- func (m *WithFieldsMutation) ResetEdge(name string) error
- func (m *WithFieldsMutation) ResetExisting()
- func (m *WithFieldsMutation) ResetField(name string) error
- func (m *WithFieldsMutation) SetExisting(s string)
- func (m *WithFieldsMutation) SetField(name string, value ent.Value) error
- func (m WithFieldsMutation) Tx() (*Tx, error)
- func (m *WithFieldsMutation) Type() string
- func (m *WithFieldsMutation) Where(ps ...predicate.WithFields)
- type WithFieldsQuery
- func (wfq *WithFieldsQuery) All(ctx context.Context) ([]*WithFields, error)
- func (wfq *WithFieldsQuery) AllX(ctx context.Context) []*WithFields
- func (wfq *WithFieldsQuery) Clone() *WithFieldsQuery
- func (wfq *WithFieldsQuery) Count(ctx context.Context) (int, error)
- func (wfq *WithFieldsQuery) CountX(ctx context.Context) int
- func (wfq *WithFieldsQuery) Exist(ctx context.Context) (bool, error)
- func (wfq *WithFieldsQuery) ExistX(ctx context.Context) bool
- func (wfq *WithFieldsQuery) First(ctx context.Context) (*WithFields, error)
- func (wfq *WithFieldsQuery) FirstID(ctx context.Context) (id int, err error)
- func (wfq *WithFieldsQuery) FirstIDX(ctx context.Context) int
- func (wfq *WithFieldsQuery) FirstX(ctx context.Context) *WithFields
- func (wfq *WithFieldsQuery) GroupBy(field string, fields ...string) *WithFieldsGroupBy
- func (wfq *WithFieldsQuery) IDs(ctx context.Context) ([]int, error)
- func (wfq *WithFieldsQuery) IDsX(ctx context.Context) []int
- func (wfq *WithFieldsQuery) Limit(limit int) *WithFieldsQuery
- func (wfq *WithFieldsQuery) Offset(offset int) *WithFieldsQuery
- func (wfq *WithFieldsQuery) Only(ctx context.Context) (*WithFields, error)
- func (wfq *WithFieldsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (wfq *WithFieldsQuery) OnlyIDX(ctx context.Context) int
- func (wfq *WithFieldsQuery) OnlyX(ctx context.Context) *WithFields
- func (wfq *WithFieldsQuery) Order(o ...OrderFunc) *WithFieldsQuery
- func (wfq *WithFieldsQuery) Select(fields ...string) *WithFieldsSelect
- func (wfq *WithFieldsQuery) Unique(unique bool) *WithFieldsQuery
- func (wfq *WithFieldsQuery) Where(ps ...predicate.WithFields) *WithFieldsQuery
- type WithFieldsSelect
- func (s *WithFieldsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithFieldsSelect) BoolX(ctx context.Context) bool
- func (s *WithFieldsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WithFieldsSelect) BoolsX(ctx context.Context) []bool
- func (s *WithFieldsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithFieldsSelect) Float64X(ctx context.Context) float64
- func (s *WithFieldsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithFieldsSelect) Float64sX(ctx context.Context) []float64
- func (s *WithFieldsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WithFieldsSelect) IntX(ctx context.Context) int
- func (s *WithFieldsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WithFieldsSelect) IntsX(ctx context.Context) []int
- func (wfs *WithFieldsSelect) Scan(ctx context.Context, v any) error
- func (s *WithFieldsSelect) ScanX(ctx context.Context, v any)
- func (s *WithFieldsSelect) String(ctx context.Context) (_ string, err error)
- func (s *WithFieldsSelect) StringX(ctx context.Context) string
- func (s *WithFieldsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WithFieldsSelect) StringsX(ctx context.Context) []string
- type WithFieldsSlice
- type WithFieldsUpdate
- func (wfu *WithFieldsUpdate) Exec(ctx context.Context) error
- func (wfu *WithFieldsUpdate) ExecX(ctx context.Context)
- func (wfu *WithFieldsUpdate) Mutation() *WithFieldsMutation
- func (wfu *WithFieldsUpdate) Save(ctx context.Context) (int, error)
- func (wfu *WithFieldsUpdate) SaveX(ctx context.Context) int
- func (wfu *WithFieldsUpdate) SetExisting(s string) *WithFieldsUpdate
- func (wfu *WithFieldsUpdate) Where(ps ...predicate.WithFields) *WithFieldsUpdate
- type WithFieldsUpdateOne
- func (wfuo *WithFieldsUpdateOne) Exec(ctx context.Context) error
- func (wfuo *WithFieldsUpdateOne) ExecX(ctx context.Context)
- func (wfuo *WithFieldsUpdateOne) Mutation() *WithFieldsMutation
- func (wfuo *WithFieldsUpdateOne) Save(ctx context.Context) (*WithFields, error)
- func (wfuo *WithFieldsUpdateOne) SaveX(ctx context.Context) *WithFields
- func (wfuo *WithFieldsUpdateOne) Select(field string, fields ...string) *WithFieldsUpdateOne
- func (wfuo *WithFieldsUpdateOne) SetExisting(s string) *WithFieldsUpdateOne
- type WithModifiedField
- type WithModifiedFieldClient
- func (c *WithModifiedFieldClient) Create() *WithModifiedFieldCreate
- func (c *WithModifiedFieldClient) CreateBulk(builders ...*WithModifiedFieldCreate) *WithModifiedFieldCreateBulk
- func (c *WithModifiedFieldClient) Delete() *WithModifiedFieldDelete
- func (c *WithModifiedFieldClient) DeleteOne(wmf *WithModifiedField) *WithModifiedFieldDeleteOne
- func (c *WithModifiedFieldClient) DeleteOneID(id int) *WithModifiedFieldDeleteOne
- func (c *WithModifiedFieldClient) Get(ctx context.Context, id int) (*WithModifiedField, error)
- func (c *WithModifiedFieldClient) GetX(ctx context.Context, id int) *WithModifiedField
- func (c *WithModifiedFieldClient) Hooks() []Hook
- func (c *WithModifiedFieldClient) Query() *WithModifiedFieldQuery
- func (c *WithModifiedFieldClient) QueryOwner(wmf *WithModifiedField) *UserQuery
- func (c *WithModifiedFieldClient) Update() *WithModifiedFieldUpdate
- func (c *WithModifiedFieldClient) UpdateOne(wmf *WithModifiedField) *WithModifiedFieldUpdateOne
- func (c *WithModifiedFieldClient) UpdateOneID(id int) *WithModifiedFieldUpdateOne
- func (c *WithModifiedFieldClient) Use(hooks ...Hook)
- type WithModifiedFieldCreate
- func (wmfc *WithModifiedFieldCreate) Exec(ctx context.Context) error
- func (wmfc *WithModifiedFieldCreate) ExecX(ctx context.Context)
- func (wmfc *WithModifiedFieldCreate) Mutation() *WithModifiedFieldMutation
- func (wmfc *WithModifiedFieldCreate) Save(ctx context.Context) (*WithModifiedField, error)
- func (wmfc *WithModifiedFieldCreate) SaveX(ctx context.Context) *WithModifiedField
- func (wmfc *WithModifiedFieldCreate) SetName(s string) *WithModifiedFieldCreate
- func (wmfc *WithModifiedFieldCreate) SetNillableOwnerID(id *int) *WithModifiedFieldCreate
- func (wmfc *WithModifiedFieldCreate) SetOwner(u *User) *WithModifiedFieldCreate
- func (wmfc *WithModifiedFieldCreate) SetOwnerID(id int) *WithModifiedFieldCreate
- type WithModifiedFieldCreateBulk
- func (wmfcb *WithModifiedFieldCreateBulk) Exec(ctx context.Context) error
- func (wmfcb *WithModifiedFieldCreateBulk) ExecX(ctx context.Context)
- func (wmfcb *WithModifiedFieldCreateBulk) Save(ctx context.Context) ([]*WithModifiedField, error)
- func (wmfcb *WithModifiedFieldCreateBulk) SaveX(ctx context.Context) []*WithModifiedField
- type WithModifiedFieldDelete
- type WithModifiedFieldDeleteOne
- type WithModifiedFieldEdges
- type WithModifiedFieldGroupBy
- func (wmfgb *WithModifiedFieldGroupBy) Aggregate(fns ...AggregateFunc) *WithModifiedFieldGroupBy
- func (s *WithModifiedFieldGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithModifiedFieldGroupBy) BoolX(ctx context.Context) bool
- func (s *WithModifiedFieldGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WithModifiedFieldGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WithModifiedFieldGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithModifiedFieldGroupBy) Float64X(ctx context.Context) float64
- func (s *WithModifiedFieldGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithModifiedFieldGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WithModifiedFieldGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WithModifiedFieldGroupBy) IntX(ctx context.Context) int
- func (s *WithModifiedFieldGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WithModifiedFieldGroupBy) IntsX(ctx context.Context) []int
- func (wmfgb *WithModifiedFieldGroupBy) Scan(ctx context.Context, v any) error
- func (s *WithModifiedFieldGroupBy) ScanX(ctx context.Context, v any)
- func (s *WithModifiedFieldGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WithModifiedFieldGroupBy) StringX(ctx context.Context) string
- func (s *WithModifiedFieldGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WithModifiedFieldGroupBy) StringsX(ctx context.Context) []string
- type WithModifiedFieldMutation
- func (m *WithModifiedFieldMutation) AddField(name string, value ent.Value) error
- func (m *WithModifiedFieldMutation) AddedEdges() []string
- func (m *WithModifiedFieldMutation) AddedField(name string) (ent.Value, bool)
- func (m *WithModifiedFieldMutation) AddedFields() []string
- func (m *WithModifiedFieldMutation) AddedIDs(name string) []ent.Value
- func (m *WithModifiedFieldMutation) ClearEdge(name string) error
- func (m *WithModifiedFieldMutation) ClearField(name string) error
- func (m *WithModifiedFieldMutation) ClearOwner()
- func (m *WithModifiedFieldMutation) ClearedEdges() []string
- func (m *WithModifiedFieldMutation) ClearedFields() []string
- func (m WithModifiedFieldMutation) Client() *Client
- func (m *WithModifiedFieldMutation) EdgeCleared(name string) bool
- func (m *WithModifiedFieldMutation) Field(name string) (ent.Value, bool)
- func (m *WithModifiedFieldMutation) FieldCleared(name string) bool
- func (m *WithModifiedFieldMutation) Fields() []string
- func (m *WithModifiedFieldMutation) ID() (id int, exists bool)
- func (m *WithModifiedFieldMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WithModifiedFieldMutation) Name() (r string, exists bool)
- func (m *WithModifiedFieldMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WithModifiedFieldMutation) OldName(ctx context.Context) (v string, err error)
- func (m *WithModifiedFieldMutation) Op() Op
- func (m *WithModifiedFieldMutation) OwnerCleared() bool
- func (m *WithModifiedFieldMutation) OwnerID() (id int, exists bool)
- func (m *WithModifiedFieldMutation) OwnerIDs() (ids []int)
- func (m *WithModifiedFieldMutation) RemovedEdges() []string
- func (m *WithModifiedFieldMutation) RemovedIDs(name string) []ent.Value
- func (m *WithModifiedFieldMutation) ResetEdge(name string) error
- func (m *WithModifiedFieldMutation) ResetField(name string) error
- func (m *WithModifiedFieldMutation) ResetName()
- func (m *WithModifiedFieldMutation) ResetOwner()
- func (m *WithModifiedFieldMutation) SetField(name string, value ent.Value) error
- func (m *WithModifiedFieldMutation) SetName(s string)
- func (m *WithModifiedFieldMutation) SetOwnerID(id int)
- func (m WithModifiedFieldMutation) Tx() (*Tx, error)
- func (m *WithModifiedFieldMutation) Type() string
- func (m *WithModifiedFieldMutation) Where(ps ...predicate.WithModifiedField)
- type WithModifiedFieldQuery
- func (wmfq *WithModifiedFieldQuery) All(ctx context.Context) ([]*WithModifiedField, error)
- func (wmfq *WithModifiedFieldQuery) AllX(ctx context.Context) []*WithModifiedField
- func (wmfq *WithModifiedFieldQuery) Clone() *WithModifiedFieldQuery
- func (wmfq *WithModifiedFieldQuery) Count(ctx context.Context) (int, error)
- func (wmfq *WithModifiedFieldQuery) CountX(ctx context.Context) int
- func (wmfq *WithModifiedFieldQuery) Exist(ctx context.Context) (bool, error)
- func (wmfq *WithModifiedFieldQuery) ExistX(ctx context.Context) bool
- func (wmfq *WithModifiedFieldQuery) First(ctx context.Context) (*WithModifiedField, error)
- func (wmfq *WithModifiedFieldQuery) FirstID(ctx context.Context) (id int, err error)
- func (wmfq *WithModifiedFieldQuery) FirstIDX(ctx context.Context) int
- func (wmfq *WithModifiedFieldQuery) FirstX(ctx context.Context) *WithModifiedField
- func (wmfq *WithModifiedFieldQuery) GroupBy(field string, fields ...string) *WithModifiedFieldGroupBy
- func (wmfq *WithModifiedFieldQuery) IDs(ctx context.Context) ([]int, error)
- func (wmfq *WithModifiedFieldQuery) IDsX(ctx context.Context) []int
- func (wmfq *WithModifiedFieldQuery) Limit(limit int) *WithModifiedFieldQuery
- func (wmfq *WithModifiedFieldQuery) Offset(offset int) *WithModifiedFieldQuery
- func (wmfq *WithModifiedFieldQuery) Only(ctx context.Context) (*WithModifiedField, error)
- func (wmfq *WithModifiedFieldQuery) OnlyID(ctx context.Context) (id int, err error)
- func (wmfq *WithModifiedFieldQuery) OnlyIDX(ctx context.Context) int
- func (wmfq *WithModifiedFieldQuery) OnlyX(ctx context.Context) *WithModifiedField
- func (wmfq *WithModifiedFieldQuery) Order(o ...OrderFunc) *WithModifiedFieldQuery
- func (wmfq *WithModifiedFieldQuery) QueryOwner() *UserQuery
- func (wmfq *WithModifiedFieldQuery) Select(fields ...string) *WithModifiedFieldSelect
- func (wmfq *WithModifiedFieldQuery) Unique(unique bool) *WithModifiedFieldQuery
- func (wmfq *WithModifiedFieldQuery) Where(ps ...predicate.WithModifiedField) *WithModifiedFieldQuery
- func (wmfq *WithModifiedFieldQuery) WithOwner(opts ...func(*UserQuery)) *WithModifiedFieldQuery
- type WithModifiedFieldSelect
- func (s *WithModifiedFieldSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithModifiedFieldSelect) BoolX(ctx context.Context) bool
- func (s *WithModifiedFieldSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WithModifiedFieldSelect) BoolsX(ctx context.Context) []bool
- func (s *WithModifiedFieldSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithModifiedFieldSelect) Float64X(ctx context.Context) float64
- func (s *WithModifiedFieldSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithModifiedFieldSelect) Float64sX(ctx context.Context) []float64
- func (s *WithModifiedFieldSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WithModifiedFieldSelect) IntX(ctx context.Context) int
- func (s *WithModifiedFieldSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WithModifiedFieldSelect) IntsX(ctx context.Context) []int
- func (wmfs *WithModifiedFieldSelect) Scan(ctx context.Context, v any) error
- func (s *WithModifiedFieldSelect) ScanX(ctx context.Context, v any)
- func (s *WithModifiedFieldSelect) String(ctx context.Context) (_ string, err error)
- func (s *WithModifiedFieldSelect) StringX(ctx context.Context) string
- func (s *WithModifiedFieldSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WithModifiedFieldSelect) StringsX(ctx context.Context) []string
- type WithModifiedFieldUpdate
- func (wmfu *WithModifiedFieldUpdate) ClearOwner() *WithModifiedFieldUpdate
- func (wmfu *WithModifiedFieldUpdate) Exec(ctx context.Context) error
- func (wmfu *WithModifiedFieldUpdate) ExecX(ctx context.Context)
- func (wmfu *WithModifiedFieldUpdate) Mutation() *WithModifiedFieldMutation
- func (wmfu *WithModifiedFieldUpdate) Save(ctx context.Context) (int, error)
- func (wmfu *WithModifiedFieldUpdate) SaveX(ctx context.Context) int
- func (wmfu *WithModifiedFieldUpdate) SetNillableOwnerID(id *int) *WithModifiedFieldUpdate
- func (wmfu *WithModifiedFieldUpdate) SetOwner(u *User) *WithModifiedFieldUpdate
- func (wmfu *WithModifiedFieldUpdate) SetOwnerID(id int) *WithModifiedFieldUpdate
- func (wmfu *WithModifiedFieldUpdate) Where(ps ...predicate.WithModifiedField) *WithModifiedFieldUpdate
- type WithModifiedFieldUpdateOne
- func (wmfuo *WithModifiedFieldUpdateOne) ClearOwner() *WithModifiedFieldUpdateOne
- func (wmfuo *WithModifiedFieldUpdateOne) Exec(ctx context.Context) error
- func (wmfuo *WithModifiedFieldUpdateOne) ExecX(ctx context.Context)
- func (wmfuo *WithModifiedFieldUpdateOne) Mutation() *WithModifiedFieldMutation
- func (wmfuo *WithModifiedFieldUpdateOne) Save(ctx context.Context) (*WithModifiedField, error)
- func (wmfuo *WithModifiedFieldUpdateOne) SaveX(ctx context.Context) *WithModifiedField
- func (wmfuo *WithModifiedFieldUpdateOne) Select(field string, fields ...string) *WithModifiedFieldUpdateOne
- func (wmfuo *WithModifiedFieldUpdateOne) SetNillableOwnerID(id *int) *WithModifiedFieldUpdateOne
- func (wmfuo *WithModifiedFieldUpdateOne) SetOwner(u *User) *WithModifiedFieldUpdateOne
- func (wmfuo *WithModifiedFieldUpdateOne) SetOwnerID(id int) *WithModifiedFieldUpdateOne
- type WithModifiedFields
- type WithNilFields
- type WithNilFieldsClient
- func (c *WithNilFieldsClient) Create() *WithNilFieldsCreate
- func (c *WithNilFieldsClient) CreateBulk(builders ...*WithNilFieldsCreate) *WithNilFieldsCreateBulk
- func (c *WithNilFieldsClient) Delete() *WithNilFieldsDelete
- func (c *WithNilFieldsClient) DeleteOne(wnf *WithNilFields) *WithNilFieldsDeleteOne
- func (c *WithNilFieldsClient) DeleteOneID(id int) *WithNilFieldsDeleteOne
- func (c *WithNilFieldsClient) Get(ctx context.Context, id int) (*WithNilFields, error)
- func (c *WithNilFieldsClient) GetX(ctx context.Context, id int) *WithNilFields
- func (c *WithNilFieldsClient) Hooks() []Hook
- func (c *WithNilFieldsClient) Query() *WithNilFieldsQuery
- func (c *WithNilFieldsClient) Update() *WithNilFieldsUpdate
- func (c *WithNilFieldsClient) UpdateOne(wnf *WithNilFields) *WithNilFieldsUpdateOne
- func (c *WithNilFieldsClient) UpdateOneID(id int) *WithNilFieldsUpdateOne
- func (c *WithNilFieldsClient) Use(hooks ...Hook)
- type WithNilFieldsCreate
- func (wnfc *WithNilFieldsCreate) Exec(ctx context.Context) error
- func (wnfc *WithNilFieldsCreate) ExecX(ctx context.Context)
- func (wnfc *WithNilFieldsCreate) Mutation() *WithNilFieldsMutation
- func (wnfc *WithNilFieldsCreate) Save(ctx context.Context) (*WithNilFields, error)
- func (wnfc *WithNilFieldsCreate) SaveX(ctx context.Context) *WithNilFields
- type WithNilFieldsCreateBulk
- func (wnfcb *WithNilFieldsCreateBulk) Exec(ctx context.Context) error
- func (wnfcb *WithNilFieldsCreateBulk) ExecX(ctx context.Context)
- func (wnfcb *WithNilFieldsCreateBulk) Save(ctx context.Context) ([]*WithNilFields, error)
- func (wnfcb *WithNilFieldsCreateBulk) SaveX(ctx context.Context) []*WithNilFields
- type WithNilFieldsDelete
- type WithNilFieldsDeleteOne
- type WithNilFieldsGroupBy
- func (wnfgb *WithNilFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithNilFieldsGroupBy
- func (s *WithNilFieldsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithNilFieldsGroupBy) BoolX(ctx context.Context) bool
- func (s *WithNilFieldsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WithNilFieldsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WithNilFieldsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithNilFieldsGroupBy) Float64X(ctx context.Context) float64
- func (s *WithNilFieldsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithNilFieldsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WithNilFieldsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WithNilFieldsGroupBy) IntX(ctx context.Context) int
- func (s *WithNilFieldsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WithNilFieldsGroupBy) IntsX(ctx context.Context) []int
- func (wnfgb *WithNilFieldsGroupBy) Scan(ctx context.Context, v any) error
- func (s *WithNilFieldsGroupBy) ScanX(ctx context.Context, v any)
- func (s *WithNilFieldsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WithNilFieldsGroupBy) StringX(ctx context.Context) string
- func (s *WithNilFieldsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WithNilFieldsGroupBy) StringsX(ctx context.Context) []string
- type WithNilFieldsMutation
- func (m *WithNilFieldsMutation) AddField(name string, value ent.Value) error
- func (m *WithNilFieldsMutation) AddedEdges() []string
- func (m *WithNilFieldsMutation) AddedField(name string) (ent.Value, bool)
- func (m *WithNilFieldsMutation) AddedFields() []string
- func (m *WithNilFieldsMutation) AddedIDs(name string) []ent.Value
- func (m *WithNilFieldsMutation) ClearEdge(name string) error
- func (m *WithNilFieldsMutation) ClearField(name string) error
- func (m *WithNilFieldsMutation) ClearedEdges() []string
- func (m *WithNilFieldsMutation) ClearedFields() []string
- func (m WithNilFieldsMutation) Client() *Client
- func (m *WithNilFieldsMutation) EdgeCleared(name string) bool
- func (m *WithNilFieldsMutation) Field(name string) (ent.Value, bool)
- func (m *WithNilFieldsMutation) FieldCleared(name string) bool
- func (m *WithNilFieldsMutation) Fields() []string
- func (m *WithNilFieldsMutation) ID() (id int, exists bool)
- func (m *WithNilFieldsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WithNilFieldsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WithNilFieldsMutation) Op() Op
- func (m *WithNilFieldsMutation) RemovedEdges() []string
- func (m *WithNilFieldsMutation) RemovedIDs(name string) []ent.Value
- func (m *WithNilFieldsMutation) ResetEdge(name string) error
- func (m *WithNilFieldsMutation) ResetField(name string) error
- func (m *WithNilFieldsMutation) SetField(name string, value ent.Value) error
- func (m WithNilFieldsMutation) Tx() (*Tx, error)
- func (m *WithNilFieldsMutation) Type() string
- func (m *WithNilFieldsMutation) Where(ps ...predicate.WithNilFields)
- type WithNilFieldsQuery
- func (wnfq *WithNilFieldsQuery) All(ctx context.Context) ([]*WithNilFields, error)
- func (wnfq *WithNilFieldsQuery) AllX(ctx context.Context) []*WithNilFields
- func (wnfq *WithNilFieldsQuery) Clone() *WithNilFieldsQuery
- func (wnfq *WithNilFieldsQuery) Count(ctx context.Context) (int, error)
- func (wnfq *WithNilFieldsQuery) CountX(ctx context.Context) int
- func (wnfq *WithNilFieldsQuery) Exist(ctx context.Context) (bool, error)
- func (wnfq *WithNilFieldsQuery) ExistX(ctx context.Context) bool
- func (wnfq *WithNilFieldsQuery) First(ctx context.Context) (*WithNilFields, error)
- func (wnfq *WithNilFieldsQuery) FirstID(ctx context.Context) (id int, err error)
- func (wnfq *WithNilFieldsQuery) FirstIDX(ctx context.Context) int
- func (wnfq *WithNilFieldsQuery) FirstX(ctx context.Context) *WithNilFields
- func (wnfq *WithNilFieldsQuery) GroupBy(field string, fields ...string) *WithNilFieldsGroupBy
- func (wnfq *WithNilFieldsQuery) IDs(ctx context.Context) ([]int, error)
- func (wnfq *WithNilFieldsQuery) IDsX(ctx context.Context) []int
- func (wnfq *WithNilFieldsQuery) Limit(limit int) *WithNilFieldsQuery
- func (wnfq *WithNilFieldsQuery) Offset(offset int) *WithNilFieldsQuery
- func (wnfq *WithNilFieldsQuery) Only(ctx context.Context) (*WithNilFields, error)
- func (wnfq *WithNilFieldsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (wnfq *WithNilFieldsQuery) OnlyIDX(ctx context.Context) int
- func (wnfq *WithNilFieldsQuery) OnlyX(ctx context.Context) *WithNilFields
- func (wnfq *WithNilFieldsQuery) Order(o ...OrderFunc) *WithNilFieldsQuery
- func (wnfq *WithNilFieldsQuery) Select(fields ...string) *WithNilFieldsSelect
- func (wnfq *WithNilFieldsQuery) Unique(unique bool) *WithNilFieldsQuery
- func (wnfq *WithNilFieldsQuery) Where(ps ...predicate.WithNilFields) *WithNilFieldsQuery
- type WithNilFieldsSelect
- func (s *WithNilFieldsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithNilFieldsSelect) BoolX(ctx context.Context) bool
- func (s *WithNilFieldsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WithNilFieldsSelect) BoolsX(ctx context.Context) []bool
- func (s *WithNilFieldsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithNilFieldsSelect) Float64X(ctx context.Context) float64
- func (s *WithNilFieldsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithNilFieldsSelect) Float64sX(ctx context.Context) []float64
- func (s *WithNilFieldsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WithNilFieldsSelect) IntX(ctx context.Context) int
- func (s *WithNilFieldsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WithNilFieldsSelect) IntsX(ctx context.Context) []int
- func (wnfs *WithNilFieldsSelect) Scan(ctx context.Context, v any) error
- func (s *WithNilFieldsSelect) ScanX(ctx context.Context, v any)
- func (s *WithNilFieldsSelect) String(ctx context.Context) (_ string, err error)
- func (s *WithNilFieldsSelect) StringX(ctx context.Context) string
- func (s *WithNilFieldsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WithNilFieldsSelect) StringsX(ctx context.Context) []string
- type WithNilFieldsSlice
- type WithNilFieldsUpdate
- func (wnfu *WithNilFieldsUpdate) Exec(ctx context.Context) error
- func (wnfu *WithNilFieldsUpdate) ExecX(ctx context.Context)
- func (wnfu *WithNilFieldsUpdate) Mutation() *WithNilFieldsMutation
- func (wnfu *WithNilFieldsUpdate) Save(ctx context.Context) (int, error)
- func (wnfu *WithNilFieldsUpdate) SaveX(ctx context.Context) int
- func (wnfu *WithNilFieldsUpdate) Where(ps ...predicate.WithNilFields) *WithNilFieldsUpdate
- type WithNilFieldsUpdateOne
- func (wnfuo *WithNilFieldsUpdateOne) Exec(ctx context.Context) error
- func (wnfuo *WithNilFieldsUpdateOne) ExecX(ctx context.Context)
- func (wnfuo *WithNilFieldsUpdateOne) Mutation() *WithNilFieldsMutation
- func (wnfuo *WithNilFieldsUpdateOne) Save(ctx context.Context) (*WithNilFields, error)
- func (wnfuo *WithNilFieldsUpdateOne) SaveX(ctx context.Context) *WithNilFields
- func (wnfuo *WithNilFieldsUpdateOne) Select(field string, fields ...string) *WithNilFieldsUpdateOne
- type WithoutFields
- type WithoutFieldsClient
- func (c *WithoutFieldsClient) Create() *WithoutFieldsCreate
- func (c *WithoutFieldsClient) CreateBulk(builders ...*WithoutFieldsCreate) *WithoutFieldsCreateBulk
- func (c *WithoutFieldsClient) Delete() *WithoutFieldsDelete
- func (c *WithoutFieldsClient) DeleteOne(wf *WithoutFields) *WithoutFieldsDeleteOne
- func (c *WithoutFieldsClient) DeleteOneID(id int) *WithoutFieldsDeleteOne
- func (c *WithoutFieldsClient) Get(ctx context.Context, id int) (*WithoutFields, error)
- func (c *WithoutFieldsClient) GetX(ctx context.Context, id int) *WithoutFields
- func (c *WithoutFieldsClient) Hooks() []Hook
- func (c *WithoutFieldsClient) Query() *WithoutFieldsQuery
- func (c *WithoutFieldsClient) Update() *WithoutFieldsUpdate
- func (c *WithoutFieldsClient) UpdateOne(wf *WithoutFields) *WithoutFieldsUpdateOne
- func (c *WithoutFieldsClient) UpdateOneID(id int) *WithoutFieldsUpdateOne
- func (c *WithoutFieldsClient) Use(hooks ...Hook)
- type WithoutFieldsCreate
- func (wfc *WithoutFieldsCreate) Exec(ctx context.Context) error
- func (wfc *WithoutFieldsCreate) ExecX(ctx context.Context)
- func (wfc *WithoutFieldsCreate) Mutation() *WithoutFieldsMutation
- func (wfc *WithoutFieldsCreate) Save(ctx context.Context) (*WithoutFields, error)
- func (wfc *WithoutFieldsCreate) SaveX(ctx context.Context) *WithoutFields
- type WithoutFieldsCreateBulk
- func (wfcb *WithoutFieldsCreateBulk) Exec(ctx context.Context) error
- func (wfcb *WithoutFieldsCreateBulk) ExecX(ctx context.Context)
- func (wfcb *WithoutFieldsCreateBulk) Save(ctx context.Context) ([]*WithoutFields, error)
- func (wfcb *WithoutFieldsCreateBulk) SaveX(ctx context.Context) []*WithoutFields
- type WithoutFieldsDelete
- type WithoutFieldsDeleteOne
- type WithoutFieldsGroupBy
- func (wfgb *WithoutFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithoutFieldsGroupBy
- func (s *WithoutFieldsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithoutFieldsGroupBy) BoolX(ctx context.Context) bool
- func (s *WithoutFieldsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WithoutFieldsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WithoutFieldsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithoutFieldsGroupBy) Float64X(ctx context.Context) float64
- func (s *WithoutFieldsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithoutFieldsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WithoutFieldsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WithoutFieldsGroupBy) IntX(ctx context.Context) int
- func (s *WithoutFieldsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WithoutFieldsGroupBy) IntsX(ctx context.Context) []int
- func (wfgb *WithoutFieldsGroupBy) Scan(ctx context.Context, v any) error
- func (s *WithoutFieldsGroupBy) ScanX(ctx context.Context, v any)
- func (s *WithoutFieldsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WithoutFieldsGroupBy) StringX(ctx context.Context) string
- func (s *WithoutFieldsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WithoutFieldsGroupBy) StringsX(ctx context.Context) []string
- type WithoutFieldsMutation
- func (m *WithoutFieldsMutation) AddField(name string, value ent.Value) error
- func (m *WithoutFieldsMutation) AddedEdges() []string
- func (m *WithoutFieldsMutation) AddedField(name string) (ent.Value, bool)
- func (m *WithoutFieldsMutation) AddedFields() []string
- func (m *WithoutFieldsMutation) AddedIDs(name string) []ent.Value
- func (m *WithoutFieldsMutation) ClearEdge(name string) error
- func (m *WithoutFieldsMutation) ClearField(name string) error
- func (m *WithoutFieldsMutation) ClearedEdges() []string
- func (m *WithoutFieldsMutation) ClearedFields() []string
- func (m WithoutFieldsMutation) Client() *Client
- func (m *WithoutFieldsMutation) EdgeCleared(name string) bool
- func (m *WithoutFieldsMutation) Field(name string) (ent.Value, bool)
- func (m *WithoutFieldsMutation) FieldCleared(name string) bool
- func (m *WithoutFieldsMutation) Fields() []string
- func (m *WithoutFieldsMutation) ID() (id int, exists bool)
- func (m *WithoutFieldsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WithoutFieldsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WithoutFieldsMutation) Op() Op
- func (m *WithoutFieldsMutation) RemovedEdges() []string
- func (m *WithoutFieldsMutation) RemovedIDs(name string) []ent.Value
- func (m *WithoutFieldsMutation) ResetEdge(name string) error
- func (m *WithoutFieldsMutation) ResetField(name string) error
- func (m *WithoutFieldsMutation) SetField(name string, value ent.Value) error
- func (m WithoutFieldsMutation) Tx() (*Tx, error)
- func (m *WithoutFieldsMutation) Type() string
- func (m *WithoutFieldsMutation) Where(ps ...predicate.WithoutFields)
- type WithoutFieldsQuery
- func (wfq *WithoutFieldsQuery) All(ctx context.Context) ([]*WithoutFields, error)
- func (wfq *WithoutFieldsQuery) AllX(ctx context.Context) []*WithoutFields
- func (wfq *WithoutFieldsQuery) Clone() *WithoutFieldsQuery
- func (wfq *WithoutFieldsQuery) Count(ctx context.Context) (int, error)
- func (wfq *WithoutFieldsQuery) CountX(ctx context.Context) int
- func (wfq *WithoutFieldsQuery) Exist(ctx context.Context) (bool, error)
- func (wfq *WithoutFieldsQuery) ExistX(ctx context.Context) bool
- func (wfq *WithoutFieldsQuery) First(ctx context.Context) (*WithoutFields, error)
- func (wfq *WithoutFieldsQuery) FirstID(ctx context.Context) (id int, err error)
- func (wfq *WithoutFieldsQuery) FirstIDX(ctx context.Context) int
- func (wfq *WithoutFieldsQuery) FirstX(ctx context.Context) *WithoutFields
- func (wfq *WithoutFieldsQuery) GroupBy(field string, fields ...string) *WithoutFieldsGroupBy
- func (wfq *WithoutFieldsQuery) IDs(ctx context.Context) ([]int, error)
- func (wfq *WithoutFieldsQuery) IDsX(ctx context.Context) []int
- func (wfq *WithoutFieldsQuery) Limit(limit int) *WithoutFieldsQuery
- func (wfq *WithoutFieldsQuery) Offset(offset int) *WithoutFieldsQuery
- func (wfq *WithoutFieldsQuery) Only(ctx context.Context) (*WithoutFields, error)
- func (wfq *WithoutFieldsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (wfq *WithoutFieldsQuery) OnlyIDX(ctx context.Context) int
- func (wfq *WithoutFieldsQuery) OnlyX(ctx context.Context) *WithoutFields
- func (wfq *WithoutFieldsQuery) Order(o ...OrderFunc) *WithoutFieldsQuery
- func (wfq *WithoutFieldsQuery) Select(fields ...string) *WithoutFieldsSelect
- func (wfq *WithoutFieldsQuery) Unique(unique bool) *WithoutFieldsQuery
- func (wfq *WithoutFieldsQuery) Where(ps ...predicate.WithoutFields) *WithoutFieldsQuery
- type WithoutFieldsSelect
- func (s *WithoutFieldsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WithoutFieldsSelect) BoolX(ctx context.Context) bool
- func (s *WithoutFieldsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WithoutFieldsSelect) BoolsX(ctx context.Context) []bool
- func (s *WithoutFieldsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WithoutFieldsSelect) Float64X(ctx context.Context) float64
- func (s *WithoutFieldsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WithoutFieldsSelect) Float64sX(ctx context.Context) []float64
- func (s *WithoutFieldsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WithoutFieldsSelect) IntX(ctx context.Context) int
- func (s *WithoutFieldsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WithoutFieldsSelect) IntsX(ctx context.Context) []int
- func (wfs *WithoutFieldsSelect) Scan(ctx context.Context, v any) error
- func (s *WithoutFieldsSelect) ScanX(ctx context.Context, v any)
- func (s *WithoutFieldsSelect) String(ctx context.Context) (_ string, err error)
- func (s *WithoutFieldsSelect) StringX(ctx context.Context) string
- func (s *WithoutFieldsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WithoutFieldsSelect) StringsX(ctx context.Context) []string
- type WithoutFieldsSlice
- type WithoutFieldsUpdate
- func (wfu *WithoutFieldsUpdate) Exec(ctx context.Context) error
- func (wfu *WithoutFieldsUpdate) ExecX(ctx context.Context)
- func (wfu *WithoutFieldsUpdate) Mutation() *WithoutFieldsMutation
- func (wfu *WithoutFieldsUpdate) Save(ctx context.Context) (int, error)
- func (wfu *WithoutFieldsUpdate) SaveX(ctx context.Context) int
- func (wfu *WithoutFieldsUpdate) Where(ps ...predicate.WithoutFields) *WithoutFieldsUpdate
- type WithoutFieldsUpdateOne
- func (wfuo *WithoutFieldsUpdateOne) Exec(ctx context.Context) error
- func (wfuo *WithoutFieldsUpdateOne) ExecX(ctx context.Context)
- func (wfuo *WithoutFieldsUpdateOne) Mutation() *WithoutFieldsMutation
- func (wfuo *WithoutFieldsUpdateOne) Save(ctx context.Context) (*WithoutFields, error)
- func (wfuo *WithoutFieldsUpdateOne) SaveX(ctx context.Context) *WithoutFields
- func (wfuo *WithoutFieldsUpdateOne) Select(field string, fields ...string) *WithoutFieldsUpdateOne
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeUser = "User" TypeWithFields = "WithFields" TypeWithModifiedField = "WithModifiedField" TypeWithNilFields = "WithNilFields" TypeWithoutFields = "WithoutFields" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // User is the client for interacting with the User builders. User *UserClient // WithFields is the client for interacting with the WithFields builders. WithFields *WithFieldsClient // WithModifiedField is the client for interacting with the WithModifiedField builders. WithModifiedField *WithModifiedFieldClient // WithNilFields is the client for interacting with the WithNilFields builders. WithNilFields *WithNilFieldsClient // WithoutFields is the client for interacting with the WithoutFields builders. WithoutFields *WithoutFieldsClient // 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(). User. 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 MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type 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 Tx ¶
type Tx struct { // User is the client for interacting with the User builders. User *UserClient // WithFields is the client for interacting with the WithFields builders. WithFields *WithFieldsClient // WithModifiedField is the client for interacting with the WithModifiedField builders. WithModifiedField *WithModifiedFieldClient // WithNilFields is the client for interacting with the WithNilFields builders. WithNilFields *WithNilFieldsClient // WithoutFields is the client for interacting with the WithoutFields builders. WithoutFields *WithoutFieldsClient // 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"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) 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) Exec ¶ added in v0.2.0
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶ added in v0.2.0
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶ added in v0.2.0
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶ added in v0.2.0
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) 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) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) 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) 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) 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) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶ added in v0.3.0
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) 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) 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) 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) 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) 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) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Where ¶ added in v0.2.0
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
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) 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.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) 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) 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) 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) 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) 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.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type WithFields ¶
type WithFields struct { // ID of the ent. ID int `json:"id,omitempty"` // Existing holds the value of the "existing" field. Existing string `json:"existing,omitempty"` // contains filtered or unexported fields }
WithFields is the model entity for the WithFields schema.
func (*WithFields) String ¶
func (wf *WithFields) String() string
String implements the fmt.Stringer.
func (*WithFields) Unwrap ¶
func (wf *WithFields) Unwrap() *WithFields
Unwrap unwraps the WithFields 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 (*WithFields) Update ¶
func (wf *WithFields) Update() *WithFieldsUpdateOne
Update returns a builder for updating this WithFields. Note that you need to call WithFields.Unwrap() before calling this method if this WithFields was returned from a transaction, and the transaction was committed or rolled back.
type WithFieldsClient ¶
type WithFieldsClient struct {
// contains filtered or unexported fields
}
WithFieldsClient is a client for the WithFields schema.
func NewWithFieldsClient ¶
func NewWithFieldsClient(c config) *WithFieldsClient
NewWithFieldsClient returns a client for the WithFields from the given config.
func (*WithFieldsClient) Create ¶
func (c *WithFieldsClient) Create() *WithFieldsCreate
Create returns a builder for creating a WithFields entity.
func (*WithFieldsClient) CreateBulk ¶
func (c *WithFieldsClient) CreateBulk(builders ...*WithFieldsCreate) *WithFieldsCreateBulk
CreateBulk returns a builder for creating a bulk of WithFields entities.
func (*WithFieldsClient) Delete ¶
func (c *WithFieldsClient) Delete() *WithFieldsDelete
Delete returns a delete builder for WithFields.
func (*WithFieldsClient) DeleteOne ¶
func (c *WithFieldsClient) DeleteOne(wf *WithFields) *WithFieldsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WithFieldsClient) DeleteOneID ¶
func (c *WithFieldsClient) DeleteOneID(id int) *WithFieldsDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*WithFieldsClient) Get ¶
func (c *WithFieldsClient) Get(ctx context.Context, id int) (*WithFields, error)
Get returns a WithFields entity by its id.
func (*WithFieldsClient) GetX ¶
func (c *WithFieldsClient) GetX(ctx context.Context, id int) *WithFields
GetX is like Get, but panics if an error occurs.
func (*WithFieldsClient) Hooks ¶
func (c *WithFieldsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WithFieldsClient) Query ¶
func (c *WithFieldsClient) Query() *WithFieldsQuery
Query returns a query builder for WithFields.
func (*WithFieldsClient) Update ¶
func (c *WithFieldsClient) Update() *WithFieldsUpdate
Update returns an update builder for WithFields.
func (*WithFieldsClient) UpdateOne ¶
func (c *WithFieldsClient) UpdateOne(wf *WithFields) *WithFieldsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WithFieldsClient) UpdateOneID ¶
func (c *WithFieldsClient) UpdateOneID(id int) *WithFieldsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WithFieldsClient) Use ¶
func (c *WithFieldsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `withfields.Hooks(f(g(h())))`.
type WithFieldsCreate ¶
type WithFieldsCreate struct {
// contains filtered or unexported fields
}
WithFieldsCreate is the builder for creating a WithFields entity.
func (*WithFieldsCreate) Exec ¶ added in v0.2.0
func (wfc *WithFieldsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithFieldsCreate) ExecX ¶ added in v0.2.0
func (wfc *WithFieldsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithFieldsCreate) Mutation ¶
func (wfc *WithFieldsCreate) Mutation() *WithFieldsMutation
Mutation returns the WithFieldsMutation object of the builder.
func (*WithFieldsCreate) Save ¶
func (wfc *WithFieldsCreate) Save(ctx context.Context) (*WithFields, error)
Save creates the WithFields in the database.
func (*WithFieldsCreate) SaveX ¶
func (wfc *WithFieldsCreate) SaveX(ctx context.Context) *WithFields
SaveX calls Save and panics if Save returns an error.
func (*WithFieldsCreate) SetExisting ¶
func (wfc *WithFieldsCreate) SetExisting(s string) *WithFieldsCreate
SetExisting sets the "existing" field.
type WithFieldsCreateBulk ¶
type WithFieldsCreateBulk struct {
// contains filtered or unexported fields
}
WithFieldsCreateBulk is the builder for creating many WithFields entities in bulk.
func (*WithFieldsCreateBulk) Exec ¶ added in v0.2.0
func (wfcb *WithFieldsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WithFieldsCreateBulk) ExecX ¶ added in v0.2.0
func (wfcb *WithFieldsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithFieldsCreateBulk) Save ¶
func (wfcb *WithFieldsCreateBulk) Save(ctx context.Context) ([]*WithFields, error)
Save creates the WithFields entities in the database.
func (*WithFieldsCreateBulk) SaveX ¶
func (wfcb *WithFieldsCreateBulk) SaveX(ctx context.Context) []*WithFields
SaveX is like Save, but panics if an error occurs.
type WithFieldsDelete ¶
type WithFieldsDelete struct {
// contains filtered or unexported fields
}
WithFieldsDelete is the builder for deleting a WithFields entity.
func (*WithFieldsDelete) Exec ¶
func (wfd *WithFieldsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WithFieldsDelete) ExecX ¶
func (wfd *WithFieldsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WithFieldsDelete) Where ¶
func (wfd *WithFieldsDelete) Where(ps ...predicate.WithFields) *WithFieldsDelete
Where appends a list predicates to the WithFieldsDelete builder.
type WithFieldsDeleteOne ¶
type WithFieldsDeleteOne struct {
// contains filtered or unexported fields
}
WithFieldsDeleteOne is the builder for deleting a single WithFields entity.
func (*WithFieldsDeleteOne) Exec ¶
func (wfdo *WithFieldsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WithFieldsDeleteOne) ExecX ¶
func (wfdo *WithFieldsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WithFieldsGroupBy ¶
type WithFieldsGroupBy struct {
// contains filtered or unexported fields
}
WithFieldsGroupBy is the group-by builder for WithFields entities.
func (*WithFieldsGroupBy) Aggregate ¶
func (wfgb *WithFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithFieldsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WithFieldsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithFieldsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithFieldsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithFieldsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithFieldsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithFieldsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithFieldsGroupBy) Scan ¶
func (wfgb *WithFieldsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*WithFieldsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithFieldsMutation ¶
type WithFieldsMutation struct {
// contains filtered or unexported fields
}
WithFieldsMutation represents an operation that mutates the WithFields nodes in the graph.
func (*WithFieldsMutation) AddField ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) AddedEdges ¶
func (m *WithFieldsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WithFieldsMutation) AddedField ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) AddedFields ¶
func (m *WithFieldsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WithFieldsMutation) AddedIDs ¶
func (m *WithFieldsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WithFieldsMutation) ClearEdge ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) ClearField ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) ClearedEdges ¶
func (m *WithFieldsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WithFieldsMutation) ClearedFields ¶
func (m *WithFieldsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WithFieldsMutation) Client ¶
func (m WithFieldsMutation) 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 (*WithFieldsMutation) EdgeCleared ¶
func (m *WithFieldsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WithFieldsMutation) Existing ¶
func (m *WithFieldsMutation) Existing() (r string, exists bool)
Existing returns the value of the "existing" field in the mutation.
func (*WithFieldsMutation) Field ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) FieldCleared ¶
func (m *WithFieldsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WithFieldsMutation) Fields ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) ID ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) IDs ¶ added in v0.3.0
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) OldExisting ¶
func (m *WithFieldsMutation) OldExisting(ctx context.Context) (v string, err error)
OldExisting returns the old "existing" field's value of the WithFields entity. If the WithFields 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 (*WithFieldsMutation) 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 (*WithFieldsMutation) RemovedEdges ¶
func (m *WithFieldsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WithFieldsMutation) RemovedIDs ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) ResetEdge ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) ResetExisting ¶
func (m *WithFieldsMutation) ResetExisting()
ResetExisting resets all changes to the "existing" field.
func (*WithFieldsMutation) ResetField ¶
func (m *WithFieldsMutation) 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 (*WithFieldsMutation) SetExisting ¶
func (m *WithFieldsMutation) SetExisting(s string)
SetExisting sets the "existing" field.
func (*WithFieldsMutation) SetField ¶
func (m *WithFieldsMutation) 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 (WithFieldsMutation) Tx ¶
func (m WithFieldsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WithFieldsMutation) Type ¶
func (m *WithFieldsMutation) Type() string
Type returns the node type of this mutation (WithFields).
func (*WithFieldsMutation) Where ¶ added in v0.2.0
func (m *WithFieldsMutation) Where(ps ...predicate.WithFields)
Where appends a list predicates to the WithFieldsMutation builder.
type WithFieldsQuery ¶
type WithFieldsQuery struct {
// contains filtered or unexported fields
}
WithFieldsQuery is the builder for querying WithFields entities.
func (*WithFieldsQuery) All ¶
func (wfq *WithFieldsQuery) All(ctx context.Context) ([]*WithFields, error)
All executes the query and returns a list of WithFieldsSlice.
func (*WithFieldsQuery) AllX ¶
func (wfq *WithFieldsQuery) AllX(ctx context.Context) []*WithFields
AllX is like All, but panics if an error occurs.
func (*WithFieldsQuery) Clone ¶
func (wfq *WithFieldsQuery) Clone() *WithFieldsQuery
Clone returns a duplicate of the WithFieldsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WithFieldsQuery) Count ¶
func (wfq *WithFieldsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WithFieldsQuery) CountX ¶
func (wfq *WithFieldsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WithFieldsQuery) Exist ¶
func (wfq *WithFieldsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WithFieldsQuery) ExistX ¶
func (wfq *WithFieldsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WithFieldsQuery) First ¶
func (wfq *WithFieldsQuery) First(ctx context.Context) (*WithFields, error)
First returns the first WithFields entity from the query. Returns a *NotFoundError when no WithFields was found.
func (*WithFieldsQuery) FirstID ¶
func (wfq *WithFieldsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WithFields ID from the query. Returns a *NotFoundError when no WithFields ID was found.
func (*WithFieldsQuery) FirstIDX ¶
func (wfq *WithFieldsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WithFieldsQuery) FirstX ¶
func (wfq *WithFieldsQuery) FirstX(ctx context.Context) *WithFields
FirstX is like First, but panics if an error occurs.
func (*WithFieldsQuery) GroupBy ¶
func (wfq *WithFieldsQuery) GroupBy(field string, fields ...string) *WithFieldsGroupBy
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 { Existing string `json:"existing,omitempty"` Count int `json:"count,omitempty"` } client.WithFields.Query(). GroupBy(withfields.FieldExisting). Aggregate(ent.Count()). Scan(ctx, &v)
func (*WithFieldsQuery) IDs ¶
func (wfq *WithFieldsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of WithFields IDs.
func (*WithFieldsQuery) IDsX ¶
func (wfq *WithFieldsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WithFieldsQuery) Limit ¶
func (wfq *WithFieldsQuery) Limit(limit int) *WithFieldsQuery
Limit adds a limit step to the query.
func (*WithFieldsQuery) Offset ¶
func (wfq *WithFieldsQuery) Offset(offset int) *WithFieldsQuery
Offset adds an offset step to the query.
func (*WithFieldsQuery) Only ¶
func (wfq *WithFieldsQuery) Only(ctx context.Context) (*WithFields, error)
Only returns a single WithFields entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WithFields entity is found. Returns a *NotFoundError when no WithFields entities are found.
func (*WithFieldsQuery) OnlyID ¶
func (wfq *WithFieldsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WithFields ID in the query. Returns a *NotSingularError when more than one WithFields ID is found. Returns a *NotFoundError when no entities are found.
func (*WithFieldsQuery) OnlyIDX ¶
func (wfq *WithFieldsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WithFieldsQuery) OnlyX ¶
func (wfq *WithFieldsQuery) OnlyX(ctx context.Context) *WithFields
OnlyX is like Only, but panics if an error occurs.
func (*WithFieldsQuery) Order ¶
func (wfq *WithFieldsQuery) Order(o ...OrderFunc) *WithFieldsQuery
Order adds an order step to the query.
func (*WithFieldsQuery) Select ¶
func (wfq *WithFieldsQuery) Select(fields ...string) *WithFieldsSelect
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 { Existing string `json:"existing,omitempty"` } client.WithFields.Query(). Select(withfields.FieldExisting). Scan(ctx, &v)
func (*WithFieldsQuery) Unique ¶
func (wfq *WithFieldsQuery) Unique(unique bool) *WithFieldsQuery
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 (*WithFieldsQuery) Where ¶
func (wfq *WithFieldsQuery) Where(ps ...predicate.WithFields) *WithFieldsQuery
Where adds a new predicate for the WithFieldsQuery builder.
type WithFieldsSelect ¶
type WithFieldsSelect struct { *WithFieldsQuery // contains filtered or unexported fields }
WithFieldsSelect is the builder for selecting fields of WithFields entities.
func (*WithFieldsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithFieldsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithFieldsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithFieldsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithFieldsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithFieldsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithFieldsSelect) Scan ¶
func (wfs *WithFieldsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WithFieldsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithFieldsSlice ¶
type WithFieldsSlice []*WithFields
WithFieldsSlice is a parsable slice of WithFields.
type WithFieldsUpdate ¶
type WithFieldsUpdate struct {
// contains filtered or unexported fields
}
WithFieldsUpdate is the builder for updating WithFields entities.
func (*WithFieldsUpdate) Exec ¶
func (wfu *WithFieldsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithFieldsUpdate) ExecX ¶
func (wfu *WithFieldsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithFieldsUpdate) Mutation ¶
func (wfu *WithFieldsUpdate) Mutation() *WithFieldsMutation
Mutation returns the WithFieldsMutation object of the builder.
func (*WithFieldsUpdate) Save ¶
func (wfu *WithFieldsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WithFieldsUpdate) SaveX ¶
func (wfu *WithFieldsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WithFieldsUpdate) SetExisting ¶
func (wfu *WithFieldsUpdate) SetExisting(s string) *WithFieldsUpdate
SetExisting sets the "existing" field.
func (*WithFieldsUpdate) Where ¶
func (wfu *WithFieldsUpdate) Where(ps ...predicate.WithFields) *WithFieldsUpdate
Where appends a list predicates to the WithFieldsUpdate builder.
type WithFieldsUpdateOne ¶
type WithFieldsUpdateOne struct {
// contains filtered or unexported fields
}
WithFieldsUpdateOne is the builder for updating a single WithFields entity.
func (*WithFieldsUpdateOne) Exec ¶
func (wfuo *WithFieldsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WithFieldsUpdateOne) ExecX ¶
func (wfuo *WithFieldsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithFieldsUpdateOne) Mutation ¶
func (wfuo *WithFieldsUpdateOne) Mutation() *WithFieldsMutation
Mutation returns the WithFieldsMutation object of the builder.
func (*WithFieldsUpdateOne) Save ¶
func (wfuo *WithFieldsUpdateOne) Save(ctx context.Context) (*WithFields, error)
Save executes the query and returns the updated WithFields entity.
func (*WithFieldsUpdateOne) SaveX ¶
func (wfuo *WithFieldsUpdateOne) SaveX(ctx context.Context) *WithFields
SaveX is like Save, but panics if an error occurs.
func (*WithFieldsUpdateOne) Select ¶
func (wfuo *WithFieldsUpdateOne) Select(field string, fields ...string) *WithFieldsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WithFieldsUpdateOne) SetExisting ¶
func (wfuo *WithFieldsUpdateOne) SetExisting(s string) *WithFieldsUpdateOne
SetExisting sets the "existing" field.
type WithModifiedField ¶
type WithModifiedField 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 WithModifiedFieldQuery when eager-loading is set. Edges WithModifiedFieldEdges `json:"edges"` // contains filtered or unexported fields }
WithModifiedField is the model entity for the WithModifiedField schema.
func (*WithModifiedField) QueryOwner ¶
func (wmf *WithModifiedField) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the WithModifiedField entity.
func (*WithModifiedField) String ¶
func (wmf *WithModifiedField) String() string
String implements the fmt.Stringer.
func (*WithModifiedField) Unwrap ¶
func (wmf *WithModifiedField) Unwrap() *WithModifiedField
Unwrap unwraps the WithModifiedField 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 (*WithModifiedField) Update ¶
func (wmf *WithModifiedField) Update() *WithModifiedFieldUpdateOne
Update returns a builder for updating this WithModifiedField. Note that you need to call WithModifiedField.Unwrap() before calling this method if this WithModifiedField was returned from a transaction, and the transaction was committed or rolled back.
type WithModifiedFieldClient ¶
type WithModifiedFieldClient struct {
// contains filtered or unexported fields
}
WithModifiedFieldClient is a client for the WithModifiedField schema.
func NewWithModifiedFieldClient ¶
func NewWithModifiedFieldClient(c config) *WithModifiedFieldClient
NewWithModifiedFieldClient returns a client for the WithModifiedField from the given config.
func (*WithModifiedFieldClient) Create ¶
func (c *WithModifiedFieldClient) Create() *WithModifiedFieldCreate
Create returns a builder for creating a WithModifiedField entity.
func (*WithModifiedFieldClient) CreateBulk ¶
func (c *WithModifiedFieldClient) CreateBulk(builders ...*WithModifiedFieldCreate) *WithModifiedFieldCreateBulk
CreateBulk returns a builder for creating a bulk of WithModifiedField entities.
func (*WithModifiedFieldClient) Delete ¶
func (c *WithModifiedFieldClient) Delete() *WithModifiedFieldDelete
Delete returns a delete builder for WithModifiedField.
func (*WithModifiedFieldClient) DeleteOne ¶
func (c *WithModifiedFieldClient) DeleteOne(wmf *WithModifiedField) *WithModifiedFieldDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WithModifiedFieldClient) DeleteOneID ¶
func (c *WithModifiedFieldClient) DeleteOneID(id int) *WithModifiedFieldDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*WithModifiedFieldClient) Get ¶
func (c *WithModifiedFieldClient) Get(ctx context.Context, id int) (*WithModifiedField, error)
Get returns a WithModifiedField entity by its id.
func (*WithModifiedFieldClient) GetX ¶
func (c *WithModifiedFieldClient) GetX(ctx context.Context, id int) *WithModifiedField
GetX is like Get, but panics if an error occurs.
func (*WithModifiedFieldClient) Hooks ¶
func (c *WithModifiedFieldClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WithModifiedFieldClient) Query ¶
func (c *WithModifiedFieldClient) Query() *WithModifiedFieldQuery
Query returns a query builder for WithModifiedField.
func (*WithModifiedFieldClient) QueryOwner ¶
func (c *WithModifiedFieldClient) QueryOwner(wmf *WithModifiedField) *UserQuery
QueryOwner queries the owner edge of a WithModifiedField.
func (*WithModifiedFieldClient) Update ¶
func (c *WithModifiedFieldClient) Update() *WithModifiedFieldUpdate
Update returns an update builder for WithModifiedField.
func (*WithModifiedFieldClient) UpdateOne ¶
func (c *WithModifiedFieldClient) UpdateOne(wmf *WithModifiedField) *WithModifiedFieldUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WithModifiedFieldClient) UpdateOneID ¶
func (c *WithModifiedFieldClient) UpdateOneID(id int) *WithModifiedFieldUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WithModifiedFieldClient) Use ¶
func (c *WithModifiedFieldClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `withmodifiedfield.Hooks(f(g(h())))`.
type WithModifiedFieldCreate ¶
type WithModifiedFieldCreate struct {
// contains filtered or unexported fields
}
WithModifiedFieldCreate is the builder for creating a WithModifiedField entity.
func (*WithModifiedFieldCreate) Exec ¶ added in v0.2.0
func (wmfc *WithModifiedFieldCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithModifiedFieldCreate) ExecX ¶ added in v0.2.0
func (wmfc *WithModifiedFieldCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithModifiedFieldCreate) Mutation ¶
func (wmfc *WithModifiedFieldCreate) Mutation() *WithModifiedFieldMutation
Mutation returns the WithModifiedFieldMutation object of the builder.
func (*WithModifiedFieldCreate) Save ¶
func (wmfc *WithModifiedFieldCreate) Save(ctx context.Context) (*WithModifiedField, error)
Save creates the WithModifiedField in the database.
func (*WithModifiedFieldCreate) SaveX ¶
func (wmfc *WithModifiedFieldCreate) SaveX(ctx context.Context) *WithModifiedField
SaveX calls Save and panics if Save returns an error.
func (*WithModifiedFieldCreate) SetName ¶
func (wmfc *WithModifiedFieldCreate) SetName(s string) *WithModifiedFieldCreate
SetName sets the "name" field.
func (*WithModifiedFieldCreate) SetNillableOwnerID ¶
func (wmfc *WithModifiedFieldCreate) SetNillableOwnerID(id *int) *WithModifiedFieldCreate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*WithModifiedFieldCreate) SetOwner ¶
func (wmfc *WithModifiedFieldCreate) SetOwner(u *User) *WithModifiedFieldCreate
SetOwner sets the "owner" edge to the User entity.
func (*WithModifiedFieldCreate) SetOwnerID ¶
func (wmfc *WithModifiedFieldCreate) SetOwnerID(id int) *WithModifiedFieldCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
type WithModifiedFieldCreateBulk ¶
type WithModifiedFieldCreateBulk struct {
// contains filtered or unexported fields
}
WithModifiedFieldCreateBulk is the builder for creating many WithModifiedField entities in bulk.
func (*WithModifiedFieldCreateBulk) Exec ¶ added in v0.2.0
func (wmfcb *WithModifiedFieldCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WithModifiedFieldCreateBulk) ExecX ¶ added in v0.2.0
func (wmfcb *WithModifiedFieldCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithModifiedFieldCreateBulk) Save ¶
func (wmfcb *WithModifiedFieldCreateBulk) Save(ctx context.Context) ([]*WithModifiedField, error)
Save creates the WithModifiedField entities in the database.
func (*WithModifiedFieldCreateBulk) SaveX ¶
func (wmfcb *WithModifiedFieldCreateBulk) SaveX(ctx context.Context) []*WithModifiedField
SaveX is like Save, but panics if an error occurs.
type WithModifiedFieldDelete ¶
type WithModifiedFieldDelete struct {
// contains filtered or unexported fields
}
WithModifiedFieldDelete is the builder for deleting a WithModifiedField entity.
func (*WithModifiedFieldDelete) Exec ¶
func (wmfd *WithModifiedFieldDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WithModifiedFieldDelete) ExecX ¶
func (wmfd *WithModifiedFieldDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WithModifiedFieldDelete) Where ¶
func (wmfd *WithModifiedFieldDelete) Where(ps ...predicate.WithModifiedField) *WithModifiedFieldDelete
Where appends a list predicates to the WithModifiedFieldDelete builder.
type WithModifiedFieldDeleteOne ¶
type WithModifiedFieldDeleteOne struct {
// contains filtered or unexported fields
}
WithModifiedFieldDeleteOne is the builder for deleting a single WithModifiedField entity.
func (*WithModifiedFieldDeleteOne) Exec ¶
func (wmfdo *WithModifiedFieldDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WithModifiedFieldDeleteOne) ExecX ¶
func (wmfdo *WithModifiedFieldDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WithModifiedFieldEdges ¶
type WithModifiedFieldEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
WithModifiedFieldEdges holds the relations/edges for other nodes in the graph.
func (WithModifiedFieldEdges) OwnerOrErr ¶
func (e WithModifiedFieldEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type WithModifiedFieldGroupBy ¶
type WithModifiedFieldGroupBy struct {
// contains filtered or unexported fields
}
WithModifiedFieldGroupBy is the group-by builder for WithModifiedField entities.
func (*WithModifiedFieldGroupBy) Aggregate ¶
func (wmfgb *WithModifiedFieldGroupBy) Aggregate(fns ...AggregateFunc) *WithModifiedFieldGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WithModifiedFieldGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*WithModifiedFieldGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WithModifiedFieldGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldGroupBy) Scan ¶
func (wmfgb *WithModifiedFieldGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*WithModifiedFieldGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithModifiedFieldMutation ¶
type WithModifiedFieldMutation struct {
// contains filtered or unexported fields
}
WithModifiedFieldMutation represents an operation that mutates the WithModifiedField nodes in the graph.
func (*WithModifiedFieldMutation) AddField ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) AddedEdges ¶
func (m *WithModifiedFieldMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WithModifiedFieldMutation) AddedField ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) AddedFields ¶
func (m *WithModifiedFieldMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WithModifiedFieldMutation) AddedIDs ¶
func (m *WithModifiedFieldMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WithModifiedFieldMutation) ClearEdge ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) ClearField ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) ClearOwner ¶
func (m *WithModifiedFieldMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*WithModifiedFieldMutation) ClearedEdges ¶
func (m *WithModifiedFieldMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WithModifiedFieldMutation) ClearedFields ¶
func (m *WithModifiedFieldMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WithModifiedFieldMutation) Client ¶
func (m WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) EdgeCleared ¶
func (m *WithModifiedFieldMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WithModifiedFieldMutation) Field ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) FieldCleared ¶
func (m *WithModifiedFieldMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WithModifiedFieldMutation) Fields ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) ID ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) IDs ¶ added in v0.3.0
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) Name ¶
func (m *WithModifiedFieldMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) OldName ¶
func (m *WithModifiedFieldMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the WithModifiedField entity. If the WithModifiedField 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 (*WithModifiedFieldMutation) Op ¶
func (m *WithModifiedFieldMutation) Op() Op
Op returns the operation name.
func (*WithModifiedFieldMutation) OwnerCleared ¶
func (m *WithModifiedFieldMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*WithModifiedFieldMutation) OwnerID ¶
func (m *WithModifiedFieldMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*WithModifiedFieldMutation) OwnerIDs ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) RemovedEdges ¶
func (m *WithModifiedFieldMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WithModifiedFieldMutation) RemovedIDs ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) ResetEdge ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) ResetField ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) ResetName ¶
func (m *WithModifiedFieldMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*WithModifiedFieldMutation) ResetOwner ¶
func (m *WithModifiedFieldMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*WithModifiedFieldMutation) SetField ¶
func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) SetName ¶
func (m *WithModifiedFieldMutation) SetName(s string)
SetName sets the "name" field.
func (*WithModifiedFieldMutation) SetOwnerID ¶
func (m *WithModifiedFieldMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (WithModifiedFieldMutation) Tx ¶
func (m WithModifiedFieldMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WithModifiedFieldMutation) Type ¶
func (m *WithModifiedFieldMutation) Type() string
Type returns the node type of this mutation (WithModifiedField).
func (*WithModifiedFieldMutation) Where ¶ added in v0.2.0
func (m *WithModifiedFieldMutation) Where(ps ...predicate.WithModifiedField)
Where appends a list predicates to the WithModifiedFieldMutation builder.
type WithModifiedFieldQuery ¶
type WithModifiedFieldQuery struct {
// contains filtered or unexported fields
}
WithModifiedFieldQuery is the builder for querying WithModifiedField entities.
func (*WithModifiedFieldQuery) All ¶
func (wmfq *WithModifiedFieldQuery) All(ctx context.Context) ([]*WithModifiedField, error)
All executes the query and returns a list of WithModifiedFields.
func (*WithModifiedFieldQuery) AllX ¶
func (wmfq *WithModifiedFieldQuery) AllX(ctx context.Context) []*WithModifiedField
AllX is like All, but panics if an error occurs.
func (*WithModifiedFieldQuery) Clone ¶
func (wmfq *WithModifiedFieldQuery) Clone() *WithModifiedFieldQuery
Clone returns a duplicate of the WithModifiedFieldQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WithModifiedFieldQuery) Count ¶
func (wmfq *WithModifiedFieldQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WithModifiedFieldQuery) CountX ¶
func (wmfq *WithModifiedFieldQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WithModifiedFieldQuery) Exist ¶
func (wmfq *WithModifiedFieldQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WithModifiedFieldQuery) ExistX ¶
func (wmfq *WithModifiedFieldQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WithModifiedFieldQuery) First ¶
func (wmfq *WithModifiedFieldQuery) First(ctx context.Context) (*WithModifiedField, error)
First returns the first WithModifiedField entity from the query. Returns a *NotFoundError when no WithModifiedField was found.
func (*WithModifiedFieldQuery) FirstID ¶
func (wmfq *WithModifiedFieldQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WithModifiedField ID from the query. Returns a *NotFoundError when no WithModifiedField ID was found.
func (*WithModifiedFieldQuery) FirstIDX ¶
func (wmfq *WithModifiedFieldQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WithModifiedFieldQuery) FirstX ¶
func (wmfq *WithModifiedFieldQuery) FirstX(ctx context.Context) *WithModifiedField
FirstX is like First, but panics if an error occurs.
func (*WithModifiedFieldQuery) GroupBy ¶
func (wmfq *WithModifiedFieldQuery) GroupBy(field string, fields ...string) *WithModifiedFieldGroupBy
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.WithModifiedField.Query(). GroupBy(withmodifiedfield.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*WithModifiedFieldQuery) IDs ¶
func (wmfq *WithModifiedFieldQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of WithModifiedField IDs.
func (*WithModifiedFieldQuery) IDsX ¶
func (wmfq *WithModifiedFieldQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WithModifiedFieldQuery) Limit ¶
func (wmfq *WithModifiedFieldQuery) Limit(limit int) *WithModifiedFieldQuery
Limit adds a limit step to the query.
func (*WithModifiedFieldQuery) Offset ¶
func (wmfq *WithModifiedFieldQuery) Offset(offset int) *WithModifiedFieldQuery
Offset adds an offset step to the query.
func (*WithModifiedFieldQuery) Only ¶
func (wmfq *WithModifiedFieldQuery) Only(ctx context.Context) (*WithModifiedField, error)
Only returns a single WithModifiedField entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WithModifiedField entity is found. Returns a *NotFoundError when no WithModifiedField entities are found.
func (*WithModifiedFieldQuery) OnlyID ¶
func (wmfq *WithModifiedFieldQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WithModifiedField ID in the query. Returns a *NotSingularError when more than one WithModifiedField ID is found. Returns a *NotFoundError when no entities are found.
func (*WithModifiedFieldQuery) OnlyIDX ¶
func (wmfq *WithModifiedFieldQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WithModifiedFieldQuery) OnlyX ¶
func (wmfq *WithModifiedFieldQuery) OnlyX(ctx context.Context) *WithModifiedField
OnlyX is like Only, but panics if an error occurs.
func (*WithModifiedFieldQuery) Order ¶
func (wmfq *WithModifiedFieldQuery) Order(o ...OrderFunc) *WithModifiedFieldQuery
Order adds an order step to the query.
func (*WithModifiedFieldQuery) QueryOwner ¶
func (wmfq *WithModifiedFieldQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*WithModifiedFieldQuery) Select ¶
func (wmfq *WithModifiedFieldQuery) Select(fields ...string) *WithModifiedFieldSelect
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.WithModifiedField.Query(). Select(withmodifiedfield.FieldName). Scan(ctx, &v)
func (*WithModifiedFieldQuery) Unique ¶
func (wmfq *WithModifiedFieldQuery) Unique(unique bool) *WithModifiedFieldQuery
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 (*WithModifiedFieldQuery) Where ¶
func (wmfq *WithModifiedFieldQuery) Where(ps ...predicate.WithModifiedField) *WithModifiedFieldQuery
Where adds a new predicate for the WithModifiedFieldQuery builder.
func (*WithModifiedFieldQuery) WithOwner ¶
func (wmfq *WithModifiedFieldQuery) WithOwner(opts ...func(*UserQuery)) *WithModifiedFieldQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type WithModifiedFieldSelect ¶
type WithModifiedFieldSelect struct { *WithModifiedFieldQuery // contains filtered or unexported fields }
WithModifiedFieldSelect is the builder for selecting fields of WithModifiedField entities.
func (*WithModifiedFieldSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WithModifiedFieldSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithModifiedFieldSelect) Scan ¶
func (wmfs *WithModifiedFieldSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WithModifiedFieldSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithModifiedFieldUpdate ¶
type WithModifiedFieldUpdate struct {
// contains filtered or unexported fields
}
WithModifiedFieldUpdate is the builder for updating WithModifiedField entities.
func (*WithModifiedFieldUpdate) ClearOwner ¶
func (wmfu *WithModifiedFieldUpdate) ClearOwner() *WithModifiedFieldUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*WithModifiedFieldUpdate) Exec ¶
func (wmfu *WithModifiedFieldUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithModifiedFieldUpdate) ExecX ¶
func (wmfu *WithModifiedFieldUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithModifiedFieldUpdate) Mutation ¶
func (wmfu *WithModifiedFieldUpdate) Mutation() *WithModifiedFieldMutation
Mutation returns the WithModifiedFieldMutation object of the builder.
func (*WithModifiedFieldUpdate) Save ¶
func (wmfu *WithModifiedFieldUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WithModifiedFieldUpdate) SaveX ¶
func (wmfu *WithModifiedFieldUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WithModifiedFieldUpdate) SetNillableOwnerID ¶
func (wmfu *WithModifiedFieldUpdate) SetNillableOwnerID(id *int) *WithModifiedFieldUpdate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*WithModifiedFieldUpdate) SetOwner ¶
func (wmfu *WithModifiedFieldUpdate) SetOwner(u *User) *WithModifiedFieldUpdate
SetOwner sets the "owner" edge to the User entity.
func (*WithModifiedFieldUpdate) SetOwnerID ¶
func (wmfu *WithModifiedFieldUpdate) SetOwnerID(id int) *WithModifiedFieldUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*WithModifiedFieldUpdate) Where ¶
func (wmfu *WithModifiedFieldUpdate) Where(ps ...predicate.WithModifiedField) *WithModifiedFieldUpdate
Where appends a list predicates to the WithModifiedFieldUpdate builder.
type WithModifiedFieldUpdateOne ¶
type WithModifiedFieldUpdateOne struct {
// contains filtered or unexported fields
}
WithModifiedFieldUpdateOne is the builder for updating a single WithModifiedField entity.
func (*WithModifiedFieldUpdateOne) ClearOwner ¶
func (wmfuo *WithModifiedFieldUpdateOne) ClearOwner() *WithModifiedFieldUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*WithModifiedFieldUpdateOne) Exec ¶
func (wmfuo *WithModifiedFieldUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WithModifiedFieldUpdateOne) ExecX ¶
func (wmfuo *WithModifiedFieldUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithModifiedFieldUpdateOne) Mutation ¶
func (wmfuo *WithModifiedFieldUpdateOne) Mutation() *WithModifiedFieldMutation
Mutation returns the WithModifiedFieldMutation object of the builder.
func (*WithModifiedFieldUpdateOne) Save ¶
func (wmfuo *WithModifiedFieldUpdateOne) Save(ctx context.Context) (*WithModifiedField, error)
Save executes the query and returns the updated WithModifiedField entity.
func (*WithModifiedFieldUpdateOne) SaveX ¶
func (wmfuo *WithModifiedFieldUpdateOne) SaveX(ctx context.Context) *WithModifiedField
SaveX is like Save, but panics if an error occurs.
func (*WithModifiedFieldUpdateOne) Select ¶
func (wmfuo *WithModifiedFieldUpdateOne) Select(field string, fields ...string) *WithModifiedFieldUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WithModifiedFieldUpdateOne) SetNillableOwnerID ¶
func (wmfuo *WithModifiedFieldUpdateOne) SetNillableOwnerID(id *int) *WithModifiedFieldUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*WithModifiedFieldUpdateOne) SetOwner ¶
func (wmfuo *WithModifiedFieldUpdateOne) SetOwner(u *User) *WithModifiedFieldUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*WithModifiedFieldUpdateOne) SetOwnerID ¶
func (wmfuo *WithModifiedFieldUpdateOne) SetOwnerID(id int) *WithModifiedFieldUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
type WithModifiedFields ¶
type WithModifiedFields []*WithModifiedField
WithModifiedFields is a parsable slice of WithModifiedField.
type WithNilFields ¶
type WithNilFields struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
WithNilFields is the model entity for the WithNilFields schema.
func (*WithNilFields) String ¶
func (wnf *WithNilFields) String() string
String implements the fmt.Stringer.
func (*WithNilFields) Unwrap ¶
func (wnf *WithNilFields) Unwrap() *WithNilFields
Unwrap unwraps the WithNilFields 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 (*WithNilFields) Update ¶
func (wnf *WithNilFields) Update() *WithNilFieldsUpdateOne
Update returns a builder for updating this WithNilFields. Note that you need to call WithNilFields.Unwrap() before calling this method if this WithNilFields was returned from a transaction, and the transaction was committed or rolled back.
type WithNilFieldsClient ¶
type WithNilFieldsClient struct {
// contains filtered or unexported fields
}
WithNilFieldsClient is a client for the WithNilFields schema.
func NewWithNilFieldsClient ¶
func NewWithNilFieldsClient(c config) *WithNilFieldsClient
NewWithNilFieldsClient returns a client for the WithNilFields from the given config.
func (*WithNilFieldsClient) Create ¶
func (c *WithNilFieldsClient) Create() *WithNilFieldsCreate
Create returns a builder for creating a WithNilFields entity.
func (*WithNilFieldsClient) CreateBulk ¶
func (c *WithNilFieldsClient) CreateBulk(builders ...*WithNilFieldsCreate) *WithNilFieldsCreateBulk
CreateBulk returns a builder for creating a bulk of WithNilFields entities.
func (*WithNilFieldsClient) Delete ¶
func (c *WithNilFieldsClient) Delete() *WithNilFieldsDelete
Delete returns a delete builder for WithNilFields.
func (*WithNilFieldsClient) DeleteOne ¶
func (c *WithNilFieldsClient) DeleteOne(wnf *WithNilFields) *WithNilFieldsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WithNilFieldsClient) DeleteOneID ¶
func (c *WithNilFieldsClient) DeleteOneID(id int) *WithNilFieldsDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*WithNilFieldsClient) Get ¶
func (c *WithNilFieldsClient) Get(ctx context.Context, id int) (*WithNilFields, error)
Get returns a WithNilFields entity by its id.
func (*WithNilFieldsClient) GetX ¶
func (c *WithNilFieldsClient) GetX(ctx context.Context, id int) *WithNilFields
GetX is like Get, but panics if an error occurs.
func (*WithNilFieldsClient) Hooks ¶
func (c *WithNilFieldsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WithNilFieldsClient) Query ¶
func (c *WithNilFieldsClient) Query() *WithNilFieldsQuery
Query returns a query builder for WithNilFields.
func (*WithNilFieldsClient) Update ¶
func (c *WithNilFieldsClient) Update() *WithNilFieldsUpdate
Update returns an update builder for WithNilFields.
func (*WithNilFieldsClient) UpdateOne ¶
func (c *WithNilFieldsClient) UpdateOne(wnf *WithNilFields) *WithNilFieldsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WithNilFieldsClient) UpdateOneID ¶
func (c *WithNilFieldsClient) UpdateOneID(id int) *WithNilFieldsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WithNilFieldsClient) Use ¶
func (c *WithNilFieldsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `withnilfields.Hooks(f(g(h())))`.
type WithNilFieldsCreate ¶
type WithNilFieldsCreate struct {
// contains filtered or unexported fields
}
WithNilFieldsCreate is the builder for creating a WithNilFields entity.
func (*WithNilFieldsCreate) Exec ¶ added in v0.2.0
func (wnfc *WithNilFieldsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithNilFieldsCreate) ExecX ¶ added in v0.2.0
func (wnfc *WithNilFieldsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithNilFieldsCreate) Mutation ¶
func (wnfc *WithNilFieldsCreate) Mutation() *WithNilFieldsMutation
Mutation returns the WithNilFieldsMutation object of the builder.
func (*WithNilFieldsCreate) Save ¶
func (wnfc *WithNilFieldsCreate) Save(ctx context.Context) (*WithNilFields, error)
Save creates the WithNilFields in the database.
func (*WithNilFieldsCreate) SaveX ¶
func (wnfc *WithNilFieldsCreate) SaveX(ctx context.Context) *WithNilFields
SaveX calls Save and panics if Save returns an error.
type WithNilFieldsCreateBulk ¶
type WithNilFieldsCreateBulk struct {
// contains filtered or unexported fields
}
WithNilFieldsCreateBulk is the builder for creating many WithNilFields entities in bulk.
func (*WithNilFieldsCreateBulk) Exec ¶ added in v0.2.0
func (wnfcb *WithNilFieldsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WithNilFieldsCreateBulk) ExecX ¶ added in v0.2.0
func (wnfcb *WithNilFieldsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithNilFieldsCreateBulk) Save ¶
func (wnfcb *WithNilFieldsCreateBulk) Save(ctx context.Context) ([]*WithNilFields, error)
Save creates the WithNilFields entities in the database.
func (*WithNilFieldsCreateBulk) SaveX ¶
func (wnfcb *WithNilFieldsCreateBulk) SaveX(ctx context.Context) []*WithNilFields
SaveX is like Save, but panics if an error occurs.
type WithNilFieldsDelete ¶
type WithNilFieldsDelete struct {
// contains filtered or unexported fields
}
WithNilFieldsDelete is the builder for deleting a WithNilFields entity.
func (*WithNilFieldsDelete) Exec ¶
func (wnfd *WithNilFieldsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WithNilFieldsDelete) ExecX ¶
func (wnfd *WithNilFieldsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WithNilFieldsDelete) Where ¶
func (wnfd *WithNilFieldsDelete) Where(ps ...predicate.WithNilFields) *WithNilFieldsDelete
Where appends a list predicates to the WithNilFieldsDelete builder.
type WithNilFieldsDeleteOne ¶
type WithNilFieldsDeleteOne struct {
// contains filtered or unexported fields
}
WithNilFieldsDeleteOne is the builder for deleting a single WithNilFields entity.
func (*WithNilFieldsDeleteOne) Exec ¶
func (wnfdo *WithNilFieldsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WithNilFieldsDeleteOne) ExecX ¶
func (wnfdo *WithNilFieldsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WithNilFieldsGroupBy ¶
type WithNilFieldsGroupBy struct {
// contains filtered or unexported fields
}
WithNilFieldsGroupBy is the group-by builder for WithNilFields entities.
func (*WithNilFieldsGroupBy) Aggregate ¶
func (wnfgb *WithNilFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithNilFieldsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WithNilFieldsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsGroupBy) Scan ¶
func (wnfgb *WithNilFieldsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*WithNilFieldsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithNilFieldsMutation ¶
type WithNilFieldsMutation struct {
// contains filtered or unexported fields
}
WithNilFieldsMutation represents an operation that mutates the WithNilFields nodes in the graph.
func (*WithNilFieldsMutation) AddField ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) AddedEdges ¶
func (m *WithNilFieldsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WithNilFieldsMutation) AddedField ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) AddedFields ¶
func (m *WithNilFieldsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WithNilFieldsMutation) AddedIDs ¶
func (m *WithNilFieldsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WithNilFieldsMutation) ClearEdge ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) ClearField ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) ClearedEdges ¶
func (m *WithNilFieldsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WithNilFieldsMutation) ClearedFields ¶
func (m *WithNilFieldsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WithNilFieldsMutation) Client ¶
func (m WithNilFieldsMutation) 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 (*WithNilFieldsMutation) EdgeCleared ¶
func (m *WithNilFieldsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WithNilFieldsMutation) Field ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) FieldCleared ¶
func (m *WithNilFieldsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WithNilFieldsMutation) Fields ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) ID ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) IDs ¶ added in v0.3.0
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) 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 (*WithNilFieldsMutation) Op ¶
func (m *WithNilFieldsMutation) Op() Op
Op returns the operation name.
func (*WithNilFieldsMutation) RemovedEdges ¶
func (m *WithNilFieldsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WithNilFieldsMutation) RemovedIDs ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) ResetEdge ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) ResetField ¶
func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) SetField ¶
func (m *WithNilFieldsMutation) 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 (WithNilFieldsMutation) Tx ¶
func (m WithNilFieldsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WithNilFieldsMutation) Type ¶
func (m *WithNilFieldsMutation) Type() string
Type returns the node type of this mutation (WithNilFields).
func (*WithNilFieldsMutation) Where ¶ added in v0.2.0
func (m *WithNilFieldsMutation) Where(ps ...predicate.WithNilFields)
Where appends a list predicates to the WithNilFieldsMutation builder.
type WithNilFieldsQuery ¶
type WithNilFieldsQuery struct {
// contains filtered or unexported fields
}
WithNilFieldsQuery is the builder for querying WithNilFields entities.
func (*WithNilFieldsQuery) All ¶
func (wnfq *WithNilFieldsQuery) All(ctx context.Context) ([]*WithNilFields, error)
All executes the query and returns a list of WithNilFieldsSlice.
func (*WithNilFieldsQuery) AllX ¶
func (wnfq *WithNilFieldsQuery) AllX(ctx context.Context) []*WithNilFields
AllX is like All, but panics if an error occurs.
func (*WithNilFieldsQuery) Clone ¶
func (wnfq *WithNilFieldsQuery) Clone() *WithNilFieldsQuery
Clone returns a duplicate of the WithNilFieldsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WithNilFieldsQuery) Count ¶
func (wnfq *WithNilFieldsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WithNilFieldsQuery) CountX ¶
func (wnfq *WithNilFieldsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WithNilFieldsQuery) Exist ¶
func (wnfq *WithNilFieldsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WithNilFieldsQuery) ExistX ¶
func (wnfq *WithNilFieldsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WithNilFieldsQuery) First ¶
func (wnfq *WithNilFieldsQuery) First(ctx context.Context) (*WithNilFields, error)
First returns the first WithNilFields entity from the query. Returns a *NotFoundError when no WithNilFields was found.
func (*WithNilFieldsQuery) FirstID ¶
func (wnfq *WithNilFieldsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WithNilFields ID from the query. Returns a *NotFoundError when no WithNilFields ID was found.
func (*WithNilFieldsQuery) FirstIDX ¶
func (wnfq *WithNilFieldsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WithNilFieldsQuery) FirstX ¶
func (wnfq *WithNilFieldsQuery) FirstX(ctx context.Context) *WithNilFields
FirstX is like First, but panics if an error occurs.
func (*WithNilFieldsQuery) GroupBy ¶
func (wnfq *WithNilFieldsQuery) GroupBy(field string, fields ...string) *WithNilFieldsGroupBy
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 (*WithNilFieldsQuery) IDs ¶
func (wnfq *WithNilFieldsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of WithNilFields IDs.
func (*WithNilFieldsQuery) IDsX ¶
func (wnfq *WithNilFieldsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WithNilFieldsQuery) Limit ¶
func (wnfq *WithNilFieldsQuery) Limit(limit int) *WithNilFieldsQuery
Limit adds a limit step to the query.
func (*WithNilFieldsQuery) Offset ¶
func (wnfq *WithNilFieldsQuery) Offset(offset int) *WithNilFieldsQuery
Offset adds an offset step to the query.
func (*WithNilFieldsQuery) Only ¶
func (wnfq *WithNilFieldsQuery) Only(ctx context.Context) (*WithNilFields, error)
Only returns a single WithNilFields entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WithNilFields entity is found. Returns a *NotFoundError when no WithNilFields entities are found.
func (*WithNilFieldsQuery) OnlyID ¶
func (wnfq *WithNilFieldsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WithNilFields ID in the query. Returns a *NotSingularError when more than one WithNilFields ID is found. Returns a *NotFoundError when no entities are found.
func (*WithNilFieldsQuery) OnlyIDX ¶
func (wnfq *WithNilFieldsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WithNilFieldsQuery) OnlyX ¶
func (wnfq *WithNilFieldsQuery) OnlyX(ctx context.Context) *WithNilFields
OnlyX is like Only, but panics if an error occurs.
func (*WithNilFieldsQuery) Order ¶
func (wnfq *WithNilFieldsQuery) Order(o ...OrderFunc) *WithNilFieldsQuery
Order adds an order step to the query.
func (*WithNilFieldsQuery) Select ¶
func (wnfq *WithNilFieldsQuery) Select(fields ...string) *WithNilFieldsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*WithNilFieldsQuery) Unique ¶
func (wnfq *WithNilFieldsQuery) Unique(unique bool) *WithNilFieldsQuery
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 (*WithNilFieldsQuery) Where ¶
func (wnfq *WithNilFieldsQuery) Where(ps ...predicate.WithNilFields) *WithNilFieldsQuery
Where adds a new predicate for the WithNilFieldsQuery builder.
type WithNilFieldsSelect ¶
type WithNilFieldsSelect struct { *WithNilFieldsQuery // contains filtered or unexported fields }
WithNilFieldsSelect is the builder for selecting fields of WithNilFields entities.
func (*WithNilFieldsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithNilFieldsSelect) Scan ¶
func (wnfs *WithNilFieldsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WithNilFieldsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithNilFieldsSlice ¶
type WithNilFieldsSlice []*WithNilFields
WithNilFieldsSlice is a parsable slice of WithNilFields.
type WithNilFieldsUpdate ¶
type WithNilFieldsUpdate struct {
// contains filtered or unexported fields
}
WithNilFieldsUpdate is the builder for updating WithNilFields entities.
func (*WithNilFieldsUpdate) Exec ¶
func (wnfu *WithNilFieldsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithNilFieldsUpdate) ExecX ¶
func (wnfu *WithNilFieldsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithNilFieldsUpdate) Mutation ¶
func (wnfu *WithNilFieldsUpdate) Mutation() *WithNilFieldsMutation
Mutation returns the WithNilFieldsMutation object of the builder.
func (*WithNilFieldsUpdate) Save ¶
func (wnfu *WithNilFieldsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WithNilFieldsUpdate) SaveX ¶
func (wnfu *WithNilFieldsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WithNilFieldsUpdate) Where ¶
func (wnfu *WithNilFieldsUpdate) Where(ps ...predicate.WithNilFields) *WithNilFieldsUpdate
Where appends a list predicates to the WithNilFieldsUpdate builder.
type WithNilFieldsUpdateOne ¶
type WithNilFieldsUpdateOne struct {
// contains filtered or unexported fields
}
WithNilFieldsUpdateOne is the builder for updating a single WithNilFields entity.
func (*WithNilFieldsUpdateOne) Exec ¶
func (wnfuo *WithNilFieldsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WithNilFieldsUpdateOne) ExecX ¶
func (wnfuo *WithNilFieldsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithNilFieldsUpdateOne) Mutation ¶
func (wnfuo *WithNilFieldsUpdateOne) Mutation() *WithNilFieldsMutation
Mutation returns the WithNilFieldsMutation object of the builder.
func (*WithNilFieldsUpdateOne) Save ¶
func (wnfuo *WithNilFieldsUpdateOne) Save(ctx context.Context) (*WithNilFields, error)
Save executes the query and returns the updated WithNilFields entity.
func (*WithNilFieldsUpdateOne) SaveX ¶
func (wnfuo *WithNilFieldsUpdateOne) SaveX(ctx context.Context) *WithNilFields
SaveX is like Save, but panics if an error occurs.
func (*WithNilFieldsUpdateOne) Select ¶
func (wnfuo *WithNilFieldsUpdateOne) Select(field string, fields ...string) *WithNilFieldsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
type WithoutFields ¶
type WithoutFields struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
WithoutFields is the model entity for the WithoutFields schema.
func (*WithoutFields) String ¶
func (wf *WithoutFields) String() string
String implements the fmt.Stringer.
func (*WithoutFields) Unwrap ¶
func (wf *WithoutFields) Unwrap() *WithoutFields
Unwrap unwraps the WithoutFields 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 (*WithoutFields) Update ¶
func (wf *WithoutFields) Update() *WithoutFieldsUpdateOne
Update returns a builder for updating this WithoutFields. Note that you need to call WithoutFields.Unwrap() before calling this method if this WithoutFields was returned from a transaction, and the transaction was committed or rolled back.
type WithoutFieldsClient ¶
type WithoutFieldsClient struct {
// contains filtered or unexported fields
}
WithoutFieldsClient is a client for the WithoutFields schema.
func NewWithoutFieldsClient ¶
func NewWithoutFieldsClient(c config) *WithoutFieldsClient
NewWithoutFieldsClient returns a client for the WithoutFields from the given config.
func (*WithoutFieldsClient) Create ¶
func (c *WithoutFieldsClient) Create() *WithoutFieldsCreate
Create returns a builder for creating a WithoutFields entity.
func (*WithoutFieldsClient) CreateBulk ¶
func (c *WithoutFieldsClient) CreateBulk(builders ...*WithoutFieldsCreate) *WithoutFieldsCreateBulk
CreateBulk returns a builder for creating a bulk of WithoutFields entities.
func (*WithoutFieldsClient) Delete ¶
func (c *WithoutFieldsClient) Delete() *WithoutFieldsDelete
Delete returns a delete builder for WithoutFields.
func (*WithoutFieldsClient) DeleteOne ¶
func (c *WithoutFieldsClient) DeleteOne(wf *WithoutFields) *WithoutFieldsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WithoutFieldsClient) DeleteOneID ¶
func (c *WithoutFieldsClient) DeleteOneID(id int) *WithoutFieldsDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*WithoutFieldsClient) Get ¶
func (c *WithoutFieldsClient) Get(ctx context.Context, id int) (*WithoutFields, error)
Get returns a WithoutFields entity by its id.
func (*WithoutFieldsClient) GetX ¶
func (c *WithoutFieldsClient) GetX(ctx context.Context, id int) *WithoutFields
GetX is like Get, but panics if an error occurs.
func (*WithoutFieldsClient) Hooks ¶
func (c *WithoutFieldsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WithoutFieldsClient) Query ¶
func (c *WithoutFieldsClient) Query() *WithoutFieldsQuery
Query returns a query builder for WithoutFields.
func (*WithoutFieldsClient) Update ¶
func (c *WithoutFieldsClient) Update() *WithoutFieldsUpdate
Update returns an update builder for WithoutFields.
func (*WithoutFieldsClient) UpdateOne ¶
func (c *WithoutFieldsClient) UpdateOne(wf *WithoutFields) *WithoutFieldsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WithoutFieldsClient) UpdateOneID ¶
func (c *WithoutFieldsClient) UpdateOneID(id int) *WithoutFieldsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WithoutFieldsClient) Use ¶
func (c *WithoutFieldsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `withoutfields.Hooks(f(g(h())))`.
type WithoutFieldsCreate ¶
type WithoutFieldsCreate struct {
// contains filtered or unexported fields
}
WithoutFieldsCreate is the builder for creating a WithoutFields entity.
func (*WithoutFieldsCreate) Exec ¶ added in v0.2.0
func (wfc *WithoutFieldsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithoutFieldsCreate) ExecX ¶ added in v0.2.0
func (wfc *WithoutFieldsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithoutFieldsCreate) Mutation ¶
func (wfc *WithoutFieldsCreate) Mutation() *WithoutFieldsMutation
Mutation returns the WithoutFieldsMutation object of the builder.
func (*WithoutFieldsCreate) Save ¶
func (wfc *WithoutFieldsCreate) Save(ctx context.Context) (*WithoutFields, error)
Save creates the WithoutFields in the database.
func (*WithoutFieldsCreate) SaveX ¶
func (wfc *WithoutFieldsCreate) SaveX(ctx context.Context) *WithoutFields
SaveX calls Save and panics if Save returns an error.
type WithoutFieldsCreateBulk ¶
type WithoutFieldsCreateBulk struct {
// contains filtered or unexported fields
}
WithoutFieldsCreateBulk is the builder for creating many WithoutFields entities in bulk.
func (*WithoutFieldsCreateBulk) Exec ¶ added in v0.2.0
func (wfcb *WithoutFieldsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WithoutFieldsCreateBulk) ExecX ¶ added in v0.2.0
func (wfcb *WithoutFieldsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithoutFieldsCreateBulk) Save ¶
func (wfcb *WithoutFieldsCreateBulk) Save(ctx context.Context) ([]*WithoutFields, error)
Save creates the WithoutFields entities in the database.
func (*WithoutFieldsCreateBulk) SaveX ¶
func (wfcb *WithoutFieldsCreateBulk) SaveX(ctx context.Context) []*WithoutFields
SaveX is like Save, but panics if an error occurs.
type WithoutFieldsDelete ¶
type WithoutFieldsDelete struct {
// contains filtered or unexported fields
}
WithoutFieldsDelete is the builder for deleting a WithoutFields entity.
func (*WithoutFieldsDelete) Exec ¶
func (wfd *WithoutFieldsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WithoutFieldsDelete) ExecX ¶
func (wfd *WithoutFieldsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WithoutFieldsDelete) Where ¶
func (wfd *WithoutFieldsDelete) Where(ps ...predicate.WithoutFields) *WithoutFieldsDelete
Where appends a list predicates to the WithoutFieldsDelete builder.
type WithoutFieldsDeleteOne ¶
type WithoutFieldsDeleteOne struct {
// contains filtered or unexported fields
}
WithoutFieldsDeleteOne is the builder for deleting a single WithoutFields entity.
func (*WithoutFieldsDeleteOne) Exec ¶
func (wfdo *WithoutFieldsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WithoutFieldsDeleteOne) ExecX ¶
func (wfdo *WithoutFieldsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WithoutFieldsGroupBy ¶
type WithoutFieldsGroupBy struct {
// contains filtered or unexported fields
}
WithoutFieldsGroupBy is the group-by builder for WithoutFields entities.
func (*WithoutFieldsGroupBy) Aggregate ¶
func (wfgb *WithoutFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithoutFieldsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WithoutFieldsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsGroupBy) Scan ¶
func (wfgb *WithoutFieldsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*WithoutFieldsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithoutFieldsMutation ¶
type WithoutFieldsMutation struct {
// contains filtered or unexported fields
}
WithoutFieldsMutation represents an operation that mutates the WithoutFields nodes in the graph.
func (*WithoutFieldsMutation) AddField ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) AddedEdges ¶
func (m *WithoutFieldsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WithoutFieldsMutation) AddedField ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) AddedFields ¶
func (m *WithoutFieldsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WithoutFieldsMutation) AddedIDs ¶
func (m *WithoutFieldsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WithoutFieldsMutation) ClearEdge ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) ClearField ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) ClearedEdges ¶
func (m *WithoutFieldsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WithoutFieldsMutation) ClearedFields ¶
func (m *WithoutFieldsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WithoutFieldsMutation) Client ¶
func (m WithoutFieldsMutation) 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 (*WithoutFieldsMutation) EdgeCleared ¶
func (m *WithoutFieldsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WithoutFieldsMutation) Field ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) FieldCleared ¶
func (m *WithoutFieldsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WithoutFieldsMutation) Fields ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) ID ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) IDs ¶ added in v0.3.0
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) 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 (*WithoutFieldsMutation) Op ¶
func (m *WithoutFieldsMutation) Op() Op
Op returns the operation name.
func (*WithoutFieldsMutation) RemovedEdges ¶
func (m *WithoutFieldsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WithoutFieldsMutation) RemovedIDs ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) ResetEdge ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) ResetField ¶
func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) SetField ¶
func (m *WithoutFieldsMutation) 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 (WithoutFieldsMutation) Tx ¶
func (m WithoutFieldsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WithoutFieldsMutation) Type ¶
func (m *WithoutFieldsMutation) Type() string
Type returns the node type of this mutation (WithoutFields).
func (*WithoutFieldsMutation) Where ¶ added in v0.2.0
func (m *WithoutFieldsMutation) Where(ps ...predicate.WithoutFields)
Where appends a list predicates to the WithoutFieldsMutation builder.
type WithoutFieldsQuery ¶
type WithoutFieldsQuery struct {
// contains filtered or unexported fields
}
WithoutFieldsQuery is the builder for querying WithoutFields entities.
func (*WithoutFieldsQuery) All ¶
func (wfq *WithoutFieldsQuery) All(ctx context.Context) ([]*WithoutFields, error)
All executes the query and returns a list of WithoutFieldsSlice.
func (*WithoutFieldsQuery) AllX ¶
func (wfq *WithoutFieldsQuery) AllX(ctx context.Context) []*WithoutFields
AllX is like All, but panics if an error occurs.
func (*WithoutFieldsQuery) Clone ¶
func (wfq *WithoutFieldsQuery) Clone() *WithoutFieldsQuery
Clone returns a duplicate of the WithoutFieldsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WithoutFieldsQuery) Count ¶
func (wfq *WithoutFieldsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WithoutFieldsQuery) CountX ¶
func (wfq *WithoutFieldsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WithoutFieldsQuery) Exist ¶
func (wfq *WithoutFieldsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WithoutFieldsQuery) ExistX ¶
func (wfq *WithoutFieldsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WithoutFieldsQuery) First ¶
func (wfq *WithoutFieldsQuery) First(ctx context.Context) (*WithoutFields, error)
First returns the first WithoutFields entity from the query. Returns a *NotFoundError when no WithoutFields was found.
func (*WithoutFieldsQuery) FirstID ¶
func (wfq *WithoutFieldsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WithoutFields ID from the query. Returns a *NotFoundError when no WithoutFields ID was found.
func (*WithoutFieldsQuery) FirstIDX ¶
func (wfq *WithoutFieldsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WithoutFieldsQuery) FirstX ¶
func (wfq *WithoutFieldsQuery) FirstX(ctx context.Context) *WithoutFields
FirstX is like First, but panics if an error occurs.
func (*WithoutFieldsQuery) GroupBy ¶
func (wfq *WithoutFieldsQuery) GroupBy(field string, fields ...string) *WithoutFieldsGroupBy
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 (*WithoutFieldsQuery) IDs ¶
func (wfq *WithoutFieldsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of WithoutFields IDs.
func (*WithoutFieldsQuery) IDsX ¶
func (wfq *WithoutFieldsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WithoutFieldsQuery) Limit ¶
func (wfq *WithoutFieldsQuery) Limit(limit int) *WithoutFieldsQuery
Limit adds a limit step to the query.
func (*WithoutFieldsQuery) Offset ¶
func (wfq *WithoutFieldsQuery) Offset(offset int) *WithoutFieldsQuery
Offset adds an offset step to the query.
func (*WithoutFieldsQuery) Only ¶
func (wfq *WithoutFieldsQuery) Only(ctx context.Context) (*WithoutFields, error)
Only returns a single WithoutFields entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WithoutFields entity is found. Returns a *NotFoundError when no WithoutFields entities are found.
func (*WithoutFieldsQuery) OnlyID ¶
func (wfq *WithoutFieldsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WithoutFields ID in the query. Returns a *NotSingularError when more than one WithoutFields ID is found. Returns a *NotFoundError when no entities are found.
func (*WithoutFieldsQuery) OnlyIDX ¶
func (wfq *WithoutFieldsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WithoutFieldsQuery) OnlyX ¶
func (wfq *WithoutFieldsQuery) OnlyX(ctx context.Context) *WithoutFields
OnlyX is like Only, but panics if an error occurs.
func (*WithoutFieldsQuery) Order ¶
func (wfq *WithoutFieldsQuery) Order(o ...OrderFunc) *WithoutFieldsQuery
Order adds an order step to the query.
func (*WithoutFieldsQuery) Select ¶
func (wfq *WithoutFieldsQuery) Select(fields ...string) *WithoutFieldsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*WithoutFieldsQuery) Unique ¶
func (wfq *WithoutFieldsQuery) Unique(unique bool) *WithoutFieldsQuery
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 (*WithoutFieldsQuery) Where ¶
func (wfq *WithoutFieldsQuery) Where(ps ...predicate.WithoutFields) *WithoutFieldsQuery
Where adds a new predicate for the WithoutFieldsQuery builder.
type WithoutFieldsSelect ¶
type WithoutFieldsSelect struct { *WithoutFieldsQuery // contains filtered or unexported fields }
WithoutFieldsSelect is the builder for selecting fields of WithoutFields entities.
func (*WithoutFieldsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WithoutFieldsSelect) Scan ¶
func (wfs *WithoutFieldsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WithoutFieldsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WithoutFieldsSlice ¶
type WithoutFieldsSlice []*WithoutFields
WithoutFieldsSlice is a parsable slice of WithoutFields.
type WithoutFieldsUpdate ¶
type WithoutFieldsUpdate struct {
// contains filtered or unexported fields
}
WithoutFieldsUpdate is the builder for updating WithoutFields entities.
func (*WithoutFieldsUpdate) Exec ¶
func (wfu *WithoutFieldsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WithoutFieldsUpdate) ExecX ¶
func (wfu *WithoutFieldsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithoutFieldsUpdate) Mutation ¶
func (wfu *WithoutFieldsUpdate) Mutation() *WithoutFieldsMutation
Mutation returns the WithoutFieldsMutation object of the builder.
func (*WithoutFieldsUpdate) Save ¶
func (wfu *WithoutFieldsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WithoutFieldsUpdate) SaveX ¶
func (wfu *WithoutFieldsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WithoutFieldsUpdate) Where ¶
func (wfu *WithoutFieldsUpdate) Where(ps ...predicate.WithoutFields) *WithoutFieldsUpdate
Where appends a list predicates to the WithoutFieldsUpdate builder.
type WithoutFieldsUpdateOne ¶
type WithoutFieldsUpdateOne struct {
// contains filtered or unexported fields
}
WithoutFieldsUpdateOne is the builder for updating a single WithoutFields entity.
func (*WithoutFieldsUpdateOne) Exec ¶
func (wfuo *WithoutFieldsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WithoutFieldsUpdateOne) ExecX ¶
func (wfuo *WithoutFieldsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WithoutFieldsUpdateOne) Mutation ¶
func (wfuo *WithoutFieldsUpdateOne) Mutation() *WithoutFieldsMutation
Mutation returns the WithoutFieldsMutation object of the builder.
func (*WithoutFieldsUpdateOne) Save ¶
func (wfuo *WithoutFieldsUpdateOne) Save(ctx context.Context) (*WithoutFields, error)
Save executes the query and returns the updated WithoutFields entity.
func (*WithoutFieldsUpdateOne) SaveX ¶
func (wfuo *WithoutFieldsUpdateOne) SaveX(ctx context.Context) *WithoutFields
SaveX is like Save, but panics if an error occurs.
func (*WithoutFieldsUpdateOne) Select ¶
func (wfuo *WithoutFieldsUpdateOne) Select(field string, fields ...string) *WithoutFieldsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- withfields.go
- withfields_create.go
- withfields_delete.go
- withfields_query.go
- withfields_update.go
- withmodifiedfield.go
- withmodifiedfield_create.go
- withmodifiedfield_delete.go
- withmodifiedfield_query.go
- withmodifiedfield_update.go
- withnilfields.go
- withnilfields_create.go
- withnilfields_delete.go
- withnilfields_query.go
- withnilfields_update.go
- withoutfields.go
- withoutfields_create.go
- withoutfields_delete.go
- withoutfields_query.go
- withoutfields_update.go