Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Equipment
- type EquipmentClient
- func (c *EquipmentClient) Create() *EquipmentCreate
- func (c *EquipmentClient) CreateBulk(builders ...*EquipmentCreate) *EquipmentCreateBulk
- func (c *EquipmentClient) Delete() *EquipmentDelete
- func (c *EquipmentClient) DeleteOne(e *Equipment) *EquipmentDeleteOne
- func (c *EquipmentClient) DeleteOneID(id uuid.UUID) *EquipmentDeleteOne
- func (c *EquipmentClient) Get(ctx context.Context, id uuid.UUID) (*Equipment, error)
- func (c *EquipmentClient) GetX(ctx context.Context, id uuid.UUID) *Equipment
- func (c *EquipmentClient) Hooks() []Hook
- func (c *EquipmentClient) Intercept(interceptors ...Interceptor)
- func (c *EquipmentClient) Interceptors() []Interceptor
- func (c *EquipmentClient) MapCreateBulk(slice any, setFunc func(*EquipmentCreate, int)) *EquipmentCreateBulk
- func (c *EquipmentClient) Query() *EquipmentQuery
- func (c *EquipmentClient) QueryRecipes(e *Equipment) *RecipeQuery
- func (c *EquipmentClient) Update() *EquipmentUpdate
- func (c *EquipmentClient) UpdateOne(e *Equipment) *EquipmentUpdateOne
- func (c *EquipmentClient) UpdateOneID(id uuid.UUID) *EquipmentUpdateOne
- func (c *EquipmentClient) Use(hooks ...Hook)
- type EquipmentCreate
- func (ec *EquipmentCreate) AddRecipeIDs(ids ...uuid.UUID) *EquipmentCreate
- func (ec *EquipmentCreate) AddRecipes(r ...*Recipe) *EquipmentCreate
- func (ec *EquipmentCreate) Exec(ctx context.Context) error
- func (ec *EquipmentCreate) ExecX(ctx context.Context)
- func (ec *EquipmentCreate) Mutation() *EquipmentMutation
- func (ec *EquipmentCreate) Save(ctx context.Context) (*Equipment, error)
- func (ec *EquipmentCreate) SaveX(ctx context.Context) *Equipment
- func (ec *EquipmentCreate) SetID(u uuid.UUID) *EquipmentCreate
- func (ec *EquipmentCreate) SetName(s string) *EquipmentCreate
- func (ec *EquipmentCreate) SetNillableID(u *uuid.UUID) *EquipmentCreate
- func (ec *EquipmentCreate) SetSlug(s string) *EquipmentCreate
- type EquipmentCreateBulk
- type EquipmentDelete
- type EquipmentDeleteOne
- type EquipmentEdges
- type EquipmentGroupBy
- func (egb *EquipmentGroupBy) Aggregate(fns ...AggregateFunc) *EquipmentGroupBy
- func (s *EquipmentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EquipmentGroupBy) BoolX(ctx context.Context) bool
- func (s *EquipmentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EquipmentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EquipmentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EquipmentGroupBy) Float64X(ctx context.Context) float64
- func (s *EquipmentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EquipmentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EquipmentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EquipmentGroupBy) IntX(ctx context.Context) int
- func (s *EquipmentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EquipmentGroupBy) IntsX(ctx context.Context) []int
- func (egb *EquipmentGroupBy) Scan(ctx context.Context, v any) error
- func (s *EquipmentGroupBy) ScanX(ctx context.Context, v any)
- func (s *EquipmentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EquipmentGroupBy) StringX(ctx context.Context) string
- func (s *EquipmentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EquipmentGroupBy) StringsX(ctx context.Context) []string
- type EquipmentMutation
- func (m *EquipmentMutation) AddField(name string, value ent.Value) error
- func (m *EquipmentMutation) AddRecipeIDs(ids ...uuid.UUID)
- func (m *EquipmentMutation) AddedEdges() []string
- func (m *EquipmentMutation) AddedField(name string) (ent.Value, bool)
- func (m *EquipmentMutation) AddedFields() []string
- func (m *EquipmentMutation) AddedIDs(name string) []ent.Value
- func (m *EquipmentMutation) ClearEdge(name string) error
- func (m *EquipmentMutation) ClearField(name string) error
- func (m *EquipmentMutation) ClearRecipes()
- func (m *EquipmentMutation) ClearedEdges() []string
- func (m *EquipmentMutation) ClearedFields() []string
- func (m EquipmentMutation) Client() *Client
- func (m *EquipmentMutation) EdgeCleared(name string) bool
- func (m *EquipmentMutation) Field(name string) (ent.Value, bool)
- func (m *EquipmentMutation) FieldCleared(name string) bool
- func (m *EquipmentMutation) Fields() []string
- func (m *EquipmentMutation) ID() (id uuid.UUID, exists bool)
- func (m *EquipmentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *EquipmentMutation) Name() (r string, exists bool)
- func (m *EquipmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EquipmentMutation) OldName(ctx context.Context) (v string, err error)
- func (m *EquipmentMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *EquipmentMutation) Op() Op
- func (m *EquipmentMutation) RecipesCleared() bool
- func (m *EquipmentMutation) RecipesIDs() (ids []uuid.UUID)
- func (m *EquipmentMutation) RemoveRecipeIDs(ids ...uuid.UUID)
- func (m *EquipmentMutation) RemovedEdges() []string
- func (m *EquipmentMutation) RemovedIDs(name string) []ent.Value
- func (m *EquipmentMutation) RemovedRecipesIDs() (ids []uuid.UUID)
- func (m *EquipmentMutation) ResetEdge(name string) error
- func (m *EquipmentMutation) ResetField(name string) error
- func (m *EquipmentMutation) ResetName()
- func (m *EquipmentMutation) ResetRecipes()
- func (m *EquipmentMutation) ResetSlug()
- func (m *EquipmentMutation) SetField(name string, value ent.Value) error
- func (m *EquipmentMutation) SetID(id uuid.UUID)
- func (m *EquipmentMutation) SetName(s string)
- func (m *EquipmentMutation) SetOp(op Op)
- func (m *EquipmentMutation) SetSlug(s string)
- func (m *EquipmentMutation) Slug() (r string, exists bool)
- func (m EquipmentMutation) Tx() (*Tx, error)
- func (m *EquipmentMutation) Type() string
- func (m *EquipmentMutation) Where(ps ...predicate.Equipment)
- func (m *EquipmentMutation) WhereP(ps ...func(*sql.Selector))
- type EquipmentQuery
- func (eq *EquipmentQuery) Aggregate(fns ...AggregateFunc) *EquipmentSelect
- func (eq *EquipmentQuery) All(ctx context.Context) ([]*Equipment, error)
- func (eq *EquipmentQuery) AllX(ctx context.Context) []*Equipment
- func (eq *EquipmentQuery) Clone() *EquipmentQuery
- func (eq *EquipmentQuery) Count(ctx context.Context) (int, error)
- func (eq *EquipmentQuery) CountX(ctx context.Context) int
- func (eq *EquipmentQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EquipmentQuery) ExistX(ctx context.Context) bool
- func (eq *EquipmentQuery) First(ctx context.Context) (*Equipment, error)
- func (eq *EquipmentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (eq *EquipmentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (eq *EquipmentQuery) FirstX(ctx context.Context) *Equipment
- func (eq *EquipmentQuery) GroupBy(field string, fields ...string) *EquipmentGroupBy
- func (eq *EquipmentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (eq *EquipmentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (eq *EquipmentQuery) Limit(limit int) *EquipmentQuery
- func (eq *EquipmentQuery) Offset(offset int) *EquipmentQuery
- func (eq *EquipmentQuery) Only(ctx context.Context) (*Equipment, error)
- func (eq *EquipmentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (eq *EquipmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (eq *EquipmentQuery) OnlyX(ctx context.Context) *Equipment
- func (eq *EquipmentQuery) Order(o ...equipment.OrderOption) *EquipmentQuery
- func (eq *EquipmentQuery) QueryRecipes() *RecipeQuery
- func (eq *EquipmentQuery) Select(fields ...string) *EquipmentSelect
- func (eq *EquipmentQuery) Unique(unique bool) *EquipmentQuery
- func (eq *EquipmentQuery) Where(ps ...predicate.Equipment) *EquipmentQuery
- func (eq *EquipmentQuery) WithRecipes(opts ...func(*RecipeQuery)) *EquipmentQuery
- type EquipmentSelect
- func (es *EquipmentSelect) Aggregate(fns ...AggregateFunc) *EquipmentSelect
- func (s *EquipmentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EquipmentSelect) BoolX(ctx context.Context) bool
- func (s *EquipmentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EquipmentSelect) BoolsX(ctx context.Context) []bool
- func (s *EquipmentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EquipmentSelect) Float64X(ctx context.Context) float64
- func (s *EquipmentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EquipmentSelect) Float64sX(ctx context.Context) []float64
- func (s *EquipmentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EquipmentSelect) IntX(ctx context.Context) int
- func (s *EquipmentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EquipmentSelect) IntsX(ctx context.Context) []int
- func (es *EquipmentSelect) Scan(ctx context.Context, v any) error
- func (s *EquipmentSelect) ScanX(ctx context.Context, v any)
- func (s *EquipmentSelect) String(ctx context.Context) (_ string, err error)
- func (s *EquipmentSelect) StringX(ctx context.Context) string
- func (s *EquipmentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EquipmentSelect) StringsX(ctx context.Context) []string
- type EquipmentSlice
- type EquipmentUpdate
- func (eu *EquipmentUpdate) AddRecipeIDs(ids ...uuid.UUID) *EquipmentUpdate
- func (eu *EquipmentUpdate) AddRecipes(r ...*Recipe) *EquipmentUpdate
- func (eu *EquipmentUpdate) ClearRecipes() *EquipmentUpdate
- func (eu *EquipmentUpdate) Exec(ctx context.Context) error
- func (eu *EquipmentUpdate) ExecX(ctx context.Context)
- func (eu *EquipmentUpdate) Mutation() *EquipmentMutation
- func (eu *EquipmentUpdate) RemoveRecipeIDs(ids ...uuid.UUID) *EquipmentUpdate
- func (eu *EquipmentUpdate) RemoveRecipes(r ...*Recipe) *EquipmentUpdate
- func (eu *EquipmentUpdate) Save(ctx context.Context) (int, error)
- func (eu *EquipmentUpdate) SaveX(ctx context.Context) int
- func (eu *EquipmentUpdate) SetName(s string) *EquipmentUpdate
- func (eu *EquipmentUpdate) SetNillableName(s *string) *EquipmentUpdate
- func (eu *EquipmentUpdate) SetNillableSlug(s *string) *EquipmentUpdate
- func (eu *EquipmentUpdate) SetSlug(s string) *EquipmentUpdate
- func (eu *EquipmentUpdate) Where(ps ...predicate.Equipment) *EquipmentUpdate
- type EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) AddRecipeIDs(ids ...uuid.UUID) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) AddRecipes(r ...*Recipe) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) ClearRecipes() *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) Exec(ctx context.Context) error
- func (euo *EquipmentUpdateOne) ExecX(ctx context.Context)
- func (euo *EquipmentUpdateOne) Mutation() *EquipmentMutation
- func (euo *EquipmentUpdateOne) RemoveRecipeIDs(ids ...uuid.UUID) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) RemoveRecipes(r ...*Recipe) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) Save(ctx context.Context) (*Equipment, error)
- func (euo *EquipmentUpdateOne) SaveX(ctx context.Context) *Equipment
- func (euo *EquipmentUpdateOne) Select(field string, fields ...string) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) SetName(s string) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) SetNillableName(s *string) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) SetNillableSlug(s *string) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) SetSlug(s string) *EquipmentUpdateOne
- func (euo *EquipmentUpdateOne) Where(ps ...predicate.Equipment) *EquipmentUpdateOne
- type Hook
- type Idea
- type IdeaClient
- func (c *IdeaClient) Create() *IdeaCreate
- func (c *IdeaClient) CreateBulk(builders ...*IdeaCreate) *IdeaCreateBulk
- func (c *IdeaClient) Delete() *IdeaDelete
- func (c *IdeaClient) DeleteOne(i *Idea) *IdeaDeleteOne
- func (c *IdeaClient) DeleteOneID(id uuid.UUID) *IdeaDeleteOne
- func (c *IdeaClient) Get(ctx context.Context, id uuid.UUID) (*Idea, error)
- func (c *IdeaClient) GetX(ctx context.Context, id uuid.UUID) *Idea
- func (c *IdeaClient) Hooks() []Hook
- func (c *IdeaClient) Intercept(interceptors ...Interceptor)
- func (c *IdeaClient) Interceptors() []Interceptor
- func (c *IdeaClient) MapCreateBulk(slice any, setFunc func(*IdeaCreate, int)) *IdeaCreateBulk
- func (c *IdeaClient) Query() *IdeaQuery
- func (c *IdeaClient) QueryRecipe(i *Idea) *RecipeQuery
- func (c *IdeaClient) Update() *IdeaUpdate
- func (c *IdeaClient) UpdateOne(i *Idea) *IdeaUpdateOne
- func (c *IdeaClient) UpdateOneID(id uuid.UUID) *IdeaUpdateOne
- func (c *IdeaClient) Use(hooks ...Hook)
- type IdeaCreate
- func (ic *IdeaCreate) Exec(ctx context.Context) error
- func (ic *IdeaCreate) ExecX(ctx context.Context)
- func (ic *IdeaCreate) Mutation() *IdeaMutation
- func (ic *IdeaCreate) Save(ctx context.Context) (*Idea, error)
- func (ic *IdeaCreate) SaveX(ctx context.Context) *Idea
- func (ic *IdeaCreate) SetID(u uuid.UUID) *IdeaCreate
- func (ic *IdeaCreate) SetNillableID(u *uuid.UUID) *IdeaCreate
- func (ic *IdeaCreate) SetNillableRecipeID(id *uuid.UUID) *IdeaCreate
- func (ic *IdeaCreate) SetRecipe(r *Recipe) *IdeaCreate
- func (ic *IdeaCreate) SetRecipeID(id uuid.UUID) *IdeaCreate
- func (ic *IdeaCreate) SetText(s string) *IdeaCreate
- type IdeaCreateBulk
- type IdeaDelete
- type IdeaDeleteOne
- type IdeaEdges
- type IdeaGroupBy
- func (igb *IdeaGroupBy) Aggregate(fns ...AggregateFunc) *IdeaGroupBy
- func (s *IdeaGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *IdeaGroupBy) BoolX(ctx context.Context) bool
- func (s *IdeaGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *IdeaGroupBy) BoolsX(ctx context.Context) []bool
- func (s *IdeaGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *IdeaGroupBy) Float64X(ctx context.Context) float64
- func (s *IdeaGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *IdeaGroupBy) Float64sX(ctx context.Context) []float64
- func (s *IdeaGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *IdeaGroupBy) IntX(ctx context.Context) int
- func (s *IdeaGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *IdeaGroupBy) IntsX(ctx context.Context) []int
- func (igb *IdeaGroupBy) Scan(ctx context.Context, v any) error
- func (s *IdeaGroupBy) ScanX(ctx context.Context, v any)
- func (s *IdeaGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *IdeaGroupBy) StringX(ctx context.Context) string
- func (s *IdeaGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *IdeaGroupBy) StringsX(ctx context.Context) []string
- type IdeaMutation
- func (m *IdeaMutation) AddField(name string, value ent.Value) error
- func (m *IdeaMutation) AddedEdges() []string
- func (m *IdeaMutation) AddedField(name string) (ent.Value, bool)
- func (m *IdeaMutation) AddedFields() []string
- func (m *IdeaMutation) AddedIDs(name string) []ent.Value
- func (m *IdeaMutation) ClearEdge(name string) error
- func (m *IdeaMutation) ClearField(name string) error
- func (m *IdeaMutation) ClearRecipe()
- func (m *IdeaMutation) ClearedEdges() []string
- func (m *IdeaMutation) ClearedFields() []string
- func (m IdeaMutation) Client() *Client
- func (m *IdeaMutation) EdgeCleared(name string) bool
- func (m *IdeaMutation) Field(name string) (ent.Value, bool)
- func (m *IdeaMutation) FieldCleared(name string) bool
- func (m *IdeaMutation) Fields() []string
- func (m *IdeaMutation) ID() (id uuid.UUID, exists bool)
- func (m *IdeaMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *IdeaMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IdeaMutation) OldText(ctx context.Context) (v string, err error)
- func (m *IdeaMutation) Op() Op
- func (m *IdeaMutation) RecipeCleared() bool
- func (m *IdeaMutation) RecipeID() (id uuid.UUID, exists bool)
- func (m *IdeaMutation) RecipeIDs() (ids []uuid.UUID)
- func (m *IdeaMutation) RemovedEdges() []string
- func (m *IdeaMutation) RemovedIDs(name string) []ent.Value
- func (m *IdeaMutation) ResetEdge(name string) error
- func (m *IdeaMutation) ResetField(name string) error
- func (m *IdeaMutation) ResetRecipe()
- func (m *IdeaMutation) ResetText()
- func (m *IdeaMutation) SetField(name string, value ent.Value) error
- func (m *IdeaMutation) SetID(id uuid.UUID)
- func (m *IdeaMutation) SetOp(op Op)
- func (m *IdeaMutation) SetRecipeID(id uuid.UUID)
- func (m *IdeaMutation) SetText(s string)
- func (m *IdeaMutation) Text() (r string, exists bool)
- func (m IdeaMutation) Tx() (*Tx, error)
- func (m *IdeaMutation) Type() string
- func (m *IdeaMutation) Where(ps ...predicate.Idea)
- func (m *IdeaMutation) WhereP(ps ...func(*sql.Selector))
- type IdeaQuery
- func (iq *IdeaQuery) Aggregate(fns ...AggregateFunc) *IdeaSelect
- func (iq *IdeaQuery) All(ctx context.Context) ([]*Idea, error)
- func (iq *IdeaQuery) AllX(ctx context.Context) []*Idea
- func (iq *IdeaQuery) Clone() *IdeaQuery
- func (iq *IdeaQuery) Count(ctx context.Context) (int, error)
- func (iq *IdeaQuery) CountX(ctx context.Context) int
- func (iq *IdeaQuery) Exist(ctx context.Context) (bool, error)
- func (iq *IdeaQuery) ExistX(ctx context.Context) bool
- func (iq *IdeaQuery) First(ctx context.Context) (*Idea, error)
- func (iq *IdeaQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *IdeaQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *IdeaQuery) FirstX(ctx context.Context) *Idea
- func (iq *IdeaQuery) GroupBy(field string, fields ...string) *IdeaGroupBy
- func (iq *IdeaQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iq *IdeaQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *IdeaQuery) Limit(limit int) *IdeaQuery
- func (iq *IdeaQuery) Offset(offset int) *IdeaQuery
- func (iq *IdeaQuery) Only(ctx context.Context) (*Idea, error)
- func (iq *IdeaQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *IdeaQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *IdeaQuery) OnlyX(ctx context.Context) *Idea
- func (iq *IdeaQuery) Order(o ...idea.OrderOption) *IdeaQuery
- func (iq *IdeaQuery) QueryRecipe() *RecipeQuery
- func (iq *IdeaQuery) Select(fields ...string) *IdeaSelect
- func (iq *IdeaQuery) Unique(unique bool) *IdeaQuery
- func (iq *IdeaQuery) Where(ps ...predicate.Idea) *IdeaQuery
- func (iq *IdeaQuery) WithRecipe(opts ...func(*RecipeQuery)) *IdeaQuery
- type IdeaSelect
- func (is *IdeaSelect) Aggregate(fns ...AggregateFunc) *IdeaSelect
- func (s *IdeaSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *IdeaSelect) BoolX(ctx context.Context) bool
- func (s *IdeaSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *IdeaSelect) BoolsX(ctx context.Context) []bool
- func (s *IdeaSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *IdeaSelect) Float64X(ctx context.Context) float64
- func (s *IdeaSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *IdeaSelect) Float64sX(ctx context.Context) []float64
- func (s *IdeaSelect) Int(ctx context.Context) (_ int, err error)
- func (s *IdeaSelect) IntX(ctx context.Context) int
- func (s *IdeaSelect) Ints(ctx context.Context) ([]int, error)
- func (s *IdeaSelect) IntsX(ctx context.Context) []int
- func (is *IdeaSelect) Scan(ctx context.Context, v any) error
- func (s *IdeaSelect) ScanX(ctx context.Context, v any)
- func (s *IdeaSelect) String(ctx context.Context) (_ string, err error)
- func (s *IdeaSelect) StringX(ctx context.Context) string
- func (s *IdeaSelect) Strings(ctx context.Context) ([]string, error)
- func (s *IdeaSelect) StringsX(ctx context.Context) []string
- type IdeaUpdate
- func (iu *IdeaUpdate) ClearRecipe() *IdeaUpdate
- func (iu *IdeaUpdate) Exec(ctx context.Context) error
- func (iu *IdeaUpdate) ExecX(ctx context.Context)
- func (iu *IdeaUpdate) Mutation() *IdeaMutation
- func (iu *IdeaUpdate) Save(ctx context.Context) (int, error)
- func (iu *IdeaUpdate) SaveX(ctx context.Context) int
- func (iu *IdeaUpdate) SetNillableRecipeID(id *uuid.UUID) *IdeaUpdate
- func (iu *IdeaUpdate) SetNillableText(s *string) *IdeaUpdate
- func (iu *IdeaUpdate) SetRecipe(r *Recipe) *IdeaUpdate
- func (iu *IdeaUpdate) SetRecipeID(id uuid.UUID) *IdeaUpdate
- func (iu *IdeaUpdate) SetText(s string) *IdeaUpdate
- func (iu *IdeaUpdate) Where(ps ...predicate.Idea) *IdeaUpdate
- type IdeaUpdateOne
- func (iuo *IdeaUpdateOne) ClearRecipe() *IdeaUpdateOne
- func (iuo *IdeaUpdateOne) Exec(ctx context.Context) error
- func (iuo *IdeaUpdateOne) ExecX(ctx context.Context)
- func (iuo *IdeaUpdateOne) Mutation() *IdeaMutation
- func (iuo *IdeaUpdateOne) Save(ctx context.Context) (*Idea, error)
- func (iuo *IdeaUpdateOne) SaveX(ctx context.Context) *Idea
- func (iuo *IdeaUpdateOne) Select(field string, fields ...string) *IdeaUpdateOne
- func (iuo *IdeaUpdateOne) SetNillableRecipeID(id *uuid.UUID) *IdeaUpdateOne
- func (iuo *IdeaUpdateOne) SetNillableText(s *string) *IdeaUpdateOne
- func (iuo *IdeaUpdateOne) SetRecipe(r *Recipe) *IdeaUpdateOne
- func (iuo *IdeaUpdateOne) SetRecipeID(id uuid.UUID) *IdeaUpdateOne
- func (iuo *IdeaUpdateOne) SetText(s string) *IdeaUpdateOne
- func (iuo *IdeaUpdateOne) Where(ps ...predicate.Idea) *IdeaUpdateOne
- type Ideas
- type Ingredient
- type IngredientClient
- func (c *IngredientClient) Create() *IngredientCreate
- func (c *IngredientClient) CreateBulk(builders ...*IngredientCreate) *IngredientCreateBulk
- func (c *IngredientClient) Delete() *IngredientDelete
- func (c *IngredientClient) DeleteOne(i *Ingredient) *IngredientDeleteOne
- func (c *IngredientClient) DeleteOneID(id uuid.UUID) *IngredientDeleteOne
- func (c *IngredientClient) Get(ctx context.Context, id uuid.UUID) (*Ingredient, error)
- func (c *IngredientClient) GetX(ctx context.Context, id uuid.UUID) *Ingredient
- func (c *IngredientClient) Hooks() []Hook
- func (c *IngredientClient) Intercept(interceptors ...Interceptor)
- func (c *IngredientClient) Interceptors() []Interceptor
- func (c *IngredientClient) MapCreateBulk(slice any, setFunc func(*IngredientCreate, int)) *IngredientCreateBulk
- func (c *IngredientClient) Query() *IngredientQuery
- func (c *IngredientClient) QueryProduct(i *Ingredient) *ProductQuery
- func (c *IngredientClient) QueryRecipe(i *Ingredient) *RecipeQuery
- func (c *IngredientClient) Update() *IngredientUpdate
- func (c *IngredientClient) UpdateOne(i *Ingredient) *IngredientUpdateOne
- func (c *IngredientClient) UpdateOneID(id uuid.UUID) *IngredientUpdateOne
- func (c *IngredientClient) Use(hooks ...Hook)
- type IngredientCreate
- func (ic *IngredientCreate) Exec(ctx context.Context) error
- func (ic *IngredientCreate) ExecX(ctx context.Context)
- func (ic *IngredientCreate) Mutation() *IngredientMutation
- func (ic *IngredientCreate) Save(ctx context.Context) (*Ingredient, error)
- func (ic *IngredientCreate) SaveX(ctx context.Context) *Ingredient
- func (ic *IngredientCreate) SetCreateTime(t time.Time) *IngredientCreate
- func (ic *IngredientCreate) SetID(u uuid.UUID) *IngredientCreate
- func (ic *IngredientCreate) SetNillableCreateTime(t *time.Time) *IngredientCreate
- func (ic *IngredientCreate) SetNillableID(u *uuid.UUID) *IngredientCreate
- func (ic *IngredientCreate) SetNillableOptional(b *bool) *IngredientCreate
- func (ic *IngredientCreate) SetNillableQuantity(s *string) *IngredientCreate
- func (ic *IngredientCreate) SetNillableUnit(s *string) *IngredientCreate
- func (ic *IngredientCreate) SetNillableUpdateTime(t *time.Time) *IngredientCreate
- func (ic *IngredientCreate) SetOptional(b bool) *IngredientCreate
- func (ic *IngredientCreate) SetProduct(p *Product) *IngredientCreate
- func (ic *IngredientCreate) SetProductID(u uuid.UUID) *IngredientCreate
- func (ic *IngredientCreate) SetQuantity(s string) *IngredientCreate
- func (ic *IngredientCreate) SetRecipe(r *Recipe) *IngredientCreate
- func (ic *IngredientCreate) SetRecipeID(u uuid.UUID) *IngredientCreate
- func (ic *IngredientCreate) SetUnit(s string) *IngredientCreate
- func (ic *IngredientCreate) SetUpdateTime(t time.Time) *IngredientCreate
- type IngredientCreateBulk
- type IngredientDelete
- type IngredientDeleteOne
- type IngredientEdges
- type IngredientGroupBy
- func (igb *IngredientGroupBy) Aggregate(fns ...AggregateFunc) *IngredientGroupBy
- func (s *IngredientGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *IngredientGroupBy) BoolX(ctx context.Context) bool
- func (s *IngredientGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *IngredientGroupBy) BoolsX(ctx context.Context) []bool
- func (s *IngredientGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *IngredientGroupBy) Float64X(ctx context.Context) float64
- func (s *IngredientGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *IngredientGroupBy) Float64sX(ctx context.Context) []float64
- func (s *IngredientGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *IngredientGroupBy) IntX(ctx context.Context) int
- func (s *IngredientGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *IngredientGroupBy) IntsX(ctx context.Context) []int
- func (igb *IngredientGroupBy) Scan(ctx context.Context, v any) error
- func (s *IngredientGroupBy) ScanX(ctx context.Context, v any)
- func (s *IngredientGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *IngredientGroupBy) StringX(ctx context.Context) string
- func (s *IngredientGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *IngredientGroupBy) StringsX(ctx context.Context) []string
- type IngredientMutation
- func (m *IngredientMutation) AddField(name string, value ent.Value) error
- func (m *IngredientMutation) AddedEdges() []string
- func (m *IngredientMutation) AddedField(name string) (ent.Value, bool)
- func (m *IngredientMutation) AddedFields() []string
- func (m *IngredientMutation) AddedIDs(name string) []ent.Value
- func (m *IngredientMutation) ClearEdge(name string) error
- func (m *IngredientMutation) ClearField(name string) error
- func (m *IngredientMutation) ClearProduct()
- func (m *IngredientMutation) ClearQuantity()
- func (m *IngredientMutation) ClearRecipe()
- func (m *IngredientMutation) ClearUnit()
- func (m *IngredientMutation) ClearedEdges() []string
- func (m *IngredientMutation) ClearedFields() []string
- func (m IngredientMutation) Client() *Client
- func (m *IngredientMutation) CreateTime() (r time.Time, exists bool)
- func (m *IngredientMutation) EdgeCleared(name string) bool
- func (m *IngredientMutation) Field(name string) (ent.Value, bool)
- func (m *IngredientMutation) FieldCleared(name string) bool
- func (m *IngredientMutation) Fields() []string
- func (m *IngredientMutation) ID() (id uuid.UUID, exists bool)
- func (m *IngredientMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *IngredientMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *IngredientMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IngredientMutation) OldOptional(ctx context.Context) (v bool, err error)
- func (m *IngredientMutation) OldProductID(ctx context.Context) (v uuid.UUID, err error)
- func (m *IngredientMutation) OldQuantity(ctx context.Context) (v string, err error)
- func (m *IngredientMutation) OldRecipeID(ctx context.Context) (v uuid.UUID, err error)
- func (m *IngredientMutation) OldUnit(ctx context.Context) (v string, err error)
- func (m *IngredientMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *IngredientMutation) Op() Op
- func (m *IngredientMutation) Optional() (r bool, exists bool)
- func (m *IngredientMutation) ProductCleared() bool
- func (m *IngredientMutation) ProductID() (r uuid.UUID, exists bool)
- func (m *IngredientMutation) ProductIDs() (ids []uuid.UUID)
- func (m *IngredientMutation) Quantity() (r string, exists bool)
- func (m *IngredientMutation) QuantityCleared() bool
- func (m *IngredientMutation) RecipeCleared() bool
- func (m *IngredientMutation) RecipeID() (r uuid.UUID, exists bool)
- func (m *IngredientMutation) RecipeIDs() (ids []uuid.UUID)
- func (m *IngredientMutation) RemovedEdges() []string
- func (m *IngredientMutation) RemovedIDs(name string) []ent.Value
- func (m *IngredientMutation) ResetCreateTime()
- func (m *IngredientMutation) ResetEdge(name string) error
- func (m *IngredientMutation) ResetField(name string) error
- func (m *IngredientMutation) ResetOptional()
- func (m *IngredientMutation) ResetProduct()
- func (m *IngredientMutation) ResetProductID()
- func (m *IngredientMutation) ResetQuantity()
- func (m *IngredientMutation) ResetRecipe()
- func (m *IngredientMutation) ResetRecipeID()
- func (m *IngredientMutation) ResetUnit()
- func (m *IngredientMutation) ResetUpdateTime()
- func (m *IngredientMutation) SetCreateTime(t time.Time)
- func (m *IngredientMutation) SetField(name string, value ent.Value) error
- func (m *IngredientMutation) SetID(id uuid.UUID)
- func (m *IngredientMutation) SetOp(op Op)
- func (m *IngredientMutation) SetOptional(b bool)
- func (m *IngredientMutation) SetProductID(u uuid.UUID)
- func (m *IngredientMutation) SetQuantity(s string)
- func (m *IngredientMutation) SetRecipeID(u uuid.UUID)
- func (m *IngredientMutation) SetUnit(s string)
- func (m *IngredientMutation) SetUpdateTime(t time.Time)
- func (m IngredientMutation) Tx() (*Tx, error)
- func (m *IngredientMutation) Type() string
- func (m *IngredientMutation) Unit() (r string, exists bool)
- func (m *IngredientMutation) UnitCleared() bool
- func (m *IngredientMutation) UpdateTime() (r time.Time, exists bool)
- func (m *IngredientMutation) Where(ps ...predicate.Ingredient)
- func (m *IngredientMutation) WhereP(ps ...func(*sql.Selector))
- type IngredientQuery
- func (iq *IngredientQuery) Aggregate(fns ...AggregateFunc) *IngredientSelect
- func (iq *IngredientQuery) All(ctx context.Context) ([]*Ingredient, error)
- func (iq *IngredientQuery) AllX(ctx context.Context) []*Ingredient
- func (iq *IngredientQuery) Clone() *IngredientQuery
- func (iq *IngredientQuery) Count(ctx context.Context) (int, error)
- func (iq *IngredientQuery) CountX(ctx context.Context) int
- func (iq *IngredientQuery) Exist(ctx context.Context) (bool, error)
- func (iq *IngredientQuery) ExistX(ctx context.Context) bool
- func (iq *IngredientQuery) First(ctx context.Context) (*Ingredient, error)
- func (iq *IngredientQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *IngredientQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *IngredientQuery) FirstX(ctx context.Context) *Ingredient
- func (iq *IngredientQuery) GroupBy(field string, fields ...string) *IngredientGroupBy
- func (iq *IngredientQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iq *IngredientQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *IngredientQuery) Limit(limit int) *IngredientQuery
- func (iq *IngredientQuery) Offset(offset int) *IngredientQuery
- func (iq *IngredientQuery) Only(ctx context.Context) (*Ingredient, error)
- func (iq *IngredientQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *IngredientQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *IngredientQuery) OnlyX(ctx context.Context) *Ingredient
- func (iq *IngredientQuery) Order(o ...ingredient.OrderOption) *IngredientQuery
- func (iq *IngredientQuery) QueryProduct() *ProductQuery
- func (iq *IngredientQuery) QueryRecipe() *RecipeQuery
- func (iq *IngredientQuery) Select(fields ...string) *IngredientSelect
- func (iq *IngredientQuery) Unique(unique bool) *IngredientQuery
- func (iq *IngredientQuery) Where(ps ...predicate.Ingredient) *IngredientQuery
- func (iq *IngredientQuery) WithProduct(opts ...func(*ProductQuery)) *IngredientQuery
- func (iq *IngredientQuery) WithRecipe(opts ...func(*RecipeQuery)) *IngredientQuery
- type IngredientSelect
- func (is *IngredientSelect) Aggregate(fns ...AggregateFunc) *IngredientSelect
- func (s *IngredientSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *IngredientSelect) BoolX(ctx context.Context) bool
- func (s *IngredientSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *IngredientSelect) BoolsX(ctx context.Context) []bool
- func (s *IngredientSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *IngredientSelect) Float64X(ctx context.Context) float64
- func (s *IngredientSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *IngredientSelect) Float64sX(ctx context.Context) []float64
- func (s *IngredientSelect) Int(ctx context.Context) (_ int, err error)
- func (s *IngredientSelect) IntX(ctx context.Context) int
- func (s *IngredientSelect) Ints(ctx context.Context) ([]int, error)
- func (s *IngredientSelect) IntsX(ctx context.Context) []int
- func (is *IngredientSelect) Scan(ctx context.Context, v any) error
- func (s *IngredientSelect) ScanX(ctx context.Context, v any)
- func (s *IngredientSelect) String(ctx context.Context) (_ string, err error)
- func (s *IngredientSelect) StringX(ctx context.Context) string
- func (s *IngredientSelect) Strings(ctx context.Context) ([]string, error)
- func (s *IngredientSelect) StringsX(ctx context.Context) []string
- type IngredientUpdate
- func (iu *IngredientUpdate) ClearProduct() *IngredientUpdate
- func (iu *IngredientUpdate) ClearQuantity() *IngredientUpdate
- func (iu *IngredientUpdate) ClearRecipe() *IngredientUpdate
- func (iu *IngredientUpdate) ClearUnit() *IngredientUpdate
- func (iu *IngredientUpdate) Exec(ctx context.Context) error
- func (iu *IngredientUpdate) ExecX(ctx context.Context)
- func (iu *IngredientUpdate) Mutation() *IngredientMutation
- func (iu *IngredientUpdate) Save(ctx context.Context) (int, error)
- func (iu *IngredientUpdate) SaveX(ctx context.Context) int
- func (iu *IngredientUpdate) SetNillableOptional(b *bool) *IngredientUpdate
- func (iu *IngredientUpdate) SetNillableProductID(u *uuid.UUID) *IngredientUpdate
- func (iu *IngredientUpdate) SetNillableQuantity(s *string) *IngredientUpdate
- func (iu *IngredientUpdate) SetNillableRecipeID(u *uuid.UUID) *IngredientUpdate
- func (iu *IngredientUpdate) SetNillableUnit(s *string) *IngredientUpdate
- func (iu *IngredientUpdate) SetOptional(b bool) *IngredientUpdate
- func (iu *IngredientUpdate) SetProduct(p *Product) *IngredientUpdate
- func (iu *IngredientUpdate) SetProductID(u uuid.UUID) *IngredientUpdate
- func (iu *IngredientUpdate) SetQuantity(s string) *IngredientUpdate
- func (iu *IngredientUpdate) SetRecipe(r *Recipe) *IngredientUpdate
- func (iu *IngredientUpdate) SetRecipeID(u uuid.UUID) *IngredientUpdate
- func (iu *IngredientUpdate) SetUnit(s string) *IngredientUpdate
- func (iu *IngredientUpdate) SetUpdateTime(t time.Time) *IngredientUpdate
- func (iu *IngredientUpdate) Where(ps ...predicate.Ingredient) *IngredientUpdate
- type IngredientUpdateOne
- func (iuo *IngredientUpdateOne) ClearProduct() *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) ClearQuantity() *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) ClearRecipe() *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) ClearUnit() *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) Exec(ctx context.Context) error
- func (iuo *IngredientUpdateOne) ExecX(ctx context.Context)
- func (iuo *IngredientUpdateOne) Mutation() *IngredientMutation
- func (iuo *IngredientUpdateOne) Save(ctx context.Context) (*Ingredient, error)
- func (iuo *IngredientUpdateOne) SaveX(ctx context.Context) *Ingredient
- func (iuo *IngredientUpdateOne) Select(field string, fields ...string) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetNillableOptional(b *bool) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetNillableProductID(u *uuid.UUID) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetNillableQuantity(s *string) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetNillableRecipeID(u *uuid.UUID) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetNillableUnit(s *string) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetOptional(b bool) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetProduct(p *Product) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetProductID(u uuid.UUID) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetQuantity(s string) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetRecipe(r *Recipe) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetRecipeID(u uuid.UUID) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetUnit(s string) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) SetUpdateTime(t time.Time) *IngredientUpdateOne
- func (iuo *IngredientUpdateOne) Where(ps ...predicate.Ingredient) *IngredientUpdateOne
- type Ingredients
- type Instruction
- type InstructionClient
- func (c *InstructionClient) Create() *InstructionCreate
- func (c *InstructionClient) CreateBulk(builders ...*InstructionCreate) *InstructionCreateBulk
- func (c *InstructionClient) Delete() *InstructionDelete
- func (c *InstructionClient) DeleteOne(i *Instruction) *InstructionDeleteOne
- func (c *InstructionClient) DeleteOneID(id uuid.UUID) *InstructionDeleteOne
- func (c *InstructionClient) Get(ctx context.Context, id uuid.UUID) (*Instruction, error)
- func (c *InstructionClient) GetX(ctx context.Context, id uuid.UUID) *Instruction
- func (c *InstructionClient) Hooks() []Hook
- func (c *InstructionClient) Intercept(interceptors ...Interceptor)
- func (c *InstructionClient) Interceptors() []Interceptor
- func (c *InstructionClient) MapCreateBulk(slice any, setFunc func(*InstructionCreate, int)) *InstructionCreateBulk
- func (c *InstructionClient) Query() *InstructionQuery
- func (c *InstructionClient) QueryRecipe(i *Instruction) *RecipeQuery
- func (c *InstructionClient) Update() *InstructionUpdate
- func (c *InstructionClient) UpdateOne(i *Instruction) *InstructionUpdateOne
- func (c *InstructionClient) UpdateOneID(id uuid.UUID) *InstructionUpdateOne
- func (c *InstructionClient) Use(hooks ...Hook)
- type InstructionCreate
- func (ic *InstructionCreate) Exec(ctx context.Context) error
- func (ic *InstructionCreate) ExecX(ctx context.Context)
- func (ic *InstructionCreate) Mutation() *InstructionMutation
- func (ic *InstructionCreate) Save(ctx context.Context) (*Instruction, error)
- func (ic *InstructionCreate) SaveX(ctx context.Context) *Instruction
- func (ic *InstructionCreate) SetID(u uuid.UUID) *InstructionCreate
- func (ic *InstructionCreate) SetNillableID(u *uuid.UUID) *InstructionCreate
- func (ic *InstructionCreate) SetNillableRecipeID(id *uuid.UUID) *InstructionCreate
- func (ic *InstructionCreate) SetOrder(i int) *InstructionCreate
- func (ic *InstructionCreate) SetRecipe(r *Recipe) *InstructionCreate
- func (ic *InstructionCreate) SetRecipeID(id uuid.UUID) *InstructionCreate
- func (ic *InstructionCreate) SetText(s string) *InstructionCreate
- type InstructionCreateBulk
- type InstructionDelete
- type InstructionDeleteOne
- type InstructionEdges
- type InstructionGroupBy
- func (igb *InstructionGroupBy) Aggregate(fns ...AggregateFunc) *InstructionGroupBy
- func (s *InstructionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InstructionGroupBy) BoolX(ctx context.Context) bool
- func (s *InstructionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InstructionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InstructionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InstructionGroupBy) Float64X(ctx context.Context) float64
- func (s *InstructionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InstructionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InstructionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InstructionGroupBy) IntX(ctx context.Context) int
- func (s *InstructionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InstructionGroupBy) IntsX(ctx context.Context) []int
- func (igb *InstructionGroupBy) Scan(ctx context.Context, v any) error
- func (s *InstructionGroupBy) ScanX(ctx context.Context, v any)
- func (s *InstructionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InstructionGroupBy) StringX(ctx context.Context) string
- func (s *InstructionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InstructionGroupBy) StringsX(ctx context.Context) []string
- type InstructionMutation
- func (m *InstructionMutation) AddField(name string, value ent.Value) error
- func (m *InstructionMutation) AddOrder(i int)
- func (m *InstructionMutation) AddedEdges() []string
- func (m *InstructionMutation) AddedField(name string) (ent.Value, bool)
- func (m *InstructionMutation) AddedFields() []string
- func (m *InstructionMutation) AddedIDs(name string) []ent.Value
- func (m *InstructionMutation) AddedOrder() (r int, exists bool)
- func (m *InstructionMutation) ClearEdge(name string) error
- func (m *InstructionMutation) ClearField(name string) error
- func (m *InstructionMutation) ClearRecipe()
- func (m *InstructionMutation) ClearedEdges() []string
- func (m *InstructionMutation) ClearedFields() []string
- func (m InstructionMutation) Client() *Client
- func (m *InstructionMutation) EdgeCleared(name string) bool
- func (m *InstructionMutation) Field(name string) (ent.Value, bool)
- func (m *InstructionMutation) FieldCleared(name string) bool
- func (m *InstructionMutation) Fields() []string
- func (m *InstructionMutation) ID() (id uuid.UUID, exists bool)
- func (m *InstructionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InstructionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InstructionMutation) OldOrder(ctx context.Context) (v int, err error)
- func (m *InstructionMutation) OldText(ctx context.Context) (v string, err error)
- func (m *InstructionMutation) Op() Op
- func (m *InstructionMutation) Order() (r int, exists bool)
- func (m *InstructionMutation) RecipeCleared() bool
- func (m *InstructionMutation) RecipeID() (id uuid.UUID, exists bool)
- func (m *InstructionMutation) RecipeIDs() (ids []uuid.UUID)
- func (m *InstructionMutation) RemovedEdges() []string
- func (m *InstructionMutation) RemovedIDs(name string) []ent.Value
- func (m *InstructionMutation) ResetEdge(name string) error
- func (m *InstructionMutation) ResetField(name string) error
- func (m *InstructionMutation) ResetOrder()
- func (m *InstructionMutation) ResetRecipe()
- func (m *InstructionMutation) ResetText()
- func (m *InstructionMutation) SetField(name string, value ent.Value) error
- func (m *InstructionMutation) SetID(id uuid.UUID)
- func (m *InstructionMutation) SetOp(op Op)
- func (m *InstructionMutation) SetOrder(i int)
- func (m *InstructionMutation) SetRecipeID(id uuid.UUID)
- func (m *InstructionMutation) SetText(s string)
- func (m *InstructionMutation) Text() (r string, exists bool)
- func (m InstructionMutation) Tx() (*Tx, error)
- func (m *InstructionMutation) Type() string
- func (m *InstructionMutation) Where(ps ...predicate.Instruction)
- func (m *InstructionMutation) WhereP(ps ...func(*sql.Selector))
- type InstructionQuery
- func (iq *InstructionQuery) Aggregate(fns ...AggregateFunc) *InstructionSelect
- func (iq *InstructionQuery) All(ctx context.Context) ([]*Instruction, error)
- func (iq *InstructionQuery) AllX(ctx context.Context) []*Instruction
- func (iq *InstructionQuery) Clone() *InstructionQuery
- func (iq *InstructionQuery) Count(ctx context.Context) (int, error)
- func (iq *InstructionQuery) CountX(ctx context.Context) int
- func (iq *InstructionQuery) Exist(ctx context.Context) (bool, error)
- func (iq *InstructionQuery) ExistX(ctx context.Context) bool
- func (iq *InstructionQuery) First(ctx context.Context) (*Instruction, error)
- func (iq *InstructionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InstructionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *InstructionQuery) FirstX(ctx context.Context) *Instruction
- func (iq *InstructionQuery) GroupBy(field string, fields ...string) *InstructionGroupBy
- func (iq *InstructionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iq *InstructionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *InstructionQuery) Limit(limit int) *InstructionQuery
- func (iq *InstructionQuery) Offset(offset int) *InstructionQuery
- func (iq *InstructionQuery) Only(ctx context.Context) (*Instruction, error)
- func (iq *InstructionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InstructionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *InstructionQuery) OnlyX(ctx context.Context) *Instruction
- func (iq *InstructionQuery) Order(o ...instruction.OrderOption) *InstructionQuery
- func (iq *InstructionQuery) QueryRecipe() *RecipeQuery
- func (iq *InstructionQuery) Select(fields ...string) *InstructionSelect
- func (iq *InstructionQuery) Unique(unique bool) *InstructionQuery
- func (iq *InstructionQuery) Where(ps ...predicate.Instruction) *InstructionQuery
- func (iq *InstructionQuery) WithRecipe(opts ...func(*RecipeQuery)) *InstructionQuery
- type InstructionSelect
- func (is *InstructionSelect) Aggregate(fns ...AggregateFunc) *InstructionSelect
- func (s *InstructionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InstructionSelect) BoolX(ctx context.Context) bool
- func (s *InstructionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InstructionSelect) BoolsX(ctx context.Context) []bool
- func (s *InstructionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InstructionSelect) Float64X(ctx context.Context) float64
- func (s *InstructionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InstructionSelect) Float64sX(ctx context.Context) []float64
- func (s *InstructionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InstructionSelect) IntX(ctx context.Context) int
- func (s *InstructionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InstructionSelect) IntsX(ctx context.Context) []int
- func (is *InstructionSelect) Scan(ctx context.Context, v any) error
- func (s *InstructionSelect) ScanX(ctx context.Context, v any)
- func (s *InstructionSelect) String(ctx context.Context) (_ string, err error)
- func (s *InstructionSelect) StringX(ctx context.Context) string
- func (s *InstructionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InstructionSelect) StringsX(ctx context.Context) []string
- type InstructionUpdate
- func (iu *InstructionUpdate) AddOrder(i int) *InstructionUpdate
- func (iu *InstructionUpdate) ClearRecipe() *InstructionUpdate
- func (iu *InstructionUpdate) Exec(ctx context.Context) error
- func (iu *InstructionUpdate) ExecX(ctx context.Context)
- func (iu *InstructionUpdate) Mutation() *InstructionMutation
- func (iu *InstructionUpdate) Save(ctx context.Context) (int, error)
- func (iu *InstructionUpdate) SaveX(ctx context.Context) int
- func (iu *InstructionUpdate) SetNillableOrder(i *int) *InstructionUpdate
- func (iu *InstructionUpdate) SetNillableRecipeID(id *uuid.UUID) *InstructionUpdate
- func (iu *InstructionUpdate) SetNillableText(s *string) *InstructionUpdate
- func (iu *InstructionUpdate) SetOrder(i int) *InstructionUpdate
- func (iu *InstructionUpdate) SetRecipe(r *Recipe) *InstructionUpdate
- func (iu *InstructionUpdate) SetRecipeID(id uuid.UUID) *InstructionUpdate
- func (iu *InstructionUpdate) SetText(s string) *InstructionUpdate
- func (iu *InstructionUpdate) Where(ps ...predicate.Instruction) *InstructionUpdate
- type InstructionUpdateOne
- func (iuo *InstructionUpdateOne) AddOrder(i int) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) ClearRecipe() *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) Exec(ctx context.Context) error
- func (iuo *InstructionUpdateOne) ExecX(ctx context.Context)
- func (iuo *InstructionUpdateOne) Mutation() *InstructionMutation
- func (iuo *InstructionUpdateOne) Save(ctx context.Context) (*Instruction, error)
- func (iuo *InstructionUpdateOne) SaveX(ctx context.Context) *Instruction
- func (iuo *InstructionUpdateOne) Select(field string, fields ...string) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) SetNillableOrder(i *int) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) SetNillableRecipeID(id *uuid.UUID) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) SetNillableText(s *string) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) SetOrder(i int) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) SetRecipe(r *Recipe) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) SetRecipeID(id uuid.UUID) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) SetText(s string) *InstructionUpdateOne
- func (iuo *InstructionUpdateOne) Where(ps ...predicate.Instruction) *InstructionUpdateOne
- type Instructions
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Nutrition
- type NutritionClient
- func (c *NutritionClient) Create() *NutritionCreate
- func (c *NutritionClient) CreateBulk(builders ...*NutritionCreate) *NutritionCreateBulk
- func (c *NutritionClient) Delete() *NutritionDelete
- func (c *NutritionClient) DeleteOne(n *Nutrition) *NutritionDeleteOne
- func (c *NutritionClient) DeleteOneID(id int) *NutritionDeleteOne
- func (c *NutritionClient) Get(ctx context.Context, id int) (*Nutrition, error)
- func (c *NutritionClient) GetX(ctx context.Context, id int) *Nutrition
- func (c *NutritionClient) Hooks() []Hook
- func (c *NutritionClient) Intercept(interceptors ...Interceptor)
- func (c *NutritionClient) Interceptors() []Interceptor
- func (c *NutritionClient) MapCreateBulk(slice any, setFunc func(*NutritionCreate, int)) *NutritionCreateBulk
- func (c *NutritionClient) Query() *NutritionQuery
- func (c *NutritionClient) QueryRecipe(n *Nutrition) *RecipeQuery
- func (c *NutritionClient) Update() *NutritionUpdate
- func (c *NutritionClient) UpdateOne(n *Nutrition) *NutritionUpdateOne
- func (c *NutritionClient) UpdateOneID(id int) *NutritionUpdateOne
- func (c *NutritionClient) Use(hooks ...Hook)
- type NutritionCreate
- func (nc *NutritionCreate) Exec(ctx context.Context) error
- func (nc *NutritionCreate) ExecX(ctx context.Context)
- func (nc *NutritionCreate) Mutation() *NutritionMutation
- func (nc *NutritionCreate) Save(ctx context.Context) (*Nutrition, error)
- func (nc *NutritionCreate) SaveX(ctx context.Context) *Nutrition
- func (nc *NutritionCreate) SetBenefits(s []string) *NutritionCreate
- func (nc *NutritionCreate) SetCalories(i int) *NutritionCreate
- func (nc *NutritionCreate) SetCarbs(i int) *NutritionCreate
- func (nc *NutritionCreate) SetFat(i int) *NutritionCreate
- func (nc *NutritionCreate) SetNillableCalories(i *int) *NutritionCreate
- func (nc *NutritionCreate) SetNillableCarbs(i *int) *NutritionCreate
- func (nc *NutritionCreate) SetNillableFat(i *int) *NutritionCreate
- func (nc *NutritionCreate) SetNillablePrecision(s *string) *NutritionCreate
- func (nc *NutritionCreate) SetNillableProtein(i *int) *NutritionCreate
- func (nc *NutritionCreate) SetNillableRecipeID(id *uuid.UUID) *NutritionCreate
- func (nc *NutritionCreate) SetPrecision(s string) *NutritionCreate
- func (nc *NutritionCreate) SetProtein(i int) *NutritionCreate
- func (nc *NutritionCreate) SetRecipe(r *Recipe) *NutritionCreate
- func (nc *NutritionCreate) SetRecipeID(id uuid.UUID) *NutritionCreate
- type NutritionCreateBulk
- type NutritionDelete
- type NutritionDeleteOne
- type NutritionEdges
- type NutritionGroupBy
- func (ngb *NutritionGroupBy) Aggregate(fns ...AggregateFunc) *NutritionGroupBy
- func (s *NutritionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NutritionGroupBy) BoolX(ctx context.Context) bool
- func (s *NutritionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NutritionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NutritionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NutritionGroupBy) Float64X(ctx context.Context) float64
- func (s *NutritionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NutritionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NutritionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NutritionGroupBy) IntX(ctx context.Context) int
- func (s *NutritionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NutritionGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NutritionGroupBy) Scan(ctx context.Context, v any) error
- func (s *NutritionGroupBy) ScanX(ctx context.Context, v any)
- func (s *NutritionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NutritionGroupBy) StringX(ctx context.Context) string
- func (s *NutritionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NutritionGroupBy) StringsX(ctx context.Context) []string
- type NutritionMutation
- func (m *NutritionMutation) AddCalories(i int)
- func (m *NutritionMutation) AddCarbs(i int)
- func (m *NutritionMutation) AddFat(i int)
- func (m *NutritionMutation) AddField(name string, value ent.Value) error
- func (m *NutritionMutation) AddProtein(i int)
- func (m *NutritionMutation) AddedCalories() (r int, exists bool)
- func (m *NutritionMutation) AddedCarbs() (r int, exists bool)
- func (m *NutritionMutation) AddedEdges() []string
- func (m *NutritionMutation) AddedFat() (r int, exists bool)
- func (m *NutritionMutation) AddedField(name string) (ent.Value, bool)
- func (m *NutritionMutation) AddedFields() []string
- func (m *NutritionMutation) AddedIDs(name string) []ent.Value
- func (m *NutritionMutation) AddedProtein() (r int, exists bool)
- func (m *NutritionMutation) AppendBenefits(s []string)
- func (m *NutritionMutation) AppendedBenefits() ([]string, bool)
- func (m *NutritionMutation) Benefits() (r []string, exists bool)
- func (m *NutritionMutation) BenefitsCleared() bool
- func (m *NutritionMutation) Calories() (r int, exists bool)
- func (m *NutritionMutation) CaloriesCleared() bool
- func (m *NutritionMutation) Carbs() (r int, exists bool)
- func (m *NutritionMutation) CarbsCleared() bool
- func (m *NutritionMutation) ClearBenefits()
- func (m *NutritionMutation) ClearCalories()
- func (m *NutritionMutation) ClearCarbs()
- func (m *NutritionMutation) ClearEdge(name string) error
- func (m *NutritionMutation) ClearFat()
- func (m *NutritionMutation) ClearField(name string) error
- func (m *NutritionMutation) ClearPrecision()
- func (m *NutritionMutation) ClearProtein()
- func (m *NutritionMutation) ClearRecipe()
- func (m *NutritionMutation) ClearedEdges() []string
- func (m *NutritionMutation) ClearedFields() []string
- func (m NutritionMutation) Client() *Client
- func (m *NutritionMutation) EdgeCleared(name string) bool
- func (m *NutritionMutation) Fat() (r int, exists bool)
- func (m *NutritionMutation) FatCleared() bool
- func (m *NutritionMutation) Field(name string) (ent.Value, bool)
- func (m *NutritionMutation) FieldCleared(name string) bool
- func (m *NutritionMutation) Fields() []string
- func (m *NutritionMutation) ID() (id int, exists bool)
- func (m *NutritionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NutritionMutation) OldBenefits(ctx context.Context) (v []string, err error)
- func (m *NutritionMutation) OldCalories(ctx context.Context) (v int, err error)
- func (m *NutritionMutation) OldCarbs(ctx context.Context) (v int, err error)
- func (m *NutritionMutation) OldFat(ctx context.Context) (v int, err error)
- func (m *NutritionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NutritionMutation) OldPrecision(ctx context.Context) (v string, err error)
- func (m *NutritionMutation) OldProtein(ctx context.Context) (v int, err error)
- func (m *NutritionMutation) Op() Op
- func (m *NutritionMutation) Precision() (r string, exists bool)
- func (m *NutritionMutation) PrecisionCleared() bool
- func (m *NutritionMutation) Protein() (r int, exists bool)
- func (m *NutritionMutation) ProteinCleared() bool
- func (m *NutritionMutation) RecipeCleared() bool
- func (m *NutritionMutation) RecipeID() (id uuid.UUID, exists bool)
- func (m *NutritionMutation) RecipeIDs() (ids []uuid.UUID)
- func (m *NutritionMutation) RemovedEdges() []string
- func (m *NutritionMutation) RemovedIDs(name string) []ent.Value
- func (m *NutritionMutation) ResetBenefits()
- func (m *NutritionMutation) ResetCalories()
- func (m *NutritionMutation) ResetCarbs()
- func (m *NutritionMutation) ResetEdge(name string) error
- func (m *NutritionMutation) ResetFat()
- func (m *NutritionMutation) ResetField(name string) error
- func (m *NutritionMutation) ResetPrecision()
- func (m *NutritionMutation) ResetProtein()
- func (m *NutritionMutation) ResetRecipe()
- func (m *NutritionMutation) SetBenefits(s []string)
- func (m *NutritionMutation) SetCalories(i int)
- func (m *NutritionMutation) SetCarbs(i int)
- func (m *NutritionMutation) SetFat(i int)
- func (m *NutritionMutation) SetField(name string, value ent.Value) error
- func (m *NutritionMutation) SetOp(op Op)
- func (m *NutritionMutation) SetPrecision(s string)
- func (m *NutritionMutation) SetProtein(i int)
- func (m *NutritionMutation) SetRecipeID(id uuid.UUID)
- func (m NutritionMutation) Tx() (*Tx, error)
- func (m *NutritionMutation) Type() string
- func (m *NutritionMutation) Where(ps ...predicate.Nutrition)
- func (m *NutritionMutation) WhereP(ps ...func(*sql.Selector))
- type NutritionQuery
- func (nq *NutritionQuery) Aggregate(fns ...AggregateFunc) *NutritionSelect
- func (nq *NutritionQuery) All(ctx context.Context) ([]*Nutrition, error)
- func (nq *NutritionQuery) AllX(ctx context.Context) []*Nutrition
- func (nq *NutritionQuery) Clone() *NutritionQuery
- func (nq *NutritionQuery) Count(ctx context.Context) (int, error)
- func (nq *NutritionQuery) CountX(ctx context.Context) int
- func (nq *NutritionQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NutritionQuery) ExistX(ctx context.Context) bool
- func (nq *NutritionQuery) First(ctx context.Context) (*Nutrition, error)
- func (nq *NutritionQuery) FirstID(ctx context.Context) (id int, err error)
- func (nq *NutritionQuery) FirstIDX(ctx context.Context) int
- func (nq *NutritionQuery) FirstX(ctx context.Context) *Nutrition
- func (nq *NutritionQuery) GroupBy(field string, fields ...string) *NutritionGroupBy
- func (nq *NutritionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (nq *NutritionQuery) IDsX(ctx context.Context) []int
- func (nq *NutritionQuery) Limit(limit int) *NutritionQuery
- func (nq *NutritionQuery) Offset(offset int) *NutritionQuery
- func (nq *NutritionQuery) Only(ctx context.Context) (*Nutrition, error)
- func (nq *NutritionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nq *NutritionQuery) OnlyIDX(ctx context.Context) int
- func (nq *NutritionQuery) OnlyX(ctx context.Context) *Nutrition
- func (nq *NutritionQuery) Order(o ...nutrition.OrderOption) *NutritionQuery
- func (nq *NutritionQuery) QueryRecipe() *RecipeQuery
- func (nq *NutritionQuery) Select(fields ...string) *NutritionSelect
- func (nq *NutritionQuery) Unique(unique bool) *NutritionQuery
- func (nq *NutritionQuery) Where(ps ...predicate.Nutrition) *NutritionQuery
- func (nq *NutritionQuery) WithRecipe(opts ...func(*RecipeQuery)) *NutritionQuery
- type NutritionSelect
- func (ns *NutritionSelect) Aggregate(fns ...AggregateFunc) *NutritionSelect
- func (s *NutritionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NutritionSelect) BoolX(ctx context.Context) bool
- func (s *NutritionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NutritionSelect) BoolsX(ctx context.Context) []bool
- func (s *NutritionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NutritionSelect) Float64X(ctx context.Context) float64
- func (s *NutritionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NutritionSelect) Float64sX(ctx context.Context) []float64
- func (s *NutritionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NutritionSelect) IntX(ctx context.Context) int
- func (s *NutritionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NutritionSelect) IntsX(ctx context.Context) []int
- func (ns *NutritionSelect) Scan(ctx context.Context, v any) error
- func (s *NutritionSelect) ScanX(ctx context.Context, v any)
- func (s *NutritionSelect) String(ctx context.Context) (_ string, err error)
- func (s *NutritionSelect) StringX(ctx context.Context) string
- func (s *NutritionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NutritionSelect) StringsX(ctx context.Context) []string
- type NutritionUpdate
- func (nu *NutritionUpdate) AddCalories(i int) *NutritionUpdate
- func (nu *NutritionUpdate) AddCarbs(i int) *NutritionUpdate
- func (nu *NutritionUpdate) AddFat(i int) *NutritionUpdate
- func (nu *NutritionUpdate) AddProtein(i int) *NutritionUpdate
- func (nu *NutritionUpdate) AppendBenefits(s []string) *NutritionUpdate
- func (nu *NutritionUpdate) ClearBenefits() *NutritionUpdate
- func (nu *NutritionUpdate) ClearCalories() *NutritionUpdate
- func (nu *NutritionUpdate) ClearCarbs() *NutritionUpdate
- func (nu *NutritionUpdate) ClearFat() *NutritionUpdate
- func (nu *NutritionUpdate) ClearPrecision() *NutritionUpdate
- func (nu *NutritionUpdate) ClearProtein() *NutritionUpdate
- func (nu *NutritionUpdate) ClearRecipe() *NutritionUpdate
- func (nu *NutritionUpdate) Exec(ctx context.Context) error
- func (nu *NutritionUpdate) ExecX(ctx context.Context)
- func (nu *NutritionUpdate) Mutation() *NutritionMutation
- func (nu *NutritionUpdate) Save(ctx context.Context) (int, error)
- func (nu *NutritionUpdate) SaveX(ctx context.Context) int
- func (nu *NutritionUpdate) SetBenefits(s []string) *NutritionUpdate
- func (nu *NutritionUpdate) SetCalories(i int) *NutritionUpdate
- func (nu *NutritionUpdate) SetCarbs(i int) *NutritionUpdate
- func (nu *NutritionUpdate) SetFat(i int) *NutritionUpdate
- func (nu *NutritionUpdate) SetNillableCalories(i *int) *NutritionUpdate
- func (nu *NutritionUpdate) SetNillableCarbs(i *int) *NutritionUpdate
- func (nu *NutritionUpdate) SetNillableFat(i *int) *NutritionUpdate
- func (nu *NutritionUpdate) SetNillablePrecision(s *string) *NutritionUpdate
- func (nu *NutritionUpdate) SetNillableProtein(i *int) *NutritionUpdate
- func (nu *NutritionUpdate) SetNillableRecipeID(id *uuid.UUID) *NutritionUpdate
- func (nu *NutritionUpdate) SetPrecision(s string) *NutritionUpdate
- func (nu *NutritionUpdate) SetProtein(i int) *NutritionUpdate
- func (nu *NutritionUpdate) SetRecipe(r *Recipe) *NutritionUpdate
- func (nu *NutritionUpdate) SetRecipeID(id uuid.UUID) *NutritionUpdate
- func (nu *NutritionUpdate) Where(ps ...predicate.Nutrition) *NutritionUpdate
- type NutritionUpdateOne
- func (nuo *NutritionUpdateOne) AddCalories(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) AddCarbs(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) AddFat(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) AddProtein(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) AppendBenefits(s []string) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) ClearBenefits() *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) ClearCalories() *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) ClearCarbs() *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) ClearFat() *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) ClearPrecision() *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) ClearProtein() *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) ClearRecipe() *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) Exec(ctx context.Context) error
- func (nuo *NutritionUpdateOne) ExecX(ctx context.Context)
- func (nuo *NutritionUpdateOne) Mutation() *NutritionMutation
- func (nuo *NutritionUpdateOne) Save(ctx context.Context) (*Nutrition, error)
- func (nuo *NutritionUpdateOne) SaveX(ctx context.Context) *Nutrition
- func (nuo *NutritionUpdateOne) Select(field string, fields ...string) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetBenefits(s []string) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetCalories(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetCarbs(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetFat(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetNillableCalories(i *int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetNillableCarbs(i *int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetNillableFat(i *int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetNillablePrecision(s *string) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetNillableProtein(i *int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetNillableRecipeID(id *uuid.UUID) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetPrecision(s string) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetProtein(i int) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetRecipe(r *Recipe) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) SetRecipeID(id uuid.UUID) *NutritionUpdateOne
- func (nuo *NutritionUpdateOne) Where(ps ...predicate.Nutrition) *NutritionUpdateOne
- type Nutritions
- type Op
- type Option
- type OrderFunc
- type Policy
- type Product
- type ProductClient
- func (c *ProductClient) Create() *ProductCreate
- func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk
- func (c *ProductClient) Delete() *ProductDelete
- func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne
- func (c *ProductClient) DeleteOneID(id uuid.UUID) *ProductDeleteOne
- func (c *ProductClient) Get(ctx context.Context, id uuid.UUID) (*Product, error)
- func (c *ProductClient) GetX(ctx context.Context, id uuid.UUID) *Product
- func (c *ProductClient) Hooks() []Hook
- func (c *ProductClient) Intercept(interceptors ...Interceptor)
- func (c *ProductClient) Interceptors() []Interceptor
- func (c *ProductClient) MapCreateBulk(slice any, setFunc func(*ProductCreate, int)) *ProductCreateBulk
- func (c *ProductClient) Query() *ProductQuery
- func (c *ProductClient) QueryIngredients(pr *Product) *IngredientQuery
- func (c *ProductClient) QueryRequiredInRecipes(pr *Product) *RecipeQuery
- func (c *ProductClient) Update() *ProductUpdate
- func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne
- func (c *ProductClient) UpdateOneID(id uuid.UUID) *ProductUpdateOne
- func (c *ProductClient) Use(hooks ...Hook)
- type ProductCreate
- func (pc *ProductCreate) AddIngredientIDs(ids ...uuid.UUID) *ProductCreate
- func (pc *ProductCreate) AddIngredients(i ...*Ingredient) *ProductCreate
- func (pc *ProductCreate) AddRequiredInRecipeIDs(ids ...uuid.UUID) *ProductCreate
- func (pc *ProductCreate) AddRequiredInRecipes(r ...*Recipe) *ProductCreate
- func (pc *ProductCreate) Exec(ctx context.Context) error
- func (pc *ProductCreate) ExecX(ctx context.Context)
- func (pc *ProductCreate) Mutation() *ProductMutation
- func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)
- func (pc *ProductCreate) SaveX(ctx context.Context) *Product
- func (pc *ProductCreate) SetCreateTime(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetID(u uuid.UUID) *ProductCreate
- func (pc *ProductCreate) SetLocale(pr product.Locale) *ProductCreate
- func (pc *ProductCreate) SetName(s string) *ProductCreate
- func (pc *ProductCreate) SetNillableCreateTime(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableID(u *uuid.UUID) *ProductCreate
- func (pc *ProductCreate) SetNillableLocale(pr *product.Locale) *ProductCreate
- func (pc *ProductCreate) SetNillableUpdateTime(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetSlug(s string) *ProductCreate
- func (pc *ProductCreate) SetUpdateTime(t time.Time) *ProductCreate
- type ProductCreateBulk
- type ProductDelete
- type ProductDeleteOne
- type ProductEdges
- type ProductGroupBy
- func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy
- func (s *ProductGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductGroupBy) IntX(ctx context.Context) int
- func (s *ProductGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProductGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductGroupBy) StringX(ctx context.Context) string
- func (s *ProductGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductGroupBy) StringsX(ctx context.Context) []string
- type ProductMutation
- func (m *ProductMutation) AddField(name string, value ent.Value) error
- func (m *ProductMutation) AddIngredientIDs(ids ...uuid.UUID)
- func (m *ProductMutation) AddRequiredInRecipeIDs(ids ...uuid.UUID)
- func (m *ProductMutation) AddedEdges() []string
- func (m *ProductMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductMutation) AddedFields() []string
- func (m *ProductMutation) AddedIDs(name string) []ent.Value
- func (m *ProductMutation) ClearEdge(name string) error
- func (m *ProductMutation) ClearField(name string) error
- func (m *ProductMutation) ClearIngredients()
- func (m *ProductMutation) ClearRequiredInRecipes()
- func (m *ProductMutation) ClearedEdges() []string
- func (m *ProductMutation) ClearedFields() []string
- func (m ProductMutation) Client() *Client
- func (m *ProductMutation) CreateTime() (r time.Time, exists bool)
- func (m *ProductMutation) EdgeCleared(name string) bool
- func (m *ProductMutation) Field(name string) (ent.Value, bool)
- func (m *ProductMutation) FieldCleared(name string) bool
- func (m *ProductMutation) Fields() []string
- func (m *ProductMutation) ID() (id uuid.UUID, exists bool)
- func (m *ProductMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ProductMutation) IngredientsCleared() bool
- func (m *ProductMutation) IngredientsIDs() (ids []uuid.UUID)
- func (m *ProductMutation) Locale() (r product.Locale, exists bool)
- func (m *ProductMutation) Name() (r string, exists bool)
- func (m *ProductMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductMutation) OldLocale(ctx context.Context) (v product.Locale, err error)
- func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) Op() Op
- func (m *ProductMutation) RemoveIngredientIDs(ids ...uuid.UUID)
- func (m *ProductMutation) RemoveRequiredInRecipeIDs(ids ...uuid.UUID)
- func (m *ProductMutation) RemovedEdges() []string
- func (m *ProductMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductMutation) RemovedIngredientsIDs() (ids []uuid.UUID)
- func (m *ProductMutation) RemovedRequiredInRecipesIDs() (ids []uuid.UUID)
- func (m *ProductMutation) RequiredInRecipesCleared() bool
- func (m *ProductMutation) RequiredInRecipesIDs() (ids []uuid.UUID)
- func (m *ProductMutation) ResetCreateTime()
- func (m *ProductMutation) ResetEdge(name string) error
- func (m *ProductMutation) ResetField(name string) error
- func (m *ProductMutation) ResetIngredients()
- func (m *ProductMutation) ResetLocale()
- func (m *ProductMutation) ResetName()
- func (m *ProductMutation) ResetRequiredInRecipes()
- func (m *ProductMutation) ResetSlug()
- func (m *ProductMutation) ResetUpdateTime()
- func (m *ProductMutation) SetCreateTime(t time.Time)
- func (m *ProductMutation) SetField(name string, value ent.Value) error
- func (m *ProductMutation) SetID(id uuid.UUID)
- func (m *ProductMutation) SetLocale(pr product.Locale)
- func (m *ProductMutation) SetName(s string)
- func (m *ProductMutation) SetOp(op Op)
- func (m *ProductMutation) SetSlug(s string)
- func (m *ProductMutation) SetUpdateTime(t time.Time)
- func (m *ProductMutation) Slug() (r string, exists bool)
- func (m ProductMutation) Tx() (*Tx, error)
- func (m *ProductMutation) Type() string
- func (m *ProductMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ProductMutation) Where(ps ...predicate.Product)
- func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))
- type ProductQuery
- func (pq *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect
- func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)
- func (pq *ProductQuery) AllX(ctx context.Context) []*Product
- func (pq *ProductQuery) Clone() *ProductQuery
- func (pq *ProductQuery) Count(ctx context.Context) (int, error)
- func (pq *ProductQuery) CountX(ctx context.Context) int
- func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProductQuery) ExistX(ctx context.Context) bool
- func (pq *ProductQuery) First(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProductQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *ProductQuery) FirstX(ctx context.Context) *Product
- func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy
- func (pq *ProductQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pq *ProductQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *ProductQuery) Limit(limit int) *ProductQuery
- func (pq *ProductQuery) Offset(offset int) *ProductQuery
- func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProductQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *ProductQuery) OnlyX(ctx context.Context) *Product
- func (pq *ProductQuery) Order(o ...product.OrderOption) *ProductQuery
- func (pq *ProductQuery) QueryIngredients() *IngredientQuery
- func (pq *ProductQuery) QueryRequiredInRecipes() *RecipeQuery
- func (pq *ProductQuery) Select(fields ...string) *ProductSelect
- func (pq *ProductQuery) Unique(unique bool) *ProductQuery
- func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery
- func (pq *ProductQuery) WithIngredients(opts ...func(*IngredientQuery)) *ProductQuery
- func (pq *ProductQuery) WithRequiredInRecipes(opts ...func(*RecipeQuery)) *ProductQuery
- type ProductSelect
- func (ps *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect
- func (s *ProductSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductSelect) BoolX(ctx context.Context) bool
- func (s *ProductSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductSelect) Float64X(ctx context.Context) float64
- func (s *ProductSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductSelect) IntX(ctx context.Context) int
- func (s *ProductSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductSelect) IntsX(ctx context.Context) []int
- func (ps *ProductSelect) Scan(ctx context.Context, v any) error
- func (s *ProductSelect) ScanX(ctx context.Context, v any)
- func (s *ProductSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductSelect) StringX(ctx context.Context) string
- func (s *ProductSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductSelect) StringsX(ctx context.Context) []string
- type ProductUpdate
- func (pu *ProductUpdate) AddIngredientIDs(ids ...uuid.UUID) *ProductUpdate
- func (pu *ProductUpdate) AddIngredients(i ...*Ingredient) *ProductUpdate
- func (pu *ProductUpdate) AddRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdate
- func (pu *ProductUpdate) AddRequiredInRecipes(r ...*Recipe) *ProductUpdate
- func (pu *ProductUpdate) ClearIngredients() *ProductUpdate
- func (pu *ProductUpdate) ClearRequiredInRecipes() *ProductUpdate
- func (pu *ProductUpdate) Exec(ctx context.Context) error
- func (pu *ProductUpdate) ExecX(ctx context.Context)
- func (pu *ProductUpdate) Mutation() *ProductMutation
- func (pu *ProductUpdate) RemoveIngredientIDs(ids ...uuid.UUID) *ProductUpdate
- func (pu *ProductUpdate) RemoveIngredients(i ...*Ingredient) *ProductUpdate
- func (pu *ProductUpdate) RemoveRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdate
- func (pu *ProductUpdate) RemoveRequiredInRecipes(r ...*Recipe) *ProductUpdate
- func (pu *ProductUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProductUpdate) SaveX(ctx context.Context) int
- func (pu *ProductUpdate) SetName(s string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableName(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableSlug(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetSlug(s string) *ProductUpdate
- func (pu *ProductUpdate) SetUpdateTime(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate
- type ProductUpdateOne
- func (puo *ProductUpdateOne) AddIngredientIDs(ids ...uuid.UUID) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddIngredients(i ...*Ingredient) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddRequiredInRecipes(r ...*Recipe) *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearIngredients() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearRequiredInRecipes() *ProductUpdateOne
- func (puo *ProductUpdateOne) Exec(ctx context.Context) error
- func (puo *ProductUpdateOne) ExecX(ctx context.Context)
- func (puo *ProductUpdateOne) Mutation() *ProductMutation
- func (puo *ProductUpdateOne) RemoveIngredientIDs(ids ...uuid.UUID) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveIngredients(i ...*Ingredient) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveRequiredInRecipes(r ...*Recipe) *ProductUpdateOne
- func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)
- func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product
- func (puo *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableName(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableSlug(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetSlug(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetUpdateTime(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
- type Products
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Recipe
- func (r *Recipe) QueryEquipment() *EquipmentQuery
- func (r *Recipe) QueryIdeas() *IdeaQuery
- func (r *Recipe) QueryIngredients() *IngredientQuery
- func (r *Recipe) QueryInstructions() *InstructionQuery
- func (r *Recipe) QueryNutrition() *NutritionQuery
- func (r *Recipe) QueryRequiredProducts() *ProductQuery
- func (r *Recipe) QuerySources() *SourceQuery
- func (r *Recipe) QueryTags() *TagQuery
- func (r *Recipe) String() string
- func (r *Recipe) Unwrap() *Recipe
- func (r *Recipe) Update() *RecipeUpdateOne
- func (r *Recipe) Value(name string) (ent.Value, error)
- type RecipeClient
- func (c *RecipeClient) Create() *RecipeCreate
- func (c *RecipeClient) CreateBulk(builders ...*RecipeCreate) *RecipeCreateBulk
- func (c *RecipeClient) Delete() *RecipeDelete
- func (c *RecipeClient) DeleteOne(r *Recipe) *RecipeDeleteOne
- func (c *RecipeClient) DeleteOneID(id uuid.UUID) *RecipeDeleteOne
- func (c *RecipeClient) Get(ctx context.Context, id uuid.UUID) (*Recipe, error)
- func (c *RecipeClient) GetX(ctx context.Context, id uuid.UUID) *Recipe
- func (c *RecipeClient) Hooks() []Hook
- func (c *RecipeClient) Intercept(interceptors ...Interceptor)
- func (c *RecipeClient) Interceptors() []Interceptor
- func (c *RecipeClient) MapCreateBulk(slice any, setFunc func(*RecipeCreate, int)) *RecipeCreateBulk
- func (c *RecipeClient) Query() *RecipeQuery
- func (c *RecipeClient) QueryEquipment(r *Recipe) *EquipmentQuery
- func (c *RecipeClient) QueryIdeas(r *Recipe) *IdeaQuery
- func (c *RecipeClient) QueryIngredients(r *Recipe) *IngredientQuery
- func (c *RecipeClient) QueryInstructions(r *Recipe) *InstructionQuery
- func (c *RecipeClient) QueryNutrition(r *Recipe) *NutritionQuery
- func (c *RecipeClient) QueryRequiredProducts(r *Recipe) *ProductQuery
- func (c *RecipeClient) QuerySources(r *Recipe) *SourceQuery
- func (c *RecipeClient) QueryTags(r *Recipe) *TagQuery
- func (c *RecipeClient) Update() *RecipeUpdate
- func (c *RecipeClient) UpdateOne(r *Recipe) *RecipeUpdateOne
- func (c *RecipeClient) UpdateOneID(id uuid.UUID) *RecipeUpdateOne
- func (c *RecipeClient) Use(hooks ...Hook)
- type RecipeCreate
- func (rc *RecipeCreate) AddEquipment(e ...*Equipment) *RecipeCreate
- func (rc *RecipeCreate) AddEquipmentIDs(ids ...uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) AddIdeaIDs(ids ...uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) AddIdeas(i ...*Idea) *RecipeCreate
- func (rc *RecipeCreate) AddIngredientIDs(ids ...uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) AddIngredients(i ...*Ingredient) *RecipeCreate
- func (rc *RecipeCreate) AddInstructionIDs(ids ...uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) AddInstructions(i ...*Instruction) *RecipeCreate
- func (rc *RecipeCreate) AddRequiredProductIDs(ids ...uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) AddRequiredProducts(p ...*Product) *RecipeCreate
- func (rc *RecipeCreate) AddSourceIDs(ids ...uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) AddSources(s ...*Source) *RecipeCreate
- func (rc *RecipeCreate) AddTagIDs(ids ...uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) AddTags(t ...*Tag) *RecipeCreate
- func (rc *RecipeCreate) Exec(ctx context.Context) error
- func (rc *RecipeCreate) ExecX(ctx context.Context)
- func (rc *RecipeCreate) Mutation() *RecipeMutation
- func (rc *RecipeCreate) Save(ctx context.Context) (*Recipe, error)
- func (rc *RecipeCreate) SaveX(ctx context.Context) *Recipe
- func (rc *RecipeCreate) SetCreateTime(t time.Time) *RecipeCreate
- func (rc *RecipeCreate) SetDescription(s string) *RecipeCreate
- func (rc *RecipeCreate) SetID(u uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) SetLocale(r recipe.Locale) *RecipeCreate
- func (rc *RecipeCreate) SetName(s string) *RecipeCreate
- func (rc *RecipeCreate) SetNillableCreateTime(t *time.Time) *RecipeCreate
- func (rc *RecipeCreate) SetNillableID(u *uuid.UUID) *RecipeCreate
- func (rc *RecipeCreate) SetNillableLocale(r *recipe.Locale) *RecipeCreate
- func (rc *RecipeCreate) SetNillableNutritionID(id *int) *RecipeCreate
- func (rc *RecipeCreate) SetNillablePublished(b *bool) *RecipeCreate
- func (rc *RecipeCreate) SetNillableRating(f *float32) *RecipeCreate
- func (rc *RecipeCreate) SetNillableServings(i *int) *RecipeCreate
- func (rc *RecipeCreate) SetNillableTime(t *time.Duration) *RecipeCreate
- func (rc *RecipeCreate) SetNillableUpdateTime(t *time.Time) *RecipeCreate
- func (rc *RecipeCreate) SetNutrition(n *Nutrition) *RecipeCreate
- func (rc *RecipeCreate) SetNutritionID(id int) *RecipeCreate
- func (rc *RecipeCreate) SetPublished(b bool) *RecipeCreate
- func (rc *RecipeCreate) SetRating(f float32) *RecipeCreate
- func (rc *RecipeCreate) SetServings(i int) *RecipeCreate
- func (rc *RecipeCreate) SetSlug(s string) *RecipeCreate
- func (rc *RecipeCreate) SetText(s string) *RecipeCreate
- func (rc *RecipeCreate) SetTime(t time.Duration) *RecipeCreate
- func (rc *RecipeCreate) SetUpdateTime(t time.Time) *RecipeCreate
- type RecipeCreateBulk
- type RecipeDelete
- type RecipeDeleteOne
- type RecipeEdges
- func (e RecipeEdges) EquipmentOrErr() ([]*Equipment, error)
- func (e RecipeEdges) IdeasOrErr() ([]*Idea, error)
- func (e RecipeEdges) IngredientsOrErr() ([]*Ingredient, error)
- func (e RecipeEdges) InstructionsOrErr() ([]*Instruction, error)
- func (e RecipeEdges) NutritionOrErr() (*Nutrition, error)
- func (e RecipeEdges) RequiredProductsOrErr() ([]*Product, error)
- func (e RecipeEdges) SourcesOrErr() ([]*Source, error)
- func (e RecipeEdges) TagsOrErr() ([]*Tag, error)
- type RecipeGroupBy
- func (rgb *RecipeGroupBy) Aggregate(fns ...AggregateFunc) *RecipeGroupBy
- func (s *RecipeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RecipeGroupBy) BoolX(ctx context.Context) bool
- func (s *RecipeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RecipeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RecipeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RecipeGroupBy) Float64X(ctx context.Context) float64
- func (s *RecipeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RecipeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RecipeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RecipeGroupBy) IntX(ctx context.Context) int
- func (s *RecipeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RecipeGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RecipeGroupBy) Scan(ctx context.Context, v any) error
- func (s *RecipeGroupBy) ScanX(ctx context.Context, v any)
- func (s *RecipeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RecipeGroupBy) StringX(ctx context.Context) string
- func (s *RecipeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RecipeGroupBy) StringsX(ctx context.Context) []string
- type RecipeMutation
- func (m *RecipeMutation) AddEquipmentIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) AddField(name string, value ent.Value) error
- func (m *RecipeMutation) AddIdeaIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) AddIngredientIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) AddInstructionIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) AddRating(f float32)
- func (m *RecipeMutation) AddRequiredProductIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) AddServings(i int)
- func (m *RecipeMutation) AddSourceIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) AddTagIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) AddTime(t time.Duration)
- func (m *RecipeMutation) AddedEdges() []string
- func (m *RecipeMutation) AddedField(name string) (ent.Value, bool)
- func (m *RecipeMutation) AddedFields() []string
- func (m *RecipeMutation) AddedIDs(name string) []ent.Value
- func (m *RecipeMutation) AddedRating() (r float32, exists bool)
- func (m *RecipeMutation) AddedServings() (r int, exists bool)
- func (m *RecipeMutation) AddedTime() (r time.Duration, exists bool)
- func (m *RecipeMutation) ClearEdge(name string) error
- func (m *RecipeMutation) ClearEquipment()
- func (m *RecipeMutation) ClearField(name string) error
- func (m *RecipeMutation) ClearIdeas()
- func (m *RecipeMutation) ClearIngredients()
- func (m *RecipeMutation) ClearInstructions()
- func (m *RecipeMutation) ClearNutrition()
- func (m *RecipeMutation) ClearRating()
- func (m *RecipeMutation) ClearRequiredProducts()
- func (m *RecipeMutation) ClearServings()
- func (m *RecipeMutation) ClearSources()
- func (m *RecipeMutation) ClearTags()
- func (m *RecipeMutation) ClearTime()
- func (m *RecipeMutation) ClearedEdges() []string
- func (m *RecipeMutation) ClearedFields() []string
- func (m RecipeMutation) Client() *Client
- func (m *RecipeMutation) CreateTime() (r time.Time, exists bool)
- func (m *RecipeMutation) Description() (r string, exists bool)
- func (m *RecipeMutation) EdgeCleared(name string) bool
- func (m *RecipeMutation) EquipmentCleared() bool
- func (m *RecipeMutation) EquipmentIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) Field(name string) (ent.Value, bool)
- func (m *RecipeMutation) FieldCleared(name string) bool
- func (m *RecipeMutation) Fields() []string
- func (m *RecipeMutation) ID() (id uuid.UUID, exists bool)
- func (m *RecipeMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *RecipeMutation) IdeasCleared() bool
- func (m *RecipeMutation) IdeasIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) IngredientsCleared() bool
- func (m *RecipeMutation) IngredientsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) InstructionsCleared() bool
- func (m *RecipeMutation) InstructionsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) Locale() (r recipe.Locale, exists bool)
- func (m *RecipeMutation) Name() (r string, exists bool)
- func (m *RecipeMutation) NutritionCleared() bool
- func (m *RecipeMutation) NutritionID() (id int, exists bool)
- func (m *RecipeMutation) NutritionIDs() (ids []int)
- func (m *RecipeMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *RecipeMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *RecipeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RecipeMutation) OldLocale(ctx context.Context) (v recipe.Locale, err error)
- func (m *RecipeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *RecipeMutation) OldPublished(ctx context.Context) (v bool, err error)
- func (m *RecipeMutation) OldRating(ctx context.Context) (v float32, err error)
- func (m *RecipeMutation) OldServings(ctx context.Context) (v *int, err error)
- func (m *RecipeMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *RecipeMutation) OldText(ctx context.Context) (v string, err error)
- func (m *RecipeMutation) OldTime(ctx context.Context) (v *time.Duration, err error)
- func (m *RecipeMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *RecipeMutation) Op() Op
- func (m *RecipeMutation) Published() (r bool, exists bool)
- func (m *RecipeMutation) Rating() (r float32, exists bool)
- func (m *RecipeMutation) RatingCleared() bool
- func (m *RecipeMutation) RemoveEquipmentIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) RemoveIdeaIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) RemoveIngredientIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) RemoveInstructionIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) RemoveRequiredProductIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) RemoveSourceIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) RemoveTagIDs(ids ...uuid.UUID)
- func (m *RecipeMutation) RemovedEdges() []string
- func (m *RecipeMutation) RemovedEquipmentIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) RemovedIDs(name string) []ent.Value
- func (m *RecipeMutation) RemovedIdeasIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) RemovedIngredientsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) RemovedInstructionsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) RemovedRequiredProductsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) RemovedSourcesIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) RemovedTagsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) RequiredProductsCleared() bool
- func (m *RecipeMutation) RequiredProductsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) ResetCreateTime()
- func (m *RecipeMutation) ResetDescription()
- func (m *RecipeMutation) ResetEdge(name string) error
- func (m *RecipeMutation) ResetEquipment()
- func (m *RecipeMutation) ResetField(name string) error
- func (m *RecipeMutation) ResetIdeas()
- func (m *RecipeMutation) ResetIngredients()
- func (m *RecipeMutation) ResetInstructions()
- func (m *RecipeMutation) ResetLocale()
- func (m *RecipeMutation) ResetName()
- func (m *RecipeMutation) ResetNutrition()
- func (m *RecipeMutation) ResetPublished()
- func (m *RecipeMutation) ResetRating()
- func (m *RecipeMutation) ResetRequiredProducts()
- func (m *RecipeMutation) ResetServings()
- func (m *RecipeMutation) ResetSlug()
- func (m *RecipeMutation) ResetSources()
- func (m *RecipeMutation) ResetTags()
- func (m *RecipeMutation) ResetText()
- func (m *RecipeMutation) ResetTime()
- func (m *RecipeMutation) ResetUpdateTime()
- func (m *RecipeMutation) Servings() (r int, exists bool)
- func (m *RecipeMutation) ServingsCleared() bool
- func (m *RecipeMutation) SetCreateTime(t time.Time)
- func (m *RecipeMutation) SetDescription(s string)
- func (m *RecipeMutation) SetField(name string, value ent.Value) error
- func (m *RecipeMutation) SetID(id uuid.UUID)
- func (m *RecipeMutation) SetLocale(r recipe.Locale)
- func (m *RecipeMutation) SetName(s string)
- func (m *RecipeMutation) SetNutritionID(id int)
- func (m *RecipeMutation) SetOp(op Op)
- func (m *RecipeMutation) SetPublished(b bool)
- func (m *RecipeMutation) SetRating(f float32)
- func (m *RecipeMutation) SetServings(i int)
- func (m *RecipeMutation) SetSlug(s string)
- func (m *RecipeMutation) SetText(s string)
- func (m *RecipeMutation) SetTime(t time.Duration)
- func (m *RecipeMutation) SetUpdateTime(t time.Time)
- func (m *RecipeMutation) Slug() (r string, exists bool)
- func (m *RecipeMutation) SourcesCleared() bool
- func (m *RecipeMutation) SourcesIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) TagsCleared() bool
- func (m *RecipeMutation) TagsIDs() (ids []uuid.UUID)
- func (m *RecipeMutation) Text() (r string, exists bool)
- func (m *RecipeMutation) Time() (r time.Duration, exists bool)
- func (m *RecipeMutation) TimeCleared() bool
- func (m RecipeMutation) Tx() (*Tx, error)
- func (m *RecipeMutation) Type() string
- func (m *RecipeMutation) UpdateTime() (r time.Time, exists bool)
- func (m *RecipeMutation) Where(ps ...predicate.Recipe)
- func (m *RecipeMutation) WhereP(ps ...func(*sql.Selector))
- type RecipeQuery
- func (rq *RecipeQuery) Aggregate(fns ...AggregateFunc) *RecipeSelect
- func (rq *RecipeQuery) All(ctx context.Context) ([]*Recipe, error)
- func (rq *RecipeQuery) AllX(ctx context.Context) []*Recipe
- func (rq *RecipeQuery) Clone() *RecipeQuery
- func (rq *RecipeQuery) Count(ctx context.Context) (int, error)
- func (rq *RecipeQuery) CountX(ctx context.Context) int
- func (rq *RecipeQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RecipeQuery) ExistX(ctx context.Context) bool
- func (rq *RecipeQuery) First(ctx context.Context) (*Recipe, error)
- func (rq *RecipeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RecipeQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *RecipeQuery) FirstX(ctx context.Context) *Recipe
- func (rq *RecipeQuery) GroupBy(field string, fields ...string) *RecipeGroupBy
- func (rq *RecipeQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (rq *RecipeQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *RecipeQuery) Limit(limit int) *RecipeQuery
- func (rq *RecipeQuery) Offset(offset int) *RecipeQuery
- func (rq *RecipeQuery) Only(ctx context.Context) (*Recipe, error)
- func (rq *RecipeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RecipeQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *RecipeQuery) OnlyX(ctx context.Context) *Recipe
- func (rq *RecipeQuery) Order(o ...recipe.OrderOption) *RecipeQuery
- func (rq *RecipeQuery) QueryEquipment() *EquipmentQuery
- func (rq *RecipeQuery) QueryIdeas() *IdeaQuery
- func (rq *RecipeQuery) QueryIngredients() *IngredientQuery
- func (rq *RecipeQuery) QueryInstructions() *InstructionQuery
- func (rq *RecipeQuery) QueryNutrition() *NutritionQuery
- func (rq *RecipeQuery) QueryRequiredProducts() *ProductQuery
- func (rq *RecipeQuery) QuerySources() *SourceQuery
- func (rq *RecipeQuery) QueryTags() *TagQuery
- func (rq *RecipeQuery) Select(fields ...string) *RecipeSelect
- func (rq *RecipeQuery) Unique(unique bool) *RecipeQuery
- func (rq *RecipeQuery) Where(ps ...predicate.Recipe) *RecipeQuery
- func (rq *RecipeQuery) WithEquipment(opts ...func(*EquipmentQuery)) *RecipeQuery
- func (rq *RecipeQuery) WithIdeas(opts ...func(*IdeaQuery)) *RecipeQuery
- func (rq *RecipeQuery) WithIngredients(opts ...func(*IngredientQuery)) *RecipeQuery
- func (rq *RecipeQuery) WithInstructions(opts ...func(*InstructionQuery)) *RecipeQuery
- func (rq *RecipeQuery) WithNutrition(opts ...func(*NutritionQuery)) *RecipeQuery
- func (rq *RecipeQuery) WithRequiredProducts(opts ...func(*ProductQuery)) *RecipeQuery
- func (rq *RecipeQuery) WithSources(opts ...func(*SourceQuery)) *RecipeQuery
- func (rq *RecipeQuery) WithTags(opts ...func(*TagQuery)) *RecipeQuery
- type RecipeSelect
- func (rs *RecipeSelect) Aggregate(fns ...AggregateFunc) *RecipeSelect
- func (s *RecipeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RecipeSelect) BoolX(ctx context.Context) bool
- func (s *RecipeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RecipeSelect) BoolsX(ctx context.Context) []bool
- func (s *RecipeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RecipeSelect) Float64X(ctx context.Context) float64
- func (s *RecipeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RecipeSelect) Float64sX(ctx context.Context) []float64
- func (s *RecipeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RecipeSelect) IntX(ctx context.Context) int
- func (s *RecipeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RecipeSelect) IntsX(ctx context.Context) []int
- func (rs *RecipeSelect) Scan(ctx context.Context, v any) error
- func (s *RecipeSelect) ScanX(ctx context.Context, v any)
- func (s *RecipeSelect) String(ctx context.Context) (_ string, err error)
- func (s *RecipeSelect) StringX(ctx context.Context) string
- func (s *RecipeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RecipeSelect) StringsX(ctx context.Context) []string
- type RecipeUpdate
- func (ru *RecipeUpdate) AddEquipment(e ...*Equipment) *RecipeUpdate
- func (ru *RecipeUpdate) AddEquipmentIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) AddIdeaIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) AddIdeas(i ...*Idea) *RecipeUpdate
- func (ru *RecipeUpdate) AddIngredientIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) AddIngredients(i ...*Ingredient) *RecipeUpdate
- func (ru *RecipeUpdate) AddInstructionIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) AddInstructions(i ...*Instruction) *RecipeUpdate
- func (ru *RecipeUpdate) AddRating(f float32) *RecipeUpdate
- func (ru *RecipeUpdate) AddRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) AddRequiredProducts(p ...*Product) *RecipeUpdate
- func (ru *RecipeUpdate) AddServings(i int) *RecipeUpdate
- func (ru *RecipeUpdate) AddSourceIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) AddSources(s ...*Source) *RecipeUpdate
- func (ru *RecipeUpdate) AddTagIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) AddTags(t ...*Tag) *RecipeUpdate
- func (ru *RecipeUpdate) AddTime(t time.Duration) *RecipeUpdate
- func (ru *RecipeUpdate) ClearEquipment() *RecipeUpdate
- func (ru *RecipeUpdate) ClearIdeas() *RecipeUpdate
- func (ru *RecipeUpdate) ClearIngredients() *RecipeUpdate
- func (ru *RecipeUpdate) ClearInstructions() *RecipeUpdate
- func (ru *RecipeUpdate) ClearNutrition() *RecipeUpdate
- func (ru *RecipeUpdate) ClearRating() *RecipeUpdate
- func (ru *RecipeUpdate) ClearRequiredProducts() *RecipeUpdate
- func (ru *RecipeUpdate) ClearServings() *RecipeUpdate
- func (ru *RecipeUpdate) ClearSources() *RecipeUpdate
- func (ru *RecipeUpdate) ClearTags() *RecipeUpdate
- func (ru *RecipeUpdate) ClearTime() *RecipeUpdate
- func (ru *RecipeUpdate) Exec(ctx context.Context) error
- func (ru *RecipeUpdate) ExecX(ctx context.Context)
- func (ru *RecipeUpdate) Mutation() *RecipeMutation
- func (ru *RecipeUpdate) RemoveEquipment(e ...*Equipment) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveEquipmentIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveIdeaIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveIdeas(i ...*Idea) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveIngredientIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveIngredients(i ...*Ingredient) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveInstructionIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveInstructions(i ...*Instruction) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveRequiredProducts(p ...*Product) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveSourceIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveSources(s ...*Source) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveTagIDs(ids ...uuid.UUID) *RecipeUpdate
- func (ru *RecipeUpdate) RemoveTags(t ...*Tag) *RecipeUpdate
- func (ru *RecipeUpdate) Save(ctx context.Context) (int, error)
- func (ru *RecipeUpdate) SaveX(ctx context.Context) int
- func (ru *RecipeUpdate) SetDescription(s string) *RecipeUpdate
- func (ru *RecipeUpdate) SetName(s string) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableDescription(s *string) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableName(s *string) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableNutritionID(id *int) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillablePublished(b *bool) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableRating(f *float32) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableServings(i *int) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableSlug(s *string) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableText(s *string) *RecipeUpdate
- func (ru *RecipeUpdate) SetNillableTime(t *time.Duration) *RecipeUpdate
- func (ru *RecipeUpdate) SetNutrition(n *Nutrition) *RecipeUpdate
- func (ru *RecipeUpdate) SetNutritionID(id int) *RecipeUpdate
- func (ru *RecipeUpdate) SetPublished(b bool) *RecipeUpdate
- func (ru *RecipeUpdate) SetRating(f float32) *RecipeUpdate
- func (ru *RecipeUpdate) SetServings(i int) *RecipeUpdate
- func (ru *RecipeUpdate) SetSlug(s string) *RecipeUpdate
- func (ru *RecipeUpdate) SetText(s string) *RecipeUpdate
- func (ru *RecipeUpdate) SetTime(t time.Duration) *RecipeUpdate
- func (ru *RecipeUpdate) SetUpdateTime(t time.Time) *RecipeUpdate
- func (ru *RecipeUpdate) Where(ps ...predicate.Recipe) *RecipeUpdate
- type RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddEquipment(e ...*Equipment) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddEquipmentIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddIdeaIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddIdeas(i ...*Idea) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddIngredientIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddIngredients(i ...*Ingredient) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddInstructionIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddInstructions(i ...*Instruction) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddRating(f float32) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddRequiredProducts(p ...*Product) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddServings(i int) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddSourceIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddSources(s ...*Source) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddTagIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddTags(t ...*Tag) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) AddTime(t time.Duration) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearEquipment() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearIdeas() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearIngredients() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearInstructions() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearNutrition() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearRating() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearRequiredProducts() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearServings() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearSources() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearTags() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) ClearTime() *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) Exec(ctx context.Context) error
- func (ruo *RecipeUpdateOne) ExecX(ctx context.Context)
- func (ruo *RecipeUpdateOne) Mutation() *RecipeMutation
- func (ruo *RecipeUpdateOne) RemoveEquipment(e ...*Equipment) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveEquipmentIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveIdeaIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveIdeas(i ...*Idea) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveIngredientIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveIngredients(i ...*Ingredient) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveInstructionIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveInstructions(i ...*Instruction) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveRequiredProducts(p ...*Product) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveSourceIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveSources(s ...*Source) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveTagIDs(ids ...uuid.UUID) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) RemoveTags(t ...*Tag) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) Save(ctx context.Context) (*Recipe, error)
- func (ruo *RecipeUpdateOne) SaveX(ctx context.Context) *Recipe
- func (ruo *RecipeUpdateOne) Select(field string, fields ...string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetDescription(s string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetName(s string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableDescription(s *string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableName(s *string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableNutritionID(id *int) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillablePublished(b *bool) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableRating(f *float32) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableServings(i *int) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableSlug(s *string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableText(s *string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNillableTime(t *time.Duration) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNutrition(n *Nutrition) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetNutritionID(id int) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetPublished(b bool) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetRating(f float32) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetServings(i int) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetSlug(s string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetText(s string) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetTime(t time.Duration) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) SetUpdateTime(t time.Time) *RecipeUpdateOne
- func (ruo *RecipeUpdateOne) Where(ps ...predicate.Recipe) *RecipeUpdateOne
- type Recipes
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Source
- type SourceClient
- func (c *SourceClient) Create() *SourceCreate
- func (c *SourceClient) CreateBulk(builders ...*SourceCreate) *SourceCreateBulk
- func (c *SourceClient) Delete() *SourceDelete
- func (c *SourceClient) DeleteOne(s *Source) *SourceDeleteOne
- func (c *SourceClient) DeleteOneID(id uuid.UUID) *SourceDeleteOne
- func (c *SourceClient) Get(ctx context.Context, id uuid.UUID) (*Source, error)
- func (c *SourceClient) GetX(ctx context.Context, id uuid.UUID) *Source
- func (c *SourceClient) Hooks() []Hook
- func (c *SourceClient) Intercept(interceptors ...Interceptor)
- func (c *SourceClient) Interceptors() []Interceptor
- func (c *SourceClient) MapCreateBulk(slice any, setFunc func(*SourceCreate, int)) *SourceCreateBulk
- func (c *SourceClient) Query() *SourceQuery
- func (c *SourceClient) QueryRecipe(s *Source) *RecipeQuery
- func (c *SourceClient) Update() *SourceUpdate
- func (c *SourceClient) UpdateOne(s *Source) *SourceUpdateOne
- func (c *SourceClient) UpdateOneID(id uuid.UUID) *SourceUpdateOne
- func (c *SourceClient) Use(hooks ...Hook)
- type SourceCreate
- func (sc *SourceCreate) Exec(ctx context.Context) error
- func (sc *SourceCreate) ExecX(ctx context.Context)
- func (sc *SourceCreate) Mutation() *SourceMutation
- func (sc *SourceCreate) Save(ctx context.Context) (*Source, error)
- func (sc *SourceCreate) SaveX(ctx context.Context) *Source
- func (sc *SourceCreate) SetDescription(s string) *SourceCreate
- func (sc *SourceCreate) SetID(u uuid.UUID) *SourceCreate
- func (sc *SourceCreate) SetName(s string) *SourceCreate
- func (sc *SourceCreate) SetNillableDescription(s *string) *SourceCreate
- func (sc *SourceCreate) SetNillableID(u *uuid.UUID) *SourceCreate
- func (sc *SourceCreate) SetNillableName(s *string) *SourceCreate
- func (sc *SourceCreate) SetNillableRecipeID(id *uuid.UUID) *SourceCreate
- func (sc *SourceCreate) SetNillableURL(s *string) *SourceCreate
- func (sc *SourceCreate) SetRecipe(r *Recipe) *SourceCreate
- func (sc *SourceCreate) SetRecipeID(id uuid.UUID) *SourceCreate
- func (sc *SourceCreate) SetURL(s string) *SourceCreate
- type SourceCreateBulk
- type SourceDelete
- type SourceDeleteOne
- type SourceEdges
- type SourceGroupBy
- func (sgb *SourceGroupBy) Aggregate(fns ...AggregateFunc) *SourceGroupBy
- func (s *SourceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SourceGroupBy) BoolX(ctx context.Context) bool
- func (s *SourceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SourceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SourceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SourceGroupBy) Float64X(ctx context.Context) float64
- func (s *SourceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SourceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SourceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SourceGroupBy) IntX(ctx context.Context) int
- func (s *SourceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SourceGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SourceGroupBy) Scan(ctx context.Context, v any) error
- func (s *SourceGroupBy) ScanX(ctx context.Context, v any)
- func (s *SourceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SourceGroupBy) StringX(ctx context.Context) string
- func (s *SourceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SourceGroupBy) StringsX(ctx context.Context) []string
- type SourceMutation
- func (m *SourceMutation) AddField(name string, value ent.Value) error
- func (m *SourceMutation) AddedEdges() []string
- func (m *SourceMutation) AddedField(name string) (ent.Value, bool)
- func (m *SourceMutation) AddedFields() []string
- func (m *SourceMutation) AddedIDs(name string) []ent.Value
- func (m *SourceMutation) ClearDescription()
- func (m *SourceMutation) ClearEdge(name string) error
- func (m *SourceMutation) ClearField(name string) error
- func (m *SourceMutation) ClearName()
- func (m *SourceMutation) ClearRecipe()
- func (m *SourceMutation) ClearURL()
- func (m *SourceMutation) ClearedEdges() []string
- func (m *SourceMutation) ClearedFields() []string
- func (m SourceMutation) Client() *Client
- func (m *SourceMutation) Description() (r string, exists bool)
- func (m *SourceMutation) DescriptionCleared() bool
- func (m *SourceMutation) EdgeCleared(name string) bool
- func (m *SourceMutation) Field(name string) (ent.Value, bool)
- func (m *SourceMutation) FieldCleared(name string) bool
- func (m *SourceMutation) Fields() []string
- func (m *SourceMutation) ID() (id uuid.UUID, exists bool)
- func (m *SourceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SourceMutation) Name() (r string, exists bool)
- func (m *SourceMutation) NameCleared() bool
- func (m *SourceMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *SourceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SourceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SourceMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *SourceMutation) Op() Op
- func (m *SourceMutation) RecipeCleared() bool
- func (m *SourceMutation) RecipeID() (id uuid.UUID, exists bool)
- func (m *SourceMutation) RecipeIDs() (ids []uuid.UUID)
- func (m *SourceMutation) RemovedEdges() []string
- func (m *SourceMutation) RemovedIDs(name string) []ent.Value
- func (m *SourceMutation) ResetDescription()
- func (m *SourceMutation) ResetEdge(name string) error
- func (m *SourceMutation) ResetField(name string) error
- func (m *SourceMutation) ResetName()
- func (m *SourceMutation) ResetRecipe()
- func (m *SourceMutation) ResetURL()
- func (m *SourceMutation) SetDescription(s string)
- func (m *SourceMutation) SetField(name string, value ent.Value) error
- func (m *SourceMutation) SetID(id uuid.UUID)
- func (m *SourceMutation) SetName(s string)
- func (m *SourceMutation) SetOp(op Op)
- func (m *SourceMutation) SetRecipeID(id uuid.UUID)
- func (m *SourceMutation) SetURL(s string)
- func (m SourceMutation) Tx() (*Tx, error)
- func (m *SourceMutation) Type() string
- func (m *SourceMutation) URL() (r string, exists bool)
- func (m *SourceMutation) URLCleared() bool
- func (m *SourceMutation) Where(ps ...predicate.Source)
- func (m *SourceMutation) WhereP(ps ...func(*sql.Selector))
- type SourceQuery
- func (sq *SourceQuery) Aggregate(fns ...AggregateFunc) *SourceSelect
- func (sq *SourceQuery) All(ctx context.Context) ([]*Source, error)
- func (sq *SourceQuery) AllX(ctx context.Context) []*Source
- func (sq *SourceQuery) Clone() *SourceQuery
- func (sq *SourceQuery) Count(ctx context.Context) (int, error)
- func (sq *SourceQuery) CountX(ctx context.Context) int
- func (sq *SourceQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SourceQuery) ExistX(ctx context.Context) bool
- func (sq *SourceQuery) First(ctx context.Context) (*Source, error)
- func (sq *SourceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SourceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *SourceQuery) FirstX(ctx context.Context) *Source
- func (sq *SourceQuery) GroupBy(field string, fields ...string) *SourceGroupBy
- func (sq *SourceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *SourceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *SourceQuery) Limit(limit int) *SourceQuery
- func (sq *SourceQuery) Offset(offset int) *SourceQuery
- func (sq *SourceQuery) Only(ctx context.Context) (*Source, error)
- func (sq *SourceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *SourceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *SourceQuery) OnlyX(ctx context.Context) *Source
- func (sq *SourceQuery) Order(o ...source.OrderOption) *SourceQuery
- func (sq *SourceQuery) QueryRecipe() *RecipeQuery
- func (sq *SourceQuery) Select(fields ...string) *SourceSelect
- func (sq *SourceQuery) Unique(unique bool) *SourceQuery
- func (sq *SourceQuery) Where(ps ...predicate.Source) *SourceQuery
- func (sq *SourceQuery) WithRecipe(opts ...func(*RecipeQuery)) *SourceQuery
- type SourceSelect
- func (ss *SourceSelect) Aggregate(fns ...AggregateFunc) *SourceSelect
- func (s *SourceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SourceSelect) BoolX(ctx context.Context) bool
- func (s *SourceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SourceSelect) BoolsX(ctx context.Context) []bool
- func (s *SourceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SourceSelect) Float64X(ctx context.Context) float64
- func (s *SourceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SourceSelect) Float64sX(ctx context.Context) []float64
- func (s *SourceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SourceSelect) IntX(ctx context.Context) int
- func (s *SourceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SourceSelect) IntsX(ctx context.Context) []int
- func (ss *SourceSelect) Scan(ctx context.Context, v any) error
- func (s *SourceSelect) ScanX(ctx context.Context, v any)
- func (s *SourceSelect) String(ctx context.Context) (_ string, err error)
- func (s *SourceSelect) StringX(ctx context.Context) string
- func (s *SourceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SourceSelect) StringsX(ctx context.Context) []string
- type SourceUpdate
- func (su *SourceUpdate) ClearDescription() *SourceUpdate
- func (su *SourceUpdate) ClearName() *SourceUpdate
- func (su *SourceUpdate) ClearRecipe() *SourceUpdate
- func (su *SourceUpdate) ClearURL() *SourceUpdate
- func (su *SourceUpdate) Exec(ctx context.Context) error
- func (su *SourceUpdate) ExecX(ctx context.Context)
- func (su *SourceUpdate) Mutation() *SourceMutation
- func (su *SourceUpdate) Save(ctx context.Context) (int, error)
- func (su *SourceUpdate) SaveX(ctx context.Context) int
- func (su *SourceUpdate) SetDescription(s string) *SourceUpdate
- func (su *SourceUpdate) SetName(s string) *SourceUpdate
- func (su *SourceUpdate) SetNillableDescription(s *string) *SourceUpdate
- func (su *SourceUpdate) SetNillableName(s *string) *SourceUpdate
- func (su *SourceUpdate) SetNillableRecipeID(id *uuid.UUID) *SourceUpdate
- func (su *SourceUpdate) SetNillableURL(s *string) *SourceUpdate
- func (su *SourceUpdate) SetRecipe(r *Recipe) *SourceUpdate
- func (su *SourceUpdate) SetRecipeID(id uuid.UUID) *SourceUpdate
- func (su *SourceUpdate) SetURL(s string) *SourceUpdate
- func (su *SourceUpdate) Where(ps ...predicate.Source) *SourceUpdate
- type SourceUpdateOne
- func (suo *SourceUpdateOne) ClearDescription() *SourceUpdateOne
- func (suo *SourceUpdateOne) ClearName() *SourceUpdateOne
- func (suo *SourceUpdateOne) ClearRecipe() *SourceUpdateOne
- func (suo *SourceUpdateOne) ClearURL() *SourceUpdateOne
- func (suo *SourceUpdateOne) Exec(ctx context.Context) error
- func (suo *SourceUpdateOne) ExecX(ctx context.Context)
- func (suo *SourceUpdateOne) Mutation() *SourceMutation
- func (suo *SourceUpdateOne) Save(ctx context.Context) (*Source, error)
- func (suo *SourceUpdateOne) SaveX(ctx context.Context) *Source
- func (suo *SourceUpdateOne) Select(field string, fields ...string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetDescription(s string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetName(s string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableDescription(s *string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableName(s *string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableRecipeID(id *uuid.UUID) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetNillableURL(s *string) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetRecipe(r *Recipe) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetRecipeID(id uuid.UUID) *SourceUpdateOne
- func (suo *SourceUpdateOne) SetURL(s string) *SourceUpdateOne
- func (suo *SourceUpdateOne) Where(ps ...predicate.Source) *SourceUpdateOne
- type Sources
- type Tag
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id uuid.UUID) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id uuid.UUID) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id uuid.UUID) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryRecipes(t *Tag) *RecipeQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id uuid.UUID) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddRecipeIDs(ids ...uuid.UUID) *TagCreate
- func (tc *TagCreate) AddRecipes(r ...*Recipe) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetGroup(s string) *TagCreate
- func (tc *TagCreate) SetID(u uuid.UUID) *TagCreate
- func (tc *TagCreate) SetName(s string) *TagCreate
- func (tc *TagCreate) SetNillableID(u *uuid.UUID) *TagCreate
- func (tc *TagCreate) SetSlug(s string) *TagCreate
- type TagCreateBulk
- type TagDelete
- type TagDeleteOne
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddRecipeIDs(ids ...uuid.UUID)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearRecipes()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) Group() (r string, exists bool)
- func (m *TagMutation) ID() (id uuid.UUID, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TagMutation) Name() (r string, exists bool)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldGroup(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldSlug(ctx context.Context) (v string, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) RecipesCleared() bool
- func (m *TagMutation) RecipesIDs() (ids []uuid.UUID)
- func (m *TagMutation) RemoveRecipeIDs(ids ...uuid.UUID)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedRecipesIDs() (ids []uuid.UUID)
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetGroup()
- func (m *TagMutation) ResetName()
- func (m *TagMutation) ResetRecipes()
- func (m *TagMutation) ResetSlug()
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetGroup(s string)
- func (m *TagMutation) SetID(id uuid.UUID)
- func (m *TagMutation) SetName(s string)
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetSlug(s string)
- func (m *TagMutation) Slug() (r string, exists bool)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (tq *TagQuery) QueryRecipes() *RecipeQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithRecipes(opts ...func(*RecipeQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddRecipeIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) AddRecipes(r ...*Recipe) *TagUpdate
- func (tu *TagUpdate) ClearRecipes() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveRecipeIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) RemoveRecipes(r ...*Recipe) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetGroup(s string) *TagUpdate
- func (tu *TagUpdate) SetName(s string) *TagUpdate
- func (tu *TagUpdate) SetNillableGroup(s *string) *TagUpdate
- func (tu *TagUpdate) SetNillableName(s *string) *TagUpdate
- func (tu *TagUpdate) SetNillableSlug(s *string) *TagUpdate
- func (tu *TagUpdate) SetSlug(s string) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddRecipeIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) AddRecipes(r ...*Recipe) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearRecipes() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveRecipeIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveRecipes(r ...*Recipe) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetGroup(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableGroup(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableName(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableSlug(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetSlug(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeEquipment = "Equipment" TypeIdea = "Idea" TypeIngredient = "Ingredient" TypeInstruction = "Instruction" TypeNutrition = "Nutrition" TypeProduct = "Product" TypeRecipe = "Recipe" TypeSource = "Source" TypeTag = "Tag" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
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 // Equipment is the client for interacting with the Equipment builders. Equipment *EquipmentClient // Idea is the client for interacting with the Idea builders. Idea *IdeaClient // Ingredient is the client for interacting with the Ingredient builders. Ingredient *IngredientClient // Instruction is the client for interacting with the Instruction builders. Instruction *InstructionClient // Nutrition is the client for interacting with the Nutrition builders. Nutrition *NutritionClient // Product is the client for interacting with the Product builders. Product *ProductClient // Recipe is the client for interacting with the Recipe builders. Recipe *RecipeClient // Source is the client for interacting with the Source builders. Source *SourceClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // 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(). Equipment. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Equipment ¶
type Equipment struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EquipmentQuery when eager-loading is set. Edges EquipmentEdges `json:"edges"` // contains filtered or unexported fields }
Equipment is the model entity for the Equipment schema.
func (*Equipment) QueryRecipes ¶
func (e *Equipment) QueryRecipes() *RecipeQuery
QueryRecipes queries the "recipes" edge of the Equipment entity.
func (*Equipment) Unwrap ¶
Unwrap unwraps the Equipment 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 (*Equipment) Update ¶
func (e *Equipment) Update() *EquipmentUpdateOne
Update returns a builder for updating this Equipment. Note that you need to call Equipment.Unwrap() before calling this method if this Equipment was returned from a transaction, and the transaction was committed or rolled back.
type EquipmentClient ¶
type EquipmentClient struct {
// contains filtered or unexported fields
}
EquipmentClient is a client for the Equipment schema.
func NewEquipmentClient ¶
func NewEquipmentClient(c config) *EquipmentClient
NewEquipmentClient returns a client for the Equipment from the given config.
func (*EquipmentClient) Create ¶
func (c *EquipmentClient) Create() *EquipmentCreate
Create returns a builder for creating a Equipment entity.
func (*EquipmentClient) CreateBulk ¶
func (c *EquipmentClient) CreateBulk(builders ...*EquipmentCreate) *EquipmentCreateBulk
CreateBulk returns a builder for creating a bulk of Equipment entities.
func (*EquipmentClient) Delete ¶
func (c *EquipmentClient) Delete() *EquipmentDelete
Delete returns a delete builder for Equipment.
func (*EquipmentClient) DeleteOne ¶
func (c *EquipmentClient) DeleteOne(e *Equipment) *EquipmentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EquipmentClient) DeleteOneID ¶
func (c *EquipmentClient) DeleteOneID(id uuid.UUID) *EquipmentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EquipmentClient) Hooks ¶
func (c *EquipmentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EquipmentClient) Intercept ¶
func (c *EquipmentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `equipment.Intercept(f(g(h())))`.
func (*EquipmentClient) Interceptors ¶
func (c *EquipmentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EquipmentClient) MapCreateBulk ¶
func (c *EquipmentClient) MapCreateBulk(slice any, setFunc func(*EquipmentCreate, int)) *EquipmentCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*EquipmentClient) Query ¶
func (c *EquipmentClient) Query() *EquipmentQuery
Query returns a query builder for Equipment.
func (*EquipmentClient) QueryRecipes ¶
func (c *EquipmentClient) QueryRecipes(e *Equipment) *RecipeQuery
QueryRecipes queries the recipes edge of a Equipment.
func (*EquipmentClient) Update ¶
func (c *EquipmentClient) Update() *EquipmentUpdate
Update returns an update builder for Equipment.
func (*EquipmentClient) UpdateOne ¶
func (c *EquipmentClient) UpdateOne(e *Equipment) *EquipmentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EquipmentClient) UpdateOneID ¶
func (c *EquipmentClient) UpdateOneID(id uuid.UUID) *EquipmentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EquipmentClient) Use ¶
func (c *EquipmentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `equipment.Hooks(f(g(h())))`.
type EquipmentCreate ¶
type EquipmentCreate struct {
// contains filtered or unexported fields
}
EquipmentCreate is the builder for creating a Equipment entity.
func (*EquipmentCreate) AddRecipeIDs ¶
func (ec *EquipmentCreate) AddRecipeIDs(ids ...uuid.UUID) *EquipmentCreate
AddRecipeIDs adds the "recipes" edge to the Recipe entity by IDs.
func (*EquipmentCreate) AddRecipes ¶
func (ec *EquipmentCreate) AddRecipes(r ...*Recipe) *EquipmentCreate
AddRecipes adds the "recipes" edges to the Recipe entity.
func (*EquipmentCreate) Exec ¶
func (ec *EquipmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EquipmentCreate) ExecX ¶
func (ec *EquipmentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EquipmentCreate) Mutation ¶
func (ec *EquipmentCreate) Mutation() *EquipmentMutation
Mutation returns the EquipmentMutation object of the builder.
func (*EquipmentCreate) Save ¶
func (ec *EquipmentCreate) Save(ctx context.Context) (*Equipment, error)
Save creates the Equipment in the database.
func (*EquipmentCreate) SaveX ¶
func (ec *EquipmentCreate) SaveX(ctx context.Context) *Equipment
SaveX calls Save and panics if Save returns an error.
func (*EquipmentCreate) SetID ¶
func (ec *EquipmentCreate) SetID(u uuid.UUID) *EquipmentCreate
SetID sets the "id" field.
func (*EquipmentCreate) SetName ¶
func (ec *EquipmentCreate) SetName(s string) *EquipmentCreate
SetName sets the "name" field.
func (*EquipmentCreate) SetNillableID ¶
func (ec *EquipmentCreate) SetNillableID(u *uuid.UUID) *EquipmentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*EquipmentCreate) SetSlug ¶
func (ec *EquipmentCreate) SetSlug(s string) *EquipmentCreate
SetSlug sets the "slug" field.
type EquipmentCreateBulk ¶
type EquipmentCreateBulk struct {
// contains filtered or unexported fields
}
EquipmentCreateBulk is the builder for creating many Equipment entities in bulk.
func (*EquipmentCreateBulk) Exec ¶
func (ecb *EquipmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EquipmentCreateBulk) ExecX ¶
func (ecb *EquipmentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EquipmentDelete ¶
type EquipmentDelete struct {
// contains filtered or unexported fields
}
EquipmentDelete is the builder for deleting a Equipment entity.
func (*EquipmentDelete) Exec ¶
func (ed *EquipmentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EquipmentDelete) ExecX ¶
func (ed *EquipmentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EquipmentDelete) Where ¶
func (ed *EquipmentDelete) Where(ps ...predicate.Equipment) *EquipmentDelete
Where appends a list predicates to the EquipmentDelete builder.
type EquipmentDeleteOne ¶
type EquipmentDeleteOne struct {
// contains filtered or unexported fields
}
EquipmentDeleteOne is the builder for deleting a single Equipment entity.
func (*EquipmentDeleteOne) Exec ¶
func (edo *EquipmentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EquipmentDeleteOne) ExecX ¶
func (edo *EquipmentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EquipmentDeleteOne) Where ¶
func (edo *EquipmentDeleteOne) Where(ps ...predicate.Equipment) *EquipmentDeleteOne
Where appends a list predicates to the EquipmentDelete builder.
type EquipmentEdges ¶
type EquipmentEdges struct { // Recipes holds the value of the recipes edge. Recipes []*Recipe `json:"recipes,omitempty"` // contains filtered or unexported fields }
EquipmentEdges holds the relations/edges for other nodes in the graph.
func (EquipmentEdges) RecipesOrErr ¶
func (e EquipmentEdges) RecipesOrErr() ([]*Recipe, error)
RecipesOrErr returns the Recipes value or an error if the edge was not loaded in eager-loading.
type EquipmentGroupBy ¶
type EquipmentGroupBy struct {
// contains filtered or unexported fields
}
EquipmentGroupBy is the group-by builder for Equipment entities.
func (*EquipmentGroupBy) Aggregate ¶
func (egb *EquipmentGroupBy) Aggregate(fns ...AggregateFunc) *EquipmentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EquipmentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EquipmentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EquipmentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EquipmentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EquipmentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EquipmentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EquipmentGroupBy) Scan ¶
func (egb *EquipmentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EquipmentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EquipmentMutation ¶
type EquipmentMutation struct {
// contains filtered or unexported fields
}
EquipmentMutation represents an operation that mutates the Equipment nodes in the graph.
func (*EquipmentMutation) AddField ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) AddRecipeIDs ¶
func (m *EquipmentMutation) AddRecipeIDs(ids ...uuid.UUID)
AddRecipeIDs adds the "recipes" edge to the Recipe entity by ids.
func (*EquipmentMutation) AddedEdges ¶
func (m *EquipmentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EquipmentMutation) AddedField ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) AddedFields ¶
func (m *EquipmentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EquipmentMutation) AddedIDs ¶
func (m *EquipmentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EquipmentMutation) ClearEdge ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) ClearField ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) ClearRecipes ¶
func (m *EquipmentMutation) ClearRecipes()
ClearRecipes clears the "recipes" edge to the Recipe entity.
func (*EquipmentMutation) ClearedEdges ¶
func (m *EquipmentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EquipmentMutation) ClearedFields ¶
func (m *EquipmentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EquipmentMutation) Client ¶
func (m EquipmentMutation) 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 (*EquipmentMutation) EdgeCleared ¶
func (m *EquipmentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EquipmentMutation) Field ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) FieldCleared ¶
func (m *EquipmentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EquipmentMutation) Fields ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) ID ¶
func (m *EquipmentMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*EquipmentMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*EquipmentMutation) Name ¶
func (m *EquipmentMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*EquipmentMutation) 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 (*EquipmentMutation) OldName ¶
func (m *EquipmentMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Equipment entity. If the Equipment 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 (*EquipmentMutation) OldSlug ¶
func (m *EquipmentMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Equipment entity. If the Equipment 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 (*EquipmentMutation) RecipesCleared ¶
func (m *EquipmentMutation) RecipesCleared() bool
RecipesCleared reports if the "recipes" edge to the Recipe entity was cleared.
func (*EquipmentMutation) RecipesIDs ¶
func (m *EquipmentMutation) RecipesIDs() (ids []uuid.UUID)
RecipesIDs returns the "recipes" edge IDs in the mutation.
func (*EquipmentMutation) RemoveRecipeIDs ¶
func (m *EquipmentMutation) RemoveRecipeIDs(ids ...uuid.UUID)
RemoveRecipeIDs removes the "recipes" edge to the Recipe entity by IDs.
func (*EquipmentMutation) RemovedEdges ¶
func (m *EquipmentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EquipmentMutation) RemovedIDs ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) RemovedRecipesIDs ¶
func (m *EquipmentMutation) RemovedRecipesIDs() (ids []uuid.UUID)
RemovedRecipes returns the removed IDs of the "recipes" edge to the Recipe entity.
func (*EquipmentMutation) ResetEdge ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) ResetField ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) ResetName ¶
func (m *EquipmentMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*EquipmentMutation) ResetRecipes ¶
func (m *EquipmentMutation) ResetRecipes()
ResetRecipes resets all changes to the "recipes" edge.
func (*EquipmentMutation) ResetSlug ¶
func (m *EquipmentMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*EquipmentMutation) SetField ¶
func (m *EquipmentMutation) 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 (*EquipmentMutation) SetID ¶
func (m *EquipmentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Equipment entities.
func (*EquipmentMutation) SetName ¶
func (m *EquipmentMutation) SetName(s string)
SetName sets the "name" field.
func (*EquipmentMutation) SetOp ¶
func (m *EquipmentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EquipmentMutation) SetSlug ¶
func (m *EquipmentMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*EquipmentMutation) Slug ¶
func (m *EquipmentMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (EquipmentMutation) Tx ¶
func (m EquipmentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EquipmentMutation) Type ¶
func (m *EquipmentMutation) Type() string
Type returns the node type of this mutation (Equipment).
func (*EquipmentMutation) Where ¶
func (m *EquipmentMutation) Where(ps ...predicate.Equipment)
Where appends a list predicates to the EquipmentMutation builder.
func (*EquipmentMutation) WhereP ¶
func (m *EquipmentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EquipmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EquipmentQuery ¶
type EquipmentQuery struct {
// contains filtered or unexported fields
}
EquipmentQuery is the builder for querying Equipment entities.
func (*EquipmentQuery) Aggregate ¶
func (eq *EquipmentQuery) Aggregate(fns ...AggregateFunc) *EquipmentSelect
Aggregate returns a EquipmentSelect configured with the given aggregations.
func (*EquipmentQuery) All ¶
func (eq *EquipmentQuery) All(ctx context.Context) ([]*Equipment, error)
All executes the query and returns a list of EquipmentSlice.
func (*EquipmentQuery) AllX ¶
func (eq *EquipmentQuery) AllX(ctx context.Context) []*Equipment
AllX is like All, but panics if an error occurs.
func (*EquipmentQuery) Clone ¶
func (eq *EquipmentQuery) Clone() *EquipmentQuery
Clone returns a duplicate of the EquipmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EquipmentQuery) Count ¶
func (eq *EquipmentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EquipmentQuery) CountX ¶
func (eq *EquipmentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EquipmentQuery) Exist ¶
func (eq *EquipmentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EquipmentQuery) ExistX ¶
func (eq *EquipmentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EquipmentQuery) First ¶
func (eq *EquipmentQuery) First(ctx context.Context) (*Equipment, error)
First returns the first Equipment entity from the query. Returns a *NotFoundError when no Equipment was found.
func (*EquipmentQuery) FirstID ¶
FirstID returns the first Equipment ID from the query. Returns a *NotFoundError when no Equipment ID was found.
func (*EquipmentQuery) FirstIDX ¶
func (eq *EquipmentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*EquipmentQuery) FirstX ¶
func (eq *EquipmentQuery) FirstX(ctx context.Context) *Equipment
FirstX is like First, but panics if an error occurs.
func (*EquipmentQuery) GroupBy ¶
func (eq *EquipmentQuery) GroupBy(field string, fields ...string) *EquipmentGroupBy
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.Equipment.Query(). GroupBy(equipment.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EquipmentQuery) IDsX ¶
func (eq *EquipmentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*EquipmentQuery) Limit ¶
func (eq *EquipmentQuery) Limit(limit int) *EquipmentQuery
Limit the number of records to be returned by this query.
func (*EquipmentQuery) Offset ¶
func (eq *EquipmentQuery) Offset(offset int) *EquipmentQuery
Offset to start from.
func (*EquipmentQuery) Only ¶
func (eq *EquipmentQuery) Only(ctx context.Context) (*Equipment, error)
Only returns a single Equipment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Equipment entity is found. Returns a *NotFoundError when no Equipment entities are found.
func (*EquipmentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Equipment ID in the query. Returns a *NotSingularError when more than one Equipment ID is found. Returns a *NotFoundError when no entities are found.
func (*EquipmentQuery) OnlyIDX ¶
func (eq *EquipmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EquipmentQuery) OnlyX ¶
func (eq *EquipmentQuery) OnlyX(ctx context.Context) *Equipment
OnlyX is like Only, but panics if an error occurs.
func (*EquipmentQuery) Order ¶
func (eq *EquipmentQuery) Order(o ...equipment.OrderOption) *EquipmentQuery
Order specifies how the records should be ordered.
func (*EquipmentQuery) QueryRecipes ¶
func (eq *EquipmentQuery) QueryRecipes() *RecipeQuery
QueryRecipes chains the current query on the "recipes" edge.
func (*EquipmentQuery) Select ¶
func (eq *EquipmentQuery) Select(fields ...string) *EquipmentSelect
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.Equipment.Query(). Select(equipment.FieldName). Scan(ctx, &v)
func (*EquipmentQuery) Unique ¶
func (eq *EquipmentQuery) Unique(unique bool) *EquipmentQuery
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 (*EquipmentQuery) Where ¶
func (eq *EquipmentQuery) Where(ps ...predicate.Equipment) *EquipmentQuery
Where adds a new predicate for the EquipmentQuery builder.
func (*EquipmentQuery) WithRecipes ¶
func (eq *EquipmentQuery) WithRecipes(opts ...func(*RecipeQuery)) *EquipmentQuery
WithRecipes tells the query-builder to eager-load the nodes that are connected to the "recipes" edge. The optional arguments are used to configure the query builder of the edge.
type EquipmentSelect ¶
type EquipmentSelect struct { *EquipmentQuery // contains filtered or unexported fields }
EquipmentSelect is the builder for selecting fields of Equipment entities.
func (*EquipmentSelect) Aggregate ¶
func (es *EquipmentSelect) Aggregate(fns ...AggregateFunc) *EquipmentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EquipmentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EquipmentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EquipmentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EquipmentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EquipmentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EquipmentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EquipmentSelect) Scan ¶
func (es *EquipmentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EquipmentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EquipmentSlice ¶
type EquipmentSlice []*Equipment
EquipmentSlice is a parsable slice of Equipment.
type EquipmentUpdate ¶
type EquipmentUpdate struct {
// contains filtered or unexported fields
}
EquipmentUpdate is the builder for updating Equipment entities.
func (*EquipmentUpdate) AddRecipeIDs ¶
func (eu *EquipmentUpdate) AddRecipeIDs(ids ...uuid.UUID) *EquipmentUpdate
AddRecipeIDs adds the "recipes" edge to the Recipe entity by IDs.
func (*EquipmentUpdate) AddRecipes ¶
func (eu *EquipmentUpdate) AddRecipes(r ...*Recipe) *EquipmentUpdate
AddRecipes adds the "recipes" edges to the Recipe entity.
func (*EquipmentUpdate) ClearRecipes ¶
func (eu *EquipmentUpdate) ClearRecipes() *EquipmentUpdate
ClearRecipes clears all "recipes" edges to the Recipe entity.
func (*EquipmentUpdate) Exec ¶
func (eu *EquipmentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EquipmentUpdate) ExecX ¶
func (eu *EquipmentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EquipmentUpdate) Mutation ¶
func (eu *EquipmentUpdate) Mutation() *EquipmentMutation
Mutation returns the EquipmentMutation object of the builder.
func (*EquipmentUpdate) RemoveRecipeIDs ¶
func (eu *EquipmentUpdate) RemoveRecipeIDs(ids ...uuid.UUID) *EquipmentUpdate
RemoveRecipeIDs removes the "recipes" edge to Recipe entities by IDs.
func (*EquipmentUpdate) RemoveRecipes ¶
func (eu *EquipmentUpdate) RemoveRecipes(r ...*Recipe) *EquipmentUpdate
RemoveRecipes removes "recipes" edges to Recipe entities.
func (*EquipmentUpdate) Save ¶
func (eu *EquipmentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EquipmentUpdate) SaveX ¶
func (eu *EquipmentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EquipmentUpdate) SetName ¶
func (eu *EquipmentUpdate) SetName(s string) *EquipmentUpdate
SetName sets the "name" field.
func (*EquipmentUpdate) SetNillableName ¶
func (eu *EquipmentUpdate) SetNillableName(s *string) *EquipmentUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*EquipmentUpdate) SetNillableSlug ¶
func (eu *EquipmentUpdate) SetNillableSlug(s *string) *EquipmentUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*EquipmentUpdate) SetSlug ¶
func (eu *EquipmentUpdate) SetSlug(s string) *EquipmentUpdate
SetSlug sets the "slug" field.
func (*EquipmentUpdate) Where ¶
func (eu *EquipmentUpdate) Where(ps ...predicate.Equipment) *EquipmentUpdate
Where appends a list predicates to the EquipmentUpdate builder.
type EquipmentUpdateOne ¶
type EquipmentUpdateOne struct {
// contains filtered or unexported fields
}
EquipmentUpdateOne is the builder for updating a single Equipment entity.
func (*EquipmentUpdateOne) AddRecipeIDs ¶
func (euo *EquipmentUpdateOne) AddRecipeIDs(ids ...uuid.UUID) *EquipmentUpdateOne
AddRecipeIDs adds the "recipes" edge to the Recipe entity by IDs.
func (*EquipmentUpdateOne) AddRecipes ¶
func (euo *EquipmentUpdateOne) AddRecipes(r ...*Recipe) *EquipmentUpdateOne
AddRecipes adds the "recipes" edges to the Recipe entity.
func (*EquipmentUpdateOne) ClearRecipes ¶
func (euo *EquipmentUpdateOne) ClearRecipes() *EquipmentUpdateOne
ClearRecipes clears all "recipes" edges to the Recipe entity.
func (*EquipmentUpdateOne) Exec ¶
func (euo *EquipmentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EquipmentUpdateOne) ExecX ¶
func (euo *EquipmentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EquipmentUpdateOne) Mutation ¶
func (euo *EquipmentUpdateOne) Mutation() *EquipmentMutation
Mutation returns the EquipmentMutation object of the builder.
func (*EquipmentUpdateOne) RemoveRecipeIDs ¶
func (euo *EquipmentUpdateOne) RemoveRecipeIDs(ids ...uuid.UUID) *EquipmentUpdateOne
RemoveRecipeIDs removes the "recipes" edge to Recipe entities by IDs.
func (*EquipmentUpdateOne) RemoveRecipes ¶
func (euo *EquipmentUpdateOne) RemoveRecipes(r ...*Recipe) *EquipmentUpdateOne
RemoveRecipes removes "recipes" edges to Recipe entities.
func (*EquipmentUpdateOne) Save ¶
func (euo *EquipmentUpdateOne) Save(ctx context.Context) (*Equipment, error)
Save executes the query and returns the updated Equipment entity.
func (*EquipmentUpdateOne) SaveX ¶
func (euo *EquipmentUpdateOne) SaveX(ctx context.Context) *Equipment
SaveX is like Save, but panics if an error occurs.
func (*EquipmentUpdateOne) Select ¶
func (euo *EquipmentUpdateOne) Select(field string, fields ...string) *EquipmentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EquipmentUpdateOne) SetName ¶
func (euo *EquipmentUpdateOne) SetName(s string) *EquipmentUpdateOne
SetName sets the "name" field.
func (*EquipmentUpdateOne) SetNillableName ¶
func (euo *EquipmentUpdateOne) SetNillableName(s *string) *EquipmentUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*EquipmentUpdateOne) SetNillableSlug ¶
func (euo *EquipmentUpdateOne) SetNillableSlug(s *string) *EquipmentUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*EquipmentUpdateOne) SetSlug ¶
func (euo *EquipmentUpdateOne) SetSlug(s string) *EquipmentUpdateOne
SetSlug sets the "slug" field.
func (*EquipmentUpdateOne) Where ¶
func (euo *EquipmentUpdateOne) Where(ps ...predicate.Equipment) *EquipmentUpdateOne
Where appends a list predicates to the EquipmentUpdate builder.
type Idea ¶
type Idea struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the IdeaQuery when eager-loading is set. Edges IdeaEdges `json:"edges"` // contains filtered or unexported fields }
Idea is the model entity for the Idea schema.
func (*Idea) QueryRecipe ¶
func (i *Idea) QueryRecipe() *RecipeQuery
QueryRecipe queries the "recipe" edge of the Idea entity.
func (*Idea) Unwrap ¶
Unwrap unwraps the Idea 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 (*Idea) Update ¶
func (i *Idea) Update() *IdeaUpdateOne
Update returns a builder for updating this Idea. Note that you need to call Idea.Unwrap() before calling this method if this Idea was returned from a transaction, and the transaction was committed or rolled back.
type IdeaClient ¶
type IdeaClient struct {
// contains filtered or unexported fields
}
IdeaClient is a client for the Idea schema.
func NewIdeaClient ¶
func NewIdeaClient(c config) *IdeaClient
NewIdeaClient returns a client for the Idea from the given config.
func (*IdeaClient) Create ¶
func (c *IdeaClient) Create() *IdeaCreate
Create returns a builder for creating a Idea entity.
func (*IdeaClient) CreateBulk ¶
func (c *IdeaClient) CreateBulk(builders ...*IdeaCreate) *IdeaCreateBulk
CreateBulk returns a builder for creating a bulk of Idea entities.
func (*IdeaClient) Delete ¶
func (c *IdeaClient) Delete() *IdeaDelete
Delete returns a delete builder for Idea.
func (*IdeaClient) DeleteOne ¶
func (c *IdeaClient) DeleteOne(i *Idea) *IdeaDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*IdeaClient) DeleteOneID ¶
func (c *IdeaClient) DeleteOneID(id uuid.UUID) *IdeaDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*IdeaClient) Intercept ¶
func (c *IdeaClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `idea.Intercept(f(g(h())))`.
func (*IdeaClient) Interceptors ¶
func (c *IdeaClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*IdeaClient) MapCreateBulk ¶
func (c *IdeaClient) MapCreateBulk(slice any, setFunc func(*IdeaCreate, int)) *IdeaCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*IdeaClient) Query ¶
func (c *IdeaClient) Query() *IdeaQuery
Query returns a query builder for Idea.
func (*IdeaClient) QueryRecipe ¶
func (c *IdeaClient) QueryRecipe(i *Idea) *RecipeQuery
QueryRecipe queries the recipe edge of a Idea.
func (*IdeaClient) Update ¶
func (c *IdeaClient) Update() *IdeaUpdate
Update returns an update builder for Idea.
func (*IdeaClient) UpdateOne ¶
func (c *IdeaClient) UpdateOne(i *Idea) *IdeaUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IdeaClient) UpdateOneID ¶
func (c *IdeaClient) UpdateOneID(id uuid.UUID) *IdeaUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IdeaClient) Use ¶
func (c *IdeaClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `idea.Hooks(f(g(h())))`.
type IdeaCreate ¶
type IdeaCreate struct {
// contains filtered or unexported fields
}
IdeaCreate is the builder for creating a Idea entity.
func (*IdeaCreate) Exec ¶
func (ic *IdeaCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*IdeaCreate) ExecX ¶
func (ic *IdeaCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IdeaCreate) Mutation ¶
func (ic *IdeaCreate) Mutation() *IdeaMutation
Mutation returns the IdeaMutation object of the builder.
func (*IdeaCreate) Save ¶
func (ic *IdeaCreate) Save(ctx context.Context) (*Idea, error)
Save creates the Idea in the database.
func (*IdeaCreate) SaveX ¶
func (ic *IdeaCreate) SaveX(ctx context.Context) *Idea
SaveX calls Save and panics if Save returns an error.
func (*IdeaCreate) SetID ¶
func (ic *IdeaCreate) SetID(u uuid.UUID) *IdeaCreate
SetID sets the "id" field.
func (*IdeaCreate) SetNillableID ¶
func (ic *IdeaCreate) SetNillableID(u *uuid.UUID) *IdeaCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*IdeaCreate) SetNillableRecipeID ¶
func (ic *IdeaCreate) SetNillableRecipeID(id *uuid.UUID) *IdeaCreate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*IdeaCreate) SetRecipe ¶
func (ic *IdeaCreate) SetRecipe(r *Recipe) *IdeaCreate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*IdeaCreate) SetRecipeID ¶
func (ic *IdeaCreate) SetRecipeID(id uuid.UUID) *IdeaCreate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*IdeaCreate) SetText ¶
func (ic *IdeaCreate) SetText(s string) *IdeaCreate
SetText sets the "text" field.
type IdeaCreateBulk ¶
type IdeaCreateBulk struct {
// contains filtered or unexported fields
}
IdeaCreateBulk is the builder for creating many Idea entities in bulk.
func (*IdeaCreateBulk) Exec ¶
func (icb *IdeaCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IdeaCreateBulk) ExecX ¶
func (icb *IdeaCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IdeaDelete ¶
type IdeaDelete struct {
// contains filtered or unexported fields
}
IdeaDelete is the builder for deleting a Idea entity.
func (*IdeaDelete) Exec ¶
func (id *IdeaDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IdeaDelete) ExecX ¶
func (id *IdeaDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IdeaDelete) Where ¶
func (id *IdeaDelete) Where(ps ...predicate.Idea) *IdeaDelete
Where appends a list predicates to the IdeaDelete builder.
type IdeaDeleteOne ¶
type IdeaDeleteOne struct {
// contains filtered or unexported fields
}
IdeaDeleteOne is the builder for deleting a single Idea entity.
func (*IdeaDeleteOne) Exec ¶
func (ido *IdeaDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IdeaDeleteOne) ExecX ¶
func (ido *IdeaDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IdeaDeleteOne) Where ¶
func (ido *IdeaDeleteOne) Where(ps ...predicate.Idea) *IdeaDeleteOne
Where appends a list predicates to the IdeaDelete builder.
type IdeaEdges ¶
type IdeaEdges struct { // Recipe holds the value of the recipe edge. Recipe *Recipe `json:"recipe,omitempty"` // contains filtered or unexported fields }
IdeaEdges holds the relations/edges for other nodes in the graph.
func (IdeaEdges) RecipeOrErr ¶
RecipeOrErr returns the Recipe value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type IdeaGroupBy ¶
type IdeaGroupBy struct {
// contains filtered or unexported fields
}
IdeaGroupBy is the group-by builder for Idea entities.
func (*IdeaGroupBy) Aggregate ¶
func (igb *IdeaGroupBy) Aggregate(fns ...AggregateFunc) *IdeaGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IdeaGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IdeaGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IdeaGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IdeaGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IdeaGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IdeaGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IdeaGroupBy) Scan ¶
func (igb *IdeaGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IdeaGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IdeaMutation ¶
type IdeaMutation struct {
// contains filtered or unexported fields
}
IdeaMutation represents an operation that mutates the Idea nodes in the graph.
func (*IdeaMutation) AddField ¶
func (m *IdeaMutation) 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 (*IdeaMutation) AddedEdges ¶
func (m *IdeaMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IdeaMutation) AddedField ¶
func (m *IdeaMutation) 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 (*IdeaMutation) AddedFields ¶
func (m *IdeaMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IdeaMutation) AddedIDs ¶
func (m *IdeaMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IdeaMutation) ClearEdge ¶
func (m *IdeaMutation) 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 (*IdeaMutation) ClearField ¶
func (m *IdeaMutation) 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 (*IdeaMutation) ClearRecipe ¶
func (m *IdeaMutation) ClearRecipe()
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*IdeaMutation) ClearedEdges ¶
func (m *IdeaMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IdeaMutation) ClearedFields ¶
func (m *IdeaMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IdeaMutation) Client ¶
func (m IdeaMutation) 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 (*IdeaMutation) EdgeCleared ¶
func (m *IdeaMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IdeaMutation) Field ¶
func (m *IdeaMutation) 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 (*IdeaMutation) FieldCleared ¶
func (m *IdeaMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IdeaMutation) Fields ¶
func (m *IdeaMutation) 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 (*IdeaMutation) ID ¶
func (m *IdeaMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*IdeaMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*IdeaMutation) 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 (*IdeaMutation) OldText ¶
func (m *IdeaMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Idea entity. If the Idea 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 (*IdeaMutation) RecipeCleared ¶
func (m *IdeaMutation) RecipeCleared() bool
RecipeCleared reports if the "recipe" edge to the Recipe entity was cleared.
func (*IdeaMutation) RecipeID ¶
func (m *IdeaMutation) RecipeID() (id uuid.UUID, exists bool)
RecipeID returns the "recipe" edge ID in the mutation.
func (*IdeaMutation) RecipeIDs ¶
func (m *IdeaMutation) RecipeIDs() (ids []uuid.UUID)
RecipeIDs returns the "recipe" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RecipeID instead. It exists only for internal usage by the builders.
func (*IdeaMutation) RemovedEdges ¶
func (m *IdeaMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IdeaMutation) RemovedIDs ¶
func (m *IdeaMutation) 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 (*IdeaMutation) ResetEdge ¶
func (m *IdeaMutation) 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 (*IdeaMutation) ResetField ¶
func (m *IdeaMutation) 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 (*IdeaMutation) ResetRecipe ¶
func (m *IdeaMutation) ResetRecipe()
ResetRecipe resets all changes to the "recipe" edge.
func (*IdeaMutation) ResetText ¶
func (m *IdeaMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*IdeaMutation) SetField ¶
func (m *IdeaMutation) 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 (*IdeaMutation) SetID ¶
func (m *IdeaMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Idea entities.
func (*IdeaMutation) SetOp ¶
func (m *IdeaMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*IdeaMutation) SetRecipeID ¶
func (m *IdeaMutation) SetRecipeID(id uuid.UUID)
SetRecipeID sets the "recipe" edge to the Recipe entity by id.
func (*IdeaMutation) SetText ¶
func (m *IdeaMutation) SetText(s string)
SetText sets the "text" field.
func (*IdeaMutation) Text ¶
func (m *IdeaMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (IdeaMutation) Tx ¶
func (m IdeaMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IdeaMutation) Type ¶
func (m *IdeaMutation) Type() string
Type returns the node type of this mutation (Idea).
func (*IdeaMutation) Where ¶
func (m *IdeaMutation) Where(ps ...predicate.Idea)
Where appends a list predicates to the IdeaMutation builder.
func (*IdeaMutation) WhereP ¶
func (m *IdeaMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the IdeaMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type IdeaQuery ¶
type IdeaQuery struct {
// contains filtered or unexported fields
}
IdeaQuery is the builder for querying Idea entities.
func (*IdeaQuery) Aggregate ¶
func (iq *IdeaQuery) Aggregate(fns ...AggregateFunc) *IdeaSelect
Aggregate returns a IdeaSelect configured with the given aggregations.
func (*IdeaQuery) Clone ¶
Clone returns a duplicate of the IdeaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IdeaQuery) First ¶
First returns the first Idea entity from the query. Returns a *NotFoundError when no Idea was found.
func (*IdeaQuery) FirstID ¶
FirstID returns the first Idea ID from the query. Returns a *NotFoundError when no Idea ID was found.
func (*IdeaQuery) GroupBy ¶
func (iq *IdeaQuery) GroupBy(field string, fields ...string) *IdeaGroupBy
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 { Text string `json:"text,omitempty"` Count int `json:"count,omitempty"` } client.Idea.Query(). GroupBy(idea.FieldText). Aggregate(ent.Count()). Scan(ctx, &v)
func (*IdeaQuery) Only ¶
Only returns a single Idea entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Idea entity is found. Returns a *NotFoundError when no Idea entities are found.
func (*IdeaQuery) OnlyID ¶
OnlyID is like Only, but returns the only Idea ID in the query. Returns a *NotSingularError when more than one Idea ID is found. Returns a *NotFoundError when no entities are found.
func (*IdeaQuery) Order ¶
func (iq *IdeaQuery) Order(o ...idea.OrderOption) *IdeaQuery
Order specifies how the records should be ordered.
func (*IdeaQuery) QueryRecipe ¶
func (iq *IdeaQuery) QueryRecipe() *RecipeQuery
QueryRecipe chains the current query on the "recipe" edge.
func (*IdeaQuery) Select ¶
func (iq *IdeaQuery) Select(fields ...string) *IdeaSelect
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 { Text string `json:"text,omitempty"` } client.Idea.Query(). Select(idea.FieldText). Scan(ctx, &v)
func (*IdeaQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*IdeaQuery) WithRecipe ¶
func (iq *IdeaQuery) WithRecipe(opts ...func(*RecipeQuery)) *IdeaQuery
WithRecipe tells the query-builder to eager-load the nodes that are connected to the "recipe" edge. The optional arguments are used to configure the query builder of the edge.
type IdeaSelect ¶
type IdeaSelect struct { *IdeaQuery // contains filtered or unexported fields }
IdeaSelect is the builder for selecting fields of Idea entities.
func (*IdeaSelect) Aggregate ¶
func (is *IdeaSelect) Aggregate(fns ...AggregateFunc) *IdeaSelect
Aggregate adds the given aggregation functions to the selector query.
func (*IdeaSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IdeaSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IdeaSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IdeaSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IdeaSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IdeaSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IdeaSelect) Scan ¶
func (is *IdeaSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IdeaSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IdeaUpdate ¶
type IdeaUpdate struct {
// contains filtered or unexported fields
}
IdeaUpdate is the builder for updating Idea entities.
func (*IdeaUpdate) ClearRecipe ¶
func (iu *IdeaUpdate) ClearRecipe() *IdeaUpdate
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*IdeaUpdate) Exec ¶
func (iu *IdeaUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IdeaUpdate) ExecX ¶
func (iu *IdeaUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IdeaUpdate) Mutation ¶
func (iu *IdeaUpdate) Mutation() *IdeaMutation
Mutation returns the IdeaMutation object of the builder.
func (*IdeaUpdate) Save ¶
func (iu *IdeaUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IdeaUpdate) SaveX ¶
func (iu *IdeaUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IdeaUpdate) SetNillableRecipeID ¶
func (iu *IdeaUpdate) SetNillableRecipeID(id *uuid.UUID) *IdeaUpdate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*IdeaUpdate) SetNillableText ¶
func (iu *IdeaUpdate) SetNillableText(s *string) *IdeaUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*IdeaUpdate) SetRecipe ¶
func (iu *IdeaUpdate) SetRecipe(r *Recipe) *IdeaUpdate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*IdeaUpdate) SetRecipeID ¶
func (iu *IdeaUpdate) SetRecipeID(id uuid.UUID) *IdeaUpdate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*IdeaUpdate) SetText ¶
func (iu *IdeaUpdate) SetText(s string) *IdeaUpdate
SetText sets the "text" field.
func (*IdeaUpdate) Where ¶
func (iu *IdeaUpdate) Where(ps ...predicate.Idea) *IdeaUpdate
Where appends a list predicates to the IdeaUpdate builder.
type IdeaUpdateOne ¶
type IdeaUpdateOne struct {
// contains filtered or unexported fields
}
IdeaUpdateOne is the builder for updating a single Idea entity.
func (*IdeaUpdateOne) ClearRecipe ¶
func (iuo *IdeaUpdateOne) ClearRecipe() *IdeaUpdateOne
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*IdeaUpdateOne) Exec ¶
func (iuo *IdeaUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IdeaUpdateOne) ExecX ¶
func (iuo *IdeaUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IdeaUpdateOne) Mutation ¶
func (iuo *IdeaUpdateOne) Mutation() *IdeaMutation
Mutation returns the IdeaMutation object of the builder.
func (*IdeaUpdateOne) Save ¶
func (iuo *IdeaUpdateOne) Save(ctx context.Context) (*Idea, error)
Save executes the query and returns the updated Idea entity.
func (*IdeaUpdateOne) SaveX ¶
func (iuo *IdeaUpdateOne) SaveX(ctx context.Context) *Idea
SaveX is like Save, but panics if an error occurs.
func (*IdeaUpdateOne) Select ¶
func (iuo *IdeaUpdateOne) Select(field string, fields ...string) *IdeaUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IdeaUpdateOne) SetNillableRecipeID ¶
func (iuo *IdeaUpdateOne) SetNillableRecipeID(id *uuid.UUID) *IdeaUpdateOne
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*IdeaUpdateOne) SetNillableText ¶
func (iuo *IdeaUpdateOne) SetNillableText(s *string) *IdeaUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*IdeaUpdateOne) SetRecipe ¶
func (iuo *IdeaUpdateOne) SetRecipe(r *Recipe) *IdeaUpdateOne
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*IdeaUpdateOne) SetRecipeID ¶
func (iuo *IdeaUpdateOne) SetRecipeID(id uuid.UUID) *IdeaUpdateOne
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*IdeaUpdateOne) SetText ¶
func (iuo *IdeaUpdateOne) SetText(s string) *IdeaUpdateOne
SetText sets the "text" field.
func (*IdeaUpdateOne) Where ¶
func (iuo *IdeaUpdateOne) Where(ps ...predicate.Idea) *IdeaUpdateOne
Where appends a list predicates to the IdeaUpdate builder.
type Ingredient ¶
type Ingredient struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Quantity holds the value of the "quantity" field. Quantity string `json:"quantity,omitempty"` // Unit holds the value of the "unit" field. Unit string `json:"unit,omitempty"` // RecipeID holds the value of the "recipe_id" field. RecipeID uuid.UUID `json:"recipe_id,omitempty"` // ProductID holds the value of the "product_id" field. ProductID uuid.UUID `json:"product_id,omitempty"` // Optional holds the value of the "optional" field. Optional bool `json:"optional,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the IngredientQuery when eager-loading is set. Edges IngredientEdges `json:"edges"` // contains filtered or unexported fields }
Ingredient is the model entity for the Ingredient schema.
func (*Ingredient) QueryProduct ¶
func (i *Ingredient) QueryProduct() *ProductQuery
QueryProduct queries the "product" edge of the Ingredient entity.
func (*Ingredient) QueryRecipe ¶
func (i *Ingredient) QueryRecipe() *RecipeQuery
QueryRecipe queries the "recipe" edge of the Ingredient entity.
func (*Ingredient) String ¶
func (i *Ingredient) String() string
String implements the fmt.Stringer.
func (*Ingredient) Unwrap ¶
func (i *Ingredient) Unwrap() *Ingredient
Unwrap unwraps the Ingredient 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 (*Ingredient) Update ¶
func (i *Ingredient) Update() *IngredientUpdateOne
Update returns a builder for updating this Ingredient. Note that you need to call Ingredient.Unwrap() before calling this method if this Ingredient was returned from a transaction, and the transaction was committed or rolled back.
type IngredientClient ¶
type IngredientClient struct {
// contains filtered or unexported fields
}
IngredientClient is a client for the Ingredient schema.
func NewIngredientClient ¶
func NewIngredientClient(c config) *IngredientClient
NewIngredientClient returns a client for the Ingredient from the given config.
func (*IngredientClient) Create ¶
func (c *IngredientClient) Create() *IngredientCreate
Create returns a builder for creating a Ingredient entity.
func (*IngredientClient) CreateBulk ¶
func (c *IngredientClient) CreateBulk(builders ...*IngredientCreate) *IngredientCreateBulk
CreateBulk returns a builder for creating a bulk of Ingredient entities.
func (*IngredientClient) Delete ¶
func (c *IngredientClient) Delete() *IngredientDelete
Delete returns a delete builder for Ingredient.
func (*IngredientClient) DeleteOne ¶
func (c *IngredientClient) DeleteOne(i *Ingredient) *IngredientDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*IngredientClient) DeleteOneID ¶
func (c *IngredientClient) DeleteOneID(id uuid.UUID) *IngredientDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*IngredientClient) Get ¶
func (c *IngredientClient) Get(ctx context.Context, id uuid.UUID) (*Ingredient, error)
Get returns a Ingredient entity by its id.
func (*IngredientClient) GetX ¶
func (c *IngredientClient) GetX(ctx context.Context, id uuid.UUID) *Ingredient
GetX is like Get, but panics if an error occurs.
func (*IngredientClient) Hooks ¶
func (c *IngredientClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IngredientClient) Intercept ¶
func (c *IngredientClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ingredient.Intercept(f(g(h())))`.
func (*IngredientClient) Interceptors ¶
func (c *IngredientClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*IngredientClient) MapCreateBulk ¶
func (c *IngredientClient) MapCreateBulk(slice any, setFunc func(*IngredientCreate, int)) *IngredientCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*IngredientClient) Query ¶
func (c *IngredientClient) Query() *IngredientQuery
Query returns a query builder for Ingredient.
func (*IngredientClient) QueryProduct ¶
func (c *IngredientClient) QueryProduct(i *Ingredient) *ProductQuery
QueryProduct queries the product edge of a Ingredient.
func (*IngredientClient) QueryRecipe ¶
func (c *IngredientClient) QueryRecipe(i *Ingredient) *RecipeQuery
QueryRecipe queries the recipe edge of a Ingredient.
func (*IngredientClient) Update ¶
func (c *IngredientClient) Update() *IngredientUpdate
Update returns an update builder for Ingredient.
func (*IngredientClient) UpdateOne ¶
func (c *IngredientClient) UpdateOne(i *Ingredient) *IngredientUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IngredientClient) UpdateOneID ¶
func (c *IngredientClient) UpdateOneID(id uuid.UUID) *IngredientUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IngredientClient) Use ¶
func (c *IngredientClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ingredient.Hooks(f(g(h())))`.
type IngredientCreate ¶
type IngredientCreate struct {
// contains filtered or unexported fields
}
IngredientCreate is the builder for creating a Ingredient entity.
func (*IngredientCreate) Exec ¶
func (ic *IngredientCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*IngredientCreate) ExecX ¶
func (ic *IngredientCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IngredientCreate) Mutation ¶
func (ic *IngredientCreate) Mutation() *IngredientMutation
Mutation returns the IngredientMutation object of the builder.
func (*IngredientCreate) Save ¶
func (ic *IngredientCreate) Save(ctx context.Context) (*Ingredient, error)
Save creates the Ingredient in the database.
func (*IngredientCreate) SaveX ¶
func (ic *IngredientCreate) SaveX(ctx context.Context) *Ingredient
SaveX calls Save and panics if Save returns an error.
func (*IngredientCreate) SetCreateTime ¶
func (ic *IngredientCreate) SetCreateTime(t time.Time) *IngredientCreate
SetCreateTime sets the "create_time" field.
func (*IngredientCreate) SetID ¶
func (ic *IngredientCreate) SetID(u uuid.UUID) *IngredientCreate
SetID sets the "id" field.
func (*IngredientCreate) SetNillableCreateTime ¶
func (ic *IngredientCreate) SetNillableCreateTime(t *time.Time) *IngredientCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*IngredientCreate) SetNillableID ¶
func (ic *IngredientCreate) SetNillableID(u *uuid.UUID) *IngredientCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*IngredientCreate) SetNillableOptional ¶
func (ic *IngredientCreate) SetNillableOptional(b *bool) *IngredientCreate
SetNillableOptional sets the "optional" field if the given value is not nil.
func (*IngredientCreate) SetNillableQuantity ¶
func (ic *IngredientCreate) SetNillableQuantity(s *string) *IngredientCreate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*IngredientCreate) SetNillableUnit ¶
func (ic *IngredientCreate) SetNillableUnit(s *string) *IngredientCreate
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*IngredientCreate) SetNillableUpdateTime ¶
func (ic *IngredientCreate) SetNillableUpdateTime(t *time.Time) *IngredientCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*IngredientCreate) SetOptional ¶
func (ic *IngredientCreate) SetOptional(b bool) *IngredientCreate
SetOptional sets the "optional" field.
func (*IngredientCreate) SetProduct ¶
func (ic *IngredientCreate) SetProduct(p *Product) *IngredientCreate
SetProduct sets the "product" edge to the Product entity.
func (*IngredientCreate) SetProductID ¶
func (ic *IngredientCreate) SetProductID(u uuid.UUID) *IngredientCreate
SetProductID sets the "product_id" field.
func (*IngredientCreate) SetQuantity ¶
func (ic *IngredientCreate) SetQuantity(s string) *IngredientCreate
SetQuantity sets the "quantity" field.
func (*IngredientCreate) SetRecipe ¶
func (ic *IngredientCreate) SetRecipe(r *Recipe) *IngredientCreate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*IngredientCreate) SetRecipeID ¶
func (ic *IngredientCreate) SetRecipeID(u uuid.UUID) *IngredientCreate
SetRecipeID sets the "recipe_id" field.
func (*IngredientCreate) SetUnit ¶
func (ic *IngredientCreate) SetUnit(s string) *IngredientCreate
SetUnit sets the "unit" field.
func (*IngredientCreate) SetUpdateTime ¶
func (ic *IngredientCreate) SetUpdateTime(t time.Time) *IngredientCreate
SetUpdateTime sets the "update_time" field.
type IngredientCreateBulk ¶
type IngredientCreateBulk struct {
// contains filtered or unexported fields
}
IngredientCreateBulk is the builder for creating many Ingredient entities in bulk.
func (*IngredientCreateBulk) Exec ¶
func (icb *IngredientCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IngredientCreateBulk) ExecX ¶
func (icb *IngredientCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IngredientCreateBulk) Save ¶
func (icb *IngredientCreateBulk) Save(ctx context.Context) ([]*Ingredient, error)
Save creates the Ingredient entities in the database.
func (*IngredientCreateBulk) SaveX ¶
func (icb *IngredientCreateBulk) SaveX(ctx context.Context) []*Ingredient
SaveX is like Save, but panics if an error occurs.
type IngredientDelete ¶
type IngredientDelete struct {
// contains filtered or unexported fields
}
IngredientDelete is the builder for deleting a Ingredient entity.
func (*IngredientDelete) Exec ¶
func (id *IngredientDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IngredientDelete) ExecX ¶
func (id *IngredientDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IngredientDelete) Where ¶
func (id *IngredientDelete) Where(ps ...predicate.Ingredient) *IngredientDelete
Where appends a list predicates to the IngredientDelete builder.
type IngredientDeleteOne ¶
type IngredientDeleteOne struct {
// contains filtered or unexported fields
}
IngredientDeleteOne is the builder for deleting a single Ingredient entity.
func (*IngredientDeleteOne) Exec ¶
func (ido *IngredientDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IngredientDeleteOne) ExecX ¶
func (ido *IngredientDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IngredientDeleteOne) Where ¶
func (ido *IngredientDeleteOne) Where(ps ...predicate.Ingredient) *IngredientDeleteOne
Where appends a list predicates to the IngredientDelete builder.
type IngredientEdges ¶
type IngredientEdges struct { // Recipe holds the value of the recipe edge. Recipe *Recipe `json:"recipe,omitempty"` // Product holds the value of the product edge. Product *Product `json:"product,omitempty"` // contains filtered or unexported fields }
IngredientEdges holds the relations/edges for other nodes in the graph.
func (IngredientEdges) ProductOrErr ¶
func (e IngredientEdges) ProductOrErr() (*Product, error)
ProductOrErr returns the Product value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (IngredientEdges) RecipeOrErr ¶
func (e IngredientEdges) RecipeOrErr() (*Recipe, error)
RecipeOrErr returns the Recipe value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type IngredientGroupBy ¶
type IngredientGroupBy struct {
// contains filtered or unexported fields
}
IngredientGroupBy is the group-by builder for Ingredient entities.
func (*IngredientGroupBy) Aggregate ¶
func (igb *IngredientGroupBy) Aggregate(fns ...AggregateFunc) *IngredientGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IngredientGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IngredientGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IngredientGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IngredientGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IngredientGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IngredientGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IngredientGroupBy) Scan ¶
func (igb *IngredientGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IngredientGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IngredientMutation ¶
type IngredientMutation struct {
// contains filtered or unexported fields
}
IngredientMutation represents an operation that mutates the Ingredient nodes in the graph.
func (*IngredientMutation) AddField ¶
func (m *IngredientMutation) 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 (*IngredientMutation) AddedEdges ¶
func (m *IngredientMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IngredientMutation) AddedField ¶
func (m *IngredientMutation) 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 (*IngredientMutation) AddedFields ¶
func (m *IngredientMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IngredientMutation) AddedIDs ¶
func (m *IngredientMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IngredientMutation) ClearEdge ¶
func (m *IngredientMutation) 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 (*IngredientMutation) ClearField ¶
func (m *IngredientMutation) 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 (*IngredientMutation) ClearProduct ¶
func (m *IngredientMutation) ClearProduct()
ClearProduct clears the "product" edge to the Product entity.
func (*IngredientMutation) ClearQuantity ¶
func (m *IngredientMutation) ClearQuantity()
ClearQuantity clears the value of the "quantity" field.
func (*IngredientMutation) ClearRecipe ¶
func (m *IngredientMutation) ClearRecipe()
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*IngredientMutation) ClearUnit ¶
func (m *IngredientMutation) ClearUnit()
ClearUnit clears the value of the "unit" field.
func (*IngredientMutation) ClearedEdges ¶
func (m *IngredientMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IngredientMutation) ClearedFields ¶
func (m *IngredientMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IngredientMutation) Client ¶
func (m IngredientMutation) 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 (*IngredientMutation) CreateTime ¶
func (m *IngredientMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*IngredientMutation) EdgeCleared ¶
func (m *IngredientMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IngredientMutation) Field ¶
func (m *IngredientMutation) 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 (*IngredientMutation) FieldCleared ¶
func (m *IngredientMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IngredientMutation) Fields ¶
func (m *IngredientMutation) 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 (*IngredientMutation) ID ¶
func (m *IngredientMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*IngredientMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*IngredientMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Ingredient entity. If the Ingredient 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 (*IngredientMutation) 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 (*IngredientMutation) OldOptional ¶
func (m *IngredientMutation) OldOptional(ctx context.Context) (v bool, err error)
OldOptional returns the old "optional" field's value of the Ingredient entity. If the Ingredient 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 (*IngredientMutation) OldProductID ¶
OldProductID returns the old "product_id" field's value of the Ingredient entity. If the Ingredient 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 (*IngredientMutation) OldQuantity ¶
func (m *IngredientMutation) OldQuantity(ctx context.Context) (v string, err error)
OldQuantity returns the old "quantity" field's value of the Ingredient entity. If the Ingredient 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 (*IngredientMutation) OldRecipeID ¶
OldRecipeID returns the old "recipe_id" field's value of the Ingredient entity. If the Ingredient 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 (*IngredientMutation) OldUnit ¶
func (m *IngredientMutation) OldUnit(ctx context.Context) (v string, err error)
OldUnit returns the old "unit" field's value of the Ingredient entity. If the Ingredient 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 (*IngredientMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Ingredient entity. If the Ingredient 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 (*IngredientMutation) Optional ¶
func (m *IngredientMutation) Optional() (r bool, exists bool)
Optional returns the value of the "optional" field in the mutation.
func (*IngredientMutation) ProductCleared ¶
func (m *IngredientMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the Product entity was cleared.
func (*IngredientMutation) ProductID ¶
func (m *IngredientMutation) ProductID() (r uuid.UUID, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*IngredientMutation) ProductIDs ¶
func (m *IngredientMutation) ProductIDs() (ids []uuid.UUID)
ProductIDs returns the "product" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductID instead. It exists only for internal usage by the builders.
func (*IngredientMutation) Quantity ¶
func (m *IngredientMutation) Quantity() (r string, exists bool)
Quantity returns the value of the "quantity" field in the mutation.
func (*IngredientMutation) QuantityCleared ¶
func (m *IngredientMutation) QuantityCleared() bool
QuantityCleared returns if the "quantity" field was cleared in this mutation.
func (*IngredientMutation) RecipeCleared ¶
func (m *IngredientMutation) RecipeCleared() bool
RecipeCleared reports if the "recipe" edge to the Recipe entity was cleared.
func (*IngredientMutation) RecipeID ¶
func (m *IngredientMutation) RecipeID() (r uuid.UUID, exists bool)
RecipeID returns the value of the "recipe_id" field in the mutation.
func (*IngredientMutation) RecipeIDs ¶
func (m *IngredientMutation) RecipeIDs() (ids []uuid.UUID)
RecipeIDs returns the "recipe" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RecipeID instead. It exists only for internal usage by the builders.
func (*IngredientMutation) RemovedEdges ¶
func (m *IngredientMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IngredientMutation) RemovedIDs ¶
func (m *IngredientMutation) 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 (*IngredientMutation) ResetCreateTime ¶
func (m *IngredientMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*IngredientMutation) ResetEdge ¶
func (m *IngredientMutation) 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 (*IngredientMutation) ResetField ¶
func (m *IngredientMutation) 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 (*IngredientMutation) ResetOptional ¶
func (m *IngredientMutation) ResetOptional()
ResetOptional resets all changes to the "optional" field.
func (*IngredientMutation) ResetProduct ¶
func (m *IngredientMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*IngredientMutation) ResetProductID ¶
func (m *IngredientMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*IngredientMutation) ResetQuantity ¶
func (m *IngredientMutation) ResetQuantity()
ResetQuantity resets all changes to the "quantity" field.
func (*IngredientMutation) ResetRecipe ¶
func (m *IngredientMutation) ResetRecipe()
ResetRecipe resets all changes to the "recipe" edge.
func (*IngredientMutation) ResetRecipeID ¶
func (m *IngredientMutation) ResetRecipeID()
ResetRecipeID resets all changes to the "recipe_id" field.
func (*IngredientMutation) ResetUnit ¶
func (m *IngredientMutation) ResetUnit()
ResetUnit resets all changes to the "unit" field.
func (*IngredientMutation) ResetUpdateTime ¶
func (m *IngredientMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*IngredientMutation) SetCreateTime ¶
func (m *IngredientMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*IngredientMutation) SetField ¶
func (m *IngredientMutation) 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 (*IngredientMutation) SetID ¶
func (m *IngredientMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Ingredient entities.
func (*IngredientMutation) SetOp ¶
func (m *IngredientMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*IngredientMutation) SetOptional ¶
func (m *IngredientMutation) SetOptional(b bool)
SetOptional sets the "optional" field.
func (*IngredientMutation) SetProductID ¶
func (m *IngredientMutation) SetProductID(u uuid.UUID)
SetProductID sets the "product_id" field.
func (*IngredientMutation) SetQuantity ¶
func (m *IngredientMutation) SetQuantity(s string)
SetQuantity sets the "quantity" field.
func (*IngredientMutation) SetRecipeID ¶
func (m *IngredientMutation) SetRecipeID(u uuid.UUID)
SetRecipeID sets the "recipe_id" field.
func (*IngredientMutation) SetUnit ¶
func (m *IngredientMutation) SetUnit(s string)
SetUnit sets the "unit" field.
func (*IngredientMutation) SetUpdateTime ¶
func (m *IngredientMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (IngredientMutation) Tx ¶
func (m IngredientMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IngredientMutation) Type ¶
func (m *IngredientMutation) Type() string
Type returns the node type of this mutation (Ingredient).
func (*IngredientMutation) Unit ¶
func (m *IngredientMutation) Unit() (r string, exists bool)
Unit returns the value of the "unit" field in the mutation.
func (*IngredientMutation) UnitCleared ¶
func (m *IngredientMutation) UnitCleared() bool
UnitCleared returns if the "unit" field was cleared in this mutation.
func (*IngredientMutation) UpdateTime ¶
func (m *IngredientMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*IngredientMutation) Where ¶
func (m *IngredientMutation) Where(ps ...predicate.Ingredient)
Where appends a list predicates to the IngredientMutation builder.
func (*IngredientMutation) WhereP ¶
func (m *IngredientMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the IngredientMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type IngredientQuery ¶
type IngredientQuery struct {
// contains filtered or unexported fields
}
IngredientQuery is the builder for querying Ingredient entities.
func (*IngredientQuery) Aggregate ¶
func (iq *IngredientQuery) Aggregate(fns ...AggregateFunc) *IngredientSelect
Aggregate returns a IngredientSelect configured with the given aggregations.
func (*IngredientQuery) All ¶
func (iq *IngredientQuery) All(ctx context.Context) ([]*Ingredient, error)
All executes the query and returns a list of Ingredients.
func (*IngredientQuery) AllX ¶
func (iq *IngredientQuery) AllX(ctx context.Context) []*Ingredient
AllX is like All, but panics if an error occurs.
func (*IngredientQuery) Clone ¶
func (iq *IngredientQuery) Clone() *IngredientQuery
Clone returns a duplicate of the IngredientQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IngredientQuery) Count ¶
func (iq *IngredientQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IngredientQuery) CountX ¶
func (iq *IngredientQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IngredientQuery) Exist ¶
func (iq *IngredientQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IngredientQuery) ExistX ¶
func (iq *IngredientQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IngredientQuery) First ¶
func (iq *IngredientQuery) First(ctx context.Context) (*Ingredient, error)
First returns the first Ingredient entity from the query. Returns a *NotFoundError when no Ingredient was found.
func (*IngredientQuery) FirstID ¶
FirstID returns the first Ingredient ID from the query. Returns a *NotFoundError when no Ingredient ID was found.
func (*IngredientQuery) FirstIDX ¶
func (iq *IngredientQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*IngredientQuery) FirstX ¶
func (iq *IngredientQuery) FirstX(ctx context.Context) *Ingredient
FirstX is like First, but panics if an error occurs.
func (*IngredientQuery) GroupBy ¶
func (iq *IngredientQuery) GroupBy(field string, fields ...string) *IngredientGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Ingredient.Query(). GroupBy(ingredient.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*IngredientQuery) IDsX ¶
func (iq *IngredientQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*IngredientQuery) Limit ¶
func (iq *IngredientQuery) Limit(limit int) *IngredientQuery
Limit the number of records to be returned by this query.
func (*IngredientQuery) Offset ¶
func (iq *IngredientQuery) Offset(offset int) *IngredientQuery
Offset to start from.
func (*IngredientQuery) Only ¶
func (iq *IngredientQuery) Only(ctx context.Context) (*Ingredient, error)
Only returns a single Ingredient entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Ingredient entity is found. Returns a *NotFoundError when no Ingredient entities are found.
func (*IngredientQuery) OnlyID ¶
OnlyID is like Only, but returns the only Ingredient ID in the query. Returns a *NotSingularError when more than one Ingredient ID is found. Returns a *NotFoundError when no entities are found.
func (*IngredientQuery) OnlyIDX ¶
func (iq *IngredientQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IngredientQuery) OnlyX ¶
func (iq *IngredientQuery) OnlyX(ctx context.Context) *Ingredient
OnlyX is like Only, but panics if an error occurs.
func (*IngredientQuery) Order ¶
func (iq *IngredientQuery) Order(o ...ingredient.OrderOption) *IngredientQuery
Order specifies how the records should be ordered.
func (*IngredientQuery) QueryProduct ¶
func (iq *IngredientQuery) QueryProduct() *ProductQuery
QueryProduct chains the current query on the "product" edge.
func (*IngredientQuery) QueryRecipe ¶
func (iq *IngredientQuery) QueryRecipe() *RecipeQuery
QueryRecipe chains the current query on the "recipe" edge.
func (*IngredientQuery) Select ¶
func (iq *IngredientQuery) Select(fields ...string) *IngredientSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Ingredient.Query(). Select(ingredient.FieldCreateTime). Scan(ctx, &v)
func (*IngredientQuery) Unique ¶
func (iq *IngredientQuery) Unique(unique bool) *IngredientQuery
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 (*IngredientQuery) Where ¶
func (iq *IngredientQuery) Where(ps ...predicate.Ingredient) *IngredientQuery
Where adds a new predicate for the IngredientQuery builder.
func (*IngredientQuery) WithProduct ¶
func (iq *IngredientQuery) WithProduct(opts ...func(*ProductQuery)) *IngredientQuery
WithProduct tells the query-builder to eager-load the nodes that are connected to the "product" edge. The optional arguments are used to configure the query builder of the edge.
func (*IngredientQuery) WithRecipe ¶
func (iq *IngredientQuery) WithRecipe(opts ...func(*RecipeQuery)) *IngredientQuery
WithRecipe tells the query-builder to eager-load the nodes that are connected to the "recipe" edge. The optional arguments are used to configure the query builder of the edge.
type IngredientSelect ¶
type IngredientSelect struct { *IngredientQuery // contains filtered or unexported fields }
IngredientSelect is the builder for selecting fields of Ingredient entities.
func (*IngredientSelect) Aggregate ¶
func (is *IngredientSelect) Aggregate(fns ...AggregateFunc) *IngredientSelect
Aggregate adds the given aggregation functions to the selector query.
func (*IngredientSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IngredientSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IngredientSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IngredientSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IngredientSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IngredientSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IngredientSelect) Scan ¶
func (is *IngredientSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IngredientSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IngredientUpdate ¶
type IngredientUpdate struct {
// contains filtered or unexported fields
}
IngredientUpdate is the builder for updating Ingredient entities.
func (*IngredientUpdate) ClearProduct ¶
func (iu *IngredientUpdate) ClearProduct() *IngredientUpdate
ClearProduct clears the "product" edge to the Product entity.
func (*IngredientUpdate) ClearQuantity ¶
func (iu *IngredientUpdate) ClearQuantity() *IngredientUpdate
ClearQuantity clears the value of the "quantity" field.
func (*IngredientUpdate) ClearRecipe ¶
func (iu *IngredientUpdate) ClearRecipe() *IngredientUpdate
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*IngredientUpdate) ClearUnit ¶
func (iu *IngredientUpdate) ClearUnit() *IngredientUpdate
ClearUnit clears the value of the "unit" field.
func (*IngredientUpdate) Exec ¶
func (iu *IngredientUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IngredientUpdate) ExecX ¶
func (iu *IngredientUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IngredientUpdate) Mutation ¶
func (iu *IngredientUpdate) Mutation() *IngredientMutation
Mutation returns the IngredientMutation object of the builder.
func (*IngredientUpdate) Save ¶
func (iu *IngredientUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IngredientUpdate) SaveX ¶
func (iu *IngredientUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IngredientUpdate) SetNillableOptional ¶
func (iu *IngredientUpdate) SetNillableOptional(b *bool) *IngredientUpdate
SetNillableOptional sets the "optional" field if the given value is not nil.
func (*IngredientUpdate) SetNillableProductID ¶
func (iu *IngredientUpdate) SetNillableProductID(u *uuid.UUID) *IngredientUpdate
SetNillableProductID sets the "product_id" field if the given value is not nil.
func (*IngredientUpdate) SetNillableQuantity ¶
func (iu *IngredientUpdate) SetNillableQuantity(s *string) *IngredientUpdate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*IngredientUpdate) SetNillableRecipeID ¶
func (iu *IngredientUpdate) SetNillableRecipeID(u *uuid.UUID) *IngredientUpdate
SetNillableRecipeID sets the "recipe_id" field if the given value is not nil.
func (*IngredientUpdate) SetNillableUnit ¶
func (iu *IngredientUpdate) SetNillableUnit(s *string) *IngredientUpdate
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*IngredientUpdate) SetOptional ¶
func (iu *IngredientUpdate) SetOptional(b bool) *IngredientUpdate
SetOptional sets the "optional" field.
func (*IngredientUpdate) SetProduct ¶
func (iu *IngredientUpdate) SetProduct(p *Product) *IngredientUpdate
SetProduct sets the "product" edge to the Product entity.
func (*IngredientUpdate) SetProductID ¶
func (iu *IngredientUpdate) SetProductID(u uuid.UUID) *IngredientUpdate
SetProductID sets the "product_id" field.
func (*IngredientUpdate) SetQuantity ¶
func (iu *IngredientUpdate) SetQuantity(s string) *IngredientUpdate
SetQuantity sets the "quantity" field.
func (*IngredientUpdate) SetRecipe ¶
func (iu *IngredientUpdate) SetRecipe(r *Recipe) *IngredientUpdate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*IngredientUpdate) SetRecipeID ¶
func (iu *IngredientUpdate) SetRecipeID(u uuid.UUID) *IngredientUpdate
SetRecipeID sets the "recipe_id" field.
func (*IngredientUpdate) SetUnit ¶
func (iu *IngredientUpdate) SetUnit(s string) *IngredientUpdate
SetUnit sets the "unit" field.
func (*IngredientUpdate) SetUpdateTime ¶
func (iu *IngredientUpdate) SetUpdateTime(t time.Time) *IngredientUpdate
SetUpdateTime sets the "update_time" field.
func (*IngredientUpdate) Where ¶
func (iu *IngredientUpdate) Where(ps ...predicate.Ingredient) *IngredientUpdate
Where appends a list predicates to the IngredientUpdate builder.
type IngredientUpdateOne ¶
type IngredientUpdateOne struct {
// contains filtered or unexported fields
}
IngredientUpdateOne is the builder for updating a single Ingredient entity.
func (*IngredientUpdateOne) ClearProduct ¶
func (iuo *IngredientUpdateOne) ClearProduct() *IngredientUpdateOne
ClearProduct clears the "product" edge to the Product entity.
func (*IngredientUpdateOne) ClearQuantity ¶
func (iuo *IngredientUpdateOne) ClearQuantity() *IngredientUpdateOne
ClearQuantity clears the value of the "quantity" field.
func (*IngredientUpdateOne) ClearRecipe ¶
func (iuo *IngredientUpdateOne) ClearRecipe() *IngredientUpdateOne
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*IngredientUpdateOne) ClearUnit ¶
func (iuo *IngredientUpdateOne) ClearUnit() *IngredientUpdateOne
ClearUnit clears the value of the "unit" field.
func (*IngredientUpdateOne) Exec ¶
func (iuo *IngredientUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IngredientUpdateOne) ExecX ¶
func (iuo *IngredientUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IngredientUpdateOne) Mutation ¶
func (iuo *IngredientUpdateOne) Mutation() *IngredientMutation
Mutation returns the IngredientMutation object of the builder.
func (*IngredientUpdateOne) Save ¶
func (iuo *IngredientUpdateOne) Save(ctx context.Context) (*Ingredient, error)
Save executes the query and returns the updated Ingredient entity.
func (*IngredientUpdateOne) SaveX ¶
func (iuo *IngredientUpdateOne) SaveX(ctx context.Context) *Ingredient
SaveX is like Save, but panics if an error occurs.
func (*IngredientUpdateOne) Select ¶
func (iuo *IngredientUpdateOne) Select(field string, fields ...string) *IngredientUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IngredientUpdateOne) SetNillableOptional ¶
func (iuo *IngredientUpdateOne) SetNillableOptional(b *bool) *IngredientUpdateOne
SetNillableOptional sets the "optional" field if the given value is not nil.
func (*IngredientUpdateOne) SetNillableProductID ¶
func (iuo *IngredientUpdateOne) SetNillableProductID(u *uuid.UUID) *IngredientUpdateOne
SetNillableProductID sets the "product_id" field if the given value is not nil.
func (*IngredientUpdateOne) SetNillableQuantity ¶
func (iuo *IngredientUpdateOne) SetNillableQuantity(s *string) *IngredientUpdateOne
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*IngredientUpdateOne) SetNillableRecipeID ¶
func (iuo *IngredientUpdateOne) SetNillableRecipeID(u *uuid.UUID) *IngredientUpdateOne
SetNillableRecipeID sets the "recipe_id" field if the given value is not nil.
func (*IngredientUpdateOne) SetNillableUnit ¶
func (iuo *IngredientUpdateOne) SetNillableUnit(s *string) *IngredientUpdateOne
SetNillableUnit sets the "unit" field if the given value is not nil.
func (*IngredientUpdateOne) SetOptional ¶
func (iuo *IngredientUpdateOne) SetOptional(b bool) *IngredientUpdateOne
SetOptional sets the "optional" field.
func (*IngredientUpdateOne) SetProduct ¶
func (iuo *IngredientUpdateOne) SetProduct(p *Product) *IngredientUpdateOne
SetProduct sets the "product" edge to the Product entity.
func (*IngredientUpdateOne) SetProductID ¶
func (iuo *IngredientUpdateOne) SetProductID(u uuid.UUID) *IngredientUpdateOne
SetProductID sets the "product_id" field.
func (*IngredientUpdateOne) SetQuantity ¶
func (iuo *IngredientUpdateOne) SetQuantity(s string) *IngredientUpdateOne
SetQuantity sets the "quantity" field.
func (*IngredientUpdateOne) SetRecipe ¶
func (iuo *IngredientUpdateOne) SetRecipe(r *Recipe) *IngredientUpdateOne
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*IngredientUpdateOne) SetRecipeID ¶
func (iuo *IngredientUpdateOne) SetRecipeID(u uuid.UUID) *IngredientUpdateOne
SetRecipeID sets the "recipe_id" field.
func (*IngredientUpdateOne) SetUnit ¶
func (iuo *IngredientUpdateOne) SetUnit(s string) *IngredientUpdateOne
SetUnit sets the "unit" field.
func (*IngredientUpdateOne) SetUpdateTime ¶
func (iuo *IngredientUpdateOne) SetUpdateTime(t time.Time) *IngredientUpdateOne
SetUpdateTime sets the "update_time" field.
func (*IngredientUpdateOne) Where ¶
func (iuo *IngredientUpdateOne) Where(ps ...predicate.Ingredient) *IngredientUpdateOne
Where appends a list predicates to the IngredientUpdate builder.
type Instruction ¶
type Instruction struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Order holds the value of the "order" field. Order int `json:"order,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InstructionQuery when eager-loading is set. Edges InstructionEdges `json:"edges"` // contains filtered or unexported fields }
Instruction is the model entity for the Instruction schema.
func (*Instruction) QueryRecipe ¶
func (i *Instruction) QueryRecipe() *RecipeQuery
QueryRecipe queries the "recipe" edge of the Instruction entity.
func (*Instruction) String ¶
func (i *Instruction) String() string
String implements the fmt.Stringer.
func (*Instruction) Unwrap ¶
func (i *Instruction) Unwrap() *Instruction
Unwrap unwraps the Instruction 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 (*Instruction) Update ¶
func (i *Instruction) Update() *InstructionUpdateOne
Update returns a builder for updating this Instruction. Note that you need to call Instruction.Unwrap() before calling this method if this Instruction was returned from a transaction, and the transaction was committed or rolled back.
type InstructionClient ¶
type InstructionClient struct {
// contains filtered or unexported fields
}
InstructionClient is a client for the Instruction schema.
func NewInstructionClient ¶
func NewInstructionClient(c config) *InstructionClient
NewInstructionClient returns a client for the Instruction from the given config.
func (*InstructionClient) Create ¶
func (c *InstructionClient) Create() *InstructionCreate
Create returns a builder for creating a Instruction entity.
func (*InstructionClient) CreateBulk ¶
func (c *InstructionClient) CreateBulk(builders ...*InstructionCreate) *InstructionCreateBulk
CreateBulk returns a builder for creating a bulk of Instruction entities.
func (*InstructionClient) Delete ¶
func (c *InstructionClient) Delete() *InstructionDelete
Delete returns a delete builder for Instruction.
func (*InstructionClient) DeleteOne ¶
func (c *InstructionClient) DeleteOne(i *Instruction) *InstructionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InstructionClient) DeleteOneID ¶
func (c *InstructionClient) DeleteOneID(id uuid.UUID) *InstructionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InstructionClient) Get ¶
func (c *InstructionClient) Get(ctx context.Context, id uuid.UUID) (*Instruction, error)
Get returns a Instruction entity by its id.
func (*InstructionClient) GetX ¶
func (c *InstructionClient) GetX(ctx context.Context, id uuid.UUID) *Instruction
GetX is like Get, but panics if an error occurs.
func (*InstructionClient) Hooks ¶
func (c *InstructionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InstructionClient) Intercept ¶
func (c *InstructionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `instruction.Intercept(f(g(h())))`.
func (*InstructionClient) Interceptors ¶
func (c *InstructionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InstructionClient) MapCreateBulk ¶
func (c *InstructionClient) MapCreateBulk(slice any, setFunc func(*InstructionCreate, int)) *InstructionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*InstructionClient) Query ¶
func (c *InstructionClient) Query() *InstructionQuery
Query returns a query builder for Instruction.
func (*InstructionClient) QueryRecipe ¶
func (c *InstructionClient) QueryRecipe(i *Instruction) *RecipeQuery
QueryRecipe queries the recipe edge of a Instruction.
func (*InstructionClient) Update ¶
func (c *InstructionClient) Update() *InstructionUpdate
Update returns an update builder for Instruction.
func (*InstructionClient) UpdateOne ¶
func (c *InstructionClient) UpdateOne(i *Instruction) *InstructionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InstructionClient) UpdateOneID ¶
func (c *InstructionClient) UpdateOneID(id uuid.UUID) *InstructionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InstructionClient) Use ¶
func (c *InstructionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `instruction.Hooks(f(g(h())))`.
type InstructionCreate ¶
type InstructionCreate struct {
// contains filtered or unexported fields
}
InstructionCreate is the builder for creating a Instruction entity.
func (*InstructionCreate) Exec ¶
func (ic *InstructionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InstructionCreate) ExecX ¶
func (ic *InstructionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstructionCreate) Mutation ¶
func (ic *InstructionCreate) Mutation() *InstructionMutation
Mutation returns the InstructionMutation object of the builder.
func (*InstructionCreate) Save ¶
func (ic *InstructionCreate) Save(ctx context.Context) (*Instruction, error)
Save creates the Instruction in the database.
func (*InstructionCreate) SaveX ¶
func (ic *InstructionCreate) SaveX(ctx context.Context) *Instruction
SaveX calls Save and panics if Save returns an error.
func (*InstructionCreate) SetID ¶
func (ic *InstructionCreate) SetID(u uuid.UUID) *InstructionCreate
SetID sets the "id" field.
func (*InstructionCreate) SetNillableID ¶
func (ic *InstructionCreate) SetNillableID(u *uuid.UUID) *InstructionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InstructionCreate) SetNillableRecipeID ¶
func (ic *InstructionCreate) SetNillableRecipeID(id *uuid.UUID) *InstructionCreate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*InstructionCreate) SetOrder ¶
func (ic *InstructionCreate) SetOrder(i int) *InstructionCreate
SetOrder sets the "order" field.
func (*InstructionCreate) SetRecipe ¶
func (ic *InstructionCreate) SetRecipe(r *Recipe) *InstructionCreate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*InstructionCreate) SetRecipeID ¶
func (ic *InstructionCreate) SetRecipeID(id uuid.UUID) *InstructionCreate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*InstructionCreate) SetText ¶
func (ic *InstructionCreate) SetText(s string) *InstructionCreate
SetText sets the "text" field.
type InstructionCreateBulk ¶
type InstructionCreateBulk struct {
// contains filtered or unexported fields
}
InstructionCreateBulk is the builder for creating many Instruction entities in bulk.
func (*InstructionCreateBulk) Exec ¶
func (icb *InstructionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InstructionCreateBulk) ExecX ¶
func (icb *InstructionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstructionCreateBulk) Save ¶
func (icb *InstructionCreateBulk) Save(ctx context.Context) ([]*Instruction, error)
Save creates the Instruction entities in the database.
func (*InstructionCreateBulk) SaveX ¶
func (icb *InstructionCreateBulk) SaveX(ctx context.Context) []*Instruction
SaveX is like Save, but panics if an error occurs.
type InstructionDelete ¶
type InstructionDelete struct {
// contains filtered or unexported fields
}
InstructionDelete is the builder for deleting a Instruction entity.
func (*InstructionDelete) Exec ¶
func (id *InstructionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InstructionDelete) ExecX ¶
func (id *InstructionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InstructionDelete) Where ¶
func (id *InstructionDelete) Where(ps ...predicate.Instruction) *InstructionDelete
Where appends a list predicates to the InstructionDelete builder.
type InstructionDeleteOne ¶
type InstructionDeleteOne struct {
// contains filtered or unexported fields
}
InstructionDeleteOne is the builder for deleting a single Instruction entity.
func (*InstructionDeleteOne) Exec ¶
func (ido *InstructionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InstructionDeleteOne) ExecX ¶
func (ido *InstructionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstructionDeleteOne) Where ¶
func (ido *InstructionDeleteOne) Where(ps ...predicate.Instruction) *InstructionDeleteOne
Where appends a list predicates to the InstructionDelete builder.
type InstructionEdges ¶
type InstructionEdges struct { // Recipe holds the value of the recipe edge. Recipe *Recipe `json:"recipe,omitempty"` // contains filtered or unexported fields }
InstructionEdges holds the relations/edges for other nodes in the graph.
func (InstructionEdges) RecipeOrErr ¶
func (e InstructionEdges) RecipeOrErr() (*Recipe, error)
RecipeOrErr returns the Recipe value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InstructionGroupBy ¶
type InstructionGroupBy struct {
// contains filtered or unexported fields
}
InstructionGroupBy is the group-by builder for Instruction entities.
func (*InstructionGroupBy) Aggregate ¶
func (igb *InstructionGroupBy) Aggregate(fns ...AggregateFunc) *InstructionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InstructionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InstructionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InstructionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InstructionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InstructionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InstructionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InstructionGroupBy) Scan ¶
func (igb *InstructionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InstructionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InstructionMutation ¶
type InstructionMutation struct {
// contains filtered or unexported fields
}
InstructionMutation represents an operation that mutates the Instruction nodes in the graph.
func (*InstructionMutation) AddField ¶
func (m *InstructionMutation) 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 (*InstructionMutation) AddOrder ¶
func (m *InstructionMutation) AddOrder(i int)
AddOrder adds i to the "order" field.
func (*InstructionMutation) AddedEdges ¶
func (m *InstructionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InstructionMutation) AddedField ¶
func (m *InstructionMutation) 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 (*InstructionMutation) AddedFields ¶
func (m *InstructionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InstructionMutation) AddedIDs ¶
func (m *InstructionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InstructionMutation) AddedOrder ¶
func (m *InstructionMutation) AddedOrder() (r int, exists bool)
AddedOrder returns the value that was added to the "order" field in this mutation.
func (*InstructionMutation) ClearEdge ¶
func (m *InstructionMutation) 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 (*InstructionMutation) ClearField ¶
func (m *InstructionMutation) 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 (*InstructionMutation) ClearRecipe ¶
func (m *InstructionMutation) ClearRecipe()
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*InstructionMutation) ClearedEdges ¶
func (m *InstructionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InstructionMutation) ClearedFields ¶
func (m *InstructionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InstructionMutation) Client ¶
func (m InstructionMutation) 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 (*InstructionMutation) EdgeCleared ¶
func (m *InstructionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InstructionMutation) Field ¶
func (m *InstructionMutation) 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 (*InstructionMutation) FieldCleared ¶
func (m *InstructionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InstructionMutation) Fields ¶
func (m *InstructionMutation) 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 (*InstructionMutation) ID ¶
func (m *InstructionMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*InstructionMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InstructionMutation) 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 (*InstructionMutation) OldOrder ¶
func (m *InstructionMutation) OldOrder(ctx context.Context) (v int, err error)
OldOrder returns the old "order" field's value of the Instruction entity. If the Instruction 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 (*InstructionMutation) OldText ¶
func (m *InstructionMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Instruction entity. If the Instruction 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 (*InstructionMutation) Op ¶
func (m *InstructionMutation) Op() Op
Op returns the operation name.
func (*InstructionMutation) Order ¶
func (m *InstructionMutation) Order() (r int, exists bool)
Order returns the value of the "order" field in the mutation.
func (*InstructionMutation) RecipeCleared ¶
func (m *InstructionMutation) RecipeCleared() bool
RecipeCleared reports if the "recipe" edge to the Recipe entity was cleared.
func (*InstructionMutation) RecipeID ¶
func (m *InstructionMutation) RecipeID() (id uuid.UUID, exists bool)
RecipeID returns the "recipe" edge ID in the mutation.
func (*InstructionMutation) RecipeIDs ¶
func (m *InstructionMutation) RecipeIDs() (ids []uuid.UUID)
RecipeIDs returns the "recipe" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RecipeID instead. It exists only for internal usage by the builders.
func (*InstructionMutation) RemovedEdges ¶
func (m *InstructionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InstructionMutation) RemovedIDs ¶
func (m *InstructionMutation) 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 (*InstructionMutation) ResetEdge ¶
func (m *InstructionMutation) 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 (*InstructionMutation) ResetField ¶
func (m *InstructionMutation) 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 (*InstructionMutation) ResetOrder ¶
func (m *InstructionMutation) ResetOrder()
ResetOrder resets all changes to the "order" field.
func (*InstructionMutation) ResetRecipe ¶
func (m *InstructionMutation) ResetRecipe()
ResetRecipe resets all changes to the "recipe" edge.
func (*InstructionMutation) ResetText ¶
func (m *InstructionMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*InstructionMutation) SetField ¶
func (m *InstructionMutation) 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 (*InstructionMutation) SetID ¶
func (m *InstructionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Instruction entities.
func (*InstructionMutation) SetOp ¶
func (m *InstructionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InstructionMutation) SetOrder ¶
func (m *InstructionMutation) SetOrder(i int)
SetOrder sets the "order" field.
func (*InstructionMutation) SetRecipeID ¶
func (m *InstructionMutation) SetRecipeID(id uuid.UUID)
SetRecipeID sets the "recipe" edge to the Recipe entity by id.
func (*InstructionMutation) SetText ¶
func (m *InstructionMutation) SetText(s string)
SetText sets the "text" field.
func (*InstructionMutation) Text ¶
func (m *InstructionMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (InstructionMutation) Tx ¶
func (m InstructionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InstructionMutation) Type ¶
func (m *InstructionMutation) Type() string
Type returns the node type of this mutation (Instruction).
func (*InstructionMutation) Where ¶
func (m *InstructionMutation) Where(ps ...predicate.Instruction)
Where appends a list predicates to the InstructionMutation builder.
func (*InstructionMutation) WhereP ¶
func (m *InstructionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InstructionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InstructionQuery ¶
type InstructionQuery struct {
// contains filtered or unexported fields
}
InstructionQuery is the builder for querying Instruction entities.
func (*InstructionQuery) Aggregate ¶
func (iq *InstructionQuery) Aggregate(fns ...AggregateFunc) *InstructionSelect
Aggregate returns a InstructionSelect configured with the given aggregations.
func (*InstructionQuery) All ¶
func (iq *InstructionQuery) All(ctx context.Context) ([]*Instruction, error)
All executes the query and returns a list of Instructions.
func (*InstructionQuery) AllX ¶
func (iq *InstructionQuery) AllX(ctx context.Context) []*Instruction
AllX is like All, but panics if an error occurs.
func (*InstructionQuery) Clone ¶
func (iq *InstructionQuery) Clone() *InstructionQuery
Clone returns a duplicate of the InstructionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InstructionQuery) Count ¶
func (iq *InstructionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InstructionQuery) CountX ¶
func (iq *InstructionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InstructionQuery) Exist ¶
func (iq *InstructionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InstructionQuery) ExistX ¶
func (iq *InstructionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InstructionQuery) First ¶
func (iq *InstructionQuery) First(ctx context.Context) (*Instruction, error)
First returns the first Instruction entity from the query. Returns a *NotFoundError when no Instruction was found.
func (*InstructionQuery) FirstID ¶
FirstID returns the first Instruction ID from the query. Returns a *NotFoundError when no Instruction ID was found.
func (*InstructionQuery) FirstIDX ¶
func (iq *InstructionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InstructionQuery) FirstX ¶
func (iq *InstructionQuery) FirstX(ctx context.Context) *Instruction
FirstX is like First, but panics if an error occurs.
func (*InstructionQuery) GroupBy ¶
func (iq *InstructionQuery) GroupBy(field string, fields ...string) *InstructionGroupBy
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 { Text string `json:"text,omitempty"` Count int `json:"count,omitempty"` } client.Instruction.Query(). GroupBy(instruction.FieldText). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InstructionQuery) IDsX ¶
func (iq *InstructionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InstructionQuery) Limit ¶
func (iq *InstructionQuery) Limit(limit int) *InstructionQuery
Limit the number of records to be returned by this query.
func (*InstructionQuery) Offset ¶
func (iq *InstructionQuery) Offset(offset int) *InstructionQuery
Offset to start from.
func (*InstructionQuery) Only ¶
func (iq *InstructionQuery) Only(ctx context.Context) (*Instruction, error)
Only returns a single Instruction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Instruction entity is found. Returns a *NotFoundError when no Instruction entities are found.
func (*InstructionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Instruction ID in the query. Returns a *NotSingularError when more than one Instruction ID is found. Returns a *NotFoundError when no entities are found.
func (*InstructionQuery) OnlyIDX ¶
func (iq *InstructionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InstructionQuery) OnlyX ¶
func (iq *InstructionQuery) OnlyX(ctx context.Context) *Instruction
OnlyX is like Only, but panics if an error occurs.
func (*InstructionQuery) Order ¶
func (iq *InstructionQuery) Order(o ...instruction.OrderOption) *InstructionQuery
Order specifies how the records should be ordered.
func (*InstructionQuery) QueryRecipe ¶
func (iq *InstructionQuery) QueryRecipe() *RecipeQuery
QueryRecipe chains the current query on the "recipe" edge.
func (*InstructionQuery) Select ¶
func (iq *InstructionQuery) Select(fields ...string) *InstructionSelect
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 { Text string `json:"text,omitempty"` } client.Instruction.Query(). Select(instruction.FieldText). Scan(ctx, &v)
func (*InstructionQuery) Unique ¶
func (iq *InstructionQuery) Unique(unique bool) *InstructionQuery
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 (*InstructionQuery) Where ¶
func (iq *InstructionQuery) Where(ps ...predicate.Instruction) *InstructionQuery
Where adds a new predicate for the InstructionQuery builder.
func (*InstructionQuery) WithRecipe ¶
func (iq *InstructionQuery) WithRecipe(opts ...func(*RecipeQuery)) *InstructionQuery
WithRecipe tells the query-builder to eager-load the nodes that are connected to the "recipe" edge. The optional arguments are used to configure the query builder of the edge.
type InstructionSelect ¶
type InstructionSelect struct { *InstructionQuery // contains filtered or unexported fields }
InstructionSelect is the builder for selecting fields of Instruction entities.
func (*InstructionSelect) Aggregate ¶
func (is *InstructionSelect) Aggregate(fns ...AggregateFunc) *InstructionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InstructionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InstructionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InstructionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InstructionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InstructionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InstructionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InstructionSelect) Scan ¶
func (is *InstructionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InstructionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InstructionUpdate ¶
type InstructionUpdate struct {
// contains filtered or unexported fields
}
InstructionUpdate is the builder for updating Instruction entities.
func (*InstructionUpdate) AddOrder ¶
func (iu *InstructionUpdate) AddOrder(i int) *InstructionUpdate
AddOrder adds i to the "order" field.
func (*InstructionUpdate) ClearRecipe ¶
func (iu *InstructionUpdate) ClearRecipe() *InstructionUpdate
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*InstructionUpdate) Exec ¶
func (iu *InstructionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InstructionUpdate) ExecX ¶
func (iu *InstructionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstructionUpdate) Mutation ¶
func (iu *InstructionUpdate) Mutation() *InstructionMutation
Mutation returns the InstructionMutation object of the builder.
func (*InstructionUpdate) Save ¶
func (iu *InstructionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InstructionUpdate) SaveX ¶
func (iu *InstructionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InstructionUpdate) SetNillableOrder ¶
func (iu *InstructionUpdate) SetNillableOrder(i *int) *InstructionUpdate
SetNillableOrder sets the "order" field if the given value is not nil.
func (*InstructionUpdate) SetNillableRecipeID ¶
func (iu *InstructionUpdate) SetNillableRecipeID(id *uuid.UUID) *InstructionUpdate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*InstructionUpdate) SetNillableText ¶
func (iu *InstructionUpdate) SetNillableText(s *string) *InstructionUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*InstructionUpdate) SetOrder ¶
func (iu *InstructionUpdate) SetOrder(i int) *InstructionUpdate
SetOrder sets the "order" field.
func (*InstructionUpdate) SetRecipe ¶
func (iu *InstructionUpdate) SetRecipe(r *Recipe) *InstructionUpdate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*InstructionUpdate) SetRecipeID ¶
func (iu *InstructionUpdate) SetRecipeID(id uuid.UUID) *InstructionUpdate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*InstructionUpdate) SetText ¶
func (iu *InstructionUpdate) SetText(s string) *InstructionUpdate
SetText sets the "text" field.
func (*InstructionUpdate) Where ¶
func (iu *InstructionUpdate) Where(ps ...predicate.Instruction) *InstructionUpdate
Where appends a list predicates to the InstructionUpdate builder.
type InstructionUpdateOne ¶
type InstructionUpdateOne struct {
// contains filtered or unexported fields
}
InstructionUpdateOne is the builder for updating a single Instruction entity.
func (*InstructionUpdateOne) AddOrder ¶
func (iuo *InstructionUpdateOne) AddOrder(i int) *InstructionUpdateOne
AddOrder adds i to the "order" field.
func (*InstructionUpdateOne) ClearRecipe ¶
func (iuo *InstructionUpdateOne) ClearRecipe() *InstructionUpdateOne
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*InstructionUpdateOne) Exec ¶
func (iuo *InstructionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InstructionUpdateOne) ExecX ¶
func (iuo *InstructionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstructionUpdateOne) Mutation ¶
func (iuo *InstructionUpdateOne) Mutation() *InstructionMutation
Mutation returns the InstructionMutation object of the builder.
func (*InstructionUpdateOne) Save ¶
func (iuo *InstructionUpdateOne) Save(ctx context.Context) (*Instruction, error)
Save executes the query and returns the updated Instruction entity.
func (*InstructionUpdateOne) SaveX ¶
func (iuo *InstructionUpdateOne) SaveX(ctx context.Context) *Instruction
SaveX is like Save, but panics if an error occurs.
func (*InstructionUpdateOne) Select ¶
func (iuo *InstructionUpdateOne) Select(field string, fields ...string) *InstructionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InstructionUpdateOne) SetNillableOrder ¶
func (iuo *InstructionUpdateOne) SetNillableOrder(i *int) *InstructionUpdateOne
SetNillableOrder sets the "order" field if the given value is not nil.
func (*InstructionUpdateOne) SetNillableRecipeID ¶
func (iuo *InstructionUpdateOne) SetNillableRecipeID(id *uuid.UUID) *InstructionUpdateOne
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*InstructionUpdateOne) SetNillableText ¶
func (iuo *InstructionUpdateOne) SetNillableText(s *string) *InstructionUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*InstructionUpdateOne) SetOrder ¶
func (iuo *InstructionUpdateOne) SetOrder(i int) *InstructionUpdateOne
SetOrder sets the "order" field.
func (*InstructionUpdateOne) SetRecipe ¶
func (iuo *InstructionUpdateOne) SetRecipe(r *Recipe) *InstructionUpdateOne
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*InstructionUpdateOne) SetRecipeID ¶
func (iuo *InstructionUpdateOne) SetRecipeID(id uuid.UUID) *InstructionUpdateOne
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*InstructionUpdateOne) SetText ¶
func (iuo *InstructionUpdateOne) SetText(s string) *InstructionUpdateOne
SetText sets the "text" field.
func (*InstructionUpdateOne) Where ¶
func (iuo *InstructionUpdateOne) Where(ps ...predicate.Instruction) *InstructionUpdateOne
Where appends a list predicates to the InstructionUpdate builder.
type Instructions ¶
type Instructions []*Instruction
Instructions is a parsable slice of Instruction.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Nutrition ¶
type Nutrition struct { // ID of the ent. ID int `json:"id,omitempty"` // Calories holds the value of the "calories" field. Calories int `json:"calories,omitempty"` // Fat holds the value of the "fat" field. Fat int `json:"fat,omitempty"` // Carbs holds the value of the "carbs" field. Carbs int `json:"carbs,omitempty"` // Protein holds the value of the "protein" field. Protein int `json:"protein,omitempty"` // Precision holds the value of the "precision" field. Precision string `json:"precision,omitempty"` // Benefits holds the value of the "benefits" field. Benefits []string `json:"benefits,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NutritionQuery when eager-loading is set. Edges NutritionEdges `json:"edges"` // contains filtered or unexported fields }
Nutrition is the model entity for the Nutrition schema.
func (*Nutrition) QueryRecipe ¶
func (n *Nutrition) QueryRecipe() *RecipeQuery
QueryRecipe queries the "recipe" edge of the Nutrition entity.
func (*Nutrition) Unwrap ¶
Unwrap unwraps the Nutrition 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 (*Nutrition) Update ¶
func (n *Nutrition) Update() *NutritionUpdateOne
Update returns a builder for updating this Nutrition. Note that you need to call Nutrition.Unwrap() before calling this method if this Nutrition was returned from a transaction, and the transaction was committed or rolled back.
type NutritionClient ¶
type NutritionClient struct {
// contains filtered or unexported fields
}
NutritionClient is a client for the Nutrition schema.
func NewNutritionClient ¶
func NewNutritionClient(c config) *NutritionClient
NewNutritionClient returns a client for the Nutrition from the given config.
func (*NutritionClient) Create ¶
func (c *NutritionClient) Create() *NutritionCreate
Create returns a builder for creating a Nutrition entity.
func (*NutritionClient) CreateBulk ¶
func (c *NutritionClient) CreateBulk(builders ...*NutritionCreate) *NutritionCreateBulk
CreateBulk returns a builder for creating a bulk of Nutrition entities.
func (*NutritionClient) Delete ¶
func (c *NutritionClient) Delete() *NutritionDelete
Delete returns a delete builder for Nutrition.
func (*NutritionClient) DeleteOne ¶
func (c *NutritionClient) DeleteOne(n *Nutrition) *NutritionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NutritionClient) DeleteOneID ¶
func (c *NutritionClient) DeleteOneID(id int) *NutritionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NutritionClient) GetX ¶
func (c *NutritionClient) GetX(ctx context.Context, id int) *Nutrition
GetX is like Get, but panics if an error occurs.
func (*NutritionClient) Hooks ¶
func (c *NutritionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NutritionClient) Intercept ¶
func (c *NutritionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `nutrition.Intercept(f(g(h())))`.
func (*NutritionClient) Interceptors ¶
func (c *NutritionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NutritionClient) MapCreateBulk ¶
func (c *NutritionClient) MapCreateBulk(slice any, setFunc func(*NutritionCreate, int)) *NutritionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*NutritionClient) Query ¶
func (c *NutritionClient) Query() *NutritionQuery
Query returns a query builder for Nutrition.
func (*NutritionClient) QueryRecipe ¶
func (c *NutritionClient) QueryRecipe(n *Nutrition) *RecipeQuery
QueryRecipe queries the recipe edge of a Nutrition.
func (*NutritionClient) Update ¶
func (c *NutritionClient) Update() *NutritionUpdate
Update returns an update builder for Nutrition.
func (*NutritionClient) UpdateOne ¶
func (c *NutritionClient) UpdateOne(n *Nutrition) *NutritionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NutritionClient) UpdateOneID ¶
func (c *NutritionClient) UpdateOneID(id int) *NutritionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NutritionClient) Use ¶
func (c *NutritionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nutrition.Hooks(f(g(h())))`.
type NutritionCreate ¶
type NutritionCreate struct {
// contains filtered or unexported fields
}
NutritionCreate is the builder for creating a Nutrition entity.
func (*NutritionCreate) Exec ¶
func (nc *NutritionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NutritionCreate) ExecX ¶
func (nc *NutritionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NutritionCreate) Mutation ¶
func (nc *NutritionCreate) Mutation() *NutritionMutation
Mutation returns the NutritionMutation object of the builder.
func (*NutritionCreate) Save ¶
func (nc *NutritionCreate) Save(ctx context.Context) (*Nutrition, error)
Save creates the Nutrition in the database.
func (*NutritionCreate) SaveX ¶
func (nc *NutritionCreate) SaveX(ctx context.Context) *Nutrition
SaveX calls Save and panics if Save returns an error.
func (*NutritionCreate) SetBenefits ¶
func (nc *NutritionCreate) SetBenefits(s []string) *NutritionCreate
SetBenefits sets the "benefits" field.
func (*NutritionCreate) SetCalories ¶
func (nc *NutritionCreate) SetCalories(i int) *NutritionCreate
SetCalories sets the "calories" field.
func (*NutritionCreate) SetCarbs ¶
func (nc *NutritionCreate) SetCarbs(i int) *NutritionCreate
SetCarbs sets the "carbs" field.
func (*NutritionCreate) SetFat ¶
func (nc *NutritionCreate) SetFat(i int) *NutritionCreate
SetFat sets the "fat" field.
func (*NutritionCreate) SetNillableCalories ¶
func (nc *NutritionCreate) SetNillableCalories(i *int) *NutritionCreate
SetNillableCalories sets the "calories" field if the given value is not nil.
func (*NutritionCreate) SetNillableCarbs ¶
func (nc *NutritionCreate) SetNillableCarbs(i *int) *NutritionCreate
SetNillableCarbs sets the "carbs" field if the given value is not nil.
func (*NutritionCreate) SetNillableFat ¶
func (nc *NutritionCreate) SetNillableFat(i *int) *NutritionCreate
SetNillableFat sets the "fat" field if the given value is not nil.
func (*NutritionCreate) SetNillablePrecision ¶
func (nc *NutritionCreate) SetNillablePrecision(s *string) *NutritionCreate
SetNillablePrecision sets the "precision" field if the given value is not nil.
func (*NutritionCreate) SetNillableProtein ¶
func (nc *NutritionCreate) SetNillableProtein(i *int) *NutritionCreate
SetNillableProtein sets the "protein" field if the given value is not nil.
func (*NutritionCreate) SetNillableRecipeID ¶
func (nc *NutritionCreate) SetNillableRecipeID(id *uuid.UUID) *NutritionCreate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*NutritionCreate) SetPrecision ¶
func (nc *NutritionCreate) SetPrecision(s string) *NutritionCreate
SetPrecision sets the "precision" field.
func (*NutritionCreate) SetProtein ¶
func (nc *NutritionCreate) SetProtein(i int) *NutritionCreate
SetProtein sets the "protein" field.
func (*NutritionCreate) SetRecipe ¶
func (nc *NutritionCreate) SetRecipe(r *Recipe) *NutritionCreate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*NutritionCreate) SetRecipeID ¶
func (nc *NutritionCreate) SetRecipeID(id uuid.UUID) *NutritionCreate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
type NutritionCreateBulk ¶
type NutritionCreateBulk struct {
// contains filtered or unexported fields
}
NutritionCreateBulk is the builder for creating many Nutrition entities in bulk.
func (*NutritionCreateBulk) Exec ¶
func (ncb *NutritionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NutritionCreateBulk) ExecX ¶
func (ncb *NutritionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NutritionDelete ¶
type NutritionDelete struct {
// contains filtered or unexported fields
}
NutritionDelete is the builder for deleting a Nutrition entity.
func (*NutritionDelete) Exec ¶
func (nd *NutritionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NutritionDelete) ExecX ¶
func (nd *NutritionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NutritionDelete) Where ¶
func (nd *NutritionDelete) Where(ps ...predicate.Nutrition) *NutritionDelete
Where appends a list predicates to the NutritionDelete builder.
type NutritionDeleteOne ¶
type NutritionDeleteOne struct {
// contains filtered or unexported fields
}
NutritionDeleteOne is the builder for deleting a single Nutrition entity.
func (*NutritionDeleteOne) Exec ¶
func (ndo *NutritionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NutritionDeleteOne) ExecX ¶
func (ndo *NutritionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NutritionDeleteOne) Where ¶
func (ndo *NutritionDeleteOne) Where(ps ...predicate.Nutrition) *NutritionDeleteOne
Where appends a list predicates to the NutritionDelete builder.
type NutritionEdges ¶
type NutritionEdges struct { // Recipe holds the value of the recipe edge. Recipe *Recipe `json:"recipe,omitempty"` // contains filtered or unexported fields }
NutritionEdges holds the relations/edges for other nodes in the graph.
func (NutritionEdges) RecipeOrErr ¶
func (e NutritionEdges) RecipeOrErr() (*Recipe, error)
RecipeOrErr returns the Recipe value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NutritionGroupBy ¶
type NutritionGroupBy struct {
// contains filtered or unexported fields
}
NutritionGroupBy is the group-by builder for Nutrition entities.
func (*NutritionGroupBy) Aggregate ¶
func (ngb *NutritionGroupBy) Aggregate(fns ...AggregateFunc) *NutritionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NutritionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NutritionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NutritionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NutritionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NutritionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NutritionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NutritionGroupBy) Scan ¶
func (ngb *NutritionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NutritionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NutritionMutation ¶
type NutritionMutation struct {
// contains filtered or unexported fields
}
NutritionMutation represents an operation that mutates the Nutrition nodes in the graph.
func (*NutritionMutation) AddCalories ¶
func (m *NutritionMutation) AddCalories(i int)
AddCalories adds i to the "calories" field.
func (*NutritionMutation) AddCarbs ¶
func (m *NutritionMutation) AddCarbs(i int)
AddCarbs adds i to the "carbs" field.
func (*NutritionMutation) AddFat ¶
func (m *NutritionMutation) AddFat(i int)
AddFat adds i to the "fat" field.
func (*NutritionMutation) AddField ¶
func (m *NutritionMutation) 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 (*NutritionMutation) AddProtein ¶
func (m *NutritionMutation) AddProtein(i int)
AddProtein adds i to the "protein" field.
func (*NutritionMutation) AddedCalories ¶
func (m *NutritionMutation) AddedCalories() (r int, exists bool)
AddedCalories returns the value that was added to the "calories" field in this mutation.
func (*NutritionMutation) AddedCarbs ¶
func (m *NutritionMutation) AddedCarbs() (r int, exists bool)
AddedCarbs returns the value that was added to the "carbs" field in this mutation.
func (*NutritionMutation) AddedEdges ¶
func (m *NutritionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NutritionMutation) AddedFat ¶
func (m *NutritionMutation) AddedFat() (r int, exists bool)
AddedFat returns the value that was added to the "fat" field in this mutation.
func (*NutritionMutation) AddedField ¶
func (m *NutritionMutation) 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 (*NutritionMutation) AddedFields ¶
func (m *NutritionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NutritionMutation) AddedIDs ¶
func (m *NutritionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NutritionMutation) AddedProtein ¶
func (m *NutritionMutation) AddedProtein() (r int, exists bool)
AddedProtein returns the value that was added to the "protein" field in this mutation.
func (*NutritionMutation) AppendBenefits ¶
func (m *NutritionMutation) AppendBenefits(s []string)
AppendBenefits adds s to the "benefits" field.
func (*NutritionMutation) AppendedBenefits ¶
func (m *NutritionMutation) AppendedBenefits() ([]string, bool)
AppendedBenefits returns the list of values that were appended to the "benefits" field in this mutation.
func (*NutritionMutation) Benefits ¶
func (m *NutritionMutation) Benefits() (r []string, exists bool)
Benefits returns the value of the "benefits" field in the mutation.
func (*NutritionMutation) BenefitsCleared ¶
func (m *NutritionMutation) BenefitsCleared() bool
BenefitsCleared returns if the "benefits" field was cleared in this mutation.
func (*NutritionMutation) Calories ¶
func (m *NutritionMutation) Calories() (r int, exists bool)
Calories returns the value of the "calories" field in the mutation.
func (*NutritionMutation) CaloriesCleared ¶
func (m *NutritionMutation) CaloriesCleared() bool
CaloriesCleared returns if the "calories" field was cleared in this mutation.
func (*NutritionMutation) Carbs ¶
func (m *NutritionMutation) Carbs() (r int, exists bool)
Carbs returns the value of the "carbs" field in the mutation.
func (*NutritionMutation) CarbsCleared ¶
func (m *NutritionMutation) CarbsCleared() bool
CarbsCleared returns if the "carbs" field was cleared in this mutation.
func (*NutritionMutation) ClearBenefits ¶
func (m *NutritionMutation) ClearBenefits()
ClearBenefits clears the value of the "benefits" field.
func (*NutritionMutation) ClearCalories ¶
func (m *NutritionMutation) ClearCalories()
ClearCalories clears the value of the "calories" field.
func (*NutritionMutation) ClearCarbs ¶
func (m *NutritionMutation) ClearCarbs()
ClearCarbs clears the value of the "carbs" field.
func (*NutritionMutation) ClearEdge ¶
func (m *NutritionMutation) 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 (*NutritionMutation) ClearFat ¶
func (m *NutritionMutation) ClearFat()
ClearFat clears the value of the "fat" field.
func (*NutritionMutation) ClearField ¶
func (m *NutritionMutation) 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 (*NutritionMutation) ClearPrecision ¶
func (m *NutritionMutation) ClearPrecision()
ClearPrecision clears the value of the "precision" field.
func (*NutritionMutation) ClearProtein ¶
func (m *NutritionMutation) ClearProtein()
ClearProtein clears the value of the "protein" field.
func (*NutritionMutation) ClearRecipe ¶
func (m *NutritionMutation) ClearRecipe()
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*NutritionMutation) ClearedEdges ¶
func (m *NutritionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NutritionMutation) ClearedFields ¶
func (m *NutritionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NutritionMutation) Client ¶
func (m NutritionMutation) 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 (*NutritionMutation) EdgeCleared ¶
func (m *NutritionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NutritionMutation) Fat ¶
func (m *NutritionMutation) Fat() (r int, exists bool)
Fat returns the value of the "fat" field in the mutation.
func (*NutritionMutation) FatCleared ¶
func (m *NutritionMutation) FatCleared() bool
FatCleared returns if the "fat" field was cleared in this mutation.
func (*NutritionMutation) Field ¶
func (m *NutritionMutation) 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 (*NutritionMutation) FieldCleared ¶
func (m *NutritionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NutritionMutation) Fields ¶
func (m *NutritionMutation) 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 (*NutritionMutation) ID ¶
func (m *NutritionMutation) 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 (*NutritionMutation) IDs ¶
func (m *NutritionMutation) 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 (*NutritionMutation) OldBenefits ¶
func (m *NutritionMutation) OldBenefits(ctx context.Context) (v []string, err error)
OldBenefits returns the old "benefits" field's value of the Nutrition entity. If the Nutrition 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 (*NutritionMutation) OldCalories ¶
func (m *NutritionMutation) OldCalories(ctx context.Context) (v int, err error)
OldCalories returns the old "calories" field's value of the Nutrition entity. If the Nutrition 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 (*NutritionMutation) OldCarbs ¶
func (m *NutritionMutation) OldCarbs(ctx context.Context) (v int, err error)
OldCarbs returns the old "carbs" field's value of the Nutrition entity. If the Nutrition 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 (*NutritionMutation) OldFat ¶
func (m *NutritionMutation) OldFat(ctx context.Context) (v int, err error)
OldFat returns the old "fat" field's value of the Nutrition entity. If the Nutrition 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 (*NutritionMutation) 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 (*NutritionMutation) OldPrecision ¶
func (m *NutritionMutation) OldPrecision(ctx context.Context) (v string, err error)
OldPrecision returns the old "precision" field's value of the Nutrition entity. If the Nutrition 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 (*NutritionMutation) OldProtein ¶
func (m *NutritionMutation) OldProtein(ctx context.Context) (v int, err error)
OldProtein returns the old "protein" field's value of the Nutrition entity. If the Nutrition 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 (*NutritionMutation) Precision ¶
func (m *NutritionMutation) Precision() (r string, exists bool)
Precision returns the value of the "precision" field in the mutation.
func (*NutritionMutation) PrecisionCleared ¶
func (m *NutritionMutation) PrecisionCleared() bool
PrecisionCleared returns if the "precision" field was cleared in this mutation.
func (*NutritionMutation) Protein ¶
func (m *NutritionMutation) Protein() (r int, exists bool)
Protein returns the value of the "protein" field in the mutation.
func (*NutritionMutation) ProteinCleared ¶
func (m *NutritionMutation) ProteinCleared() bool
ProteinCleared returns if the "protein" field was cleared in this mutation.
func (*NutritionMutation) RecipeCleared ¶
func (m *NutritionMutation) RecipeCleared() bool
RecipeCleared reports if the "recipe" edge to the Recipe entity was cleared.
func (*NutritionMutation) RecipeID ¶
func (m *NutritionMutation) RecipeID() (id uuid.UUID, exists bool)
RecipeID returns the "recipe" edge ID in the mutation.
func (*NutritionMutation) RecipeIDs ¶
func (m *NutritionMutation) RecipeIDs() (ids []uuid.UUID)
RecipeIDs returns the "recipe" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RecipeID instead. It exists only for internal usage by the builders.
func (*NutritionMutation) RemovedEdges ¶
func (m *NutritionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NutritionMutation) RemovedIDs ¶
func (m *NutritionMutation) 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 (*NutritionMutation) ResetBenefits ¶
func (m *NutritionMutation) ResetBenefits()
ResetBenefits resets all changes to the "benefits" field.
func (*NutritionMutation) ResetCalories ¶
func (m *NutritionMutation) ResetCalories()
ResetCalories resets all changes to the "calories" field.
func (*NutritionMutation) ResetCarbs ¶
func (m *NutritionMutation) ResetCarbs()
ResetCarbs resets all changes to the "carbs" field.
func (*NutritionMutation) ResetEdge ¶
func (m *NutritionMutation) 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 (*NutritionMutation) ResetFat ¶
func (m *NutritionMutation) ResetFat()
ResetFat resets all changes to the "fat" field.
func (*NutritionMutation) ResetField ¶
func (m *NutritionMutation) 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 (*NutritionMutation) ResetPrecision ¶
func (m *NutritionMutation) ResetPrecision()
ResetPrecision resets all changes to the "precision" field.
func (*NutritionMutation) ResetProtein ¶
func (m *NutritionMutation) ResetProtein()
ResetProtein resets all changes to the "protein" field.
func (*NutritionMutation) ResetRecipe ¶
func (m *NutritionMutation) ResetRecipe()
ResetRecipe resets all changes to the "recipe" edge.
func (*NutritionMutation) SetBenefits ¶
func (m *NutritionMutation) SetBenefits(s []string)
SetBenefits sets the "benefits" field.
func (*NutritionMutation) SetCalories ¶
func (m *NutritionMutation) SetCalories(i int)
SetCalories sets the "calories" field.
func (*NutritionMutation) SetCarbs ¶
func (m *NutritionMutation) SetCarbs(i int)
SetCarbs sets the "carbs" field.
func (*NutritionMutation) SetFat ¶
func (m *NutritionMutation) SetFat(i int)
SetFat sets the "fat" field.
func (*NutritionMutation) SetField ¶
func (m *NutritionMutation) 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 (*NutritionMutation) SetOp ¶
func (m *NutritionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NutritionMutation) SetPrecision ¶
func (m *NutritionMutation) SetPrecision(s string)
SetPrecision sets the "precision" field.
func (*NutritionMutation) SetProtein ¶
func (m *NutritionMutation) SetProtein(i int)
SetProtein sets the "protein" field.
func (*NutritionMutation) SetRecipeID ¶
func (m *NutritionMutation) SetRecipeID(id uuid.UUID)
SetRecipeID sets the "recipe" edge to the Recipe entity by id.
func (NutritionMutation) Tx ¶
func (m NutritionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NutritionMutation) Type ¶
func (m *NutritionMutation) Type() string
Type returns the node type of this mutation (Nutrition).
func (*NutritionMutation) Where ¶
func (m *NutritionMutation) Where(ps ...predicate.Nutrition)
Where appends a list predicates to the NutritionMutation builder.
func (*NutritionMutation) WhereP ¶
func (m *NutritionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NutritionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NutritionQuery ¶
type NutritionQuery struct {
// contains filtered or unexported fields
}
NutritionQuery is the builder for querying Nutrition entities.
func (*NutritionQuery) Aggregate ¶
func (nq *NutritionQuery) Aggregate(fns ...AggregateFunc) *NutritionSelect
Aggregate returns a NutritionSelect configured with the given aggregations.
func (*NutritionQuery) All ¶
func (nq *NutritionQuery) All(ctx context.Context) ([]*Nutrition, error)
All executes the query and returns a list of Nutritions.
func (*NutritionQuery) AllX ¶
func (nq *NutritionQuery) AllX(ctx context.Context) []*Nutrition
AllX is like All, but panics if an error occurs.
func (*NutritionQuery) Clone ¶
func (nq *NutritionQuery) Clone() *NutritionQuery
Clone returns a duplicate of the NutritionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NutritionQuery) Count ¶
func (nq *NutritionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NutritionQuery) CountX ¶
func (nq *NutritionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NutritionQuery) Exist ¶
func (nq *NutritionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NutritionQuery) ExistX ¶
func (nq *NutritionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NutritionQuery) First ¶
func (nq *NutritionQuery) First(ctx context.Context) (*Nutrition, error)
First returns the first Nutrition entity from the query. Returns a *NotFoundError when no Nutrition was found.
func (*NutritionQuery) FirstID ¶
func (nq *NutritionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Nutrition ID from the query. Returns a *NotFoundError when no Nutrition ID was found.
func (*NutritionQuery) FirstIDX ¶
func (nq *NutritionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NutritionQuery) FirstX ¶
func (nq *NutritionQuery) FirstX(ctx context.Context) *Nutrition
FirstX is like First, but panics if an error occurs.
func (*NutritionQuery) GroupBy ¶
func (nq *NutritionQuery) GroupBy(field string, fields ...string) *NutritionGroupBy
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 { Calories int `json:"calories,omitempty"` Count int `json:"count,omitempty"` } client.Nutrition.Query(). GroupBy(nutrition.FieldCalories). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NutritionQuery) IDs ¶
func (nq *NutritionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Nutrition IDs.
func (*NutritionQuery) IDsX ¶
func (nq *NutritionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NutritionQuery) Limit ¶
func (nq *NutritionQuery) Limit(limit int) *NutritionQuery
Limit the number of records to be returned by this query.
func (*NutritionQuery) Offset ¶
func (nq *NutritionQuery) Offset(offset int) *NutritionQuery
Offset to start from.
func (*NutritionQuery) Only ¶
func (nq *NutritionQuery) Only(ctx context.Context) (*Nutrition, error)
Only returns a single Nutrition entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Nutrition entity is found. Returns a *NotFoundError when no Nutrition entities are found.
func (*NutritionQuery) OnlyID ¶
func (nq *NutritionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Nutrition ID in the query. Returns a *NotSingularError when more than one Nutrition ID is found. Returns a *NotFoundError when no entities are found.
func (*NutritionQuery) OnlyIDX ¶
func (nq *NutritionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NutritionQuery) OnlyX ¶
func (nq *NutritionQuery) OnlyX(ctx context.Context) *Nutrition
OnlyX is like Only, but panics if an error occurs.
func (*NutritionQuery) Order ¶
func (nq *NutritionQuery) Order(o ...nutrition.OrderOption) *NutritionQuery
Order specifies how the records should be ordered.
func (*NutritionQuery) QueryRecipe ¶
func (nq *NutritionQuery) QueryRecipe() *RecipeQuery
QueryRecipe chains the current query on the "recipe" edge.
func (*NutritionQuery) Select ¶
func (nq *NutritionQuery) Select(fields ...string) *NutritionSelect
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 { Calories int `json:"calories,omitempty"` } client.Nutrition.Query(). Select(nutrition.FieldCalories). Scan(ctx, &v)
func (*NutritionQuery) Unique ¶
func (nq *NutritionQuery) Unique(unique bool) *NutritionQuery
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 (*NutritionQuery) Where ¶
func (nq *NutritionQuery) Where(ps ...predicate.Nutrition) *NutritionQuery
Where adds a new predicate for the NutritionQuery builder.
func (*NutritionQuery) WithRecipe ¶
func (nq *NutritionQuery) WithRecipe(opts ...func(*RecipeQuery)) *NutritionQuery
WithRecipe tells the query-builder to eager-load the nodes that are connected to the "recipe" edge. The optional arguments are used to configure the query builder of the edge.
type NutritionSelect ¶
type NutritionSelect struct { *NutritionQuery // contains filtered or unexported fields }
NutritionSelect is the builder for selecting fields of Nutrition entities.
func (*NutritionSelect) Aggregate ¶
func (ns *NutritionSelect) Aggregate(fns ...AggregateFunc) *NutritionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NutritionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NutritionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NutritionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NutritionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NutritionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NutritionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NutritionSelect) Scan ¶
func (ns *NutritionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NutritionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NutritionUpdate ¶
type NutritionUpdate struct {
// contains filtered or unexported fields
}
NutritionUpdate is the builder for updating Nutrition entities.
func (*NutritionUpdate) AddCalories ¶
func (nu *NutritionUpdate) AddCalories(i int) *NutritionUpdate
AddCalories adds i to the "calories" field.
func (*NutritionUpdate) AddCarbs ¶
func (nu *NutritionUpdate) AddCarbs(i int) *NutritionUpdate
AddCarbs adds i to the "carbs" field.
func (*NutritionUpdate) AddFat ¶
func (nu *NutritionUpdate) AddFat(i int) *NutritionUpdate
AddFat adds i to the "fat" field.
func (*NutritionUpdate) AddProtein ¶
func (nu *NutritionUpdate) AddProtein(i int) *NutritionUpdate
AddProtein adds i to the "protein" field.
func (*NutritionUpdate) AppendBenefits ¶
func (nu *NutritionUpdate) AppendBenefits(s []string) *NutritionUpdate
AppendBenefits appends s to the "benefits" field.
func (*NutritionUpdate) ClearBenefits ¶
func (nu *NutritionUpdate) ClearBenefits() *NutritionUpdate
ClearBenefits clears the value of the "benefits" field.
func (*NutritionUpdate) ClearCalories ¶
func (nu *NutritionUpdate) ClearCalories() *NutritionUpdate
ClearCalories clears the value of the "calories" field.
func (*NutritionUpdate) ClearCarbs ¶
func (nu *NutritionUpdate) ClearCarbs() *NutritionUpdate
ClearCarbs clears the value of the "carbs" field.
func (*NutritionUpdate) ClearFat ¶
func (nu *NutritionUpdate) ClearFat() *NutritionUpdate
ClearFat clears the value of the "fat" field.
func (*NutritionUpdate) ClearPrecision ¶
func (nu *NutritionUpdate) ClearPrecision() *NutritionUpdate
ClearPrecision clears the value of the "precision" field.
func (*NutritionUpdate) ClearProtein ¶
func (nu *NutritionUpdate) ClearProtein() *NutritionUpdate
ClearProtein clears the value of the "protein" field.
func (*NutritionUpdate) ClearRecipe ¶
func (nu *NutritionUpdate) ClearRecipe() *NutritionUpdate
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*NutritionUpdate) Exec ¶
func (nu *NutritionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NutritionUpdate) ExecX ¶
func (nu *NutritionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NutritionUpdate) Mutation ¶
func (nu *NutritionUpdate) Mutation() *NutritionMutation
Mutation returns the NutritionMutation object of the builder.
func (*NutritionUpdate) Save ¶
func (nu *NutritionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NutritionUpdate) SaveX ¶
func (nu *NutritionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NutritionUpdate) SetBenefits ¶
func (nu *NutritionUpdate) SetBenefits(s []string) *NutritionUpdate
SetBenefits sets the "benefits" field.
func (*NutritionUpdate) SetCalories ¶
func (nu *NutritionUpdate) SetCalories(i int) *NutritionUpdate
SetCalories sets the "calories" field.
func (*NutritionUpdate) SetCarbs ¶
func (nu *NutritionUpdate) SetCarbs(i int) *NutritionUpdate
SetCarbs sets the "carbs" field.
func (*NutritionUpdate) SetFat ¶
func (nu *NutritionUpdate) SetFat(i int) *NutritionUpdate
SetFat sets the "fat" field.
func (*NutritionUpdate) SetNillableCalories ¶
func (nu *NutritionUpdate) SetNillableCalories(i *int) *NutritionUpdate
SetNillableCalories sets the "calories" field if the given value is not nil.
func (*NutritionUpdate) SetNillableCarbs ¶
func (nu *NutritionUpdate) SetNillableCarbs(i *int) *NutritionUpdate
SetNillableCarbs sets the "carbs" field if the given value is not nil.
func (*NutritionUpdate) SetNillableFat ¶
func (nu *NutritionUpdate) SetNillableFat(i *int) *NutritionUpdate
SetNillableFat sets the "fat" field if the given value is not nil.
func (*NutritionUpdate) SetNillablePrecision ¶
func (nu *NutritionUpdate) SetNillablePrecision(s *string) *NutritionUpdate
SetNillablePrecision sets the "precision" field if the given value is not nil.
func (*NutritionUpdate) SetNillableProtein ¶
func (nu *NutritionUpdate) SetNillableProtein(i *int) *NutritionUpdate
SetNillableProtein sets the "protein" field if the given value is not nil.
func (*NutritionUpdate) SetNillableRecipeID ¶
func (nu *NutritionUpdate) SetNillableRecipeID(id *uuid.UUID) *NutritionUpdate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*NutritionUpdate) SetPrecision ¶
func (nu *NutritionUpdate) SetPrecision(s string) *NutritionUpdate
SetPrecision sets the "precision" field.
func (*NutritionUpdate) SetProtein ¶
func (nu *NutritionUpdate) SetProtein(i int) *NutritionUpdate
SetProtein sets the "protein" field.
func (*NutritionUpdate) SetRecipe ¶
func (nu *NutritionUpdate) SetRecipe(r *Recipe) *NutritionUpdate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*NutritionUpdate) SetRecipeID ¶
func (nu *NutritionUpdate) SetRecipeID(id uuid.UUID) *NutritionUpdate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*NutritionUpdate) Where ¶
func (nu *NutritionUpdate) Where(ps ...predicate.Nutrition) *NutritionUpdate
Where appends a list predicates to the NutritionUpdate builder.
type NutritionUpdateOne ¶
type NutritionUpdateOne struct {
// contains filtered or unexported fields
}
NutritionUpdateOne is the builder for updating a single Nutrition entity.
func (*NutritionUpdateOne) AddCalories ¶
func (nuo *NutritionUpdateOne) AddCalories(i int) *NutritionUpdateOne
AddCalories adds i to the "calories" field.
func (*NutritionUpdateOne) AddCarbs ¶
func (nuo *NutritionUpdateOne) AddCarbs(i int) *NutritionUpdateOne
AddCarbs adds i to the "carbs" field.
func (*NutritionUpdateOne) AddFat ¶
func (nuo *NutritionUpdateOne) AddFat(i int) *NutritionUpdateOne
AddFat adds i to the "fat" field.
func (*NutritionUpdateOne) AddProtein ¶
func (nuo *NutritionUpdateOne) AddProtein(i int) *NutritionUpdateOne
AddProtein adds i to the "protein" field.
func (*NutritionUpdateOne) AppendBenefits ¶
func (nuo *NutritionUpdateOne) AppendBenefits(s []string) *NutritionUpdateOne
AppendBenefits appends s to the "benefits" field.
func (*NutritionUpdateOne) ClearBenefits ¶
func (nuo *NutritionUpdateOne) ClearBenefits() *NutritionUpdateOne
ClearBenefits clears the value of the "benefits" field.
func (*NutritionUpdateOne) ClearCalories ¶
func (nuo *NutritionUpdateOne) ClearCalories() *NutritionUpdateOne
ClearCalories clears the value of the "calories" field.
func (*NutritionUpdateOne) ClearCarbs ¶
func (nuo *NutritionUpdateOne) ClearCarbs() *NutritionUpdateOne
ClearCarbs clears the value of the "carbs" field.
func (*NutritionUpdateOne) ClearFat ¶
func (nuo *NutritionUpdateOne) ClearFat() *NutritionUpdateOne
ClearFat clears the value of the "fat" field.
func (*NutritionUpdateOne) ClearPrecision ¶
func (nuo *NutritionUpdateOne) ClearPrecision() *NutritionUpdateOne
ClearPrecision clears the value of the "precision" field.
func (*NutritionUpdateOne) ClearProtein ¶
func (nuo *NutritionUpdateOne) ClearProtein() *NutritionUpdateOne
ClearProtein clears the value of the "protein" field.
func (*NutritionUpdateOne) ClearRecipe ¶
func (nuo *NutritionUpdateOne) ClearRecipe() *NutritionUpdateOne
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*NutritionUpdateOne) Exec ¶
func (nuo *NutritionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NutritionUpdateOne) ExecX ¶
func (nuo *NutritionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NutritionUpdateOne) Mutation ¶
func (nuo *NutritionUpdateOne) Mutation() *NutritionMutation
Mutation returns the NutritionMutation object of the builder.
func (*NutritionUpdateOne) Save ¶
func (nuo *NutritionUpdateOne) Save(ctx context.Context) (*Nutrition, error)
Save executes the query and returns the updated Nutrition entity.
func (*NutritionUpdateOne) SaveX ¶
func (nuo *NutritionUpdateOne) SaveX(ctx context.Context) *Nutrition
SaveX is like Save, but panics if an error occurs.
func (*NutritionUpdateOne) Select ¶
func (nuo *NutritionUpdateOne) Select(field string, fields ...string) *NutritionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NutritionUpdateOne) SetBenefits ¶
func (nuo *NutritionUpdateOne) SetBenefits(s []string) *NutritionUpdateOne
SetBenefits sets the "benefits" field.
func (*NutritionUpdateOne) SetCalories ¶
func (nuo *NutritionUpdateOne) SetCalories(i int) *NutritionUpdateOne
SetCalories sets the "calories" field.
func (*NutritionUpdateOne) SetCarbs ¶
func (nuo *NutritionUpdateOne) SetCarbs(i int) *NutritionUpdateOne
SetCarbs sets the "carbs" field.
func (*NutritionUpdateOne) SetFat ¶
func (nuo *NutritionUpdateOne) SetFat(i int) *NutritionUpdateOne
SetFat sets the "fat" field.
func (*NutritionUpdateOne) SetNillableCalories ¶
func (nuo *NutritionUpdateOne) SetNillableCalories(i *int) *NutritionUpdateOne
SetNillableCalories sets the "calories" field if the given value is not nil.
func (*NutritionUpdateOne) SetNillableCarbs ¶
func (nuo *NutritionUpdateOne) SetNillableCarbs(i *int) *NutritionUpdateOne
SetNillableCarbs sets the "carbs" field if the given value is not nil.
func (*NutritionUpdateOne) SetNillableFat ¶
func (nuo *NutritionUpdateOne) SetNillableFat(i *int) *NutritionUpdateOne
SetNillableFat sets the "fat" field if the given value is not nil.
func (*NutritionUpdateOne) SetNillablePrecision ¶
func (nuo *NutritionUpdateOne) SetNillablePrecision(s *string) *NutritionUpdateOne
SetNillablePrecision sets the "precision" field if the given value is not nil.
func (*NutritionUpdateOne) SetNillableProtein ¶
func (nuo *NutritionUpdateOne) SetNillableProtein(i *int) *NutritionUpdateOne
SetNillableProtein sets the "protein" field if the given value is not nil.
func (*NutritionUpdateOne) SetNillableRecipeID ¶
func (nuo *NutritionUpdateOne) SetNillableRecipeID(id *uuid.UUID) *NutritionUpdateOne
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*NutritionUpdateOne) SetPrecision ¶
func (nuo *NutritionUpdateOne) SetPrecision(s string) *NutritionUpdateOne
SetPrecision sets the "precision" field.
func (*NutritionUpdateOne) SetProtein ¶
func (nuo *NutritionUpdateOne) SetProtein(i int) *NutritionUpdateOne
SetProtein sets the "protein" field.
func (*NutritionUpdateOne) SetRecipe ¶
func (nuo *NutritionUpdateOne) SetRecipe(r *Recipe) *NutritionUpdateOne
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*NutritionUpdateOne) SetRecipeID ¶
func (nuo *NutritionUpdateOne) SetRecipeID(id uuid.UUID) *NutritionUpdateOne
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*NutritionUpdateOne) Where ¶
func (nuo *NutritionUpdateOne) Where(ps ...predicate.Nutrition) *NutritionUpdateOne
Where appends a list predicates to the NutritionUpdate builder.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Product ¶
type Product struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Locale holds the value of the "locale" field. Locale product.Locale `json:"locale,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductQuery when eager-loading is set. Edges ProductEdges `json:"edges"` // contains filtered or unexported fields }
Product is the model entity for the Product schema.
func (*Product) QueryIngredients ¶
func (pr *Product) QueryIngredients() *IngredientQuery
QueryIngredients queries the "ingredients" edge of the Product entity.
func (*Product) QueryRequiredInRecipes ¶
func (pr *Product) QueryRequiredInRecipes() *RecipeQuery
QueryRequiredInRecipes queries the "required_in_recipes" edge of the Product entity.
func (*Product) Unwrap ¶
Unwrap unwraps the Product 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 (*Product) Update ¶
func (pr *Product) Update() *ProductUpdateOne
Update returns a builder for updating this Product. Note that you need to call Product.Unwrap() before calling this method if this Product was returned from a transaction, and the transaction was committed or rolled back.
type ProductClient ¶
type ProductClient struct {
// contains filtered or unexported fields
}
ProductClient is a client for the Product schema.
func NewProductClient ¶
func NewProductClient(c config) *ProductClient
NewProductClient returns a client for the Product from the given config.
func (*ProductClient) Create ¶
func (c *ProductClient) Create() *ProductCreate
Create returns a builder for creating a Product entity.
func (*ProductClient) CreateBulk ¶
func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk
CreateBulk returns a builder for creating a bulk of Product entities.
func (*ProductClient) Delete ¶
func (c *ProductClient) Delete() *ProductDelete
Delete returns a delete builder for Product.
func (*ProductClient) DeleteOne ¶
func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductClient) DeleteOneID ¶
func (c *ProductClient) DeleteOneID(id uuid.UUID) *ProductDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductClient) Hooks ¶
func (c *ProductClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductClient) Intercept ¶
func (c *ProductClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `product.Intercept(f(g(h())))`.
func (*ProductClient) Interceptors ¶
func (c *ProductClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductClient) MapCreateBulk ¶
func (c *ProductClient) MapCreateBulk(slice any, setFunc func(*ProductCreate, int)) *ProductCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ProductClient) Query ¶
func (c *ProductClient) Query() *ProductQuery
Query returns a query builder for Product.
func (*ProductClient) QueryIngredients ¶
func (c *ProductClient) QueryIngredients(pr *Product) *IngredientQuery
QueryIngredients queries the ingredients edge of a Product.
func (*ProductClient) QueryRequiredInRecipes ¶
func (c *ProductClient) QueryRequiredInRecipes(pr *Product) *RecipeQuery
QueryRequiredInRecipes queries the required_in_recipes edge of a Product.
func (*ProductClient) Update ¶
func (c *ProductClient) Update() *ProductUpdate
Update returns an update builder for Product.
func (*ProductClient) UpdateOne ¶
func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductClient) UpdateOneID ¶
func (c *ProductClient) UpdateOneID(id uuid.UUID) *ProductUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductClient) Use ¶
func (c *ProductClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `product.Hooks(f(g(h())))`.
type ProductCreate ¶
type ProductCreate struct {
// contains filtered or unexported fields
}
ProductCreate is the builder for creating a Product entity.
func (*ProductCreate) AddIngredientIDs ¶
func (pc *ProductCreate) AddIngredientIDs(ids ...uuid.UUID) *ProductCreate
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by IDs.
func (*ProductCreate) AddIngredients ¶
func (pc *ProductCreate) AddIngredients(i ...*Ingredient) *ProductCreate
AddIngredients adds the "ingredients" edges to the Ingredient entity.
func (*ProductCreate) AddRequiredInRecipeIDs ¶
func (pc *ProductCreate) AddRequiredInRecipeIDs(ids ...uuid.UUID) *ProductCreate
AddRequiredInRecipeIDs adds the "required_in_recipes" edge to the Recipe entity by IDs.
func (*ProductCreate) AddRequiredInRecipes ¶
func (pc *ProductCreate) AddRequiredInRecipes(r ...*Recipe) *ProductCreate
AddRequiredInRecipes adds the "required_in_recipes" edges to the Recipe entity.
func (*ProductCreate) Exec ¶
func (pc *ProductCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductCreate) ExecX ¶
func (pc *ProductCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductCreate) Mutation ¶
func (pc *ProductCreate) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductCreate) Save ¶
func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)
Save creates the Product in the database.
func (*ProductCreate) SaveX ¶
func (pc *ProductCreate) SaveX(ctx context.Context) *Product
SaveX calls Save and panics if Save returns an error.
func (*ProductCreate) SetCreateTime ¶
func (pc *ProductCreate) SetCreateTime(t time.Time) *ProductCreate
SetCreateTime sets the "create_time" field.
func (*ProductCreate) SetID ¶
func (pc *ProductCreate) SetID(u uuid.UUID) *ProductCreate
SetID sets the "id" field.
func (*ProductCreate) SetLocale ¶
func (pc *ProductCreate) SetLocale(pr product.Locale) *ProductCreate
SetLocale sets the "locale" field.
func (*ProductCreate) SetName ¶
func (pc *ProductCreate) SetName(s string) *ProductCreate
SetName sets the "name" field.
func (*ProductCreate) SetNillableCreateTime ¶
func (pc *ProductCreate) SetNillableCreateTime(t *time.Time) *ProductCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ProductCreate) SetNillableID ¶
func (pc *ProductCreate) SetNillableID(u *uuid.UUID) *ProductCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProductCreate) SetNillableLocale ¶
func (pc *ProductCreate) SetNillableLocale(pr *product.Locale) *ProductCreate
SetNillableLocale sets the "locale" field if the given value is not nil.
func (*ProductCreate) SetNillableUpdateTime ¶
func (pc *ProductCreate) SetNillableUpdateTime(t *time.Time) *ProductCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ProductCreate) SetSlug ¶
func (pc *ProductCreate) SetSlug(s string) *ProductCreate
SetSlug sets the "slug" field.
func (*ProductCreate) SetUpdateTime ¶
func (pc *ProductCreate) SetUpdateTime(t time.Time) *ProductCreate
SetUpdateTime sets the "update_time" field.
type ProductCreateBulk ¶
type ProductCreateBulk struct {
// contains filtered or unexported fields
}
ProductCreateBulk is the builder for creating many Product entities in bulk.
func (*ProductCreateBulk) Exec ¶
func (pcb *ProductCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductCreateBulk) ExecX ¶
func (pcb *ProductCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProductDelete ¶
type ProductDelete struct {
// contains filtered or unexported fields
}
ProductDelete is the builder for deleting a Product entity.
func (*ProductDelete) Exec ¶
func (pd *ProductDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductDelete) ExecX ¶
func (pd *ProductDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductDelete) Where ¶
func (pd *ProductDelete) Where(ps ...predicate.Product) *ProductDelete
Where appends a list predicates to the ProductDelete builder.
type ProductDeleteOne ¶
type ProductDeleteOne struct {
// contains filtered or unexported fields
}
ProductDeleteOne is the builder for deleting a single Product entity.
func (*ProductDeleteOne) Exec ¶
func (pdo *ProductDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductDeleteOne) ExecX ¶
func (pdo *ProductDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductDeleteOne) Where ¶
func (pdo *ProductDeleteOne) Where(ps ...predicate.Product) *ProductDeleteOne
Where appends a list predicates to the ProductDelete builder.
type ProductEdges ¶
type ProductEdges struct { // RequiredInRecipes holds the value of the required_in_recipes edge. RequiredInRecipes []*Recipe `json:"required_in_recipes,omitempty"` // Ingredients holds the value of the ingredients edge. Ingredients []*Ingredient `json:"ingredients,omitempty"` // contains filtered or unexported fields }
ProductEdges holds the relations/edges for other nodes in the graph.
func (ProductEdges) IngredientsOrErr ¶
func (e ProductEdges) IngredientsOrErr() ([]*Ingredient, error)
IngredientsOrErr returns the Ingredients value or an error if the edge was not loaded in eager-loading.
func (ProductEdges) RequiredInRecipesOrErr ¶
func (e ProductEdges) RequiredInRecipesOrErr() ([]*Recipe, error)
RequiredInRecipesOrErr returns the RequiredInRecipes value or an error if the edge was not loaded in eager-loading.
type ProductGroupBy ¶
type ProductGroupBy struct {
// contains filtered or unexported fields
}
ProductGroupBy is the group-by builder for Product entities.
func (*ProductGroupBy) Aggregate ¶
func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Scan ¶
func (pgb *ProductGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductMutation ¶
type ProductMutation struct {
// contains filtered or unexported fields
}
ProductMutation represents an operation that mutates the Product nodes in the graph.
func (*ProductMutation) AddField ¶
func (m *ProductMutation) 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 (*ProductMutation) AddIngredientIDs ¶
func (m *ProductMutation) AddIngredientIDs(ids ...uuid.UUID)
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by ids.
func (*ProductMutation) AddRequiredInRecipeIDs ¶
func (m *ProductMutation) AddRequiredInRecipeIDs(ids ...uuid.UUID)
AddRequiredInRecipeIDs adds the "required_in_recipes" edge to the Recipe entity by ids.
func (*ProductMutation) AddedEdges ¶
func (m *ProductMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductMutation) AddedField ¶
func (m *ProductMutation) 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 (*ProductMutation) AddedFields ¶
func (m *ProductMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductMutation) AddedIDs ¶
func (m *ProductMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductMutation) ClearEdge ¶
func (m *ProductMutation) 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 (*ProductMutation) ClearField ¶
func (m *ProductMutation) 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 (*ProductMutation) ClearIngredients ¶
func (m *ProductMutation) ClearIngredients()
ClearIngredients clears the "ingredients" edge to the Ingredient entity.
func (*ProductMutation) ClearRequiredInRecipes ¶
func (m *ProductMutation) ClearRequiredInRecipes()
ClearRequiredInRecipes clears the "required_in_recipes" edge to the Recipe entity.
func (*ProductMutation) ClearedEdges ¶
func (m *ProductMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductMutation) ClearedFields ¶
func (m *ProductMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductMutation) Client ¶
func (m ProductMutation) 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 (*ProductMutation) CreateTime ¶
func (m *ProductMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ProductMutation) EdgeCleared ¶
func (m *ProductMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductMutation) Field ¶
func (m *ProductMutation) 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 (*ProductMutation) FieldCleared ¶
func (m *ProductMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductMutation) Fields ¶
func (m *ProductMutation) 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 (*ProductMutation) ID ¶
func (m *ProductMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProductMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProductMutation) IngredientsCleared ¶
func (m *ProductMutation) IngredientsCleared() bool
IngredientsCleared reports if the "ingredients" edge to the Ingredient entity was cleared.
func (*ProductMutation) IngredientsIDs ¶
func (m *ProductMutation) IngredientsIDs() (ids []uuid.UUID)
IngredientsIDs returns the "ingredients" edge IDs in the mutation.
func (*ProductMutation) Locale ¶
func (m *ProductMutation) Locale() (r product.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*ProductMutation) Name ¶
func (m *ProductMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProductMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Product entity. If the Product 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 (*ProductMutation) 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 (*ProductMutation) OldLocale ¶
OldLocale returns the old "locale" field's value of the Product entity. If the Product 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 (*ProductMutation) OldName ¶
func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Product entity. If the Product 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 (*ProductMutation) OldSlug ¶
func (m *ProductMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Product entity. If the Product 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 (*ProductMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Product entity. If the Product 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 (*ProductMutation) RemoveIngredientIDs ¶
func (m *ProductMutation) RemoveIngredientIDs(ids ...uuid.UUID)
RemoveIngredientIDs removes the "ingredients" edge to the Ingredient entity by IDs.
func (*ProductMutation) RemoveRequiredInRecipeIDs ¶
func (m *ProductMutation) RemoveRequiredInRecipeIDs(ids ...uuid.UUID)
RemoveRequiredInRecipeIDs removes the "required_in_recipes" edge to the Recipe entity by IDs.
func (*ProductMutation) RemovedEdges ¶
func (m *ProductMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductMutation) RemovedIDs ¶
func (m *ProductMutation) 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 (*ProductMutation) RemovedIngredientsIDs ¶
func (m *ProductMutation) RemovedIngredientsIDs() (ids []uuid.UUID)
RemovedIngredients returns the removed IDs of the "ingredients" edge to the Ingredient entity.
func (*ProductMutation) RemovedRequiredInRecipesIDs ¶
func (m *ProductMutation) RemovedRequiredInRecipesIDs() (ids []uuid.UUID)
RemovedRequiredInRecipes returns the removed IDs of the "required_in_recipes" edge to the Recipe entity.
func (*ProductMutation) RequiredInRecipesCleared ¶
func (m *ProductMutation) RequiredInRecipesCleared() bool
RequiredInRecipesCleared reports if the "required_in_recipes" edge to the Recipe entity was cleared.
func (*ProductMutation) RequiredInRecipesIDs ¶
func (m *ProductMutation) RequiredInRecipesIDs() (ids []uuid.UUID)
RequiredInRecipesIDs returns the "required_in_recipes" edge IDs in the mutation.
func (*ProductMutation) ResetCreateTime ¶
func (m *ProductMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ProductMutation) ResetEdge ¶
func (m *ProductMutation) 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 (*ProductMutation) ResetField ¶
func (m *ProductMutation) 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 (*ProductMutation) ResetIngredients ¶
func (m *ProductMutation) ResetIngredients()
ResetIngredients resets all changes to the "ingredients" edge.
func (*ProductMutation) ResetLocale ¶
func (m *ProductMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*ProductMutation) ResetName ¶
func (m *ProductMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProductMutation) ResetRequiredInRecipes ¶
func (m *ProductMutation) ResetRequiredInRecipes()
ResetRequiredInRecipes resets all changes to the "required_in_recipes" edge.
func (*ProductMutation) ResetSlug ¶
func (m *ProductMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*ProductMutation) ResetUpdateTime ¶
func (m *ProductMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ProductMutation) SetCreateTime ¶
func (m *ProductMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ProductMutation) SetField ¶
func (m *ProductMutation) 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 (*ProductMutation) SetID ¶
func (m *ProductMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Product entities.
func (*ProductMutation) SetLocale ¶
func (m *ProductMutation) SetLocale(pr product.Locale)
SetLocale sets the "locale" field.
func (*ProductMutation) SetName ¶
func (m *ProductMutation) SetName(s string)
SetName sets the "name" field.
func (*ProductMutation) SetOp ¶
func (m *ProductMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductMutation) SetSlug ¶
func (m *ProductMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*ProductMutation) SetUpdateTime ¶
func (m *ProductMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ProductMutation) Slug ¶
func (m *ProductMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (ProductMutation) Tx ¶
func (m ProductMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductMutation) Type ¶
func (m *ProductMutation) Type() string
Type returns the node type of this mutation (Product).
func (*ProductMutation) UpdateTime ¶
func (m *ProductMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ProductMutation) Where ¶
func (m *ProductMutation) Where(ps ...predicate.Product)
Where appends a list predicates to the ProductMutation builder.
func (*ProductMutation) WhereP ¶
func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductQuery ¶
type ProductQuery struct {
// contains filtered or unexported fields
}
ProductQuery is the builder for querying Product entities.
func (*ProductQuery) Aggregate ¶
func (pq *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect
Aggregate returns a ProductSelect configured with the given aggregations.
func (*ProductQuery) All ¶
func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)
All executes the query and returns a list of Products.
func (*ProductQuery) AllX ¶
func (pq *ProductQuery) AllX(ctx context.Context) []*Product
AllX is like All, but panics if an error occurs.
func (*ProductQuery) Clone ¶
func (pq *ProductQuery) Clone() *ProductQuery
Clone returns a duplicate of the ProductQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductQuery) Count ¶
func (pq *ProductQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductQuery) CountX ¶
func (pq *ProductQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductQuery) Exist ¶
func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductQuery) ExistX ¶
func (pq *ProductQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductQuery) First ¶
func (pq *ProductQuery) First(ctx context.Context) (*Product, error)
First returns the first Product entity from the query. Returns a *NotFoundError when no Product was found.
func (*ProductQuery) FirstID ¶
FirstID returns the first Product ID from the query. Returns a *NotFoundError when no Product ID was found.
func (*ProductQuery) FirstIDX ¶
func (pq *ProductQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductQuery) FirstX ¶
func (pq *ProductQuery) FirstX(ctx context.Context) *Product
FirstX is like First, but panics if an error occurs.
func (*ProductQuery) GroupBy ¶
func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Product.Query(). GroupBy(product.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductQuery) IDsX ¶
func (pq *ProductQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ProductQuery) Limit ¶
func (pq *ProductQuery) Limit(limit int) *ProductQuery
Limit the number of records to be returned by this query.
func (*ProductQuery) Offset ¶
func (pq *ProductQuery) Offset(offset int) *ProductQuery
Offset to start from.
func (*ProductQuery) Only ¶
func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)
Only returns a single Product entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Product entity is found. Returns a *NotFoundError when no Product entities are found.
func (*ProductQuery) OnlyID ¶
OnlyID is like Only, but returns the only Product ID in the query. Returns a *NotSingularError when more than one Product ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductQuery) OnlyIDX ¶
func (pq *ProductQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductQuery) OnlyX ¶
func (pq *ProductQuery) OnlyX(ctx context.Context) *Product
OnlyX is like Only, but panics if an error occurs.
func (*ProductQuery) Order ¶
func (pq *ProductQuery) Order(o ...product.OrderOption) *ProductQuery
Order specifies how the records should be ordered.
func (*ProductQuery) QueryIngredients ¶
func (pq *ProductQuery) QueryIngredients() *IngredientQuery
QueryIngredients chains the current query on the "ingredients" edge.
func (*ProductQuery) QueryRequiredInRecipes ¶
func (pq *ProductQuery) QueryRequiredInRecipes() *RecipeQuery
QueryRequiredInRecipes chains the current query on the "required_in_recipes" edge.
func (*ProductQuery) Select ¶
func (pq *ProductQuery) Select(fields ...string) *ProductSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Product.Query(). Select(product.FieldCreateTime). Scan(ctx, &v)
func (*ProductQuery) Unique ¶
func (pq *ProductQuery) Unique(unique bool) *ProductQuery
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 (*ProductQuery) Where ¶
func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery
Where adds a new predicate for the ProductQuery builder.
func (*ProductQuery) WithIngredients ¶
func (pq *ProductQuery) WithIngredients(opts ...func(*IngredientQuery)) *ProductQuery
WithIngredients tells the query-builder to eager-load the nodes that are connected to the "ingredients" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductQuery) WithRequiredInRecipes ¶
func (pq *ProductQuery) WithRequiredInRecipes(opts ...func(*RecipeQuery)) *ProductQuery
WithRequiredInRecipes tells the query-builder to eager-load the nodes that are connected to the "required_in_recipes" edge. The optional arguments are used to configure the query builder of the edge.
type ProductSelect ¶
type ProductSelect struct { *ProductQuery // contains filtered or unexported fields }
ProductSelect is the builder for selecting fields of Product entities.
func (*ProductSelect) Aggregate ¶
func (ps *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Scan ¶
func (ps *ProductSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductUpdate ¶
type ProductUpdate struct {
// contains filtered or unexported fields
}
ProductUpdate is the builder for updating Product entities.
func (*ProductUpdate) AddIngredientIDs ¶
func (pu *ProductUpdate) AddIngredientIDs(ids ...uuid.UUID) *ProductUpdate
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by IDs.
func (*ProductUpdate) AddIngredients ¶
func (pu *ProductUpdate) AddIngredients(i ...*Ingredient) *ProductUpdate
AddIngredients adds the "ingredients" edges to the Ingredient entity.
func (*ProductUpdate) AddRequiredInRecipeIDs ¶
func (pu *ProductUpdate) AddRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdate
AddRequiredInRecipeIDs adds the "required_in_recipes" edge to the Recipe entity by IDs.
func (*ProductUpdate) AddRequiredInRecipes ¶
func (pu *ProductUpdate) AddRequiredInRecipes(r ...*Recipe) *ProductUpdate
AddRequiredInRecipes adds the "required_in_recipes" edges to the Recipe entity.
func (*ProductUpdate) ClearIngredients ¶
func (pu *ProductUpdate) ClearIngredients() *ProductUpdate
ClearIngredients clears all "ingredients" edges to the Ingredient entity.
func (*ProductUpdate) ClearRequiredInRecipes ¶
func (pu *ProductUpdate) ClearRequiredInRecipes() *ProductUpdate
ClearRequiredInRecipes clears all "required_in_recipes" edges to the Recipe entity.
func (*ProductUpdate) Exec ¶
func (pu *ProductUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductUpdate) ExecX ¶
func (pu *ProductUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpdate) Mutation ¶
func (pu *ProductUpdate) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdate) RemoveIngredientIDs ¶
func (pu *ProductUpdate) RemoveIngredientIDs(ids ...uuid.UUID) *ProductUpdate
RemoveIngredientIDs removes the "ingredients" edge to Ingredient entities by IDs.
func (*ProductUpdate) RemoveIngredients ¶
func (pu *ProductUpdate) RemoveIngredients(i ...*Ingredient) *ProductUpdate
RemoveIngredients removes "ingredients" edges to Ingredient entities.
func (*ProductUpdate) RemoveRequiredInRecipeIDs ¶
func (pu *ProductUpdate) RemoveRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdate
RemoveRequiredInRecipeIDs removes the "required_in_recipes" edge to Recipe entities by IDs.
func (*ProductUpdate) RemoveRequiredInRecipes ¶
func (pu *ProductUpdate) RemoveRequiredInRecipes(r ...*Recipe) *ProductUpdate
RemoveRequiredInRecipes removes "required_in_recipes" edges to Recipe entities.
func (*ProductUpdate) Save ¶
func (pu *ProductUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductUpdate) SaveX ¶
func (pu *ProductUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductUpdate) SetName ¶
func (pu *ProductUpdate) SetName(s string) *ProductUpdate
SetName sets the "name" field.
func (*ProductUpdate) SetNillableName ¶
func (pu *ProductUpdate) SetNillableName(s *string) *ProductUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductUpdate) SetNillableSlug ¶
func (pu *ProductUpdate) SetNillableSlug(s *string) *ProductUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*ProductUpdate) SetSlug ¶
func (pu *ProductUpdate) SetSlug(s string) *ProductUpdate
SetSlug sets the "slug" field.
func (*ProductUpdate) SetUpdateTime ¶
func (pu *ProductUpdate) SetUpdateTime(t time.Time) *ProductUpdate
SetUpdateTime sets the "update_time" field.
func (*ProductUpdate) Where ¶
func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate
Where appends a list predicates to the ProductUpdate builder.
type ProductUpdateOne ¶
type ProductUpdateOne struct {
// contains filtered or unexported fields
}
ProductUpdateOne is the builder for updating a single Product entity.
func (*ProductUpdateOne) AddIngredientIDs ¶
func (puo *ProductUpdateOne) AddIngredientIDs(ids ...uuid.UUID) *ProductUpdateOne
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by IDs.
func (*ProductUpdateOne) AddIngredients ¶
func (puo *ProductUpdateOne) AddIngredients(i ...*Ingredient) *ProductUpdateOne
AddIngredients adds the "ingredients" edges to the Ingredient entity.
func (*ProductUpdateOne) AddRequiredInRecipeIDs ¶
func (puo *ProductUpdateOne) AddRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdateOne
AddRequiredInRecipeIDs adds the "required_in_recipes" edge to the Recipe entity by IDs.
func (*ProductUpdateOne) AddRequiredInRecipes ¶
func (puo *ProductUpdateOne) AddRequiredInRecipes(r ...*Recipe) *ProductUpdateOne
AddRequiredInRecipes adds the "required_in_recipes" edges to the Recipe entity.
func (*ProductUpdateOne) ClearIngredients ¶
func (puo *ProductUpdateOne) ClearIngredients() *ProductUpdateOne
ClearIngredients clears all "ingredients" edges to the Ingredient entity.
func (*ProductUpdateOne) ClearRequiredInRecipes ¶
func (puo *ProductUpdateOne) ClearRequiredInRecipes() *ProductUpdateOne
ClearRequiredInRecipes clears all "required_in_recipes" edges to the Recipe entity.
func (*ProductUpdateOne) Exec ¶
func (puo *ProductUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductUpdateOne) ExecX ¶
func (puo *ProductUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpdateOne) Mutation ¶
func (puo *ProductUpdateOne) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdateOne) RemoveIngredientIDs ¶
func (puo *ProductUpdateOne) RemoveIngredientIDs(ids ...uuid.UUID) *ProductUpdateOne
RemoveIngredientIDs removes the "ingredients" edge to Ingredient entities by IDs.
func (*ProductUpdateOne) RemoveIngredients ¶
func (puo *ProductUpdateOne) RemoveIngredients(i ...*Ingredient) *ProductUpdateOne
RemoveIngredients removes "ingredients" edges to Ingredient entities.
func (*ProductUpdateOne) RemoveRequiredInRecipeIDs ¶
func (puo *ProductUpdateOne) RemoveRequiredInRecipeIDs(ids ...uuid.UUID) *ProductUpdateOne
RemoveRequiredInRecipeIDs removes the "required_in_recipes" edge to Recipe entities by IDs.
func (*ProductUpdateOne) RemoveRequiredInRecipes ¶
func (puo *ProductUpdateOne) RemoveRequiredInRecipes(r ...*Recipe) *ProductUpdateOne
RemoveRequiredInRecipes removes "required_in_recipes" edges to Recipe entities.
func (*ProductUpdateOne) Save ¶
func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)
Save executes the query and returns the updated Product entity.
func (*ProductUpdateOne) SaveX ¶
func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product
SaveX is like Save, but panics if an error occurs.
func (*ProductUpdateOne) Select ¶
func (puo *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductUpdateOne) SetName ¶
func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
SetName sets the "name" field.
func (*ProductUpdateOne) SetNillableName ¶
func (puo *ProductUpdateOne) SetNillableName(s *string) *ProductUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableSlug ¶
func (puo *ProductUpdateOne) SetNillableSlug(s *string) *ProductUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*ProductUpdateOne) SetSlug ¶
func (puo *ProductUpdateOne) SetSlug(s string) *ProductUpdateOne
SetSlug sets the "slug" field.
func (*ProductUpdateOne) SetUpdateTime ¶
func (puo *ProductUpdateOne) SetUpdateTime(t time.Time) *ProductUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ProductUpdateOne) Where ¶
func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
Where appends a list predicates to the ProductUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Recipe ¶
type Recipe struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Locale holds the value of the "locale" field. Locale recipe.Locale `json:"locale,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Rating holds the value of the "rating" field. Rating float32 `json:"rating,omitempty"` // Servings holds the value of the "servings" field. Servings *int `json:"servings,omitempty"` // Time holds the value of the "time" field. Time *time.Duration `json:"time,omitempty"` // Published holds the value of the "published" field. Published bool `json:"published,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RecipeQuery when eager-loading is set. Edges RecipeEdges `json:"edges"` // contains filtered or unexported fields }
Recipe is the model entity for the Recipe schema.
func (*Recipe) QueryEquipment ¶
func (r *Recipe) QueryEquipment() *EquipmentQuery
QueryEquipment queries the "equipment" edge of the Recipe entity.
func (*Recipe) QueryIdeas ¶
QueryIdeas queries the "ideas" edge of the Recipe entity.
func (*Recipe) QueryIngredients ¶
func (r *Recipe) QueryIngredients() *IngredientQuery
QueryIngredients queries the "ingredients" edge of the Recipe entity.
func (*Recipe) QueryInstructions ¶
func (r *Recipe) QueryInstructions() *InstructionQuery
QueryInstructions queries the "instructions" edge of the Recipe entity.
func (*Recipe) QueryNutrition ¶
func (r *Recipe) QueryNutrition() *NutritionQuery
QueryNutrition queries the "nutrition" edge of the Recipe entity.
func (*Recipe) QueryRequiredProducts ¶
func (r *Recipe) QueryRequiredProducts() *ProductQuery
QueryRequiredProducts queries the "required_products" edge of the Recipe entity.
func (*Recipe) QuerySources ¶
func (r *Recipe) QuerySources() *SourceQuery
QuerySources queries the "sources" edge of the Recipe entity.
func (*Recipe) Unwrap ¶
Unwrap unwraps the Recipe 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 (*Recipe) Update ¶
func (r *Recipe) Update() *RecipeUpdateOne
Update returns a builder for updating this Recipe. Note that you need to call Recipe.Unwrap() before calling this method if this Recipe was returned from a transaction, and the transaction was committed or rolled back.
type RecipeClient ¶
type RecipeClient struct {
// contains filtered or unexported fields
}
RecipeClient is a client for the Recipe schema.
func NewRecipeClient ¶
func NewRecipeClient(c config) *RecipeClient
NewRecipeClient returns a client for the Recipe from the given config.
func (*RecipeClient) Create ¶
func (c *RecipeClient) Create() *RecipeCreate
Create returns a builder for creating a Recipe entity.
func (*RecipeClient) CreateBulk ¶
func (c *RecipeClient) CreateBulk(builders ...*RecipeCreate) *RecipeCreateBulk
CreateBulk returns a builder for creating a bulk of Recipe entities.
func (*RecipeClient) Delete ¶
func (c *RecipeClient) Delete() *RecipeDelete
Delete returns a delete builder for Recipe.
func (*RecipeClient) DeleteOne ¶
func (c *RecipeClient) DeleteOne(r *Recipe) *RecipeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RecipeClient) DeleteOneID ¶
func (c *RecipeClient) DeleteOneID(id uuid.UUID) *RecipeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RecipeClient) Intercept ¶
func (c *RecipeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `recipe.Intercept(f(g(h())))`.
func (*RecipeClient) Interceptors ¶
func (c *RecipeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RecipeClient) MapCreateBulk ¶
func (c *RecipeClient) MapCreateBulk(slice any, setFunc func(*RecipeCreate, int)) *RecipeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*RecipeClient) Query ¶
func (c *RecipeClient) Query() *RecipeQuery
Query returns a query builder for Recipe.
func (*RecipeClient) QueryEquipment ¶
func (c *RecipeClient) QueryEquipment(r *Recipe) *EquipmentQuery
QueryEquipment queries the equipment edge of a Recipe.
func (*RecipeClient) QueryIdeas ¶
func (c *RecipeClient) QueryIdeas(r *Recipe) *IdeaQuery
QueryIdeas queries the ideas edge of a Recipe.
func (*RecipeClient) QueryIngredients ¶
func (c *RecipeClient) QueryIngredients(r *Recipe) *IngredientQuery
QueryIngredients queries the ingredients edge of a Recipe.
func (*RecipeClient) QueryInstructions ¶
func (c *RecipeClient) QueryInstructions(r *Recipe) *InstructionQuery
QueryInstructions queries the instructions edge of a Recipe.
func (*RecipeClient) QueryNutrition ¶
func (c *RecipeClient) QueryNutrition(r *Recipe) *NutritionQuery
QueryNutrition queries the nutrition edge of a Recipe.
func (*RecipeClient) QueryRequiredProducts ¶
func (c *RecipeClient) QueryRequiredProducts(r *Recipe) *ProductQuery
QueryRequiredProducts queries the required_products edge of a Recipe.
func (*RecipeClient) QuerySources ¶
func (c *RecipeClient) QuerySources(r *Recipe) *SourceQuery
QuerySources queries the sources edge of a Recipe.
func (*RecipeClient) QueryTags ¶
func (c *RecipeClient) QueryTags(r *Recipe) *TagQuery
QueryTags queries the tags edge of a Recipe.
func (*RecipeClient) Update ¶
func (c *RecipeClient) Update() *RecipeUpdate
Update returns an update builder for Recipe.
func (*RecipeClient) UpdateOne ¶
func (c *RecipeClient) UpdateOne(r *Recipe) *RecipeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RecipeClient) UpdateOneID ¶
func (c *RecipeClient) UpdateOneID(id uuid.UUID) *RecipeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RecipeClient) Use ¶
func (c *RecipeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `recipe.Hooks(f(g(h())))`.
type RecipeCreate ¶
type RecipeCreate struct {
// contains filtered or unexported fields
}
RecipeCreate is the builder for creating a Recipe entity.
func (*RecipeCreate) AddEquipment ¶
func (rc *RecipeCreate) AddEquipment(e ...*Equipment) *RecipeCreate
AddEquipment adds the "equipment" edges to the Equipment entity.
func (*RecipeCreate) AddEquipmentIDs ¶
func (rc *RecipeCreate) AddEquipmentIDs(ids ...uuid.UUID) *RecipeCreate
AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.
func (*RecipeCreate) AddIdeaIDs ¶
func (rc *RecipeCreate) AddIdeaIDs(ids ...uuid.UUID) *RecipeCreate
AddIdeaIDs adds the "ideas" edge to the Idea entity by IDs.
func (*RecipeCreate) AddIdeas ¶
func (rc *RecipeCreate) AddIdeas(i ...*Idea) *RecipeCreate
AddIdeas adds the "ideas" edges to the Idea entity.
func (*RecipeCreate) AddIngredientIDs ¶
func (rc *RecipeCreate) AddIngredientIDs(ids ...uuid.UUID) *RecipeCreate
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by IDs.
func (*RecipeCreate) AddIngredients ¶
func (rc *RecipeCreate) AddIngredients(i ...*Ingredient) *RecipeCreate
AddIngredients adds the "ingredients" edges to the Ingredient entity.
func (*RecipeCreate) AddInstructionIDs ¶
func (rc *RecipeCreate) AddInstructionIDs(ids ...uuid.UUID) *RecipeCreate
AddInstructionIDs adds the "instructions" edge to the Instruction entity by IDs.
func (*RecipeCreate) AddInstructions ¶
func (rc *RecipeCreate) AddInstructions(i ...*Instruction) *RecipeCreate
AddInstructions adds the "instructions" edges to the Instruction entity.
func (*RecipeCreate) AddRequiredProductIDs ¶
func (rc *RecipeCreate) AddRequiredProductIDs(ids ...uuid.UUID) *RecipeCreate
AddRequiredProductIDs adds the "required_products" edge to the Product entity by IDs.
func (*RecipeCreate) AddRequiredProducts ¶
func (rc *RecipeCreate) AddRequiredProducts(p ...*Product) *RecipeCreate
AddRequiredProducts adds the "required_products" edges to the Product entity.
func (*RecipeCreate) AddSourceIDs ¶
func (rc *RecipeCreate) AddSourceIDs(ids ...uuid.UUID) *RecipeCreate
AddSourceIDs adds the "sources" edge to the Source entity by IDs.
func (*RecipeCreate) AddSources ¶
func (rc *RecipeCreate) AddSources(s ...*Source) *RecipeCreate
AddSources adds the "sources" edges to the Source entity.
func (*RecipeCreate) AddTagIDs ¶
func (rc *RecipeCreate) AddTagIDs(ids ...uuid.UUID) *RecipeCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*RecipeCreate) AddTags ¶
func (rc *RecipeCreate) AddTags(t ...*Tag) *RecipeCreate
AddTags adds the "tags" edges to the Tag entity.
func (*RecipeCreate) Exec ¶
func (rc *RecipeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RecipeCreate) ExecX ¶
func (rc *RecipeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecipeCreate) Mutation ¶
func (rc *RecipeCreate) Mutation() *RecipeMutation
Mutation returns the RecipeMutation object of the builder.
func (*RecipeCreate) Save ¶
func (rc *RecipeCreate) Save(ctx context.Context) (*Recipe, error)
Save creates the Recipe in the database.
func (*RecipeCreate) SaveX ¶
func (rc *RecipeCreate) SaveX(ctx context.Context) *Recipe
SaveX calls Save and panics if Save returns an error.
func (*RecipeCreate) SetCreateTime ¶
func (rc *RecipeCreate) SetCreateTime(t time.Time) *RecipeCreate
SetCreateTime sets the "create_time" field.
func (*RecipeCreate) SetDescription ¶
func (rc *RecipeCreate) SetDescription(s string) *RecipeCreate
SetDescription sets the "description" field.
func (*RecipeCreate) SetID ¶
func (rc *RecipeCreate) SetID(u uuid.UUID) *RecipeCreate
SetID sets the "id" field.
func (*RecipeCreate) SetLocale ¶
func (rc *RecipeCreate) SetLocale(r recipe.Locale) *RecipeCreate
SetLocale sets the "locale" field.
func (*RecipeCreate) SetName ¶
func (rc *RecipeCreate) SetName(s string) *RecipeCreate
SetName sets the "name" field.
func (*RecipeCreate) SetNillableCreateTime ¶
func (rc *RecipeCreate) SetNillableCreateTime(t *time.Time) *RecipeCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RecipeCreate) SetNillableID ¶
func (rc *RecipeCreate) SetNillableID(u *uuid.UUID) *RecipeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RecipeCreate) SetNillableLocale ¶
func (rc *RecipeCreate) SetNillableLocale(r *recipe.Locale) *RecipeCreate
SetNillableLocale sets the "locale" field if the given value is not nil.
func (*RecipeCreate) SetNillableNutritionID ¶
func (rc *RecipeCreate) SetNillableNutritionID(id *int) *RecipeCreate
SetNillableNutritionID sets the "nutrition" edge to the Nutrition entity by ID if the given value is not nil.
func (*RecipeCreate) SetNillablePublished ¶
func (rc *RecipeCreate) SetNillablePublished(b *bool) *RecipeCreate
SetNillablePublished sets the "published" field if the given value is not nil.
func (*RecipeCreate) SetNillableRating ¶
func (rc *RecipeCreate) SetNillableRating(f *float32) *RecipeCreate
SetNillableRating sets the "rating" field if the given value is not nil.
func (*RecipeCreate) SetNillableServings ¶
func (rc *RecipeCreate) SetNillableServings(i *int) *RecipeCreate
SetNillableServings sets the "servings" field if the given value is not nil.
func (*RecipeCreate) SetNillableTime ¶
func (rc *RecipeCreate) SetNillableTime(t *time.Duration) *RecipeCreate
SetNillableTime sets the "time" field if the given value is not nil.
func (*RecipeCreate) SetNillableUpdateTime ¶
func (rc *RecipeCreate) SetNillableUpdateTime(t *time.Time) *RecipeCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*RecipeCreate) SetNutrition ¶
func (rc *RecipeCreate) SetNutrition(n *Nutrition) *RecipeCreate
SetNutrition sets the "nutrition" edge to the Nutrition entity.
func (*RecipeCreate) SetNutritionID ¶
func (rc *RecipeCreate) SetNutritionID(id int) *RecipeCreate
SetNutritionID sets the "nutrition" edge to the Nutrition entity by ID.
func (*RecipeCreate) SetPublished ¶
func (rc *RecipeCreate) SetPublished(b bool) *RecipeCreate
SetPublished sets the "published" field.
func (*RecipeCreate) SetRating ¶
func (rc *RecipeCreate) SetRating(f float32) *RecipeCreate
SetRating sets the "rating" field.
func (*RecipeCreate) SetServings ¶
func (rc *RecipeCreate) SetServings(i int) *RecipeCreate
SetServings sets the "servings" field.
func (*RecipeCreate) SetSlug ¶
func (rc *RecipeCreate) SetSlug(s string) *RecipeCreate
SetSlug sets the "slug" field.
func (*RecipeCreate) SetText ¶
func (rc *RecipeCreate) SetText(s string) *RecipeCreate
SetText sets the "text" field.
func (*RecipeCreate) SetTime ¶
func (rc *RecipeCreate) SetTime(t time.Duration) *RecipeCreate
SetTime sets the "time" field.
func (*RecipeCreate) SetUpdateTime ¶
func (rc *RecipeCreate) SetUpdateTime(t time.Time) *RecipeCreate
SetUpdateTime sets the "update_time" field.
type RecipeCreateBulk ¶
type RecipeCreateBulk struct {
// contains filtered or unexported fields
}
RecipeCreateBulk is the builder for creating many Recipe entities in bulk.
func (*RecipeCreateBulk) Exec ¶
func (rcb *RecipeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RecipeCreateBulk) ExecX ¶
func (rcb *RecipeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RecipeDelete ¶
type RecipeDelete struct {
// contains filtered or unexported fields
}
RecipeDelete is the builder for deleting a Recipe entity.
func (*RecipeDelete) Exec ¶
func (rd *RecipeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RecipeDelete) ExecX ¶
func (rd *RecipeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RecipeDelete) Where ¶
func (rd *RecipeDelete) Where(ps ...predicate.Recipe) *RecipeDelete
Where appends a list predicates to the RecipeDelete builder.
type RecipeDeleteOne ¶
type RecipeDeleteOne struct {
// contains filtered or unexported fields
}
RecipeDeleteOne is the builder for deleting a single Recipe entity.
func (*RecipeDeleteOne) Exec ¶
func (rdo *RecipeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RecipeDeleteOne) ExecX ¶
func (rdo *RecipeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecipeDeleteOne) Where ¶
func (rdo *RecipeDeleteOne) Where(ps ...predicate.Recipe) *RecipeDeleteOne
Where appends a list predicates to the RecipeDelete builder.
type RecipeEdges ¶
type RecipeEdges struct { // RequiredProducts holds the value of the required_products edge. RequiredProducts []*Product `json:"required_products,omitempty"` // Instructions holds the value of the instructions edge. Instructions []*Instruction `json:"instructions,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // Equipment holds the value of the equipment edge. Equipment []*Equipment `json:"equipment,omitempty"` // Ideas holds the value of the ideas edge. Ideas []*Idea `json:"ideas,omitempty"` // Sources holds the value of the sources edge. Sources []*Source `json:"sources,omitempty"` // Nutrition holds the value of the nutrition edge. Nutrition *Nutrition `json:"nutrition,omitempty"` // Ingredients holds the value of the ingredients edge. Ingredients []*Ingredient `json:"ingredients,omitempty"` // contains filtered or unexported fields }
RecipeEdges holds the relations/edges for other nodes in the graph.
func (RecipeEdges) EquipmentOrErr ¶
func (e RecipeEdges) EquipmentOrErr() ([]*Equipment, error)
EquipmentOrErr returns the Equipment value or an error if the edge was not loaded in eager-loading.
func (RecipeEdges) IdeasOrErr ¶
func (e RecipeEdges) IdeasOrErr() ([]*Idea, error)
IdeasOrErr returns the Ideas value or an error if the edge was not loaded in eager-loading.
func (RecipeEdges) IngredientsOrErr ¶
func (e RecipeEdges) IngredientsOrErr() ([]*Ingredient, error)
IngredientsOrErr returns the Ingredients value or an error if the edge was not loaded in eager-loading.
func (RecipeEdges) InstructionsOrErr ¶
func (e RecipeEdges) InstructionsOrErr() ([]*Instruction, error)
InstructionsOrErr returns the Instructions value or an error if the edge was not loaded in eager-loading.
func (RecipeEdges) NutritionOrErr ¶
func (e RecipeEdges) NutritionOrErr() (*Nutrition, error)
NutritionOrErr returns the Nutrition value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RecipeEdges) RequiredProductsOrErr ¶
func (e RecipeEdges) RequiredProductsOrErr() ([]*Product, error)
RequiredProductsOrErr returns the RequiredProducts value or an error if the edge was not loaded in eager-loading.
func (RecipeEdges) SourcesOrErr ¶
func (e RecipeEdges) SourcesOrErr() ([]*Source, error)
SourcesOrErr returns the Sources value or an error if the edge was not loaded in eager-loading.
func (RecipeEdges) TagsOrErr ¶
func (e RecipeEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
type RecipeGroupBy ¶
type RecipeGroupBy struct {
// contains filtered or unexported fields
}
RecipeGroupBy is the group-by builder for Recipe entities.
func (*RecipeGroupBy) Aggregate ¶
func (rgb *RecipeGroupBy) Aggregate(fns ...AggregateFunc) *RecipeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RecipeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RecipeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RecipeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RecipeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RecipeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RecipeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RecipeGroupBy) Scan ¶
func (rgb *RecipeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RecipeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RecipeMutation ¶
type RecipeMutation struct {
// contains filtered or unexported fields
}
RecipeMutation represents an operation that mutates the Recipe nodes in the graph.
func (*RecipeMutation) AddEquipmentIDs ¶
func (m *RecipeMutation) AddEquipmentIDs(ids ...uuid.UUID)
AddEquipmentIDs adds the "equipment" edge to the Equipment entity by ids.
func (*RecipeMutation) AddField ¶
func (m *RecipeMutation) 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 (*RecipeMutation) AddIdeaIDs ¶
func (m *RecipeMutation) AddIdeaIDs(ids ...uuid.UUID)
AddIdeaIDs adds the "ideas" edge to the Idea entity by ids.
func (*RecipeMutation) AddIngredientIDs ¶
func (m *RecipeMutation) AddIngredientIDs(ids ...uuid.UUID)
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by ids.
func (*RecipeMutation) AddInstructionIDs ¶
func (m *RecipeMutation) AddInstructionIDs(ids ...uuid.UUID)
AddInstructionIDs adds the "instructions" edge to the Instruction entity by ids.
func (*RecipeMutation) AddRating ¶
func (m *RecipeMutation) AddRating(f float32)
AddRating adds f to the "rating" field.
func (*RecipeMutation) AddRequiredProductIDs ¶
func (m *RecipeMutation) AddRequiredProductIDs(ids ...uuid.UUID)
AddRequiredProductIDs adds the "required_products" edge to the Product entity by ids.
func (*RecipeMutation) AddServings ¶
func (m *RecipeMutation) AddServings(i int)
AddServings adds i to the "servings" field.
func (*RecipeMutation) AddSourceIDs ¶
func (m *RecipeMutation) AddSourceIDs(ids ...uuid.UUID)
AddSourceIDs adds the "sources" edge to the Source entity by ids.
func (*RecipeMutation) AddTagIDs ¶
func (m *RecipeMutation) AddTagIDs(ids ...uuid.UUID)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*RecipeMutation) AddTime ¶
func (m *RecipeMutation) AddTime(t time.Duration)
AddTime adds t to the "time" field.
func (*RecipeMutation) AddedEdges ¶
func (m *RecipeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RecipeMutation) AddedField ¶
func (m *RecipeMutation) 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 (*RecipeMutation) AddedFields ¶
func (m *RecipeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RecipeMutation) AddedIDs ¶
func (m *RecipeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RecipeMutation) AddedRating ¶
func (m *RecipeMutation) AddedRating() (r float32, exists bool)
AddedRating returns the value that was added to the "rating" field in this mutation.
func (*RecipeMutation) AddedServings ¶
func (m *RecipeMutation) AddedServings() (r int, exists bool)
AddedServings returns the value that was added to the "servings" field in this mutation.
func (*RecipeMutation) AddedTime ¶
func (m *RecipeMutation) AddedTime() (r time.Duration, exists bool)
AddedTime returns the value that was added to the "time" field in this mutation.
func (*RecipeMutation) ClearEdge ¶
func (m *RecipeMutation) 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 (*RecipeMutation) ClearEquipment ¶
func (m *RecipeMutation) ClearEquipment()
ClearEquipment clears the "equipment" edge to the Equipment entity.
func (*RecipeMutation) ClearField ¶
func (m *RecipeMutation) 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 (*RecipeMutation) ClearIdeas ¶
func (m *RecipeMutation) ClearIdeas()
ClearIdeas clears the "ideas" edge to the Idea entity.
func (*RecipeMutation) ClearIngredients ¶
func (m *RecipeMutation) ClearIngredients()
ClearIngredients clears the "ingredients" edge to the Ingredient entity.
func (*RecipeMutation) ClearInstructions ¶
func (m *RecipeMutation) ClearInstructions()
ClearInstructions clears the "instructions" edge to the Instruction entity.
func (*RecipeMutation) ClearNutrition ¶
func (m *RecipeMutation) ClearNutrition()
ClearNutrition clears the "nutrition" edge to the Nutrition entity.
func (*RecipeMutation) ClearRating ¶
func (m *RecipeMutation) ClearRating()
ClearRating clears the value of the "rating" field.
func (*RecipeMutation) ClearRequiredProducts ¶
func (m *RecipeMutation) ClearRequiredProducts()
ClearRequiredProducts clears the "required_products" edge to the Product entity.
func (*RecipeMutation) ClearServings ¶
func (m *RecipeMutation) ClearServings()
ClearServings clears the value of the "servings" field.
func (*RecipeMutation) ClearSources ¶
func (m *RecipeMutation) ClearSources()
ClearSources clears the "sources" edge to the Source entity.
func (*RecipeMutation) ClearTags ¶
func (m *RecipeMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*RecipeMutation) ClearTime ¶
func (m *RecipeMutation) ClearTime()
ClearTime clears the value of the "time" field.
func (*RecipeMutation) ClearedEdges ¶
func (m *RecipeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RecipeMutation) ClearedFields ¶
func (m *RecipeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RecipeMutation) Client ¶
func (m RecipeMutation) 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 (*RecipeMutation) CreateTime ¶
func (m *RecipeMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*RecipeMutation) Description ¶
func (m *RecipeMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*RecipeMutation) EdgeCleared ¶
func (m *RecipeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RecipeMutation) EquipmentCleared ¶
func (m *RecipeMutation) EquipmentCleared() bool
EquipmentCleared reports if the "equipment" edge to the Equipment entity was cleared.
func (*RecipeMutation) EquipmentIDs ¶
func (m *RecipeMutation) EquipmentIDs() (ids []uuid.UUID)
EquipmentIDs returns the "equipment" edge IDs in the mutation.
func (*RecipeMutation) Field ¶
func (m *RecipeMutation) 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 (*RecipeMutation) FieldCleared ¶
func (m *RecipeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RecipeMutation) Fields ¶
func (m *RecipeMutation) 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 (*RecipeMutation) ID ¶
func (m *RecipeMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RecipeMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RecipeMutation) IdeasCleared ¶
func (m *RecipeMutation) IdeasCleared() bool
IdeasCleared reports if the "ideas" edge to the Idea entity was cleared.
func (*RecipeMutation) IdeasIDs ¶
func (m *RecipeMutation) IdeasIDs() (ids []uuid.UUID)
IdeasIDs returns the "ideas" edge IDs in the mutation.
func (*RecipeMutation) IngredientsCleared ¶
func (m *RecipeMutation) IngredientsCleared() bool
IngredientsCleared reports if the "ingredients" edge to the Ingredient entity was cleared.
func (*RecipeMutation) IngredientsIDs ¶
func (m *RecipeMutation) IngredientsIDs() (ids []uuid.UUID)
IngredientsIDs returns the "ingredients" edge IDs in the mutation.
func (*RecipeMutation) InstructionsCleared ¶
func (m *RecipeMutation) InstructionsCleared() bool
InstructionsCleared reports if the "instructions" edge to the Instruction entity was cleared.
func (*RecipeMutation) InstructionsIDs ¶
func (m *RecipeMutation) InstructionsIDs() (ids []uuid.UUID)
InstructionsIDs returns the "instructions" edge IDs in the mutation.
func (*RecipeMutation) Locale ¶
func (m *RecipeMutation) Locale() (r recipe.Locale, exists bool)
Locale returns the value of the "locale" field in the mutation.
func (*RecipeMutation) Name ¶
func (m *RecipeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RecipeMutation) NutritionCleared ¶
func (m *RecipeMutation) NutritionCleared() bool
NutritionCleared reports if the "nutrition" edge to the Nutrition entity was cleared.
func (*RecipeMutation) NutritionID ¶
func (m *RecipeMutation) NutritionID() (id int, exists bool)
NutritionID returns the "nutrition" edge ID in the mutation.
func (*RecipeMutation) NutritionIDs ¶
func (m *RecipeMutation) NutritionIDs() (ids []int)
NutritionIDs returns the "nutrition" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NutritionID instead. It exists only for internal usage by the builders.
func (*RecipeMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldDescription ¶
func (m *RecipeMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) 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 (*RecipeMutation) OldLocale ¶
OldLocale returns the old "locale" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldName ¶
func (m *RecipeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldPublished ¶
func (m *RecipeMutation) OldPublished(ctx context.Context) (v bool, err error)
OldPublished returns the old "published" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldRating ¶
func (m *RecipeMutation) OldRating(ctx context.Context) (v float32, err error)
OldRating returns the old "rating" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldServings ¶
func (m *RecipeMutation) OldServings(ctx context.Context) (v *int, err error)
OldServings returns the old "servings" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldSlug ¶
func (m *RecipeMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldText ¶
func (m *RecipeMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldTime ¶
OldTime returns the old "time" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Recipe entity. If the Recipe 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 (*RecipeMutation) Published ¶
func (m *RecipeMutation) Published() (r bool, exists bool)
Published returns the value of the "published" field in the mutation.
func (*RecipeMutation) Rating ¶
func (m *RecipeMutation) Rating() (r float32, exists bool)
Rating returns the value of the "rating" field in the mutation.
func (*RecipeMutation) RatingCleared ¶
func (m *RecipeMutation) RatingCleared() bool
RatingCleared returns if the "rating" field was cleared in this mutation.
func (*RecipeMutation) RemoveEquipmentIDs ¶
func (m *RecipeMutation) RemoveEquipmentIDs(ids ...uuid.UUID)
RemoveEquipmentIDs removes the "equipment" edge to the Equipment entity by IDs.
func (*RecipeMutation) RemoveIdeaIDs ¶
func (m *RecipeMutation) RemoveIdeaIDs(ids ...uuid.UUID)
RemoveIdeaIDs removes the "ideas" edge to the Idea entity by IDs.
func (*RecipeMutation) RemoveIngredientIDs ¶
func (m *RecipeMutation) RemoveIngredientIDs(ids ...uuid.UUID)
RemoveIngredientIDs removes the "ingredients" edge to the Ingredient entity by IDs.
func (*RecipeMutation) RemoveInstructionIDs ¶
func (m *RecipeMutation) RemoveInstructionIDs(ids ...uuid.UUID)
RemoveInstructionIDs removes the "instructions" edge to the Instruction entity by IDs.
func (*RecipeMutation) RemoveRequiredProductIDs ¶
func (m *RecipeMutation) RemoveRequiredProductIDs(ids ...uuid.UUID)
RemoveRequiredProductIDs removes the "required_products" edge to the Product entity by IDs.
func (*RecipeMutation) RemoveSourceIDs ¶
func (m *RecipeMutation) RemoveSourceIDs(ids ...uuid.UUID)
RemoveSourceIDs removes the "sources" edge to the Source entity by IDs.
func (*RecipeMutation) RemoveTagIDs ¶
func (m *RecipeMutation) RemoveTagIDs(ids ...uuid.UUID)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*RecipeMutation) RemovedEdges ¶
func (m *RecipeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RecipeMutation) RemovedEquipmentIDs ¶
func (m *RecipeMutation) RemovedEquipmentIDs() (ids []uuid.UUID)
RemovedEquipment returns the removed IDs of the "equipment" edge to the Equipment entity.
func (*RecipeMutation) RemovedIDs ¶
func (m *RecipeMutation) 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 (*RecipeMutation) RemovedIdeasIDs ¶
func (m *RecipeMutation) RemovedIdeasIDs() (ids []uuid.UUID)
RemovedIdeas returns the removed IDs of the "ideas" edge to the Idea entity.
func (*RecipeMutation) RemovedIngredientsIDs ¶
func (m *RecipeMutation) RemovedIngredientsIDs() (ids []uuid.UUID)
RemovedIngredients returns the removed IDs of the "ingredients" edge to the Ingredient entity.
func (*RecipeMutation) RemovedInstructionsIDs ¶
func (m *RecipeMutation) RemovedInstructionsIDs() (ids []uuid.UUID)
RemovedInstructions returns the removed IDs of the "instructions" edge to the Instruction entity.
func (*RecipeMutation) RemovedRequiredProductsIDs ¶
func (m *RecipeMutation) RemovedRequiredProductsIDs() (ids []uuid.UUID)
RemovedRequiredProducts returns the removed IDs of the "required_products" edge to the Product entity.
func (*RecipeMutation) RemovedSourcesIDs ¶
func (m *RecipeMutation) RemovedSourcesIDs() (ids []uuid.UUID)
RemovedSources returns the removed IDs of the "sources" edge to the Source entity.
func (*RecipeMutation) RemovedTagsIDs ¶
func (m *RecipeMutation) RemovedTagsIDs() (ids []uuid.UUID)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*RecipeMutation) RequiredProductsCleared ¶
func (m *RecipeMutation) RequiredProductsCleared() bool
RequiredProductsCleared reports if the "required_products" edge to the Product entity was cleared.
func (*RecipeMutation) RequiredProductsIDs ¶
func (m *RecipeMutation) RequiredProductsIDs() (ids []uuid.UUID)
RequiredProductsIDs returns the "required_products" edge IDs in the mutation.
func (*RecipeMutation) ResetCreateTime ¶
func (m *RecipeMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*RecipeMutation) ResetDescription ¶
func (m *RecipeMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*RecipeMutation) ResetEdge ¶
func (m *RecipeMutation) 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 (*RecipeMutation) ResetEquipment ¶
func (m *RecipeMutation) ResetEquipment()
ResetEquipment resets all changes to the "equipment" edge.
func (*RecipeMutation) ResetField ¶
func (m *RecipeMutation) 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 (*RecipeMutation) ResetIdeas ¶
func (m *RecipeMutation) ResetIdeas()
ResetIdeas resets all changes to the "ideas" edge.
func (*RecipeMutation) ResetIngredients ¶
func (m *RecipeMutation) ResetIngredients()
ResetIngredients resets all changes to the "ingredients" edge.
func (*RecipeMutation) ResetInstructions ¶
func (m *RecipeMutation) ResetInstructions()
ResetInstructions resets all changes to the "instructions" edge.
func (*RecipeMutation) ResetLocale ¶
func (m *RecipeMutation) ResetLocale()
ResetLocale resets all changes to the "locale" field.
func (*RecipeMutation) ResetName ¶
func (m *RecipeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RecipeMutation) ResetNutrition ¶
func (m *RecipeMutation) ResetNutrition()
ResetNutrition resets all changes to the "nutrition" edge.
func (*RecipeMutation) ResetPublished ¶
func (m *RecipeMutation) ResetPublished()
ResetPublished resets all changes to the "published" field.
func (*RecipeMutation) ResetRating ¶
func (m *RecipeMutation) ResetRating()
ResetRating resets all changes to the "rating" field.
func (*RecipeMutation) ResetRequiredProducts ¶
func (m *RecipeMutation) ResetRequiredProducts()
ResetRequiredProducts resets all changes to the "required_products" edge.
func (*RecipeMutation) ResetServings ¶
func (m *RecipeMutation) ResetServings()
ResetServings resets all changes to the "servings" field.
func (*RecipeMutation) ResetSlug ¶
func (m *RecipeMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*RecipeMutation) ResetSources ¶
func (m *RecipeMutation) ResetSources()
ResetSources resets all changes to the "sources" edge.
func (*RecipeMutation) ResetTags ¶
func (m *RecipeMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*RecipeMutation) ResetText ¶
func (m *RecipeMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*RecipeMutation) ResetTime ¶
func (m *RecipeMutation) ResetTime()
ResetTime resets all changes to the "time" field.
func (*RecipeMutation) ResetUpdateTime ¶
func (m *RecipeMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*RecipeMutation) Servings ¶
func (m *RecipeMutation) Servings() (r int, exists bool)
Servings returns the value of the "servings" field in the mutation.
func (*RecipeMutation) ServingsCleared ¶
func (m *RecipeMutation) ServingsCleared() bool
ServingsCleared returns if the "servings" field was cleared in this mutation.
func (*RecipeMutation) SetCreateTime ¶
func (m *RecipeMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*RecipeMutation) SetDescription ¶
func (m *RecipeMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*RecipeMutation) SetField ¶
func (m *RecipeMutation) 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 (*RecipeMutation) SetID ¶
func (m *RecipeMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Recipe entities.
func (*RecipeMutation) SetLocale ¶
func (m *RecipeMutation) SetLocale(r recipe.Locale)
SetLocale sets the "locale" field.
func (*RecipeMutation) SetName ¶
func (m *RecipeMutation) SetName(s string)
SetName sets the "name" field.
func (*RecipeMutation) SetNutritionID ¶
func (m *RecipeMutation) SetNutritionID(id int)
SetNutritionID sets the "nutrition" edge to the Nutrition entity by id.
func (*RecipeMutation) SetOp ¶
func (m *RecipeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RecipeMutation) SetPublished ¶
func (m *RecipeMutation) SetPublished(b bool)
SetPublished sets the "published" field.
func (*RecipeMutation) SetRating ¶
func (m *RecipeMutation) SetRating(f float32)
SetRating sets the "rating" field.
func (*RecipeMutation) SetServings ¶
func (m *RecipeMutation) SetServings(i int)
SetServings sets the "servings" field.
func (*RecipeMutation) SetSlug ¶
func (m *RecipeMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*RecipeMutation) SetText ¶
func (m *RecipeMutation) SetText(s string)
SetText sets the "text" field.
func (*RecipeMutation) SetTime ¶
func (m *RecipeMutation) SetTime(t time.Duration)
SetTime sets the "time" field.
func (*RecipeMutation) SetUpdateTime ¶
func (m *RecipeMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*RecipeMutation) Slug ¶
func (m *RecipeMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (*RecipeMutation) SourcesCleared ¶
func (m *RecipeMutation) SourcesCleared() bool
SourcesCleared reports if the "sources" edge to the Source entity was cleared.
func (*RecipeMutation) SourcesIDs ¶
func (m *RecipeMutation) SourcesIDs() (ids []uuid.UUID)
SourcesIDs returns the "sources" edge IDs in the mutation.
func (*RecipeMutation) TagsCleared ¶
func (m *RecipeMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*RecipeMutation) TagsIDs ¶
func (m *RecipeMutation) TagsIDs() (ids []uuid.UUID)
TagsIDs returns the "tags" edge IDs in the mutation.
func (*RecipeMutation) Text ¶
func (m *RecipeMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (*RecipeMutation) Time ¶
func (m *RecipeMutation) Time() (r time.Duration, exists bool)
Time returns the value of the "time" field in the mutation.
func (*RecipeMutation) TimeCleared ¶
func (m *RecipeMutation) TimeCleared() bool
TimeCleared returns if the "time" field was cleared in this mutation.
func (RecipeMutation) Tx ¶
func (m RecipeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RecipeMutation) Type ¶
func (m *RecipeMutation) Type() string
Type returns the node type of this mutation (Recipe).
func (*RecipeMutation) UpdateTime ¶
func (m *RecipeMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*RecipeMutation) Where ¶
func (m *RecipeMutation) Where(ps ...predicate.Recipe)
Where appends a list predicates to the RecipeMutation builder.
func (*RecipeMutation) WhereP ¶
func (m *RecipeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RecipeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RecipeQuery ¶
type RecipeQuery struct {
// contains filtered or unexported fields
}
RecipeQuery is the builder for querying Recipe entities.
func (*RecipeQuery) Aggregate ¶
func (rq *RecipeQuery) Aggregate(fns ...AggregateFunc) *RecipeSelect
Aggregate returns a RecipeSelect configured with the given aggregations.
func (*RecipeQuery) All ¶
func (rq *RecipeQuery) All(ctx context.Context) ([]*Recipe, error)
All executes the query and returns a list of Recipes.
func (*RecipeQuery) AllX ¶
func (rq *RecipeQuery) AllX(ctx context.Context) []*Recipe
AllX is like All, but panics if an error occurs.
func (*RecipeQuery) Clone ¶
func (rq *RecipeQuery) Clone() *RecipeQuery
Clone returns a duplicate of the RecipeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RecipeQuery) Count ¶
func (rq *RecipeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RecipeQuery) CountX ¶
func (rq *RecipeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RecipeQuery) Exist ¶
func (rq *RecipeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RecipeQuery) ExistX ¶
func (rq *RecipeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RecipeQuery) First ¶
func (rq *RecipeQuery) First(ctx context.Context) (*Recipe, error)
First returns the first Recipe entity from the query. Returns a *NotFoundError when no Recipe was found.
func (*RecipeQuery) FirstID ¶
FirstID returns the first Recipe ID from the query. Returns a *NotFoundError when no Recipe ID was found.
func (*RecipeQuery) FirstIDX ¶
func (rq *RecipeQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*RecipeQuery) FirstX ¶
func (rq *RecipeQuery) FirstX(ctx context.Context) *Recipe
FirstX is like First, but panics if an error occurs.
func (*RecipeQuery) GroupBy ¶
func (rq *RecipeQuery) GroupBy(field string, fields ...string) *RecipeGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Recipe.Query(). GroupBy(recipe.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RecipeQuery) IDsX ¶
func (rq *RecipeQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*RecipeQuery) Limit ¶
func (rq *RecipeQuery) Limit(limit int) *RecipeQuery
Limit the number of records to be returned by this query.
func (*RecipeQuery) Offset ¶
func (rq *RecipeQuery) Offset(offset int) *RecipeQuery
Offset to start from.
func (*RecipeQuery) Only ¶
func (rq *RecipeQuery) Only(ctx context.Context) (*Recipe, error)
Only returns a single Recipe entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Recipe entity is found. Returns a *NotFoundError when no Recipe entities are found.
func (*RecipeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Recipe ID in the query. Returns a *NotSingularError when more than one Recipe ID is found. Returns a *NotFoundError when no entities are found.
func (*RecipeQuery) OnlyIDX ¶
func (rq *RecipeQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RecipeQuery) OnlyX ¶
func (rq *RecipeQuery) OnlyX(ctx context.Context) *Recipe
OnlyX is like Only, but panics if an error occurs.
func (*RecipeQuery) Order ¶
func (rq *RecipeQuery) Order(o ...recipe.OrderOption) *RecipeQuery
Order specifies how the records should be ordered.
func (*RecipeQuery) QueryEquipment ¶
func (rq *RecipeQuery) QueryEquipment() *EquipmentQuery
QueryEquipment chains the current query on the "equipment" edge.
func (*RecipeQuery) QueryIdeas ¶
func (rq *RecipeQuery) QueryIdeas() *IdeaQuery
QueryIdeas chains the current query on the "ideas" edge.
func (*RecipeQuery) QueryIngredients ¶
func (rq *RecipeQuery) QueryIngredients() *IngredientQuery
QueryIngredients chains the current query on the "ingredients" edge.
func (*RecipeQuery) QueryInstructions ¶
func (rq *RecipeQuery) QueryInstructions() *InstructionQuery
QueryInstructions chains the current query on the "instructions" edge.
func (*RecipeQuery) QueryNutrition ¶
func (rq *RecipeQuery) QueryNutrition() *NutritionQuery
QueryNutrition chains the current query on the "nutrition" edge.
func (*RecipeQuery) QueryRequiredProducts ¶
func (rq *RecipeQuery) QueryRequiredProducts() *ProductQuery
QueryRequiredProducts chains the current query on the "required_products" edge.
func (*RecipeQuery) QuerySources ¶
func (rq *RecipeQuery) QuerySources() *SourceQuery
QuerySources chains the current query on the "sources" edge.
func (*RecipeQuery) QueryTags ¶
func (rq *RecipeQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*RecipeQuery) Select ¶
func (rq *RecipeQuery) Select(fields ...string) *RecipeSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Recipe.Query(). Select(recipe.FieldCreateTime). Scan(ctx, &v)
func (*RecipeQuery) Unique ¶
func (rq *RecipeQuery) Unique(unique bool) *RecipeQuery
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 (*RecipeQuery) Where ¶
func (rq *RecipeQuery) Where(ps ...predicate.Recipe) *RecipeQuery
Where adds a new predicate for the RecipeQuery builder.
func (*RecipeQuery) WithEquipment ¶
func (rq *RecipeQuery) WithEquipment(opts ...func(*EquipmentQuery)) *RecipeQuery
WithEquipment tells the query-builder to eager-load the nodes that are connected to the "equipment" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecipeQuery) WithIdeas ¶
func (rq *RecipeQuery) WithIdeas(opts ...func(*IdeaQuery)) *RecipeQuery
WithIdeas tells the query-builder to eager-load the nodes that are connected to the "ideas" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecipeQuery) WithIngredients ¶
func (rq *RecipeQuery) WithIngredients(opts ...func(*IngredientQuery)) *RecipeQuery
WithIngredients tells the query-builder to eager-load the nodes that are connected to the "ingredients" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecipeQuery) WithInstructions ¶
func (rq *RecipeQuery) WithInstructions(opts ...func(*InstructionQuery)) *RecipeQuery
WithInstructions tells the query-builder to eager-load the nodes that are connected to the "instructions" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecipeQuery) WithNutrition ¶
func (rq *RecipeQuery) WithNutrition(opts ...func(*NutritionQuery)) *RecipeQuery
WithNutrition tells the query-builder to eager-load the nodes that are connected to the "nutrition" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecipeQuery) WithRequiredProducts ¶
func (rq *RecipeQuery) WithRequiredProducts(opts ...func(*ProductQuery)) *RecipeQuery
WithRequiredProducts tells the query-builder to eager-load the nodes that are connected to the "required_products" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecipeQuery) WithSources ¶
func (rq *RecipeQuery) WithSources(opts ...func(*SourceQuery)) *RecipeQuery
WithSources tells the query-builder to eager-load the nodes that are connected to the "sources" edge. The optional arguments are used to configure the query builder of the edge.
func (*RecipeQuery) WithTags ¶
func (rq *RecipeQuery) WithTags(opts ...func(*TagQuery)) *RecipeQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type RecipeSelect ¶
type RecipeSelect struct { *RecipeQuery // contains filtered or unexported fields }
RecipeSelect is the builder for selecting fields of Recipe entities.
func (*RecipeSelect) Aggregate ¶
func (rs *RecipeSelect) Aggregate(fns ...AggregateFunc) *RecipeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RecipeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RecipeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RecipeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RecipeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RecipeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RecipeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RecipeSelect) Scan ¶
func (rs *RecipeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RecipeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RecipeUpdate ¶
type RecipeUpdate struct {
// contains filtered or unexported fields
}
RecipeUpdate is the builder for updating Recipe entities.
func (*RecipeUpdate) AddEquipment ¶
func (ru *RecipeUpdate) AddEquipment(e ...*Equipment) *RecipeUpdate
AddEquipment adds the "equipment" edges to the Equipment entity.
func (*RecipeUpdate) AddEquipmentIDs ¶
func (ru *RecipeUpdate) AddEquipmentIDs(ids ...uuid.UUID) *RecipeUpdate
AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.
func (*RecipeUpdate) AddIdeaIDs ¶
func (ru *RecipeUpdate) AddIdeaIDs(ids ...uuid.UUID) *RecipeUpdate
AddIdeaIDs adds the "ideas" edge to the Idea entity by IDs.
func (*RecipeUpdate) AddIdeas ¶
func (ru *RecipeUpdate) AddIdeas(i ...*Idea) *RecipeUpdate
AddIdeas adds the "ideas" edges to the Idea entity.
func (*RecipeUpdate) AddIngredientIDs ¶
func (ru *RecipeUpdate) AddIngredientIDs(ids ...uuid.UUID) *RecipeUpdate
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by IDs.
func (*RecipeUpdate) AddIngredients ¶
func (ru *RecipeUpdate) AddIngredients(i ...*Ingredient) *RecipeUpdate
AddIngredients adds the "ingredients" edges to the Ingredient entity.
func (*RecipeUpdate) AddInstructionIDs ¶
func (ru *RecipeUpdate) AddInstructionIDs(ids ...uuid.UUID) *RecipeUpdate
AddInstructionIDs adds the "instructions" edge to the Instruction entity by IDs.
func (*RecipeUpdate) AddInstructions ¶
func (ru *RecipeUpdate) AddInstructions(i ...*Instruction) *RecipeUpdate
AddInstructions adds the "instructions" edges to the Instruction entity.
func (*RecipeUpdate) AddRating ¶
func (ru *RecipeUpdate) AddRating(f float32) *RecipeUpdate
AddRating adds f to the "rating" field.
func (*RecipeUpdate) AddRequiredProductIDs ¶
func (ru *RecipeUpdate) AddRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdate
AddRequiredProductIDs adds the "required_products" edge to the Product entity by IDs.
func (*RecipeUpdate) AddRequiredProducts ¶
func (ru *RecipeUpdate) AddRequiredProducts(p ...*Product) *RecipeUpdate
AddRequiredProducts adds the "required_products" edges to the Product entity.
func (*RecipeUpdate) AddServings ¶
func (ru *RecipeUpdate) AddServings(i int) *RecipeUpdate
AddServings adds i to the "servings" field.
func (*RecipeUpdate) AddSourceIDs ¶
func (ru *RecipeUpdate) AddSourceIDs(ids ...uuid.UUID) *RecipeUpdate
AddSourceIDs adds the "sources" edge to the Source entity by IDs.
func (*RecipeUpdate) AddSources ¶
func (ru *RecipeUpdate) AddSources(s ...*Source) *RecipeUpdate
AddSources adds the "sources" edges to the Source entity.
func (*RecipeUpdate) AddTagIDs ¶
func (ru *RecipeUpdate) AddTagIDs(ids ...uuid.UUID) *RecipeUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*RecipeUpdate) AddTags ¶
func (ru *RecipeUpdate) AddTags(t ...*Tag) *RecipeUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*RecipeUpdate) AddTime ¶
func (ru *RecipeUpdate) AddTime(t time.Duration) *RecipeUpdate
AddTime adds t to the "time" field.
func (*RecipeUpdate) ClearEquipment ¶
func (ru *RecipeUpdate) ClearEquipment() *RecipeUpdate
ClearEquipment clears all "equipment" edges to the Equipment entity.
func (*RecipeUpdate) ClearIdeas ¶
func (ru *RecipeUpdate) ClearIdeas() *RecipeUpdate
ClearIdeas clears all "ideas" edges to the Idea entity.
func (*RecipeUpdate) ClearIngredients ¶
func (ru *RecipeUpdate) ClearIngredients() *RecipeUpdate
ClearIngredients clears all "ingredients" edges to the Ingredient entity.
func (*RecipeUpdate) ClearInstructions ¶
func (ru *RecipeUpdate) ClearInstructions() *RecipeUpdate
ClearInstructions clears all "instructions" edges to the Instruction entity.
func (*RecipeUpdate) ClearNutrition ¶
func (ru *RecipeUpdate) ClearNutrition() *RecipeUpdate
ClearNutrition clears the "nutrition" edge to the Nutrition entity.
func (*RecipeUpdate) ClearRating ¶
func (ru *RecipeUpdate) ClearRating() *RecipeUpdate
ClearRating clears the value of the "rating" field.
func (*RecipeUpdate) ClearRequiredProducts ¶
func (ru *RecipeUpdate) ClearRequiredProducts() *RecipeUpdate
ClearRequiredProducts clears all "required_products" edges to the Product entity.
func (*RecipeUpdate) ClearServings ¶
func (ru *RecipeUpdate) ClearServings() *RecipeUpdate
ClearServings clears the value of the "servings" field.
func (*RecipeUpdate) ClearSources ¶
func (ru *RecipeUpdate) ClearSources() *RecipeUpdate
ClearSources clears all "sources" edges to the Source entity.
func (*RecipeUpdate) ClearTags ¶
func (ru *RecipeUpdate) ClearTags() *RecipeUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*RecipeUpdate) ClearTime ¶
func (ru *RecipeUpdate) ClearTime() *RecipeUpdate
ClearTime clears the value of the "time" field.
func (*RecipeUpdate) Exec ¶
func (ru *RecipeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RecipeUpdate) ExecX ¶
func (ru *RecipeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecipeUpdate) Mutation ¶
func (ru *RecipeUpdate) Mutation() *RecipeMutation
Mutation returns the RecipeMutation object of the builder.
func (*RecipeUpdate) RemoveEquipment ¶
func (ru *RecipeUpdate) RemoveEquipment(e ...*Equipment) *RecipeUpdate
RemoveEquipment removes "equipment" edges to Equipment entities.
func (*RecipeUpdate) RemoveEquipmentIDs ¶
func (ru *RecipeUpdate) RemoveEquipmentIDs(ids ...uuid.UUID) *RecipeUpdate
RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.
func (*RecipeUpdate) RemoveIdeaIDs ¶
func (ru *RecipeUpdate) RemoveIdeaIDs(ids ...uuid.UUID) *RecipeUpdate
RemoveIdeaIDs removes the "ideas" edge to Idea entities by IDs.
func (*RecipeUpdate) RemoveIdeas ¶
func (ru *RecipeUpdate) RemoveIdeas(i ...*Idea) *RecipeUpdate
RemoveIdeas removes "ideas" edges to Idea entities.
func (*RecipeUpdate) RemoveIngredientIDs ¶
func (ru *RecipeUpdate) RemoveIngredientIDs(ids ...uuid.UUID) *RecipeUpdate
RemoveIngredientIDs removes the "ingredients" edge to Ingredient entities by IDs.
func (*RecipeUpdate) RemoveIngredients ¶
func (ru *RecipeUpdate) RemoveIngredients(i ...*Ingredient) *RecipeUpdate
RemoveIngredients removes "ingredients" edges to Ingredient entities.
func (*RecipeUpdate) RemoveInstructionIDs ¶
func (ru *RecipeUpdate) RemoveInstructionIDs(ids ...uuid.UUID) *RecipeUpdate
RemoveInstructionIDs removes the "instructions" edge to Instruction entities by IDs.
func (*RecipeUpdate) RemoveInstructions ¶
func (ru *RecipeUpdate) RemoveInstructions(i ...*Instruction) *RecipeUpdate
RemoveInstructions removes "instructions" edges to Instruction entities.
func (*RecipeUpdate) RemoveRequiredProductIDs ¶
func (ru *RecipeUpdate) RemoveRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdate
RemoveRequiredProductIDs removes the "required_products" edge to Product entities by IDs.
func (*RecipeUpdate) RemoveRequiredProducts ¶
func (ru *RecipeUpdate) RemoveRequiredProducts(p ...*Product) *RecipeUpdate
RemoveRequiredProducts removes "required_products" edges to Product entities.
func (*RecipeUpdate) RemoveSourceIDs ¶
func (ru *RecipeUpdate) RemoveSourceIDs(ids ...uuid.UUID) *RecipeUpdate
RemoveSourceIDs removes the "sources" edge to Source entities by IDs.
func (*RecipeUpdate) RemoveSources ¶
func (ru *RecipeUpdate) RemoveSources(s ...*Source) *RecipeUpdate
RemoveSources removes "sources" edges to Source entities.
func (*RecipeUpdate) RemoveTagIDs ¶
func (ru *RecipeUpdate) RemoveTagIDs(ids ...uuid.UUID) *RecipeUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*RecipeUpdate) RemoveTags ¶
func (ru *RecipeUpdate) RemoveTags(t ...*Tag) *RecipeUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*RecipeUpdate) Save ¶
func (ru *RecipeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RecipeUpdate) SaveX ¶
func (ru *RecipeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RecipeUpdate) SetDescription ¶
func (ru *RecipeUpdate) SetDescription(s string) *RecipeUpdate
SetDescription sets the "description" field.
func (*RecipeUpdate) SetName ¶
func (ru *RecipeUpdate) SetName(s string) *RecipeUpdate
SetName sets the "name" field.
func (*RecipeUpdate) SetNillableDescription ¶
func (ru *RecipeUpdate) SetNillableDescription(s *string) *RecipeUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*RecipeUpdate) SetNillableName ¶
func (ru *RecipeUpdate) SetNillableName(s *string) *RecipeUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*RecipeUpdate) SetNillableNutritionID ¶
func (ru *RecipeUpdate) SetNillableNutritionID(id *int) *RecipeUpdate
SetNillableNutritionID sets the "nutrition" edge to the Nutrition entity by ID if the given value is not nil.
func (*RecipeUpdate) SetNillablePublished ¶
func (ru *RecipeUpdate) SetNillablePublished(b *bool) *RecipeUpdate
SetNillablePublished sets the "published" field if the given value is not nil.
func (*RecipeUpdate) SetNillableRating ¶
func (ru *RecipeUpdate) SetNillableRating(f *float32) *RecipeUpdate
SetNillableRating sets the "rating" field if the given value is not nil.
func (*RecipeUpdate) SetNillableServings ¶
func (ru *RecipeUpdate) SetNillableServings(i *int) *RecipeUpdate
SetNillableServings sets the "servings" field if the given value is not nil.
func (*RecipeUpdate) SetNillableSlug ¶
func (ru *RecipeUpdate) SetNillableSlug(s *string) *RecipeUpdate
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*RecipeUpdate) SetNillableText ¶
func (ru *RecipeUpdate) SetNillableText(s *string) *RecipeUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*RecipeUpdate) SetNillableTime ¶
func (ru *RecipeUpdate) SetNillableTime(t *time.Duration) *RecipeUpdate
SetNillableTime sets the "time" field if the given value is not nil.
func (*RecipeUpdate) SetNutrition ¶
func (ru *RecipeUpdate) SetNutrition(n *Nutrition) *RecipeUpdate
SetNutrition sets the "nutrition" edge to the Nutrition entity.
func (*RecipeUpdate) SetNutritionID ¶
func (ru *RecipeUpdate) SetNutritionID(id int) *RecipeUpdate
SetNutritionID sets the "nutrition" edge to the Nutrition entity by ID.
func (*RecipeUpdate) SetPublished ¶
func (ru *RecipeUpdate) SetPublished(b bool) *RecipeUpdate
SetPublished sets the "published" field.
func (*RecipeUpdate) SetRating ¶
func (ru *RecipeUpdate) SetRating(f float32) *RecipeUpdate
SetRating sets the "rating" field.
func (*RecipeUpdate) SetServings ¶
func (ru *RecipeUpdate) SetServings(i int) *RecipeUpdate
SetServings sets the "servings" field.
func (*RecipeUpdate) SetSlug ¶
func (ru *RecipeUpdate) SetSlug(s string) *RecipeUpdate
SetSlug sets the "slug" field.
func (*RecipeUpdate) SetText ¶
func (ru *RecipeUpdate) SetText(s string) *RecipeUpdate
SetText sets the "text" field.
func (*RecipeUpdate) SetTime ¶
func (ru *RecipeUpdate) SetTime(t time.Duration) *RecipeUpdate
SetTime sets the "time" field.
func (*RecipeUpdate) SetUpdateTime ¶
func (ru *RecipeUpdate) SetUpdateTime(t time.Time) *RecipeUpdate
SetUpdateTime sets the "update_time" field.
func (*RecipeUpdate) Where ¶
func (ru *RecipeUpdate) Where(ps ...predicate.Recipe) *RecipeUpdate
Where appends a list predicates to the RecipeUpdate builder.
type RecipeUpdateOne ¶
type RecipeUpdateOne struct {
// contains filtered or unexported fields
}
RecipeUpdateOne is the builder for updating a single Recipe entity.
func (*RecipeUpdateOne) AddEquipment ¶
func (ruo *RecipeUpdateOne) AddEquipment(e ...*Equipment) *RecipeUpdateOne
AddEquipment adds the "equipment" edges to the Equipment entity.
func (*RecipeUpdateOne) AddEquipmentIDs ¶
func (ruo *RecipeUpdateOne) AddEquipmentIDs(ids ...uuid.UUID) *RecipeUpdateOne
AddEquipmentIDs adds the "equipment" edge to the Equipment entity by IDs.
func (*RecipeUpdateOne) AddIdeaIDs ¶
func (ruo *RecipeUpdateOne) AddIdeaIDs(ids ...uuid.UUID) *RecipeUpdateOne
AddIdeaIDs adds the "ideas" edge to the Idea entity by IDs.
func (*RecipeUpdateOne) AddIdeas ¶
func (ruo *RecipeUpdateOne) AddIdeas(i ...*Idea) *RecipeUpdateOne
AddIdeas adds the "ideas" edges to the Idea entity.
func (*RecipeUpdateOne) AddIngredientIDs ¶
func (ruo *RecipeUpdateOne) AddIngredientIDs(ids ...uuid.UUID) *RecipeUpdateOne
AddIngredientIDs adds the "ingredients" edge to the Ingredient entity by IDs.
func (*RecipeUpdateOne) AddIngredients ¶
func (ruo *RecipeUpdateOne) AddIngredients(i ...*Ingredient) *RecipeUpdateOne
AddIngredients adds the "ingredients" edges to the Ingredient entity.
func (*RecipeUpdateOne) AddInstructionIDs ¶
func (ruo *RecipeUpdateOne) AddInstructionIDs(ids ...uuid.UUID) *RecipeUpdateOne
AddInstructionIDs adds the "instructions" edge to the Instruction entity by IDs.
func (*RecipeUpdateOne) AddInstructions ¶
func (ruo *RecipeUpdateOne) AddInstructions(i ...*Instruction) *RecipeUpdateOne
AddInstructions adds the "instructions" edges to the Instruction entity.
func (*RecipeUpdateOne) AddRating ¶
func (ruo *RecipeUpdateOne) AddRating(f float32) *RecipeUpdateOne
AddRating adds f to the "rating" field.
func (*RecipeUpdateOne) AddRequiredProductIDs ¶
func (ruo *RecipeUpdateOne) AddRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdateOne
AddRequiredProductIDs adds the "required_products" edge to the Product entity by IDs.
func (*RecipeUpdateOne) AddRequiredProducts ¶
func (ruo *RecipeUpdateOne) AddRequiredProducts(p ...*Product) *RecipeUpdateOne
AddRequiredProducts adds the "required_products" edges to the Product entity.
func (*RecipeUpdateOne) AddServings ¶
func (ruo *RecipeUpdateOne) AddServings(i int) *RecipeUpdateOne
AddServings adds i to the "servings" field.
func (*RecipeUpdateOne) AddSourceIDs ¶
func (ruo *RecipeUpdateOne) AddSourceIDs(ids ...uuid.UUID) *RecipeUpdateOne
AddSourceIDs adds the "sources" edge to the Source entity by IDs.
func (*RecipeUpdateOne) AddSources ¶
func (ruo *RecipeUpdateOne) AddSources(s ...*Source) *RecipeUpdateOne
AddSources adds the "sources" edges to the Source entity.
func (*RecipeUpdateOne) AddTagIDs ¶
func (ruo *RecipeUpdateOne) AddTagIDs(ids ...uuid.UUID) *RecipeUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*RecipeUpdateOne) AddTags ¶
func (ruo *RecipeUpdateOne) AddTags(t ...*Tag) *RecipeUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*RecipeUpdateOne) AddTime ¶
func (ruo *RecipeUpdateOne) AddTime(t time.Duration) *RecipeUpdateOne
AddTime adds t to the "time" field.
func (*RecipeUpdateOne) ClearEquipment ¶
func (ruo *RecipeUpdateOne) ClearEquipment() *RecipeUpdateOne
ClearEquipment clears all "equipment" edges to the Equipment entity.
func (*RecipeUpdateOne) ClearIdeas ¶
func (ruo *RecipeUpdateOne) ClearIdeas() *RecipeUpdateOne
ClearIdeas clears all "ideas" edges to the Idea entity.
func (*RecipeUpdateOne) ClearIngredients ¶
func (ruo *RecipeUpdateOne) ClearIngredients() *RecipeUpdateOne
ClearIngredients clears all "ingredients" edges to the Ingredient entity.
func (*RecipeUpdateOne) ClearInstructions ¶
func (ruo *RecipeUpdateOne) ClearInstructions() *RecipeUpdateOne
ClearInstructions clears all "instructions" edges to the Instruction entity.
func (*RecipeUpdateOne) ClearNutrition ¶
func (ruo *RecipeUpdateOne) ClearNutrition() *RecipeUpdateOne
ClearNutrition clears the "nutrition" edge to the Nutrition entity.
func (*RecipeUpdateOne) ClearRating ¶
func (ruo *RecipeUpdateOne) ClearRating() *RecipeUpdateOne
ClearRating clears the value of the "rating" field.
func (*RecipeUpdateOne) ClearRequiredProducts ¶
func (ruo *RecipeUpdateOne) ClearRequiredProducts() *RecipeUpdateOne
ClearRequiredProducts clears all "required_products" edges to the Product entity.
func (*RecipeUpdateOne) ClearServings ¶
func (ruo *RecipeUpdateOne) ClearServings() *RecipeUpdateOne
ClearServings clears the value of the "servings" field.
func (*RecipeUpdateOne) ClearSources ¶
func (ruo *RecipeUpdateOne) ClearSources() *RecipeUpdateOne
ClearSources clears all "sources" edges to the Source entity.
func (*RecipeUpdateOne) ClearTags ¶
func (ruo *RecipeUpdateOne) ClearTags() *RecipeUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*RecipeUpdateOne) ClearTime ¶
func (ruo *RecipeUpdateOne) ClearTime() *RecipeUpdateOne
ClearTime clears the value of the "time" field.
func (*RecipeUpdateOne) Exec ¶
func (ruo *RecipeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RecipeUpdateOne) ExecX ¶
func (ruo *RecipeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RecipeUpdateOne) Mutation ¶
func (ruo *RecipeUpdateOne) Mutation() *RecipeMutation
Mutation returns the RecipeMutation object of the builder.
func (*RecipeUpdateOne) RemoveEquipment ¶
func (ruo *RecipeUpdateOne) RemoveEquipment(e ...*Equipment) *RecipeUpdateOne
RemoveEquipment removes "equipment" edges to Equipment entities.
func (*RecipeUpdateOne) RemoveEquipmentIDs ¶
func (ruo *RecipeUpdateOne) RemoveEquipmentIDs(ids ...uuid.UUID) *RecipeUpdateOne
RemoveEquipmentIDs removes the "equipment" edge to Equipment entities by IDs.
func (*RecipeUpdateOne) RemoveIdeaIDs ¶
func (ruo *RecipeUpdateOne) RemoveIdeaIDs(ids ...uuid.UUID) *RecipeUpdateOne
RemoveIdeaIDs removes the "ideas" edge to Idea entities by IDs.
func (*RecipeUpdateOne) RemoveIdeas ¶
func (ruo *RecipeUpdateOne) RemoveIdeas(i ...*Idea) *RecipeUpdateOne
RemoveIdeas removes "ideas" edges to Idea entities.
func (*RecipeUpdateOne) RemoveIngredientIDs ¶
func (ruo *RecipeUpdateOne) RemoveIngredientIDs(ids ...uuid.UUID) *RecipeUpdateOne
RemoveIngredientIDs removes the "ingredients" edge to Ingredient entities by IDs.
func (*RecipeUpdateOne) RemoveIngredients ¶
func (ruo *RecipeUpdateOne) RemoveIngredients(i ...*Ingredient) *RecipeUpdateOne
RemoveIngredients removes "ingredients" edges to Ingredient entities.
func (*RecipeUpdateOne) RemoveInstructionIDs ¶
func (ruo *RecipeUpdateOne) RemoveInstructionIDs(ids ...uuid.UUID) *RecipeUpdateOne
RemoveInstructionIDs removes the "instructions" edge to Instruction entities by IDs.
func (*RecipeUpdateOne) RemoveInstructions ¶
func (ruo *RecipeUpdateOne) RemoveInstructions(i ...*Instruction) *RecipeUpdateOne
RemoveInstructions removes "instructions" edges to Instruction entities.
func (*RecipeUpdateOne) RemoveRequiredProductIDs ¶
func (ruo *RecipeUpdateOne) RemoveRequiredProductIDs(ids ...uuid.UUID) *RecipeUpdateOne
RemoveRequiredProductIDs removes the "required_products" edge to Product entities by IDs.
func (*RecipeUpdateOne) RemoveRequiredProducts ¶
func (ruo *RecipeUpdateOne) RemoveRequiredProducts(p ...*Product) *RecipeUpdateOne
RemoveRequiredProducts removes "required_products" edges to Product entities.
func (*RecipeUpdateOne) RemoveSourceIDs ¶
func (ruo *RecipeUpdateOne) RemoveSourceIDs(ids ...uuid.UUID) *RecipeUpdateOne
RemoveSourceIDs removes the "sources" edge to Source entities by IDs.
func (*RecipeUpdateOne) RemoveSources ¶
func (ruo *RecipeUpdateOne) RemoveSources(s ...*Source) *RecipeUpdateOne
RemoveSources removes "sources" edges to Source entities.
func (*RecipeUpdateOne) RemoveTagIDs ¶
func (ruo *RecipeUpdateOne) RemoveTagIDs(ids ...uuid.UUID) *RecipeUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*RecipeUpdateOne) RemoveTags ¶
func (ruo *RecipeUpdateOne) RemoveTags(t ...*Tag) *RecipeUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*RecipeUpdateOne) Save ¶
func (ruo *RecipeUpdateOne) Save(ctx context.Context) (*Recipe, error)
Save executes the query and returns the updated Recipe entity.
func (*RecipeUpdateOne) SaveX ¶
func (ruo *RecipeUpdateOne) SaveX(ctx context.Context) *Recipe
SaveX is like Save, but panics if an error occurs.
func (*RecipeUpdateOne) Select ¶
func (ruo *RecipeUpdateOne) Select(field string, fields ...string) *RecipeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RecipeUpdateOne) SetDescription ¶
func (ruo *RecipeUpdateOne) SetDescription(s string) *RecipeUpdateOne
SetDescription sets the "description" field.
func (*RecipeUpdateOne) SetName ¶
func (ruo *RecipeUpdateOne) SetName(s string) *RecipeUpdateOne
SetName sets the "name" field.
func (*RecipeUpdateOne) SetNillableDescription ¶
func (ruo *RecipeUpdateOne) SetNillableDescription(s *string) *RecipeUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*RecipeUpdateOne) SetNillableName ¶
func (ruo *RecipeUpdateOne) SetNillableName(s *string) *RecipeUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*RecipeUpdateOne) SetNillableNutritionID ¶
func (ruo *RecipeUpdateOne) SetNillableNutritionID(id *int) *RecipeUpdateOne
SetNillableNutritionID sets the "nutrition" edge to the Nutrition entity by ID if the given value is not nil.
func (*RecipeUpdateOne) SetNillablePublished ¶
func (ruo *RecipeUpdateOne) SetNillablePublished(b *bool) *RecipeUpdateOne
SetNillablePublished sets the "published" field if the given value is not nil.
func (*RecipeUpdateOne) SetNillableRating ¶
func (ruo *RecipeUpdateOne) SetNillableRating(f *float32) *RecipeUpdateOne
SetNillableRating sets the "rating" field if the given value is not nil.
func (*RecipeUpdateOne) SetNillableServings ¶
func (ruo *RecipeUpdateOne) SetNillableServings(i *int) *RecipeUpdateOne
SetNillableServings sets the "servings" field if the given value is not nil.
func (*RecipeUpdateOne) SetNillableSlug ¶
func (ruo *RecipeUpdateOne) SetNillableSlug(s *string) *RecipeUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*RecipeUpdateOne) SetNillableText ¶
func (ruo *RecipeUpdateOne) SetNillableText(s *string) *RecipeUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*RecipeUpdateOne) SetNillableTime ¶
func (ruo *RecipeUpdateOne) SetNillableTime(t *time.Duration) *RecipeUpdateOne
SetNillableTime sets the "time" field if the given value is not nil.
func (*RecipeUpdateOne) SetNutrition ¶
func (ruo *RecipeUpdateOne) SetNutrition(n *Nutrition) *RecipeUpdateOne
SetNutrition sets the "nutrition" edge to the Nutrition entity.
func (*RecipeUpdateOne) SetNutritionID ¶
func (ruo *RecipeUpdateOne) SetNutritionID(id int) *RecipeUpdateOne
SetNutritionID sets the "nutrition" edge to the Nutrition entity by ID.
func (*RecipeUpdateOne) SetPublished ¶
func (ruo *RecipeUpdateOne) SetPublished(b bool) *RecipeUpdateOne
SetPublished sets the "published" field.
func (*RecipeUpdateOne) SetRating ¶
func (ruo *RecipeUpdateOne) SetRating(f float32) *RecipeUpdateOne
SetRating sets the "rating" field.
func (*RecipeUpdateOne) SetServings ¶
func (ruo *RecipeUpdateOne) SetServings(i int) *RecipeUpdateOne
SetServings sets the "servings" field.
func (*RecipeUpdateOne) SetSlug ¶
func (ruo *RecipeUpdateOne) SetSlug(s string) *RecipeUpdateOne
SetSlug sets the "slug" field.
func (*RecipeUpdateOne) SetText ¶
func (ruo *RecipeUpdateOne) SetText(s string) *RecipeUpdateOne
SetText sets the "text" field.
func (*RecipeUpdateOne) SetTime ¶
func (ruo *RecipeUpdateOne) SetTime(t time.Duration) *RecipeUpdateOne
SetTime sets the "time" field.
func (*RecipeUpdateOne) SetUpdateTime ¶
func (ruo *RecipeUpdateOne) SetUpdateTime(t time.Time) *RecipeUpdateOne
SetUpdateTime sets the "update_time" field.
func (*RecipeUpdateOne) Where ¶
func (ruo *RecipeUpdateOne) Where(ps ...predicate.Recipe) *RecipeUpdateOne
Where appends a list predicates to the RecipeUpdate builder.
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 Source ¶
type Source struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // URL holds the value of the "url" field. URL string `json:"url,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SourceQuery when eager-loading is set. Edges SourceEdges `json:"edges"` // contains filtered or unexported fields }
Source is the model entity for the Source schema.
func (*Source) QueryRecipe ¶
func (s *Source) QueryRecipe() *RecipeQuery
QueryRecipe queries the "recipe" edge of the Source entity.
func (*Source) Unwrap ¶
Unwrap unwraps the Source 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 (*Source) Update ¶
func (s *Source) Update() *SourceUpdateOne
Update returns a builder for updating this Source. Note that you need to call Source.Unwrap() before calling this method if this Source was returned from a transaction, and the transaction was committed or rolled back.
type SourceClient ¶
type SourceClient struct {
// contains filtered or unexported fields
}
SourceClient is a client for the Source schema.
func NewSourceClient ¶
func NewSourceClient(c config) *SourceClient
NewSourceClient returns a client for the Source from the given config.
func (*SourceClient) Create ¶
func (c *SourceClient) Create() *SourceCreate
Create returns a builder for creating a Source entity.
func (*SourceClient) CreateBulk ¶
func (c *SourceClient) CreateBulk(builders ...*SourceCreate) *SourceCreateBulk
CreateBulk returns a builder for creating a bulk of Source entities.
func (*SourceClient) Delete ¶
func (c *SourceClient) Delete() *SourceDelete
Delete returns a delete builder for Source.
func (*SourceClient) DeleteOne ¶
func (c *SourceClient) DeleteOne(s *Source) *SourceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SourceClient) DeleteOneID ¶
func (c *SourceClient) DeleteOneID(id uuid.UUID) *SourceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SourceClient) Intercept ¶
func (c *SourceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `source.Intercept(f(g(h())))`.
func (*SourceClient) Interceptors ¶
func (c *SourceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SourceClient) MapCreateBulk ¶
func (c *SourceClient) MapCreateBulk(slice any, setFunc func(*SourceCreate, int)) *SourceCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SourceClient) Query ¶
func (c *SourceClient) Query() *SourceQuery
Query returns a query builder for Source.
func (*SourceClient) QueryRecipe ¶
func (c *SourceClient) QueryRecipe(s *Source) *RecipeQuery
QueryRecipe queries the recipe edge of a Source.
func (*SourceClient) Update ¶
func (c *SourceClient) Update() *SourceUpdate
Update returns an update builder for Source.
func (*SourceClient) UpdateOne ¶
func (c *SourceClient) UpdateOne(s *Source) *SourceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SourceClient) UpdateOneID ¶
func (c *SourceClient) UpdateOneID(id uuid.UUID) *SourceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SourceClient) Use ¶
func (c *SourceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `source.Hooks(f(g(h())))`.
type SourceCreate ¶
type SourceCreate struct {
// contains filtered or unexported fields
}
SourceCreate is the builder for creating a Source entity.
func (*SourceCreate) Exec ¶
func (sc *SourceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceCreate) ExecX ¶
func (sc *SourceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceCreate) Mutation ¶
func (sc *SourceCreate) Mutation() *SourceMutation
Mutation returns the SourceMutation object of the builder.
func (*SourceCreate) Save ¶
func (sc *SourceCreate) Save(ctx context.Context) (*Source, error)
Save creates the Source in the database.
func (*SourceCreate) SaveX ¶
func (sc *SourceCreate) SaveX(ctx context.Context) *Source
SaveX calls Save and panics if Save returns an error.
func (*SourceCreate) SetDescription ¶
func (sc *SourceCreate) SetDescription(s string) *SourceCreate
SetDescription sets the "description" field.
func (*SourceCreate) SetID ¶
func (sc *SourceCreate) SetID(u uuid.UUID) *SourceCreate
SetID sets the "id" field.
func (*SourceCreate) SetName ¶
func (sc *SourceCreate) SetName(s string) *SourceCreate
SetName sets the "name" field.
func (*SourceCreate) SetNillableDescription ¶
func (sc *SourceCreate) SetNillableDescription(s *string) *SourceCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*SourceCreate) SetNillableID ¶
func (sc *SourceCreate) SetNillableID(u *uuid.UUID) *SourceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SourceCreate) SetNillableName ¶
func (sc *SourceCreate) SetNillableName(s *string) *SourceCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*SourceCreate) SetNillableRecipeID ¶
func (sc *SourceCreate) SetNillableRecipeID(id *uuid.UUID) *SourceCreate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*SourceCreate) SetNillableURL ¶
func (sc *SourceCreate) SetNillableURL(s *string) *SourceCreate
SetNillableURL sets the "url" field if the given value is not nil.
func (*SourceCreate) SetRecipe ¶
func (sc *SourceCreate) SetRecipe(r *Recipe) *SourceCreate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*SourceCreate) SetRecipeID ¶
func (sc *SourceCreate) SetRecipeID(id uuid.UUID) *SourceCreate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*SourceCreate) SetURL ¶
func (sc *SourceCreate) SetURL(s string) *SourceCreate
SetURL sets the "url" field.
type SourceCreateBulk ¶
type SourceCreateBulk struct {
// contains filtered or unexported fields
}
SourceCreateBulk is the builder for creating many Source entities in bulk.
func (*SourceCreateBulk) Exec ¶
func (scb *SourceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceCreateBulk) ExecX ¶
func (scb *SourceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SourceDelete ¶
type SourceDelete struct {
// contains filtered or unexported fields
}
SourceDelete is the builder for deleting a Source entity.
func (*SourceDelete) Exec ¶
func (sd *SourceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SourceDelete) ExecX ¶
func (sd *SourceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SourceDelete) Where ¶
func (sd *SourceDelete) Where(ps ...predicate.Source) *SourceDelete
Where appends a list predicates to the SourceDelete builder.
type SourceDeleteOne ¶
type SourceDeleteOne struct {
// contains filtered or unexported fields
}
SourceDeleteOne is the builder for deleting a single Source entity.
func (*SourceDeleteOne) Exec ¶
func (sdo *SourceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SourceDeleteOne) ExecX ¶
func (sdo *SourceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceDeleteOne) Where ¶
func (sdo *SourceDeleteOne) Where(ps ...predicate.Source) *SourceDeleteOne
Where appends a list predicates to the SourceDelete builder.
type SourceEdges ¶
type SourceEdges struct { // Recipe holds the value of the recipe edge. Recipe *Recipe `json:"recipe,omitempty"` // contains filtered or unexported fields }
SourceEdges holds the relations/edges for other nodes in the graph.
func (SourceEdges) RecipeOrErr ¶
func (e SourceEdges) RecipeOrErr() (*Recipe, error)
RecipeOrErr returns the Recipe value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SourceGroupBy ¶
type SourceGroupBy struct {
// contains filtered or unexported fields
}
SourceGroupBy is the group-by builder for Source entities.
func (*SourceGroupBy) Aggregate ¶
func (sgb *SourceGroupBy) Aggregate(fns ...AggregateFunc) *SourceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SourceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SourceGroupBy) Scan ¶
func (sgb *SourceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SourceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SourceMutation ¶
type SourceMutation struct {
// contains filtered or unexported fields
}
SourceMutation represents an operation that mutates the Source nodes in the graph.
func (*SourceMutation) AddField ¶
func (m *SourceMutation) 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 (*SourceMutation) AddedEdges ¶
func (m *SourceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SourceMutation) AddedField ¶
func (m *SourceMutation) 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 (*SourceMutation) AddedFields ¶
func (m *SourceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SourceMutation) AddedIDs ¶
func (m *SourceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SourceMutation) ClearDescription ¶
func (m *SourceMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*SourceMutation) ClearEdge ¶
func (m *SourceMutation) 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 (*SourceMutation) ClearField ¶
func (m *SourceMutation) 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 (*SourceMutation) ClearName ¶
func (m *SourceMutation) ClearName()
ClearName clears the value of the "name" field.
func (*SourceMutation) ClearRecipe ¶
func (m *SourceMutation) ClearRecipe()
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*SourceMutation) ClearURL ¶
func (m *SourceMutation) ClearURL()
ClearURL clears the value of the "url" field.
func (*SourceMutation) ClearedEdges ¶
func (m *SourceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SourceMutation) ClearedFields ¶
func (m *SourceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SourceMutation) Client ¶
func (m SourceMutation) 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 (*SourceMutation) Description ¶
func (m *SourceMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*SourceMutation) DescriptionCleared ¶
func (m *SourceMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*SourceMutation) EdgeCleared ¶
func (m *SourceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SourceMutation) Field ¶
func (m *SourceMutation) 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 (*SourceMutation) FieldCleared ¶
func (m *SourceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SourceMutation) Fields ¶
func (m *SourceMutation) 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 (*SourceMutation) ID ¶
func (m *SourceMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SourceMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SourceMutation) Name ¶
func (m *SourceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SourceMutation) NameCleared ¶
func (m *SourceMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*SourceMutation) OldDescription ¶
func (m *SourceMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Source entity. If the Source 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 (*SourceMutation) 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 (*SourceMutation) OldName ¶
func (m *SourceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Source entity. If the Source 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 (*SourceMutation) OldURL ¶
func (m *SourceMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the Source entity. If the Source 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 (*SourceMutation) RecipeCleared ¶
func (m *SourceMutation) RecipeCleared() bool
RecipeCleared reports if the "recipe" edge to the Recipe entity was cleared.
func (*SourceMutation) RecipeID ¶
func (m *SourceMutation) RecipeID() (id uuid.UUID, exists bool)
RecipeID returns the "recipe" edge ID in the mutation.
func (*SourceMutation) RecipeIDs ¶
func (m *SourceMutation) RecipeIDs() (ids []uuid.UUID)
RecipeIDs returns the "recipe" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RecipeID instead. It exists only for internal usage by the builders.
func (*SourceMutation) RemovedEdges ¶
func (m *SourceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SourceMutation) RemovedIDs ¶
func (m *SourceMutation) 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 (*SourceMutation) ResetDescription ¶
func (m *SourceMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*SourceMutation) ResetEdge ¶
func (m *SourceMutation) 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 (*SourceMutation) ResetField ¶
func (m *SourceMutation) 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 (*SourceMutation) ResetName ¶
func (m *SourceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SourceMutation) ResetRecipe ¶
func (m *SourceMutation) ResetRecipe()
ResetRecipe resets all changes to the "recipe" edge.
func (*SourceMutation) ResetURL ¶
func (m *SourceMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*SourceMutation) SetDescription ¶
func (m *SourceMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*SourceMutation) SetField ¶
func (m *SourceMutation) 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 (*SourceMutation) SetID ¶
func (m *SourceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Source entities.
func (*SourceMutation) SetName ¶
func (m *SourceMutation) SetName(s string)
SetName sets the "name" field.
func (*SourceMutation) SetOp ¶
func (m *SourceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SourceMutation) SetRecipeID ¶
func (m *SourceMutation) SetRecipeID(id uuid.UUID)
SetRecipeID sets the "recipe" edge to the Recipe entity by id.
func (*SourceMutation) SetURL ¶
func (m *SourceMutation) SetURL(s string)
SetURL sets the "url" field.
func (SourceMutation) Tx ¶
func (m SourceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SourceMutation) Type ¶
func (m *SourceMutation) Type() string
Type returns the node type of this mutation (Source).
func (*SourceMutation) URL ¶
func (m *SourceMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*SourceMutation) URLCleared ¶
func (m *SourceMutation) URLCleared() bool
URLCleared returns if the "url" field was cleared in this mutation.
func (*SourceMutation) Where ¶
func (m *SourceMutation) Where(ps ...predicate.Source)
Where appends a list predicates to the SourceMutation builder.
func (*SourceMutation) WhereP ¶
func (m *SourceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SourceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SourceQuery ¶
type SourceQuery struct {
// contains filtered or unexported fields
}
SourceQuery is the builder for querying Source entities.
func (*SourceQuery) Aggregate ¶
func (sq *SourceQuery) Aggregate(fns ...AggregateFunc) *SourceSelect
Aggregate returns a SourceSelect configured with the given aggregations.
func (*SourceQuery) All ¶
func (sq *SourceQuery) All(ctx context.Context) ([]*Source, error)
All executes the query and returns a list of Sources.
func (*SourceQuery) AllX ¶
func (sq *SourceQuery) AllX(ctx context.Context) []*Source
AllX is like All, but panics if an error occurs.
func (*SourceQuery) Clone ¶
func (sq *SourceQuery) Clone() *SourceQuery
Clone returns a duplicate of the SourceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SourceQuery) Count ¶
func (sq *SourceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SourceQuery) CountX ¶
func (sq *SourceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SourceQuery) Exist ¶
func (sq *SourceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SourceQuery) ExistX ¶
func (sq *SourceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SourceQuery) First ¶
func (sq *SourceQuery) First(ctx context.Context) (*Source, error)
First returns the first Source entity from the query. Returns a *NotFoundError when no Source was found.
func (*SourceQuery) FirstID ¶
FirstID returns the first Source ID from the query. Returns a *NotFoundError when no Source ID was found.
func (*SourceQuery) FirstIDX ¶
func (sq *SourceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SourceQuery) FirstX ¶
func (sq *SourceQuery) FirstX(ctx context.Context) *Source
FirstX is like First, but panics if an error occurs.
func (*SourceQuery) GroupBy ¶
func (sq *SourceQuery) GroupBy(field string, fields ...string) *SourceGroupBy
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.Source.Query(). GroupBy(source.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SourceQuery) IDsX ¶
func (sq *SourceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SourceQuery) Limit ¶
func (sq *SourceQuery) Limit(limit int) *SourceQuery
Limit the number of records to be returned by this query.
func (*SourceQuery) Offset ¶
func (sq *SourceQuery) Offset(offset int) *SourceQuery
Offset to start from.
func (*SourceQuery) Only ¶
func (sq *SourceQuery) Only(ctx context.Context) (*Source, error)
Only returns a single Source entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Source entity is found. Returns a *NotFoundError when no Source entities are found.
func (*SourceQuery) OnlyID ¶
OnlyID is like Only, but returns the only Source ID in the query. Returns a *NotSingularError when more than one Source ID is found. Returns a *NotFoundError when no entities are found.
func (*SourceQuery) OnlyIDX ¶
func (sq *SourceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SourceQuery) OnlyX ¶
func (sq *SourceQuery) OnlyX(ctx context.Context) *Source
OnlyX is like Only, but panics if an error occurs.
func (*SourceQuery) Order ¶
func (sq *SourceQuery) Order(o ...source.OrderOption) *SourceQuery
Order specifies how the records should be ordered.
func (*SourceQuery) QueryRecipe ¶
func (sq *SourceQuery) QueryRecipe() *RecipeQuery
QueryRecipe chains the current query on the "recipe" edge.
func (*SourceQuery) Select ¶
func (sq *SourceQuery) Select(fields ...string) *SourceSelect
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.Source.Query(). Select(source.FieldName). Scan(ctx, &v)
func (*SourceQuery) Unique ¶
func (sq *SourceQuery) Unique(unique bool) *SourceQuery
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 (*SourceQuery) Where ¶
func (sq *SourceQuery) Where(ps ...predicate.Source) *SourceQuery
Where adds a new predicate for the SourceQuery builder.
func (*SourceQuery) WithRecipe ¶
func (sq *SourceQuery) WithRecipe(opts ...func(*RecipeQuery)) *SourceQuery
WithRecipe tells the query-builder to eager-load the nodes that are connected to the "recipe" edge. The optional arguments are used to configure the query builder of the edge.
type SourceSelect ¶
type SourceSelect struct { *SourceQuery // contains filtered or unexported fields }
SourceSelect is the builder for selecting fields of Source entities.
func (*SourceSelect) Aggregate ¶
func (ss *SourceSelect) Aggregate(fns ...AggregateFunc) *SourceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SourceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SourceSelect) Scan ¶
func (ss *SourceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SourceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SourceUpdate ¶
type SourceUpdate struct {
// contains filtered or unexported fields
}
SourceUpdate is the builder for updating Source entities.
func (*SourceUpdate) ClearDescription ¶
func (su *SourceUpdate) ClearDescription() *SourceUpdate
ClearDescription clears the value of the "description" field.
func (*SourceUpdate) ClearName ¶
func (su *SourceUpdate) ClearName() *SourceUpdate
ClearName clears the value of the "name" field.
func (*SourceUpdate) ClearRecipe ¶
func (su *SourceUpdate) ClearRecipe() *SourceUpdate
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*SourceUpdate) ClearURL ¶
func (su *SourceUpdate) ClearURL() *SourceUpdate
ClearURL clears the value of the "url" field.
func (*SourceUpdate) Exec ¶
func (su *SourceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SourceUpdate) ExecX ¶
func (su *SourceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceUpdate) Mutation ¶
func (su *SourceUpdate) Mutation() *SourceMutation
Mutation returns the SourceMutation object of the builder.
func (*SourceUpdate) Save ¶
func (su *SourceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SourceUpdate) SaveX ¶
func (su *SourceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SourceUpdate) SetDescription ¶
func (su *SourceUpdate) SetDescription(s string) *SourceUpdate
SetDescription sets the "description" field.
func (*SourceUpdate) SetName ¶
func (su *SourceUpdate) SetName(s string) *SourceUpdate
SetName sets the "name" field.
func (*SourceUpdate) SetNillableDescription ¶
func (su *SourceUpdate) SetNillableDescription(s *string) *SourceUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*SourceUpdate) SetNillableName ¶
func (su *SourceUpdate) SetNillableName(s *string) *SourceUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*SourceUpdate) SetNillableRecipeID ¶
func (su *SourceUpdate) SetNillableRecipeID(id *uuid.UUID) *SourceUpdate
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*SourceUpdate) SetNillableURL ¶
func (su *SourceUpdate) SetNillableURL(s *string) *SourceUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*SourceUpdate) SetRecipe ¶
func (su *SourceUpdate) SetRecipe(r *Recipe) *SourceUpdate
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*SourceUpdate) SetRecipeID ¶
func (su *SourceUpdate) SetRecipeID(id uuid.UUID) *SourceUpdate
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*SourceUpdate) SetURL ¶
func (su *SourceUpdate) SetURL(s string) *SourceUpdate
SetURL sets the "url" field.
func (*SourceUpdate) Where ¶
func (su *SourceUpdate) Where(ps ...predicate.Source) *SourceUpdate
Where appends a list predicates to the SourceUpdate builder.
type SourceUpdateOne ¶
type SourceUpdateOne struct {
// contains filtered or unexported fields
}
SourceUpdateOne is the builder for updating a single Source entity.
func (*SourceUpdateOne) ClearDescription ¶
func (suo *SourceUpdateOne) ClearDescription() *SourceUpdateOne
ClearDescription clears the value of the "description" field.
func (*SourceUpdateOne) ClearName ¶
func (suo *SourceUpdateOne) ClearName() *SourceUpdateOne
ClearName clears the value of the "name" field.
func (*SourceUpdateOne) ClearRecipe ¶
func (suo *SourceUpdateOne) ClearRecipe() *SourceUpdateOne
ClearRecipe clears the "recipe" edge to the Recipe entity.
func (*SourceUpdateOne) ClearURL ¶
func (suo *SourceUpdateOne) ClearURL() *SourceUpdateOne
ClearURL clears the value of the "url" field.
func (*SourceUpdateOne) Exec ¶
func (suo *SourceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SourceUpdateOne) ExecX ¶
func (suo *SourceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SourceUpdateOne) Mutation ¶
func (suo *SourceUpdateOne) Mutation() *SourceMutation
Mutation returns the SourceMutation object of the builder.
func (*SourceUpdateOne) Save ¶
func (suo *SourceUpdateOne) Save(ctx context.Context) (*Source, error)
Save executes the query and returns the updated Source entity.
func (*SourceUpdateOne) SaveX ¶
func (suo *SourceUpdateOne) SaveX(ctx context.Context) *Source
SaveX is like Save, but panics if an error occurs.
func (*SourceUpdateOne) Select ¶
func (suo *SourceUpdateOne) Select(field string, fields ...string) *SourceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SourceUpdateOne) SetDescription ¶
func (suo *SourceUpdateOne) SetDescription(s string) *SourceUpdateOne
SetDescription sets the "description" field.
func (*SourceUpdateOne) SetName ¶
func (suo *SourceUpdateOne) SetName(s string) *SourceUpdateOne
SetName sets the "name" field.
func (*SourceUpdateOne) SetNillableDescription ¶
func (suo *SourceUpdateOne) SetNillableDescription(s *string) *SourceUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*SourceUpdateOne) SetNillableName ¶
func (suo *SourceUpdateOne) SetNillableName(s *string) *SourceUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*SourceUpdateOne) SetNillableRecipeID ¶
func (suo *SourceUpdateOne) SetNillableRecipeID(id *uuid.UUID) *SourceUpdateOne
SetNillableRecipeID sets the "recipe" edge to the Recipe entity by ID if the given value is not nil.
func (*SourceUpdateOne) SetNillableURL ¶
func (suo *SourceUpdateOne) SetNillableURL(s *string) *SourceUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*SourceUpdateOne) SetRecipe ¶
func (suo *SourceUpdateOne) SetRecipe(r *Recipe) *SourceUpdateOne
SetRecipe sets the "recipe" edge to the Recipe entity.
func (*SourceUpdateOne) SetRecipeID ¶
func (suo *SourceUpdateOne) SetRecipeID(id uuid.UUID) *SourceUpdateOne
SetRecipeID sets the "recipe" edge to the Recipe entity by ID.
func (*SourceUpdateOne) SetURL ¶
func (suo *SourceUpdateOne) SetURL(s string) *SourceUpdateOne
SetURL sets the "url" field.
func (*SourceUpdateOne) Where ¶
func (suo *SourceUpdateOne) Where(ps ...predicate.Source) *SourceUpdateOne
Where appends a list predicates to the SourceUpdate builder.
type Tag ¶
type Tag struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Group holds the value of the "group" field. Group string `json:"group,omitempty"` // Slug holds the value of the "slug" field. Slug string `json:"slug,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) QueryRecipes ¶
func (t *Tag) QueryRecipes() *RecipeQuery
QueryRecipes queries the "recipes" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag 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 (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id uuid.UUID) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) Intercept ¶
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) MapCreateBulk ¶
func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TagClient) QueryRecipes ¶
func (c *TagClient) QueryRecipes(t *Tag) *RecipeQuery
QueryRecipes queries the recipes edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id uuid.UUID) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddRecipeIDs ¶
AddRecipeIDs adds the "recipes" edge to the Recipe entity by IDs.
func (*TagCreate) AddRecipes ¶
AddRecipes adds the "recipes" edges to the Recipe entity.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) SetNillableID ¶
SetNillableID sets the "id" field if the given value is not nil.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagDeleteOne) Where ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Recipes holds the value of the recipes edge. Recipes []*Recipe `json:"recipes,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) RecipesOrErr ¶
RecipesOrErr returns the Recipes value or an error if the edge was not loaded in eager-loading.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddField ¶
func (m *TagMutation) 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 (*TagMutation) AddRecipeIDs ¶
func (m *TagMutation) AddRecipeIDs(ids ...uuid.UUID)
AddRecipeIDs adds the "recipes" edge to the Recipe entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) 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 (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) 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 (*TagMutation) ClearField ¶
func (m *TagMutation) 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 (*TagMutation) ClearRecipes ¶
func (m *TagMutation) ClearRecipes()
ClearRecipes clears the "recipes" edge to the Recipe entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) 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 (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) 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 (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) 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 (*TagMutation) Group ¶
func (m *TagMutation) Group() (r string, exists bool)
Group returns the value of the "group" field in the mutation.
func (*TagMutation) ID ¶
func (m *TagMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TagMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TagMutation) Name ¶
func (m *TagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TagMutation) 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 (*TagMutation) OldGroup ¶
func (m *TagMutation) OldGroup(ctx context.Context) (v string, err error)
OldGroup returns the old "group" field's value of the Tag entity. If the Tag 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 (*TagMutation) OldName ¶
func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Tag entity. If the Tag 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 (*TagMutation) OldSlug ¶
func (m *TagMutation) OldSlug(ctx context.Context) (v string, err error)
OldSlug returns the old "slug" field's value of the Tag entity. If the Tag 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 (*TagMutation) RecipesCleared ¶
func (m *TagMutation) RecipesCleared() bool
RecipesCleared reports if the "recipes" edge to the Recipe entity was cleared.
func (*TagMutation) RecipesIDs ¶
func (m *TagMutation) RecipesIDs() (ids []uuid.UUID)
RecipesIDs returns the "recipes" edge IDs in the mutation.
func (*TagMutation) RemoveRecipeIDs ¶
func (m *TagMutation) RemoveRecipeIDs(ids ...uuid.UUID)
RemoveRecipeIDs removes the "recipes" edge to the Recipe entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) 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 (*TagMutation) RemovedRecipesIDs ¶
func (m *TagMutation) RemovedRecipesIDs() (ids []uuid.UUID)
RemovedRecipes returns the removed IDs of the "recipes" edge to the Recipe entity.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) 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 (*TagMutation) ResetField ¶
func (m *TagMutation) 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 (*TagMutation) ResetGroup ¶
func (m *TagMutation) ResetGroup()
ResetGroup resets all changes to the "group" field.
func (*TagMutation) ResetName ¶
func (m *TagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TagMutation) ResetRecipes ¶
func (m *TagMutation) ResetRecipes()
ResetRecipes resets all changes to the "recipes" edge.
func (*TagMutation) ResetSlug ¶
func (m *TagMutation) ResetSlug()
ResetSlug resets all changes to the "slug" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) 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 (*TagMutation) SetGroup ¶
func (m *TagMutation) SetGroup(s string)
SetGroup sets the "group" field.
func (*TagMutation) SetID ¶
func (m *TagMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tag entities.
func (*TagMutation) SetName ¶
func (m *TagMutation) SetName(s string)
SetName sets the "name" field.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TagMutation) SetSlug ¶
func (m *TagMutation) SetSlug(s string)
SetSlug sets the "slug" field.
func (*TagMutation) Slug ¶
func (m *TagMutation) Slug() (r string, exists bool)
Slug returns the value of the "slug" field in the mutation.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
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.Tag.Query(). GroupBy(tag.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) QueryRecipes ¶
func (tq *TagQuery) QueryRecipes() *RecipeQuery
QueryRecipes chains the current query on the "recipes" edge.
func (*TagQuery) Select ¶
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.Tag.Query(). Select(tag.FieldName). Scan(ctx, &v)
func (*TagQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TagQuery) WithRecipes ¶
func (tq *TagQuery) WithRecipes(opts ...func(*RecipeQuery)) *TagQuery
WithRecipes tells the query-builder to eager-load the nodes that are connected to the "recipes" edge. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddRecipeIDs ¶
AddRecipeIDs adds the "recipes" edge to the Recipe entity by IDs.
func (*TagUpdate) AddRecipes ¶
AddRecipes adds the "recipes" edges to the Recipe entity.
func (*TagUpdate) ClearRecipes ¶
ClearRecipes clears all "recipes" edges to the Recipe entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveRecipeIDs ¶
RemoveRecipeIDs removes the "recipes" edge to Recipe entities by IDs.
func (*TagUpdate) RemoveRecipes ¶
RemoveRecipes removes "recipes" edges to Recipe entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetNillableGroup ¶
SetNillableGroup sets the "group" field if the given value is not nil.
func (*TagUpdate) SetNillableName ¶
SetNillableName sets the "name" field if the given value is not nil.
func (*TagUpdate) SetNillableSlug ¶
SetNillableSlug sets the "slug" field if the given value is not nil.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddRecipeIDs ¶
func (tuo *TagUpdateOne) AddRecipeIDs(ids ...uuid.UUID) *TagUpdateOne
AddRecipeIDs adds the "recipes" edge to the Recipe entity by IDs.
func (*TagUpdateOne) AddRecipes ¶
func (tuo *TagUpdateOne) AddRecipes(r ...*Recipe) *TagUpdateOne
AddRecipes adds the "recipes" edges to the Recipe entity.
func (*TagUpdateOne) ClearRecipes ¶
func (tuo *TagUpdateOne) ClearRecipes() *TagUpdateOne
ClearRecipes clears all "recipes" edges to the Recipe entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveRecipeIDs ¶
func (tuo *TagUpdateOne) RemoveRecipeIDs(ids ...uuid.UUID) *TagUpdateOne
RemoveRecipeIDs removes the "recipes" edge to Recipe entities by IDs.
func (*TagUpdateOne) RemoveRecipes ¶
func (tuo *TagUpdateOne) RemoveRecipes(r ...*Recipe) *TagUpdateOne
RemoveRecipes removes "recipes" edges to Recipe entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetGroup ¶
func (tuo *TagUpdateOne) SetGroup(s string) *TagUpdateOne
SetGroup sets the "group" field.
func (*TagUpdateOne) SetName ¶
func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
SetName sets the "name" field.
func (*TagUpdateOne) SetNillableGroup ¶
func (tuo *TagUpdateOne) SetNillableGroup(s *string) *TagUpdateOne
SetNillableGroup sets the "group" field if the given value is not nil.
func (*TagUpdateOne) SetNillableName ¶
func (tuo *TagUpdateOne) SetNillableName(s *string) *TagUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*TagUpdateOne) SetNillableSlug ¶
func (tuo *TagUpdateOne) SetNillableSlug(s *string) *TagUpdateOne
SetNillableSlug sets the "slug" field if the given value is not nil.
func (*TagUpdateOne) SetSlug ¶
func (tuo *TagUpdateOne) SetSlug(s string) *TagUpdateOne
SetSlug sets the "slug" field.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Equipment is the client for interacting with the Equipment builders. Equipment *EquipmentClient // Idea is the client for interacting with the Idea builders. Idea *IdeaClient // Ingredient is the client for interacting with the Ingredient builders. Ingredient *IngredientClient // Instruction is the client for interacting with the Instruction builders. Instruction *InstructionClient // Nutrition is the client for interacting with the Nutrition builders. Nutrition *NutritionClient // Product is the client for interacting with the Product builders. Product *ProductClient // Recipe is the client for interacting with the Recipe builders. Recipe *RecipeClient // Source is the client for interacting with the Source builders. Source *SourceClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- ent.go
- equipment.go
- equipment_create.go
- equipment_delete.go
- equipment_query.go
- equipment_update.go
- generate.go
- idea.go
- idea_create.go
- idea_delete.go
- idea_query.go
- idea_update.go
- ingredient.go
- ingredient_create.go
- ingredient_delete.go
- ingredient_query.go
- ingredient_update.go
- instruction.go
- instruction_create.go
- instruction_delete.go
- instruction_query.go
- instruction_update.go
- mutation.go
- nutrition.go
- nutrition_create.go
- nutrition_delete.go
- nutrition_query.go
- nutrition_update.go
- product.go
- product_create.go
- product_delete.go
- product_query.go
- product_update.go
- recipe.go
- recipe_create.go
- recipe_delete.go
- recipe_query.go
- recipe_update.go
- runtime.go
- source.go
- source_create.go
- source_delete.go
- source_query.go
- source_update.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tx.go