Documentation ¶
Index ¶
- Constants
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Dish
- func (d *Dish) QueryAliases() *DishAliasQuery
- func (d *Dish) QueryDishOccurrences() *OccurrenceQuery
- func (d *Dish) QuerySideDishOccurrence() *OccurrenceQuery
- func (d *Dish) String() string
- func (d *Dish) Unwrap() *Dish
- func (d *Dish) Update() *DishUpdateOne
- func (d *Dish) Value(name string) (ent.Value, error)
- type DishAlias
- type DishAliasClient
- func (c *DishAliasClient) Create() *DishAliasCreate
- func (c *DishAliasClient) CreateBulk(builders ...*DishAliasCreate) *DishAliasCreateBulk
- func (c *DishAliasClient) Delete() *DishAliasDelete
- func (c *DishAliasClient) DeleteOne(da *DishAlias) *DishAliasDeleteOne
- func (c *DishAliasClient) DeleteOneID(id string) *DishAliasDeleteOne
- func (c *DishAliasClient) Get(ctx context.Context, id string) (*DishAlias, error)
- func (c *DishAliasClient) GetX(ctx context.Context, id string) *DishAlias
- func (c *DishAliasClient) Hooks() []Hook
- func (c *DishAliasClient) Intercept(interceptors ...Interceptor)
- func (c *DishAliasClient) Interceptors() []Interceptor
- func (c *DishAliasClient) Query() *DishAliasQuery
- func (c *DishAliasClient) QueryDish(da *DishAlias) *DishQuery
- func (c *DishAliasClient) Update() *DishAliasUpdate
- func (c *DishAliasClient) UpdateOne(da *DishAlias) *DishAliasUpdateOne
- func (c *DishAliasClient) UpdateOneID(id string) *DishAliasUpdateOne
- func (c *DishAliasClient) Use(hooks ...Hook)
- type DishAliasCreate
- func (dac *DishAliasCreate) Exec(ctx context.Context) error
- func (dac *DishAliasCreate) ExecX(ctx context.Context)
- func (dac *DishAliasCreate) Mutation() *DishAliasMutation
- func (dac *DishAliasCreate) OnConflict(opts ...sql.ConflictOption) *DishAliasUpsertOne
- func (dac *DishAliasCreate) OnConflictColumns(columns ...string) *DishAliasUpsertOne
- func (dac *DishAliasCreate) Save(ctx context.Context) (*DishAlias, error)
- func (dac *DishAliasCreate) SaveX(ctx context.Context) *DishAlias
- func (dac *DishAliasCreate) SetDish(d *Dish) *DishAliasCreate
- func (dac *DishAliasCreate) SetDishID(id uuid.UUID) *DishAliasCreate
- func (dac *DishAliasCreate) SetID(s string) *DishAliasCreate
- func (dac *DishAliasCreate) SetNormalizedAliasName(s string) *DishAliasCreate
- type DishAliasCreateBulk
- func (dacb *DishAliasCreateBulk) Exec(ctx context.Context) error
- func (dacb *DishAliasCreateBulk) ExecX(ctx context.Context)
- func (dacb *DishAliasCreateBulk) OnConflict(opts ...sql.ConflictOption) *DishAliasUpsertBulk
- func (dacb *DishAliasCreateBulk) OnConflictColumns(columns ...string) *DishAliasUpsertBulk
- func (dacb *DishAliasCreateBulk) Save(ctx context.Context) ([]*DishAlias, error)
- func (dacb *DishAliasCreateBulk) SaveX(ctx context.Context) []*DishAlias
- type DishAliasDelete
- type DishAliasDeleteOne
- type DishAliasEdges
- type DishAliasGroupBy
- func (dagb *DishAliasGroupBy) Aggregate(fns ...AggregateFunc) *DishAliasGroupBy
- func (s *DishAliasGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DishAliasGroupBy) BoolX(ctx context.Context) bool
- func (s *DishAliasGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DishAliasGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DishAliasGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DishAliasGroupBy) Float64X(ctx context.Context) float64
- func (s *DishAliasGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DishAliasGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DishAliasGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DishAliasGroupBy) IntX(ctx context.Context) int
- func (s *DishAliasGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DishAliasGroupBy) IntsX(ctx context.Context) []int
- func (dagb *DishAliasGroupBy) Scan(ctx context.Context, v any) error
- func (s *DishAliasGroupBy) ScanX(ctx context.Context, v any)
- func (s *DishAliasGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DishAliasGroupBy) StringX(ctx context.Context) string
- func (s *DishAliasGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DishAliasGroupBy) StringsX(ctx context.Context) []string
- type DishAliasMutation
- func (m *DishAliasMutation) AddField(name string, value ent.Value) error
- func (m *DishAliasMutation) AddedEdges() []string
- func (m *DishAliasMutation) AddedField(name string) (ent.Value, bool)
- func (m *DishAliasMutation) AddedFields() []string
- func (m *DishAliasMutation) AddedIDs(name string) []ent.Value
- func (m *DishAliasMutation) ClearDish()
- func (m *DishAliasMutation) ClearEdge(name string) error
- func (m *DishAliasMutation) ClearField(name string) error
- func (m *DishAliasMutation) ClearedEdges() []string
- func (m *DishAliasMutation) ClearedFields() []string
- func (m DishAliasMutation) Client() *Client
- func (m *DishAliasMutation) DishCleared() bool
- func (m *DishAliasMutation) DishID() (id uuid.UUID, exists bool)
- func (m *DishAliasMutation) DishIDs() (ids []uuid.UUID)
- func (m *DishAliasMutation) EdgeCleared(name string) bool
- func (m *DishAliasMutation) Field(name string) (ent.Value, bool)
- func (m *DishAliasMutation) FieldCleared(name string) bool
- func (m *DishAliasMutation) Fields() []string
- func (m *DishAliasMutation) ID() (id string, exists bool)
- func (m *DishAliasMutation) IDs(ctx context.Context) ([]string, error)
- func (m *DishAliasMutation) NormalizedAliasName() (r string, exists bool)
- func (m *DishAliasMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DishAliasMutation) OldNormalizedAliasName(ctx context.Context) (v string, err error)
- func (m *DishAliasMutation) Op() Op
- func (m *DishAliasMutation) RemovedEdges() []string
- func (m *DishAliasMutation) RemovedIDs(name string) []ent.Value
- func (m *DishAliasMutation) ResetDish()
- func (m *DishAliasMutation) ResetEdge(name string) error
- func (m *DishAliasMutation) ResetField(name string) error
- func (m *DishAliasMutation) ResetNormalizedAliasName()
- func (m *DishAliasMutation) SetDishID(id uuid.UUID)
- func (m *DishAliasMutation) SetField(name string, value ent.Value) error
- func (m *DishAliasMutation) SetID(id string)
- func (m *DishAliasMutation) SetNormalizedAliasName(s string)
- func (m *DishAliasMutation) SetOp(op Op)
- func (m DishAliasMutation) Tx() (*Tx, error)
- func (m *DishAliasMutation) Type() string
- func (m *DishAliasMutation) Where(ps ...predicate.DishAlias)
- func (m *DishAliasMutation) WhereP(ps ...func(*sql.Selector))
- type DishAliasQuery
- func (daq *DishAliasQuery) Aggregate(fns ...AggregateFunc) *DishAliasSelect
- func (daq *DishAliasQuery) All(ctx context.Context) ([]*DishAlias, error)
- func (daq *DishAliasQuery) AllX(ctx context.Context) []*DishAlias
- func (daq *DishAliasQuery) Clone() *DishAliasQuery
- func (daq *DishAliasQuery) Count(ctx context.Context) (int, error)
- func (daq *DishAliasQuery) CountX(ctx context.Context) int
- func (daq *DishAliasQuery) Exist(ctx context.Context) (bool, error)
- func (daq *DishAliasQuery) ExistX(ctx context.Context) bool
- func (daq *DishAliasQuery) First(ctx context.Context) (*DishAlias, error)
- func (daq *DishAliasQuery) FirstID(ctx context.Context) (id string, err error)
- func (daq *DishAliasQuery) FirstIDX(ctx context.Context) string
- func (daq *DishAliasQuery) FirstX(ctx context.Context) *DishAlias
- func (daq *DishAliasQuery) GroupBy(field string, fields ...string) *DishAliasGroupBy
- func (daq *DishAliasQuery) IDs(ctx context.Context) (ids []string, err error)
- func (daq *DishAliasQuery) IDsX(ctx context.Context) []string
- func (daq *DishAliasQuery) Limit(limit int) *DishAliasQuery
- func (daq *DishAliasQuery) Offset(offset int) *DishAliasQuery
- func (daq *DishAliasQuery) Only(ctx context.Context) (*DishAlias, error)
- func (daq *DishAliasQuery) OnlyID(ctx context.Context) (id string, err error)
- func (daq *DishAliasQuery) OnlyIDX(ctx context.Context) string
- func (daq *DishAliasQuery) OnlyX(ctx context.Context) *DishAlias
- func (daq *DishAliasQuery) Order(o ...dishalias.OrderOption) *DishAliasQuery
- func (daq *DishAliasQuery) QueryDish() *DishQuery
- func (daq *DishAliasQuery) Select(fields ...string) *DishAliasSelect
- func (daq *DishAliasQuery) Unique(unique bool) *DishAliasQuery
- func (daq *DishAliasQuery) Where(ps ...predicate.DishAlias) *DishAliasQuery
- func (daq *DishAliasQuery) WithDish(opts ...func(*DishQuery)) *DishAliasQuery
- type DishAliasSelect
- func (das *DishAliasSelect) Aggregate(fns ...AggregateFunc) *DishAliasSelect
- func (s *DishAliasSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DishAliasSelect) BoolX(ctx context.Context) bool
- func (s *DishAliasSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DishAliasSelect) BoolsX(ctx context.Context) []bool
- func (s *DishAliasSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DishAliasSelect) Float64X(ctx context.Context) float64
- func (s *DishAliasSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DishAliasSelect) Float64sX(ctx context.Context) []float64
- func (s *DishAliasSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DishAliasSelect) IntX(ctx context.Context) int
- func (s *DishAliasSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DishAliasSelect) IntsX(ctx context.Context) []int
- func (das *DishAliasSelect) Scan(ctx context.Context, v any) error
- func (s *DishAliasSelect) ScanX(ctx context.Context, v any)
- func (s *DishAliasSelect) String(ctx context.Context) (_ string, err error)
- func (s *DishAliasSelect) StringX(ctx context.Context) string
- func (s *DishAliasSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DishAliasSelect) StringsX(ctx context.Context) []string
- type DishAliasSlice
- type DishAliasUpdate
- func (dau *DishAliasUpdate) ClearDish() *DishAliasUpdate
- func (dau *DishAliasUpdate) Exec(ctx context.Context) error
- func (dau *DishAliasUpdate) ExecX(ctx context.Context)
- func (dau *DishAliasUpdate) Mutation() *DishAliasMutation
- func (dau *DishAliasUpdate) Save(ctx context.Context) (int, error)
- func (dau *DishAliasUpdate) SaveX(ctx context.Context) int
- func (dau *DishAliasUpdate) SetDish(d *Dish) *DishAliasUpdate
- func (dau *DishAliasUpdate) SetDishID(id uuid.UUID) *DishAliasUpdate
- func (dau *DishAliasUpdate) SetNormalizedAliasName(s string) *DishAliasUpdate
- func (dau *DishAliasUpdate) Where(ps ...predicate.DishAlias) *DishAliasUpdate
- type DishAliasUpdateOne
- func (dauo *DishAliasUpdateOne) ClearDish() *DishAliasUpdateOne
- func (dauo *DishAliasUpdateOne) Exec(ctx context.Context) error
- func (dauo *DishAliasUpdateOne) ExecX(ctx context.Context)
- func (dauo *DishAliasUpdateOne) Mutation() *DishAliasMutation
- func (dauo *DishAliasUpdateOne) Save(ctx context.Context) (*DishAlias, error)
- func (dauo *DishAliasUpdateOne) SaveX(ctx context.Context) *DishAlias
- func (dauo *DishAliasUpdateOne) Select(field string, fields ...string) *DishAliasUpdateOne
- func (dauo *DishAliasUpdateOne) SetDish(d *Dish) *DishAliasUpdateOne
- func (dauo *DishAliasUpdateOne) SetDishID(id uuid.UUID) *DishAliasUpdateOne
- func (dauo *DishAliasUpdateOne) SetNormalizedAliasName(s string) *DishAliasUpdateOne
- func (dauo *DishAliasUpdateOne) Where(ps ...predicate.DishAlias) *DishAliasUpdateOne
- type DishAliasUpsert
- type DishAliasUpsertBulk
- func (u *DishAliasUpsertBulk) DoNothing() *DishAliasUpsertBulk
- func (u *DishAliasUpsertBulk) Exec(ctx context.Context) error
- func (u *DishAliasUpsertBulk) ExecX(ctx context.Context)
- func (u *DishAliasUpsertBulk) Ignore() *DishAliasUpsertBulk
- func (u *DishAliasUpsertBulk) SetNormalizedAliasName(v string) *DishAliasUpsertBulk
- func (u *DishAliasUpsertBulk) Update(set func(*DishAliasUpsert)) *DishAliasUpsertBulk
- func (u *DishAliasUpsertBulk) UpdateNewValues() *DishAliasUpsertBulk
- func (u *DishAliasUpsertBulk) UpdateNormalizedAliasName() *DishAliasUpsertBulk
- type DishAliasUpsertOne
- func (u *DishAliasUpsertOne) DoNothing() *DishAliasUpsertOne
- func (u *DishAliasUpsertOne) Exec(ctx context.Context) error
- func (u *DishAliasUpsertOne) ExecX(ctx context.Context)
- func (u *DishAliasUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *DishAliasUpsertOne) IDX(ctx context.Context) string
- func (u *DishAliasUpsertOne) Ignore() *DishAliasUpsertOne
- func (u *DishAliasUpsertOne) SetNormalizedAliasName(v string) *DishAliasUpsertOne
- func (u *DishAliasUpsertOne) Update(set func(*DishAliasUpsert)) *DishAliasUpsertOne
- func (u *DishAliasUpsertOne) UpdateNewValues() *DishAliasUpsertOne
- func (u *DishAliasUpsertOne) UpdateNormalizedAliasName() *DishAliasUpsertOne
- type DishClient
- func (c *DishClient) Create() *DishCreate
- func (c *DishClient) CreateBulk(builders ...*DishCreate) *DishCreateBulk
- func (c *DishClient) Delete() *DishDelete
- func (c *DishClient) DeleteOne(d *Dish) *DishDeleteOne
- func (c *DishClient) DeleteOneID(id uuid.UUID) *DishDeleteOne
- func (c *DishClient) Get(ctx context.Context, id uuid.UUID) (*Dish, error)
- func (c *DishClient) GetX(ctx context.Context, id uuid.UUID) *Dish
- func (c *DishClient) Hooks() []Hook
- func (c *DishClient) Intercept(interceptors ...Interceptor)
- func (c *DishClient) Interceptors() []Interceptor
- func (c *DishClient) Query() *DishQuery
- func (c *DishClient) QueryAliases(d *Dish) *DishAliasQuery
- func (c *DishClient) QueryDishOccurrences(d *Dish) *OccurrenceQuery
- func (c *DishClient) QuerySideDishOccurrence(d *Dish) *OccurrenceQuery
- func (c *DishClient) Update() *DishUpdate
- func (c *DishClient) UpdateOne(d *Dish) *DishUpdateOne
- func (c *DishClient) UpdateOneID(id uuid.UUID) *DishUpdateOne
- func (c *DishClient) Use(hooks ...Hook)
- type DishCreate
- func (dc *DishCreate) AddAliasIDs(ids ...string) *DishCreate
- func (dc *DishCreate) AddAliases(d ...*DishAlias) *DishCreate
- func (dc *DishCreate) AddDishOccurrenceIDs(ids ...uuid.UUID) *DishCreate
- func (dc *DishCreate) AddDishOccurrences(o ...*Occurrence) *DishCreate
- func (dc *DishCreate) AddSideDishOccurrence(o ...*Occurrence) *DishCreate
- func (dc *DishCreate) AddSideDishOccurrenceIDs(ids ...uuid.UUID) *DishCreate
- func (dc *DishCreate) Exec(ctx context.Context) error
- func (dc *DishCreate) ExecX(ctx context.Context)
- func (dc *DishCreate) Mutation() *DishMutation
- func (dc *DishCreate) OnConflict(opts ...sql.ConflictOption) *DishUpsertOne
- func (dc *DishCreate) OnConflictColumns(columns ...string) *DishUpsertOne
- func (dc *DishCreate) Save(ctx context.Context) (*Dish, error)
- func (dc *DishCreate) SaveX(ctx context.Context) *Dish
- func (dc *DishCreate) SetID(u uuid.UUID) *DishCreate
- func (dc *DishCreate) SetNameDe(s string) *DishCreate
- func (dc *DishCreate) SetNameEn(s string) *DishCreate
- func (dc *DishCreate) SetNillableID(u *uuid.UUID) *DishCreate
- func (dc *DishCreate) SetNillableNameEn(s *string) *DishCreate
- type DishCreateBulk
- func (dcb *DishCreateBulk) Exec(ctx context.Context) error
- func (dcb *DishCreateBulk) ExecX(ctx context.Context)
- func (dcb *DishCreateBulk) OnConflict(opts ...sql.ConflictOption) *DishUpsertBulk
- func (dcb *DishCreateBulk) OnConflictColumns(columns ...string) *DishUpsertBulk
- func (dcb *DishCreateBulk) Save(ctx context.Context) ([]*Dish, error)
- func (dcb *DishCreateBulk) SaveX(ctx context.Context) []*Dish
- type DishDelete
- type DishDeleteOne
- type DishEdges
- type DishGroupBy
- func (dgb *DishGroupBy) Aggregate(fns ...AggregateFunc) *DishGroupBy
- func (s *DishGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DishGroupBy) BoolX(ctx context.Context) bool
- func (s *DishGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DishGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DishGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DishGroupBy) Float64X(ctx context.Context) float64
- func (s *DishGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DishGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DishGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DishGroupBy) IntX(ctx context.Context) int
- func (s *DishGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DishGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DishGroupBy) Scan(ctx context.Context, v any) error
- func (s *DishGroupBy) ScanX(ctx context.Context, v any)
- func (s *DishGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DishGroupBy) StringX(ctx context.Context) string
- func (s *DishGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DishGroupBy) StringsX(ctx context.Context) []string
- type DishMutation
- func (m *DishMutation) AddAliasIDs(ids ...string)
- func (m *DishMutation) AddDishOccurrenceIDs(ids ...uuid.UUID)
- func (m *DishMutation) AddField(name string, value ent.Value) error
- func (m *DishMutation) AddSideDishOccurrenceIDs(ids ...uuid.UUID)
- func (m *DishMutation) AddedEdges() []string
- func (m *DishMutation) AddedField(name string) (ent.Value, bool)
- func (m *DishMutation) AddedFields() []string
- func (m *DishMutation) AddedIDs(name string) []ent.Value
- func (m *DishMutation) AliasesCleared() bool
- func (m *DishMutation) AliasesIDs() (ids []string)
- func (m *DishMutation) ClearAliases()
- func (m *DishMutation) ClearDishOccurrences()
- func (m *DishMutation) ClearEdge(name string) error
- func (m *DishMutation) ClearField(name string) error
- func (m *DishMutation) ClearNameEn()
- func (m *DishMutation) ClearSideDishOccurrence()
- func (m *DishMutation) ClearedEdges() []string
- func (m *DishMutation) ClearedFields() []string
- func (m DishMutation) Client() *Client
- func (m *DishMutation) DishOccurrencesCleared() bool
- func (m *DishMutation) DishOccurrencesIDs() (ids []uuid.UUID)
- func (m *DishMutation) EdgeCleared(name string) bool
- func (m *DishMutation) Field(name string) (ent.Value, bool)
- func (m *DishMutation) FieldCleared(name string) bool
- func (m *DishMutation) Fields() []string
- func (m *DishMutation) ID() (id uuid.UUID, exists bool)
- func (m *DishMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *DishMutation) NameDe() (r string, exists bool)
- func (m *DishMutation) NameEn() (r string, exists bool)
- func (m *DishMutation) NameEnCleared() bool
- func (m *DishMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DishMutation) OldNameDe(ctx context.Context) (v string, err error)
- func (m *DishMutation) OldNameEn(ctx context.Context) (v *string, err error)
- func (m *DishMutation) Op() Op
- func (m *DishMutation) RemoveAliasIDs(ids ...string)
- func (m *DishMutation) RemoveDishOccurrenceIDs(ids ...uuid.UUID)
- func (m *DishMutation) RemoveSideDishOccurrenceIDs(ids ...uuid.UUID)
- func (m *DishMutation) RemovedAliasesIDs() (ids []string)
- func (m *DishMutation) RemovedDishOccurrencesIDs() (ids []uuid.UUID)
- func (m *DishMutation) RemovedEdges() []string
- func (m *DishMutation) RemovedIDs(name string) []ent.Value
- func (m *DishMutation) RemovedSideDishOccurrenceIDs() (ids []uuid.UUID)
- func (m *DishMutation) ResetAliases()
- func (m *DishMutation) ResetDishOccurrences()
- func (m *DishMutation) ResetEdge(name string) error
- func (m *DishMutation) ResetField(name string) error
- func (m *DishMutation) ResetNameDe()
- func (m *DishMutation) ResetNameEn()
- func (m *DishMutation) ResetSideDishOccurrence()
- func (m *DishMutation) SetField(name string, value ent.Value) error
- func (m *DishMutation) SetID(id uuid.UUID)
- func (m *DishMutation) SetNameDe(s string)
- func (m *DishMutation) SetNameEn(s string)
- func (m *DishMutation) SetOp(op Op)
- func (m *DishMutation) SideDishOccurrenceCleared() bool
- func (m *DishMutation) SideDishOccurrenceIDs() (ids []uuid.UUID)
- func (m DishMutation) Tx() (*Tx, error)
- func (m *DishMutation) Type() string
- func (m *DishMutation) Where(ps ...predicate.Dish)
- func (m *DishMutation) WhereP(ps ...func(*sql.Selector))
- type DishQuery
- func (dq *DishQuery) Aggregate(fns ...AggregateFunc) *DishSelect
- func (dq *DishQuery) All(ctx context.Context) ([]*Dish, error)
- func (dq *DishQuery) AllX(ctx context.Context) []*Dish
- func (dq *DishQuery) Clone() *DishQuery
- func (dq *DishQuery) Count(ctx context.Context) (int, error)
- func (dq *DishQuery) CountX(ctx context.Context) int
- func (dq *DishQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DishQuery) ExistX(ctx context.Context) bool
- func (dq *DishQuery) First(ctx context.Context) (*Dish, error)
- func (dq *DishQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (dq *DishQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (dq *DishQuery) FirstX(ctx context.Context) *Dish
- func (dq *DishQuery) GroupBy(field string, fields ...string) *DishGroupBy
- func (dq *DishQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (dq *DishQuery) IDsX(ctx context.Context) []uuid.UUID
- func (dq *DishQuery) Limit(limit int) *DishQuery
- func (dq *DishQuery) Offset(offset int) *DishQuery
- func (dq *DishQuery) Only(ctx context.Context) (*Dish, error)
- func (dq *DishQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (dq *DishQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (dq *DishQuery) OnlyX(ctx context.Context) *Dish
- func (dq *DishQuery) Order(o ...dish.OrderOption) *DishQuery
- func (dq *DishQuery) QueryAliases() *DishAliasQuery
- func (dq *DishQuery) QueryDishOccurrences() *OccurrenceQuery
- func (dq *DishQuery) QuerySideDishOccurrence() *OccurrenceQuery
- func (dq *DishQuery) Select(fields ...string) *DishSelect
- func (dq *DishQuery) Unique(unique bool) *DishQuery
- func (dq *DishQuery) Where(ps ...predicate.Dish) *DishQuery
- func (dq *DishQuery) WithAliases(opts ...func(*DishAliasQuery)) *DishQuery
- func (dq *DishQuery) WithDishOccurrences(opts ...func(*OccurrenceQuery)) *DishQuery
- func (dq *DishQuery) WithSideDishOccurrence(opts ...func(*OccurrenceQuery)) *DishQuery
- type DishSelect
- func (ds *DishSelect) Aggregate(fns ...AggregateFunc) *DishSelect
- func (s *DishSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DishSelect) BoolX(ctx context.Context) bool
- func (s *DishSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DishSelect) BoolsX(ctx context.Context) []bool
- func (s *DishSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DishSelect) Float64X(ctx context.Context) float64
- func (s *DishSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DishSelect) Float64sX(ctx context.Context) []float64
- func (s *DishSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DishSelect) IntX(ctx context.Context) int
- func (s *DishSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DishSelect) IntsX(ctx context.Context) []int
- func (ds *DishSelect) Scan(ctx context.Context, v any) error
- func (s *DishSelect) ScanX(ctx context.Context, v any)
- func (s *DishSelect) String(ctx context.Context) (_ string, err error)
- func (s *DishSelect) StringX(ctx context.Context) string
- func (s *DishSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DishSelect) StringsX(ctx context.Context) []string
- type DishUpdate
- func (du *DishUpdate) AddAliasIDs(ids ...string) *DishUpdate
- func (du *DishUpdate) AddAliases(d ...*DishAlias) *DishUpdate
- func (du *DishUpdate) AddDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
- func (du *DishUpdate) AddDishOccurrences(o ...*Occurrence) *DishUpdate
- func (du *DishUpdate) AddSideDishOccurrence(o ...*Occurrence) *DishUpdate
- func (du *DishUpdate) AddSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
- func (du *DishUpdate) ClearAliases() *DishUpdate
- func (du *DishUpdate) ClearDishOccurrences() *DishUpdate
- func (du *DishUpdate) ClearNameEn() *DishUpdate
- func (du *DishUpdate) ClearSideDishOccurrence() *DishUpdate
- func (du *DishUpdate) Exec(ctx context.Context) error
- func (du *DishUpdate) ExecX(ctx context.Context)
- func (du *DishUpdate) Mutation() *DishMutation
- func (du *DishUpdate) RemoveAliasIDs(ids ...string) *DishUpdate
- func (du *DishUpdate) RemoveAliases(d ...*DishAlias) *DishUpdate
- func (du *DishUpdate) RemoveDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
- func (du *DishUpdate) RemoveDishOccurrences(o ...*Occurrence) *DishUpdate
- func (du *DishUpdate) RemoveSideDishOccurrence(o ...*Occurrence) *DishUpdate
- func (du *DishUpdate) RemoveSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
- func (du *DishUpdate) Save(ctx context.Context) (int, error)
- func (du *DishUpdate) SaveX(ctx context.Context) int
- func (du *DishUpdate) SetNameDe(s string) *DishUpdate
- func (du *DishUpdate) SetNameEn(s string) *DishUpdate
- func (du *DishUpdate) SetNillableNameEn(s *string) *DishUpdate
- func (du *DishUpdate) Where(ps ...predicate.Dish) *DishUpdate
- type DishUpdateOne
- func (duo *DishUpdateOne) AddAliasIDs(ids ...string) *DishUpdateOne
- func (duo *DishUpdateOne) AddAliases(d ...*DishAlias) *DishUpdateOne
- func (duo *DishUpdateOne) AddDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
- func (duo *DishUpdateOne) AddDishOccurrences(o ...*Occurrence) *DishUpdateOne
- func (duo *DishUpdateOne) AddSideDishOccurrence(o ...*Occurrence) *DishUpdateOne
- func (duo *DishUpdateOne) AddSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
- func (duo *DishUpdateOne) ClearAliases() *DishUpdateOne
- func (duo *DishUpdateOne) ClearDishOccurrences() *DishUpdateOne
- func (duo *DishUpdateOne) ClearNameEn() *DishUpdateOne
- func (duo *DishUpdateOne) ClearSideDishOccurrence() *DishUpdateOne
- func (duo *DishUpdateOne) Exec(ctx context.Context) error
- func (duo *DishUpdateOne) ExecX(ctx context.Context)
- func (duo *DishUpdateOne) Mutation() *DishMutation
- func (duo *DishUpdateOne) RemoveAliasIDs(ids ...string) *DishUpdateOne
- func (duo *DishUpdateOne) RemoveAliases(d ...*DishAlias) *DishUpdateOne
- func (duo *DishUpdateOne) RemoveDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
- func (duo *DishUpdateOne) RemoveDishOccurrences(o ...*Occurrence) *DishUpdateOne
- func (duo *DishUpdateOne) RemoveSideDishOccurrence(o ...*Occurrence) *DishUpdateOne
- func (duo *DishUpdateOne) RemoveSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
- func (duo *DishUpdateOne) Save(ctx context.Context) (*Dish, error)
- func (duo *DishUpdateOne) SaveX(ctx context.Context) *Dish
- func (duo *DishUpdateOne) Select(field string, fields ...string) *DishUpdateOne
- func (duo *DishUpdateOne) SetNameDe(s string) *DishUpdateOne
- func (duo *DishUpdateOne) SetNameEn(s string) *DishUpdateOne
- func (duo *DishUpdateOne) SetNillableNameEn(s *string) *DishUpdateOne
- func (duo *DishUpdateOne) Where(ps ...predicate.Dish) *DishUpdateOne
- type DishUpsert
- type DishUpsertBulk
- func (u *DishUpsertBulk) ClearNameEn() *DishUpsertBulk
- func (u *DishUpsertBulk) DoNothing() *DishUpsertBulk
- func (u *DishUpsertBulk) Exec(ctx context.Context) error
- func (u *DishUpsertBulk) ExecX(ctx context.Context)
- func (u *DishUpsertBulk) Ignore() *DishUpsertBulk
- func (u *DishUpsertBulk) SetNameDe(v string) *DishUpsertBulk
- func (u *DishUpsertBulk) SetNameEn(v string) *DishUpsertBulk
- func (u *DishUpsertBulk) Update(set func(*DishUpsert)) *DishUpsertBulk
- func (u *DishUpsertBulk) UpdateNameDe() *DishUpsertBulk
- func (u *DishUpsertBulk) UpdateNameEn() *DishUpsertBulk
- func (u *DishUpsertBulk) UpdateNewValues() *DishUpsertBulk
- type DishUpsertOne
- func (u *DishUpsertOne) ClearNameEn() *DishUpsertOne
- func (u *DishUpsertOne) DoNothing() *DishUpsertOne
- func (u *DishUpsertOne) Exec(ctx context.Context) error
- func (u *DishUpsertOne) ExecX(ctx context.Context)
- func (u *DishUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *DishUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *DishUpsertOne) Ignore() *DishUpsertOne
- func (u *DishUpsertOne) SetNameDe(v string) *DishUpsertOne
- func (u *DishUpsertOne) SetNameEn(v string) *DishUpsertOne
- func (u *DishUpsertOne) Update(set func(*DishUpsert)) *DishUpsertOne
- func (u *DishUpsertOne) UpdateNameDe() *DishUpsertOne
- func (u *DishUpsertOne) UpdateNameEn() *DishUpsertOne
- func (u *DishUpsertOne) UpdateNewValues() *DishUpsertOne
- type Dishes
- type Hook
- type Image
- type ImageClient
- func (c *ImageClient) Create() *ImageCreate
- func (c *ImageClient) CreateBulk(builders ...*ImageCreate) *ImageCreateBulk
- func (c *ImageClient) Delete() *ImageDelete
- func (c *ImageClient) DeleteOne(i *Image) *ImageDeleteOne
- func (c *ImageClient) DeleteOneID(id uuid.UUID) *ImageDeleteOne
- func (c *ImageClient) Get(ctx context.Context, id uuid.UUID) (*Image, error)
- func (c *ImageClient) GetX(ctx context.Context, id uuid.UUID) *Image
- func (c *ImageClient) Hooks() []Hook
- func (c *ImageClient) Intercept(interceptors ...Interceptor)
- func (c *ImageClient) Interceptors() []Interceptor
- func (c *ImageClient) Query() *ImageQuery
- func (c *ImageClient) QueryReview(i *Image) *ReviewQuery
- func (c *ImageClient) Update() *ImageUpdate
- func (c *ImageClient) UpdateOne(i *Image) *ImageUpdateOne
- func (c *ImageClient) UpdateOneID(id uuid.UUID) *ImageUpdateOne
- func (c *ImageClient) Use(hooks ...Hook)
- type ImageCreate
- func (ic *ImageCreate) Exec(ctx context.Context) error
- func (ic *ImageCreate) ExecX(ctx context.Context)
- func (ic *ImageCreate) Mutation() *ImageMutation
- func (ic *ImageCreate) OnConflict(opts ...sql.ConflictOption) *ImageUpsertOne
- func (ic *ImageCreate) OnConflictColumns(columns ...string) *ImageUpsertOne
- func (ic *ImageCreate) Save(ctx context.Context) (*Image, error)
- func (ic *ImageCreate) SaveX(ctx context.Context) *Image
- func (ic *ImageCreate) SetID(u uuid.UUID) *ImageCreate
- func (ic *ImageCreate) SetImageHash(s string) *ImageCreate
- func (ic *ImageCreate) SetNillableID(u *uuid.UUID) *ImageCreate
- func (ic *ImageCreate) SetReview(r *Review) *ImageCreate
- func (ic *ImageCreate) SetReviewID(id uuid.UUID) *ImageCreate
- type ImageCreateBulk
- func (icb *ImageCreateBulk) Exec(ctx context.Context) error
- func (icb *ImageCreateBulk) ExecX(ctx context.Context)
- func (icb *ImageCreateBulk) OnConflict(opts ...sql.ConflictOption) *ImageUpsertBulk
- func (icb *ImageCreateBulk) OnConflictColumns(columns ...string) *ImageUpsertBulk
- func (icb *ImageCreateBulk) Save(ctx context.Context) ([]*Image, error)
- func (icb *ImageCreateBulk) SaveX(ctx context.Context) []*Image
- type ImageDelete
- type ImageDeleteOne
- type ImageEdges
- type ImageGroupBy
- func (igb *ImageGroupBy) Aggregate(fns ...AggregateFunc) *ImageGroupBy
- func (s *ImageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ImageGroupBy) BoolX(ctx context.Context) bool
- func (s *ImageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ImageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ImageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ImageGroupBy) Float64X(ctx context.Context) float64
- func (s *ImageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ImageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ImageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ImageGroupBy) IntX(ctx context.Context) int
- func (s *ImageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ImageGroupBy) IntsX(ctx context.Context) []int
- func (igb *ImageGroupBy) Scan(ctx context.Context, v any) error
- func (s *ImageGroupBy) ScanX(ctx context.Context, v any)
- func (s *ImageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ImageGroupBy) StringX(ctx context.Context) string
- func (s *ImageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ImageGroupBy) StringsX(ctx context.Context) []string
- type ImageMutation
- func (m *ImageMutation) AddField(name string, value ent.Value) error
- func (m *ImageMutation) AddedEdges() []string
- func (m *ImageMutation) AddedField(name string) (ent.Value, bool)
- func (m *ImageMutation) AddedFields() []string
- func (m *ImageMutation) AddedIDs(name string) []ent.Value
- func (m *ImageMutation) ClearEdge(name string) error
- func (m *ImageMutation) ClearField(name string) error
- func (m *ImageMutation) ClearReview()
- func (m *ImageMutation) ClearedEdges() []string
- func (m *ImageMutation) ClearedFields() []string
- func (m ImageMutation) Client() *Client
- func (m *ImageMutation) EdgeCleared(name string) bool
- func (m *ImageMutation) Field(name string) (ent.Value, bool)
- func (m *ImageMutation) FieldCleared(name string) bool
- func (m *ImageMutation) Fields() []string
- func (m *ImageMutation) ID() (id uuid.UUID, exists bool)
- func (m *ImageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ImageMutation) ImageHash() (r string, exists bool)
- func (m *ImageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ImageMutation) OldImageHash(ctx context.Context) (v string, err error)
- func (m *ImageMutation) Op() Op
- func (m *ImageMutation) RemovedEdges() []string
- func (m *ImageMutation) RemovedIDs(name string) []ent.Value
- func (m *ImageMutation) ResetEdge(name string) error
- func (m *ImageMutation) ResetField(name string) error
- func (m *ImageMutation) ResetImageHash()
- func (m *ImageMutation) ResetReview()
- func (m *ImageMutation) ReviewCleared() bool
- func (m *ImageMutation) ReviewID() (id uuid.UUID, exists bool)
- func (m *ImageMutation) ReviewIDs() (ids []uuid.UUID)
- func (m *ImageMutation) SetField(name string, value ent.Value) error
- func (m *ImageMutation) SetID(id uuid.UUID)
- func (m *ImageMutation) SetImageHash(s string)
- func (m *ImageMutation) SetOp(op Op)
- func (m *ImageMutation) SetReviewID(id uuid.UUID)
- func (m ImageMutation) Tx() (*Tx, error)
- func (m *ImageMutation) Type() string
- func (m *ImageMutation) Where(ps ...predicate.Image)
- func (m *ImageMutation) WhereP(ps ...func(*sql.Selector))
- type ImageQuery
- func (iq *ImageQuery) Aggregate(fns ...AggregateFunc) *ImageSelect
- func (iq *ImageQuery) All(ctx context.Context) ([]*Image, error)
- func (iq *ImageQuery) AllX(ctx context.Context) []*Image
- func (iq *ImageQuery) Clone() *ImageQuery
- func (iq *ImageQuery) Count(ctx context.Context) (int, error)
- func (iq *ImageQuery) CountX(ctx context.Context) int
- func (iq *ImageQuery) Exist(ctx context.Context) (bool, error)
- func (iq *ImageQuery) ExistX(ctx context.Context) bool
- func (iq *ImageQuery) First(ctx context.Context) (*Image, error)
- func (iq *ImageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *ImageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *ImageQuery) FirstX(ctx context.Context) *Image
- func (iq *ImageQuery) GroupBy(field string, fields ...string) *ImageGroupBy
- func (iq *ImageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iq *ImageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *ImageQuery) Limit(limit int) *ImageQuery
- func (iq *ImageQuery) Offset(offset int) *ImageQuery
- func (iq *ImageQuery) Only(ctx context.Context) (*Image, error)
- func (iq *ImageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *ImageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *ImageQuery) OnlyX(ctx context.Context) *Image
- func (iq *ImageQuery) Order(o ...image.OrderOption) *ImageQuery
- func (iq *ImageQuery) QueryReview() *ReviewQuery
- func (iq *ImageQuery) Select(fields ...string) *ImageSelect
- func (iq *ImageQuery) Unique(unique bool) *ImageQuery
- func (iq *ImageQuery) Where(ps ...predicate.Image) *ImageQuery
- func (iq *ImageQuery) WithReview(opts ...func(*ReviewQuery)) *ImageQuery
- type ImageSelect
- func (is *ImageSelect) Aggregate(fns ...AggregateFunc) *ImageSelect
- func (s *ImageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ImageSelect) BoolX(ctx context.Context) bool
- func (s *ImageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ImageSelect) BoolsX(ctx context.Context) []bool
- func (s *ImageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ImageSelect) Float64X(ctx context.Context) float64
- func (s *ImageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ImageSelect) Float64sX(ctx context.Context) []float64
- func (s *ImageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ImageSelect) IntX(ctx context.Context) int
- func (s *ImageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ImageSelect) IntsX(ctx context.Context) []int
- func (is *ImageSelect) Scan(ctx context.Context, v any) error
- func (s *ImageSelect) ScanX(ctx context.Context, v any)
- func (s *ImageSelect) String(ctx context.Context) (_ string, err error)
- func (s *ImageSelect) StringX(ctx context.Context) string
- func (s *ImageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ImageSelect) StringsX(ctx context.Context) []string
- type ImageUpdate
- func (iu *ImageUpdate) ClearReview() *ImageUpdate
- func (iu *ImageUpdate) Exec(ctx context.Context) error
- func (iu *ImageUpdate) ExecX(ctx context.Context)
- func (iu *ImageUpdate) Mutation() *ImageMutation
- func (iu *ImageUpdate) Save(ctx context.Context) (int, error)
- func (iu *ImageUpdate) SaveX(ctx context.Context) int
- func (iu *ImageUpdate) SetImageHash(s string) *ImageUpdate
- func (iu *ImageUpdate) SetReview(r *Review) *ImageUpdate
- func (iu *ImageUpdate) SetReviewID(id uuid.UUID) *ImageUpdate
- func (iu *ImageUpdate) Where(ps ...predicate.Image) *ImageUpdate
- type ImageUpdateOne
- func (iuo *ImageUpdateOne) ClearReview() *ImageUpdateOne
- func (iuo *ImageUpdateOne) Exec(ctx context.Context) error
- func (iuo *ImageUpdateOne) ExecX(ctx context.Context)
- func (iuo *ImageUpdateOne) Mutation() *ImageMutation
- func (iuo *ImageUpdateOne) Save(ctx context.Context) (*Image, error)
- func (iuo *ImageUpdateOne) SaveX(ctx context.Context) *Image
- func (iuo *ImageUpdateOne) Select(field string, fields ...string) *ImageUpdateOne
- func (iuo *ImageUpdateOne) SetImageHash(s string) *ImageUpdateOne
- func (iuo *ImageUpdateOne) SetReview(r *Review) *ImageUpdateOne
- func (iuo *ImageUpdateOne) SetReviewID(id uuid.UUID) *ImageUpdateOne
- func (iuo *ImageUpdateOne) Where(ps ...predicate.Image) *ImageUpdateOne
- type ImageUpsert
- type ImageUpsertBulk
- func (u *ImageUpsertBulk) DoNothing() *ImageUpsertBulk
- func (u *ImageUpsertBulk) Exec(ctx context.Context) error
- func (u *ImageUpsertBulk) ExecX(ctx context.Context)
- func (u *ImageUpsertBulk) Ignore() *ImageUpsertBulk
- func (u *ImageUpsertBulk) SetImageHash(v string) *ImageUpsertBulk
- func (u *ImageUpsertBulk) Update(set func(*ImageUpsert)) *ImageUpsertBulk
- func (u *ImageUpsertBulk) UpdateImageHash() *ImageUpsertBulk
- func (u *ImageUpsertBulk) UpdateNewValues() *ImageUpsertBulk
- type ImageUpsertOne
- func (u *ImageUpsertOne) DoNothing() *ImageUpsertOne
- func (u *ImageUpsertOne) Exec(ctx context.Context) error
- func (u *ImageUpsertOne) ExecX(ctx context.Context)
- func (u *ImageUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *ImageUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *ImageUpsertOne) Ignore() *ImageUpsertOne
- func (u *ImageUpsertOne) SetImageHash(v string) *ImageUpsertOne
- func (u *ImageUpsertOne) Update(set func(*ImageUpsert)) *ImageUpsertOne
- func (u *ImageUpsertOne) UpdateImageHash() *ImageUpsertOne
- func (u *ImageUpsertOne) UpdateNewValues() *ImageUpsertOne
- type Images
- type InterceptFunc
- type Interceptor
- type Location
- type LocationClient
- func (c *LocationClient) Create() *LocationCreate
- func (c *LocationClient) CreateBulk(builders ...*LocationCreate) *LocationCreateBulk
- func (c *LocationClient) Delete() *LocationDelete
- func (c *LocationClient) DeleteOne(l *Location) *LocationDeleteOne
- func (c *LocationClient) DeleteOneID(id uuid.UUID) *LocationDeleteOne
- func (c *LocationClient) Get(ctx context.Context, id uuid.UUID) (*Location, error)
- func (c *LocationClient) GetX(ctx context.Context, id uuid.UUID) *Location
- func (c *LocationClient) Hooks() []Hook
- func (c *LocationClient) Intercept(interceptors ...Interceptor)
- func (c *LocationClient) Interceptors() []Interceptor
- func (c *LocationClient) Query() *LocationQuery
- func (c *LocationClient) QueryOccurrences(l *Location) *OccurrenceQuery
- func (c *LocationClient) Update() *LocationUpdate
- func (c *LocationClient) UpdateOne(l *Location) *LocationUpdateOne
- func (c *LocationClient) UpdateOneID(id uuid.UUID) *LocationUpdateOne
- func (c *LocationClient) Use(hooks ...Hook)
- type LocationCreate
- func (lc *LocationCreate) AddOccurrenceIDs(ids ...uuid.UUID) *LocationCreate
- func (lc *LocationCreate) AddOccurrences(o ...*Occurrence) *LocationCreate
- func (lc *LocationCreate) Exec(ctx context.Context) error
- func (lc *LocationCreate) ExecX(ctx context.Context)
- func (lc *LocationCreate) Mutation() *LocationMutation
- func (lc *LocationCreate) OnConflict(opts ...sql.ConflictOption) *LocationUpsertOne
- func (lc *LocationCreate) OnConflictColumns(columns ...string) *LocationUpsertOne
- func (lc *LocationCreate) Save(ctx context.Context) (*Location, error)
- func (lc *LocationCreate) SaveX(ctx context.Context) *Location
- func (lc *LocationCreate) SetExternalID(i int) *LocationCreate
- func (lc *LocationCreate) SetID(u uuid.UUID) *LocationCreate
- func (lc *LocationCreate) SetName(s string) *LocationCreate
- func (lc *LocationCreate) SetNillableID(u *uuid.UUID) *LocationCreate
- func (lc *LocationCreate) SetNillableVisible(b *bool) *LocationCreate
- func (lc *LocationCreate) SetVisible(b bool) *LocationCreate
- type LocationCreateBulk
- func (lcb *LocationCreateBulk) Exec(ctx context.Context) error
- func (lcb *LocationCreateBulk) ExecX(ctx context.Context)
- func (lcb *LocationCreateBulk) OnConflict(opts ...sql.ConflictOption) *LocationUpsertBulk
- func (lcb *LocationCreateBulk) OnConflictColumns(columns ...string) *LocationUpsertBulk
- func (lcb *LocationCreateBulk) Save(ctx context.Context) ([]*Location, error)
- func (lcb *LocationCreateBulk) SaveX(ctx context.Context) []*Location
- type LocationDelete
- type LocationDeleteOne
- type LocationEdges
- type LocationGroupBy
- func (lgb *LocationGroupBy) Aggregate(fns ...AggregateFunc) *LocationGroupBy
- func (s *LocationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocationGroupBy) BoolX(ctx context.Context) bool
- func (s *LocationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LocationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LocationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocationGroupBy) Float64X(ctx context.Context) float64
- func (s *LocationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LocationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LocationGroupBy) IntX(ctx context.Context) int
- func (s *LocationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LocationGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LocationGroupBy) Scan(ctx context.Context, v any) error
- func (s *LocationGroupBy) ScanX(ctx context.Context, v any)
- func (s *LocationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LocationGroupBy) StringX(ctx context.Context) string
- func (s *LocationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LocationGroupBy) StringsX(ctx context.Context) []string
- type LocationMutation
- func (m *LocationMutation) AddExternalID(i int)
- func (m *LocationMutation) AddField(name string, value ent.Value) error
- func (m *LocationMutation) AddOccurrenceIDs(ids ...uuid.UUID)
- func (m *LocationMutation) AddedEdges() []string
- func (m *LocationMutation) AddedExternalID() (r int, exists bool)
- func (m *LocationMutation) AddedField(name string) (ent.Value, bool)
- func (m *LocationMutation) AddedFields() []string
- func (m *LocationMutation) AddedIDs(name string) []ent.Value
- func (m *LocationMutation) ClearEdge(name string) error
- func (m *LocationMutation) ClearField(name string) error
- func (m *LocationMutation) ClearOccurrences()
- func (m *LocationMutation) ClearedEdges() []string
- func (m *LocationMutation) ClearedFields() []string
- func (m LocationMutation) Client() *Client
- func (m *LocationMutation) EdgeCleared(name string) bool
- func (m *LocationMutation) ExternalID() (r int, exists bool)
- func (m *LocationMutation) Field(name string) (ent.Value, bool)
- func (m *LocationMutation) FieldCleared(name string) bool
- func (m *LocationMutation) Fields() []string
- func (m *LocationMutation) ID() (id uuid.UUID, exists bool)
- func (m *LocationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *LocationMutation) Name() (r string, exists bool)
- func (m *LocationMutation) OccurrencesCleared() bool
- func (m *LocationMutation) OccurrencesIDs() (ids []uuid.UUID)
- func (m *LocationMutation) OldExternalID(ctx context.Context) (v int, err error)
- func (m *LocationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LocationMutation) OldName(ctx context.Context) (v string, err error)
- func (m *LocationMutation) OldVisible(ctx context.Context) (v bool, err error)
- func (m *LocationMutation) Op() Op
- func (m *LocationMutation) RemoveOccurrenceIDs(ids ...uuid.UUID)
- func (m *LocationMutation) RemovedEdges() []string
- func (m *LocationMutation) RemovedIDs(name string) []ent.Value
- func (m *LocationMutation) RemovedOccurrencesIDs() (ids []uuid.UUID)
- func (m *LocationMutation) ResetEdge(name string) error
- func (m *LocationMutation) ResetExternalID()
- func (m *LocationMutation) ResetField(name string) error
- func (m *LocationMutation) ResetName()
- func (m *LocationMutation) ResetOccurrences()
- func (m *LocationMutation) ResetVisible()
- func (m *LocationMutation) SetExternalID(i int)
- func (m *LocationMutation) SetField(name string, value ent.Value) error
- func (m *LocationMutation) SetID(id uuid.UUID)
- func (m *LocationMutation) SetName(s string)
- func (m *LocationMutation) SetOp(op Op)
- func (m *LocationMutation) SetVisible(b bool)
- func (m LocationMutation) Tx() (*Tx, error)
- func (m *LocationMutation) Type() string
- func (m *LocationMutation) Visible() (r bool, exists bool)
- func (m *LocationMutation) Where(ps ...predicate.Location)
- func (m *LocationMutation) WhereP(ps ...func(*sql.Selector))
- type LocationQuery
- func (lq *LocationQuery) Aggregate(fns ...AggregateFunc) *LocationSelect
- func (lq *LocationQuery) All(ctx context.Context) ([]*Location, error)
- func (lq *LocationQuery) AllX(ctx context.Context) []*Location
- func (lq *LocationQuery) Clone() *LocationQuery
- func (lq *LocationQuery) Count(ctx context.Context) (int, error)
- func (lq *LocationQuery) CountX(ctx context.Context) int
- func (lq *LocationQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LocationQuery) ExistX(ctx context.Context) bool
- func (lq *LocationQuery) First(ctx context.Context) (*Location, error)
- func (lq *LocationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LocationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (lq *LocationQuery) FirstX(ctx context.Context) *Location
- func (lq *LocationQuery) GroupBy(field string, fields ...string) *LocationGroupBy
- func (lq *LocationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (lq *LocationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (lq *LocationQuery) Limit(limit int) *LocationQuery
- func (lq *LocationQuery) Offset(offset int) *LocationQuery
- func (lq *LocationQuery) Only(ctx context.Context) (*Location, error)
- func (lq *LocationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (lq *LocationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (lq *LocationQuery) OnlyX(ctx context.Context) *Location
- func (lq *LocationQuery) Order(o ...location.OrderOption) *LocationQuery
- func (lq *LocationQuery) QueryOccurrences() *OccurrenceQuery
- func (lq *LocationQuery) Select(fields ...string) *LocationSelect
- func (lq *LocationQuery) Unique(unique bool) *LocationQuery
- func (lq *LocationQuery) Where(ps ...predicate.Location) *LocationQuery
- func (lq *LocationQuery) WithOccurrences(opts ...func(*OccurrenceQuery)) *LocationQuery
- type LocationSelect
- func (ls *LocationSelect) Aggregate(fns ...AggregateFunc) *LocationSelect
- func (s *LocationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocationSelect) BoolX(ctx context.Context) bool
- func (s *LocationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LocationSelect) BoolsX(ctx context.Context) []bool
- func (s *LocationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocationSelect) Float64X(ctx context.Context) float64
- func (s *LocationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocationSelect) Float64sX(ctx context.Context) []float64
- func (s *LocationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LocationSelect) IntX(ctx context.Context) int
- func (s *LocationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LocationSelect) IntsX(ctx context.Context) []int
- func (ls *LocationSelect) Scan(ctx context.Context, v any) error
- func (s *LocationSelect) ScanX(ctx context.Context, v any)
- func (s *LocationSelect) String(ctx context.Context) (_ string, err error)
- func (s *LocationSelect) StringX(ctx context.Context) string
- func (s *LocationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LocationSelect) StringsX(ctx context.Context) []string
- type LocationUpdate
- func (lu *LocationUpdate) AddExternalID(i int) *LocationUpdate
- func (lu *LocationUpdate) AddOccurrenceIDs(ids ...uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) AddOccurrences(o ...*Occurrence) *LocationUpdate
- func (lu *LocationUpdate) ClearOccurrences() *LocationUpdate
- func (lu *LocationUpdate) Exec(ctx context.Context) error
- func (lu *LocationUpdate) ExecX(ctx context.Context)
- func (lu *LocationUpdate) Mutation() *LocationMutation
- func (lu *LocationUpdate) RemoveOccurrenceIDs(ids ...uuid.UUID) *LocationUpdate
- func (lu *LocationUpdate) RemoveOccurrences(o ...*Occurrence) *LocationUpdate
- func (lu *LocationUpdate) Save(ctx context.Context) (int, error)
- func (lu *LocationUpdate) SaveX(ctx context.Context) int
- func (lu *LocationUpdate) SetExternalID(i int) *LocationUpdate
- func (lu *LocationUpdate) SetName(s string) *LocationUpdate
- func (lu *LocationUpdate) SetNillableVisible(b *bool) *LocationUpdate
- func (lu *LocationUpdate) SetVisible(b bool) *LocationUpdate
- func (lu *LocationUpdate) Where(ps ...predicate.Location) *LocationUpdate
- type LocationUpdateOne
- func (luo *LocationUpdateOne) AddExternalID(i int) *LocationUpdateOne
- func (luo *LocationUpdateOne) AddOccurrenceIDs(ids ...uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) AddOccurrences(o ...*Occurrence) *LocationUpdateOne
- func (luo *LocationUpdateOne) ClearOccurrences() *LocationUpdateOne
- func (luo *LocationUpdateOne) Exec(ctx context.Context) error
- func (luo *LocationUpdateOne) ExecX(ctx context.Context)
- func (luo *LocationUpdateOne) Mutation() *LocationMutation
- func (luo *LocationUpdateOne) RemoveOccurrenceIDs(ids ...uuid.UUID) *LocationUpdateOne
- func (luo *LocationUpdateOne) RemoveOccurrences(o ...*Occurrence) *LocationUpdateOne
- func (luo *LocationUpdateOne) Save(ctx context.Context) (*Location, error)
- func (luo *LocationUpdateOne) SaveX(ctx context.Context) *Location
- func (luo *LocationUpdateOne) Select(field string, fields ...string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetExternalID(i int) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetName(s string) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetNillableVisible(b *bool) *LocationUpdateOne
- func (luo *LocationUpdateOne) SetVisible(b bool) *LocationUpdateOne
- func (luo *LocationUpdateOne) Where(ps ...predicate.Location) *LocationUpdateOne
- type LocationUpsert
- func (u *LocationUpsert) AddExternalID(v int) *LocationUpsert
- func (u *LocationUpsert) SetExternalID(v int) *LocationUpsert
- func (u *LocationUpsert) SetName(v string) *LocationUpsert
- func (u *LocationUpsert) SetVisible(v bool) *LocationUpsert
- func (u *LocationUpsert) UpdateExternalID() *LocationUpsert
- func (u *LocationUpsert) UpdateName() *LocationUpsert
- func (u *LocationUpsert) UpdateVisible() *LocationUpsert
- type LocationUpsertBulk
- func (u *LocationUpsertBulk) AddExternalID(v int) *LocationUpsertBulk
- func (u *LocationUpsertBulk) DoNothing() *LocationUpsertBulk
- func (u *LocationUpsertBulk) Exec(ctx context.Context) error
- func (u *LocationUpsertBulk) ExecX(ctx context.Context)
- func (u *LocationUpsertBulk) Ignore() *LocationUpsertBulk
- func (u *LocationUpsertBulk) SetExternalID(v int) *LocationUpsertBulk
- func (u *LocationUpsertBulk) SetName(v string) *LocationUpsertBulk
- func (u *LocationUpsertBulk) SetVisible(v bool) *LocationUpsertBulk
- func (u *LocationUpsertBulk) Update(set func(*LocationUpsert)) *LocationUpsertBulk
- func (u *LocationUpsertBulk) UpdateExternalID() *LocationUpsertBulk
- func (u *LocationUpsertBulk) UpdateName() *LocationUpsertBulk
- func (u *LocationUpsertBulk) UpdateNewValues() *LocationUpsertBulk
- func (u *LocationUpsertBulk) UpdateVisible() *LocationUpsertBulk
- type LocationUpsertOne
- func (u *LocationUpsertOne) AddExternalID(v int) *LocationUpsertOne
- func (u *LocationUpsertOne) DoNothing() *LocationUpsertOne
- func (u *LocationUpsertOne) Exec(ctx context.Context) error
- func (u *LocationUpsertOne) ExecX(ctx context.Context)
- func (u *LocationUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *LocationUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *LocationUpsertOne) Ignore() *LocationUpsertOne
- func (u *LocationUpsertOne) SetExternalID(v int) *LocationUpsertOne
- func (u *LocationUpsertOne) SetName(v string) *LocationUpsertOne
- func (u *LocationUpsertOne) SetVisible(v bool) *LocationUpsertOne
- func (u *LocationUpsertOne) Update(set func(*LocationUpsert)) *LocationUpsertOne
- func (u *LocationUpsertOne) UpdateExternalID() *LocationUpsertOne
- func (u *LocationUpsertOne) UpdateName() *LocationUpsertOne
- func (u *LocationUpsertOne) UpdateNewValues() *LocationUpsertOne
- func (u *LocationUpsertOne) UpdateVisible() *LocationUpsertOne
- type Locations
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Occurrence
- func (o *Occurrence) QueryDish() *DishQuery
- func (o *Occurrence) QueryLocation() *LocationQuery
- func (o *Occurrence) QueryReviews() *ReviewQuery
- func (o *Occurrence) QuerySideDishes() *DishQuery
- func (o *Occurrence) QueryTags() *TagQuery
- func (o *Occurrence) String() string
- func (o *Occurrence) Unwrap() *Occurrence
- func (o *Occurrence) Update() *OccurrenceUpdateOne
- func (o *Occurrence) Value(name string) (ent.Value, error)
- type OccurrenceClient
- func (c *OccurrenceClient) Create() *OccurrenceCreate
- func (c *OccurrenceClient) CreateBulk(builders ...*OccurrenceCreate) *OccurrenceCreateBulk
- func (c *OccurrenceClient) Delete() *OccurrenceDelete
- func (c *OccurrenceClient) DeleteOne(o *Occurrence) *OccurrenceDeleteOne
- func (c *OccurrenceClient) DeleteOneID(id uuid.UUID) *OccurrenceDeleteOne
- func (c *OccurrenceClient) Get(ctx context.Context, id uuid.UUID) (*Occurrence, error)
- func (c *OccurrenceClient) GetX(ctx context.Context, id uuid.UUID) *Occurrence
- func (c *OccurrenceClient) Hooks() []Hook
- func (c *OccurrenceClient) Intercept(interceptors ...Interceptor)
- func (c *OccurrenceClient) Interceptors() []Interceptor
- func (c *OccurrenceClient) Query() *OccurrenceQuery
- func (c *OccurrenceClient) QueryDish(o *Occurrence) *DishQuery
- func (c *OccurrenceClient) QueryLocation(o *Occurrence) *LocationQuery
- func (c *OccurrenceClient) QueryReviews(o *Occurrence) *ReviewQuery
- func (c *OccurrenceClient) QuerySideDishes(o *Occurrence) *DishQuery
- func (c *OccurrenceClient) QueryTags(o *Occurrence) *TagQuery
- func (c *OccurrenceClient) Update() *OccurrenceUpdate
- func (c *OccurrenceClient) UpdateOne(o *Occurrence) *OccurrenceUpdateOne
- func (c *OccurrenceClient) UpdateOneID(id uuid.UUID) *OccurrenceUpdateOne
- func (c *OccurrenceClient) Use(hooks ...Hook)
- type OccurrenceCreate
- func (oc *OccurrenceCreate) AddReviewIDs(ids ...uuid.UUID) *OccurrenceCreate
- func (oc *OccurrenceCreate) AddReviews(r ...*Review) *OccurrenceCreate
- func (oc *OccurrenceCreate) AddSideDishIDs(ids ...uuid.UUID) *OccurrenceCreate
- func (oc *OccurrenceCreate) AddSideDishes(d ...*Dish) *OccurrenceCreate
- func (oc *OccurrenceCreate) AddTagIDs(ids ...string) *OccurrenceCreate
- func (oc *OccurrenceCreate) AddTags(t ...*Tag) *OccurrenceCreate
- func (oc *OccurrenceCreate) Exec(ctx context.Context) error
- func (oc *OccurrenceCreate) ExecX(ctx context.Context)
- func (oc *OccurrenceCreate) Mutation() *OccurrenceMutation
- func (oc *OccurrenceCreate) OnConflict(opts ...sql.ConflictOption) *OccurrenceUpsertOne
- func (oc *OccurrenceCreate) OnConflictColumns(columns ...string) *OccurrenceUpsertOne
- func (oc *OccurrenceCreate) Save(ctx context.Context) (*Occurrence, error)
- func (oc *OccurrenceCreate) SaveX(ctx context.Context) *Occurrence
- func (oc *OccurrenceCreate) SetCarbohydrates(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetDate(t time.Time) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetDish(d *Dish) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetDishID(id uuid.UUID) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetFat(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetFiber(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetID(u uuid.UUID) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetKcal(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetKj(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetLocation(l *Location) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetLocationID(id uuid.UUID) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableCarbohydrates(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableDate(t *time.Time) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableFat(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableFiber(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableID(u *uuid.UUID) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableKcal(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableKj(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableNotAvailableAfter(t *time.Time) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillablePriceGuest(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillablePriceStaff(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillablePriceStudent(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableProtein(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableSalt(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableSaturatedFat(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNillableSugar(i *int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetNotAvailableAfter(t time.Time) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetPriceGuest(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetPriceStaff(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetPriceStudent(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetProtein(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetSalt(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetSaturatedFat(i int) *OccurrenceCreate
- func (oc *OccurrenceCreate) SetSugar(i int) *OccurrenceCreate
- type OccurrenceCreateBulk
- func (ocb *OccurrenceCreateBulk) Exec(ctx context.Context) error
- func (ocb *OccurrenceCreateBulk) ExecX(ctx context.Context)
- func (ocb *OccurrenceCreateBulk) OnConflict(opts ...sql.ConflictOption) *OccurrenceUpsertBulk
- func (ocb *OccurrenceCreateBulk) OnConflictColumns(columns ...string) *OccurrenceUpsertBulk
- func (ocb *OccurrenceCreateBulk) Save(ctx context.Context) ([]*Occurrence, error)
- func (ocb *OccurrenceCreateBulk) SaveX(ctx context.Context) []*Occurrence
- type OccurrenceDelete
- type OccurrenceDeleteOne
- type OccurrenceEdges
- type OccurrenceGroupBy
- func (ogb *OccurrenceGroupBy) Aggregate(fns ...AggregateFunc) *OccurrenceGroupBy
- func (s *OccurrenceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OccurrenceGroupBy) BoolX(ctx context.Context) bool
- func (s *OccurrenceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OccurrenceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OccurrenceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OccurrenceGroupBy) Float64X(ctx context.Context) float64
- func (s *OccurrenceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OccurrenceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OccurrenceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OccurrenceGroupBy) IntX(ctx context.Context) int
- func (s *OccurrenceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OccurrenceGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OccurrenceGroupBy) Scan(ctx context.Context, v any) error
- func (s *OccurrenceGroupBy) ScanX(ctx context.Context, v any)
- func (s *OccurrenceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OccurrenceGroupBy) StringX(ctx context.Context) string
- func (s *OccurrenceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OccurrenceGroupBy) StringsX(ctx context.Context) []string
- type OccurrenceMutation
- func (m *OccurrenceMutation) AddCarbohydrates(i int)
- func (m *OccurrenceMutation) AddFat(i int)
- func (m *OccurrenceMutation) AddFiber(i int)
- func (m *OccurrenceMutation) AddField(name string, value ent.Value) error
- func (m *OccurrenceMutation) AddKcal(i int)
- func (m *OccurrenceMutation) AddKj(i int)
- func (m *OccurrenceMutation) AddPriceGuest(i int)
- func (m *OccurrenceMutation) AddPriceStaff(i int)
- func (m *OccurrenceMutation) AddPriceStudent(i int)
- func (m *OccurrenceMutation) AddProtein(i int)
- func (m *OccurrenceMutation) AddReviewIDs(ids ...uuid.UUID)
- func (m *OccurrenceMutation) AddSalt(i int)
- func (m *OccurrenceMutation) AddSaturatedFat(i int)
- func (m *OccurrenceMutation) AddSideDishIDs(ids ...uuid.UUID)
- func (m *OccurrenceMutation) AddSugar(i int)
- func (m *OccurrenceMutation) AddTagIDs(ids ...string)
- func (m *OccurrenceMutation) AddedCarbohydrates() (r int, exists bool)
- func (m *OccurrenceMutation) AddedEdges() []string
- func (m *OccurrenceMutation) AddedFat() (r int, exists bool)
- func (m *OccurrenceMutation) AddedFiber() (r int, exists bool)
- func (m *OccurrenceMutation) AddedField(name string) (ent.Value, bool)
- func (m *OccurrenceMutation) AddedFields() []string
- func (m *OccurrenceMutation) AddedIDs(name string) []ent.Value
- func (m *OccurrenceMutation) AddedKcal() (r int, exists bool)
- func (m *OccurrenceMutation) AddedKj() (r int, exists bool)
- func (m *OccurrenceMutation) AddedPriceGuest() (r int, exists bool)
- func (m *OccurrenceMutation) AddedPriceStaff() (r int, exists bool)
- func (m *OccurrenceMutation) AddedPriceStudent() (r int, exists bool)
- func (m *OccurrenceMutation) AddedProtein() (r int, exists bool)
- func (m *OccurrenceMutation) AddedSalt() (r int, exists bool)
- func (m *OccurrenceMutation) AddedSaturatedFat() (r int, exists bool)
- func (m *OccurrenceMutation) AddedSugar() (r int, exists bool)
- func (m *OccurrenceMutation) Carbohydrates() (r int, exists bool)
- func (m *OccurrenceMutation) CarbohydratesCleared() bool
- func (m *OccurrenceMutation) ClearCarbohydrates()
- func (m *OccurrenceMutation) ClearDish()
- func (m *OccurrenceMutation) ClearEdge(name string) error
- func (m *OccurrenceMutation) ClearFat()
- func (m *OccurrenceMutation) ClearFiber()
- func (m *OccurrenceMutation) ClearField(name string) error
- func (m *OccurrenceMutation) ClearKcal()
- func (m *OccurrenceMutation) ClearKj()
- func (m *OccurrenceMutation) ClearLocation()
- func (m *OccurrenceMutation) ClearNotAvailableAfter()
- func (m *OccurrenceMutation) ClearPriceGuest()
- func (m *OccurrenceMutation) ClearPriceStaff()
- func (m *OccurrenceMutation) ClearPriceStudent()
- func (m *OccurrenceMutation) ClearProtein()
- func (m *OccurrenceMutation) ClearReviews()
- func (m *OccurrenceMutation) ClearSalt()
- func (m *OccurrenceMutation) ClearSaturatedFat()
- func (m *OccurrenceMutation) ClearSideDishes()
- func (m *OccurrenceMutation) ClearSugar()
- func (m *OccurrenceMutation) ClearTags()
- func (m *OccurrenceMutation) ClearedEdges() []string
- func (m *OccurrenceMutation) ClearedFields() []string
- func (m OccurrenceMutation) Client() *Client
- func (m *OccurrenceMutation) Date() (r time.Time, exists bool)
- func (m *OccurrenceMutation) DishCleared() bool
- func (m *OccurrenceMutation) DishID() (id uuid.UUID, exists bool)
- func (m *OccurrenceMutation) DishIDs() (ids []uuid.UUID)
- func (m *OccurrenceMutation) EdgeCleared(name string) bool
- func (m *OccurrenceMutation) Fat() (r int, exists bool)
- func (m *OccurrenceMutation) FatCleared() bool
- func (m *OccurrenceMutation) Fiber() (r int, exists bool)
- func (m *OccurrenceMutation) FiberCleared() bool
- func (m *OccurrenceMutation) Field(name string) (ent.Value, bool)
- func (m *OccurrenceMutation) FieldCleared(name string) bool
- func (m *OccurrenceMutation) Fields() []string
- func (m *OccurrenceMutation) ID() (id uuid.UUID, exists bool)
- func (m *OccurrenceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OccurrenceMutation) Kcal() (r int, exists bool)
- func (m *OccurrenceMutation) KcalCleared() bool
- func (m *OccurrenceMutation) Kj() (r int, exists bool)
- func (m *OccurrenceMutation) KjCleared() bool
- func (m *OccurrenceMutation) LocationCleared() bool
- func (m *OccurrenceMutation) LocationID() (id uuid.UUID, exists bool)
- func (m *OccurrenceMutation) LocationIDs() (ids []uuid.UUID)
- func (m *OccurrenceMutation) NotAvailableAfter() (r time.Time, exists bool)
- func (m *OccurrenceMutation) NotAvailableAfterCleared() bool
- func (m *OccurrenceMutation) OldCarbohydrates(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldDate(ctx context.Context) (v time.Time, err error)
- func (m *OccurrenceMutation) OldFat(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldFiber(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OccurrenceMutation) OldKcal(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldKj(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldNotAvailableAfter(ctx context.Context) (v *time.Time, err error)
- func (m *OccurrenceMutation) OldPriceGuest(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldPriceStaff(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldPriceStudent(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldProtein(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldSalt(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldSaturatedFat(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) OldSugar(ctx context.Context) (v *int, err error)
- func (m *OccurrenceMutation) Op() Op
- func (m *OccurrenceMutation) PriceGuest() (r int, exists bool)
- func (m *OccurrenceMutation) PriceGuestCleared() bool
- func (m *OccurrenceMutation) PriceStaff() (r int, exists bool)
- func (m *OccurrenceMutation) PriceStaffCleared() bool
- func (m *OccurrenceMutation) PriceStudent() (r int, exists bool)
- func (m *OccurrenceMutation) PriceStudentCleared() bool
- func (m *OccurrenceMutation) Protein() (r int, exists bool)
- func (m *OccurrenceMutation) ProteinCleared() bool
- func (m *OccurrenceMutation) RemoveReviewIDs(ids ...uuid.UUID)
- func (m *OccurrenceMutation) RemoveSideDishIDs(ids ...uuid.UUID)
- func (m *OccurrenceMutation) RemoveTagIDs(ids ...string)
- func (m *OccurrenceMutation) RemovedEdges() []string
- func (m *OccurrenceMutation) RemovedIDs(name string) []ent.Value
- func (m *OccurrenceMutation) RemovedReviewsIDs() (ids []uuid.UUID)
- func (m *OccurrenceMutation) RemovedSideDishesIDs() (ids []uuid.UUID)
- func (m *OccurrenceMutation) RemovedTagsIDs() (ids []string)
- func (m *OccurrenceMutation) ResetCarbohydrates()
- func (m *OccurrenceMutation) ResetDate()
- func (m *OccurrenceMutation) ResetDish()
- func (m *OccurrenceMutation) ResetEdge(name string) error
- func (m *OccurrenceMutation) ResetFat()
- func (m *OccurrenceMutation) ResetFiber()
- func (m *OccurrenceMutation) ResetField(name string) error
- func (m *OccurrenceMutation) ResetKcal()
- func (m *OccurrenceMutation) ResetKj()
- func (m *OccurrenceMutation) ResetLocation()
- func (m *OccurrenceMutation) ResetNotAvailableAfter()
- func (m *OccurrenceMutation) ResetPriceGuest()
- func (m *OccurrenceMutation) ResetPriceStaff()
- func (m *OccurrenceMutation) ResetPriceStudent()
- func (m *OccurrenceMutation) ResetProtein()
- func (m *OccurrenceMutation) ResetReviews()
- func (m *OccurrenceMutation) ResetSalt()
- func (m *OccurrenceMutation) ResetSaturatedFat()
- func (m *OccurrenceMutation) ResetSideDishes()
- func (m *OccurrenceMutation) ResetSugar()
- func (m *OccurrenceMutation) ResetTags()
- func (m *OccurrenceMutation) ReviewsCleared() bool
- func (m *OccurrenceMutation) ReviewsIDs() (ids []uuid.UUID)
- func (m *OccurrenceMutation) Salt() (r int, exists bool)
- func (m *OccurrenceMutation) SaltCleared() bool
- func (m *OccurrenceMutation) SaturatedFat() (r int, exists bool)
- func (m *OccurrenceMutation) SaturatedFatCleared() bool
- func (m *OccurrenceMutation) SetCarbohydrates(i int)
- func (m *OccurrenceMutation) SetDate(t time.Time)
- func (m *OccurrenceMutation) SetDishID(id uuid.UUID)
- func (m *OccurrenceMutation) SetFat(i int)
- func (m *OccurrenceMutation) SetFiber(i int)
- func (m *OccurrenceMutation) SetField(name string, value ent.Value) error
- func (m *OccurrenceMutation) SetID(id uuid.UUID)
- func (m *OccurrenceMutation) SetKcal(i int)
- func (m *OccurrenceMutation) SetKj(i int)
- func (m *OccurrenceMutation) SetLocationID(id uuid.UUID)
- func (m *OccurrenceMutation) SetNotAvailableAfter(t time.Time)
- func (m *OccurrenceMutation) SetOp(op Op)
- func (m *OccurrenceMutation) SetPriceGuest(i int)
- func (m *OccurrenceMutation) SetPriceStaff(i int)
- func (m *OccurrenceMutation) SetPriceStudent(i int)
- func (m *OccurrenceMutation) SetProtein(i int)
- func (m *OccurrenceMutation) SetSalt(i int)
- func (m *OccurrenceMutation) SetSaturatedFat(i int)
- func (m *OccurrenceMutation) SetSugar(i int)
- func (m *OccurrenceMutation) SideDishesCleared() bool
- func (m *OccurrenceMutation) SideDishesIDs() (ids []uuid.UUID)
- func (m *OccurrenceMutation) Sugar() (r int, exists bool)
- func (m *OccurrenceMutation) SugarCleared() bool
- func (m *OccurrenceMutation) TagsCleared() bool
- func (m *OccurrenceMutation) TagsIDs() (ids []string)
- func (m OccurrenceMutation) Tx() (*Tx, error)
- func (m *OccurrenceMutation) Type() string
- func (m *OccurrenceMutation) Where(ps ...predicate.Occurrence)
- func (m *OccurrenceMutation) WhereP(ps ...func(*sql.Selector))
- type OccurrenceQuery
- func (oq *OccurrenceQuery) Aggregate(fns ...AggregateFunc) *OccurrenceSelect
- func (oq *OccurrenceQuery) All(ctx context.Context) ([]*Occurrence, error)
- func (oq *OccurrenceQuery) AllX(ctx context.Context) []*Occurrence
- func (oq *OccurrenceQuery) Clone() *OccurrenceQuery
- func (oq *OccurrenceQuery) Count(ctx context.Context) (int, error)
- func (oq *OccurrenceQuery) CountX(ctx context.Context) int
- func (oq *OccurrenceQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OccurrenceQuery) ExistX(ctx context.Context) bool
- func (oq *OccurrenceQuery) First(ctx context.Context) (*Occurrence, error)
- func (oq *OccurrenceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OccurrenceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (oq *OccurrenceQuery) FirstX(ctx context.Context) *Occurrence
- func (oq *OccurrenceQuery) GroupBy(field string, fields ...string) *OccurrenceGroupBy
- func (oq *OccurrenceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (oq *OccurrenceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (oq *OccurrenceQuery) Limit(limit int) *OccurrenceQuery
- func (oq *OccurrenceQuery) Offset(offset int) *OccurrenceQuery
- func (oq *OccurrenceQuery) Only(ctx context.Context) (*Occurrence, error)
- func (oq *OccurrenceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OccurrenceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (oq *OccurrenceQuery) OnlyX(ctx context.Context) *Occurrence
- func (oq *OccurrenceQuery) Order(o ...occurrence.OrderOption) *OccurrenceQuery
- func (oq *OccurrenceQuery) QueryDish() *DishQuery
- func (oq *OccurrenceQuery) QueryLocation() *LocationQuery
- func (oq *OccurrenceQuery) QueryReviews() *ReviewQuery
- func (oq *OccurrenceQuery) QuerySideDishes() *DishQuery
- func (oq *OccurrenceQuery) QueryTags() *TagQuery
- func (oq *OccurrenceQuery) Select(fields ...string) *OccurrenceSelect
- func (oq *OccurrenceQuery) Unique(unique bool) *OccurrenceQuery
- func (oq *OccurrenceQuery) Where(ps ...predicate.Occurrence) *OccurrenceQuery
- func (oq *OccurrenceQuery) WithDish(opts ...func(*DishQuery)) *OccurrenceQuery
- func (oq *OccurrenceQuery) WithLocation(opts ...func(*LocationQuery)) *OccurrenceQuery
- func (oq *OccurrenceQuery) WithReviews(opts ...func(*ReviewQuery)) *OccurrenceQuery
- func (oq *OccurrenceQuery) WithSideDishes(opts ...func(*DishQuery)) *OccurrenceQuery
- func (oq *OccurrenceQuery) WithTags(opts ...func(*TagQuery)) *OccurrenceQuery
- type OccurrenceSelect
- func (os *OccurrenceSelect) Aggregate(fns ...AggregateFunc) *OccurrenceSelect
- func (s *OccurrenceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OccurrenceSelect) BoolX(ctx context.Context) bool
- func (s *OccurrenceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OccurrenceSelect) BoolsX(ctx context.Context) []bool
- func (s *OccurrenceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OccurrenceSelect) Float64X(ctx context.Context) float64
- func (s *OccurrenceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OccurrenceSelect) Float64sX(ctx context.Context) []float64
- func (s *OccurrenceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OccurrenceSelect) IntX(ctx context.Context) int
- func (s *OccurrenceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OccurrenceSelect) IntsX(ctx context.Context) []int
- func (os *OccurrenceSelect) Scan(ctx context.Context, v any) error
- func (s *OccurrenceSelect) ScanX(ctx context.Context, v any)
- func (s *OccurrenceSelect) String(ctx context.Context) (_ string, err error)
- func (s *OccurrenceSelect) StringX(ctx context.Context) string
- func (s *OccurrenceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OccurrenceSelect) StringsX(ctx context.Context) []string
- type OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddCarbohydrates(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddFat(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddFiber(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddKcal(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddKj(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddPriceGuest(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddPriceStaff(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddPriceStudent(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddProtein(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddReviewIDs(ids ...uuid.UUID) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddReviews(r ...*Review) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddSalt(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddSaturatedFat(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddSideDishes(d ...*Dish) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddSugar(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddTagIDs(ids ...string) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) AddTags(t ...*Tag) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearCarbohydrates() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearDish() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearFat() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearFiber() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearKcal() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearKj() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearLocation() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearNotAvailableAfter() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearPriceGuest() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearPriceStaff() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearPriceStudent() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearProtein() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearReviews() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearSalt() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearSaturatedFat() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearSideDishes() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearSugar() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) ClearTags() *OccurrenceUpdate
- func (ou *OccurrenceUpdate) Exec(ctx context.Context) error
- func (ou *OccurrenceUpdate) ExecX(ctx context.Context)
- func (ou *OccurrenceUpdate) Mutation() *OccurrenceMutation
- func (ou *OccurrenceUpdate) RemoveReviewIDs(ids ...uuid.UUID) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) RemoveReviews(r ...*Review) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) RemoveSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) RemoveSideDishes(d ...*Dish) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) RemoveTagIDs(ids ...string) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) RemoveTags(t ...*Tag) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) Save(ctx context.Context) (int, error)
- func (ou *OccurrenceUpdate) SaveX(ctx context.Context) int
- func (ou *OccurrenceUpdate) SetCarbohydrates(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetDate(t time.Time) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetDish(d *Dish) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetDishID(id uuid.UUID) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetFat(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetFiber(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetKcal(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetKj(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetLocation(l *Location) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetLocationID(id uuid.UUID) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableCarbohydrates(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableDate(t *time.Time) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableFat(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableFiber(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableKcal(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableKj(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableNotAvailableAfter(t *time.Time) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillablePriceGuest(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillablePriceStaff(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillablePriceStudent(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableProtein(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableSalt(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableSaturatedFat(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNillableSugar(i *int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetNotAvailableAfter(t time.Time) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetPriceGuest(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetPriceStaff(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetPriceStudent(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetProtein(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetSalt(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetSaturatedFat(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) SetSugar(i int) *OccurrenceUpdate
- func (ou *OccurrenceUpdate) Where(ps ...predicate.Occurrence) *OccurrenceUpdate
- type OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddCarbohydrates(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddFat(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddFiber(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddKcal(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddKj(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddPriceGuest(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddPriceStaff(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddPriceStudent(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddProtein(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddReviewIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddReviews(r ...*Review) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddSalt(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddSaturatedFat(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddSideDishes(d ...*Dish) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddSugar(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddTagIDs(ids ...string) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) AddTags(t ...*Tag) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearCarbohydrates() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearDish() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearFat() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearFiber() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearKcal() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearKj() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearLocation() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearNotAvailableAfter() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearPriceGuest() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearPriceStaff() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearPriceStudent() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearProtein() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearReviews() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearSalt() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearSaturatedFat() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearSideDishes() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearSugar() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) ClearTags() *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) Exec(ctx context.Context) error
- func (ouo *OccurrenceUpdateOne) ExecX(ctx context.Context)
- func (ouo *OccurrenceUpdateOne) Mutation() *OccurrenceMutation
- func (ouo *OccurrenceUpdateOne) RemoveReviewIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) RemoveReviews(r ...*Review) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) RemoveSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) RemoveSideDishes(d ...*Dish) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) RemoveTagIDs(ids ...string) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) RemoveTags(t ...*Tag) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) Save(ctx context.Context) (*Occurrence, error)
- func (ouo *OccurrenceUpdateOne) SaveX(ctx context.Context) *Occurrence
- func (ouo *OccurrenceUpdateOne) Select(field string, fields ...string) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetCarbohydrates(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetDate(t time.Time) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetDish(d *Dish) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetDishID(id uuid.UUID) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetFat(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetFiber(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetKcal(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetKj(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetLocation(l *Location) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetLocationID(id uuid.UUID) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableCarbohydrates(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableDate(t *time.Time) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableFat(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableFiber(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableKcal(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableKj(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableNotAvailableAfter(t *time.Time) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillablePriceGuest(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillablePriceStaff(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillablePriceStudent(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableProtein(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableSalt(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableSaturatedFat(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNillableSugar(i *int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetNotAvailableAfter(t time.Time) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetPriceGuest(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetPriceStaff(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetPriceStudent(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetProtein(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetSalt(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetSaturatedFat(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) SetSugar(i int) *OccurrenceUpdateOne
- func (ouo *OccurrenceUpdateOne) Where(ps ...predicate.Occurrence) *OccurrenceUpdateOne
- type OccurrenceUpsert
- func (u *OccurrenceUpsert) AddCarbohydrates(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddFat(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddFiber(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddKcal(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddKj(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddPriceGuest(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddPriceStaff(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddPriceStudent(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddProtein(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddSalt(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddSaturatedFat(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) AddSugar(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearCarbohydrates() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearFat() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearFiber() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearKcal() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearKj() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearNotAvailableAfter() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearPriceGuest() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearPriceStaff() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearPriceStudent() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearProtein() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearSalt() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearSaturatedFat() *OccurrenceUpsert
- func (u *OccurrenceUpsert) ClearSugar() *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetCarbohydrates(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetDate(v time.Time) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetFat(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetFiber(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetKcal(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetKj(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetNotAvailableAfter(v time.Time) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetPriceGuest(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetPriceStaff(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetPriceStudent(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetProtein(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetSalt(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetSaturatedFat(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) SetSugar(v int) *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateCarbohydrates() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateDate() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateFat() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateFiber() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateKcal() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateKj() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateNotAvailableAfter() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdatePriceGuest() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdatePriceStaff() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdatePriceStudent() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateProtein() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateSalt() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateSaturatedFat() *OccurrenceUpsert
- func (u *OccurrenceUpsert) UpdateSugar() *OccurrenceUpsert
- type OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddCarbohydrates(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddFat(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddFiber(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddKcal(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddKj(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddPriceGuest(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddPriceStaff(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddPriceStudent(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddProtein(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddSalt(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddSaturatedFat(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) AddSugar(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearCarbohydrates() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearFat() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearFiber() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearKcal() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearKj() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearNotAvailableAfter() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearPriceGuest() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearPriceStaff() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearPriceStudent() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearProtein() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearSalt() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearSaturatedFat() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) ClearSugar() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) DoNothing() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) Exec(ctx context.Context) error
- func (u *OccurrenceUpsertBulk) ExecX(ctx context.Context)
- func (u *OccurrenceUpsertBulk) Ignore() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetCarbohydrates(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetDate(v time.Time) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetFat(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetFiber(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetKcal(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetKj(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetNotAvailableAfter(v time.Time) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetPriceGuest(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetPriceStaff(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetPriceStudent(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetProtein(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetSalt(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetSaturatedFat(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) SetSugar(v int) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) Update(set func(*OccurrenceUpsert)) *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateCarbohydrates() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateDate() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateFat() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateFiber() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateKcal() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateKj() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateNewValues() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateNotAvailableAfter() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdatePriceGuest() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdatePriceStaff() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdatePriceStudent() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateProtein() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateSalt() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateSaturatedFat() *OccurrenceUpsertBulk
- func (u *OccurrenceUpsertBulk) UpdateSugar() *OccurrenceUpsertBulk
- type OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddCarbohydrates(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddFat(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddFiber(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddKcal(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddKj(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddPriceGuest(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddPriceStaff(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddPriceStudent(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddProtein(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddSalt(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddSaturatedFat(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) AddSugar(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearCarbohydrates() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearFat() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearFiber() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearKcal() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearKj() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearNotAvailableAfter() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearPriceGuest() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearPriceStaff() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearPriceStudent() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearProtein() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearSalt() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearSaturatedFat() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) ClearSugar() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) DoNothing() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) Exec(ctx context.Context) error
- func (u *OccurrenceUpsertOne) ExecX(ctx context.Context)
- func (u *OccurrenceUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *OccurrenceUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *OccurrenceUpsertOne) Ignore() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetCarbohydrates(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetDate(v time.Time) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetFat(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetFiber(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetKcal(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetKj(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetNotAvailableAfter(v time.Time) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetPriceGuest(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetPriceStaff(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetPriceStudent(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetProtein(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetSalt(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetSaturatedFat(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) SetSugar(v int) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) Update(set func(*OccurrenceUpsert)) *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateCarbohydrates() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateDate() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateFat() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateFiber() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateKcal() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateKj() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateNewValues() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateNotAvailableAfter() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdatePriceGuest() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdatePriceStaff() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdatePriceStudent() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateProtein() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateSalt() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateSaturatedFat() *OccurrenceUpsertOne
- func (u *OccurrenceUpsertOne) UpdateSugar() *OccurrenceUpsertOne
- type Occurrences
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Review
- type ReviewClient
- func (c *ReviewClient) Create() *ReviewCreate
- func (c *ReviewClient) CreateBulk(builders ...*ReviewCreate) *ReviewCreateBulk
- func (c *ReviewClient) Delete() *ReviewDelete
- func (c *ReviewClient) DeleteOne(r *Review) *ReviewDeleteOne
- func (c *ReviewClient) DeleteOneID(id uuid.UUID) *ReviewDeleteOne
- func (c *ReviewClient) Get(ctx context.Context, id uuid.UUID) (*Review, error)
- func (c *ReviewClient) GetX(ctx context.Context, id uuid.UUID) *Review
- func (c *ReviewClient) Hooks() []Hook
- func (c *ReviewClient) Intercept(interceptors ...Interceptor)
- func (c *ReviewClient) Interceptors() []Interceptor
- func (c *ReviewClient) Query() *ReviewQuery
- func (c *ReviewClient) QueryImages(r *Review) *ImageQuery
- func (c *ReviewClient) QueryOccurrence(r *Review) *OccurrenceQuery
- func (c *ReviewClient) Update() *ReviewUpdate
- func (c *ReviewClient) UpdateOne(r *Review) *ReviewUpdateOne
- func (c *ReviewClient) UpdateOneID(id uuid.UUID) *ReviewUpdateOne
- func (c *ReviewClient) Use(hooks ...Hook)
- type ReviewCreate
- func (rc *ReviewCreate) AddImageIDs(ids ...uuid.UUID) *ReviewCreate
- func (rc *ReviewCreate) AddImages(i ...*Image) *ReviewCreate
- func (rc *ReviewCreate) Exec(ctx context.Context) error
- func (rc *ReviewCreate) ExecX(ctx context.Context)
- func (rc *ReviewCreate) Mutation() *ReviewMutation
- func (rc *ReviewCreate) OnConflict(opts ...sql.ConflictOption) *ReviewUpsertOne
- func (rc *ReviewCreate) OnConflictColumns(columns ...string) *ReviewUpsertOne
- func (rc *ReviewCreate) Save(ctx context.Context) (*Review, error)
- func (rc *ReviewCreate) SaveX(ctx context.Context) *Review
- func (rc *ReviewCreate) SetAcceptedAt(t time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetCreatedAt(t time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetDisplayName(s string) *ReviewCreate
- func (rc *ReviewCreate) SetID(u uuid.UUID) *ReviewCreate
- func (rc *ReviewCreate) SetNillableAcceptedAt(t *time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetNillableCreatedAt(t *time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetNillableDisplayName(s *string) *ReviewCreate
- func (rc *ReviewCreate) SetNillableID(u *uuid.UUID) *ReviewCreate
- func (rc *ReviewCreate) SetNillableText(s *string) *ReviewCreate
- func (rc *ReviewCreate) SetNillableUpdatedAt(t *time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetOccurrence(o *Occurrence) *ReviewCreate
- func (rc *ReviewCreate) SetOccurrenceID(id uuid.UUID) *ReviewCreate
- func (rc *ReviewCreate) SetStars(i int) *ReviewCreate
- func (rc *ReviewCreate) SetText(s string) *ReviewCreate
- func (rc *ReviewCreate) SetUpdatedAt(t time.Time) *ReviewCreate
- type ReviewCreateBulk
- func (rcb *ReviewCreateBulk) Exec(ctx context.Context) error
- func (rcb *ReviewCreateBulk) ExecX(ctx context.Context)
- func (rcb *ReviewCreateBulk) OnConflict(opts ...sql.ConflictOption) *ReviewUpsertBulk
- func (rcb *ReviewCreateBulk) OnConflictColumns(columns ...string) *ReviewUpsertBulk
- func (rcb *ReviewCreateBulk) Save(ctx context.Context) ([]*Review, error)
- func (rcb *ReviewCreateBulk) SaveX(ctx context.Context) []*Review
- type ReviewDelete
- type ReviewDeleteOne
- type ReviewEdges
- type ReviewGroupBy
- func (rgb *ReviewGroupBy) Aggregate(fns ...AggregateFunc) *ReviewGroupBy
- func (s *ReviewGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReviewGroupBy) BoolX(ctx context.Context) bool
- func (s *ReviewGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReviewGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReviewGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReviewGroupBy) Float64X(ctx context.Context) float64
- func (s *ReviewGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReviewGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReviewGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReviewGroupBy) IntX(ctx context.Context) int
- func (s *ReviewGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReviewGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReviewGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReviewGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReviewGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReviewGroupBy) StringX(ctx context.Context) string
- func (s *ReviewGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReviewGroupBy) StringsX(ctx context.Context) []string
- type ReviewMutation
- func (m *ReviewMutation) AcceptedAt() (r time.Time, exists bool)
- func (m *ReviewMutation) AcceptedAtCleared() bool
- func (m *ReviewMutation) AddField(name string, value ent.Value) error
- func (m *ReviewMutation) AddImageIDs(ids ...uuid.UUID)
- func (m *ReviewMutation) AddStars(i int)
- func (m *ReviewMutation) AddedEdges() []string
- func (m *ReviewMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReviewMutation) AddedFields() []string
- func (m *ReviewMutation) AddedIDs(name string) []ent.Value
- func (m *ReviewMutation) AddedStars() (r int, exists bool)
- func (m *ReviewMutation) ClearAcceptedAt()
- func (m *ReviewMutation) ClearDisplayName()
- func (m *ReviewMutation) ClearEdge(name string) error
- func (m *ReviewMutation) ClearField(name string) error
- func (m *ReviewMutation) ClearImages()
- func (m *ReviewMutation) ClearOccurrence()
- func (m *ReviewMutation) ClearText()
- func (m *ReviewMutation) ClearedEdges() []string
- func (m *ReviewMutation) ClearedFields() []string
- func (m ReviewMutation) Client() *Client
- func (m *ReviewMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ReviewMutation) DisplayName() (r string, exists bool)
- func (m *ReviewMutation) DisplayNameCleared() bool
- func (m *ReviewMutation) EdgeCleared(name string) bool
- func (m *ReviewMutation) Field(name string) (ent.Value, bool)
- func (m *ReviewMutation) FieldCleared(name string) bool
- func (m *ReviewMutation) Fields() []string
- func (m *ReviewMutation) ID() (id uuid.UUID, exists bool)
- func (m *ReviewMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ReviewMutation) ImagesCleared() bool
- func (m *ReviewMutation) ImagesIDs() (ids []uuid.UUID)
- func (m *ReviewMutation) OccurrenceCleared() bool
- func (m *ReviewMutation) OccurrenceID() (id uuid.UUID, exists bool)
- func (m *ReviewMutation) OccurrenceIDs() (ids []uuid.UUID)
- func (m *ReviewMutation) OldAcceptedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ReviewMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReviewMutation) OldDisplayName(ctx context.Context) (v *string, err error)
- func (m *ReviewMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReviewMutation) OldStars(ctx context.Context) (v int, err error)
- func (m *ReviewMutation) OldText(ctx context.Context) (v *string, err error)
- func (m *ReviewMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReviewMutation) Op() Op
- func (m *ReviewMutation) RemoveImageIDs(ids ...uuid.UUID)
- func (m *ReviewMutation) RemovedEdges() []string
- func (m *ReviewMutation) RemovedIDs(name string) []ent.Value
- func (m *ReviewMutation) RemovedImagesIDs() (ids []uuid.UUID)
- func (m *ReviewMutation) ResetAcceptedAt()
- func (m *ReviewMutation) ResetCreatedAt()
- func (m *ReviewMutation) ResetDisplayName()
- func (m *ReviewMutation) ResetEdge(name string) error
- func (m *ReviewMutation) ResetField(name string) error
- func (m *ReviewMutation) ResetImages()
- func (m *ReviewMutation) ResetOccurrence()
- func (m *ReviewMutation) ResetStars()
- func (m *ReviewMutation) ResetText()
- func (m *ReviewMutation) ResetUpdatedAt()
- func (m *ReviewMutation) SetAcceptedAt(t time.Time)
- func (m *ReviewMutation) SetCreatedAt(t time.Time)
- func (m *ReviewMutation) SetDisplayName(s string)
- func (m *ReviewMutation) SetField(name string, value ent.Value) error
- func (m *ReviewMutation) SetID(id uuid.UUID)
- func (m *ReviewMutation) SetOccurrenceID(id uuid.UUID)
- func (m *ReviewMutation) SetOp(op Op)
- func (m *ReviewMutation) SetStars(i int)
- func (m *ReviewMutation) SetText(s string)
- func (m *ReviewMutation) SetUpdatedAt(t time.Time)
- func (m *ReviewMutation) Stars() (r int, exists bool)
- func (m *ReviewMutation) Text() (r string, exists bool)
- func (m *ReviewMutation) TextCleared() bool
- func (m ReviewMutation) Tx() (*Tx, error)
- func (m *ReviewMutation) Type() string
- func (m *ReviewMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ReviewMutation) Where(ps ...predicate.Review)
- func (m *ReviewMutation) WhereP(ps ...func(*sql.Selector))
- type ReviewQuery
- func (rq *ReviewQuery) Aggregate(fns ...AggregateFunc) *ReviewSelect
- func (rq *ReviewQuery) All(ctx context.Context) ([]*Review, error)
- func (rq *ReviewQuery) AllX(ctx context.Context) []*Review
- func (rq *ReviewQuery) Clone() *ReviewQuery
- func (rq *ReviewQuery) Count(ctx context.Context) (int, error)
- func (rq *ReviewQuery) CountX(ctx context.Context) int
- func (rq *ReviewQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReviewQuery) ExistX(ctx context.Context) bool
- func (rq *ReviewQuery) First(ctx context.Context) (*Review, error)
- func (rq *ReviewQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReviewQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *ReviewQuery) FirstX(ctx context.Context) *Review
- func (rq *ReviewQuery) GroupBy(field string, fields ...string) *ReviewGroupBy
- func (rq *ReviewQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (rq *ReviewQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *ReviewQuery) Limit(limit int) *ReviewQuery
- func (rq *ReviewQuery) Offset(offset int) *ReviewQuery
- func (rq *ReviewQuery) Only(ctx context.Context) (*Review, error)
- func (rq *ReviewQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReviewQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *ReviewQuery) OnlyX(ctx context.Context) *Review
- func (rq *ReviewQuery) Order(o ...review.OrderOption) *ReviewQuery
- func (rq *ReviewQuery) QueryImages() *ImageQuery
- func (rq *ReviewQuery) QueryOccurrence() *OccurrenceQuery
- func (rq *ReviewQuery) Select(fields ...string) *ReviewSelect
- func (rq *ReviewQuery) Unique(unique bool) *ReviewQuery
- func (rq *ReviewQuery) Where(ps ...predicate.Review) *ReviewQuery
- func (rq *ReviewQuery) WithImages(opts ...func(*ImageQuery)) *ReviewQuery
- func (rq *ReviewQuery) WithOccurrence(opts ...func(*OccurrenceQuery)) *ReviewQuery
- type ReviewSelect
- func (rs *ReviewSelect) Aggregate(fns ...AggregateFunc) *ReviewSelect
- func (s *ReviewSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReviewSelect) BoolX(ctx context.Context) bool
- func (s *ReviewSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReviewSelect) BoolsX(ctx context.Context) []bool
- func (s *ReviewSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReviewSelect) Float64X(ctx context.Context) float64
- func (s *ReviewSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReviewSelect) Float64sX(ctx context.Context) []float64
- func (s *ReviewSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReviewSelect) IntX(ctx context.Context) int
- func (s *ReviewSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReviewSelect) IntsX(ctx context.Context) []int
- func (rs *ReviewSelect) Scan(ctx context.Context, v any) error
- func (s *ReviewSelect) ScanX(ctx context.Context, v any)
- func (s *ReviewSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReviewSelect) StringX(ctx context.Context) string
- func (s *ReviewSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReviewSelect) StringsX(ctx context.Context) []string
- type ReviewUpdate
- func (ru *ReviewUpdate) AddImageIDs(ids ...uuid.UUID) *ReviewUpdate
- func (ru *ReviewUpdate) AddImages(i ...*Image) *ReviewUpdate
- func (ru *ReviewUpdate) AddStars(i int) *ReviewUpdate
- func (ru *ReviewUpdate) ClearAcceptedAt() *ReviewUpdate
- func (ru *ReviewUpdate) ClearDisplayName() *ReviewUpdate
- func (ru *ReviewUpdate) ClearImages() *ReviewUpdate
- func (ru *ReviewUpdate) ClearOccurrence() *ReviewUpdate
- func (ru *ReviewUpdate) ClearText() *ReviewUpdate
- func (ru *ReviewUpdate) Exec(ctx context.Context) error
- func (ru *ReviewUpdate) ExecX(ctx context.Context)
- func (ru *ReviewUpdate) Mutation() *ReviewMutation
- func (ru *ReviewUpdate) RemoveImageIDs(ids ...uuid.UUID) *ReviewUpdate
- func (ru *ReviewUpdate) RemoveImages(i ...*Image) *ReviewUpdate
- func (ru *ReviewUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReviewUpdate) SaveX(ctx context.Context) int
- func (ru *ReviewUpdate) SetAcceptedAt(t time.Time) *ReviewUpdate
- func (ru *ReviewUpdate) SetDisplayName(s string) *ReviewUpdate
- func (ru *ReviewUpdate) SetNillableAcceptedAt(t *time.Time) *ReviewUpdate
- func (ru *ReviewUpdate) SetNillableDisplayName(s *string) *ReviewUpdate
- func (ru *ReviewUpdate) SetNillableText(s *string) *ReviewUpdate
- func (ru *ReviewUpdate) SetOccurrence(o *Occurrence) *ReviewUpdate
- func (ru *ReviewUpdate) SetOccurrenceID(id uuid.UUID) *ReviewUpdate
- func (ru *ReviewUpdate) SetStars(i int) *ReviewUpdate
- func (ru *ReviewUpdate) SetText(s string) *ReviewUpdate
- func (ru *ReviewUpdate) SetUpdatedAt(t time.Time) *ReviewUpdate
- func (ru *ReviewUpdate) Where(ps ...predicate.Review) *ReviewUpdate
- type ReviewUpdateOne
- func (ruo *ReviewUpdateOne) AddImageIDs(ids ...uuid.UUID) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) AddImages(i ...*Image) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) AddStars(i int) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) ClearAcceptedAt() *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) ClearDisplayName() *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) ClearImages() *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) ClearOccurrence() *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) ClearText() *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReviewUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReviewUpdateOne) Mutation() *ReviewMutation
- func (ruo *ReviewUpdateOne) RemoveImageIDs(ids ...uuid.UUID) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) RemoveImages(i ...*Image) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) Save(ctx context.Context) (*Review, error)
- func (ruo *ReviewUpdateOne) SaveX(ctx context.Context) *Review
- func (ruo *ReviewUpdateOne) Select(field string, fields ...string) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetAcceptedAt(t time.Time) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetDisplayName(s string) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetNillableAcceptedAt(t *time.Time) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetNillableDisplayName(s *string) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetNillableText(s *string) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetOccurrence(o *Occurrence) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetOccurrenceID(id uuid.UUID) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetStars(i int) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetText(s string) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetUpdatedAt(t time.Time) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) Where(ps ...predicate.Review) *ReviewUpdateOne
- type ReviewUpsert
- func (u *ReviewUpsert) AddStars(v int) *ReviewUpsert
- func (u *ReviewUpsert) ClearAcceptedAt() *ReviewUpsert
- func (u *ReviewUpsert) ClearDisplayName() *ReviewUpsert
- func (u *ReviewUpsert) ClearText() *ReviewUpsert
- func (u *ReviewUpsert) SetAcceptedAt(v time.Time) *ReviewUpsert
- func (u *ReviewUpsert) SetDisplayName(v string) *ReviewUpsert
- func (u *ReviewUpsert) SetStars(v int) *ReviewUpsert
- func (u *ReviewUpsert) SetText(v string) *ReviewUpsert
- func (u *ReviewUpsert) SetUpdatedAt(v time.Time) *ReviewUpsert
- func (u *ReviewUpsert) UpdateAcceptedAt() *ReviewUpsert
- func (u *ReviewUpsert) UpdateDisplayName() *ReviewUpsert
- func (u *ReviewUpsert) UpdateStars() *ReviewUpsert
- func (u *ReviewUpsert) UpdateText() *ReviewUpsert
- func (u *ReviewUpsert) UpdateUpdatedAt() *ReviewUpsert
- type ReviewUpsertBulk
- func (u *ReviewUpsertBulk) AddStars(v int) *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) ClearAcceptedAt() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) ClearDisplayName() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) ClearText() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) DoNothing() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) Exec(ctx context.Context) error
- func (u *ReviewUpsertBulk) ExecX(ctx context.Context)
- func (u *ReviewUpsertBulk) Ignore() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) SetAcceptedAt(v time.Time) *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) SetDisplayName(v string) *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) SetStars(v int) *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) SetText(v string) *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) SetUpdatedAt(v time.Time) *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) Update(set func(*ReviewUpsert)) *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) UpdateAcceptedAt() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) UpdateDisplayName() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) UpdateNewValues() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) UpdateStars() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) UpdateText() *ReviewUpsertBulk
- func (u *ReviewUpsertBulk) UpdateUpdatedAt() *ReviewUpsertBulk
- type ReviewUpsertOne
- func (u *ReviewUpsertOne) AddStars(v int) *ReviewUpsertOne
- func (u *ReviewUpsertOne) ClearAcceptedAt() *ReviewUpsertOne
- func (u *ReviewUpsertOne) ClearDisplayName() *ReviewUpsertOne
- func (u *ReviewUpsertOne) ClearText() *ReviewUpsertOne
- func (u *ReviewUpsertOne) DoNothing() *ReviewUpsertOne
- func (u *ReviewUpsertOne) Exec(ctx context.Context) error
- func (u *ReviewUpsertOne) ExecX(ctx context.Context)
- func (u *ReviewUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *ReviewUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *ReviewUpsertOne) Ignore() *ReviewUpsertOne
- func (u *ReviewUpsertOne) SetAcceptedAt(v time.Time) *ReviewUpsertOne
- func (u *ReviewUpsertOne) SetDisplayName(v string) *ReviewUpsertOne
- func (u *ReviewUpsertOne) SetStars(v int) *ReviewUpsertOne
- func (u *ReviewUpsertOne) SetText(v string) *ReviewUpsertOne
- func (u *ReviewUpsertOne) SetUpdatedAt(v time.Time) *ReviewUpsertOne
- func (u *ReviewUpsertOne) Update(set func(*ReviewUpsert)) *ReviewUpsertOne
- func (u *ReviewUpsertOne) UpdateAcceptedAt() *ReviewUpsertOne
- func (u *ReviewUpsertOne) UpdateDisplayName() *ReviewUpsertOne
- func (u *ReviewUpsertOne) UpdateNewValues() *ReviewUpsertOne
- func (u *ReviewUpsertOne) UpdateStars() *ReviewUpsertOne
- func (u *ReviewUpsertOne) UpdateText() *ReviewUpsertOne
- func (u *ReviewUpsertOne) UpdateUpdatedAt() *ReviewUpsertOne
- type Reviews
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- 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 string) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id string) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id string) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryOccurrence(t *Tag) *OccurrenceQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id string) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddOccurrence(o ...*Occurrence) *TagCreate
- func (tc *TagCreate) AddOccurrenceIDs(ids ...uuid.UUID) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
- func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetDescription(s string) *TagCreate
- func (tc *TagCreate) SetID(s string) *TagCreate
- func (tc *TagCreate) SetIsAllergy(b bool) *TagCreate
- func (tc *TagCreate) SetName(s string) *TagCreate
- func (tc *TagCreate) SetNillableIsAllergy(b *bool) *TagCreate
- func (tc *TagCreate) SetNillablePriority(sp *schema.TagPriority) *TagCreate
- func (tc *TagCreate) SetNillableShortName(s *string) *TagCreate
- func (tc *TagCreate) SetPriority(sp schema.TagPriority) *TagCreate
- func (tc *TagCreate) SetShortName(s string) *TagCreate
- type TagCreateBulk
- func (tcb *TagCreateBulk) Exec(ctx context.Context) error
- func (tcb *TagCreateBulk) ExecX(ctx context.Context)
- func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
- func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
- func (tcb *TagCreateBulk) Save(ctx context.Context) ([]*Tag, error)
- func (tcb *TagCreateBulk) SaveX(ctx context.Context) []*Tag
- 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) AddOccurrenceIDs(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) ClearOccurrence()
- func (m *TagMutation) ClearShortName()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) Description() (r string, exists bool)
- 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) ID() (id string, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]string, error)
- func (m *TagMutation) IsAllergy() (r bool, exists bool)
- func (m *TagMutation) Name() (r string, exists bool)
- func (m *TagMutation) OccurrenceCleared() bool
- func (m *TagMutation) OccurrenceIDs() (ids []uuid.UUID)
- func (m *TagMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldIsAllergy(ctx context.Context) (v bool, err error)
- func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldPriority(ctx context.Context) (v schema.TagPriority, err error)
- func (m *TagMutation) OldShortName(ctx context.Context) (v *string, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) Priority() (r schema.TagPriority, exists bool)
- func (m *TagMutation) RemoveOccurrenceIDs(ids ...uuid.UUID)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedOccurrenceIDs() (ids []uuid.UUID)
- func (m *TagMutation) ResetDescription()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetIsAllergy()
- func (m *TagMutation) ResetName()
- func (m *TagMutation) ResetOccurrence()
- func (m *TagMutation) ResetPriority()
- func (m *TagMutation) ResetShortName()
- func (m *TagMutation) SetDescription(s string)
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetID(id string)
- func (m *TagMutation) SetIsAllergy(b bool)
- func (m *TagMutation) SetName(s string)
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetPriority(sp schema.TagPriority)
- func (m *TagMutation) SetShortName(s string)
- func (m *TagMutation) ShortName() (r string, exists bool)
- func (m *TagMutation) ShortNameCleared() 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 string, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) string
- 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 []string, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []string
- 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 string, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) string
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (tq *TagQuery) QueryOccurrence() *OccurrenceQuery
- 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) WithOccurrence(opts ...func(*OccurrenceQuery)) *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) AddOccurrence(o ...*Occurrence) *TagUpdate
- func (tu *TagUpdate) AddOccurrenceIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) ClearOccurrence() *TagUpdate
- func (tu *TagUpdate) ClearShortName() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveOccurrence(o ...*Occurrence) *TagUpdate
- func (tu *TagUpdate) RemoveOccurrenceIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetDescription(s string) *TagUpdate
- func (tu *TagUpdate) SetIsAllergy(b bool) *TagUpdate
- func (tu *TagUpdate) SetName(s string) *TagUpdate
- func (tu *TagUpdate) SetNillableIsAllergy(b *bool) *TagUpdate
- func (tu *TagUpdate) SetNillablePriority(sp *schema.TagPriority) *TagUpdate
- func (tu *TagUpdate) SetNillableShortName(s *string) *TagUpdate
- func (tu *TagUpdate) SetPriority(sp schema.TagPriority) *TagUpdate
- func (tu *TagUpdate) SetShortName(s string) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddOccurrence(o ...*Occurrence) *TagUpdateOne
- func (tuo *TagUpdateOne) AddOccurrenceIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearOccurrence() *TagUpdateOne
- func (tuo *TagUpdateOne) ClearShortName() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveOccurrence(o ...*Occurrence) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveOccurrenceIDs(ids ...uuid.UUID) *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) SetDescription(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetIsAllergy(b bool) *TagUpdateOne
- func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableIsAllergy(b *bool) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillablePriority(sp *schema.TagPriority) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableShortName(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetPriority(sp schema.TagPriority) *TagUpdateOne
- func (tuo *TagUpdateOne) SetShortName(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type TagUpsert
- func (u *TagUpsert) ClearShortName() *TagUpsert
- func (u *TagUpsert) SetDescription(v string) *TagUpsert
- func (u *TagUpsert) SetIsAllergy(v bool) *TagUpsert
- func (u *TagUpsert) SetName(v string) *TagUpsert
- func (u *TagUpsert) SetPriority(v schema.TagPriority) *TagUpsert
- func (u *TagUpsert) SetShortName(v string) *TagUpsert
- func (u *TagUpsert) UpdateDescription() *TagUpsert
- func (u *TagUpsert) UpdateIsAllergy() *TagUpsert
- func (u *TagUpsert) UpdateName() *TagUpsert
- func (u *TagUpsert) UpdatePriority() *TagUpsert
- func (u *TagUpsert) UpdateShortName() *TagUpsert
- type TagUpsertBulk
- func (u *TagUpsertBulk) ClearShortName() *TagUpsertBulk
- func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
- func (u *TagUpsertBulk) Exec(ctx context.Context) error
- func (u *TagUpsertBulk) ExecX(ctx context.Context)
- func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
- func (u *TagUpsertBulk) SetDescription(v string) *TagUpsertBulk
- func (u *TagUpsertBulk) SetIsAllergy(v bool) *TagUpsertBulk
- func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk
- func (u *TagUpsertBulk) SetPriority(v schema.TagPriority) *TagUpsertBulk
- func (u *TagUpsertBulk) SetShortName(v string) *TagUpsertBulk
- func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateDescription() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateIsAllergy() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdatePriority() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateShortName() *TagUpsertBulk
- type TagUpsertOne
- func (u *TagUpsertOne) ClearShortName() *TagUpsertOne
- func (u *TagUpsertOne) DoNothing() *TagUpsertOne
- func (u *TagUpsertOne) Exec(ctx context.Context) error
- func (u *TagUpsertOne) ExecX(ctx context.Context)
- func (u *TagUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *TagUpsertOne) IDX(ctx context.Context) string
- func (u *TagUpsertOne) Ignore() *TagUpsertOne
- func (u *TagUpsertOne) SetDescription(v string) *TagUpsertOne
- func (u *TagUpsertOne) SetIsAllergy(v bool) *TagUpsertOne
- func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
- func (u *TagUpsertOne) SetPriority(v schema.TagPriority) *TagUpsertOne
- func (u *TagUpsertOne) SetShortName(v string) *TagUpsertOne
- func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
- func (u *TagUpsertOne) UpdateDescription() *TagUpsertOne
- func (u *TagUpsertOne) UpdateIsAllergy() *TagUpsertOne
- func (u *TagUpsertOne) UpdateName() *TagUpsertOne
- func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
- func (u *TagUpsertOne) UpdatePriority() *TagUpsertOne
- func (u *TagUpsertOne) UpdateShortName() *TagUpsertOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PasswordHash() (r string, exists bool)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetPasswordHash()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPasswordHash(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetPasswordHash(v string) *UserUpsert
- func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdatePasswordHash() *UserUpsert
- func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPasswordHash(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePasswordHash() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPasswordHash(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePasswordHash() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeDish = "Dish" TypeDishAlias = "DishAlias" TypeImage = "Image" TypeLocation = "Location" TypeOccurrence = "Occurrence" TypeReview = "Review" TypeTag = "Tag" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Dish is the client for interacting with the Dish builders. Dish *DishClient // DishAlias is the client for interacting with the DishAlias builders. DishAlias *DishAliasClient // Image is the client for interacting with the Image builders. Image *ImageClient // Location is the client for interacting with the Location builders. Location *LocationClient // Occurrence is the client for interacting with the Occurrence builders. Occurrence *OccurrenceClient // Review is the client for interacting with the Review builders. Review *ReviewClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Dish. 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 Dish ¶
type Dish struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // NameDe holds the value of the "name_de" field. NameDe string `json:"name_de,omitempty"` // NameEn holds the value of the "name_en" field. NameEn *string `json:"name_en,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DishQuery when eager-loading is set. Edges DishEdges `json:"edges"` // contains filtered or unexported fields }
Dish is the model entity for the Dish schema.
func (*Dish) QueryAliases ¶
func (d *Dish) QueryAliases() *DishAliasQuery
QueryAliases queries the "aliases" edge of the Dish entity.
func (*Dish) QueryDishOccurrences ¶
func (d *Dish) QueryDishOccurrences() *OccurrenceQuery
QueryDishOccurrences queries the "dish_occurrences" edge of the Dish entity.
func (*Dish) QuerySideDishOccurrence ¶
func (d *Dish) QuerySideDishOccurrence() *OccurrenceQuery
QuerySideDishOccurrence queries the "side_dish_occurrence" edge of the Dish entity.
func (*Dish) Unwrap ¶
Unwrap unwraps the Dish 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 (*Dish) Update ¶
func (d *Dish) Update() *DishUpdateOne
Update returns a builder for updating this Dish. Note that you need to call Dish.Unwrap() before calling this method if this Dish was returned from a transaction, and the transaction was committed or rolled back.
type DishAlias ¶
type DishAlias struct { // ID of the ent. ID string `json:"id,omitempty"` // NormalizedAliasName holds the value of the "normalized_alias_name" field. NormalizedAliasName string `json:"normalized_alias_name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DishAliasQuery when eager-loading is set. Edges DishAliasEdges `json:"edges"` // contains filtered or unexported fields }
DishAlias is the model entity for the DishAlias schema.
func (*DishAlias) Unwrap ¶
Unwrap unwraps the DishAlias 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 (*DishAlias) Update ¶
func (da *DishAlias) Update() *DishAliasUpdateOne
Update returns a builder for updating this DishAlias. Note that you need to call DishAlias.Unwrap() before calling this method if this DishAlias was returned from a transaction, and the transaction was committed or rolled back.
type DishAliasClient ¶
type DishAliasClient struct {
// contains filtered or unexported fields
}
DishAliasClient is a client for the DishAlias schema.
func NewDishAliasClient ¶
func NewDishAliasClient(c config) *DishAliasClient
NewDishAliasClient returns a client for the DishAlias from the given config.
func (*DishAliasClient) Create ¶
func (c *DishAliasClient) Create() *DishAliasCreate
Create returns a builder for creating a DishAlias entity.
func (*DishAliasClient) CreateBulk ¶
func (c *DishAliasClient) CreateBulk(builders ...*DishAliasCreate) *DishAliasCreateBulk
CreateBulk returns a builder for creating a bulk of DishAlias entities.
func (*DishAliasClient) Delete ¶
func (c *DishAliasClient) Delete() *DishAliasDelete
Delete returns a delete builder for DishAlias.
func (*DishAliasClient) DeleteOne ¶
func (c *DishAliasClient) DeleteOne(da *DishAlias) *DishAliasDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DishAliasClient) DeleteOneID ¶
func (c *DishAliasClient) DeleteOneID(id string) *DishAliasDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DishAliasClient) GetX ¶
func (c *DishAliasClient) GetX(ctx context.Context, id string) *DishAlias
GetX is like Get, but panics if an error occurs.
func (*DishAliasClient) Hooks ¶
func (c *DishAliasClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DishAliasClient) Intercept ¶
func (c *DishAliasClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dishalias.Intercept(f(g(h())))`.
func (*DishAliasClient) Interceptors ¶
func (c *DishAliasClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DishAliasClient) Query ¶
func (c *DishAliasClient) Query() *DishAliasQuery
Query returns a query builder for DishAlias.
func (*DishAliasClient) QueryDish ¶
func (c *DishAliasClient) QueryDish(da *DishAlias) *DishQuery
QueryDish queries the dish edge of a DishAlias.
func (*DishAliasClient) Update ¶
func (c *DishAliasClient) Update() *DishAliasUpdate
Update returns an update builder for DishAlias.
func (*DishAliasClient) UpdateOne ¶
func (c *DishAliasClient) UpdateOne(da *DishAlias) *DishAliasUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DishAliasClient) UpdateOneID ¶
func (c *DishAliasClient) UpdateOneID(id string) *DishAliasUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DishAliasClient) Use ¶
func (c *DishAliasClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dishalias.Hooks(f(g(h())))`.
type DishAliasCreate ¶
type DishAliasCreate struct {
// contains filtered or unexported fields
}
DishAliasCreate is the builder for creating a DishAlias entity.
func (*DishAliasCreate) Exec ¶
func (dac *DishAliasCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DishAliasCreate) ExecX ¶
func (dac *DishAliasCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasCreate) Mutation ¶
func (dac *DishAliasCreate) Mutation() *DishAliasMutation
Mutation returns the DishAliasMutation object of the builder.
func (*DishAliasCreate) OnConflict ¶
func (dac *DishAliasCreate) OnConflict(opts ...sql.ConflictOption) *DishAliasUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DishAlias.Create(). SetNormalizedAliasName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.DishAliasUpsert) { SetNormalizedAliasName(v+v). }). Exec(ctx)
func (*DishAliasCreate) OnConflictColumns ¶
func (dac *DishAliasCreate) OnConflictColumns(columns ...string) *DishAliasUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DishAlias.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DishAliasCreate) Save ¶
func (dac *DishAliasCreate) Save(ctx context.Context) (*DishAlias, error)
Save creates the DishAlias in the database.
func (*DishAliasCreate) SaveX ¶
func (dac *DishAliasCreate) SaveX(ctx context.Context) *DishAlias
SaveX calls Save and panics if Save returns an error.
func (*DishAliasCreate) SetDish ¶
func (dac *DishAliasCreate) SetDish(d *Dish) *DishAliasCreate
SetDish sets the "dish" edge to the Dish entity.
func (*DishAliasCreate) SetDishID ¶
func (dac *DishAliasCreate) SetDishID(id uuid.UUID) *DishAliasCreate
SetDishID sets the "dish" edge to the Dish entity by ID.
func (*DishAliasCreate) SetID ¶
func (dac *DishAliasCreate) SetID(s string) *DishAliasCreate
SetID sets the "id" field.
func (*DishAliasCreate) SetNormalizedAliasName ¶
func (dac *DishAliasCreate) SetNormalizedAliasName(s string) *DishAliasCreate
SetNormalizedAliasName sets the "normalized_alias_name" field.
type DishAliasCreateBulk ¶
type DishAliasCreateBulk struct {
// contains filtered or unexported fields
}
DishAliasCreateBulk is the builder for creating many DishAlias entities in bulk.
func (*DishAliasCreateBulk) Exec ¶
func (dacb *DishAliasCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DishAliasCreateBulk) ExecX ¶
func (dacb *DishAliasCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasCreateBulk) OnConflict ¶
func (dacb *DishAliasCreateBulk) OnConflict(opts ...sql.ConflictOption) *DishAliasUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.DishAlias.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.DishAliasUpsert) { SetNormalizedAliasName(v+v). }). Exec(ctx)
func (*DishAliasCreateBulk) OnConflictColumns ¶
func (dacb *DishAliasCreateBulk) OnConflictColumns(columns ...string) *DishAliasUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.DishAlias.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type DishAliasDelete ¶
type DishAliasDelete struct {
// contains filtered or unexported fields
}
DishAliasDelete is the builder for deleting a DishAlias entity.
func (*DishAliasDelete) Exec ¶
func (dad *DishAliasDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DishAliasDelete) ExecX ¶
func (dad *DishAliasDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasDelete) Where ¶
func (dad *DishAliasDelete) Where(ps ...predicate.DishAlias) *DishAliasDelete
Where appends a list predicates to the DishAliasDelete builder.
type DishAliasDeleteOne ¶
type DishAliasDeleteOne struct {
// contains filtered or unexported fields
}
DishAliasDeleteOne is the builder for deleting a single DishAlias entity.
func (*DishAliasDeleteOne) Exec ¶
func (dado *DishAliasDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DishAliasDeleteOne) ExecX ¶
func (dado *DishAliasDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasDeleteOne) Where ¶
func (dado *DishAliasDeleteOne) Where(ps ...predicate.DishAlias) *DishAliasDeleteOne
Where appends a list predicates to the DishAliasDelete builder.
type DishAliasEdges ¶
type DishAliasEdges struct { // Dish holds the value of the dish edge. Dish *Dish `json:"dish,omitempty"` // contains filtered or unexported fields }
DishAliasEdges holds the relations/edges for other nodes in the graph.
func (DishAliasEdges) DishOrErr ¶
func (e DishAliasEdges) DishOrErr() (*Dish, error)
DishOrErr returns the Dish value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DishAliasGroupBy ¶
type DishAliasGroupBy struct {
// contains filtered or unexported fields
}
DishAliasGroupBy is the group-by builder for DishAlias entities.
func (*DishAliasGroupBy) Aggregate ¶
func (dagb *DishAliasGroupBy) Aggregate(fns ...AggregateFunc) *DishAliasGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DishAliasGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DishAliasGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DishAliasGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DishAliasGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DishAliasGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DishAliasGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DishAliasGroupBy) Scan ¶
func (dagb *DishAliasGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DishAliasGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DishAliasMutation ¶
type DishAliasMutation struct {
// contains filtered or unexported fields
}
DishAliasMutation represents an operation that mutates the DishAlias nodes in the graph.
func (*DishAliasMutation) AddField ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) AddedEdges ¶
func (m *DishAliasMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DishAliasMutation) AddedField ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) AddedFields ¶
func (m *DishAliasMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DishAliasMutation) AddedIDs ¶
func (m *DishAliasMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DishAliasMutation) ClearDish ¶
func (m *DishAliasMutation) ClearDish()
ClearDish clears the "dish" edge to the Dish entity.
func (*DishAliasMutation) ClearEdge ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) ClearField ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) ClearedEdges ¶
func (m *DishAliasMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DishAliasMutation) ClearedFields ¶
func (m *DishAliasMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DishAliasMutation) Client ¶
func (m DishAliasMutation) 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 (*DishAliasMutation) DishCleared ¶
func (m *DishAliasMutation) DishCleared() bool
DishCleared reports if the "dish" edge to the Dish entity was cleared.
func (*DishAliasMutation) DishID ¶
func (m *DishAliasMutation) DishID() (id uuid.UUID, exists bool)
DishID returns the "dish" edge ID in the mutation.
func (*DishAliasMutation) DishIDs ¶
func (m *DishAliasMutation) DishIDs() (ids []uuid.UUID)
DishIDs returns the "dish" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DishID instead. It exists only for internal usage by the builders.
func (*DishAliasMutation) EdgeCleared ¶
func (m *DishAliasMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DishAliasMutation) Field ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) FieldCleared ¶
func (m *DishAliasMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DishAliasMutation) Fields ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) ID ¶
func (m *DishAliasMutation) ID() (id string, 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 (*DishAliasMutation) IDs ¶
func (m *DishAliasMutation) IDs(ctx context.Context) ([]string, 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 (*DishAliasMutation) NormalizedAliasName ¶
func (m *DishAliasMutation) NormalizedAliasName() (r string, exists bool)
NormalizedAliasName returns the value of the "normalized_alias_name" field in the mutation.
func (*DishAliasMutation) 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 (*DishAliasMutation) OldNormalizedAliasName ¶
func (m *DishAliasMutation) OldNormalizedAliasName(ctx context.Context) (v string, err error)
OldNormalizedAliasName returns the old "normalized_alias_name" field's value of the DishAlias entity. If the DishAlias 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 (*DishAliasMutation) RemovedEdges ¶
func (m *DishAliasMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DishAliasMutation) RemovedIDs ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) ResetDish ¶
func (m *DishAliasMutation) ResetDish()
ResetDish resets all changes to the "dish" edge.
func (*DishAliasMutation) ResetEdge ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) ResetField ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) ResetNormalizedAliasName ¶
func (m *DishAliasMutation) ResetNormalizedAliasName()
ResetNormalizedAliasName resets all changes to the "normalized_alias_name" field.
func (*DishAliasMutation) SetDishID ¶
func (m *DishAliasMutation) SetDishID(id uuid.UUID)
SetDishID sets the "dish" edge to the Dish entity by id.
func (*DishAliasMutation) SetField ¶
func (m *DishAliasMutation) 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 (*DishAliasMutation) SetID ¶
func (m *DishAliasMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DishAlias entities.
func (*DishAliasMutation) SetNormalizedAliasName ¶
func (m *DishAliasMutation) SetNormalizedAliasName(s string)
SetNormalizedAliasName sets the "normalized_alias_name" field.
func (*DishAliasMutation) SetOp ¶
func (m *DishAliasMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (DishAliasMutation) Tx ¶
func (m DishAliasMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DishAliasMutation) Type ¶
func (m *DishAliasMutation) Type() string
Type returns the node type of this mutation (DishAlias).
func (*DishAliasMutation) Where ¶
func (m *DishAliasMutation) Where(ps ...predicate.DishAlias)
Where appends a list predicates to the DishAliasMutation builder.
func (*DishAliasMutation) WhereP ¶
func (m *DishAliasMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DishAliasMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DishAliasQuery ¶
type DishAliasQuery struct {
// contains filtered or unexported fields
}
DishAliasQuery is the builder for querying DishAlias entities.
func (*DishAliasQuery) Aggregate ¶
func (daq *DishAliasQuery) Aggregate(fns ...AggregateFunc) *DishAliasSelect
Aggregate returns a DishAliasSelect configured with the given aggregations.
func (*DishAliasQuery) All ¶
func (daq *DishAliasQuery) All(ctx context.Context) ([]*DishAlias, error)
All executes the query and returns a list of DishAliasSlice.
func (*DishAliasQuery) AllX ¶
func (daq *DishAliasQuery) AllX(ctx context.Context) []*DishAlias
AllX is like All, but panics if an error occurs.
func (*DishAliasQuery) Clone ¶
func (daq *DishAliasQuery) Clone() *DishAliasQuery
Clone returns a duplicate of the DishAliasQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DishAliasQuery) Count ¶
func (daq *DishAliasQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DishAliasQuery) CountX ¶
func (daq *DishAliasQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DishAliasQuery) Exist ¶
func (daq *DishAliasQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DishAliasQuery) ExistX ¶
func (daq *DishAliasQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DishAliasQuery) First ¶
func (daq *DishAliasQuery) First(ctx context.Context) (*DishAlias, error)
First returns the first DishAlias entity from the query. Returns a *NotFoundError when no DishAlias was found.
func (*DishAliasQuery) FirstID ¶
func (daq *DishAliasQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first DishAlias ID from the query. Returns a *NotFoundError when no DishAlias ID was found.
func (*DishAliasQuery) FirstIDX ¶
func (daq *DishAliasQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*DishAliasQuery) FirstX ¶
func (daq *DishAliasQuery) FirstX(ctx context.Context) *DishAlias
FirstX is like First, but panics if an error occurs.
func (*DishAliasQuery) GroupBy ¶
func (daq *DishAliasQuery) GroupBy(field string, fields ...string) *DishAliasGroupBy
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 { NormalizedAliasName string `json:"normalized_alias_name,omitempty"` Count int `json:"count,omitempty"` } client.DishAlias.Query(). GroupBy(dishalias.FieldNormalizedAliasName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DishAliasQuery) IDs ¶
func (daq *DishAliasQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of DishAlias IDs.
func (*DishAliasQuery) IDsX ¶
func (daq *DishAliasQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*DishAliasQuery) Limit ¶
func (daq *DishAliasQuery) Limit(limit int) *DishAliasQuery
Limit the number of records to be returned by this query.
func (*DishAliasQuery) Offset ¶
func (daq *DishAliasQuery) Offset(offset int) *DishAliasQuery
Offset to start from.
func (*DishAliasQuery) Only ¶
func (daq *DishAliasQuery) Only(ctx context.Context) (*DishAlias, error)
Only returns a single DishAlias entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DishAlias entity is found. Returns a *NotFoundError when no DishAlias entities are found.
func (*DishAliasQuery) OnlyID ¶
func (daq *DishAliasQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only DishAlias ID in the query. Returns a *NotSingularError when more than one DishAlias ID is found. Returns a *NotFoundError when no entities are found.
func (*DishAliasQuery) OnlyIDX ¶
func (daq *DishAliasQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DishAliasQuery) OnlyX ¶
func (daq *DishAliasQuery) OnlyX(ctx context.Context) *DishAlias
OnlyX is like Only, but panics if an error occurs.
func (*DishAliasQuery) Order ¶
func (daq *DishAliasQuery) Order(o ...dishalias.OrderOption) *DishAliasQuery
Order specifies how the records should be ordered.
func (*DishAliasQuery) QueryDish ¶
func (daq *DishAliasQuery) QueryDish() *DishQuery
QueryDish chains the current query on the "dish" edge.
func (*DishAliasQuery) Select ¶
func (daq *DishAliasQuery) Select(fields ...string) *DishAliasSelect
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 { NormalizedAliasName string `json:"normalized_alias_name,omitempty"` } client.DishAlias.Query(). Select(dishalias.FieldNormalizedAliasName). Scan(ctx, &v)
func (*DishAliasQuery) Unique ¶
func (daq *DishAliasQuery) Unique(unique bool) *DishAliasQuery
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 (*DishAliasQuery) Where ¶
func (daq *DishAliasQuery) Where(ps ...predicate.DishAlias) *DishAliasQuery
Where adds a new predicate for the DishAliasQuery builder.
func (*DishAliasQuery) WithDish ¶
func (daq *DishAliasQuery) WithDish(opts ...func(*DishQuery)) *DishAliasQuery
WithDish tells the query-builder to eager-load the nodes that are connected to the "dish" edge. The optional arguments are used to configure the query builder of the edge.
type DishAliasSelect ¶
type DishAliasSelect struct { *DishAliasQuery // contains filtered or unexported fields }
DishAliasSelect is the builder for selecting fields of DishAlias entities.
func (*DishAliasSelect) Aggregate ¶
func (das *DishAliasSelect) Aggregate(fns ...AggregateFunc) *DishAliasSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DishAliasSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DishAliasSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DishAliasSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DishAliasSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DishAliasSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DishAliasSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DishAliasSelect) Scan ¶
func (das *DishAliasSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DishAliasSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DishAliasSlice ¶
type DishAliasSlice []*DishAlias
DishAliasSlice is a parsable slice of DishAlias.
type DishAliasUpdate ¶
type DishAliasUpdate struct {
// contains filtered or unexported fields
}
DishAliasUpdate is the builder for updating DishAlias entities.
func (*DishAliasUpdate) ClearDish ¶
func (dau *DishAliasUpdate) ClearDish() *DishAliasUpdate
ClearDish clears the "dish" edge to the Dish entity.
func (*DishAliasUpdate) Exec ¶
func (dau *DishAliasUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DishAliasUpdate) ExecX ¶
func (dau *DishAliasUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasUpdate) Mutation ¶
func (dau *DishAliasUpdate) Mutation() *DishAliasMutation
Mutation returns the DishAliasMutation object of the builder.
func (*DishAliasUpdate) Save ¶
func (dau *DishAliasUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DishAliasUpdate) SaveX ¶
func (dau *DishAliasUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DishAliasUpdate) SetDish ¶
func (dau *DishAliasUpdate) SetDish(d *Dish) *DishAliasUpdate
SetDish sets the "dish" edge to the Dish entity.
func (*DishAliasUpdate) SetDishID ¶
func (dau *DishAliasUpdate) SetDishID(id uuid.UUID) *DishAliasUpdate
SetDishID sets the "dish" edge to the Dish entity by ID.
func (*DishAliasUpdate) SetNormalizedAliasName ¶
func (dau *DishAliasUpdate) SetNormalizedAliasName(s string) *DishAliasUpdate
SetNormalizedAliasName sets the "normalized_alias_name" field.
func (*DishAliasUpdate) Where ¶
func (dau *DishAliasUpdate) Where(ps ...predicate.DishAlias) *DishAliasUpdate
Where appends a list predicates to the DishAliasUpdate builder.
type DishAliasUpdateOne ¶
type DishAliasUpdateOne struct {
// contains filtered or unexported fields
}
DishAliasUpdateOne is the builder for updating a single DishAlias entity.
func (*DishAliasUpdateOne) ClearDish ¶
func (dauo *DishAliasUpdateOne) ClearDish() *DishAliasUpdateOne
ClearDish clears the "dish" edge to the Dish entity.
func (*DishAliasUpdateOne) Exec ¶
func (dauo *DishAliasUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DishAliasUpdateOne) ExecX ¶
func (dauo *DishAliasUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasUpdateOne) Mutation ¶
func (dauo *DishAliasUpdateOne) Mutation() *DishAliasMutation
Mutation returns the DishAliasMutation object of the builder.
func (*DishAliasUpdateOne) Save ¶
func (dauo *DishAliasUpdateOne) Save(ctx context.Context) (*DishAlias, error)
Save executes the query and returns the updated DishAlias entity.
func (*DishAliasUpdateOne) SaveX ¶
func (dauo *DishAliasUpdateOne) SaveX(ctx context.Context) *DishAlias
SaveX is like Save, but panics if an error occurs.
func (*DishAliasUpdateOne) Select ¶
func (dauo *DishAliasUpdateOne) Select(field string, fields ...string) *DishAliasUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DishAliasUpdateOne) SetDish ¶
func (dauo *DishAliasUpdateOne) SetDish(d *Dish) *DishAliasUpdateOne
SetDish sets the "dish" edge to the Dish entity.
func (*DishAliasUpdateOne) SetDishID ¶
func (dauo *DishAliasUpdateOne) SetDishID(id uuid.UUID) *DishAliasUpdateOne
SetDishID sets the "dish" edge to the Dish entity by ID.
func (*DishAliasUpdateOne) SetNormalizedAliasName ¶
func (dauo *DishAliasUpdateOne) SetNormalizedAliasName(s string) *DishAliasUpdateOne
SetNormalizedAliasName sets the "normalized_alias_name" field.
func (*DishAliasUpdateOne) Where ¶
func (dauo *DishAliasUpdateOne) Where(ps ...predicate.DishAlias) *DishAliasUpdateOne
Where appends a list predicates to the DishAliasUpdate builder.
type DishAliasUpsert ¶
DishAliasUpsert is the "OnConflict" setter.
func (*DishAliasUpsert) SetNormalizedAliasName ¶
func (u *DishAliasUpsert) SetNormalizedAliasName(v string) *DishAliasUpsert
SetNormalizedAliasName sets the "normalized_alias_name" field.
func (*DishAliasUpsert) UpdateNormalizedAliasName ¶
func (u *DishAliasUpsert) UpdateNormalizedAliasName() *DishAliasUpsert
UpdateNormalizedAliasName sets the "normalized_alias_name" field to the value that was provided on create.
type DishAliasUpsertBulk ¶
type DishAliasUpsertBulk struct {
// contains filtered or unexported fields
}
DishAliasUpsertBulk is the builder for "upsert"-ing a bulk of DishAlias nodes.
func (*DishAliasUpsertBulk) DoNothing ¶
func (u *DishAliasUpsertBulk) DoNothing() *DishAliasUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DishAliasUpsertBulk) Exec ¶
func (u *DishAliasUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DishAliasUpsertBulk) ExecX ¶
func (u *DishAliasUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasUpsertBulk) Ignore ¶
func (u *DishAliasUpsertBulk) Ignore() *DishAliasUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DishAlias.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DishAliasUpsertBulk) SetNormalizedAliasName ¶
func (u *DishAliasUpsertBulk) SetNormalizedAliasName(v string) *DishAliasUpsertBulk
SetNormalizedAliasName sets the "normalized_alias_name" field.
func (*DishAliasUpsertBulk) Update ¶
func (u *DishAliasUpsertBulk) Update(set func(*DishAliasUpsert)) *DishAliasUpsertBulk
Update allows overriding fields `UPDATE` values. See the DishAliasCreateBulk.OnConflict documentation for more info.
func (*DishAliasUpsertBulk) UpdateNewValues ¶
func (u *DishAliasUpsertBulk) UpdateNewValues() *DishAliasUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.DishAlias.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(dishalias.FieldID) }), ). Exec(ctx)
func (*DishAliasUpsertBulk) UpdateNormalizedAliasName ¶
func (u *DishAliasUpsertBulk) UpdateNormalizedAliasName() *DishAliasUpsertBulk
UpdateNormalizedAliasName sets the "normalized_alias_name" field to the value that was provided on create.
type DishAliasUpsertOne ¶
type DishAliasUpsertOne struct {
// contains filtered or unexported fields
}
DishAliasUpsertOne is the builder for "upsert"-ing
one DishAlias node.
func (*DishAliasUpsertOne) DoNothing ¶
func (u *DishAliasUpsertOne) DoNothing() *DishAliasUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DishAliasUpsertOne) Exec ¶
func (u *DishAliasUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DishAliasUpsertOne) ExecX ¶
func (u *DishAliasUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishAliasUpsertOne) ID ¶
func (u *DishAliasUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*DishAliasUpsertOne) IDX ¶
func (u *DishAliasUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*DishAliasUpsertOne) Ignore ¶
func (u *DishAliasUpsertOne) Ignore() *DishAliasUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.DishAlias.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DishAliasUpsertOne) SetNormalizedAliasName ¶
func (u *DishAliasUpsertOne) SetNormalizedAliasName(v string) *DishAliasUpsertOne
SetNormalizedAliasName sets the "normalized_alias_name" field.
func (*DishAliasUpsertOne) Update ¶
func (u *DishAliasUpsertOne) Update(set func(*DishAliasUpsert)) *DishAliasUpsertOne
Update allows overriding fields `UPDATE` values. See the DishAliasCreate.OnConflict documentation for more info.
func (*DishAliasUpsertOne) UpdateNewValues ¶
func (u *DishAliasUpsertOne) UpdateNewValues() *DishAliasUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.DishAlias.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(dishalias.FieldID) }), ). Exec(ctx)
func (*DishAliasUpsertOne) UpdateNormalizedAliasName ¶
func (u *DishAliasUpsertOne) UpdateNormalizedAliasName() *DishAliasUpsertOne
UpdateNormalizedAliasName sets the "normalized_alias_name" field to the value that was provided on create.
type DishClient ¶
type DishClient struct {
// contains filtered or unexported fields
}
DishClient is a client for the Dish schema.
func NewDishClient ¶
func NewDishClient(c config) *DishClient
NewDishClient returns a client for the Dish from the given config.
func (*DishClient) Create ¶
func (c *DishClient) Create() *DishCreate
Create returns a builder for creating a Dish entity.
func (*DishClient) CreateBulk ¶
func (c *DishClient) CreateBulk(builders ...*DishCreate) *DishCreateBulk
CreateBulk returns a builder for creating a bulk of Dish entities.
func (*DishClient) Delete ¶
func (c *DishClient) Delete() *DishDelete
Delete returns a delete builder for Dish.
func (*DishClient) DeleteOne ¶
func (c *DishClient) DeleteOne(d *Dish) *DishDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DishClient) DeleteOneID ¶
func (c *DishClient) DeleteOneID(id uuid.UUID) *DishDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DishClient) Intercept ¶
func (c *DishClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dish.Intercept(f(g(h())))`.
func (*DishClient) Interceptors ¶
func (c *DishClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DishClient) Query ¶
func (c *DishClient) Query() *DishQuery
Query returns a query builder for Dish.
func (*DishClient) QueryAliases ¶
func (c *DishClient) QueryAliases(d *Dish) *DishAliasQuery
QueryAliases queries the aliases edge of a Dish.
func (*DishClient) QueryDishOccurrences ¶
func (c *DishClient) QueryDishOccurrences(d *Dish) *OccurrenceQuery
QueryDishOccurrences queries the dish_occurrences edge of a Dish.
func (*DishClient) QuerySideDishOccurrence ¶
func (c *DishClient) QuerySideDishOccurrence(d *Dish) *OccurrenceQuery
QuerySideDishOccurrence queries the side_dish_occurrence edge of a Dish.
func (*DishClient) Update ¶
func (c *DishClient) Update() *DishUpdate
Update returns an update builder for Dish.
func (*DishClient) UpdateOne ¶
func (c *DishClient) UpdateOne(d *Dish) *DishUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DishClient) UpdateOneID ¶
func (c *DishClient) UpdateOneID(id uuid.UUID) *DishUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DishClient) Use ¶
func (c *DishClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dish.Hooks(f(g(h())))`.
type DishCreate ¶
type DishCreate struct {
// contains filtered or unexported fields
}
DishCreate is the builder for creating a Dish entity.
func (*DishCreate) AddAliasIDs ¶
func (dc *DishCreate) AddAliasIDs(ids ...string) *DishCreate
AddAliasIDs adds the "aliases" edge to the DishAlias entity by IDs.
func (*DishCreate) AddAliases ¶
func (dc *DishCreate) AddAliases(d ...*DishAlias) *DishCreate
AddAliases adds the "aliases" edges to the DishAlias entity.
func (*DishCreate) AddDishOccurrenceIDs ¶
func (dc *DishCreate) AddDishOccurrenceIDs(ids ...uuid.UUID) *DishCreate
AddDishOccurrenceIDs adds the "dish_occurrences" edge to the Occurrence entity by IDs.
func (*DishCreate) AddDishOccurrences ¶
func (dc *DishCreate) AddDishOccurrences(o ...*Occurrence) *DishCreate
AddDishOccurrences adds the "dish_occurrences" edges to the Occurrence entity.
func (*DishCreate) AddSideDishOccurrence ¶
func (dc *DishCreate) AddSideDishOccurrence(o ...*Occurrence) *DishCreate
AddSideDishOccurrence adds the "side_dish_occurrence" edges to the Occurrence entity.
func (*DishCreate) AddSideDishOccurrenceIDs ¶
func (dc *DishCreate) AddSideDishOccurrenceIDs(ids ...uuid.UUID) *DishCreate
AddSideDishOccurrenceIDs adds the "side_dish_occurrence" edge to the Occurrence entity by IDs.
func (*DishCreate) Exec ¶
func (dc *DishCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DishCreate) ExecX ¶
func (dc *DishCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishCreate) Mutation ¶
func (dc *DishCreate) Mutation() *DishMutation
Mutation returns the DishMutation object of the builder.
func (*DishCreate) OnConflict ¶
func (dc *DishCreate) OnConflict(opts ...sql.ConflictOption) *DishUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Dish.Create(). SetNameDe(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.DishUpsert) { SetNameDe(v+v). }). Exec(ctx)
func (*DishCreate) OnConflictColumns ¶
func (dc *DishCreate) OnConflictColumns(columns ...string) *DishUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Dish.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DishCreate) Save ¶
func (dc *DishCreate) Save(ctx context.Context) (*Dish, error)
Save creates the Dish in the database.
func (*DishCreate) SaveX ¶
func (dc *DishCreate) SaveX(ctx context.Context) *Dish
SaveX calls Save and panics if Save returns an error.
func (*DishCreate) SetID ¶
func (dc *DishCreate) SetID(u uuid.UUID) *DishCreate
SetID sets the "id" field.
func (*DishCreate) SetNameDe ¶
func (dc *DishCreate) SetNameDe(s string) *DishCreate
SetNameDe sets the "name_de" field.
func (*DishCreate) SetNameEn ¶
func (dc *DishCreate) SetNameEn(s string) *DishCreate
SetNameEn sets the "name_en" field.
func (*DishCreate) SetNillableID ¶
func (dc *DishCreate) SetNillableID(u *uuid.UUID) *DishCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*DishCreate) SetNillableNameEn ¶
func (dc *DishCreate) SetNillableNameEn(s *string) *DishCreate
SetNillableNameEn sets the "name_en" field if the given value is not nil.
type DishCreateBulk ¶
type DishCreateBulk struct {
// contains filtered or unexported fields
}
DishCreateBulk is the builder for creating many Dish entities in bulk.
func (*DishCreateBulk) Exec ¶
func (dcb *DishCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DishCreateBulk) ExecX ¶
func (dcb *DishCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishCreateBulk) OnConflict ¶
func (dcb *DishCreateBulk) OnConflict(opts ...sql.ConflictOption) *DishUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Dish.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.DishUpsert) { SetNameDe(v+v). }). Exec(ctx)
func (*DishCreateBulk) OnConflictColumns ¶
func (dcb *DishCreateBulk) OnConflictColumns(columns ...string) *DishUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Dish.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type DishDelete ¶
type DishDelete struct {
// contains filtered or unexported fields
}
DishDelete is the builder for deleting a Dish entity.
func (*DishDelete) Exec ¶
func (dd *DishDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DishDelete) ExecX ¶
func (dd *DishDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DishDelete) Where ¶
func (dd *DishDelete) Where(ps ...predicate.Dish) *DishDelete
Where appends a list predicates to the DishDelete builder.
type DishDeleteOne ¶
type DishDeleteOne struct {
// contains filtered or unexported fields
}
DishDeleteOne is the builder for deleting a single Dish entity.
func (*DishDeleteOne) Exec ¶
func (ddo *DishDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DishDeleteOne) ExecX ¶
func (ddo *DishDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishDeleteOne) Where ¶
func (ddo *DishDeleteOne) Where(ps ...predicate.Dish) *DishDeleteOne
Where appends a list predicates to the DishDelete builder.
type DishEdges ¶
type DishEdges struct { // DishOccurrences holds the value of the dish_occurrences edge. DishOccurrences []*Occurrence `json:"dish_occurrences,omitempty"` // Aliases holds the value of the aliases edge. Aliases []*DishAlias `json:"aliases,omitempty"` // SideDishOccurrence holds the value of the side_dish_occurrence edge. SideDishOccurrence []*Occurrence `json:"side_dish_occurrence,omitempty"` // contains filtered or unexported fields }
DishEdges holds the relations/edges for other nodes in the graph.
func (DishEdges) AliasesOrErr ¶
AliasesOrErr returns the Aliases value or an error if the edge was not loaded in eager-loading.
func (DishEdges) DishOccurrencesOrErr ¶
func (e DishEdges) DishOccurrencesOrErr() ([]*Occurrence, error)
DishOccurrencesOrErr returns the DishOccurrences value or an error if the edge was not loaded in eager-loading.
func (DishEdges) SideDishOccurrenceOrErr ¶
func (e DishEdges) SideDishOccurrenceOrErr() ([]*Occurrence, error)
SideDishOccurrenceOrErr returns the SideDishOccurrence value or an error if the edge was not loaded in eager-loading.
type DishGroupBy ¶
type DishGroupBy struct {
// contains filtered or unexported fields
}
DishGroupBy is the group-by builder for Dish entities.
func (*DishGroupBy) Aggregate ¶
func (dgb *DishGroupBy) Aggregate(fns ...AggregateFunc) *DishGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DishGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DishGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DishGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DishGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DishGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DishGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DishGroupBy) Scan ¶
func (dgb *DishGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DishGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DishMutation ¶
type DishMutation struct {
// contains filtered or unexported fields
}
DishMutation represents an operation that mutates the Dish nodes in the graph.
func (*DishMutation) AddAliasIDs ¶
func (m *DishMutation) AddAliasIDs(ids ...string)
AddAliasIDs adds the "aliases" edge to the DishAlias entity by ids.
func (*DishMutation) AddDishOccurrenceIDs ¶
func (m *DishMutation) AddDishOccurrenceIDs(ids ...uuid.UUID)
AddDishOccurrenceIDs adds the "dish_occurrences" edge to the Occurrence entity by ids.
func (*DishMutation) AddField ¶
func (m *DishMutation) 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 (*DishMutation) AddSideDishOccurrenceIDs ¶
func (m *DishMutation) AddSideDishOccurrenceIDs(ids ...uuid.UUID)
AddSideDishOccurrenceIDs adds the "side_dish_occurrence" edge to the Occurrence entity by ids.
func (*DishMutation) AddedEdges ¶
func (m *DishMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DishMutation) AddedField ¶
func (m *DishMutation) 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 (*DishMutation) AddedFields ¶
func (m *DishMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DishMutation) AddedIDs ¶
func (m *DishMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DishMutation) AliasesCleared ¶
func (m *DishMutation) AliasesCleared() bool
AliasesCleared reports if the "aliases" edge to the DishAlias entity was cleared.
func (*DishMutation) AliasesIDs ¶
func (m *DishMutation) AliasesIDs() (ids []string)
AliasesIDs returns the "aliases" edge IDs in the mutation.
func (*DishMutation) ClearAliases ¶
func (m *DishMutation) ClearAliases()
ClearAliases clears the "aliases" edge to the DishAlias entity.
func (*DishMutation) ClearDishOccurrences ¶
func (m *DishMutation) ClearDishOccurrences()
ClearDishOccurrences clears the "dish_occurrences" edge to the Occurrence entity.
func (*DishMutation) ClearEdge ¶
func (m *DishMutation) 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 (*DishMutation) ClearField ¶
func (m *DishMutation) 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 (*DishMutation) ClearNameEn ¶
func (m *DishMutation) ClearNameEn()
ClearNameEn clears the value of the "name_en" field.
func (*DishMutation) ClearSideDishOccurrence ¶
func (m *DishMutation) ClearSideDishOccurrence()
ClearSideDishOccurrence clears the "side_dish_occurrence" edge to the Occurrence entity.
func (*DishMutation) ClearedEdges ¶
func (m *DishMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DishMutation) ClearedFields ¶
func (m *DishMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DishMutation) Client ¶
func (m DishMutation) 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 (*DishMutation) DishOccurrencesCleared ¶
func (m *DishMutation) DishOccurrencesCleared() bool
DishOccurrencesCleared reports if the "dish_occurrences" edge to the Occurrence entity was cleared.
func (*DishMutation) DishOccurrencesIDs ¶
func (m *DishMutation) DishOccurrencesIDs() (ids []uuid.UUID)
DishOccurrencesIDs returns the "dish_occurrences" edge IDs in the mutation.
func (*DishMutation) EdgeCleared ¶
func (m *DishMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DishMutation) Field ¶
func (m *DishMutation) 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 (*DishMutation) FieldCleared ¶
func (m *DishMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DishMutation) Fields ¶
func (m *DishMutation) 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 (*DishMutation) ID ¶
func (m *DishMutation) 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 (*DishMutation) 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 (*DishMutation) NameDe ¶
func (m *DishMutation) NameDe() (r string, exists bool)
NameDe returns the value of the "name_de" field in the mutation.
func (*DishMutation) NameEn ¶
func (m *DishMutation) NameEn() (r string, exists bool)
NameEn returns the value of the "name_en" field in the mutation.
func (*DishMutation) NameEnCleared ¶
func (m *DishMutation) NameEnCleared() bool
NameEnCleared returns if the "name_en" field was cleared in this mutation.
func (*DishMutation) 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 (*DishMutation) OldNameDe ¶
func (m *DishMutation) OldNameDe(ctx context.Context) (v string, err error)
OldNameDe returns the old "name_de" field's value of the Dish entity. If the Dish 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 (*DishMutation) OldNameEn ¶
func (m *DishMutation) OldNameEn(ctx context.Context) (v *string, err error)
OldNameEn returns the old "name_en" field's value of the Dish entity. If the Dish 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 (*DishMutation) RemoveAliasIDs ¶
func (m *DishMutation) RemoveAliasIDs(ids ...string)
RemoveAliasIDs removes the "aliases" edge to the DishAlias entity by IDs.
func (*DishMutation) RemoveDishOccurrenceIDs ¶
func (m *DishMutation) RemoveDishOccurrenceIDs(ids ...uuid.UUID)
RemoveDishOccurrenceIDs removes the "dish_occurrences" edge to the Occurrence entity by IDs.
func (*DishMutation) RemoveSideDishOccurrenceIDs ¶
func (m *DishMutation) RemoveSideDishOccurrenceIDs(ids ...uuid.UUID)
RemoveSideDishOccurrenceIDs removes the "side_dish_occurrence" edge to the Occurrence entity by IDs.
func (*DishMutation) RemovedAliasesIDs ¶
func (m *DishMutation) RemovedAliasesIDs() (ids []string)
RemovedAliases returns the removed IDs of the "aliases" edge to the DishAlias entity.
func (*DishMutation) RemovedDishOccurrencesIDs ¶
func (m *DishMutation) RemovedDishOccurrencesIDs() (ids []uuid.UUID)
RemovedDishOccurrences returns the removed IDs of the "dish_occurrences" edge to the Occurrence entity.
func (*DishMutation) RemovedEdges ¶
func (m *DishMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DishMutation) RemovedIDs ¶
func (m *DishMutation) 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 (*DishMutation) RemovedSideDishOccurrenceIDs ¶
func (m *DishMutation) RemovedSideDishOccurrenceIDs() (ids []uuid.UUID)
RemovedSideDishOccurrence returns the removed IDs of the "side_dish_occurrence" edge to the Occurrence entity.
func (*DishMutation) ResetAliases ¶
func (m *DishMutation) ResetAliases()
ResetAliases resets all changes to the "aliases" edge.
func (*DishMutation) ResetDishOccurrences ¶
func (m *DishMutation) ResetDishOccurrences()
ResetDishOccurrences resets all changes to the "dish_occurrences" edge.
func (*DishMutation) ResetEdge ¶
func (m *DishMutation) 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 (*DishMutation) ResetField ¶
func (m *DishMutation) 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 (*DishMutation) ResetNameDe ¶
func (m *DishMutation) ResetNameDe()
ResetNameDe resets all changes to the "name_de" field.
func (*DishMutation) ResetNameEn ¶
func (m *DishMutation) ResetNameEn()
ResetNameEn resets all changes to the "name_en" field.
func (*DishMutation) ResetSideDishOccurrence ¶
func (m *DishMutation) ResetSideDishOccurrence()
ResetSideDishOccurrence resets all changes to the "side_dish_occurrence" edge.
func (*DishMutation) SetField ¶
func (m *DishMutation) 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 (*DishMutation) SetID ¶
func (m *DishMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Dish entities.
func (*DishMutation) SetNameDe ¶
func (m *DishMutation) SetNameDe(s string)
SetNameDe sets the "name_de" field.
func (*DishMutation) SetNameEn ¶
func (m *DishMutation) SetNameEn(s string)
SetNameEn sets the "name_en" field.
func (*DishMutation) SetOp ¶
func (m *DishMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DishMutation) SideDishOccurrenceCleared ¶
func (m *DishMutation) SideDishOccurrenceCleared() bool
SideDishOccurrenceCleared reports if the "side_dish_occurrence" edge to the Occurrence entity was cleared.
func (*DishMutation) SideDishOccurrenceIDs ¶
func (m *DishMutation) SideDishOccurrenceIDs() (ids []uuid.UUID)
SideDishOccurrenceIDs returns the "side_dish_occurrence" edge IDs in the mutation.
func (DishMutation) Tx ¶
func (m DishMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DishMutation) Type ¶
func (m *DishMutation) Type() string
Type returns the node type of this mutation (Dish).
func (*DishMutation) Where ¶
func (m *DishMutation) Where(ps ...predicate.Dish)
Where appends a list predicates to the DishMutation builder.
func (*DishMutation) WhereP ¶
func (m *DishMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DishMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DishQuery ¶
type DishQuery struct {
// contains filtered or unexported fields
}
DishQuery is the builder for querying Dish entities.
func (*DishQuery) Aggregate ¶
func (dq *DishQuery) Aggregate(fns ...AggregateFunc) *DishSelect
Aggregate returns a DishSelect configured with the given aggregations.
func (*DishQuery) Clone ¶
Clone returns a duplicate of the DishQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DishQuery) First ¶
First returns the first Dish entity from the query. Returns a *NotFoundError when no Dish was found.
func (*DishQuery) FirstID ¶
FirstID returns the first Dish ID from the query. Returns a *NotFoundError when no Dish ID was found.
func (*DishQuery) GroupBy ¶
func (dq *DishQuery) GroupBy(field string, fields ...string) *DishGroupBy
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 { NameDe string `json:"name_de,omitempty"` Count int `json:"count,omitempty"` } client.Dish.Query(). GroupBy(dish.FieldNameDe). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DishQuery) Only ¶
Only returns a single Dish entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Dish entity is found. Returns a *NotFoundError when no Dish entities are found.
func (*DishQuery) OnlyID ¶
OnlyID is like Only, but returns the only Dish ID in the query. Returns a *NotSingularError when more than one Dish ID is found. Returns a *NotFoundError when no entities are found.
func (*DishQuery) Order ¶
func (dq *DishQuery) Order(o ...dish.OrderOption) *DishQuery
Order specifies how the records should be ordered.
func (*DishQuery) QueryAliases ¶
func (dq *DishQuery) QueryAliases() *DishAliasQuery
QueryAliases chains the current query on the "aliases" edge.
func (*DishQuery) QueryDishOccurrences ¶
func (dq *DishQuery) QueryDishOccurrences() *OccurrenceQuery
QueryDishOccurrences chains the current query on the "dish_occurrences" edge.
func (*DishQuery) QuerySideDishOccurrence ¶
func (dq *DishQuery) QuerySideDishOccurrence() *OccurrenceQuery
QuerySideDishOccurrence chains the current query on the "side_dish_occurrence" edge.
func (*DishQuery) Select ¶
func (dq *DishQuery) Select(fields ...string) *DishSelect
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 { NameDe string `json:"name_de,omitempty"` } client.Dish.Query(). Select(dish.FieldNameDe). Scan(ctx, &v)
func (*DishQuery) 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 (*DishQuery) WithAliases ¶
func (dq *DishQuery) WithAliases(opts ...func(*DishAliasQuery)) *DishQuery
WithAliases tells the query-builder to eager-load the nodes that are connected to the "aliases" edge. The optional arguments are used to configure the query builder of the edge.
func (*DishQuery) WithDishOccurrences ¶
func (dq *DishQuery) WithDishOccurrences(opts ...func(*OccurrenceQuery)) *DishQuery
WithDishOccurrences tells the query-builder to eager-load the nodes that are connected to the "dish_occurrences" edge. The optional arguments are used to configure the query builder of the edge.
func (*DishQuery) WithSideDishOccurrence ¶
func (dq *DishQuery) WithSideDishOccurrence(opts ...func(*OccurrenceQuery)) *DishQuery
WithSideDishOccurrence tells the query-builder to eager-load the nodes that are connected to the "side_dish_occurrence" edge. The optional arguments are used to configure the query builder of the edge.
type DishSelect ¶
type DishSelect struct { *DishQuery // contains filtered or unexported fields }
DishSelect is the builder for selecting fields of Dish entities.
func (*DishSelect) Aggregate ¶
func (ds *DishSelect) Aggregate(fns ...AggregateFunc) *DishSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DishSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DishSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DishSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DishSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DishSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DishSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DishSelect) Scan ¶
func (ds *DishSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DishSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DishUpdate ¶
type DishUpdate struct {
// contains filtered or unexported fields
}
DishUpdate is the builder for updating Dish entities.
func (*DishUpdate) AddAliasIDs ¶
func (du *DishUpdate) AddAliasIDs(ids ...string) *DishUpdate
AddAliasIDs adds the "aliases" edge to the DishAlias entity by IDs.
func (*DishUpdate) AddAliases ¶
func (du *DishUpdate) AddAliases(d ...*DishAlias) *DishUpdate
AddAliases adds the "aliases" edges to the DishAlias entity.
func (*DishUpdate) AddDishOccurrenceIDs ¶
func (du *DishUpdate) AddDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
AddDishOccurrenceIDs adds the "dish_occurrences" edge to the Occurrence entity by IDs.
func (*DishUpdate) AddDishOccurrences ¶
func (du *DishUpdate) AddDishOccurrences(o ...*Occurrence) *DishUpdate
AddDishOccurrences adds the "dish_occurrences" edges to the Occurrence entity.
func (*DishUpdate) AddSideDishOccurrence ¶
func (du *DishUpdate) AddSideDishOccurrence(o ...*Occurrence) *DishUpdate
AddSideDishOccurrence adds the "side_dish_occurrence" edges to the Occurrence entity.
func (*DishUpdate) AddSideDishOccurrenceIDs ¶
func (du *DishUpdate) AddSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
AddSideDishOccurrenceIDs adds the "side_dish_occurrence" edge to the Occurrence entity by IDs.
func (*DishUpdate) ClearAliases ¶
func (du *DishUpdate) ClearAliases() *DishUpdate
ClearAliases clears all "aliases" edges to the DishAlias entity.
func (*DishUpdate) ClearDishOccurrences ¶
func (du *DishUpdate) ClearDishOccurrences() *DishUpdate
ClearDishOccurrences clears all "dish_occurrences" edges to the Occurrence entity.
func (*DishUpdate) ClearNameEn ¶
func (du *DishUpdate) ClearNameEn() *DishUpdate
ClearNameEn clears the value of the "name_en" field.
func (*DishUpdate) ClearSideDishOccurrence ¶
func (du *DishUpdate) ClearSideDishOccurrence() *DishUpdate
ClearSideDishOccurrence clears all "side_dish_occurrence" edges to the Occurrence entity.
func (*DishUpdate) Exec ¶
func (du *DishUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DishUpdate) ExecX ¶
func (du *DishUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishUpdate) Mutation ¶
func (du *DishUpdate) Mutation() *DishMutation
Mutation returns the DishMutation object of the builder.
func (*DishUpdate) RemoveAliasIDs ¶
func (du *DishUpdate) RemoveAliasIDs(ids ...string) *DishUpdate
RemoveAliasIDs removes the "aliases" edge to DishAlias entities by IDs.
func (*DishUpdate) RemoveAliases ¶
func (du *DishUpdate) RemoveAliases(d ...*DishAlias) *DishUpdate
RemoveAliases removes "aliases" edges to DishAlias entities.
func (*DishUpdate) RemoveDishOccurrenceIDs ¶
func (du *DishUpdate) RemoveDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
RemoveDishOccurrenceIDs removes the "dish_occurrences" edge to Occurrence entities by IDs.
func (*DishUpdate) RemoveDishOccurrences ¶
func (du *DishUpdate) RemoveDishOccurrences(o ...*Occurrence) *DishUpdate
RemoveDishOccurrences removes "dish_occurrences" edges to Occurrence entities.
func (*DishUpdate) RemoveSideDishOccurrence ¶
func (du *DishUpdate) RemoveSideDishOccurrence(o ...*Occurrence) *DishUpdate
RemoveSideDishOccurrence removes "side_dish_occurrence" edges to Occurrence entities.
func (*DishUpdate) RemoveSideDishOccurrenceIDs ¶
func (du *DishUpdate) RemoveSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdate
RemoveSideDishOccurrenceIDs removes the "side_dish_occurrence" edge to Occurrence entities by IDs.
func (*DishUpdate) Save ¶
func (du *DishUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DishUpdate) SaveX ¶
func (du *DishUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DishUpdate) SetNameDe ¶
func (du *DishUpdate) SetNameDe(s string) *DishUpdate
SetNameDe sets the "name_de" field.
func (*DishUpdate) SetNameEn ¶
func (du *DishUpdate) SetNameEn(s string) *DishUpdate
SetNameEn sets the "name_en" field.
func (*DishUpdate) SetNillableNameEn ¶
func (du *DishUpdate) SetNillableNameEn(s *string) *DishUpdate
SetNillableNameEn sets the "name_en" field if the given value is not nil.
func (*DishUpdate) Where ¶
func (du *DishUpdate) Where(ps ...predicate.Dish) *DishUpdate
Where appends a list predicates to the DishUpdate builder.
type DishUpdateOne ¶
type DishUpdateOne struct {
// contains filtered or unexported fields
}
DishUpdateOne is the builder for updating a single Dish entity.
func (*DishUpdateOne) AddAliasIDs ¶
func (duo *DishUpdateOne) AddAliasIDs(ids ...string) *DishUpdateOne
AddAliasIDs adds the "aliases" edge to the DishAlias entity by IDs.
func (*DishUpdateOne) AddAliases ¶
func (duo *DishUpdateOne) AddAliases(d ...*DishAlias) *DishUpdateOne
AddAliases adds the "aliases" edges to the DishAlias entity.
func (*DishUpdateOne) AddDishOccurrenceIDs ¶
func (duo *DishUpdateOne) AddDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
AddDishOccurrenceIDs adds the "dish_occurrences" edge to the Occurrence entity by IDs.
func (*DishUpdateOne) AddDishOccurrences ¶
func (duo *DishUpdateOne) AddDishOccurrences(o ...*Occurrence) *DishUpdateOne
AddDishOccurrences adds the "dish_occurrences" edges to the Occurrence entity.
func (*DishUpdateOne) AddSideDishOccurrence ¶
func (duo *DishUpdateOne) AddSideDishOccurrence(o ...*Occurrence) *DishUpdateOne
AddSideDishOccurrence adds the "side_dish_occurrence" edges to the Occurrence entity.
func (*DishUpdateOne) AddSideDishOccurrenceIDs ¶
func (duo *DishUpdateOne) AddSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
AddSideDishOccurrenceIDs adds the "side_dish_occurrence" edge to the Occurrence entity by IDs.
func (*DishUpdateOne) ClearAliases ¶
func (duo *DishUpdateOne) ClearAliases() *DishUpdateOne
ClearAliases clears all "aliases" edges to the DishAlias entity.
func (*DishUpdateOne) ClearDishOccurrences ¶
func (duo *DishUpdateOne) ClearDishOccurrences() *DishUpdateOne
ClearDishOccurrences clears all "dish_occurrences" edges to the Occurrence entity.
func (*DishUpdateOne) ClearNameEn ¶
func (duo *DishUpdateOne) ClearNameEn() *DishUpdateOne
ClearNameEn clears the value of the "name_en" field.
func (*DishUpdateOne) ClearSideDishOccurrence ¶
func (duo *DishUpdateOne) ClearSideDishOccurrence() *DishUpdateOne
ClearSideDishOccurrence clears all "side_dish_occurrence" edges to the Occurrence entity.
func (*DishUpdateOne) Exec ¶
func (duo *DishUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DishUpdateOne) ExecX ¶
func (duo *DishUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishUpdateOne) Mutation ¶
func (duo *DishUpdateOne) Mutation() *DishMutation
Mutation returns the DishMutation object of the builder.
func (*DishUpdateOne) RemoveAliasIDs ¶
func (duo *DishUpdateOne) RemoveAliasIDs(ids ...string) *DishUpdateOne
RemoveAliasIDs removes the "aliases" edge to DishAlias entities by IDs.
func (*DishUpdateOne) RemoveAliases ¶
func (duo *DishUpdateOne) RemoveAliases(d ...*DishAlias) *DishUpdateOne
RemoveAliases removes "aliases" edges to DishAlias entities.
func (*DishUpdateOne) RemoveDishOccurrenceIDs ¶
func (duo *DishUpdateOne) RemoveDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
RemoveDishOccurrenceIDs removes the "dish_occurrences" edge to Occurrence entities by IDs.
func (*DishUpdateOne) RemoveDishOccurrences ¶
func (duo *DishUpdateOne) RemoveDishOccurrences(o ...*Occurrence) *DishUpdateOne
RemoveDishOccurrences removes "dish_occurrences" edges to Occurrence entities.
func (*DishUpdateOne) RemoveSideDishOccurrence ¶
func (duo *DishUpdateOne) RemoveSideDishOccurrence(o ...*Occurrence) *DishUpdateOne
RemoveSideDishOccurrence removes "side_dish_occurrence" edges to Occurrence entities.
func (*DishUpdateOne) RemoveSideDishOccurrenceIDs ¶
func (duo *DishUpdateOne) RemoveSideDishOccurrenceIDs(ids ...uuid.UUID) *DishUpdateOne
RemoveSideDishOccurrenceIDs removes the "side_dish_occurrence" edge to Occurrence entities by IDs.
func (*DishUpdateOne) Save ¶
func (duo *DishUpdateOne) Save(ctx context.Context) (*Dish, error)
Save executes the query and returns the updated Dish entity.
func (*DishUpdateOne) SaveX ¶
func (duo *DishUpdateOne) SaveX(ctx context.Context) *Dish
SaveX is like Save, but panics if an error occurs.
func (*DishUpdateOne) Select ¶
func (duo *DishUpdateOne) Select(field string, fields ...string) *DishUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DishUpdateOne) SetNameDe ¶
func (duo *DishUpdateOne) SetNameDe(s string) *DishUpdateOne
SetNameDe sets the "name_de" field.
func (*DishUpdateOne) SetNameEn ¶
func (duo *DishUpdateOne) SetNameEn(s string) *DishUpdateOne
SetNameEn sets the "name_en" field.
func (*DishUpdateOne) SetNillableNameEn ¶
func (duo *DishUpdateOne) SetNillableNameEn(s *string) *DishUpdateOne
SetNillableNameEn sets the "name_en" field if the given value is not nil.
func (*DishUpdateOne) Where ¶
func (duo *DishUpdateOne) Where(ps ...predicate.Dish) *DishUpdateOne
Where appends a list predicates to the DishUpdate builder.
type DishUpsert ¶
DishUpsert is the "OnConflict" setter.
func (*DishUpsert) ClearNameEn ¶
func (u *DishUpsert) ClearNameEn() *DishUpsert
ClearNameEn clears the value of the "name_en" field.
func (*DishUpsert) SetNameDe ¶
func (u *DishUpsert) SetNameDe(v string) *DishUpsert
SetNameDe sets the "name_de" field.
func (*DishUpsert) SetNameEn ¶
func (u *DishUpsert) SetNameEn(v string) *DishUpsert
SetNameEn sets the "name_en" field.
func (*DishUpsert) UpdateNameDe ¶
func (u *DishUpsert) UpdateNameDe() *DishUpsert
UpdateNameDe sets the "name_de" field to the value that was provided on create.
func (*DishUpsert) UpdateNameEn ¶
func (u *DishUpsert) UpdateNameEn() *DishUpsert
UpdateNameEn sets the "name_en" field to the value that was provided on create.
type DishUpsertBulk ¶
type DishUpsertBulk struct {
// contains filtered or unexported fields
}
DishUpsertBulk is the builder for "upsert"-ing a bulk of Dish nodes.
func (*DishUpsertBulk) ClearNameEn ¶
func (u *DishUpsertBulk) ClearNameEn() *DishUpsertBulk
ClearNameEn clears the value of the "name_en" field.
func (*DishUpsertBulk) DoNothing ¶
func (u *DishUpsertBulk) DoNothing() *DishUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DishUpsertBulk) Exec ¶
func (u *DishUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DishUpsertBulk) ExecX ¶
func (u *DishUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishUpsertBulk) Ignore ¶
func (u *DishUpsertBulk) Ignore() *DishUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Dish.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DishUpsertBulk) SetNameDe ¶
func (u *DishUpsertBulk) SetNameDe(v string) *DishUpsertBulk
SetNameDe sets the "name_de" field.
func (*DishUpsertBulk) SetNameEn ¶
func (u *DishUpsertBulk) SetNameEn(v string) *DishUpsertBulk
SetNameEn sets the "name_en" field.
func (*DishUpsertBulk) Update ¶
func (u *DishUpsertBulk) Update(set func(*DishUpsert)) *DishUpsertBulk
Update allows overriding fields `UPDATE` values. See the DishCreateBulk.OnConflict documentation for more info.
func (*DishUpsertBulk) UpdateNameDe ¶
func (u *DishUpsertBulk) UpdateNameDe() *DishUpsertBulk
UpdateNameDe sets the "name_de" field to the value that was provided on create.
func (*DishUpsertBulk) UpdateNameEn ¶
func (u *DishUpsertBulk) UpdateNameEn() *DishUpsertBulk
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*DishUpsertBulk) UpdateNewValues ¶
func (u *DishUpsertBulk) UpdateNewValues() *DishUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Dish.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(dish.FieldID) }), ). Exec(ctx)
type DishUpsertOne ¶
type DishUpsertOne struct {
// contains filtered or unexported fields
}
DishUpsertOne is the builder for "upsert"-ing
one Dish node.
func (*DishUpsertOne) ClearNameEn ¶
func (u *DishUpsertOne) ClearNameEn() *DishUpsertOne
ClearNameEn clears the value of the "name_en" field.
func (*DishUpsertOne) DoNothing ¶
func (u *DishUpsertOne) DoNothing() *DishUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DishUpsertOne) Exec ¶
func (u *DishUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DishUpsertOne) ExecX ¶
func (u *DishUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DishUpsertOne) IDX ¶
func (u *DishUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*DishUpsertOne) Ignore ¶
func (u *DishUpsertOne) Ignore() *DishUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Dish.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DishUpsertOne) SetNameDe ¶
func (u *DishUpsertOne) SetNameDe(v string) *DishUpsertOne
SetNameDe sets the "name_de" field.
func (*DishUpsertOne) SetNameEn ¶
func (u *DishUpsertOne) SetNameEn(v string) *DishUpsertOne
SetNameEn sets the "name_en" field.
func (*DishUpsertOne) Update ¶
func (u *DishUpsertOne) Update(set func(*DishUpsert)) *DishUpsertOne
Update allows overriding fields `UPDATE` values. See the DishCreate.OnConflict documentation for more info.
func (*DishUpsertOne) UpdateNameDe ¶
func (u *DishUpsertOne) UpdateNameDe() *DishUpsertOne
UpdateNameDe sets the "name_de" field to the value that was provided on create.
func (*DishUpsertOne) UpdateNameEn ¶
func (u *DishUpsertOne) UpdateNameEn() *DishUpsertOne
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*DishUpsertOne) UpdateNewValues ¶
func (u *DishUpsertOne) UpdateNewValues() *DishUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Dish.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(dish.FieldID) }), ). Exec(ctx)
type Image ¶
type Image struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // ImageHash holds the value of the "image_hash" field. ImageHash string `json:"image_hash,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ImageQuery when eager-loading is set. Edges ImageEdges `json:"edges"` // contains filtered or unexported fields }
Image is the model entity for the Image schema.
func (*Image) QueryReview ¶
func (i *Image) QueryReview() *ReviewQuery
QueryReview queries the "review" edge of the Image entity.
func (*Image) Unwrap ¶
Unwrap unwraps the Image 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 (*Image) Update ¶
func (i *Image) Update() *ImageUpdateOne
Update returns a builder for updating this Image. Note that you need to call Image.Unwrap() before calling this method if this Image was returned from a transaction, and the transaction was committed or rolled back.
type ImageClient ¶
type ImageClient struct {
// contains filtered or unexported fields
}
ImageClient is a client for the Image schema.
func NewImageClient ¶
func NewImageClient(c config) *ImageClient
NewImageClient returns a client for the Image from the given config.
func (*ImageClient) Create ¶
func (c *ImageClient) Create() *ImageCreate
Create returns a builder for creating a Image entity.
func (*ImageClient) CreateBulk ¶
func (c *ImageClient) CreateBulk(builders ...*ImageCreate) *ImageCreateBulk
CreateBulk returns a builder for creating a bulk of Image entities.
func (*ImageClient) Delete ¶
func (c *ImageClient) Delete() *ImageDelete
Delete returns a delete builder for Image.
func (*ImageClient) DeleteOne ¶
func (c *ImageClient) DeleteOne(i *Image) *ImageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ImageClient) DeleteOneID ¶
func (c *ImageClient) DeleteOneID(id uuid.UUID) *ImageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ImageClient) Intercept ¶
func (c *ImageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `image.Intercept(f(g(h())))`.
func (*ImageClient) Interceptors ¶
func (c *ImageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ImageClient) Query ¶
func (c *ImageClient) Query() *ImageQuery
Query returns a query builder for Image.
func (*ImageClient) QueryReview ¶
func (c *ImageClient) QueryReview(i *Image) *ReviewQuery
QueryReview queries the review edge of a Image.
func (*ImageClient) Update ¶
func (c *ImageClient) Update() *ImageUpdate
Update returns an update builder for Image.
func (*ImageClient) UpdateOne ¶
func (c *ImageClient) UpdateOne(i *Image) *ImageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ImageClient) UpdateOneID ¶
func (c *ImageClient) UpdateOneID(id uuid.UUID) *ImageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ImageClient) Use ¶
func (c *ImageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `image.Hooks(f(g(h())))`.
type ImageCreate ¶
type ImageCreate struct {
// contains filtered or unexported fields
}
ImageCreate is the builder for creating a Image entity.
func (*ImageCreate) Exec ¶
func (ic *ImageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ImageCreate) ExecX ¶
func (ic *ImageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImageCreate) Mutation ¶
func (ic *ImageCreate) Mutation() *ImageMutation
Mutation returns the ImageMutation object of the builder.
func (*ImageCreate) OnConflict ¶
func (ic *ImageCreate) OnConflict(opts ...sql.ConflictOption) *ImageUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Image.Create(). SetImageHash(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ImageUpsert) { SetImageHash(v+v). }). Exec(ctx)
func (*ImageCreate) OnConflictColumns ¶
func (ic *ImageCreate) OnConflictColumns(columns ...string) *ImageUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Image.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ImageCreate) Save ¶
func (ic *ImageCreate) Save(ctx context.Context) (*Image, error)
Save creates the Image in the database.
func (*ImageCreate) SaveX ¶
func (ic *ImageCreate) SaveX(ctx context.Context) *Image
SaveX calls Save and panics if Save returns an error.
func (*ImageCreate) SetID ¶
func (ic *ImageCreate) SetID(u uuid.UUID) *ImageCreate
SetID sets the "id" field.
func (*ImageCreate) SetImageHash ¶
func (ic *ImageCreate) SetImageHash(s string) *ImageCreate
SetImageHash sets the "image_hash" field.
func (*ImageCreate) SetNillableID ¶
func (ic *ImageCreate) SetNillableID(u *uuid.UUID) *ImageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ImageCreate) SetReview ¶
func (ic *ImageCreate) SetReview(r *Review) *ImageCreate
SetReview sets the "review" edge to the Review entity.
func (*ImageCreate) SetReviewID ¶
func (ic *ImageCreate) SetReviewID(id uuid.UUID) *ImageCreate
SetReviewID sets the "review" edge to the Review entity by ID.
type ImageCreateBulk ¶
type ImageCreateBulk struct {
// contains filtered or unexported fields
}
ImageCreateBulk is the builder for creating many Image entities in bulk.
func (*ImageCreateBulk) Exec ¶
func (icb *ImageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ImageCreateBulk) ExecX ¶
func (icb *ImageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImageCreateBulk) OnConflict ¶
func (icb *ImageCreateBulk) OnConflict(opts ...sql.ConflictOption) *ImageUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Image.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ImageUpsert) { SetImageHash(v+v). }). Exec(ctx)
func (*ImageCreateBulk) OnConflictColumns ¶
func (icb *ImageCreateBulk) OnConflictColumns(columns ...string) *ImageUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Image.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ImageDelete ¶
type ImageDelete struct {
// contains filtered or unexported fields
}
ImageDelete is the builder for deleting a Image entity.
func (*ImageDelete) Exec ¶
func (id *ImageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ImageDelete) ExecX ¶
func (id *ImageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ImageDelete) Where ¶
func (id *ImageDelete) Where(ps ...predicate.Image) *ImageDelete
Where appends a list predicates to the ImageDelete builder.
type ImageDeleteOne ¶
type ImageDeleteOne struct {
// contains filtered or unexported fields
}
ImageDeleteOne is the builder for deleting a single Image entity.
func (*ImageDeleteOne) Exec ¶
func (ido *ImageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ImageDeleteOne) ExecX ¶
func (ido *ImageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImageDeleteOne) Where ¶
func (ido *ImageDeleteOne) Where(ps ...predicate.Image) *ImageDeleteOne
Where appends a list predicates to the ImageDelete builder.
type ImageEdges ¶
type ImageEdges struct { // Review holds the value of the review edge. Review *Review `json:"review,omitempty"` // contains filtered or unexported fields }
ImageEdges holds the relations/edges for other nodes in the graph.
func (ImageEdges) ReviewOrErr ¶
func (e ImageEdges) ReviewOrErr() (*Review, error)
ReviewOrErr returns the Review value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ImageGroupBy ¶
type ImageGroupBy struct {
// contains filtered or unexported fields
}
ImageGroupBy is the group-by builder for Image entities.
func (*ImageGroupBy) Aggregate ¶
func (igb *ImageGroupBy) Aggregate(fns ...AggregateFunc) *ImageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ImageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ImageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ImageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ImageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ImageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ImageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ImageGroupBy) Scan ¶
func (igb *ImageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ImageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ImageMutation ¶
type ImageMutation struct {
// contains filtered or unexported fields
}
ImageMutation represents an operation that mutates the Image nodes in the graph.
func (*ImageMutation) AddField ¶
func (m *ImageMutation) 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 (*ImageMutation) AddedEdges ¶
func (m *ImageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ImageMutation) AddedField ¶
func (m *ImageMutation) 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 (*ImageMutation) AddedFields ¶
func (m *ImageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ImageMutation) AddedIDs ¶
func (m *ImageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ImageMutation) ClearEdge ¶
func (m *ImageMutation) 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 (*ImageMutation) ClearField ¶
func (m *ImageMutation) 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 (*ImageMutation) ClearReview ¶
func (m *ImageMutation) ClearReview()
ClearReview clears the "review" edge to the Review entity.
func (*ImageMutation) ClearedEdges ¶
func (m *ImageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ImageMutation) ClearedFields ¶
func (m *ImageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ImageMutation) Client ¶
func (m ImageMutation) 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 (*ImageMutation) EdgeCleared ¶
func (m *ImageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ImageMutation) Field ¶
func (m *ImageMutation) 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 (*ImageMutation) FieldCleared ¶
func (m *ImageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ImageMutation) Fields ¶
func (m *ImageMutation) 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 (*ImageMutation) ID ¶
func (m *ImageMutation) 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 (*ImageMutation) 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 (*ImageMutation) ImageHash ¶
func (m *ImageMutation) ImageHash() (r string, exists bool)
ImageHash returns the value of the "image_hash" field in the mutation.
func (*ImageMutation) 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 (*ImageMutation) OldImageHash ¶
func (m *ImageMutation) OldImageHash(ctx context.Context) (v string, err error)
OldImageHash returns the old "image_hash" field's value of the Image entity. If the Image 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 (*ImageMutation) RemovedEdges ¶
func (m *ImageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ImageMutation) RemovedIDs ¶
func (m *ImageMutation) 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 (*ImageMutation) ResetEdge ¶
func (m *ImageMutation) 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 (*ImageMutation) ResetField ¶
func (m *ImageMutation) 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 (*ImageMutation) ResetImageHash ¶
func (m *ImageMutation) ResetImageHash()
ResetImageHash resets all changes to the "image_hash" field.
func (*ImageMutation) ResetReview ¶
func (m *ImageMutation) ResetReview()
ResetReview resets all changes to the "review" edge.
func (*ImageMutation) ReviewCleared ¶
func (m *ImageMutation) ReviewCleared() bool
ReviewCleared reports if the "review" edge to the Review entity was cleared.
func (*ImageMutation) ReviewID ¶
func (m *ImageMutation) ReviewID() (id uuid.UUID, exists bool)
ReviewID returns the "review" edge ID in the mutation.
func (*ImageMutation) ReviewIDs ¶
func (m *ImageMutation) ReviewIDs() (ids []uuid.UUID)
ReviewIDs returns the "review" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ReviewID instead. It exists only for internal usage by the builders.
func (*ImageMutation) SetField ¶
func (m *ImageMutation) 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 (*ImageMutation) SetID ¶
func (m *ImageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Image entities.
func (*ImageMutation) SetImageHash ¶
func (m *ImageMutation) SetImageHash(s string)
SetImageHash sets the "image_hash" field.
func (*ImageMutation) SetOp ¶
func (m *ImageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ImageMutation) SetReviewID ¶
func (m *ImageMutation) SetReviewID(id uuid.UUID)
SetReviewID sets the "review" edge to the Review entity by id.
func (ImageMutation) Tx ¶
func (m ImageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ImageMutation) Type ¶
func (m *ImageMutation) Type() string
Type returns the node type of this mutation (Image).
func (*ImageMutation) Where ¶
func (m *ImageMutation) Where(ps ...predicate.Image)
Where appends a list predicates to the ImageMutation builder.
func (*ImageMutation) WhereP ¶
func (m *ImageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ImageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ImageQuery ¶
type ImageQuery struct {
// contains filtered or unexported fields
}
ImageQuery is the builder for querying Image entities.
func (*ImageQuery) Aggregate ¶
func (iq *ImageQuery) Aggregate(fns ...AggregateFunc) *ImageSelect
Aggregate returns a ImageSelect configured with the given aggregations.
func (*ImageQuery) All ¶
func (iq *ImageQuery) All(ctx context.Context) ([]*Image, error)
All executes the query and returns a list of Images.
func (*ImageQuery) AllX ¶
func (iq *ImageQuery) AllX(ctx context.Context) []*Image
AllX is like All, but panics if an error occurs.
func (*ImageQuery) Clone ¶
func (iq *ImageQuery) Clone() *ImageQuery
Clone returns a duplicate of the ImageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ImageQuery) Count ¶
func (iq *ImageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ImageQuery) CountX ¶
func (iq *ImageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ImageQuery) Exist ¶
func (iq *ImageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ImageQuery) ExistX ¶
func (iq *ImageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ImageQuery) First ¶
func (iq *ImageQuery) First(ctx context.Context) (*Image, error)
First returns the first Image entity from the query. Returns a *NotFoundError when no Image was found.
func (*ImageQuery) FirstID ¶
FirstID returns the first Image ID from the query. Returns a *NotFoundError when no Image ID was found.
func (*ImageQuery) FirstIDX ¶
func (iq *ImageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ImageQuery) FirstX ¶
func (iq *ImageQuery) FirstX(ctx context.Context) *Image
FirstX is like First, but panics if an error occurs.
func (*ImageQuery) GroupBy ¶
func (iq *ImageQuery) GroupBy(field string, fields ...string) *ImageGroupBy
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 { ImageHash string `json:"image_hash,omitempty"` Count int `json:"count,omitempty"` } client.Image.Query(). GroupBy(image.FieldImageHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ImageQuery) IDsX ¶
func (iq *ImageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ImageQuery) Limit ¶
func (iq *ImageQuery) Limit(limit int) *ImageQuery
Limit the number of records to be returned by this query.
func (*ImageQuery) Offset ¶
func (iq *ImageQuery) Offset(offset int) *ImageQuery
Offset to start from.
func (*ImageQuery) Only ¶
func (iq *ImageQuery) Only(ctx context.Context) (*Image, error)
Only returns a single Image entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Image entity is found. Returns a *NotFoundError when no Image entities are found.
func (*ImageQuery) OnlyID ¶
OnlyID is like Only, but returns the only Image ID in the query. Returns a *NotSingularError when more than one Image ID is found. Returns a *NotFoundError when no entities are found.
func (*ImageQuery) OnlyIDX ¶
func (iq *ImageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ImageQuery) OnlyX ¶
func (iq *ImageQuery) OnlyX(ctx context.Context) *Image
OnlyX is like Only, but panics if an error occurs.
func (*ImageQuery) Order ¶
func (iq *ImageQuery) Order(o ...image.OrderOption) *ImageQuery
Order specifies how the records should be ordered.
func (*ImageQuery) QueryReview ¶
func (iq *ImageQuery) QueryReview() *ReviewQuery
QueryReview chains the current query on the "review" edge.
func (*ImageQuery) Select ¶
func (iq *ImageQuery) Select(fields ...string) *ImageSelect
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 { ImageHash string `json:"image_hash,omitempty"` } client.Image.Query(). Select(image.FieldImageHash). Scan(ctx, &v)
func (*ImageQuery) Unique ¶
func (iq *ImageQuery) Unique(unique bool) *ImageQuery
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 (*ImageQuery) Where ¶
func (iq *ImageQuery) Where(ps ...predicate.Image) *ImageQuery
Where adds a new predicate for the ImageQuery builder.
func (*ImageQuery) WithReview ¶
func (iq *ImageQuery) WithReview(opts ...func(*ReviewQuery)) *ImageQuery
WithReview tells the query-builder to eager-load the nodes that are connected to the "review" edge. The optional arguments are used to configure the query builder of the edge.
type ImageSelect ¶
type ImageSelect struct { *ImageQuery // contains filtered or unexported fields }
ImageSelect is the builder for selecting fields of Image entities.
func (*ImageSelect) Aggregate ¶
func (is *ImageSelect) Aggregate(fns ...AggregateFunc) *ImageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ImageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ImageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ImageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ImageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ImageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ImageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ImageSelect) Scan ¶
func (is *ImageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ImageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ImageUpdate ¶
type ImageUpdate struct {
// contains filtered or unexported fields
}
ImageUpdate is the builder for updating Image entities.
func (*ImageUpdate) ClearReview ¶
func (iu *ImageUpdate) ClearReview() *ImageUpdate
ClearReview clears the "review" edge to the Review entity.
func (*ImageUpdate) Exec ¶
func (iu *ImageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ImageUpdate) ExecX ¶
func (iu *ImageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImageUpdate) Mutation ¶
func (iu *ImageUpdate) Mutation() *ImageMutation
Mutation returns the ImageMutation object of the builder.
func (*ImageUpdate) Save ¶
func (iu *ImageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ImageUpdate) SaveX ¶
func (iu *ImageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ImageUpdate) SetImageHash ¶
func (iu *ImageUpdate) SetImageHash(s string) *ImageUpdate
SetImageHash sets the "image_hash" field.
func (*ImageUpdate) SetReview ¶
func (iu *ImageUpdate) SetReview(r *Review) *ImageUpdate
SetReview sets the "review" edge to the Review entity.
func (*ImageUpdate) SetReviewID ¶
func (iu *ImageUpdate) SetReviewID(id uuid.UUID) *ImageUpdate
SetReviewID sets the "review" edge to the Review entity by ID.
func (*ImageUpdate) Where ¶
func (iu *ImageUpdate) Where(ps ...predicate.Image) *ImageUpdate
Where appends a list predicates to the ImageUpdate builder.
type ImageUpdateOne ¶
type ImageUpdateOne struct {
// contains filtered or unexported fields
}
ImageUpdateOne is the builder for updating a single Image entity.
func (*ImageUpdateOne) ClearReview ¶
func (iuo *ImageUpdateOne) ClearReview() *ImageUpdateOne
ClearReview clears the "review" edge to the Review entity.
func (*ImageUpdateOne) Exec ¶
func (iuo *ImageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ImageUpdateOne) ExecX ¶
func (iuo *ImageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImageUpdateOne) Mutation ¶
func (iuo *ImageUpdateOne) Mutation() *ImageMutation
Mutation returns the ImageMutation object of the builder.
func (*ImageUpdateOne) Save ¶
func (iuo *ImageUpdateOne) Save(ctx context.Context) (*Image, error)
Save executes the query and returns the updated Image entity.
func (*ImageUpdateOne) SaveX ¶
func (iuo *ImageUpdateOne) SaveX(ctx context.Context) *Image
SaveX is like Save, but panics if an error occurs.
func (*ImageUpdateOne) Select ¶
func (iuo *ImageUpdateOne) Select(field string, fields ...string) *ImageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ImageUpdateOne) SetImageHash ¶
func (iuo *ImageUpdateOne) SetImageHash(s string) *ImageUpdateOne
SetImageHash sets the "image_hash" field.
func (*ImageUpdateOne) SetReview ¶
func (iuo *ImageUpdateOne) SetReview(r *Review) *ImageUpdateOne
SetReview sets the "review" edge to the Review entity.
func (*ImageUpdateOne) SetReviewID ¶
func (iuo *ImageUpdateOne) SetReviewID(id uuid.UUID) *ImageUpdateOne
SetReviewID sets the "review" edge to the Review entity by ID.
func (*ImageUpdateOne) Where ¶
func (iuo *ImageUpdateOne) Where(ps ...predicate.Image) *ImageUpdateOne
Where appends a list predicates to the ImageUpdate builder.
type ImageUpsert ¶
ImageUpsert is the "OnConflict" setter.
func (*ImageUpsert) SetImageHash ¶
func (u *ImageUpsert) SetImageHash(v string) *ImageUpsert
SetImageHash sets the "image_hash" field.
func (*ImageUpsert) UpdateImageHash ¶
func (u *ImageUpsert) UpdateImageHash() *ImageUpsert
UpdateImageHash sets the "image_hash" field to the value that was provided on create.
type ImageUpsertBulk ¶
type ImageUpsertBulk struct {
// contains filtered or unexported fields
}
ImageUpsertBulk is the builder for "upsert"-ing a bulk of Image nodes.
func (*ImageUpsertBulk) DoNothing ¶
func (u *ImageUpsertBulk) DoNothing() *ImageUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ImageUpsertBulk) Exec ¶
func (u *ImageUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ImageUpsertBulk) ExecX ¶
func (u *ImageUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImageUpsertBulk) Ignore ¶
func (u *ImageUpsertBulk) Ignore() *ImageUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Image.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ImageUpsertBulk) SetImageHash ¶
func (u *ImageUpsertBulk) SetImageHash(v string) *ImageUpsertBulk
SetImageHash sets the "image_hash" field.
func (*ImageUpsertBulk) Update ¶
func (u *ImageUpsertBulk) Update(set func(*ImageUpsert)) *ImageUpsertBulk
Update allows overriding fields `UPDATE` values. See the ImageCreateBulk.OnConflict documentation for more info.
func (*ImageUpsertBulk) UpdateImageHash ¶
func (u *ImageUpsertBulk) UpdateImageHash() *ImageUpsertBulk
UpdateImageHash sets the "image_hash" field to the value that was provided on create.
func (*ImageUpsertBulk) UpdateNewValues ¶
func (u *ImageUpsertBulk) UpdateNewValues() *ImageUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Image.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(image.FieldID) }), ). Exec(ctx)
type ImageUpsertOne ¶
type ImageUpsertOne struct {
// contains filtered or unexported fields
}
ImageUpsertOne is the builder for "upsert"-ing
one Image node.
func (*ImageUpsertOne) DoNothing ¶
func (u *ImageUpsertOne) DoNothing() *ImageUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ImageUpsertOne) Exec ¶
func (u *ImageUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ImageUpsertOne) ExecX ¶
func (u *ImageUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImageUpsertOne) IDX ¶
func (u *ImageUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*ImageUpsertOne) Ignore ¶
func (u *ImageUpsertOne) Ignore() *ImageUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Image.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ImageUpsertOne) SetImageHash ¶
func (u *ImageUpsertOne) SetImageHash(v string) *ImageUpsertOne
SetImageHash sets the "image_hash" field.
func (*ImageUpsertOne) Update ¶
func (u *ImageUpsertOne) Update(set func(*ImageUpsert)) *ImageUpsertOne
Update allows overriding fields `UPDATE` values. See the ImageCreate.OnConflict documentation for more info.
func (*ImageUpsertOne) UpdateImageHash ¶
func (u *ImageUpsertOne) UpdateImageHash() *ImageUpsertOne
UpdateImageHash sets the "image_hash" field to the value that was provided on create.
func (*ImageUpsertOne) UpdateNewValues ¶
func (u *ImageUpsertOne) UpdateNewValues() *ImageUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Image.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(image.FieldID) }), ). Exec(ctx)
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 Location ¶
type Location struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // ExternalID holds the value of the "external_id" field. ExternalID int `json:"external_id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Visible holds the value of the "visible" field. Visible bool `json:"visible,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the LocationQuery when eager-loading is set. Edges LocationEdges `json:"edges"` // contains filtered or unexported fields }
Location is the model entity for the Location schema.
func (*Location) QueryOccurrences ¶
func (l *Location) QueryOccurrences() *OccurrenceQuery
QueryOccurrences queries the "occurrences" edge of the Location entity.
func (*Location) Unwrap ¶
Unwrap unwraps the Location 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 (*Location) Update ¶
func (l *Location) Update() *LocationUpdateOne
Update returns a builder for updating this Location. Note that you need to call Location.Unwrap() before calling this method if this Location was returned from a transaction, and the transaction was committed or rolled back.
type LocationClient ¶
type LocationClient struct {
// contains filtered or unexported fields
}
LocationClient is a client for the Location schema.
func NewLocationClient ¶
func NewLocationClient(c config) *LocationClient
NewLocationClient returns a client for the Location from the given config.
func (*LocationClient) Create ¶
func (c *LocationClient) Create() *LocationCreate
Create returns a builder for creating a Location entity.
func (*LocationClient) CreateBulk ¶
func (c *LocationClient) CreateBulk(builders ...*LocationCreate) *LocationCreateBulk
CreateBulk returns a builder for creating a bulk of Location entities.
func (*LocationClient) Delete ¶
func (c *LocationClient) Delete() *LocationDelete
Delete returns a delete builder for Location.
func (*LocationClient) DeleteOne ¶
func (c *LocationClient) DeleteOne(l *Location) *LocationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LocationClient) DeleteOneID ¶
func (c *LocationClient) DeleteOneID(id uuid.UUID) *LocationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LocationClient) Hooks ¶
func (c *LocationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LocationClient) Intercept ¶
func (c *LocationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `location.Intercept(f(g(h())))`.
func (*LocationClient) Interceptors ¶
func (c *LocationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LocationClient) Query ¶
func (c *LocationClient) Query() *LocationQuery
Query returns a query builder for Location.
func (*LocationClient) QueryOccurrences ¶
func (c *LocationClient) QueryOccurrences(l *Location) *OccurrenceQuery
QueryOccurrences queries the occurrences edge of a Location.
func (*LocationClient) Update ¶
func (c *LocationClient) Update() *LocationUpdate
Update returns an update builder for Location.
func (*LocationClient) UpdateOne ¶
func (c *LocationClient) UpdateOne(l *Location) *LocationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LocationClient) UpdateOneID ¶
func (c *LocationClient) UpdateOneID(id uuid.UUID) *LocationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LocationClient) Use ¶
func (c *LocationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `location.Hooks(f(g(h())))`.
type LocationCreate ¶
type LocationCreate struct {
// contains filtered or unexported fields
}
LocationCreate is the builder for creating a Location entity.
func (*LocationCreate) AddOccurrenceIDs ¶
func (lc *LocationCreate) AddOccurrenceIDs(ids ...uuid.UUID) *LocationCreate
AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.
func (*LocationCreate) AddOccurrences ¶
func (lc *LocationCreate) AddOccurrences(o ...*Occurrence) *LocationCreate
AddOccurrences adds the "occurrences" edges to the Occurrence entity.
func (*LocationCreate) Exec ¶
func (lc *LocationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationCreate) ExecX ¶
func (lc *LocationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationCreate) Mutation ¶
func (lc *LocationCreate) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationCreate) OnConflict ¶
func (lc *LocationCreate) OnConflict(opts ...sql.ConflictOption) *LocationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Location.Create(). SetExternalID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.LocationUpsert) { SetExternalID(v+v). }). Exec(ctx)
func (*LocationCreate) OnConflictColumns ¶
func (lc *LocationCreate) OnConflictColumns(columns ...string) *LocationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Location.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*LocationCreate) Save ¶
func (lc *LocationCreate) Save(ctx context.Context) (*Location, error)
Save creates the Location in the database.
func (*LocationCreate) SaveX ¶
func (lc *LocationCreate) SaveX(ctx context.Context) *Location
SaveX calls Save and panics if Save returns an error.
func (*LocationCreate) SetExternalID ¶
func (lc *LocationCreate) SetExternalID(i int) *LocationCreate
SetExternalID sets the "external_id" field.
func (*LocationCreate) SetID ¶
func (lc *LocationCreate) SetID(u uuid.UUID) *LocationCreate
SetID sets the "id" field.
func (*LocationCreate) SetName ¶
func (lc *LocationCreate) SetName(s string) *LocationCreate
SetName sets the "name" field.
func (*LocationCreate) SetNillableID ¶
func (lc *LocationCreate) SetNillableID(u *uuid.UUID) *LocationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*LocationCreate) SetNillableVisible ¶
func (lc *LocationCreate) SetNillableVisible(b *bool) *LocationCreate
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*LocationCreate) SetVisible ¶
func (lc *LocationCreate) SetVisible(b bool) *LocationCreate
SetVisible sets the "visible" field.
type LocationCreateBulk ¶
type LocationCreateBulk struct {
// contains filtered or unexported fields
}
LocationCreateBulk is the builder for creating many Location entities in bulk.
func (*LocationCreateBulk) Exec ¶
func (lcb *LocationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationCreateBulk) ExecX ¶
func (lcb *LocationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationCreateBulk) OnConflict ¶
func (lcb *LocationCreateBulk) OnConflict(opts ...sql.ConflictOption) *LocationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Location.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.LocationUpsert) { SetExternalID(v+v). }). Exec(ctx)
func (*LocationCreateBulk) OnConflictColumns ¶
func (lcb *LocationCreateBulk) OnConflictColumns(columns ...string) *LocationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Location.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type LocationDelete ¶
type LocationDelete struct {
// contains filtered or unexported fields
}
LocationDelete is the builder for deleting a Location entity.
func (*LocationDelete) Exec ¶
func (ld *LocationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LocationDelete) ExecX ¶
func (ld *LocationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LocationDelete) Where ¶
func (ld *LocationDelete) Where(ps ...predicate.Location) *LocationDelete
Where appends a list predicates to the LocationDelete builder.
type LocationDeleteOne ¶
type LocationDeleteOne struct {
// contains filtered or unexported fields
}
LocationDeleteOne is the builder for deleting a single Location entity.
func (*LocationDeleteOne) Exec ¶
func (ldo *LocationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LocationDeleteOne) ExecX ¶
func (ldo *LocationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationDeleteOne) Where ¶
func (ldo *LocationDeleteOne) Where(ps ...predicate.Location) *LocationDeleteOne
Where appends a list predicates to the LocationDelete builder.
type LocationEdges ¶
type LocationEdges struct { // Occurrences holds the value of the occurrences edge. Occurrences []*Occurrence `json:"occurrences,omitempty"` // contains filtered or unexported fields }
LocationEdges holds the relations/edges for other nodes in the graph.
func (LocationEdges) OccurrencesOrErr ¶
func (e LocationEdges) OccurrencesOrErr() ([]*Occurrence, error)
OccurrencesOrErr returns the Occurrences value or an error if the edge was not loaded in eager-loading.
type LocationGroupBy ¶
type LocationGroupBy struct {
// contains filtered or unexported fields
}
LocationGroupBy is the group-by builder for Location entities.
func (*LocationGroupBy) Aggregate ¶
func (lgb *LocationGroupBy) Aggregate(fns ...AggregateFunc) *LocationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LocationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocationGroupBy) Scan ¶
func (lgb *LocationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocationMutation ¶
type LocationMutation struct {
// contains filtered or unexported fields
}
LocationMutation represents an operation that mutates the Location nodes in the graph.
func (*LocationMutation) AddExternalID ¶
func (m *LocationMutation) AddExternalID(i int)
AddExternalID adds i to the "external_id" field.
func (*LocationMutation) AddField ¶
func (m *LocationMutation) 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 (*LocationMutation) AddOccurrenceIDs ¶
func (m *LocationMutation) AddOccurrenceIDs(ids ...uuid.UUID)
AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by ids.
func (*LocationMutation) AddedEdges ¶
func (m *LocationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LocationMutation) AddedExternalID ¶
func (m *LocationMutation) AddedExternalID() (r int, exists bool)
AddedExternalID returns the value that was added to the "external_id" field in this mutation.
func (*LocationMutation) AddedField ¶
func (m *LocationMutation) 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 (*LocationMutation) AddedFields ¶
func (m *LocationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LocationMutation) AddedIDs ¶
func (m *LocationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LocationMutation) ClearEdge ¶
func (m *LocationMutation) 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 (*LocationMutation) ClearField ¶
func (m *LocationMutation) 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 (*LocationMutation) ClearOccurrences ¶
func (m *LocationMutation) ClearOccurrences()
ClearOccurrences clears the "occurrences" edge to the Occurrence entity.
func (*LocationMutation) ClearedEdges ¶
func (m *LocationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LocationMutation) ClearedFields ¶
func (m *LocationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LocationMutation) Client ¶
func (m LocationMutation) 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 (*LocationMutation) EdgeCleared ¶
func (m *LocationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LocationMutation) ExternalID ¶
func (m *LocationMutation) ExternalID() (r int, exists bool)
ExternalID returns the value of the "external_id" field in the mutation.
func (*LocationMutation) Field ¶
func (m *LocationMutation) 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 (*LocationMutation) FieldCleared ¶
func (m *LocationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LocationMutation) Fields ¶
func (m *LocationMutation) 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 (*LocationMutation) ID ¶
func (m *LocationMutation) 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 (*LocationMutation) 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 (*LocationMutation) Name ¶
func (m *LocationMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*LocationMutation) OccurrencesCleared ¶
func (m *LocationMutation) OccurrencesCleared() bool
OccurrencesCleared reports if the "occurrences" edge to the Occurrence entity was cleared.
func (*LocationMutation) OccurrencesIDs ¶
func (m *LocationMutation) OccurrencesIDs() (ids []uuid.UUID)
OccurrencesIDs returns the "occurrences" edge IDs in the mutation.
func (*LocationMutation) OldExternalID ¶
func (m *LocationMutation) OldExternalID(ctx context.Context) (v int, err error)
OldExternalID returns the old "external_id" field's value of the Location entity. If the Location 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 (*LocationMutation) 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 (*LocationMutation) OldName ¶
func (m *LocationMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Location entity. If the Location 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 (*LocationMutation) OldVisible ¶
func (m *LocationMutation) OldVisible(ctx context.Context) (v bool, err error)
OldVisible returns the old "visible" field's value of the Location entity. If the Location 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 (*LocationMutation) RemoveOccurrenceIDs ¶
func (m *LocationMutation) RemoveOccurrenceIDs(ids ...uuid.UUID)
RemoveOccurrenceIDs removes the "occurrences" edge to the Occurrence entity by IDs.
func (*LocationMutation) RemovedEdges ¶
func (m *LocationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LocationMutation) RemovedIDs ¶
func (m *LocationMutation) 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 (*LocationMutation) RemovedOccurrencesIDs ¶
func (m *LocationMutation) RemovedOccurrencesIDs() (ids []uuid.UUID)
RemovedOccurrences returns the removed IDs of the "occurrences" edge to the Occurrence entity.
func (*LocationMutation) ResetEdge ¶
func (m *LocationMutation) 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 (*LocationMutation) ResetExternalID ¶
func (m *LocationMutation) ResetExternalID()
ResetExternalID resets all changes to the "external_id" field.
func (*LocationMutation) ResetField ¶
func (m *LocationMutation) 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 (*LocationMutation) ResetName ¶
func (m *LocationMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*LocationMutation) ResetOccurrences ¶
func (m *LocationMutation) ResetOccurrences()
ResetOccurrences resets all changes to the "occurrences" edge.
func (*LocationMutation) ResetVisible ¶
func (m *LocationMutation) ResetVisible()
ResetVisible resets all changes to the "visible" field.
func (*LocationMutation) SetExternalID ¶
func (m *LocationMutation) SetExternalID(i int)
SetExternalID sets the "external_id" field.
func (*LocationMutation) SetField ¶
func (m *LocationMutation) 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 (*LocationMutation) SetID ¶
func (m *LocationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Location entities.
func (*LocationMutation) SetName ¶
func (m *LocationMutation) SetName(s string)
SetName sets the "name" field.
func (*LocationMutation) SetOp ¶
func (m *LocationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LocationMutation) SetVisible ¶
func (m *LocationMutation) SetVisible(b bool)
SetVisible sets the "visible" field.
func (LocationMutation) Tx ¶
func (m LocationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LocationMutation) Type ¶
func (m *LocationMutation) Type() string
Type returns the node type of this mutation (Location).
func (*LocationMutation) Visible ¶
func (m *LocationMutation) Visible() (r bool, exists bool)
Visible returns the value of the "visible" field in the mutation.
func (*LocationMutation) Where ¶
func (m *LocationMutation) Where(ps ...predicate.Location)
Where appends a list predicates to the LocationMutation builder.
func (*LocationMutation) WhereP ¶
func (m *LocationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LocationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LocationQuery ¶
type LocationQuery struct {
// contains filtered or unexported fields
}
LocationQuery is the builder for querying Location entities.
func (*LocationQuery) Aggregate ¶
func (lq *LocationQuery) Aggregate(fns ...AggregateFunc) *LocationSelect
Aggregate returns a LocationSelect configured with the given aggregations.
func (*LocationQuery) All ¶
func (lq *LocationQuery) All(ctx context.Context) ([]*Location, error)
All executes the query and returns a list of Locations.
func (*LocationQuery) AllX ¶
func (lq *LocationQuery) AllX(ctx context.Context) []*Location
AllX is like All, but panics if an error occurs.
func (*LocationQuery) Clone ¶
func (lq *LocationQuery) Clone() *LocationQuery
Clone returns a duplicate of the LocationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LocationQuery) Count ¶
func (lq *LocationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LocationQuery) CountX ¶
func (lq *LocationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LocationQuery) Exist ¶
func (lq *LocationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LocationQuery) ExistX ¶
func (lq *LocationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LocationQuery) First ¶
func (lq *LocationQuery) First(ctx context.Context) (*Location, error)
First returns the first Location entity from the query. Returns a *NotFoundError when no Location was found.
func (*LocationQuery) FirstID ¶
FirstID returns the first Location ID from the query. Returns a *NotFoundError when no Location ID was found.
func (*LocationQuery) FirstIDX ¶
func (lq *LocationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LocationQuery) FirstX ¶
func (lq *LocationQuery) FirstX(ctx context.Context) *Location
FirstX is like First, but panics if an error occurs.
func (*LocationQuery) GroupBy ¶
func (lq *LocationQuery) GroupBy(field string, fields ...string) *LocationGroupBy
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 { ExternalID int `json:"external_id,omitempty"` Count int `json:"count,omitempty"` } client.Location.Query(). GroupBy(location.FieldExternalID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LocationQuery) IDsX ¶
func (lq *LocationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*LocationQuery) Limit ¶
func (lq *LocationQuery) Limit(limit int) *LocationQuery
Limit the number of records to be returned by this query.
func (*LocationQuery) Offset ¶
func (lq *LocationQuery) Offset(offset int) *LocationQuery
Offset to start from.
func (*LocationQuery) Only ¶
func (lq *LocationQuery) Only(ctx context.Context) (*Location, error)
Only returns a single Location entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Location entity is found. Returns a *NotFoundError when no Location entities are found.
func (*LocationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Location ID in the query. Returns a *NotSingularError when more than one Location ID is found. Returns a *NotFoundError when no entities are found.
func (*LocationQuery) OnlyIDX ¶
func (lq *LocationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LocationQuery) OnlyX ¶
func (lq *LocationQuery) OnlyX(ctx context.Context) *Location
OnlyX is like Only, but panics if an error occurs.
func (*LocationQuery) Order ¶
func (lq *LocationQuery) Order(o ...location.OrderOption) *LocationQuery
Order specifies how the records should be ordered.
func (*LocationQuery) QueryOccurrences ¶
func (lq *LocationQuery) QueryOccurrences() *OccurrenceQuery
QueryOccurrences chains the current query on the "occurrences" edge.
func (*LocationQuery) Select ¶
func (lq *LocationQuery) Select(fields ...string) *LocationSelect
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 { ExternalID int `json:"external_id,omitempty"` } client.Location.Query(). Select(location.FieldExternalID). Scan(ctx, &v)
func (*LocationQuery) Unique ¶
func (lq *LocationQuery) Unique(unique bool) *LocationQuery
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 (*LocationQuery) Where ¶
func (lq *LocationQuery) Where(ps ...predicate.Location) *LocationQuery
Where adds a new predicate for the LocationQuery builder.
func (*LocationQuery) WithOccurrences ¶
func (lq *LocationQuery) WithOccurrences(opts ...func(*OccurrenceQuery)) *LocationQuery
WithOccurrences tells the query-builder to eager-load the nodes that are connected to the "occurrences" edge. The optional arguments are used to configure the query builder of the edge.
type LocationSelect ¶
type LocationSelect struct { *LocationQuery // contains filtered or unexported fields }
LocationSelect is the builder for selecting fields of Location entities.
func (*LocationSelect) Aggregate ¶
func (ls *LocationSelect) Aggregate(fns ...AggregateFunc) *LocationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LocationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocationSelect) Scan ¶
func (ls *LocationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocationUpdate ¶
type LocationUpdate struct {
// contains filtered or unexported fields
}
LocationUpdate is the builder for updating Location entities.
func (*LocationUpdate) AddExternalID ¶
func (lu *LocationUpdate) AddExternalID(i int) *LocationUpdate
AddExternalID adds i to the "external_id" field.
func (*LocationUpdate) AddOccurrenceIDs ¶
func (lu *LocationUpdate) AddOccurrenceIDs(ids ...uuid.UUID) *LocationUpdate
AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.
func (*LocationUpdate) AddOccurrences ¶
func (lu *LocationUpdate) AddOccurrences(o ...*Occurrence) *LocationUpdate
AddOccurrences adds the "occurrences" edges to the Occurrence entity.
func (*LocationUpdate) ClearOccurrences ¶
func (lu *LocationUpdate) ClearOccurrences() *LocationUpdate
ClearOccurrences clears all "occurrences" edges to the Occurrence entity.
func (*LocationUpdate) Exec ¶
func (lu *LocationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationUpdate) ExecX ¶
func (lu *LocationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpdate) Mutation ¶
func (lu *LocationUpdate) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationUpdate) RemoveOccurrenceIDs ¶
func (lu *LocationUpdate) RemoveOccurrenceIDs(ids ...uuid.UUID) *LocationUpdate
RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.
func (*LocationUpdate) RemoveOccurrences ¶
func (lu *LocationUpdate) RemoveOccurrences(o ...*Occurrence) *LocationUpdate
RemoveOccurrences removes "occurrences" edges to Occurrence entities.
func (*LocationUpdate) Save ¶
func (lu *LocationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LocationUpdate) SaveX ¶
func (lu *LocationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LocationUpdate) SetExternalID ¶
func (lu *LocationUpdate) SetExternalID(i int) *LocationUpdate
SetExternalID sets the "external_id" field.
func (*LocationUpdate) SetName ¶
func (lu *LocationUpdate) SetName(s string) *LocationUpdate
SetName sets the "name" field.
func (*LocationUpdate) SetNillableVisible ¶
func (lu *LocationUpdate) SetNillableVisible(b *bool) *LocationUpdate
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*LocationUpdate) SetVisible ¶
func (lu *LocationUpdate) SetVisible(b bool) *LocationUpdate
SetVisible sets the "visible" field.
func (*LocationUpdate) Where ¶
func (lu *LocationUpdate) Where(ps ...predicate.Location) *LocationUpdate
Where appends a list predicates to the LocationUpdate builder.
type LocationUpdateOne ¶
type LocationUpdateOne struct {
// contains filtered or unexported fields
}
LocationUpdateOne is the builder for updating a single Location entity.
func (*LocationUpdateOne) AddExternalID ¶
func (luo *LocationUpdateOne) AddExternalID(i int) *LocationUpdateOne
AddExternalID adds i to the "external_id" field.
func (*LocationUpdateOne) AddOccurrenceIDs ¶
func (luo *LocationUpdateOne) AddOccurrenceIDs(ids ...uuid.UUID) *LocationUpdateOne
AddOccurrenceIDs adds the "occurrences" edge to the Occurrence entity by IDs.
func (*LocationUpdateOne) AddOccurrences ¶
func (luo *LocationUpdateOne) AddOccurrences(o ...*Occurrence) *LocationUpdateOne
AddOccurrences adds the "occurrences" edges to the Occurrence entity.
func (*LocationUpdateOne) ClearOccurrences ¶
func (luo *LocationUpdateOne) ClearOccurrences() *LocationUpdateOne
ClearOccurrences clears all "occurrences" edges to the Occurrence entity.
func (*LocationUpdateOne) Exec ¶
func (luo *LocationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LocationUpdateOne) ExecX ¶
func (luo *LocationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpdateOne) Mutation ¶
func (luo *LocationUpdateOne) Mutation() *LocationMutation
Mutation returns the LocationMutation object of the builder.
func (*LocationUpdateOne) RemoveOccurrenceIDs ¶
func (luo *LocationUpdateOne) RemoveOccurrenceIDs(ids ...uuid.UUID) *LocationUpdateOne
RemoveOccurrenceIDs removes the "occurrences" edge to Occurrence entities by IDs.
func (*LocationUpdateOne) RemoveOccurrences ¶
func (luo *LocationUpdateOne) RemoveOccurrences(o ...*Occurrence) *LocationUpdateOne
RemoveOccurrences removes "occurrences" edges to Occurrence entities.
func (*LocationUpdateOne) Save ¶
func (luo *LocationUpdateOne) Save(ctx context.Context) (*Location, error)
Save executes the query and returns the updated Location entity.
func (*LocationUpdateOne) SaveX ¶
func (luo *LocationUpdateOne) SaveX(ctx context.Context) *Location
SaveX is like Save, but panics if an error occurs.
func (*LocationUpdateOne) Select ¶
func (luo *LocationUpdateOne) Select(field string, fields ...string) *LocationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LocationUpdateOne) SetExternalID ¶
func (luo *LocationUpdateOne) SetExternalID(i int) *LocationUpdateOne
SetExternalID sets the "external_id" field.
func (*LocationUpdateOne) SetName ¶
func (luo *LocationUpdateOne) SetName(s string) *LocationUpdateOne
SetName sets the "name" field.
func (*LocationUpdateOne) SetNillableVisible ¶
func (luo *LocationUpdateOne) SetNillableVisible(b *bool) *LocationUpdateOne
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*LocationUpdateOne) SetVisible ¶
func (luo *LocationUpdateOne) SetVisible(b bool) *LocationUpdateOne
SetVisible sets the "visible" field.
func (*LocationUpdateOne) Where ¶
func (luo *LocationUpdateOne) Where(ps ...predicate.Location) *LocationUpdateOne
Where appends a list predicates to the LocationUpdate builder.
type LocationUpsert ¶
LocationUpsert is the "OnConflict" setter.
func (*LocationUpsert) AddExternalID ¶
func (u *LocationUpsert) AddExternalID(v int) *LocationUpsert
AddExternalID adds v to the "external_id" field.
func (*LocationUpsert) SetExternalID ¶
func (u *LocationUpsert) SetExternalID(v int) *LocationUpsert
SetExternalID sets the "external_id" field.
func (*LocationUpsert) SetName ¶
func (u *LocationUpsert) SetName(v string) *LocationUpsert
SetName sets the "name" field.
func (*LocationUpsert) SetVisible ¶
func (u *LocationUpsert) SetVisible(v bool) *LocationUpsert
SetVisible sets the "visible" field.
func (*LocationUpsert) UpdateExternalID ¶
func (u *LocationUpsert) UpdateExternalID() *LocationUpsert
UpdateExternalID sets the "external_id" field to the value that was provided on create.
func (*LocationUpsert) UpdateName ¶
func (u *LocationUpsert) UpdateName() *LocationUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*LocationUpsert) UpdateVisible ¶
func (u *LocationUpsert) UpdateVisible() *LocationUpsert
UpdateVisible sets the "visible" field to the value that was provided on create.
type LocationUpsertBulk ¶
type LocationUpsertBulk struct {
// contains filtered or unexported fields
}
LocationUpsertBulk is the builder for "upsert"-ing a bulk of Location nodes.
func (*LocationUpsertBulk) AddExternalID ¶
func (u *LocationUpsertBulk) AddExternalID(v int) *LocationUpsertBulk
AddExternalID adds v to the "external_id" field.
func (*LocationUpsertBulk) DoNothing ¶
func (u *LocationUpsertBulk) DoNothing() *LocationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*LocationUpsertBulk) Exec ¶
func (u *LocationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationUpsertBulk) ExecX ¶
func (u *LocationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpsertBulk) Ignore ¶
func (u *LocationUpsertBulk) Ignore() *LocationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Location.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*LocationUpsertBulk) SetExternalID ¶
func (u *LocationUpsertBulk) SetExternalID(v int) *LocationUpsertBulk
SetExternalID sets the "external_id" field.
func (*LocationUpsertBulk) SetName ¶
func (u *LocationUpsertBulk) SetName(v string) *LocationUpsertBulk
SetName sets the "name" field.
func (*LocationUpsertBulk) SetVisible ¶
func (u *LocationUpsertBulk) SetVisible(v bool) *LocationUpsertBulk
SetVisible sets the "visible" field.
func (*LocationUpsertBulk) Update ¶
func (u *LocationUpsertBulk) Update(set func(*LocationUpsert)) *LocationUpsertBulk
Update allows overriding fields `UPDATE` values. See the LocationCreateBulk.OnConflict documentation for more info.
func (*LocationUpsertBulk) UpdateExternalID ¶
func (u *LocationUpsertBulk) UpdateExternalID() *LocationUpsertBulk
UpdateExternalID sets the "external_id" field to the value that was provided on create.
func (*LocationUpsertBulk) UpdateName ¶
func (u *LocationUpsertBulk) UpdateName() *LocationUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*LocationUpsertBulk) UpdateNewValues ¶
func (u *LocationUpsertBulk) UpdateNewValues() *LocationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Location.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(location.FieldID) }), ). Exec(ctx)
func (*LocationUpsertBulk) UpdateVisible ¶
func (u *LocationUpsertBulk) UpdateVisible() *LocationUpsertBulk
UpdateVisible sets the "visible" field to the value that was provided on create.
type LocationUpsertOne ¶
type LocationUpsertOne struct {
// contains filtered or unexported fields
}
LocationUpsertOne is the builder for "upsert"-ing
one Location node.
func (*LocationUpsertOne) AddExternalID ¶
func (u *LocationUpsertOne) AddExternalID(v int) *LocationUpsertOne
AddExternalID adds v to the "external_id" field.
func (*LocationUpsertOne) DoNothing ¶
func (u *LocationUpsertOne) DoNothing() *LocationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*LocationUpsertOne) Exec ¶
func (u *LocationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*LocationUpsertOne) ExecX ¶
func (u *LocationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocationUpsertOne) IDX ¶
func (u *LocationUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*LocationUpsertOne) Ignore ¶
func (u *LocationUpsertOne) Ignore() *LocationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Location.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*LocationUpsertOne) SetExternalID ¶
func (u *LocationUpsertOne) SetExternalID(v int) *LocationUpsertOne
SetExternalID sets the "external_id" field.
func (*LocationUpsertOne) SetName ¶
func (u *LocationUpsertOne) SetName(v string) *LocationUpsertOne
SetName sets the "name" field.
func (*LocationUpsertOne) SetVisible ¶
func (u *LocationUpsertOne) SetVisible(v bool) *LocationUpsertOne
SetVisible sets the "visible" field.
func (*LocationUpsertOne) Update ¶
func (u *LocationUpsertOne) Update(set func(*LocationUpsert)) *LocationUpsertOne
Update allows overriding fields `UPDATE` values. See the LocationCreate.OnConflict documentation for more info.
func (*LocationUpsertOne) UpdateExternalID ¶
func (u *LocationUpsertOne) UpdateExternalID() *LocationUpsertOne
UpdateExternalID sets the "external_id" field to the value that was provided on create.
func (*LocationUpsertOne) UpdateName ¶
func (u *LocationUpsertOne) UpdateName() *LocationUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*LocationUpsertOne) UpdateNewValues ¶
func (u *LocationUpsertOne) UpdateNewValues() *LocationUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Location.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(location.FieldID) }), ). Exec(ctx)
func (*LocationUpsertOne) UpdateVisible ¶
func (u *LocationUpsertOne) UpdateVisible() *LocationUpsertOne
UpdateVisible sets the "visible" field to the value that was provided on create.
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 Occurrence ¶
type Occurrence struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Date holds the value of the "date" field. Date time.Time `json:"date,omitempty"` // Kj holds the value of the "kj" field. Kj *int `json:"kj,omitempty"` // Kcal holds the value of the "kcal" field. Kcal *int `json:"kcal,omitempty"` // Fat holds the value of the "fat" field. Fat *int `json:"fat,omitempty"` // SaturatedFat holds the value of the "saturated_fat" field. SaturatedFat *int `json:"saturated_fat,omitempty"` // Carbohydrates holds the value of the "carbohydrates" field. Carbohydrates *int `json:"carbohydrates,omitempty"` // Sugar holds the value of the "sugar" field. Sugar *int `json:"sugar,omitempty"` // Fiber holds the value of the "fiber" field. Fiber *int `json:"fiber,omitempty"` // Protein holds the value of the "protein" field. Protein *int `json:"protein,omitempty"` // Salt holds the value of the "salt" field. Salt *int `json:"salt,omitempty"` // PriceStudent holds the value of the "price_student" field. PriceStudent *int `json:"price_student,omitempty"` // PriceStaff holds the value of the "price_staff" field. PriceStaff *int `json:"price_staff,omitempty"` // PriceGuest holds the value of the "price_guest" field. PriceGuest *int `json:"price_guest,omitempty"` // NotAvailableAfter holds the value of the "not_available_after" field. NotAvailableAfter *time.Time `json:"not_available_after,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OccurrenceQuery when eager-loading is set. Edges OccurrenceEdges `json:"edges"` // contains filtered or unexported fields }
Occurrence is the model entity for the Occurrence schema.
func (*Occurrence) QueryDish ¶
func (o *Occurrence) QueryDish() *DishQuery
QueryDish queries the "dish" edge of the Occurrence entity.
func (*Occurrence) QueryLocation ¶
func (o *Occurrence) QueryLocation() *LocationQuery
QueryLocation queries the "location" edge of the Occurrence entity.
func (*Occurrence) QueryReviews ¶
func (o *Occurrence) QueryReviews() *ReviewQuery
QueryReviews queries the "reviews" edge of the Occurrence entity.
func (*Occurrence) QuerySideDishes ¶
func (o *Occurrence) QuerySideDishes() *DishQuery
QuerySideDishes queries the "side_dishes" edge of the Occurrence entity.
func (*Occurrence) QueryTags ¶
func (o *Occurrence) QueryTags() *TagQuery
QueryTags queries the "tags" edge of the Occurrence entity.
func (*Occurrence) String ¶
func (o *Occurrence) String() string
String implements the fmt.Stringer.
func (*Occurrence) Unwrap ¶
func (o *Occurrence) Unwrap() *Occurrence
Unwrap unwraps the Occurrence 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 (*Occurrence) Update ¶
func (o *Occurrence) Update() *OccurrenceUpdateOne
Update returns a builder for updating this Occurrence. Note that you need to call Occurrence.Unwrap() before calling this method if this Occurrence was returned from a transaction, and the transaction was committed or rolled back.
type OccurrenceClient ¶
type OccurrenceClient struct {
// contains filtered or unexported fields
}
OccurrenceClient is a client for the Occurrence schema.
func NewOccurrenceClient ¶
func NewOccurrenceClient(c config) *OccurrenceClient
NewOccurrenceClient returns a client for the Occurrence from the given config.
func (*OccurrenceClient) Create ¶
func (c *OccurrenceClient) Create() *OccurrenceCreate
Create returns a builder for creating a Occurrence entity.
func (*OccurrenceClient) CreateBulk ¶
func (c *OccurrenceClient) CreateBulk(builders ...*OccurrenceCreate) *OccurrenceCreateBulk
CreateBulk returns a builder for creating a bulk of Occurrence entities.
func (*OccurrenceClient) Delete ¶
func (c *OccurrenceClient) Delete() *OccurrenceDelete
Delete returns a delete builder for Occurrence.
func (*OccurrenceClient) DeleteOne ¶
func (c *OccurrenceClient) DeleteOne(o *Occurrence) *OccurrenceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OccurrenceClient) DeleteOneID ¶
func (c *OccurrenceClient) DeleteOneID(id uuid.UUID) *OccurrenceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OccurrenceClient) Get ¶
func (c *OccurrenceClient) Get(ctx context.Context, id uuid.UUID) (*Occurrence, error)
Get returns a Occurrence entity by its id.
func (*OccurrenceClient) GetX ¶
func (c *OccurrenceClient) GetX(ctx context.Context, id uuid.UUID) *Occurrence
GetX is like Get, but panics if an error occurs.
func (*OccurrenceClient) Hooks ¶
func (c *OccurrenceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OccurrenceClient) Intercept ¶
func (c *OccurrenceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `occurrence.Intercept(f(g(h())))`.
func (*OccurrenceClient) Interceptors ¶
func (c *OccurrenceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OccurrenceClient) Query ¶
func (c *OccurrenceClient) Query() *OccurrenceQuery
Query returns a query builder for Occurrence.
func (*OccurrenceClient) QueryDish ¶
func (c *OccurrenceClient) QueryDish(o *Occurrence) *DishQuery
QueryDish queries the dish edge of a Occurrence.
func (*OccurrenceClient) QueryLocation ¶
func (c *OccurrenceClient) QueryLocation(o *Occurrence) *LocationQuery
QueryLocation queries the location edge of a Occurrence.
func (*OccurrenceClient) QueryReviews ¶
func (c *OccurrenceClient) QueryReviews(o *Occurrence) *ReviewQuery
QueryReviews queries the reviews edge of a Occurrence.
func (*OccurrenceClient) QuerySideDishes ¶
func (c *OccurrenceClient) QuerySideDishes(o *Occurrence) *DishQuery
QuerySideDishes queries the side_dishes edge of a Occurrence.
func (*OccurrenceClient) QueryTags ¶
func (c *OccurrenceClient) QueryTags(o *Occurrence) *TagQuery
QueryTags queries the tags edge of a Occurrence.
func (*OccurrenceClient) Update ¶
func (c *OccurrenceClient) Update() *OccurrenceUpdate
Update returns an update builder for Occurrence.
func (*OccurrenceClient) UpdateOne ¶
func (c *OccurrenceClient) UpdateOne(o *Occurrence) *OccurrenceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OccurrenceClient) UpdateOneID ¶
func (c *OccurrenceClient) UpdateOneID(id uuid.UUID) *OccurrenceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OccurrenceClient) Use ¶
func (c *OccurrenceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `occurrence.Hooks(f(g(h())))`.
type OccurrenceCreate ¶
type OccurrenceCreate struct {
// contains filtered or unexported fields
}
OccurrenceCreate is the builder for creating a Occurrence entity.
func (*OccurrenceCreate) AddReviewIDs ¶
func (oc *OccurrenceCreate) AddReviewIDs(ids ...uuid.UUID) *OccurrenceCreate
AddReviewIDs adds the "reviews" edge to the Review entity by IDs.
func (*OccurrenceCreate) AddReviews ¶
func (oc *OccurrenceCreate) AddReviews(r ...*Review) *OccurrenceCreate
AddReviews adds the "reviews" edges to the Review entity.
func (*OccurrenceCreate) AddSideDishIDs ¶
func (oc *OccurrenceCreate) AddSideDishIDs(ids ...uuid.UUID) *OccurrenceCreate
AddSideDishIDs adds the "side_dishes" edge to the Dish entity by IDs.
func (*OccurrenceCreate) AddSideDishes ¶
func (oc *OccurrenceCreate) AddSideDishes(d ...*Dish) *OccurrenceCreate
AddSideDishes adds the "side_dishes" edges to the Dish entity.
func (*OccurrenceCreate) AddTagIDs ¶
func (oc *OccurrenceCreate) AddTagIDs(ids ...string) *OccurrenceCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*OccurrenceCreate) AddTags ¶
func (oc *OccurrenceCreate) AddTags(t ...*Tag) *OccurrenceCreate
AddTags adds the "tags" edges to the Tag entity.
func (*OccurrenceCreate) Exec ¶
func (oc *OccurrenceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OccurrenceCreate) ExecX ¶
func (oc *OccurrenceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceCreate) Mutation ¶
func (oc *OccurrenceCreate) Mutation() *OccurrenceMutation
Mutation returns the OccurrenceMutation object of the builder.
func (*OccurrenceCreate) OnConflict ¶
func (oc *OccurrenceCreate) OnConflict(opts ...sql.ConflictOption) *OccurrenceUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Occurrence.Create(). SetDate(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.OccurrenceUpsert) { SetDate(v+v). }). Exec(ctx)
func (*OccurrenceCreate) OnConflictColumns ¶
func (oc *OccurrenceCreate) OnConflictColumns(columns ...string) *OccurrenceUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Occurrence.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OccurrenceCreate) Save ¶
func (oc *OccurrenceCreate) Save(ctx context.Context) (*Occurrence, error)
Save creates the Occurrence in the database.
func (*OccurrenceCreate) SaveX ¶
func (oc *OccurrenceCreate) SaveX(ctx context.Context) *Occurrence
SaveX calls Save and panics if Save returns an error.
func (*OccurrenceCreate) SetCarbohydrates ¶
func (oc *OccurrenceCreate) SetCarbohydrates(i int) *OccurrenceCreate
SetCarbohydrates sets the "carbohydrates" field.
func (*OccurrenceCreate) SetDate ¶
func (oc *OccurrenceCreate) SetDate(t time.Time) *OccurrenceCreate
SetDate sets the "date" field.
func (*OccurrenceCreate) SetDish ¶
func (oc *OccurrenceCreate) SetDish(d *Dish) *OccurrenceCreate
SetDish sets the "dish" edge to the Dish entity.
func (*OccurrenceCreate) SetDishID ¶
func (oc *OccurrenceCreate) SetDishID(id uuid.UUID) *OccurrenceCreate
SetDishID sets the "dish" edge to the Dish entity by ID.
func (*OccurrenceCreate) SetFat ¶
func (oc *OccurrenceCreate) SetFat(i int) *OccurrenceCreate
SetFat sets the "fat" field.
func (*OccurrenceCreate) SetFiber ¶
func (oc *OccurrenceCreate) SetFiber(i int) *OccurrenceCreate
SetFiber sets the "fiber" field.
func (*OccurrenceCreate) SetID ¶
func (oc *OccurrenceCreate) SetID(u uuid.UUID) *OccurrenceCreate
SetID sets the "id" field.
func (*OccurrenceCreate) SetKcal ¶
func (oc *OccurrenceCreate) SetKcal(i int) *OccurrenceCreate
SetKcal sets the "kcal" field.
func (*OccurrenceCreate) SetKj ¶
func (oc *OccurrenceCreate) SetKj(i int) *OccurrenceCreate
SetKj sets the "kj" field.
func (*OccurrenceCreate) SetLocation ¶
func (oc *OccurrenceCreate) SetLocation(l *Location) *OccurrenceCreate
SetLocation sets the "location" edge to the Location entity.
func (*OccurrenceCreate) SetLocationID ¶
func (oc *OccurrenceCreate) SetLocationID(id uuid.UUID) *OccurrenceCreate
SetLocationID sets the "location" edge to the Location entity by ID.
func (*OccurrenceCreate) SetNillableCarbohydrates ¶
func (oc *OccurrenceCreate) SetNillableCarbohydrates(i *int) *OccurrenceCreate
SetNillableCarbohydrates sets the "carbohydrates" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableDate ¶
func (oc *OccurrenceCreate) SetNillableDate(t *time.Time) *OccurrenceCreate
SetNillableDate sets the "date" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableFat ¶
func (oc *OccurrenceCreate) SetNillableFat(i *int) *OccurrenceCreate
SetNillableFat sets the "fat" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableFiber ¶
func (oc *OccurrenceCreate) SetNillableFiber(i *int) *OccurrenceCreate
SetNillableFiber sets the "fiber" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableID ¶
func (oc *OccurrenceCreate) SetNillableID(u *uuid.UUID) *OccurrenceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableKcal ¶
func (oc *OccurrenceCreate) SetNillableKcal(i *int) *OccurrenceCreate
SetNillableKcal sets the "kcal" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableKj ¶
func (oc *OccurrenceCreate) SetNillableKj(i *int) *OccurrenceCreate
SetNillableKj sets the "kj" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableNotAvailableAfter ¶ added in v0.7.0
func (oc *OccurrenceCreate) SetNillableNotAvailableAfter(t *time.Time) *OccurrenceCreate
SetNillableNotAvailableAfter sets the "not_available_after" field if the given value is not nil.
func (*OccurrenceCreate) SetNillablePriceGuest ¶
func (oc *OccurrenceCreate) SetNillablePriceGuest(i *int) *OccurrenceCreate
SetNillablePriceGuest sets the "price_guest" field if the given value is not nil.
func (*OccurrenceCreate) SetNillablePriceStaff ¶
func (oc *OccurrenceCreate) SetNillablePriceStaff(i *int) *OccurrenceCreate
SetNillablePriceStaff sets the "price_staff" field if the given value is not nil.
func (*OccurrenceCreate) SetNillablePriceStudent ¶
func (oc *OccurrenceCreate) SetNillablePriceStudent(i *int) *OccurrenceCreate
SetNillablePriceStudent sets the "price_student" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableProtein ¶
func (oc *OccurrenceCreate) SetNillableProtein(i *int) *OccurrenceCreate
SetNillableProtein sets the "protein" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableSalt ¶
func (oc *OccurrenceCreate) SetNillableSalt(i *int) *OccurrenceCreate
SetNillableSalt sets the "salt" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableSaturatedFat ¶
func (oc *OccurrenceCreate) SetNillableSaturatedFat(i *int) *OccurrenceCreate
SetNillableSaturatedFat sets the "saturated_fat" field if the given value is not nil.
func (*OccurrenceCreate) SetNillableSugar ¶
func (oc *OccurrenceCreate) SetNillableSugar(i *int) *OccurrenceCreate
SetNillableSugar sets the "sugar" field if the given value is not nil.
func (*OccurrenceCreate) SetNotAvailableAfter ¶ added in v0.7.0
func (oc *OccurrenceCreate) SetNotAvailableAfter(t time.Time) *OccurrenceCreate
SetNotAvailableAfter sets the "not_available_after" field.
func (*OccurrenceCreate) SetPriceGuest ¶
func (oc *OccurrenceCreate) SetPriceGuest(i int) *OccurrenceCreate
SetPriceGuest sets the "price_guest" field.
func (*OccurrenceCreate) SetPriceStaff ¶
func (oc *OccurrenceCreate) SetPriceStaff(i int) *OccurrenceCreate
SetPriceStaff sets the "price_staff" field.
func (*OccurrenceCreate) SetPriceStudent ¶
func (oc *OccurrenceCreate) SetPriceStudent(i int) *OccurrenceCreate
SetPriceStudent sets the "price_student" field.
func (*OccurrenceCreate) SetProtein ¶
func (oc *OccurrenceCreate) SetProtein(i int) *OccurrenceCreate
SetProtein sets the "protein" field.
func (*OccurrenceCreate) SetSalt ¶
func (oc *OccurrenceCreate) SetSalt(i int) *OccurrenceCreate
SetSalt sets the "salt" field.
func (*OccurrenceCreate) SetSaturatedFat ¶
func (oc *OccurrenceCreate) SetSaturatedFat(i int) *OccurrenceCreate
SetSaturatedFat sets the "saturated_fat" field.
func (*OccurrenceCreate) SetSugar ¶
func (oc *OccurrenceCreate) SetSugar(i int) *OccurrenceCreate
SetSugar sets the "sugar" field.
type OccurrenceCreateBulk ¶
type OccurrenceCreateBulk struct {
// contains filtered or unexported fields
}
OccurrenceCreateBulk is the builder for creating many Occurrence entities in bulk.
func (*OccurrenceCreateBulk) Exec ¶
func (ocb *OccurrenceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OccurrenceCreateBulk) ExecX ¶
func (ocb *OccurrenceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceCreateBulk) OnConflict ¶
func (ocb *OccurrenceCreateBulk) OnConflict(opts ...sql.ConflictOption) *OccurrenceUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Occurrence.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.OccurrenceUpsert) { SetDate(v+v). }). Exec(ctx)
func (*OccurrenceCreateBulk) OnConflictColumns ¶
func (ocb *OccurrenceCreateBulk) OnConflictColumns(columns ...string) *OccurrenceUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Occurrence.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OccurrenceCreateBulk) Save ¶
func (ocb *OccurrenceCreateBulk) Save(ctx context.Context) ([]*Occurrence, error)
Save creates the Occurrence entities in the database.
func (*OccurrenceCreateBulk) SaveX ¶
func (ocb *OccurrenceCreateBulk) SaveX(ctx context.Context) []*Occurrence
SaveX is like Save, but panics if an error occurs.
type OccurrenceDelete ¶
type OccurrenceDelete struct {
// contains filtered or unexported fields
}
OccurrenceDelete is the builder for deleting a Occurrence entity.
func (*OccurrenceDelete) Exec ¶
func (od *OccurrenceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OccurrenceDelete) ExecX ¶
func (od *OccurrenceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceDelete) Where ¶
func (od *OccurrenceDelete) Where(ps ...predicate.Occurrence) *OccurrenceDelete
Where appends a list predicates to the OccurrenceDelete builder.
type OccurrenceDeleteOne ¶
type OccurrenceDeleteOne struct {
// contains filtered or unexported fields
}
OccurrenceDeleteOne is the builder for deleting a single Occurrence entity.
func (*OccurrenceDeleteOne) Exec ¶
func (odo *OccurrenceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OccurrenceDeleteOne) ExecX ¶
func (odo *OccurrenceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceDeleteOne) Where ¶
func (odo *OccurrenceDeleteOne) Where(ps ...predicate.Occurrence) *OccurrenceDeleteOne
Where appends a list predicates to the OccurrenceDelete builder.
type OccurrenceEdges ¶
type OccurrenceEdges struct { // Location holds the value of the location edge. Location *Location `json:"location,omitempty"` // Dish holds the value of the dish edge. Dish *Dish `json:"dish,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // SideDishes holds the value of the side_dishes edge. SideDishes []*Dish `json:"side_dishes,omitempty"` // Reviews holds the value of the reviews edge. Reviews []*Review `json:"reviews,omitempty"` // contains filtered or unexported fields }
OccurrenceEdges holds the relations/edges for other nodes in the graph.
func (OccurrenceEdges) DishOrErr ¶
func (e OccurrenceEdges) DishOrErr() (*Dish, error)
DishOrErr returns the Dish value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OccurrenceEdges) LocationOrErr ¶
func (e OccurrenceEdges) LocationOrErr() (*Location, error)
LocationOrErr returns the Location value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OccurrenceEdges) ReviewsOrErr ¶
func (e OccurrenceEdges) ReviewsOrErr() ([]*Review, error)
ReviewsOrErr returns the Reviews value or an error if the edge was not loaded in eager-loading.
func (OccurrenceEdges) SideDishesOrErr ¶
func (e OccurrenceEdges) SideDishesOrErr() ([]*Dish, error)
SideDishesOrErr returns the SideDishes value or an error if the edge was not loaded in eager-loading.
func (OccurrenceEdges) TagsOrErr ¶
func (e OccurrenceEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
type OccurrenceGroupBy ¶
type OccurrenceGroupBy struct {
// contains filtered or unexported fields
}
OccurrenceGroupBy is the group-by builder for Occurrence entities.
func (*OccurrenceGroupBy) Aggregate ¶
func (ogb *OccurrenceGroupBy) Aggregate(fns ...AggregateFunc) *OccurrenceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OccurrenceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OccurrenceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OccurrenceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OccurrenceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OccurrenceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OccurrenceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OccurrenceGroupBy) Scan ¶
func (ogb *OccurrenceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OccurrenceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OccurrenceMutation ¶
type OccurrenceMutation struct {
// contains filtered or unexported fields
}
OccurrenceMutation represents an operation that mutates the Occurrence nodes in the graph.
func (*OccurrenceMutation) AddCarbohydrates ¶
func (m *OccurrenceMutation) AddCarbohydrates(i int)
AddCarbohydrates adds i to the "carbohydrates" field.
func (*OccurrenceMutation) AddFat ¶
func (m *OccurrenceMutation) AddFat(i int)
AddFat adds i to the "fat" field.
func (*OccurrenceMutation) AddFiber ¶
func (m *OccurrenceMutation) AddFiber(i int)
AddFiber adds i to the "fiber" field.
func (*OccurrenceMutation) AddField ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) AddKcal ¶
func (m *OccurrenceMutation) AddKcal(i int)
AddKcal adds i to the "kcal" field.
func (*OccurrenceMutation) AddKj ¶
func (m *OccurrenceMutation) AddKj(i int)
AddKj adds i to the "kj" field.
func (*OccurrenceMutation) AddPriceGuest ¶
func (m *OccurrenceMutation) AddPriceGuest(i int)
AddPriceGuest adds i to the "price_guest" field.
func (*OccurrenceMutation) AddPriceStaff ¶
func (m *OccurrenceMutation) AddPriceStaff(i int)
AddPriceStaff adds i to the "price_staff" field.
func (*OccurrenceMutation) AddPriceStudent ¶
func (m *OccurrenceMutation) AddPriceStudent(i int)
AddPriceStudent adds i to the "price_student" field.
func (*OccurrenceMutation) AddProtein ¶
func (m *OccurrenceMutation) AddProtein(i int)
AddProtein adds i to the "protein" field.
func (*OccurrenceMutation) AddReviewIDs ¶
func (m *OccurrenceMutation) AddReviewIDs(ids ...uuid.UUID)
AddReviewIDs adds the "reviews" edge to the Review entity by ids.
func (*OccurrenceMutation) AddSalt ¶
func (m *OccurrenceMutation) AddSalt(i int)
AddSalt adds i to the "salt" field.
func (*OccurrenceMutation) AddSaturatedFat ¶
func (m *OccurrenceMutation) AddSaturatedFat(i int)
AddSaturatedFat adds i to the "saturated_fat" field.
func (*OccurrenceMutation) AddSideDishIDs ¶
func (m *OccurrenceMutation) AddSideDishIDs(ids ...uuid.UUID)
AddSideDishIDs adds the "side_dishes" edge to the Dish entity by ids.
func (*OccurrenceMutation) AddSugar ¶
func (m *OccurrenceMutation) AddSugar(i int)
AddSugar adds i to the "sugar" field.
func (*OccurrenceMutation) AddTagIDs ¶
func (m *OccurrenceMutation) AddTagIDs(ids ...string)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*OccurrenceMutation) AddedCarbohydrates ¶
func (m *OccurrenceMutation) AddedCarbohydrates() (r int, exists bool)
AddedCarbohydrates returns the value that was added to the "carbohydrates" field in this mutation.
func (*OccurrenceMutation) AddedEdges ¶
func (m *OccurrenceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OccurrenceMutation) AddedFat ¶
func (m *OccurrenceMutation) AddedFat() (r int, exists bool)
AddedFat returns the value that was added to the "fat" field in this mutation.
func (*OccurrenceMutation) AddedFiber ¶
func (m *OccurrenceMutation) AddedFiber() (r int, exists bool)
AddedFiber returns the value that was added to the "fiber" field in this mutation.
func (*OccurrenceMutation) AddedField ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) AddedFields ¶
func (m *OccurrenceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OccurrenceMutation) AddedIDs ¶
func (m *OccurrenceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OccurrenceMutation) AddedKcal ¶
func (m *OccurrenceMutation) AddedKcal() (r int, exists bool)
AddedKcal returns the value that was added to the "kcal" field in this mutation.
func (*OccurrenceMutation) AddedKj ¶
func (m *OccurrenceMutation) AddedKj() (r int, exists bool)
AddedKj returns the value that was added to the "kj" field in this mutation.
func (*OccurrenceMutation) AddedPriceGuest ¶
func (m *OccurrenceMutation) AddedPriceGuest() (r int, exists bool)
AddedPriceGuest returns the value that was added to the "price_guest" field in this mutation.
func (*OccurrenceMutation) AddedPriceStaff ¶
func (m *OccurrenceMutation) AddedPriceStaff() (r int, exists bool)
AddedPriceStaff returns the value that was added to the "price_staff" field in this mutation.
func (*OccurrenceMutation) AddedPriceStudent ¶
func (m *OccurrenceMutation) AddedPriceStudent() (r int, exists bool)
AddedPriceStudent returns the value that was added to the "price_student" field in this mutation.
func (*OccurrenceMutation) AddedProtein ¶
func (m *OccurrenceMutation) AddedProtein() (r int, exists bool)
AddedProtein returns the value that was added to the "protein" field in this mutation.
func (*OccurrenceMutation) AddedSalt ¶
func (m *OccurrenceMutation) AddedSalt() (r int, exists bool)
AddedSalt returns the value that was added to the "salt" field in this mutation.
func (*OccurrenceMutation) AddedSaturatedFat ¶
func (m *OccurrenceMutation) AddedSaturatedFat() (r int, exists bool)
AddedSaturatedFat returns the value that was added to the "saturated_fat" field in this mutation.
func (*OccurrenceMutation) AddedSugar ¶
func (m *OccurrenceMutation) AddedSugar() (r int, exists bool)
AddedSugar returns the value that was added to the "sugar" field in this mutation.
func (*OccurrenceMutation) Carbohydrates ¶
func (m *OccurrenceMutation) Carbohydrates() (r int, exists bool)
Carbohydrates returns the value of the "carbohydrates" field in the mutation.
func (*OccurrenceMutation) CarbohydratesCleared ¶
func (m *OccurrenceMutation) CarbohydratesCleared() bool
CarbohydratesCleared returns if the "carbohydrates" field was cleared in this mutation.
func (*OccurrenceMutation) ClearCarbohydrates ¶
func (m *OccurrenceMutation) ClearCarbohydrates()
ClearCarbohydrates clears the value of the "carbohydrates" field.
func (*OccurrenceMutation) ClearDish ¶
func (m *OccurrenceMutation) ClearDish()
ClearDish clears the "dish" edge to the Dish entity.
func (*OccurrenceMutation) ClearEdge ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) ClearFat ¶
func (m *OccurrenceMutation) ClearFat()
ClearFat clears the value of the "fat" field.
func (*OccurrenceMutation) ClearFiber ¶
func (m *OccurrenceMutation) ClearFiber()
ClearFiber clears the value of the "fiber" field.
func (*OccurrenceMutation) ClearField ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) ClearKcal ¶
func (m *OccurrenceMutation) ClearKcal()
ClearKcal clears the value of the "kcal" field.
func (*OccurrenceMutation) ClearKj ¶
func (m *OccurrenceMutation) ClearKj()
ClearKj clears the value of the "kj" field.
func (*OccurrenceMutation) ClearLocation ¶
func (m *OccurrenceMutation) ClearLocation()
ClearLocation clears the "location" edge to the Location entity.
func (*OccurrenceMutation) ClearNotAvailableAfter ¶ added in v0.7.0
func (m *OccurrenceMutation) ClearNotAvailableAfter()
ClearNotAvailableAfter clears the value of the "not_available_after" field.
func (*OccurrenceMutation) ClearPriceGuest ¶
func (m *OccurrenceMutation) ClearPriceGuest()
ClearPriceGuest clears the value of the "price_guest" field.
func (*OccurrenceMutation) ClearPriceStaff ¶
func (m *OccurrenceMutation) ClearPriceStaff()
ClearPriceStaff clears the value of the "price_staff" field.
func (*OccurrenceMutation) ClearPriceStudent ¶
func (m *OccurrenceMutation) ClearPriceStudent()
ClearPriceStudent clears the value of the "price_student" field.
func (*OccurrenceMutation) ClearProtein ¶
func (m *OccurrenceMutation) ClearProtein()
ClearProtein clears the value of the "protein" field.
func (*OccurrenceMutation) ClearReviews ¶
func (m *OccurrenceMutation) ClearReviews()
ClearReviews clears the "reviews" edge to the Review entity.
func (*OccurrenceMutation) ClearSalt ¶
func (m *OccurrenceMutation) ClearSalt()
ClearSalt clears the value of the "salt" field.
func (*OccurrenceMutation) ClearSaturatedFat ¶
func (m *OccurrenceMutation) ClearSaturatedFat()
ClearSaturatedFat clears the value of the "saturated_fat" field.
func (*OccurrenceMutation) ClearSideDishes ¶
func (m *OccurrenceMutation) ClearSideDishes()
ClearSideDishes clears the "side_dishes" edge to the Dish entity.
func (*OccurrenceMutation) ClearSugar ¶
func (m *OccurrenceMutation) ClearSugar()
ClearSugar clears the value of the "sugar" field.
func (*OccurrenceMutation) ClearTags ¶
func (m *OccurrenceMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*OccurrenceMutation) ClearedEdges ¶
func (m *OccurrenceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OccurrenceMutation) ClearedFields ¶
func (m *OccurrenceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OccurrenceMutation) Client ¶
func (m OccurrenceMutation) 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 (*OccurrenceMutation) Date ¶
func (m *OccurrenceMutation) Date() (r time.Time, exists bool)
Date returns the value of the "date" field in the mutation.
func (*OccurrenceMutation) DishCleared ¶
func (m *OccurrenceMutation) DishCleared() bool
DishCleared reports if the "dish" edge to the Dish entity was cleared.
func (*OccurrenceMutation) DishID ¶
func (m *OccurrenceMutation) DishID() (id uuid.UUID, exists bool)
DishID returns the "dish" edge ID in the mutation.
func (*OccurrenceMutation) DishIDs ¶
func (m *OccurrenceMutation) DishIDs() (ids []uuid.UUID)
DishIDs returns the "dish" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DishID instead. It exists only for internal usage by the builders.
func (*OccurrenceMutation) EdgeCleared ¶
func (m *OccurrenceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OccurrenceMutation) Fat ¶
func (m *OccurrenceMutation) Fat() (r int, exists bool)
Fat returns the value of the "fat" field in the mutation.
func (*OccurrenceMutation) FatCleared ¶
func (m *OccurrenceMutation) FatCleared() bool
FatCleared returns if the "fat" field was cleared in this mutation.
func (*OccurrenceMutation) Fiber ¶
func (m *OccurrenceMutation) Fiber() (r int, exists bool)
Fiber returns the value of the "fiber" field in the mutation.
func (*OccurrenceMutation) FiberCleared ¶
func (m *OccurrenceMutation) FiberCleared() bool
FiberCleared returns if the "fiber" field was cleared in this mutation.
func (*OccurrenceMutation) Field ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) FieldCleared ¶
func (m *OccurrenceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OccurrenceMutation) Fields ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) ID ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) 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 (*OccurrenceMutation) Kcal ¶
func (m *OccurrenceMutation) Kcal() (r int, exists bool)
Kcal returns the value of the "kcal" field in the mutation.
func (*OccurrenceMutation) KcalCleared ¶
func (m *OccurrenceMutation) KcalCleared() bool
KcalCleared returns if the "kcal" field was cleared in this mutation.
func (*OccurrenceMutation) Kj ¶
func (m *OccurrenceMutation) Kj() (r int, exists bool)
Kj returns the value of the "kj" field in the mutation.
func (*OccurrenceMutation) KjCleared ¶
func (m *OccurrenceMutation) KjCleared() bool
KjCleared returns if the "kj" field was cleared in this mutation.
func (*OccurrenceMutation) LocationCleared ¶
func (m *OccurrenceMutation) LocationCleared() bool
LocationCleared reports if the "location" edge to the Location entity was cleared.
func (*OccurrenceMutation) LocationID ¶
func (m *OccurrenceMutation) LocationID() (id uuid.UUID, exists bool)
LocationID returns the "location" edge ID in the mutation.
func (*OccurrenceMutation) LocationIDs ¶
func (m *OccurrenceMutation) LocationIDs() (ids []uuid.UUID)
LocationIDs returns the "location" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LocationID instead. It exists only for internal usage by the builders.
func (*OccurrenceMutation) NotAvailableAfter ¶ added in v0.7.0
func (m *OccurrenceMutation) NotAvailableAfter() (r time.Time, exists bool)
NotAvailableAfter returns the value of the "not_available_after" field in the mutation.
func (*OccurrenceMutation) NotAvailableAfterCleared ¶ added in v0.7.0
func (m *OccurrenceMutation) NotAvailableAfterCleared() bool
NotAvailableAfterCleared returns if the "not_available_after" field was cleared in this mutation.
func (*OccurrenceMutation) OldCarbohydrates ¶
func (m *OccurrenceMutation) OldCarbohydrates(ctx context.Context) (v *int, err error)
OldCarbohydrates returns the old "carbohydrates" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldDate ¶
OldDate returns the old "date" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldFat ¶
func (m *OccurrenceMutation) OldFat(ctx context.Context) (v *int, err error)
OldFat returns the old "fat" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldFiber ¶
func (m *OccurrenceMutation) OldFiber(ctx context.Context) (v *int, err error)
OldFiber returns the old "fiber" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) 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 (*OccurrenceMutation) OldKcal ¶
func (m *OccurrenceMutation) OldKcal(ctx context.Context) (v *int, err error)
OldKcal returns the old "kcal" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldKj ¶
func (m *OccurrenceMutation) OldKj(ctx context.Context) (v *int, err error)
OldKj returns the old "kj" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldNotAvailableAfter ¶ added in v0.7.0
OldNotAvailableAfter returns the old "not_available_after" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldPriceGuest ¶
func (m *OccurrenceMutation) OldPriceGuest(ctx context.Context) (v *int, err error)
OldPriceGuest returns the old "price_guest" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldPriceStaff ¶
func (m *OccurrenceMutation) OldPriceStaff(ctx context.Context) (v *int, err error)
OldPriceStaff returns the old "price_staff" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldPriceStudent ¶
func (m *OccurrenceMutation) OldPriceStudent(ctx context.Context) (v *int, err error)
OldPriceStudent returns the old "price_student" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldProtein ¶
func (m *OccurrenceMutation) OldProtein(ctx context.Context) (v *int, err error)
OldProtein returns the old "protein" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldSalt ¶
func (m *OccurrenceMutation) OldSalt(ctx context.Context) (v *int, err error)
OldSalt returns the old "salt" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldSaturatedFat ¶
func (m *OccurrenceMutation) OldSaturatedFat(ctx context.Context) (v *int, err error)
OldSaturatedFat returns the old "saturated_fat" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) OldSugar ¶
func (m *OccurrenceMutation) OldSugar(ctx context.Context) (v *int, err error)
OldSugar returns the old "sugar" field's value of the Occurrence entity. If the Occurrence 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 (*OccurrenceMutation) PriceGuest ¶
func (m *OccurrenceMutation) PriceGuest() (r int, exists bool)
PriceGuest returns the value of the "price_guest" field in the mutation.
func (*OccurrenceMutation) PriceGuestCleared ¶
func (m *OccurrenceMutation) PriceGuestCleared() bool
PriceGuestCleared returns if the "price_guest" field was cleared in this mutation.
func (*OccurrenceMutation) PriceStaff ¶
func (m *OccurrenceMutation) PriceStaff() (r int, exists bool)
PriceStaff returns the value of the "price_staff" field in the mutation.
func (*OccurrenceMutation) PriceStaffCleared ¶
func (m *OccurrenceMutation) PriceStaffCleared() bool
PriceStaffCleared returns if the "price_staff" field was cleared in this mutation.
func (*OccurrenceMutation) PriceStudent ¶
func (m *OccurrenceMutation) PriceStudent() (r int, exists bool)
PriceStudent returns the value of the "price_student" field in the mutation.
func (*OccurrenceMutation) PriceStudentCleared ¶
func (m *OccurrenceMutation) PriceStudentCleared() bool
PriceStudentCleared returns if the "price_student" field was cleared in this mutation.
func (*OccurrenceMutation) Protein ¶
func (m *OccurrenceMutation) Protein() (r int, exists bool)
Protein returns the value of the "protein" field in the mutation.
func (*OccurrenceMutation) ProteinCleared ¶
func (m *OccurrenceMutation) ProteinCleared() bool
ProteinCleared returns if the "protein" field was cleared in this mutation.
func (*OccurrenceMutation) RemoveReviewIDs ¶
func (m *OccurrenceMutation) RemoveReviewIDs(ids ...uuid.UUID)
RemoveReviewIDs removes the "reviews" edge to the Review entity by IDs.
func (*OccurrenceMutation) RemoveSideDishIDs ¶
func (m *OccurrenceMutation) RemoveSideDishIDs(ids ...uuid.UUID)
RemoveSideDishIDs removes the "side_dishes" edge to the Dish entity by IDs.
func (*OccurrenceMutation) RemoveTagIDs ¶
func (m *OccurrenceMutation) RemoveTagIDs(ids ...string)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*OccurrenceMutation) RemovedEdges ¶
func (m *OccurrenceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OccurrenceMutation) RemovedIDs ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) RemovedReviewsIDs ¶
func (m *OccurrenceMutation) RemovedReviewsIDs() (ids []uuid.UUID)
RemovedReviews returns the removed IDs of the "reviews" edge to the Review entity.
func (*OccurrenceMutation) RemovedSideDishesIDs ¶
func (m *OccurrenceMutation) RemovedSideDishesIDs() (ids []uuid.UUID)
RemovedSideDishes returns the removed IDs of the "side_dishes" edge to the Dish entity.
func (*OccurrenceMutation) RemovedTagsIDs ¶
func (m *OccurrenceMutation) RemovedTagsIDs() (ids []string)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*OccurrenceMutation) ResetCarbohydrates ¶
func (m *OccurrenceMutation) ResetCarbohydrates()
ResetCarbohydrates resets all changes to the "carbohydrates" field.
func (*OccurrenceMutation) ResetDate ¶
func (m *OccurrenceMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*OccurrenceMutation) ResetDish ¶
func (m *OccurrenceMutation) ResetDish()
ResetDish resets all changes to the "dish" edge.
func (*OccurrenceMutation) ResetEdge ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) ResetFat ¶
func (m *OccurrenceMutation) ResetFat()
ResetFat resets all changes to the "fat" field.
func (*OccurrenceMutation) ResetFiber ¶
func (m *OccurrenceMutation) ResetFiber()
ResetFiber resets all changes to the "fiber" field.
func (*OccurrenceMutation) ResetField ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) ResetKcal ¶
func (m *OccurrenceMutation) ResetKcal()
ResetKcal resets all changes to the "kcal" field.
func (*OccurrenceMutation) ResetKj ¶
func (m *OccurrenceMutation) ResetKj()
ResetKj resets all changes to the "kj" field.
func (*OccurrenceMutation) ResetLocation ¶
func (m *OccurrenceMutation) ResetLocation()
ResetLocation resets all changes to the "location" edge.
func (*OccurrenceMutation) ResetNotAvailableAfter ¶ added in v0.7.0
func (m *OccurrenceMutation) ResetNotAvailableAfter()
ResetNotAvailableAfter resets all changes to the "not_available_after" field.
func (*OccurrenceMutation) ResetPriceGuest ¶
func (m *OccurrenceMutation) ResetPriceGuest()
ResetPriceGuest resets all changes to the "price_guest" field.
func (*OccurrenceMutation) ResetPriceStaff ¶
func (m *OccurrenceMutation) ResetPriceStaff()
ResetPriceStaff resets all changes to the "price_staff" field.
func (*OccurrenceMutation) ResetPriceStudent ¶
func (m *OccurrenceMutation) ResetPriceStudent()
ResetPriceStudent resets all changes to the "price_student" field.
func (*OccurrenceMutation) ResetProtein ¶
func (m *OccurrenceMutation) ResetProtein()
ResetProtein resets all changes to the "protein" field.
func (*OccurrenceMutation) ResetReviews ¶
func (m *OccurrenceMutation) ResetReviews()
ResetReviews resets all changes to the "reviews" edge.
func (*OccurrenceMutation) ResetSalt ¶
func (m *OccurrenceMutation) ResetSalt()
ResetSalt resets all changes to the "salt" field.
func (*OccurrenceMutation) ResetSaturatedFat ¶
func (m *OccurrenceMutation) ResetSaturatedFat()
ResetSaturatedFat resets all changes to the "saturated_fat" field.
func (*OccurrenceMutation) ResetSideDishes ¶
func (m *OccurrenceMutation) ResetSideDishes()
ResetSideDishes resets all changes to the "side_dishes" edge.
func (*OccurrenceMutation) ResetSugar ¶
func (m *OccurrenceMutation) ResetSugar()
ResetSugar resets all changes to the "sugar" field.
func (*OccurrenceMutation) ResetTags ¶
func (m *OccurrenceMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*OccurrenceMutation) ReviewsCleared ¶
func (m *OccurrenceMutation) ReviewsCleared() bool
ReviewsCleared reports if the "reviews" edge to the Review entity was cleared.
func (*OccurrenceMutation) ReviewsIDs ¶
func (m *OccurrenceMutation) ReviewsIDs() (ids []uuid.UUID)
ReviewsIDs returns the "reviews" edge IDs in the mutation.
func (*OccurrenceMutation) Salt ¶
func (m *OccurrenceMutation) Salt() (r int, exists bool)
Salt returns the value of the "salt" field in the mutation.
func (*OccurrenceMutation) SaltCleared ¶
func (m *OccurrenceMutation) SaltCleared() bool
SaltCleared returns if the "salt" field was cleared in this mutation.
func (*OccurrenceMutation) SaturatedFat ¶
func (m *OccurrenceMutation) SaturatedFat() (r int, exists bool)
SaturatedFat returns the value of the "saturated_fat" field in the mutation.
func (*OccurrenceMutation) SaturatedFatCleared ¶
func (m *OccurrenceMutation) SaturatedFatCleared() bool
SaturatedFatCleared returns if the "saturated_fat" field was cleared in this mutation.
func (*OccurrenceMutation) SetCarbohydrates ¶
func (m *OccurrenceMutation) SetCarbohydrates(i int)
SetCarbohydrates sets the "carbohydrates" field.
func (*OccurrenceMutation) SetDate ¶
func (m *OccurrenceMutation) SetDate(t time.Time)
SetDate sets the "date" field.
func (*OccurrenceMutation) SetDishID ¶
func (m *OccurrenceMutation) SetDishID(id uuid.UUID)
SetDishID sets the "dish" edge to the Dish entity by id.
func (*OccurrenceMutation) SetFat ¶
func (m *OccurrenceMutation) SetFat(i int)
SetFat sets the "fat" field.
func (*OccurrenceMutation) SetFiber ¶
func (m *OccurrenceMutation) SetFiber(i int)
SetFiber sets the "fiber" field.
func (*OccurrenceMutation) SetField ¶
func (m *OccurrenceMutation) 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 (*OccurrenceMutation) SetID ¶
func (m *OccurrenceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Occurrence entities.
func (*OccurrenceMutation) SetKcal ¶
func (m *OccurrenceMutation) SetKcal(i int)
SetKcal sets the "kcal" field.
func (*OccurrenceMutation) SetKj ¶
func (m *OccurrenceMutation) SetKj(i int)
SetKj sets the "kj" field.
func (*OccurrenceMutation) SetLocationID ¶
func (m *OccurrenceMutation) SetLocationID(id uuid.UUID)
SetLocationID sets the "location" edge to the Location entity by id.
func (*OccurrenceMutation) SetNotAvailableAfter ¶ added in v0.7.0
func (m *OccurrenceMutation) SetNotAvailableAfter(t time.Time)
SetNotAvailableAfter sets the "not_available_after" field.
func (*OccurrenceMutation) SetOp ¶
func (m *OccurrenceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OccurrenceMutation) SetPriceGuest ¶
func (m *OccurrenceMutation) SetPriceGuest(i int)
SetPriceGuest sets the "price_guest" field.
func (*OccurrenceMutation) SetPriceStaff ¶
func (m *OccurrenceMutation) SetPriceStaff(i int)
SetPriceStaff sets the "price_staff" field.
func (*OccurrenceMutation) SetPriceStudent ¶
func (m *OccurrenceMutation) SetPriceStudent(i int)
SetPriceStudent sets the "price_student" field.
func (*OccurrenceMutation) SetProtein ¶
func (m *OccurrenceMutation) SetProtein(i int)
SetProtein sets the "protein" field.
func (*OccurrenceMutation) SetSalt ¶
func (m *OccurrenceMutation) SetSalt(i int)
SetSalt sets the "salt" field.
func (*OccurrenceMutation) SetSaturatedFat ¶
func (m *OccurrenceMutation) SetSaturatedFat(i int)
SetSaturatedFat sets the "saturated_fat" field.
func (*OccurrenceMutation) SetSugar ¶
func (m *OccurrenceMutation) SetSugar(i int)
SetSugar sets the "sugar" field.
func (*OccurrenceMutation) SideDishesCleared ¶
func (m *OccurrenceMutation) SideDishesCleared() bool
SideDishesCleared reports if the "side_dishes" edge to the Dish entity was cleared.
func (*OccurrenceMutation) SideDishesIDs ¶
func (m *OccurrenceMutation) SideDishesIDs() (ids []uuid.UUID)
SideDishesIDs returns the "side_dishes" edge IDs in the mutation.
func (*OccurrenceMutation) Sugar ¶
func (m *OccurrenceMutation) Sugar() (r int, exists bool)
Sugar returns the value of the "sugar" field in the mutation.
func (*OccurrenceMutation) SugarCleared ¶
func (m *OccurrenceMutation) SugarCleared() bool
SugarCleared returns if the "sugar" field was cleared in this mutation.
func (*OccurrenceMutation) TagsCleared ¶
func (m *OccurrenceMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*OccurrenceMutation) TagsIDs ¶
func (m *OccurrenceMutation) TagsIDs() (ids []string)
TagsIDs returns the "tags" edge IDs in the mutation.
func (OccurrenceMutation) Tx ¶
func (m OccurrenceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OccurrenceMutation) Type ¶
func (m *OccurrenceMutation) Type() string
Type returns the node type of this mutation (Occurrence).
func (*OccurrenceMutation) Where ¶
func (m *OccurrenceMutation) Where(ps ...predicate.Occurrence)
Where appends a list predicates to the OccurrenceMutation builder.
func (*OccurrenceMutation) WhereP ¶
func (m *OccurrenceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OccurrenceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OccurrenceQuery ¶
type OccurrenceQuery struct {
// contains filtered or unexported fields
}
OccurrenceQuery is the builder for querying Occurrence entities.
func (*OccurrenceQuery) Aggregate ¶
func (oq *OccurrenceQuery) Aggregate(fns ...AggregateFunc) *OccurrenceSelect
Aggregate returns a OccurrenceSelect configured with the given aggregations.
func (*OccurrenceQuery) All ¶
func (oq *OccurrenceQuery) All(ctx context.Context) ([]*Occurrence, error)
All executes the query and returns a list of Occurrences.
func (*OccurrenceQuery) AllX ¶
func (oq *OccurrenceQuery) AllX(ctx context.Context) []*Occurrence
AllX is like All, but panics if an error occurs.
func (*OccurrenceQuery) Clone ¶
func (oq *OccurrenceQuery) Clone() *OccurrenceQuery
Clone returns a duplicate of the OccurrenceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OccurrenceQuery) Count ¶
func (oq *OccurrenceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OccurrenceQuery) CountX ¶
func (oq *OccurrenceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OccurrenceQuery) Exist ¶
func (oq *OccurrenceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OccurrenceQuery) ExistX ¶
func (oq *OccurrenceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OccurrenceQuery) First ¶
func (oq *OccurrenceQuery) First(ctx context.Context) (*Occurrence, error)
First returns the first Occurrence entity from the query. Returns a *NotFoundError when no Occurrence was found.
func (*OccurrenceQuery) FirstID ¶
FirstID returns the first Occurrence ID from the query. Returns a *NotFoundError when no Occurrence ID was found.
func (*OccurrenceQuery) FirstIDX ¶
func (oq *OccurrenceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*OccurrenceQuery) FirstX ¶
func (oq *OccurrenceQuery) FirstX(ctx context.Context) *Occurrence
FirstX is like First, but panics if an error occurs.
func (*OccurrenceQuery) GroupBy ¶
func (oq *OccurrenceQuery) GroupBy(field string, fields ...string) *OccurrenceGroupBy
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 { Date time.Time `json:"date,omitempty"` Count int `json:"count,omitempty"` } client.Occurrence.Query(). GroupBy(occurrence.FieldDate). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OccurrenceQuery) IDsX ¶
func (oq *OccurrenceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*OccurrenceQuery) Limit ¶
func (oq *OccurrenceQuery) Limit(limit int) *OccurrenceQuery
Limit the number of records to be returned by this query.
func (*OccurrenceQuery) Offset ¶
func (oq *OccurrenceQuery) Offset(offset int) *OccurrenceQuery
Offset to start from.
func (*OccurrenceQuery) Only ¶
func (oq *OccurrenceQuery) Only(ctx context.Context) (*Occurrence, error)
Only returns a single Occurrence entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Occurrence entity is found. Returns a *NotFoundError when no Occurrence entities are found.
func (*OccurrenceQuery) OnlyID ¶
OnlyID is like Only, but returns the only Occurrence ID in the query. Returns a *NotSingularError when more than one Occurrence ID is found. Returns a *NotFoundError when no entities are found.
func (*OccurrenceQuery) OnlyIDX ¶
func (oq *OccurrenceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OccurrenceQuery) OnlyX ¶
func (oq *OccurrenceQuery) OnlyX(ctx context.Context) *Occurrence
OnlyX is like Only, but panics if an error occurs.
func (*OccurrenceQuery) Order ¶
func (oq *OccurrenceQuery) Order(o ...occurrence.OrderOption) *OccurrenceQuery
Order specifies how the records should be ordered.
func (*OccurrenceQuery) QueryDish ¶
func (oq *OccurrenceQuery) QueryDish() *DishQuery
QueryDish chains the current query on the "dish" edge.
func (*OccurrenceQuery) QueryLocation ¶
func (oq *OccurrenceQuery) QueryLocation() *LocationQuery
QueryLocation chains the current query on the "location" edge.
func (*OccurrenceQuery) QueryReviews ¶
func (oq *OccurrenceQuery) QueryReviews() *ReviewQuery
QueryReviews chains the current query on the "reviews" edge.
func (*OccurrenceQuery) QuerySideDishes ¶
func (oq *OccurrenceQuery) QuerySideDishes() *DishQuery
QuerySideDishes chains the current query on the "side_dishes" edge.
func (*OccurrenceQuery) QueryTags ¶
func (oq *OccurrenceQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*OccurrenceQuery) Select ¶
func (oq *OccurrenceQuery) Select(fields ...string) *OccurrenceSelect
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 { Date time.Time `json:"date,omitempty"` } client.Occurrence.Query(). Select(occurrence.FieldDate). Scan(ctx, &v)
func (*OccurrenceQuery) Unique ¶
func (oq *OccurrenceQuery) Unique(unique bool) *OccurrenceQuery
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 (*OccurrenceQuery) Where ¶
func (oq *OccurrenceQuery) Where(ps ...predicate.Occurrence) *OccurrenceQuery
Where adds a new predicate for the OccurrenceQuery builder.
func (*OccurrenceQuery) WithDish ¶
func (oq *OccurrenceQuery) WithDish(opts ...func(*DishQuery)) *OccurrenceQuery
WithDish tells the query-builder to eager-load the nodes that are connected to the "dish" edge. The optional arguments are used to configure the query builder of the edge.
func (*OccurrenceQuery) WithLocation ¶
func (oq *OccurrenceQuery) WithLocation(opts ...func(*LocationQuery)) *OccurrenceQuery
WithLocation tells the query-builder to eager-load the nodes that are connected to the "location" edge. The optional arguments are used to configure the query builder of the edge.
func (*OccurrenceQuery) WithReviews ¶
func (oq *OccurrenceQuery) WithReviews(opts ...func(*ReviewQuery)) *OccurrenceQuery
WithReviews tells the query-builder to eager-load the nodes that are connected to the "reviews" edge. The optional arguments are used to configure the query builder of the edge.
func (*OccurrenceQuery) WithSideDishes ¶
func (oq *OccurrenceQuery) WithSideDishes(opts ...func(*DishQuery)) *OccurrenceQuery
WithSideDishes tells the query-builder to eager-load the nodes that are connected to the "side_dishes" edge. The optional arguments are used to configure the query builder of the edge.
func (*OccurrenceQuery) WithTags ¶
func (oq *OccurrenceQuery) WithTags(opts ...func(*TagQuery)) *OccurrenceQuery
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 OccurrenceSelect ¶
type OccurrenceSelect struct { *OccurrenceQuery // contains filtered or unexported fields }
OccurrenceSelect is the builder for selecting fields of Occurrence entities.
func (*OccurrenceSelect) Aggregate ¶
func (os *OccurrenceSelect) Aggregate(fns ...AggregateFunc) *OccurrenceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OccurrenceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OccurrenceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OccurrenceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OccurrenceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OccurrenceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OccurrenceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OccurrenceSelect) Scan ¶
func (os *OccurrenceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OccurrenceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OccurrenceUpdate ¶
type OccurrenceUpdate struct {
// contains filtered or unexported fields
}
OccurrenceUpdate is the builder for updating Occurrence entities.
func (*OccurrenceUpdate) AddCarbohydrates ¶
func (ou *OccurrenceUpdate) AddCarbohydrates(i int) *OccurrenceUpdate
AddCarbohydrates adds i to the "carbohydrates" field.
func (*OccurrenceUpdate) AddFat ¶
func (ou *OccurrenceUpdate) AddFat(i int) *OccurrenceUpdate
AddFat adds i to the "fat" field.
func (*OccurrenceUpdate) AddFiber ¶
func (ou *OccurrenceUpdate) AddFiber(i int) *OccurrenceUpdate
AddFiber adds i to the "fiber" field.
func (*OccurrenceUpdate) AddKcal ¶
func (ou *OccurrenceUpdate) AddKcal(i int) *OccurrenceUpdate
AddKcal adds i to the "kcal" field.
func (*OccurrenceUpdate) AddKj ¶
func (ou *OccurrenceUpdate) AddKj(i int) *OccurrenceUpdate
AddKj adds i to the "kj" field.
func (*OccurrenceUpdate) AddPriceGuest ¶
func (ou *OccurrenceUpdate) AddPriceGuest(i int) *OccurrenceUpdate
AddPriceGuest adds i to the "price_guest" field.
func (*OccurrenceUpdate) AddPriceStaff ¶
func (ou *OccurrenceUpdate) AddPriceStaff(i int) *OccurrenceUpdate
AddPriceStaff adds i to the "price_staff" field.
func (*OccurrenceUpdate) AddPriceStudent ¶
func (ou *OccurrenceUpdate) AddPriceStudent(i int) *OccurrenceUpdate
AddPriceStudent adds i to the "price_student" field.
func (*OccurrenceUpdate) AddProtein ¶
func (ou *OccurrenceUpdate) AddProtein(i int) *OccurrenceUpdate
AddProtein adds i to the "protein" field.
func (*OccurrenceUpdate) AddReviewIDs ¶
func (ou *OccurrenceUpdate) AddReviewIDs(ids ...uuid.UUID) *OccurrenceUpdate
AddReviewIDs adds the "reviews" edge to the Review entity by IDs.
func (*OccurrenceUpdate) AddReviews ¶
func (ou *OccurrenceUpdate) AddReviews(r ...*Review) *OccurrenceUpdate
AddReviews adds the "reviews" edges to the Review entity.
func (*OccurrenceUpdate) AddSalt ¶
func (ou *OccurrenceUpdate) AddSalt(i int) *OccurrenceUpdate
AddSalt adds i to the "salt" field.
func (*OccurrenceUpdate) AddSaturatedFat ¶
func (ou *OccurrenceUpdate) AddSaturatedFat(i int) *OccurrenceUpdate
AddSaturatedFat adds i to the "saturated_fat" field.
func (*OccurrenceUpdate) AddSideDishIDs ¶
func (ou *OccurrenceUpdate) AddSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdate
AddSideDishIDs adds the "side_dishes" edge to the Dish entity by IDs.
func (*OccurrenceUpdate) AddSideDishes ¶
func (ou *OccurrenceUpdate) AddSideDishes(d ...*Dish) *OccurrenceUpdate
AddSideDishes adds the "side_dishes" edges to the Dish entity.
func (*OccurrenceUpdate) AddSugar ¶
func (ou *OccurrenceUpdate) AddSugar(i int) *OccurrenceUpdate
AddSugar adds i to the "sugar" field.
func (*OccurrenceUpdate) AddTagIDs ¶
func (ou *OccurrenceUpdate) AddTagIDs(ids ...string) *OccurrenceUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*OccurrenceUpdate) AddTags ¶
func (ou *OccurrenceUpdate) AddTags(t ...*Tag) *OccurrenceUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*OccurrenceUpdate) ClearCarbohydrates ¶
func (ou *OccurrenceUpdate) ClearCarbohydrates() *OccurrenceUpdate
ClearCarbohydrates clears the value of the "carbohydrates" field.
func (*OccurrenceUpdate) ClearDish ¶
func (ou *OccurrenceUpdate) ClearDish() *OccurrenceUpdate
ClearDish clears the "dish" edge to the Dish entity.
func (*OccurrenceUpdate) ClearFat ¶
func (ou *OccurrenceUpdate) ClearFat() *OccurrenceUpdate
ClearFat clears the value of the "fat" field.
func (*OccurrenceUpdate) ClearFiber ¶
func (ou *OccurrenceUpdate) ClearFiber() *OccurrenceUpdate
ClearFiber clears the value of the "fiber" field.
func (*OccurrenceUpdate) ClearKcal ¶
func (ou *OccurrenceUpdate) ClearKcal() *OccurrenceUpdate
ClearKcal clears the value of the "kcal" field.
func (*OccurrenceUpdate) ClearKj ¶
func (ou *OccurrenceUpdate) ClearKj() *OccurrenceUpdate
ClearKj clears the value of the "kj" field.
func (*OccurrenceUpdate) ClearLocation ¶
func (ou *OccurrenceUpdate) ClearLocation() *OccurrenceUpdate
ClearLocation clears the "location" edge to the Location entity.
func (*OccurrenceUpdate) ClearNotAvailableAfter ¶ added in v0.7.0
func (ou *OccurrenceUpdate) ClearNotAvailableAfter() *OccurrenceUpdate
ClearNotAvailableAfter clears the value of the "not_available_after" field.
func (*OccurrenceUpdate) ClearPriceGuest ¶
func (ou *OccurrenceUpdate) ClearPriceGuest() *OccurrenceUpdate
ClearPriceGuest clears the value of the "price_guest" field.
func (*OccurrenceUpdate) ClearPriceStaff ¶
func (ou *OccurrenceUpdate) ClearPriceStaff() *OccurrenceUpdate
ClearPriceStaff clears the value of the "price_staff" field.
func (*OccurrenceUpdate) ClearPriceStudent ¶
func (ou *OccurrenceUpdate) ClearPriceStudent() *OccurrenceUpdate
ClearPriceStudent clears the value of the "price_student" field.
func (*OccurrenceUpdate) ClearProtein ¶
func (ou *OccurrenceUpdate) ClearProtein() *OccurrenceUpdate
ClearProtein clears the value of the "protein" field.
func (*OccurrenceUpdate) ClearReviews ¶
func (ou *OccurrenceUpdate) ClearReviews() *OccurrenceUpdate
ClearReviews clears all "reviews" edges to the Review entity.
func (*OccurrenceUpdate) ClearSalt ¶
func (ou *OccurrenceUpdate) ClearSalt() *OccurrenceUpdate
ClearSalt clears the value of the "salt" field.
func (*OccurrenceUpdate) ClearSaturatedFat ¶
func (ou *OccurrenceUpdate) ClearSaturatedFat() *OccurrenceUpdate
ClearSaturatedFat clears the value of the "saturated_fat" field.
func (*OccurrenceUpdate) ClearSideDishes ¶
func (ou *OccurrenceUpdate) ClearSideDishes() *OccurrenceUpdate
ClearSideDishes clears all "side_dishes" edges to the Dish entity.
func (*OccurrenceUpdate) ClearSugar ¶
func (ou *OccurrenceUpdate) ClearSugar() *OccurrenceUpdate
ClearSugar clears the value of the "sugar" field.
func (*OccurrenceUpdate) ClearTags ¶
func (ou *OccurrenceUpdate) ClearTags() *OccurrenceUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*OccurrenceUpdate) Exec ¶
func (ou *OccurrenceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OccurrenceUpdate) ExecX ¶
func (ou *OccurrenceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceUpdate) Mutation ¶
func (ou *OccurrenceUpdate) Mutation() *OccurrenceMutation
Mutation returns the OccurrenceMutation object of the builder.
func (*OccurrenceUpdate) RemoveReviewIDs ¶
func (ou *OccurrenceUpdate) RemoveReviewIDs(ids ...uuid.UUID) *OccurrenceUpdate
RemoveReviewIDs removes the "reviews" edge to Review entities by IDs.
func (*OccurrenceUpdate) RemoveReviews ¶
func (ou *OccurrenceUpdate) RemoveReviews(r ...*Review) *OccurrenceUpdate
RemoveReviews removes "reviews" edges to Review entities.
func (*OccurrenceUpdate) RemoveSideDishIDs ¶
func (ou *OccurrenceUpdate) RemoveSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdate
RemoveSideDishIDs removes the "side_dishes" edge to Dish entities by IDs.
func (*OccurrenceUpdate) RemoveSideDishes ¶
func (ou *OccurrenceUpdate) RemoveSideDishes(d ...*Dish) *OccurrenceUpdate
RemoveSideDishes removes "side_dishes" edges to Dish entities.
func (*OccurrenceUpdate) RemoveTagIDs ¶
func (ou *OccurrenceUpdate) RemoveTagIDs(ids ...string) *OccurrenceUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*OccurrenceUpdate) RemoveTags ¶
func (ou *OccurrenceUpdate) RemoveTags(t ...*Tag) *OccurrenceUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*OccurrenceUpdate) Save ¶
func (ou *OccurrenceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OccurrenceUpdate) SaveX ¶
func (ou *OccurrenceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OccurrenceUpdate) SetCarbohydrates ¶
func (ou *OccurrenceUpdate) SetCarbohydrates(i int) *OccurrenceUpdate
SetCarbohydrates sets the "carbohydrates" field.
func (*OccurrenceUpdate) SetDate ¶
func (ou *OccurrenceUpdate) SetDate(t time.Time) *OccurrenceUpdate
SetDate sets the "date" field.
func (*OccurrenceUpdate) SetDish ¶
func (ou *OccurrenceUpdate) SetDish(d *Dish) *OccurrenceUpdate
SetDish sets the "dish" edge to the Dish entity.
func (*OccurrenceUpdate) SetDishID ¶
func (ou *OccurrenceUpdate) SetDishID(id uuid.UUID) *OccurrenceUpdate
SetDishID sets the "dish" edge to the Dish entity by ID.
func (*OccurrenceUpdate) SetFat ¶
func (ou *OccurrenceUpdate) SetFat(i int) *OccurrenceUpdate
SetFat sets the "fat" field.
func (*OccurrenceUpdate) SetFiber ¶
func (ou *OccurrenceUpdate) SetFiber(i int) *OccurrenceUpdate
SetFiber sets the "fiber" field.
func (*OccurrenceUpdate) SetKcal ¶
func (ou *OccurrenceUpdate) SetKcal(i int) *OccurrenceUpdate
SetKcal sets the "kcal" field.
func (*OccurrenceUpdate) SetKj ¶
func (ou *OccurrenceUpdate) SetKj(i int) *OccurrenceUpdate
SetKj sets the "kj" field.
func (*OccurrenceUpdate) SetLocation ¶
func (ou *OccurrenceUpdate) SetLocation(l *Location) *OccurrenceUpdate
SetLocation sets the "location" edge to the Location entity.
func (*OccurrenceUpdate) SetLocationID ¶
func (ou *OccurrenceUpdate) SetLocationID(id uuid.UUID) *OccurrenceUpdate
SetLocationID sets the "location" edge to the Location entity by ID.
func (*OccurrenceUpdate) SetNillableCarbohydrates ¶
func (ou *OccurrenceUpdate) SetNillableCarbohydrates(i *int) *OccurrenceUpdate
SetNillableCarbohydrates sets the "carbohydrates" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableDate ¶
func (ou *OccurrenceUpdate) SetNillableDate(t *time.Time) *OccurrenceUpdate
SetNillableDate sets the "date" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableFat ¶
func (ou *OccurrenceUpdate) SetNillableFat(i *int) *OccurrenceUpdate
SetNillableFat sets the "fat" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableFiber ¶
func (ou *OccurrenceUpdate) SetNillableFiber(i *int) *OccurrenceUpdate
SetNillableFiber sets the "fiber" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableKcal ¶
func (ou *OccurrenceUpdate) SetNillableKcal(i *int) *OccurrenceUpdate
SetNillableKcal sets the "kcal" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableKj ¶
func (ou *OccurrenceUpdate) SetNillableKj(i *int) *OccurrenceUpdate
SetNillableKj sets the "kj" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableNotAvailableAfter ¶ added in v0.7.0
func (ou *OccurrenceUpdate) SetNillableNotAvailableAfter(t *time.Time) *OccurrenceUpdate
SetNillableNotAvailableAfter sets the "not_available_after" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillablePriceGuest ¶
func (ou *OccurrenceUpdate) SetNillablePriceGuest(i *int) *OccurrenceUpdate
SetNillablePriceGuest sets the "price_guest" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillablePriceStaff ¶
func (ou *OccurrenceUpdate) SetNillablePriceStaff(i *int) *OccurrenceUpdate
SetNillablePriceStaff sets the "price_staff" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillablePriceStudent ¶
func (ou *OccurrenceUpdate) SetNillablePriceStudent(i *int) *OccurrenceUpdate
SetNillablePriceStudent sets the "price_student" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableProtein ¶
func (ou *OccurrenceUpdate) SetNillableProtein(i *int) *OccurrenceUpdate
SetNillableProtein sets the "protein" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableSalt ¶
func (ou *OccurrenceUpdate) SetNillableSalt(i *int) *OccurrenceUpdate
SetNillableSalt sets the "salt" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableSaturatedFat ¶
func (ou *OccurrenceUpdate) SetNillableSaturatedFat(i *int) *OccurrenceUpdate
SetNillableSaturatedFat sets the "saturated_fat" field if the given value is not nil.
func (*OccurrenceUpdate) SetNillableSugar ¶
func (ou *OccurrenceUpdate) SetNillableSugar(i *int) *OccurrenceUpdate
SetNillableSugar sets the "sugar" field if the given value is not nil.
func (*OccurrenceUpdate) SetNotAvailableAfter ¶ added in v0.7.0
func (ou *OccurrenceUpdate) SetNotAvailableAfter(t time.Time) *OccurrenceUpdate
SetNotAvailableAfter sets the "not_available_after" field.
func (*OccurrenceUpdate) SetPriceGuest ¶
func (ou *OccurrenceUpdate) SetPriceGuest(i int) *OccurrenceUpdate
SetPriceGuest sets the "price_guest" field.
func (*OccurrenceUpdate) SetPriceStaff ¶
func (ou *OccurrenceUpdate) SetPriceStaff(i int) *OccurrenceUpdate
SetPriceStaff sets the "price_staff" field.
func (*OccurrenceUpdate) SetPriceStudent ¶
func (ou *OccurrenceUpdate) SetPriceStudent(i int) *OccurrenceUpdate
SetPriceStudent sets the "price_student" field.
func (*OccurrenceUpdate) SetProtein ¶
func (ou *OccurrenceUpdate) SetProtein(i int) *OccurrenceUpdate
SetProtein sets the "protein" field.
func (*OccurrenceUpdate) SetSalt ¶
func (ou *OccurrenceUpdate) SetSalt(i int) *OccurrenceUpdate
SetSalt sets the "salt" field.
func (*OccurrenceUpdate) SetSaturatedFat ¶
func (ou *OccurrenceUpdate) SetSaturatedFat(i int) *OccurrenceUpdate
SetSaturatedFat sets the "saturated_fat" field.
func (*OccurrenceUpdate) SetSugar ¶
func (ou *OccurrenceUpdate) SetSugar(i int) *OccurrenceUpdate
SetSugar sets the "sugar" field.
func (*OccurrenceUpdate) Where ¶
func (ou *OccurrenceUpdate) Where(ps ...predicate.Occurrence) *OccurrenceUpdate
Where appends a list predicates to the OccurrenceUpdate builder.
type OccurrenceUpdateOne ¶
type OccurrenceUpdateOne struct {
// contains filtered or unexported fields
}
OccurrenceUpdateOne is the builder for updating a single Occurrence entity.
func (*OccurrenceUpdateOne) AddCarbohydrates ¶
func (ouo *OccurrenceUpdateOne) AddCarbohydrates(i int) *OccurrenceUpdateOne
AddCarbohydrates adds i to the "carbohydrates" field.
func (*OccurrenceUpdateOne) AddFat ¶
func (ouo *OccurrenceUpdateOne) AddFat(i int) *OccurrenceUpdateOne
AddFat adds i to the "fat" field.
func (*OccurrenceUpdateOne) AddFiber ¶
func (ouo *OccurrenceUpdateOne) AddFiber(i int) *OccurrenceUpdateOne
AddFiber adds i to the "fiber" field.
func (*OccurrenceUpdateOne) AddKcal ¶
func (ouo *OccurrenceUpdateOne) AddKcal(i int) *OccurrenceUpdateOne
AddKcal adds i to the "kcal" field.
func (*OccurrenceUpdateOne) AddKj ¶
func (ouo *OccurrenceUpdateOne) AddKj(i int) *OccurrenceUpdateOne
AddKj adds i to the "kj" field.
func (*OccurrenceUpdateOne) AddPriceGuest ¶
func (ouo *OccurrenceUpdateOne) AddPriceGuest(i int) *OccurrenceUpdateOne
AddPriceGuest adds i to the "price_guest" field.
func (*OccurrenceUpdateOne) AddPriceStaff ¶
func (ouo *OccurrenceUpdateOne) AddPriceStaff(i int) *OccurrenceUpdateOne
AddPriceStaff adds i to the "price_staff" field.
func (*OccurrenceUpdateOne) AddPriceStudent ¶
func (ouo *OccurrenceUpdateOne) AddPriceStudent(i int) *OccurrenceUpdateOne
AddPriceStudent adds i to the "price_student" field.
func (*OccurrenceUpdateOne) AddProtein ¶
func (ouo *OccurrenceUpdateOne) AddProtein(i int) *OccurrenceUpdateOne
AddProtein adds i to the "protein" field.
func (*OccurrenceUpdateOne) AddReviewIDs ¶
func (ouo *OccurrenceUpdateOne) AddReviewIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
AddReviewIDs adds the "reviews" edge to the Review entity by IDs.
func (*OccurrenceUpdateOne) AddReviews ¶
func (ouo *OccurrenceUpdateOne) AddReviews(r ...*Review) *OccurrenceUpdateOne
AddReviews adds the "reviews" edges to the Review entity.
func (*OccurrenceUpdateOne) AddSalt ¶
func (ouo *OccurrenceUpdateOne) AddSalt(i int) *OccurrenceUpdateOne
AddSalt adds i to the "salt" field.
func (*OccurrenceUpdateOne) AddSaturatedFat ¶
func (ouo *OccurrenceUpdateOne) AddSaturatedFat(i int) *OccurrenceUpdateOne
AddSaturatedFat adds i to the "saturated_fat" field.
func (*OccurrenceUpdateOne) AddSideDishIDs ¶
func (ouo *OccurrenceUpdateOne) AddSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
AddSideDishIDs adds the "side_dishes" edge to the Dish entity by IDs.
func (*OccurrenceUpdateOne) AddSideDishes ¶
func (ouo *OccurrenceUpdateOne) AddSideDishes(d ...*Dish) *OccurrenceUpdateOne
AddSideDishes adds the "side_dishes" edges to the Dish entity.
func (*OccurrenceUpdateOne) AddSugar ¶
func (ouo *OccurrenceUpdateOne) AddSugar(i int) *OccurrenceUpdateOne
AddSugar adds i to the "sugar" field.
func (*OccurrenceUpdateOne) AddTagIDs ¶
func (ouo *OccurrenceUpdateOne) AddTagIDs(ids ...string) *OccurrenceUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*OccurrenceUpdateOne) AddTags ¶
func (ouo *OccurrenceUpdateOne) AddTags(t ...*Tag) *OccurrenceUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*OccurrenceUpdateOne) ClearCarbohydrates ¶
func (ouo *OccurrenceUpdateOne) ClearCarbohydrates() *OccurrenceUpdateOne
ClearCarbohydrates clears the value of the "carbohydrates" field.
func (*OccurrenceUpdateOne) ClearDish ¶
func (ouo *OccurrenceUpdateOne) ClearDish() *OccurrenceUpdateOne
ClearDish clears the "dish" edge to the Dish entity.
func (*OccurrenceUpdateOne) ClearFat ¶
func (ouo *OccurrenceUpdateOne) ClearFat() *OccurrenceUpdateOne
ClearFat clears the value of the "fat" field.
func (*OccurrenceUpdateOne) ClearFiber ¶
func (ouo *OccurrenceUpdateOne) ClearFiber() *OccurrenceUpdateOne
ClearFiber clears the value of the "fiber" field.
func (*OccurrenceUpdateOne) ClearKcal ¶
func (ouo *OccurrenceUpdateOne) ClearKcal() *OccurrenceUpdateOne
ClearKcal clears the value of the "kcal" field.
func (*OccurrenceUpdateOne) ClearKj ¶
func (ouo *OccurrenceUpdateOne) ClearKj() *OccurrenceUpdateOne
ClearKj clears the value of the "kj" field.
func (*OccurrenceUpdateOne) ClearLocation ¶
func (ouo *OccurrenceUpdateOne) ClearLocation() *OccurrenceUpdateOne
ClearLocation clears the "location" edge to the Location entity.
func (*OccurrenceUpdateOne) ClearNotAvailableAfter ¶ added in v0.7.0
func (ouo *OccurrenceUpdateOne) ClearNotAvailableAfter() *OccurrenceUpdateOne
ClearNotAvailableAfter clears the value of the "not_available_after" field.
func (*OccurrenceUpdateOne) ClearPriceGuest ¶
func (ouo *OccurrenceUpdateOne) ClearPriceGuest() *OccurrenceUpdateOne
ClearPriceGuest clears the value of the "price_guest" field.
func (*OccurrenceUpdateOne) ClearPriceStaff ¶
func (ouo *OccurrenceUpdateOne) ClearPriceStaff() *OccurrenceUpdateOne
ClearPriceStaff clears the value of the "price_staff" field.
func (*OccurrenceUpdateOne) ClearPriceStudent ¶
func (ouo *OccurrenceUpdateOne) ClearPriceStudent() *OccurrenceUpdateOne
ClearPriceStudent clears the value of the "price_student" field.
func (*OccurrenceUpdateOne) ClearProtein ¶
func (ouo *OccurrenceUpdateOne) ClearProtein() *OccurrenceUpdateOne
ClearProtein clears the value of the "protein" field.
func (*OccurrenceUpdateOne) ClearReviews ¶
func (ouo *OccurrenceUpdateOne) ClearReviews() *OccurrenceUpdateOne
ClearReviews clears all "reviews" edges to the Review entity.
func (*OccurrenceUpdateOne) ClearSalt ¶
func (ouo *OccurrenceUpdateOne) ClearSalt() *OccurrenceUpdateOne
ClearSalt clears the value of the "salt" field.
func (*OccurrenceUpdateOne) ClearSaturatedFat ¶
func (ouo *OccurrenceUpdateOne) ClearSaturatedFat() *OccurrenceUpdateOne
ClearSaturatedFat clears the value of the "saturated_fat" field.
func (*OccurrenceUpdateOne) ClearSideDishes ¶
func (ouo *OccurrenceUpdateOne) ClearSideDishes() *OccurrenceUpdateOne
ClearSideDishes clears all "side_dishes" edges to the Dish entity.
func (*OccurrenceUpdateOne) ClearSugar ¶
func (ouo *OccurrenceUpdateOne) ClearSugar() *OccurrenceUpdateOne
ClearSugar clears the value of the "sugar" field.
func (*OccurrenceUpdateOne) ClearTags ¶
func (ouo *OccurrenceUpdateOne) ClearTags() *OccurrenceUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*OccurrenceUpdateOne) Exec ¶
func (ouo *OccurrenceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OccurrenceUpdateOne) ExecX ¶
func (ouo *OccurrenceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceUpdateOne) Mutation ¶
func (ouo *OccurrenceUpdateOne) Mutation() *OccurrenceMutation
Mutation returns the OccurrenceMutation object of the builder.
func (*OccurrenceUpdateOne) RemoveReviewIDs ¶
func (ouo *OccurrenceUpdateOne) RemoveReviewIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
RemoveReviewIDs removes the "reviews" edge to Review entities by IDs.
func (*OccurrenceUpdateOne) RemoveReviews ¶
func (ouo *OccurrenceUpdateOne) RemoveReviews(r ...*Review) *OccurrenceUpdateOne
RemoveReviews removes "reviews" edges to Review entities.
func (*OccurrenceUpdateOne) RemoveSideDishIDs ¶
func (ouo *OccurrenceUpdateOne) RemoveSideDishIDs(ids ...uuid.UUID) *OccurrenceUpdateOne
RemoveSideDishIDs removes the "side_dishes" edge to Dish entities by IDs.
func (*OccurrenceUpdateOne) RemoveSideDishes ¶
func (ouo *OccurrenceUpdateOne) RemoveSideDishes(d ...*Dish) *OccurrenceUpdateOne
RemoveSideDishes removes "side_dishes" edges to Dish entities.
func (*OccurrenceUpdateOne) RemoveTagIDs ¶
func (ouo *OccurrenceUpdateOne) RemoveTagIDs(ids ...string) *OccurrenceUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*OccurrenceUpdateOne) RemoveTags ¶
func (ouo *OccurrenceUpdateOne) RemoveTags(t ...*Tag) *OccurrenceUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*OccurrenceUpdateOne) Save ¶
func (ouo *OccurrenceUpdateOne) Save(ctx context.Context) (*Occurrence, error)
Save executes the query and returns the updated Occurrence entity.
func (*OccurrenceUpdateOne) SaveX ¶
func (ouo *OccurrenceUpdateOne) SaveX(ctx context.Context) *Occurrence
SaveX is like Save, but panics if an error occurs.
func (*OccurrenceUpdateOne) Select ¶
func (ouo *OccurrenceUpdateOne) Select(field string, fields ...string) *OccurrenceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OccurrenceUpdateOne) SetCarbohydrates ¶
func (ouo *OccurrenceUpdateOne) SetCarbohydrates(i int) *OccurrenceUpdateOne
SetCarbohydrates sets the "carbohydrates" field.
func (*OccurrenceUpdateOne) SetDate ¶
func (ouo *OccurrenceUpdateOne) SetDate(t time.Time) *OccurrenceUpdateOne
SetDate sets the "date" field.
func (*OccurrenceUpdateOne) SetDish ¶
func (ouo *OccurrenceUpdateOne) SetDish(d *Dish) *OccurrenceUpdateOne
SetDish sets the "dish" edge to the Dish entity.
func (*OccurrenceUpdateOne) SetDishID ¶
func (ouo *OccurrenceUpdateOne) SetDishID(id uuid.UUID) *OccurrenceUpdateOne
SetDishID sets the "dish" edge to the Dish entity by ID.
func (*OccurrenceUpdateOne) SetFat ¶
func (ouo *OccurrenceUpdateOne) SetFat(i int) *OccurrenceUpdateOne
SetFat sets the "fat" field.
func (*OccurrenceUpdateOne) SetFiber ¶
func (ouo *OccurrenceUpdateOne) SetFiber(i int) *OccurrenceUpdateOne
SetFiber sets the "fiber" field.
func (*OccurrenceUpdateOne) SetKcal ¶
func (ouo *OccurrenceUpdateOne) SetKcal(i int) *OccurrenceUpdateOne
SetKcal sets the "kcal" field.
func (*OccurrenceUpdateOne) SetKj ¶
func (ouo *OccurrenceUpdateOne) SetKj(i int) *OccurrenceUpdateOne
SetKj sets the "kj" field.
func (*OccurrenceUpdateOne) SetLocation ¶
func (ouo *OccurrenceUpdateOne) SetLocation(l *Location) *OccurrenceUpdateOne
SetLocation sets the "location" edge to the Location entity.
func (*OccurrenceUpdateOne) SetLocationID ¶
func (ouo *OccurrenceUpdateOne) SetLocationID(id uuid.UUID) *OccurrenceUpdateOne
SetLocationID sets the "location" edge to the Location entity by ID.
func (*OccurrenceUpdateOne) SetNillableCarbohydrates ¶
func (ouo *OccurrenceUpdateOne) SetNillableCarbohydrates(i *int) *OccurrenceUpdateOne
SetNillableCarbohydrates sets the "carbohydrates" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableDate ¶
func (ouo *OccurrenceUpdateOne) SetNillableDate(t *time.Time) *OccurrenceUpdateOne
SetNillableDate sets the "date" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableFat ¶
func (ouo *OccurrenceUpdateOne) SetNillableFat(i *int) *OccurrenceUpdateOne
SetNillableFat sets the "fat" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableFiber ¶
func (ouo *OccurrenceUpdateOne) SetNillableFiber(i *int) *OccurrenceUpdateOne
SetNillableFiber sets the "fiber" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableKcal ¶
func (ouo *OccurrenceUpdateOne) SetNillableKcal(i *int) *OccurrenceUpdateOne
SetNillableKcal sets the "kcal" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableKj ¶
func (ouo *OccurrenceUpdateOne) SetNillableKj(i *int) *OccurrenceUpdateOne
SetNillableKj sets the "kj" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableNotAvailableAfter ¶ added in v0.7.0
func (ouo *OccurrenceUpdateOne) SetNillableNotAvailableAfter(t *time.Time) *OccurrenceUpdateOne
SetNillableNotAvailableAfter sets the "not_available_after" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillablePriceGuest ¶
func (ouo *OccurrenceUpdateOne) SetNillablePriceGuest(i *int) *OccurrenceUpdateOne
SetNillablePriceGuest sets the "price_guest" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillablePriceStaff ¶
func (ouo *OccurrenceUpdateOne) SetNillablePriceStaff(i *int) *OccurrenceUpdateOne
SetNillablePriceStaff sets the "price_staff" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillablePriceStudent ¶
func (ouo *OccurrenceUpdateOne) SetNillablePriceStudent(i *int) *OccurrenceUpdateOne
SetNillablePriceStudent sets the "price_student" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableProtein ¶
func (ouo *OccurrenceUpdateOne) SetNillableProtein(i *int) *OccurrenceUpdateOne
SetNillableProtein sets the "protein" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableSalt ¶
func (ouo *OccurrenceUpdateOne) SetNillableSalt(i *int) *OccurrenceUpdateOne
SetNillableSalt sets the "salt" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableSaturatedFat ¶
func (ouo *OccurrenceUpdateOne) SetNillableSaturatedFat(i *int) *OccurrenceUpdateOne
SetNillableSaturatedFat sets the "saturated_fat" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNillableSugar ¶
func (ouo *OccurrenceUpdateOne) SetNillableSugar(i *int) *OccurrenceUpdateOne
SetNillableSugar sets the "sugar" field if the given value is not nil.
func (*OccurrenceUpdateOne) SetNotAvailableAfter ¶ added in v0.7.0
func (ouo *OccurrenceUpdateOne) SetNotAvailableAfter(t time.Time) *OccurrenceUpdateOne
SetNotAvailableAfter sets the "not_available_after" field.
func (*OccurrenceUpdateOne) SetPriceGuest ¶
func (ouo *OccurrenceUpdateOne) SetPriceGuest(i int) *OccurrenceUpdateOne
SetPriceGuest sets the "price_guest" field.
func (*OccurrenceUpdateOne) SetPriceStaff ¶
func (ouo *OccurrenceUpdateOne) SetPriceStaff(i int) *OccurrenceUpdateOne
SetPriceStaff sets the "price_staff" field.
func (*OccurrenceUpdateOne) SetPriceStudent ¶
func (ouo *OccurrenceUpdateOne) SetPriceStudent(i int) *OccurrenceUpdateOne
SetPriceStudent sets the "price_student" field.
func (*OccurrenceUpdateOne) SetProtein ¶
func (ouo *OccurrenceUpdateOne) SetProtein(i int) *OccurrenceUpdateOne
SetProtein sets the "protein" field.
func (*OccurrenceUpdateOne) SetSalt ¶
func (ouo *OccurrenceUpdateOne) SetSalt(i int) *OccurrenceUpdateOne
SetSalt sets the "salt" field.
func (*OccurrenceUpdateOne) SetSaturatedFat ¶
func (ouo *OccurrenceUpdateOne) SetSaturatedFat(i int) *OccurrenceUpdateOne
SetSaturatedFat sets the "saturated_fat" field.
func (*OccurrenceUpdateOne) SetSugar ¶
func (ouo *OccurrenceUpdateOne) SetSugar(i int) *OccurrenceUpdateOne
SetSugar sets the "sugar" field.
func (*OccurrenceUpdateOne) Where ¶
func (ouo *OccurrenceUpdateOne) Where(ps ...predicate.Occurrence) *OccurrenceUpdateOne
Where appends a list predicates to the OccurrenceUpdate builder.
type OccurrenceUpsert ¶
OccurrenceUpsert is the "OnConflict" setter.
func (*OccurrenceUpsert) AddCarbohydrates ¶
func (u *OccurrenceUpsert) AddCarbohydrates(v int) *OccurrenceUpsert
AddCarbohydrates adds v to the "carbohydrates" field.
func (*OccurrenceUpsert) AddFat ¶
func (u *OccurrenceUpsert) AddFat(v int) *OccurrenceUpsert
AddFat adds v to the "fat" field.
func (*OccurrenceUpsert) AddFiber ¶
func (u *OccurrenceUpsert) AddFiber(v int) *OccurrenceUpsert
AddFiber adds v to the "fiber" field.
func (*OccurrenceUpsert) AddKcal ¶
func (u *OccurrenceUpsert) AddKcal(v int) *OccurrenceUpsert
AddKcal adds v to the "kcal" field.
func (*OccurrenceUpsert) AddKj ¶
func (u *OccurrenceUpsert) AddKj(v int) *OccurrenceUpsert
AddKj adds v to the "kj" field.
func (*OccurrenceUpsert) AddPriceGuest ¶
func (u *OccurrenceUpsert) AddPriceGuest(v int) *OccurrenceUpsert
AddPriceGuest adds v to the "price_guest" field.
func (*OccurrenceUpsert) AddPriceStaff ¶
func (u *OccurrenceUpsert) AddPriceStaff(v int) *OccurrenceUpsert
AddPriceStaff adds v to the "price_staff" field.
func (*OccurrenceUpsert) AddPriceStudent ¶
func (u *OccurrenceUpsert) AddPriceStudent(v int) *OccurrenceUpsert
AddPriceStudent adds v to the "price_student" field.
func (*OccurrenceUpsert) AddProtein ¶
func (u *OccurrenceUpsert) AddProtein(v int) *OccurrenceUpsert
AddProtein adds v to the "protein" field.
func (*OccurrenceUpsert) AddSalt ¶
func (u *OccurrenceUpsert) AddSalt(v int) *OccurrenceUpsert
AddSalt adds v to the "salt" field.
func (*OccurrenceUpsert) AddSaturatedFat ¶
func (u *OccurrenceUpsert) AddSaturatedFat(v int) *OccurrenceUpsert
AddSaturatedFat adds v to the "saturated_fat" field.
func (*OccurrenceUpsert) AddSugar ¶
func (u *OccurrenceUpsert) AddSugar(v int) *OccurrenceUpsert
AddSugar adds v to the "sugar" field.
func (*OccurrenceUpsert) ClearCarbohydrates ¶
func (u *OccurrenceUpsert) ClearCarbohydrates() *OccurrenceUpsert
ClearCarbohydrates clears the value of the "carbohydrates" field.
func (*OccurrenceUpsert) ClearFat ¶
func (u *OccurrenceUpsert) ClearFat() *OccurrenceUpsert
ClearFat clears the value of the "fat" field.
func (*OccurrenceUpsert) ClearFiber ¶
func (u *OccurrenceUpsert) ClearFiber() *OccurrenceUpsert
ClearFiber clears the value of the "fiber" field.
func (*OccurrenceUpsert) ClearKcal ¶
func (u *OccurrenceUpsert) ClearKcal() *OccurrenceUpsert
ClearKcal clears the value of the "kcal" field.
func (*OccurrenceUpsert) ClearKj ¶
func (u *OccurrenceUpsert) ClearKj() *OccurrenceUpsert
ClearKj clears the value of the "kj" field.
func (*OccurrenceUpsert) ClearNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsert) ClearNotAvailableAfter() *OccurrenceUpsert
ClearNotAvailableAfter clears the value of the "not_available_after" field.
func (*OccurrenceUpsert) ClearPriceGuest ¶
func (u *OccurrenceUpsert) ClearPriceGuest() *OccurrenceUpsert
ClearPriceGuest clears the value of the "price_guest" field.
func (*OccurrenceUpsert) ClearPriceStaff ¶
func (u *OccurrenceUpsert) ClearPriceStaff() *OccurrenceUpsert
ClearPriceStaff clears the value of the "price_staff" field.
func (*OccurrenceUpsert) ClearPriceStudent ¶
func (u *OccurrenceUpsert) ClearPriceStudent() *OccurrenceUpsert
ClearPriceStudent clears the value of the "price_student" field.
func (*OccurrenceUpsert) ClearProtein ¶
func (u *OccurrenceUpsert) ClearProtein() *OccurrenceUpsert
ClearProtein clears the value of the "protein" field.
func (*OccurrenceUpsert) ClearSalt ¶
func (u *OccurrenceUpsert) ClearSalt() *OccurrenceUpsert
ClearSalt clears the value of the "salt" field.
func (*OccurrenceUpsert) ClearSaturatedFat ¶
func (u *OccurrenceUpsert) ClearSaturatedFat() *OccurrenceUpsert
ClearSaturatedFat clears the value of the "saturated_fat" field.
func (*OccurrenceUpsert) ClearSugar ¶
func (u *OccurrenceUpsert) ClearSugar() *OccurrenceUpsert
ClearSugar clears the value of the "sugar" field.
func (*OccurrenceUpsert) SetCarbohydrates ¶
func (u *OccurrenceUpsert) SetCarbohydrates(v int) *OccurrenceUpsert
SetCarbohydrates sets the "carbohydrates" field.
func (*OccurrenceUpsert) SetDate ¶
func (u *OccurrenceUpsert) SetDate(v time.Time) *OccurrenceUpsert
SetDate sets the "date" field.
func (*OccurrenceUpsert) SetFat ¶
func (u *OccurrenceUpsert) SetFat(v int) *OccurrenceUpsert
SetFat sets the "fat" field.
func (*OccurrenceUpsert) SetFiber ¶
func (u *OccurrenceUpsert) SetFiber(v int) *OccurrenceUpsert
SetFiber sets the "fiber" field.
func (*OccurrenceUpsert) SetKcal ¶
func (u *OccurrenceUpsert) SetKcal(v int) *OccurrenceUpsert
SetKcal sets the "kcal" field.
func (*OccurrenceUpsert) SetKj ¶
func (u *OccurrenceUpsert) SetKj(v int) *OccurrenceUpsert
SetKj sets the "kj" field.
func (*OccurrenceUpsert) SetNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsert) SetNotAvailableAfter(v time.Time) *OccurrenceUpsert
SetNotAvailableAfter sets the "not_available_after" field.
func (*OccurrenceUpsert) SetPriceGuest ¶
func (u *OccurrenceUpsert) SetPriceGuest(v int) *OccurrenceUpsert
SetPriceGuest sets the "price_guest" field.
func (*OccurrenceUpsert) SetPriceStaff ¶
func (u *OccurrenceUpsert) SetPriceStaff(v int) *OccurrenceUpsert
SetPriceStaff sets the "price_staff" field.
func (*OccurrenceUpsert) SetPriceStudent ¶
func (u *OccurrenceUpsert) SetPriceStudent(v int) *OccurrenceUpsert
SetPriceStudent sets the "price_student" field.
func (*OccurrenceUpsert) SetProtein ¶
func (u *OccurrenceUpsert) SetProtein(v int) *OccurrenceUpsert
SetProtein sets the "protein" field.
func (*OccurrenceUpsert) SetSalt ¶
func (u *OccurrenceUpsert) SetSalt(v int) *OccurrenceUpsert
SetSalt sets the "salt" field.
func (*OccurrenceUpsert) SetSaturatedFat ¶
func (u *OccurrenceUpsert) SetSaturatedFat(v int) *OccurrenceUpsert
SetSaturatedFat sets the "saturated_fat" field.
func (*OccurrenceUpsert) SetSugar ¶
func (u *OccurrenceUpsert) SetSugar(v int) *OccurrenceUpsert
SetSugar sets the "sugar" field.
func (*OccurrenceUpsert) UpdateCarbohydrates ¶
func (u *OccurrenceUpsert) UpdateCarbohydrates() *OccurrenceUpsert
UpdateCarbohydrates sets the "carbohydrates" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateDate ¶
func (u *OccurrenceUpsert) UpdateDate() *OccurrenceUpsert
UpdateDate sets the "date" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateFat ¶
func (u *OccurrenceUpsert) UpdateFat() *OccurrenceUpsert
UpdateFat sets the "fat" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateFiber ¶
func (u *OccurrenceUpsert) UpdateFiber() *OccurrenceUpsert
UpdateFiber sets the "fiber" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateKcal ¶
func (u *OccurrenceUpsert) UpdateKcal() *OccurrenceUpsert
UpdateKcal sets the "kcal" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateKj ¶
func (u *OccurrenceUpsert) UpdateKj() *OccurrenceUpsert
UpdateKj sets the "kj" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsert) UpdateNotAvailableAfter() *OccurrenceUpsert
UpdateNotAvailableAfter sets the "not_available_after" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdatePriceGuest ¶
func (u *OccurrenceUpsert) UpdatePriceGuest() *OccurrenceUpsert
UpdatePriceGuest sets the "price_guest" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdatePriceStaff ¶
func (u *OccurrenceUpsert) UpdatePriceStaff() *OccurrenceUpsert
UpdatePriceStaff sets the "price_staff" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdatePriceStudent ¶
func (u *OccurrenceUpsert) UpdatePriceStudent() *OccurrenceUpsert
UpdatePriceStudent sets the "price_student" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateProtein ¶
func (u *OccurrenceUpsert) UpdateProtein() *OccurrenceUpsert
UpdateProtein sets the "protein" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateSalt ¶
func (u *OccurrenceUpsert) UpdateSalt() *OccurrenceUpsert
UpdateSalt sets the "salt" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateSaturatedFat ¶
func (u *OccurrenceUpsert) UpdateSaturatedFat() *OccurrenceUpsert
UpdateSaturatedFat sets the "saturated_fat" field to the value that was provided on create.
func (*OccurrenceUpsert) UpdateSugar ¶
func (u *OccurrenceUpsert) UpdateSugar() *OccurrenceUpsert
UpdateSugar sets the "sugar" field to the value that was provided on create.
type OccurrenceUpsertBulk ¶
type OccurrenceUpsertBulk struct {
// contains filtered or unexported fields
}
OccurrenceUpsertBulk is the builder for "upsert"-ing a bulk of Occurrence nodes.
func (*OccurrenceUpsertBulk) AddCarbohydrates ¶
func (u *OccurrenceUpsertBulk) AddCarbohydrates(v int) *OccurrenceUpsertBulk
AddCarbohydrates adds v to the "carbohydrates" field.
func (*OccurrenceUpsertBulk) AddFat ¶
func (u *OccurrenceUpsertBulk) AddFat(v int) *OccurrenceUpsertBulk
AddFat adds v to the "fat" field.
func (*OccurrenceUpsertBulk) AddFiber ¶
func (u *OccurrenceUpsertBulk) AddFiber(v int) *OccurrenceUpsertBulk
AddFiber adds v to the "fiber" field.
func (*OccurrenceUpsertBulk) AddKcal ¶
func (u *OccurrenceUpsertBulk) AddKcal(v int) *OccurrenceUpsertBulk
AddKcal adds v to the "kcal" field.
func (*OccurrenceUpsertBulk) AddKj ¶
func (u *OccurrenceUpsertBulk) AddKj(v int) *OccurrenceUpsertBulk
AddKj adds v to the "kj" field.
func (*OccurrenceUpsertBulk) AddPriceGuest ¶
func (u *OccurrenceUpsertBulk) AddPriceGuest(v int) *OccurrenceUpsertBulk
AddPriceGuest adds v to the "price_guest" field.
func (*OccurrenceUpsertBulk) AddPriceStaff ¶
func (u *OccurrenceUpsertBulk) AddPriceStaff(v int) *OccurrenceUpsertBulk
AddPriceStaff adds v to the "price_staff" field.
func (*OccurrenceUpsertBulk) AddPriceStudent ¶
func (u *OccurrenceUpsertBulk) AddPriceStudent(v int) *OccurrenceUpsertBulk
AddPriceStudent adds v to the "price_student" field.
func (*OccurrenceUpsertBulk) AddProtein ¶
func (u *OccurrenceUpsertBulk) AddProtein(v int) *OccurrenceUpsertBulk
AddProtein adds v to the "protein" field.
func (*OccurrenceUpsertBulk) AddSalt ¶
func (u *OccurrenceUpsertBulk) AddSalt(v int) *OccurrenceUpsertBulk
AddSalt adds v to the "salt" field.
func (*OccurrenceUpsertBulk) AddSaturatedFat ¶
func (u *OccurrenceUpsertBulk) AddSaturatedFat(v int) *OccurrenceUpsertBulk
AddSaturatedFat adds v to the "saturated_fat" field.
func (*OccurrenceUpsertBulk) AddSugar ¶
func (u *OccurrenceUpsertBulk) AddSugar(v int) *OccurrenceUpsertBulk
AddSugar adds v to the "sugar" field.
func (*OccurrenceUpsertBulk) ClearCarbohydrates ¶
func (u *OccurrenceUpsertBulk) ClearCarbohydrates() *OccurrenceUpsertBulk
ClearCarbohydrates clears the value of the "carbohydrates" field.
func (*OccurrenceUpsertBulk) ClearFat ¶
func (u *OccurrenceUpsertBulk) ClearFat() *OccurrenceUpsertBulk
ClearFat clears the value of the "fat" field.
func (*OccurrenceUpsertBulk) ClearFiber ¶
func (u *OccurrenceUpsertBulk) ClearFiber() *OccurrenceUpsertBulk
ClearFiber clears the value of the "fiber" field.
func (*OccurrenceUpsertBulk) ClearKcal ¶
func (u *OccurrenceUpsertBulk) ClearKcal() *OccurrenceUpsertBulk
ClearKcal clears the value of the "kcal" field.
func (*OccurrenceUpsertBulk) ClearKj ¶
func (u *OccurrenceUpsertBulk) ClearKj() *OccurrenceUpsertBulk
ClearKj clears the value of the "kj" field.
func (*OccurrenceUpsertBulk) ClearNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsertBulk) ClearNotAvailableAfter() *OccurrenceUpsertBulk
ClearNotAvailableAfter clears the value of the "not_available_after" field.
func (*OccurrenceUpsertBulk) ClearPriceGuest ¶
func (u *OccurrenceUpsertBulk) ClearPriceGuest() *OccurrenceUpsertBulk
ClearPriceGuest clears the value of the "price_guest" field.
func (*OccurrenceUpsertBulk) ClearPriceStaff ¶
func (u *OccurrenceUpsertBulk) ClearPriceStaff() *OccurrenceUpsertBulk
ClearPriceStaff clears the value of the "price_staff" field.
func (*OccurrenceUpsertBulk) ClearPriceStudent ¶
func (u *OccurrenceUpsertBulk) ClearPriceStudent() *OccurrenceUpsertBulk
ClearPriceStudent clears the value of the "price_student" field.
func (*OccurrenceUpsertBulk) ClearProtein ¶
func (u *OccurrenceUpsertBulk) ClearProtein() *OccurrenceUpsertBulk
ClearProtein clears the value of the "protein" field.
func (*OccurrenceUpsertBulk) ClearSalt ¶
func (u *OccurrenceUpsertBulk) ClearSalt() *OccurrenceUpsertBulk
ClearSalt clears the value of the "salt" field.
func (*OccurrenceUpsertBulk) ClearSaturatedFat ¶
func (u *OccurrenceUpsertBulk) ClearSaturatedFat() *OccurrenceUpsertBulk
ClearSaturatedFat clears the value of the "saturated_fat" field.
func (*OccurrenceUpsertBulk) ClearSugar ¶
func (u *OccurrenceUpsertBulk) ClearSugar() *OccurrenceUpsertBulk
ClearSugar clears the value of the "sugar" field.
func (*OccurrenceUpsertBulk) DoNothing ¶
func (u *OccurrenceUpsertBulk) DoNothing() *OccurrenceUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OccurrenceUpsertBulk) Exec ¶
func (u *OccurrenceUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OccurrenceUpsertBulk) ExecX ¶
func (u *OccurrenceUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceUpsertBulk) Ignore ¶
func (u *OccurrenceUpsertBulk) Ignore() *OccurrenceUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Occurrence.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OccurrenceUpsertBulk) SetCarbohydrates ¶
func (u *OccurrenceUpsertBulk) SetCarbohydrates(v int) *OccurrenceUpsertBulk
SetCarbohydrates sets the "carbohydrates" field.
func (*OccurrenceUpsertBulk) SetDate ¶
func (u *OccurrenceUpsertBulk) SetDate(v time.Time) *OccurrenceUpsertBulk
SetDate sets the "date" field.
func (*OccurrenceUpsertBulk) SetFat ¶
func (u *OccurrenceUpsertBulk) SetFat(v int) *OccurrenceUpsertBulk
SetFat sets the "fat" field.
func (*OccurrenceUpsertBulk) SetFiber ¶
func (u *OccurrenceUpsertBulk) SetFiber(v int) *OccurrenceUpsertBulk
SetFiber sets the "fiber" field.
func (*OccurrenceUpsertBulk) SetKcal ¶
func (u *OccurrenceUpsertBulk) SetKcal(v int) *OccurrenceUpsertBulk
SetKcal sets the "kcal" field.
func (*OccurrenceUpsertBulk) SetKj ¶
func (u *OccurrenceUpsertBulk) SetKj(v int) *OccurrenceUpsertBulk
SetKj sets the "kj" field.
func (*OccurrenceUpsertBulk) SetNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsertBulk) SetNotAvailableAfter(v time.Time) *OccurrenceUpsertBulk
SetNotAvailableAfter sets the "not_available_after" field.
func (*OccurrenceUpsertBulk) SetPriceGuest ¶
func (u *OccurrenceUpsertBulk) SetPriceGuest(v int) *OccurrenceUpsertBulk
SetPriceGuest sets the "price_guest" field.
func (*OccurrenceUpsertBulk) SetPriceStaff ¶
func (u *OccurrenceUpsertBulk) SetPriceStaff(v int) *OccurrenceUpsertBulk
SetPriceStaff sets the "price_staff" field.
func (*OccurrenceUpsertBulk) SetPriceStudent ¶
func (u *OccurrenceUpsertBulk) SetPriceStudent(v int) *OccurrenceUpsertBulk
SetPriceStudent sets the "price_student" field.
func (*OccurrenceUpsertBulk) SetProtein ¶
func (u *OccurrenceUpsertBulk) SetProtein(v int) *OccurrenceUpsertBulk
SetProtein sets the "protein" field.
func (*OccurrenceUpsertBulk) SetSalt ¶
func (u *OccurrenceUpsertBulk) SetSalt(v int) *OccurrenceUpsertBulk
SetSalt sets the "salt" field.
func (*OccurrenceUpsertBulk) SetSaturatedFat ¶
func (u *OccurrenceUpsertBulk) SetSaturatedFat(v int) *OccurrenceUpsertBulk
SetSaturatedFat sets the "saturated_fat" field.
func (*OccurrenceUpsertBulk) SetSugar ¶
func (u *OccurrenceUpsertBulk) SetSugar(v int) *OccurrenceUpsertBulk
SetSugar sets the "sugar" field.
func (*OccurrenceUpsertBulk) Update ¶
func (u *OccurrenceUpsertBulk) Update(set func(*OccurrenceUpsert)) *OccurrenceUpsertBulk
Update allows overriding fields `UPDATE` values. See the OccurrenceCreateBulk.OnConflict documentation for more info.
func (*OccurrenceUpsertBulk) UpdateCarbohydrates ¶
func (u *OccurrenceUpsertBulk) UpdateCarbohydrates() *OccurrenceUpsertBulk
UpdateCarbohydrates sets the "carbohydrates" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateDate ¶
func (u *OccurrenceUpsertBulk) UpdateDate() *OccurrenceUpsertBulk
UpdateDate sets the "date" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateFat ¶
func (u *OccurrenceUpsertBulk) UpdateFat() *OccurrenceUpsertBulk
UpdateFat sets the "fat" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateFiber ¶
func (u *OccurrenceUpsertBulk) UpdateFiber() *OccurrenceUpsertBulk
UpdateFiber sets the "fiber" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateKcal ¶
func (u *OccurrenceUpsertBulk) UpdateKcal() *OccurrenceUpsertBulk
UpdateKcal sets the "kcal" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateKj ¶
func (u *OccurrenceUpsertBulk) UpdateKj() *OccurrenceUpsertBulk
UpdateKj sets the "kj" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateNewValues ¶
func (u *OccurrenceUpsertBulk) UpdateNewValues() *OccurrenceUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Occurrence.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(occurrence.FieldID) }), ). Exec(ctx)
func (*OccurrenceUpsertBulk) UpdateNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsertBulk) UpdateNotAvailableAfter() *OccurrenceUpsertBulk
UpdateNotAvailableAfter sets the "not_available_after" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdatePriceGuest ¶
func (u *OccurrenceUpsertBulk) UpdatePriceGuest() *OccurrenceUpsertBulk
UpdatePriceGuest sets the "price_guest" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdatePriceStaff ¶
func (u *OccurrenceUpsertBulk) UpdatePriceStaff() *OccurrenceUpsertBulk
UpdatePriceStaff sets the "price_staff" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdatePriceStudent ¶
func (u *OccurrenceUpsertBulk) UpdatePriceStudent() *OccurrenceUpsertBulk
UpdatePriceStudent sets the "price_student" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateProtein ¶
func (u *OccurrenceUpsertBulk) UpdateProtein() *OccurrenceUpsertBulk
UpdateProtein sets the "protein" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateSalt ¶
func (u *OccurrenceUpsertBulk) UpdateSalt() *OccurrenceUpsertBulk
UpdateSalt sets the "salt" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateSaturatedFat ¶
func (u *OccurrenceUpsertBulk) UpdateSaturatedFat() *OccurrenceUpsertBulk
UpdateSaturatedFat sets the "saturated_fat" field to the value that was provided on create.
func (*OccurrenceUpsertBulk) UpdateSugar ¶
func (u *OccurrenceUpsertBulk) UpdateSugar() *OccurrenceUpsertBulk
UpdateSugar sets the "sugar" field to the value that was provided on create.
type OccurrenceUpsertOne ¶
type OccurrenceUpsertOne struct {
// contains filtered or unexported fields
}
OccurrenceUpsertOne is the builder for "upsert"-ing
one Occurrence node.
func (*OccurrenceUpsertOne) AddCarbohydrates ¶
func (u *OccurrenceUpsertOne) AddCarbohydrates(v int) *OccurrenceUpsertOne
AddCarbohydrates adds v to the "carbohydrates" field.
func (*OccurrenceUpsertOne) AddFat ¶
func (u *OccurrenceUpsertOne) AddFat(v int) *OccurrenceUpsertOne
AddFat adds v to the "fat" field.
func (*OccurrenceUpsertOne) AddFiber ¶
func (u *OccurrenceUpsertOne) AddFiber(v int) *OccurrenceUpsertOne
AddFiber adds v to the "fiber" field.
func (*OccurrenceUpsertOne) AddKcal ¶
func (u *OccurrenceUpsertOne) AddKcal(v int) *OccurrenceUpsertOne
AddKcal adds v to the "kcal" field.
func (*OccurrenceUpsertOne) AddKj ¶
func (u *OccurrenceUpsertOne) AddKj(v int) *OccurrenceUpsertOne
AddKj adds v to the "kj" field.
func (*OccurrenceUpsertOne) AddPriceGuest ¶
func (u *OccurrenceUpsertOne) AddPriceGuest(v int) *OccurrenceUpsertOne
AddPriceGuest adds v to the "price_guest" field.
func (*OccurrenceUpsertOne) AddPriceStaff ¶
func (u *OccurrenceUpsertOne) AddPriceStaff(v int) *OccurrenceUpsertOne
AddPriceStaff adds v to the "price_staff" field.
func (*OccurrenceUpsertOne) AddPriceStudent ¶
func (u *OccurrenceUpsertOne) AddPriceStudent(v int) *OccurrenceUpsertOne
AddPriceStudent adds v to the "price_student" field.
func (*OccurrenceUpsertOne) AddProtein ¶
func (u *OccurrenceUpsertOne) AddProtein(v int) *OccurrenceUpsertOne
AddProtein adds v to the "protein" field.
func (*OccurrenceUpsertOne) AddSalt ¶
func (u *OccurrenceUpsertOne) AddSalt(v int) *OccurrenceUpsertOne
AddSalt adds v to the "salt" field.
func (*OccurrenceUpsertOne) AddSaturatedFat ¶
func (u *OccurrenceUpsertOne) AddSaturatedFat(v int) *OccurrenceUpsertOne
AddSaturatedFat adds v to the "saturated_fat" field.
func (*OccurrenceUpsertOne) AddSugar ¶
func (u *OccurrenceUpsertOne) AddSugar(v int) *OccurrenceUpsertOne
AddSugar adds v to the "sugar" field.
func (*OccurrenceUpsertOne) ClearCarbohydrates ¶
func (u *OccurrenceUpsertOne) ClearCarbohydrates() *OccurrenceUpsertOne
ClearCarbohydrates clears the value of the "carbohydrates" field.
func (*OccurrenceUpsertOne) ClearFat ¶
func (u *OccurrenceUpsertOne) ClearFat() *OccurrenceUpsertOne
ClearFat clears the value of the "fat" field.
func (*OccurrenceUpsertOne) ClearFiber ¶
func (u *OccurrenceUpsertOne) ClearFiber() *OccurrenceUpsertOne
ClearFiber clears the value of the "fiber" field.
func (*OccurrenceUpsertOne) ClearKcal ¶
func (u *OccurrenceUpsertOne) ClearKcal() *OccurrenceUpsertOne
ClearKcal clears the value of the "kcal" field.
func (*OccurrenceUpsertOne) ClearKj ¶
func (u *OccurrenceUpsertOne) ClearKj() *OccurrenceUpsertOne
ClearKj clears the value of the "kj" field.
func (*OccurrenceUpsertOne) ClearNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsertOne) ClearNotAvailableAfter() *OccurrenceUpsertOne
ClearNotAvailableAfter clears the value of the "not_available_after" field.
func (*OccurrenceUpsertOne) ClearPriceGuest ¶
func (u *OccurrenceUpsertOne) ClearPriceGuest() *OccurrenceUpsertOne
ClearPriceGuest clears the value of the "price_guest" field.
func (*OccurrenceUpsertOne) ClearPriceStaff ¶
func (u *OccurrenceUpsertOne) ClearPriceStaff() *OccurrenceUpsertOne
ClearPriceStaff clears the value of the "price_staff" field.
func (*OccurrenceUpsertOne) ClearPriceStudent ¶
func (u *OccurrenceUpsertOne) ClearPriceStudent() *OccurrenceUpsertOne
ClearPriceStudent clears the value of the "price_student" field.
func (*OccurrenceUpsertOne) ClearProtein ¶
func (u *OccurrenceUpsertOne) ClearProtein() *OccurrenceUpsertOne
ClearProtein clears the value of the "protein" field.
func (*OccurrenceUpsertOne) ClearSalt ¶
func (u *OccurrenceUpsertOne) ClearSalt() *OccurrenceUpsertOne
ClearSalt clears the value of the "salt" field.
func (*OccurrenceUpsertOne) ClearSaturatedFat ¶
func (u *OccurrenceUpsertOne) ClearSaturatedFat() *OccurrenceUpsertOne
ClearSaturatedFat clears the value of the "saturated_fat" field.
func (*OccurrenceUpsertOne) ClearSugar ¶
func (u *OccurrenceUpsertOne) ClearSugar() *OccurrenceUpsertOne
ClearSugar clears the value of the "sugar" field.
func (*OccurrenceUpsertOne) DoNothing ¶
func (u *OccurrenceUpsertOne) DoNothing() *OccurrenceUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OccurrenceUpsertOne) Exec ¶
func (u *OccurrenceUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*OccurrenceUpsertOne) ExecX ¶
func (u *OccurrenceUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OccurrenceUpsertOne) ID ¶
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*OccurrenceUpsertOne) IDX ¶
func (u *OccurrenceUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*OccurrenceUpsertOne) Ignore ¶
func (u *OccurrenceUpsertOne) Ignore() *OccurrenceUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Occurrence.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OccurrenceUpsertOne) SetCarbohydrates ¶
func (u *OccurrenceUpsertOne) SetCarbohydrates(v int) *OccurrenceUpsertOne
SetCarbohydrates sets the "carbohydrates" field.
func (*OccurrenceUpsertOne) SetDate ¶
func (u *OccurrenceUpsertOne) SetDate(v time.Time) *OccurrenceUpsertOne
SetDate sets the "date" field.
func (*OccurrenceUpsertOne) SetFat ¶
func (u *OccurrenceUpsertOne) SetFat(v int) *OccurrenceUpsertOne
SetFat sets the "fat" field.
func (*OccurrenceUpsertOne) SetFiber ¶
func (u *OccurrenceUpsertOne) SetFiber(v int) *OccurrenceUpsertOne
SetFiber sets the "fiber" field.
func (*OccurrenceUpsertOne) SetKcal ¶
func (u *OccurrenceUpsertOne) SetKcal(v int) *OccurrenceUpsertOne
SetKcal sets the "kcal" field.
func (*OccurrenceUpsertOne) SetKj ¶
func (u *OccurrenceUpsertOne) SetKj(v int) *OccurrenceUpsertOne
SetKj sets the "kj" field.
func (*OccurrenceUpsertOne) SetNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsertOne) SetNotAvailableAfter(v time.Time) *OccurrenceUpsertOne
SetNotAvailableAfter sets the "not_available_after" field.
func (*OccurrenceUpsertOne) SetPriceGuest ¶
func (u *OccurrenceUpsertOne) SetPriceGuest(v int) *OccurrenceUpsertOne
SetPriceGuest sets the "price_guest" field.
func (*OccurrenceUpsertOne) SetPriceStaff ¶
func (u *OccurrenceUpsertOne) SetPriceStaff(v int) *OccurrenceUpsertOne
SetPriceStaff sets the "price_staff" field.
func (*OccurrenceUpsertOne) SetPriceStudent ¶
func (u *OccurrenceUpsertOne) SetPriceStudent(v int) *OccurrenceUpsertOne
SetPriceStudent sets the "price_student" field.
func (*OccurrenceUpsertOne) SetProtein ¶
func (u *OccurrenceUpsertOne) SetProtein(v int) *OccurrenceUpsertOne
SetProtein sets the "protein" field.
func (*OccurrenceUpsertOne) SetSalt ¶
func (u *OccurrenceUpsertOne) SetSalt(v int) *OccurrenceUpsertOne
SetSalt sets the "salt" field.
func (*OccurrenceUpsertOne) SetSaturatedFat ¶
func (u *OccurrenceUpsertOne) SetSaturatedFat(v int) *OccurrenceUpsertOne
SetSaturatedFat sets the "saturated_fat" field.
func (*OccurrenceUpsertOne) SetSugar ¶
func (u *OccurrenceUpsertOne) SetSugar(v int) *OccurrenceUpsertOne
SetSugar sets the "sugar" field.
func (*OccurrenceUpsertOne) Update ¶
func (u *OccurrenceUpsertOne) Update(set func(*OccurrenceUpsert)) *OccurrenceUpsertOne
Update allows overriding fields `UPDATE` values. See the OccurrenceCreate.OnConflict documentation for more info.
func (*OccurrenceUpsertOne) UpdateCarbohydrates ¶
func (u *OccurrenceUpsertOne) UpdateCarbohydrates() *OccurrenceUpsertOne
UpdateCarbohydrates sets the "carbohydrates" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateDate ¶
func (u *OccurrenceUpsertOne) UpdateDate() *OccurrenceUpsertOne
UpdateDate sets the "date" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateFat ¶
func (u *OccurrenceUpsertOne) UpdateFat() *OccurrenceUpsertOne
UpdateFat sets the "fat" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateFiber ¶
func (u *OccurrenceUpsertOne) UpdateFiber() *OccurrenceUpsertOne
UpdateFiber sets the "fiber" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateKcal ¶
func (u *OccurrenceUpsertOne) UpdateKcal() *OccurrenceUpsertOne
UpdateKcal sets the "kcal" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateKj ¶
func (u *OccurrenceUpsertOne) UpdateKj() *OccurrenceUpsertOne
UpdateKj sets the "kj" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateNewValues ¶
func (u *OccurrenceUpsertOne) UpdateNewValues() *OccurrenceUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Occurrence.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(occurrence.FieldID) }), ). Exec(ctx)
func (*OccurrenceUpsertOne) UpdateNotAvailableAfter ¶ added in v0.7.0
func (u *OccurrenceUpsertOne) UpdateNotAvailableAfter() *OccurrenceUpsertOne
UpdateNotAvailableAfter sets the "not_available_after" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdatePriceGuest ¶
func (u *OccurrenceUpsertOne) UpdatePriceGuest() *OccurrenceUpsertOne
UpdatePriceGuest sets the "price_guest" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdatePriceStaff ¶
func (u *OccurrenceUpsertOne) UpdatePriceStaff() *OccurrenceUpsertOne
UpdatePriceStaff sets the "price_staff" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdatePriceStudent ¶
func (u *OccurrenceUpsertOne) UpdatePriceStudent() *OccurrenceUpsertOne
UpdatePriceStudent sets the "price_student" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateProtein ¶
func (u *OccurrenceUpsertOne) UpdateProtein() *OccurrenceUpsertOne
UpdateProtein sets the "protein" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateSalt ¶
func (u *OccurrenceUpsertOne) UpdateSalt() *OccurrenceUpsertOne
UpdateSalt sets the "salt" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateSaturatedFat ¶
func (u *OccurrenceUpsertOne) UpdateSaturatedFat() *OccurrenceUpsertOne
UpdateSaturatedFat sets the "saturated_fat" field to the value that was provided on create.
func (*OccurrenceUpsertOne) UpdateSugar ¶
func (u *OccurrenceUpsertOne) UpdateSugar() *OccurrenceUpsertOne
UpdateSugar sets the "sugar" field to the value that was provided on create.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Review ¶
type Review struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName *string `json:"display_name,omitempty"` // Stars holds the value of the "stars" field. Stars int `json:"stars,omitempty"` // Text holds the value of the "text" field. Text *string `json:"text,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // AcceptedAt holds the value of the "accepted_at" field. AcceptedAt *time.Time `json:"accepted_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ReviewQuery when eager-loading is set. Edges ReviewEdges `json:"edges"` // contains filtered or unexported fields }
Review is the model entity for the Review schema.
func (*Review) QueryImages ¶
func (r *Review) QueryImages() *ImageQuery
QueryImages queries the "images" edge of the Review entity.
func (*Review) QueryOccurrence ¶
func (r *Review) QueryOccurrence() *OccurrenceQuery
QueryOccurrence queries the "occurrence" edge of the Review entity.
func (*Review) Unwrap ¶
Unwrap unwraps the Review 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 (*Review) Update ¶
func (r *Review) Update() *ReviewUpdateOne
Update returns a builder for updating this Review. Note that you need to call Review.Unwrap() before calling this method if this Review was returned from a transaction, and the transaction was committed or rolled back.
type ReviewClient ¶
type ReviewClient struct {
// contains filtered or unexported fields
}
ReviewClient is a client for the Review schema.
func NewReviewClient ¶
func NewReviewClient(c config) *ReviewClient
NewReviewClient returns a client for the Review from the given config.
func (*ReviewClient) Create ¶
func (c *ReviewClient) Create() *ReviewCreate
Create returns a builder for creating a Review entity.
func (*ReviewClient) CreateBulk ¶
func (c *ReviewClient) CreateBulk(builders ...*ReviewCreate) *ReviewCreateBulk
CreateBulk returns a builder for creating a bulk of Review entities.
func (*ReviewClient) Delete ¶
func (c *ReviewClient) Delete() *ReviewDelete
Delete returns a delete builder for Review.
func (*ReviewClient) DeleteOne ¶
func (c *ReviewClient) DeleteOne(r *Review) *ReviewDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReviewClient) DeleteOneID ¶
func (c *ReviewClient) DeleteOneID(id uuid.UUID) *ReviewDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ReviewClient) Intercept ¶
func (c *ReviewClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `review.Intercept(f(g(h())))`.
func (*ReviewClient) Interceptors ¶
func (c *ReviewClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ReviewClient) Query ¶
func (c *ReviewClient) Query() *ReviewQuery
Query returns a query builder for Review.
func (*ReviewClient) QueryImages ¶
func (c *ReviewClient) QueryImages(r *Review) *ImageQuery
QueryImages queries the images edge of a Review.
func (*ReviewClient) QueryOccurrence ¶
func (c *ReviewClient) QueryOccurrence(r *Review) *OccurrenceQuery
QueryOccurrence queries the occurrence edge of a Review.
func (*ReviewClient) Update ¶
func (c *ReviewClient) Update() *ReviewUpdate
Update returns an update builder for Review.
func (*ReviewClient) UpdateOne ¶
func (c *ReviewClient) UpdateOne(r *Review) *ReviewUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReviewClient) UpdateOneID ¶
func (c *ReviewClient) UpdateOneID(id uuid.UUID) *ReviewUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReviewClient) Use ¶
func (c *ReviewClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `review.Hooks(f(g(h())))`.
type ReviewCreate ¶
type ReviewCreate struct {
// contains filtered or unexported fields
}
ReviewCreate is the builder for creating a Review entity.
func (*ReviewCreate) AddImageIDs ¶
func (rc *ReviewCreate) AddImageIDs(ids ...uuid.UUID) *ReviewCreate
AddImageIDs adds the "images" edge to the Image entity by IDs.
func (*ReviewCreate) AddImages ¶
func (rc *ReviewCreate) AddImages(i ...*Image) *ReviewCreate
AddImages adds the "images" edges to the Image entity.
func (*ReviewCreate) Exec ¶
func (rc *ReviewCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewCreate) ExecX ¶
func (rc *ReviewCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewCreate) Mutation ¶
func (rc *ReviewCreate) Mutation() *ReviewMutation
Mutation returns the ReviewMutation object of the builder.
func (*ReviewCreate) OnConflict ¶
func (rc *ReviewCreate) OnConflict(opts ...sql.ConflictOption) *ReviewUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Review.Create(). SetDisplayName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ReviewUpsert) { SetDisplayName(v+v). }). Exec(ctx)
func (*ReviewCreate) OnConflictColumns ¶
func (rc *ReviewCreate) OnConflictColumns(columns ...string) *ReviewUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Review.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ReviewCreate) Save ¶
func (rc *ReviewCreate) Save(ctx context.Context) (*Review, error)
Save creates the Review in the database.
func (*ReviewCreate) SaveX ¶
func (rc *ReviewCreate) SaveX(ctx context.Context) *Review
SaveX calls Save and panics if Save returns an error.
func (*ReviewCreate) SetAcceptedAt ¶
func (rc *ReviewCreate) SetAcceptedAt(t time.Time) *ReviewCreate
SetAcceptedAt sets the "accepted_at" field.
func (*ReviewCreate) SetCreatedAt ¶
func (rc *ReviewCreate) SetCreatedAt(t time.Time) *ReviewCreate
SetCreatedAt sets the "created_at" field.
func (*ReviewCreate) SetDisplayName ¶
func (rc *ReviewCreate) SetDisplayName(s string) *ReviewCreate
SetDisplayName sets the "display_name" field.
func (*ReviewCreate) SetID ¶
func (rc *ReviewCreate) SetID(u uuid.UUID) *ReviewCreate
SetID sets the "id" field.
func (*ReviewCreate) SetNillableAcceptedAt ¶
func (rc *ReviewCreate) SetNillableAcceptedAt(t *time.Time) *ReviewCreate
SetNillableAcceptedAt sets the "accepted_at" field if the given value is not nil.
func (*ReviewCreate) SetNillableCreatedAt ¶
func (rc *ReviewCreate) SetNillableCreatedAt(t *time.Time) *ReviewCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReviewCreate) SetNillableDisplayName ¶
func (rc *ReviewCreate) SetNillableDisplayName(s *string) *ReviewCreate
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*ReviewCreate) SetNillableID ¶
func (rc *ReviewCreate) SetNillableID(u *uuid.UUID) *ReviewCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ReviewCreate) SetNillableText ¶
func (rc *ReviewCreate) SetNillableText(s *string) *ReviewCreate
SetNillableText sets the "text" field if the given value is not nil.
func (*ReviewCreate) SetNillableUpdatedAt ¶
func (rc *ReviewCreate) SetNillableUpdatedAt(t *time.Time) *ReviewCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ReviewCreate) SetOccurrence ¶
func (rc *ReviewCreate) SetOccurrence(o *Occurrence) *ReviewCreate
SetOccurrence sets the "occurrence" edge to the Occurrence entity.
func (*ReviewCreate) SetOccurrenceID ¶
func (rc *ReviewCreate) SetOccurrenceID(id uuid.UUID) *ReviewCreate
SetOccurrenceID sets the "occurrence" edge to the Occurrence entity by ID.
func (*ReviewCreate) SetStars ¶
func (rc *ReviewCreate) SetStars(i int) *ReviewCreate
SetStars sets the "stars" field.
func (*ReviewCreate) SetText ¶
func (rc *ReviewCreate) SetText(s string) *ReviewCreate
SetText sets the "text" field.
func (*ReviewCreate) SetUpdatedAt ¶
func (rc *ReviewCreate) SetUpdatedAt(t time.Time) *ReviewCreate
SetUpdatedAt sets the "updated_at" field.
type ReviewCreateBulk ¶
type ReviewCreateBulk struct {
// contains filtered or unexported fields
}
ReviewCreateBulk is the builder for creating many Review entities in bulk.
func (*ReviewCreateBulk) Exec ¶
func (rcb *ReviewCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewCreateBulk) ExecX ¶
func (rcb *ReviewCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewCreateBulk) OnConflict ¶
func (rcb *ReviewCreateBulk) OnConflict(opts ...sql.ConflictOption) *ReviewUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Review.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ReviewUpsert) { SetDisplayName(v+v). }). Exec(ctx)
func (*ReviewCreateBulk) OnConflictColumns ¶
func (rcb *ReviewCreateBulk) OnConflictColumns(columns ...string) *ReviewUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Review.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ReviewDelete ¶
type ReviewDelete struct {
// contains filtered or unexported fields
}
ReviewDelete is the builder for deleting a Review entity.
func (*ReviewDelete) Exec ¶
func (rd *ReviewDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReviewDelete) ExecX ¶
func (rd *ReviewDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReviewDelete) Where ¶
func (rd *ReviewDelete) Where(ps ...predicate.Review) *ReviewDelete
Where appends a list predicates to the ReviewDelete builder.
type ReviewDeleteOne ¶
type ReviewDeleteOne struct {
// contains filtered or unexported fields
}
ReviewDeleteOne is the builder for deleting a single Review entity.
func (*ReviewDeleteOne) Exec ¶
func (rdo *ReviewDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReviewDeleteOne) ExecX ¶
func (rdo *ReviewDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewDeleteOne) Where ¶
func (rdo *ReviewDeleteOne) Where(ps ...predicate.Review) *ReviewDeleteOne
Where appends a list predicates to the ReviewDelete builder.
type ReviewEdges ¶
type ReviewEdges struct { // Occurrence holds the value of the occurrence edge. Occurrence *Occurrence `json:"occurrence,omitempty"` // Images holds the value of the images edge. Images []*Image `json:"images,omitempty"` // contains filtered or unexported fields }
ReviewEdges holds the relations/edges for other nodes in the graph.
func (ReviewEdges) ImagesOrErr ¶
func (e ReviewEdges) ImagesOrErr() ([]*Image, error)
ImagesOrErr returns the Images value or an error if the edge was not loaded in eager-loading.
func (ReviewEdges) OccurrenceOrErr ¶
func (e ReviewEdges) OccurrenceOrErr() (*Occurrence, error)
OccurrenceOrErr returns the Occurrence value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ReviewGroupBy ¶
type ReviewGroupBy struct {
// contains filtered or unexported fields
}
ReviewGroupBy is the group-by builder for Review entities.
func (*ReviewGroupBy) Aggregate ¶
func (rgb *ReviewGroupBy) Aggregate(fns ...AggregateFunc) *ReviewGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReviewGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Scan ¶
func (rgb *ReviewGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReviewGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReviewMutation ¶
type ReviewMutation struct {
// contains filtered or unexported fields
}
ReviewMutation represents an operation that mutates the Review nodes in the graph.
func (*ReviewMutation) AcceptedAt ¶
func (m *ReviewMutation) AcceptedAt() (r time.Time, exists bool)
AcceptedAt returns the value of the "accepted_at" field in the mutation.
func (*ReviewMutation) AcceptedAtCleared ¶
func (m *ReviewMutation) AcceptedAtCleared() bool
AcceptedAtCleared returns if the "accepted_at" field was cleared in this mutation.
func (*ReviewMutation) AddField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) AddImageIDs ¶
func (m *ReviewMutation) AddImageIDs(ids ...uuid.UUID)
AddImageIDs adds the "images" edge to the Image entity by ids.
func (*ReviewMutation) AddStars ¶
func (m *ReviewMutation) AddStars(i int)
AddStars adds i to the "stars" field.
func (*ReviewMutation) AddedEdges ¶
func (m *ReviewMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReviewMutation) AddedField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) AddedFields ¶
func (m *ReviewMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReviewMutation) AddedIDs ¶
func (m *ReviewMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReviewMutation) AddedStars ¶
func (m *ReviewMutation) AddedStars() (r int, exists bool)
AddedStars returns the value that was added to the "stars" field in this mutation.
func (*ReviewMutation) ClearAcceptedAt ¶
func (m *ReviewMutation) ClearAcceptedAt()
ClearAcceptedAt clears the value of the "accepted_at" field.
func (*ReviewMutation) ClearDisplayName ¶
func (m *ReviewMutation) ClearDisplayName()
ClearDisplayName clears the value of the "display_name" field.
func (*ReviewMutation) ClearEdge ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ClearField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ClearImages ¶
func (m *ReviewMutation) ClearImages()
ClearImages clears the "images" edge to the Image entity.
func (*ReviewMutation) ClearOccurrence ¶
func (m *ReviewMutation) ClearOccurrence()
ClearOccurrence clears the "occurrence" edge to the Occurrence entity.
func (*ReviewMutation) ClearText ¶
func (m *ReviewMutation) ClearText()
ClearText clears the value of the "text" field.
func (*ReviewMutation) ClearedEdges ¶
func (m *ReviewMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReviewMutation) ClearedFields ¶
func (m *ReviewMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReviewMutation) Client ¶
func (m ReviewMutation) 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 (*ReviewMutation) CreatedAt ¶
func (m *ReviewMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ReviewMutation) DisplayName ¶
func (m *ReviewMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*ReviewMutation) DisplayNameCleared ¶
func (m *ReviewMutation) DisplayNameCleared() bool
DisplayNameCleared returns if the "display_name" field was cleared in this mutation.
func (*ReviewMutation) EdgeCleared ¶
func (m *ReviewMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReviewMutation) Field ¶
func (m *ReviewMutation) 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 (*ReviewMutation) FieldCleared ¶
func (m *ReviewMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReviewMutation) Fields ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ID ¶
func (m *ReviewMutation) 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 (*ReviewMutation) 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 (*ReviewMutation) ImagesCleared ¶
func (m *ReviewMutation) ImagesCleared() bool
ImagesCleared reports if the "images" edge to the Image entity was cleared.
func (*ReviewMutation) ImagesIDs ¶
func (m *ReviewMutation) ImagesIDs() (ids []uuid.UUID)
ImagesIDs returns the "images" edge IDs in the mutation.
func (*ReviewMutation) OccurrenceCleared ¶
func (m *ReviewMutation) OccurrenceCleared() bool
OccurrenceCleared reports if the "occurrence" edge to the Occurrence entity was cleared.
func (*ReviewMutation) OccurrenceID ¶
func (m *ReviewMutation) OccurrenceID() (id uuid.UUID, exists bool)
OccurrenceID returns the "occurrence" edge ID in the mutation.
func (*ReviewMutation) OccurrenceIDs ¶
func (m *ReviewMutation) OccurrenceIDs() (ids []uuid.UUID)
OccurrenceIDs returns the "occurrence" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OccurrenceID instead. It exists only for internal usage by the builders.
func (*ReviewMutation) OldAcceptedAt ¶
OldAcceptedAt returns the old "accepted_at" field's value of the Review entity. If the Review 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 (*ReviewMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Review entity. If the Review 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 (*ReviewMutation) OldDisplayName ¶
func (m *ReviewMutation) OldDisplayName(ctx context.Context) (v *string, err error)
OldDisplayName returns the old "display_name" field's value of the Review entity. If the Review 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 (*ReviewMutation) 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 (*ReviewMutation) OldStars ¶
func (m *ReviewMutation) OldStars(ctx context.Context) (v int, err error)
OldStars returns the old "stars" field's value of the Review entity. If the Review 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 (*ReviewMutation) OldText ¶
func (m *ReviewMutation) OldText(ctx context.Context) (v *string, err error)
OldText returns the old "text" field's value of the Review entity. If the Review 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 (*ReviewMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Review entity. If the Review 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 (*ReviewMutation) RemoveImageIDs ¶
func (m *ReviewMutation) RemoveImageIDs(ids ...uuid.UUID)
RemoveImageIDs removes the "images" edge to the Image entity by IDs.
func (*ReviewMutation) RemovedEdges ¶
func (m *ReviewMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReviewMutation) RemovedIDs ¶
func (m *ReviewMutation) 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 (*ReviewMutation) RemovedImagesIDs ¶
func (m *ReviewMutation) RemovedImagesIDs() (ids []uuid.UUID)
RemovedImages returns the removed IDs of the "images" edge to the Image entity.
func (*ReviewMutation) ResetAcceptedAt ¶
func (m *ReviewMutation) ResetAcceptedAt()
ResetAcceptedAt resets all changes to the "accepted_at" field.
func (*ReviewMutation) ResetCreatedAt ¶
func (m *ReviewMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ReviewMutation) ResetDisplayName ¶
func (m *ReviewMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*ReviewMutation) ResetEdge ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ResetField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ResetImages ¶
func (m *ReviewMutation) ResetImages()
ResetImages resets all changes to the "images" edge.
func (*ReviewMutation) ResetOccurrence ¶
func (m *ReviewMutation) ResetOccurrence()
ResetOccurrence resets all changes to the "occurrence" edge.
func (*ReviewMutation) ResetStars ¶
func (m *ReviewMutation) ResetStars()
ResetStars resets all changes to the "stars" field.
func (*ReviewMutation) ResetText ¶
func (m *ReviewMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*ReviewMutation) ResetUpdatedAt ¶
func (m *ReviewMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ReviewMutation) SetAcceptedAt ¶
func (m *ReviewMutation) SetAcceptedAt(t time.Time)
SetAcceptedAt sets the "accepted_at" field.
func (*ReviewMutation) SetCreatedAt ¶
func (m *ReviewMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ReviewMutation) SetDisplayName ¶
func (m *ReviewMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" field.
func (*ReviewMutation) SetField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) SetID ¶
func (m *ReviewMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Review entities.
func (*ReviewMutation) SetOccurrenceID ¶
func (m *ReviewMutation) SetOccurrenceID(id uuid.UUID)
SetOccurrenceID sets the "occurrence" edge to the Occurrence entity by id.
func (*ReviewMutation) SetOp ¶
func (m *ReviewMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ReviewMutation) SetStars ¶
func (m *ReviewMutation) SetStars(i int)
SetStars sets the "stars" field.
func (*ReviewMutation) SetText ¶
func (m *ReviewMutation) SetText(s string)
SetText sets the "text" field.
func (*ReviewMutation) SetUpdatedAt ¶
func (m *ReviewMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ReviewMutation) Stars ¶
func (m *ReviewMutation) Stars() (r int, exists bool)
Stars returns the value of the "stars" field in the mutation.
func (*ReviewMutation) Text ¶
func (m *ReviewMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (*ReviewMutation) TextCleared ¶
func (m *ReviewMutation) TextCleared() bool
TextCleared returns if the "text" field was cleared in this mutation.
func (ReviewMutation) Tx ¶
func (m ReviewMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReviewMutation) Type ¶
func (m *ReviewMutation) Type() string
Type returns the node type of this mutation (Review).
func (*ReviewMutation) UpdatedAt ¶
func (m *ReviewMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ReviewMutation) Where ¶
func (m *ReviewMutation) Where(ps ...predicate.Review)
Where appends a list predicates to the ReviewMutation builder.
func (*ReviewMutation) WhereP ¶
func (m *ReviewMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ReviewMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ReviewQuery ¶
type ReviewQuery struct {
// contains filtered or unexported fields
}
ReviewQuery is the builder for querying Review entities.
func (*ReviewQuery) Aggregate ¶
func (rq *ReviewQuery) Aggregate(fns ...AggregateFunc) *ReviewSelect
Aggregate returns a ReviewSelect configured with the given aggregations.
func (*ReviewQuery) All ¶
func (rq *ReviewQuery) All(ctx context.Context) ([]*Review, error)
All executes the query and returns a list of Reviews.
func (*ReviewQuery) AllX ¶
func (rq *ReviewQuery) AllX(ctx context.Context) []*Review
AllX is like All, but panics if an error occurs.
func (*ReviewQuery) Clone ¶
func (rq *ReviewQuery) Clone() *ReviewQuery
Clone returns a duplicate of the ReviewQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReviewQuery) Count ¶
func (rq *ReviewQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReviewQuery) CountX ¶
func (rq *ReviewQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReviewQuery) Exist ¶
func (rq *ReviewQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReviewQuery) ExistX ¶
func (rq *ReviewQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReviewQuery) First ¶
func (rq *ReviewQuery) First(ctx context.Context) (*Review, error)
First returns the first Review entity from the query. Returns a *NotFoundError when no Review was found.
func (*ReviewQuery) FirstID ¶
FirstID returns the first Review ID from the query. Returns a *NotFoundError when no Review ID was found.
func (*ReviewQuery) FirstIDX ¶
func (rq *ReviewQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReviewQuery) FirstX ¶
func (rq *ReviewQuery) FirstX(ctx context.Context) *Review
FirstX is like First, but panics if an error occurs.
func (*ReviewQuery) GroupBy ¶
func (rq *ReviewQuery) GroupBy(field string, fields ...string) *ReviewGroupBy
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 { DisplayName string `json:"display_name,omitempty"` Count int `json:"count,omitempty"` } client.Review.Query(). GroupBy(review.FieldDisplayName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ReviewQuery) IDsX ¶
func (rq *ReviewQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ReviewQuery) Limit ¶
func (rq *ReviewQuery) Limit(limit int) *ReviewQuery
Limit the number of records to be returned by this query.
func (*ReviewQuery) Offset ¶
func (rq *ReviewQuery) Offset(offset int) *ReviewQuery
Offset to start from.
func (*ReviewQuery) Only ¶
func (rq *ReviewQuery) Only(ctx context.Context) (*Review, error)
Only returns a single Review entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Review entity is found. Returns a *NotFoundError when no Review entities are found.
func (*ReviewQuery) OnlyID ¶
OnlyID is like Only, but returns the only Review ID in the query. Returns a *NotSingularError when more than one Review ID is found. Returns a *NotFoundError when no entities are found.
func (*ReviewQuery) OnlyIDX ¶
func (rq *ReviewQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReviewQuery) OnlyX ¶
func (rq *ReviewQuery) OnlyX(ctx context.Context) *Review
OnlyX is like Only, but panics if an error occurs.
func (*ReviewQuery) Order ¶
func (rq *ReviewQuery) Order(o ...review.OrderOption) *ReviewQuery
Order specifies how the records should be ordered.
func (*ReviewQuery) QueryImages ¶
func (rq *ReviewQuery) QueryImages() *ImageQuery
QueryImages chains the current query on the "images" edge.
func (*ReviewQuery) QueryOccurrence ¶
func (rq *ReviewQuery) QueryOccurrence() *OccurrenceQuery
QueryOccurrence chains the current query on the "occurrence" edge.
func (*ReviewQuery) Select ¶
func (rq *ReviewQuery) Select(fields ...string) *ReviewSelect
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 { DisplayName string `json:"display_name,omitempty"` } client.Review.Query(). Select(review.FieldDisplayName). Scan(ctx, &v)
func (*ReviewQuery) Unique ¶
func (rq *ReviewQuery) Unique(unique bool) *ReviewQuery
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 (*ReviewQuery) Where ¶
func (rq *ReviewQuery) Where(ps ...predicate.Review) *ReviewQuery
Where adds a new predicate for the ReviewQuery builder.
func (*ReviewQuery) WithImages ¶
func (rq *ReviewQuery) WithImages(opts ...func(*ImageQuery)) *ReviewQuery
WithImages tells the query-builder to eager-load the nodes that are connected to the "images" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReviewQuery) WithOccurrence ¶
func (rq *ReviewQuery) WithOccurrence(opts ...func(*OccurrenceQuery)) *ReviewQuery
WithOccurrence tells the query-builder to eager-load the nodes that are connected to the "occurrence" edge. The optional arguments are used to configure the query builder of the edge.
type ReviewSelect ¶
type ReviewSelect struct { *ReviewQuery // contains filtered or unexported fields }
ReviewSelect is the builder for selecting fields of Review entities.
func (*ReviewSelect) Aggregate ¶
func (rs *ReviewSelect) Aggregate(fns ...AggregateFunc) *ReviewSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ReviewSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Scan ¶
func (rs *ReviewSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReviewSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReviewUpdate ¶
type ReviewUpdate struct {
// contains filtered or unexported fields
}
ReviewUpdate is the builder for updating Review entities.
func (*ReviewUpdate) AddImageIDs ¶
func (ru *ReviewUpdate) AddImageIDs(ids ...uuid.UUID) *ReviewUpdate
AddImageIDs adds the "images" edge to the Image entity by IDs.
func (*ReviewUpdate) AddImages ¶
func (ru *ReviewUpdate) AddImages(i ...*Image) *ReviewUpdate
AddImages adds the "images" edges to the Image entity.
func (*ReviewUpdate) AddStars ¶
func (ru *ReviewUpdate) AddStars(i int) *ReviewUpdate
AddStars adds i to the "stars" field.
func (*ReviewUpdate) ClearAcceptedAt ¶
func (ru *ReviewUpdate) ClearAcceptedAt() *ReviewUpdate
ClearAcceptedAt clears the value of the "accepted_at" field.
func (*ReviewUpdate) ClearDisplayName ¶
func (ru *ReviewUpdate) ClearDisplayName() *ReviewUpdate
ClearDisplayName clears the value of the "display_name" field.
func (*ReviewUpdate) ClearImages ¶
func (ru *ReviewUpdate) ClearImages() *ReviewUpdate
ClearImages clears all "images" edges to the Image entity.
func (*ReviewUpdate) ClearOccurrence ¶
func (ru *ReviewUpdate) ClearOccurrence() *ReviewUpdate
ClearOccurrence clears the "occurrence" edge to the Occurrence entity.
func (*ReviewUpdate) ClearText ¶
func (ru *ReviewUpdate) ClearText() *ReviewUpdate
ClearText clears the value of the "text" field.
func (*ReviewUpdate) Exec ¶
func (ru *ReviewUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewUpdate) ExecX ¶
func (ru *ReviewUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewUpdate) Mutation ¶
func (ru *ReviewUpdate) Mutation() *ReviewMutation
Mutation returns the ReviewMutation object of the builder.
func (*ReviewUpdate) RemoveImageIDs ¶
func (ru *ReviewUpdate) RemoveImageIDs(ids ...uuid.UUID) *ReviewUpdate
RemoveImageIDs removes the "images" edge to Image entities by IDs.
func (*ReviewUpdate) RemoveImages ¶
func (ru *ReviewUpdate) RemoveImages(i ...*Image) *ReviewUpdate
RemoveImages removes "images" edges to Image entities.
func (*ReviewUpdate) Save ¶
func (ru *ReviewUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReviewUpdate) SaveX ¶
func (ru *ReviewUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReviewUpdate) SetAcceptedAt ¶
func (ru *ReviewUpdate) SetAcceptedAt(t time.Time) *ReviewUpdate
SetAcceptedAt sets the "accepted_at" field.
func (*ReviewUpdate) SetDisplayName ¶
func (ru *ReviewUpdate) SetDisplayName(s string) *ReviewUpdate
SetDisplayName sets the "display_name" field.
func (*ReviewUpdate) SetNillableAcceptedAt ¶
func (ru *ReviewUpdate) SetNillableAcceptedAt(t *time.Time) *ReviewUpdate
SetNillableAcceptedAt sets the "accepted_at" field if the given value is not nil.
func (*ReviewUpdate) SetNillableDisplayName ¶
func (ru *ReviewUpdate) SetNillableDisplayName(s *string) *ReviewUpdate
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*ReviewUpdate) SetNillableText ¶
func (ru *ReviewUpdate) SetNillableText(s *string) *ReviewUpdate
SetNillableText sets the "text" field if the given value is not nil.
func (*ReviewUpdate) SetOccurrence ¶
func (ru *ReviewUpdate) SetOccurrence(o *Occurrence) *ReviewUpdate
SetOccurrence sets the "occurrence" edge to the Occurrence entity.
func (*ReviewUpdate) SetOccurrenceID ¶
func (ru *ReviewUpdate) SetOccurrenceID(id uuid.UUID) *ReviewUpdate
SetOccurrenceID sets the "occurrence" edge to the Occurrence entity by ID.
func (*ReviewUpdate) SetStars ¶
func (ru *ReviewUpdate) SetStars(i int) *ReviewUpdate
SetStars sets the "stars" field.
func (*ReviewUpdate) SetText ¶
func (ru *ReviewUpdate) SetText(s string) *ReviewUpdate
SetText sets the "text" field.
func (*ReviewUpdate) SetUpdatedAt ¶
func (ru *ReviewUpdate) SetUpdatedAt(t time.Time) *ReviewUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ReviewUpdate) Where ¶
func (ru *ReviewUpdate) Where(ps ...predicate.Review) *ReviewUpdate
Where appends a list predicates to the ReviewUpdate builder.
type ReviewUpdateOne ¶
type ReviewUpdateOne struct {
// contains filtered or unexported fields
}
ReviewUpdateOne is the builder for updating a single Review entity.
func (*ReviewUpdateOne) AddImageIDs ¶
func (ruo *ReviewUpdateOne) AddImageIDs(ids ...uuid.UUID) *ReviewUpdateOne
AddImageIDs adds the "images" edge to the Image entity by IDs.
func (*ReviewUpdateOne) AddImages ¶
func (ruo *ReviewUpdateOne) AddImages(i ...*Image) *ReviewUpdateOne
AddImages adds the "images" edges to the Image entity.
func (*ReviewUpdateOne) AddStars ¶
func (ruo *ReviewUpdateOne) AddStars(i int) *ReviewUpdateOne
AddStars adds i to the "stars" field.
func (*ReviewUpdateOne) ClearAcceptedAt ¶
func (ruo *ReviewUpdateOne) ClearAcceptedAt() *ReviewUpdateOne
ClearAcceptedAt clears the value of the "accepted_at" field.
func (*ReviewUpdateOne) ClearDisplayName ¶
func (ruo *ReviewUpdateOne) ClearDisplayName() *ReviewUpdateOne
ClearDisplayName clears the value of the "display_name" field.
func (*ReviewUpdateOne) ClearImages ¶
func (ruo *ReviewUpdateOne) ClearImages() *ReviewUpdateOne
ClearImages clears all "images" edges to the Image entity.
func (*ReviewUpdateOne) ClearOccurrence ¶
func (ruo *ReviewUpdateOne) ClearOccurrence() *ReviewUpdateOne
ClearOccurrence clears the "occurrence" edge to the Occurrence entity.
func (*ReviewUpdateOne) ClearText ¶
func (ruo *ReviewUpdateOne) ClearText() *ReviewUpdateOne
ClearText clears the value of the "text" field.
func (*ReviewUpdateOne) Exec ¶
func (ruo *ReviewUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReviewUpdateOne) ExecX ¶
func (ruo *ReviewUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewUpdateOne) Mutation ¶
func (ruo *ReviewUpdateOne) Mutation() *ReviewMutation
Mutation returns the ReviewMutation object of the builder.
func (*ReviewUpdateOne) RemoveImageIDs ¶
func (ruo *ReviewUpdateOne) RemoveImageIDs(ids ...uuid.UUID) *ReviewUpdateOne
RemoveImageIDs removes the "images" edge to Image entities by IDs.
func (*ReviewUpdateOne) RemoveImages ¶
func (ruo *ReviewUpdateOne) RemoveImages(i ...*Image) *ReviewUpdateOne
RemoveImages removes "images" edges to Image entities.
func (*ReviewUpdateOne) Save ¶
func (ruo *ReviewUpdateOne) Save(ctx context.Context) (*Review, error)
Save executes the query and returns the updated Review entity.
func (*ReviewUpdateOne) SaveX ¶
func (ruo *ReviewUpdateOne) SaveX(ctx context.Context) *Review
SaveX is like Save, but panics if an error occurs.
func (*ReviewUpdateOne) Select ¶
func (ruo *ReviewUpdateOne) Select(field string, fields ...string) *ReviewUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReviewUpdateOne) SetAcceptedAt ¶
func (ruo *ReviewUpdateOne) SetAcceptedAt(t time.Time) *ReviewUpdateOne
SetAcceptedAt sets the "accepted_at" field.
func (*ReviewUpdateOne) SetDisplayName ¶
func (ruo *ReviewUpdateOne) SetDisplayName(s string) *ReviewUpdateOne
SetDisplayName sets the "display_name" field.
func (*ReviewUpdateOne) SetNillableAcceptedAt ¶
func (ruo *ReviewUpdateOne) SetNillableAcceptedAt(t *time.Time) *ReviewUpdateOne
SetNillableAcceptedAt sets the "accepted_at" field if the given value is not nil.
func (*ReviewUpdateOne) SetNillableDisplayName ¶
func (ruo *ReviewUpdateOne) SetNillableDisplayName(s *string) *ReviewUpdateOne
SetNillableDisplayName sets the "display_name" field if the given value is not nil.
func (*ReviewUpdateOne) SetNillableText ¶
func (ruo *ReviewUpdateOne) SetNillableText(s *string) *ReviewUpdateOne
SetNillableText sets the "text" field if the given value is not nil.
func (*ReviewUpdateOne) SetOccurrence ¶
func (ruo *ReviewUpdateOne) SetOccurrence(o *Occurrence) *ReviewUpdateOne
SetOccurrence sets the "occurrence" edge to the Occurrence entity.
func (*ReviewUpdateOne) SetOccurrenceID ¶
func (ruo *ReviewUpdateOne) SetOccurrenceID(id uuid.UUID) *ReviewUpdateOne
SetOccurrenceID sets the "occurrence" edge to the Occurrence entity by ID.
func (*ReviewUpdateOne) SetStars ¶
func (ruo *ReviewUpdateOne) SetStars(i int) *ReviewUpdateOne
SetStars sets the "stars" field.
func (*ReviewUpdateOne) SetText ¶
func (ruo *ReviewUpdateOne) SetText(s string) *ReviewUpdateOne
SetText sets the "text" field.
func (*ReviewUpdateOne) SetUpdatedAt ¶
func (ruo *ReviewUpdateOne) SetUpdatedAt(t time.Time) *ReviewUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ReviewUpdateOne) Where ¶
func (ruo *ReviewUpdateOne) Where(ps ...predicate.Review) *ReviewUpdateOne
Where appends a list predicates to the ReviewUpdate builder.
type ReviewUpsert ¶
ReviewUpsert is the "OnConflict" setter.
func (*ReviewUpsert) AddStars ¶
func (u *ReviewUpsert) AddStars(v int) *ReviewUpsert
AddStars adds v to the "stars" field.
func (*ReviewUpsert) ClearAcceptedAt ¶
func (u *ReviewUpsert) ClearAcceptedAt() *ReviewUpsert
ClearAcceptedAt clears the value of the "accepted_at" field.
func (*ReviewUpsert) ClearDisplayName ¶
func (u *ReviewUpsert) ClearDisplayName() *ReviewUpsert
ClearDisplayName clears the value of the "display_name" field.
func (*ReviewUpsert) ClearText ¶
func (u *ReviewUpsert) ClearText() *ReviewUpsert
ClearText clears the value of the "text" field.
func (*ReviewUpsert) SetAcceptedAt ¶
func (u *ReviewUpsert) SetAcceptedAt(v time.Time) *ReviewUpsert
SetAcceptedAt sets the "accepted_at" field.
func (*ReviewUpsert) SetDisplayName ¶
func (u *ReviewUpsert) SetDisplayName(v string) *ReviewUpsert
SetDisplayName sets the "display_name" field.
func (*ReviewUpsert) SetStars ¶
func (u *ReviewUpsert) SetStars(v int) *ReviewUpsert
SetStars sets the "stars" field.
func (*ReviewUpsert) SetText ¶
func (u *ReviewUpsert) SetText(v string) *ReviewUpsert
SetText sets the "text" field.
func (*ReviewUpsert) SetUpdatedAt ¶
func (u *ReviewUpsert) SetUpdatedAt(v time.Time) *ReviewUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ReviewUpsert) UpdateAcceptedAt ¶
func (u *ReviewUpsert) UpdateAcceptedAt() *ReviewUpsert
UpdateAcceptedAt sets the "accepted_at" field to the value that was provided on create.
func (*ReviewUpsert) UpdateDisplayName ¶
func (u *ReviewUpsert) UpdateDisplayName() *ReviewUpsert
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*ReviewUpsert) UpdateStars ¶
func (u *ReviewUpsert) UpdateStars() *ReviewUpsert
UpdateStars sets the "stars" field to the value that was provided on create.
func (*ReviewUpsert) UpdateText ¶
func (u *ReviewUpsert) UpdateText() *ReviewUpsert
UpdateText sets the "text" field to the value that was provided on create.
func (*ReviewUpsert) UpdateUpdatedAt ¶
func (u *ReviewUpsert) UpdateUpdatedAt() *ReviewUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ReviewUpsertBulk ¶
type ReviewUpsertBulk struct {
// contains filtered or unexported fields
}
ReviewUpsertBulk is the builder for "upsert"-ing a bulk of Review nodes.
func (*ReviewUpsertBulk) AddStars ¶
func (u *ReviewUpsertBulk) AddStars(v int) *ReviewUpsertBulk
AddStars adds v to the "stars" field.
func (*ReviewUpsertBulk) ClearAcceptedAt ¶
func (u *ReviewUpsertBulk) ClearAcceptedAt() *ReviewUpsertBulk
ClearAcceptedAt clears the value of the "accepted_at" field.
func (*ReviewUpsertBulk) ClearDisplayName ¶
func (u *ReviewUpsertBulk) ClearDisplayName() *ReviewUpsertBulk
ClearDisplayName clears the value of the "display_name" field.
func (*ReviewUpsertBulk) ClearText ¶
func (u *ReviewUpsertBulk) ClearText() *ReviewUpsertBulk
ClearText clears the value of the "text" field.
func (*ReviewUpsertBulk) DoNothing ¶
func (u *ReviewUpsertBulk) DoNothing() *ReviewUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ReviewUpsertBulk) Exec ¶
func (u *ReviewUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewUpsertBulk) ExecX ¶
func (u *ReviewUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewUpsertBulk) Ignore ¶
func (u *ReviewUpsertBulk) Ignore() *ReviewUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Review.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ReviewUpsertBulk) SetAcceptedAt ¶
func (u *ReviewUpsertBulk) SetAcceptedAt(v time.Time) *ReviewUpsertBulk
SetAcceptedAt sets the "accepted_at" field.
func (*ReviewUpsertBulk) SetDisplayName ¶
func (u *ReviewUpsertBulk) SetDisplayName(v string) *ReviewUpsertBulk
SetDisplayName sets the "display_name" field.
func (*ReviewUpsertBulk) SetStars ¶
func (u *ReviewUpsertBulk) SetStars(v int) *ReviewUpsertBulk
SetStars sets the "stars" field.
func (*ReviewUpsertBulk) SetText ¶
func (u *ReviewUpsertBulk) SetText(v string) *ReviewUpsertBulk
SetText sets the "text" field.
func (*ReviewUpsertBulk) SetUpdatedAt ¶
func (u *ReviewUpsertBulk) SetUpdatedAt(v time.Time) *ReviewUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ReviewUpsertBulk) Update ¶
func (u *ReviewUpsertBulk) Update(set func(*ReviewUpsert)) *ReviewUpsertBulk
Update allows overriding fields `UPDATE` values. See the ReviewCreateBulk.OnConflict documentation for more info.
func (*ReviewUpsertBulk) UpdateAcceptedAt ¶
func (u *ReviewUpsertBulk) UpdateAcceptedAt() *ReviewUpsertBulk
UpdateAcceptedAt sets the "accepted_at" field to the value that was provided on create.
func (*ReviewUpsertBulk) UpdateDisplayName ¶
func (u *ReviewUpsertBulk) UpdateDisplayName() *ReviewUpsertBulk
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*ReviewUpsertBulk) UpdateNewValues ¶
func (u *ReviewUpsertBulk) UpdateNewValues() *ReviewUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Review.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(review.FieldID) }), ). Exec(ctx)
func (*ReviewUpsertBulk) UpdateStars ¶
func (u *ReviewUpsertBulk) UpdateStars() *ReviewUpsertBulk
UpdateStars sets the "stars" field to the value that was provided on create.
func (*ReviewUpsertBulk) UpdateText ¶
func (u *ReviewUpsertBulk) UpdateText() *ReviewUpsertBulk
UpdateText sets the "text" field to the value that was provided on create.
func (*ReviewUpsertBulk) UpdateUpdatedAt ¶
func (u *ReviewUpsertBulk) UpdateUpdatedAt() *ReviewUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ReviewUpsertOne ¶
type ReviewUpsertOne struct {
// contains filtered or unexported fields
}
ReviewUpsertOne is the builder for "upsert"-ing
one Review node.
func (*ReviewUpsertOne) AddStars ¶
func (u *ReviewUpsertOne) AddStars(v int) *ReviewUpsertOne
AddStars adds v to the "stars" field.
func (*ReviewUpsertOne) ClearAcceptedAt ¶
func (u *ReviewUpsertOne) ClearAcceptedAt() *ReviewUpsertOne
ClearAcceptedAt clears the value of the "accepted_at" field.
func (*ReviewUpsertOne) ClearDisplayName ¶
func (u *ReviewUpsertOne) ClearDisplayName() *ReviewUpsertOne
ClearDisplayName clears the value of the "display_name" field.
func (*ReviewUpsertOne) ClearText ¶
func (u *ReviewUpsertOne) ClearText() *ReviewUpsertOne
ClearText clears the value of the "text" field.
func (*ReviewUpsertOne) DoNothing ¶
func (u *ReviewUpsertOne) DoNothing() *ReviewUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ReviewUpsertOne) Exec ¶
func (u *ReviewUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewUpsertOne) ExecX ¶
func (u *ReviewUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewUpsertOne) IDX ¶
func (u *ReviewUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*ReviewUpsertOne) Ignore ¶
func (u *ReviewUpsertOne) Ignore() *ReviewUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Review.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ReviewUpsertOne) SetAcceptedAt ¶
func (u *ReviewUpsertOne) SetAcceptedAt(v time.Time) *ReviewUpsertOne
SetAcceptedAt sets the "accepted_at" field.
func (*ReviewUpsertOne) SetDisplayName ¶
func (u *ReviewUpsertOne) SetDisplayName(v string) *ReviewUpsertOne
SetDisplayName sets the "display_name" field.
func (*ReviewUpsertOne) SetStars ¶
func (u *ReviewUpsertOne) SetStars(v int) *ReviewUpsertOne
SetStars sets the "stars" field.
func (*ReviewUpsertOne) SetText ¶
func (u *ReviewUpsertOne) SetText(v string) *ReviewUpsertOne
SetText sets the "text" field.
func (*ReviewUpsertOne) SetUpdatedAt ¶
func (u *ReviewUpsertOne) SetUpdatedAt(v time.Time) *ReviewUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ReviewUpsertOne) Update ¶
func (u *ReviewUpsertOne) Update(set func(*ReviewUpsert)) *ReviewUpsertOne
Update allows overriding fields `UPDATE` values. See the ReviewCreate.OnConflict documentation for more info.
func (*ReviewUpsertOne) UpdateAcceptedAt ¶
func (u *ReviewUpsertOne) UpdateAcceptedAt() *ReviewUpsertOne
UpdateAcceptedAt sets the "accepted_at" field to the value that was provided on create.
func (*ReviewUpsertOne) UpdateDisplayName ¶
func (u *ReviewUpsertOne) UpdateDisplayName() *ReviewUpsertOne
UpdateDisplayName sets the "display_name" field to the value that was provided on create.
func (*ReviewUpsertOne) UpdateNewValues ¶
func (u *ReviewUpsertOne) UpdateNewValues() *ReviewUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Review.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(review.FieldID) }), ). Exec(ctx)
func (*ReviewUpsertOne) UpdateStars ¶
func (u *ReviewUpsertOne) UpdateStars() *ReviewUpsertOne
UpdateStars sets the "stars" field to the value that was provided on create.
func (*ReviewUpsertOne) UpdateText ¶
func (u *ReviewUpsertOne) UpdateText() *ReviewUpsertOne
UpdateText sets the "text" field to the value that was provided on create.
func (*ReviewUpsertOne) UpdateUpdatedAt ¶
func (u *ReviewUpsertOne) UpdateUpdatedAt() *ReviewUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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 Tag ¶
type Tag struct { // ID of the ent. ID string `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"` // ShortName holds the value of the "short_name" field. ShortName *string `json:"short_name,omitempty"` // Priority holds the value of the "priority" field. Priority schema.TagPriority `json:"priority,omitempty"` // IsAllergy holds the value of the "is_allergy" field. IsAllergy bool `json:"is_allergy,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) QueryOccurrence ¶
func (t *Tag) QueryOccurrence() *OccurrenceQuery
QueryOccurrence queries the "occurrence" 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 string) *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) QueryOccurrence ¶
func (c *TagClient) QueryOccurrence(t *Tag) *OccurrenceQuery
QueryOccurrence queries the occurrence 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 string) *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) AddOccurrence ¶
func (tc *TagCreate) AddOccurrence(o ...*Occurrence) *TagCreate
AddOccurrence adds the "occurrence" edges to the Occurrence entity.
func (*TagCreate) AddOccurrenceIDs ¶
AddOccurrenceIDs adds the "occurrence" edge to the Occurrence entity by IDs.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) OnConflict ¶
func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetName(v+v). }). Exec(ctx)
func (*TagCreate) OnConflictColumns ¶
func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TagCreate) SetDescription ¶
SetDescription sets the "description" field.
func (*TagCreate) SetIsAllergy ¶
SetIsAllergy sets the "is_allergy" field.
func (*TagCreate) SetNillableIsAllergy ¶
SetNillableIsAllergy sets the "is_allergy" field if the given value is not nil.
func (*TagCreate) SetNillablePriority ¶
func (tc *TagCreate) SetNillablePriority(sp *schema.TagPriority) *TagCreate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*TagCreate) SetNillableShortName ¶
SetNillableShortName sets the "short_name" field if the given value is not nil.
func (*TagCreate) SetPriority ¶
func (tc *TagCreate) SetPriority(sp schema.TagPriority) *TagCreate
SetPriority sets the "priority" field.
func (*TagCreate) SetShortName ¶
SetShortName sets the "short_name" field.
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.
func (*TagCreateBulk) OnConflict ¶
func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetName(v+v). }). Exec(ctx)
func (*TagCreateBulk) OnConflictColumns ¶
func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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 { // Occurrence holds the value of the occurrence edge. Occurrence []*Occurrence `json:"occurrence,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) OccurrenceOrErr ¶
func (e TagEdges) OccurrenceOrErr() ([]*Occurrence, error)
OccurrenceOrErr returns the Occurrence 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) AddOccurrenceIDs ¶
func (m *TagMutation) AddOccurrenceIDs(ids ...uuid.UUID)
AddOccurrenceIDs adds the "occurrence" edge to the Occurrence 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) ClearOccurrence ¶
func (m *TagMutation) ClearOccurrence()
ClearOccurrence clears the "occurrence" edge to the Occurrence entity.
func (*TagMutation) ClearShortName ¶
func (m *TagMutation) ClearShortName()
ClearShortName clears the value of the "short_name" field.
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) Description ¶
func (m *TagMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
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) ID ¶
func (m *TagMutation) ID() (id string, 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 ¶
func (m *TagMutation) IDs(ctx context.Context) ([]string, 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 (*TagMutation) IsAllergy ¶
func (m *TagMutation) IsAllergy() (r bool, exists bool)
IsAllergy returns the value of the "is_allergy" field in 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) OccurrenceCleared ¶
func (m *TagMutation) OccurrenceCleared() bool
OccurrenceCleared reports if the "occurrence" edge to the Occurrence entity was cleared.
func (*TagMutation) OccurrenceIDs ¶
func (m *TagMutation) OccurrenceIDs() (ids []uuid.UUID)
OccurrenceIDs returns the "occurrence" edge IDs in the mutation.
func (*TagMutation) OldDescription ¶
func (m *TagMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" 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) 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) OldIsAllergy ¶
func (m *TagMutation) OldIsAllergy(ctx context.Context) (v bool, err error)
OldIsAllergy returns the old "is_allergy" 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) OldPriority ¶
func (m *TagMutation) OldPriority(ctx context.Context) (v schema.TagPriority, err error)
OldPriority returns the old "priority" 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) OldShortName ¶
func (m *TagMutation) OldShortName(ctx context.Context) (v *string, err error)
OldShortName returns the old "short_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) Priority ¶
func (m *TagMutation) Priority() (r schema.TagPriority, exists bool)
Priority returns the value of the "priority" field in the mutation.
func (*TagMutation) RemoveOccurrenceIDs ¶
func (m *TagMutation) RemoveOccurrenceIDs(ids ...uuid.UUID)
RemoveOccurrenceIDs removes the "occurrence" edge to the Occurrence 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) RemovedOccurrenceIDs ¶
func (m *TagMutation) RemovedOccurrenceIDs() (ids []uuid.UUID)
RemovedOccurrence returns the removed IDs of the "occurrence" edge to the Occurrence entity.
func (*TagMutation) ResetDescription ¶
func (m *TagMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
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) ResetIsAllergy ¶
func (m *TagMutation) ResetIsAllergy()
ResetIsAllergy resets all changes to the "is_allergy" field.
func (*TagMutation) ResetName ¶
func (m *TagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TagMutation) ResetOccurrence ¶
func (m *TagMutation) ResetOccurrence()
ResetOccurrence resets all changes to the "occurrence" edge.
func (*TagMutation) ResetPriority ¶
func (m *TagMutation) ResetPriority()
ResetPriority resets all changes to the "priority" field.
func (*TagMutation) ResetShortName ¶
func (m *TagMutation) ResetShortName()
ResetShortName resets all changes to the "short_name" field.
func (*TagMutation) SetDescription ¶
func (m *TagMutation) SetDescription(s string)
SetDescription sets the "description" 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) SetID ¶
func (m *TagMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tag entities.
func (*TagMutation) SetIsAllergy ¶
func (m *TagMutation) SetIsAllergy(b bool)
SetIsAllergy sets the "is_allergy" field.
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) SetPriority ¶
func (m *TagMutation) SetPriority(sp schema.TagPriority)
SetPriority sets the "priority" field.
func (*TagMutation) SetShortName ¶
func (m *TagMutation) SetShortName(s string)
SetShortName sets the "short_name" field.
func (*TagMutation) ShortName ¶
func (m *TagMutation) ShortName() (r string, exists bool)
ShortName returns the value of the "short_name" field in the mutation.
func (*TagMutation) ShortNameCleared ¶
func (m *TagMutation) ShortNameCleared() bool
ShortNameCleared returns if the "short_name" field was cleared in this 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) QueryOccurrence ¶
func (tq *TagQuery) QueryOccurrence() *OccurrenceQuery
QueryOccurrence chains the current query on the "occurrence" 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) WithOccurrence ¶
func (tq *TagQuery) WithOccurrence(opts ...func(*OccurrenceQuery)) *TagQuery
WithOccurrence tells the query-builder to eager-load the nodes that are connected to the "occurrence" 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) AddOccurrence ¶
func (tu *TagUpdate) AddOccurrence(o ...*Occurrence) *TagUpdate
AddOccurrence adds the "occurrence" edges to the Occurrence entity.
func (*TagUpdate) AddOccurrenceIDs ¶
AddOccurrenceIDs adds the "occurrence" edge to the Occurrence entity by IDs.
func (*TagUpdate) ClearOccurrence ¶
ClearOccurrence clears all "occurrence" edges to the Occurrence entity.
func (*TagUpdate) ClearShortName ¶
ClearShortName clears the value of the "short_name" field.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveOccurrence ¶
func (tu *TagUpdate) RemoveOccurrence(o ...*Occurrence) *TagUpdate
RemoveOccurrence removes "occurrence" edges to Occurrence entities.
func (*TagUpdate) RemoveOccurrenceIDs ¶
RemoveOccurrenceIDs removes the "occurrence" edge to Occurrence entities by IDs.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetDescription ¶
SetDescription sets the "description" field.
func (*TagUpdate) SetIsAllergy ¶
SetIsAllergy sets the "is_allergy" field.
func (*TagUpdate) SetNillableIsAllergy ¶
SetNillableIsAllergy sets the "is_allergy" field if the given value is not nil.
func (*TagUpdate) SetNillablePriority ¶
func (tu *TagUpdate) SetNillablePriority(sp *schema.TagPriority) *TagUpdate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*TagUpdate) SetNillableShortName ¶
SetNillableShortName sets the "short_name" field if the given value is not nil.
func (*TagUpdate) SetPriority ¶
func (tu *TagUpdate) SetPriority(sp schema.TagPriority) *TagUpdate
SetPriority sets the "priority" field.
func (*TagUpdate) SetShortName ¶
SetShortName sets the "short_name" field.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddOccurrence ¶
func (tuo *TagUpdateOne) AddOccurrence(o ...*Occurrence) *TagUpdateOne
AddOccurrence adds the "occurrence" edges to the Occurrence entity.
func (*TagUpdateOne) AddOccurrenceIDs ¶
func (tuo *TagUpdateOne) AddOccurrenceIDs(ids ...uuid.UUID) *TagUpdateOne
AddOccurrenceIDs adds the "occurrence" edge to the Occurrence entity by IDs.
func (*TagUpdateOne) ClearOccurrence ¶
func (tuo *TagUpdateOne) ClearOccurrence() *TagUpdateOne
ClearOccurrence clears all "occurrence" edges to the Occurrence entity.
func (*TagUpdateOne) ClearShortName ¶
func (tuo *TagUpdateOne) ClearShortName() *TagUpdateOne
ClearShortName clears the value of the "short_name" field.
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) RemoveOccurrence ¶
func (tuo *TagUpdateOne) RemoveOccurrence(o ...*Occurrence) *TagUpdateOne
RemoveOccurrence removes "occurrence" edges to Occurrence entities.
func (*TagUpdateOne) RemoveOccurrenceIDs ¶
func (tuo *TagUpdateOne) RemoveOccurrenceIDs(ids ...uuid.UUID) *TagUpdateOne
RemoveOccurrenceIDs removes the "occurrence" edge to Occurrence entities by IDs.
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) SetDescription ¶
func (tuo *TagUpdateOne) SetDescription(s string) *TagUpdateOne
SetDescription sets the "description" field.
func (*TagUpdateOne) SetIsAllergy ¶
func (tuo *TagUpdateOne) SetIsAllergy(b bool) *TagUpdateOne
SetIsAllergy sets the "is_allergy" field.
func (*TagUpdateOne) SetName ¶
func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
SetName sets the "name" field.
func (*TagUpdateOne) SetNillableIsAllergy ¶
func (tuo *TagUpdateOne) SetNillableIsAllergy(b *bool) *TagUpdateOne
SetNillableIsAllergy sets the "is_allergy" field if the given value is not nil.
func (*TagUpdateOne) SetNillablePriority ¶
func (tuo *TagUpdateOne) SetNillablePriority(sp *schema.TagPriority) *TagUpdateOne
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*TagUpdateOne) SetNillableShortName ¶
func (tuo *TagUpdateOne) SetNillableShortName(s *string) *TagUpdateOne
SetNillableShortName sets the "short_name" field if the given value is not nil.
func (*TagUpdateOne) SetPriority ¶
func (tuo *TagUpdateOne) SetPriority(sp schema.TagPriority) *TagUpdateOne
SetPriority sets the "priority" field.
func (*TagUpdateOne) SetShortName ¶
func (tuo *TagUpdateOne) SetShortName(s string) *TagUpdateOne
SetShortName sets the "short_name" field.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TagUpsert ¶
TagUpsert is the "OnConflict" setter.
func (*TagUpsert) ClearShortName ¶
ClearShortName clears the value of the "short_name" field.
func (*TagUpsert) SetDescription ¶
SetDescription sets the "description" field.
func (*TagUpsert) SetIsAllergy ¶
SetIsAllergy sets the "is_allergy" field.
func (*TagUpsert) SetPriority ¶
func (u *TagUpsert) SetPriority(v schema.TagPriority) *TagUpsert
SetPriority sets the "priority" field.
func (*TagUpsert) SetShortName ¶
SetShortName sets the "short_name" field.
func (*TagUpsert) UpdateDescription ¶
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TagUpsert) UpdateIsAllergy ¶
UpdateIsAllergy sets the "is_allergy" field to the value that was provided on create.
func (*TagUpsert) UpdateName ¶
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsert) UpdatePriority ¶
UpdatePriority sets the "priority" field to the value that was provided on create.
func (*TagUpsert) UpdateShortName ¶
UpdateShortName sets the "short_name" field to the value that was provided on create.
type TagUpsertBulk ¶
type TagUpsertBulk struct {
// contains filtered or unexported fields
}
TagUpsertBulk is the builder for "upsert"-ing a bulk of Tag nodes.
func (*TagUpsertBulk) ClearShortName ¶
func (u *TagUpsertBulk) ClearShortName() *TagUpsertBulk
ClearShortName clears the value of the "short_name" field.
func (*TagUpsertBulk) DoNothing ¶
func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertBulk) Exec ¶
func (u *TagUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertBulk) ExecX ¶
func (u *TagUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertBulk) Ignore ¶
func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertBulk) SetDescription ¶
func (u *TagUpsertBulk) SetDescription(v string) *TagUpsertBulk
SetDescription sets the "description" field.
func (*TagUpsertBulk) SetIsAllergy ¶
func (u *TagUpsertBulk) SetIsAllergy(v bool) *TagUpsertBulk
SetIsAllergy sets the "is_allergy" field.
func (*TagUpsertBulk) SetName ¶
func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk
SetName sets the "name" field.
func (*TagUpsertBulk) SetPriority ¶
func (u *TagUpsertBulk) SetPriority(v schema.TagPriority) *TagUpsertBulk
SetPriority sets the "priority" field.
func (*TagUpsertBulk) SetShortName ¶
func (u *TagUpsertBulk) SetShortName(v string) *TagUpsertBulk
SetShortName sets the "short_name" field.
func (*TagUpsertBulk) Update ¶
func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
Update allows overriding fields `UPDATE` values. See the TagCreateBulk.OnConflict documentation for more info.
func (*TagUpsertBulk) UpdateDescription ¶
func (u *TagUpsertBulk) UpdateDescription() *TagUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateIsAllergy ¶
func (u *TagUpsertBulk) UpdateIsAllergy() *TagUpsertBulk
UpdateIsAllergy sets the "is_allergy" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateName ¶
func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateNewValues ¶
func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tag.FieldID) }), ). Exec(ctx)
func (*TagUpsertBulk) UpdatePriority ¶
func (u *TagUpsertBulk) UpdatePriority() *TagUpsertBulk
UpdatePriority sets the "priority" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateShortName ¶
func (u *TagUpsertBulk) UpdateShortName() *TagUpsertBulk
UpdateShortName sets the "short_name" field to the value that was provided on create.
type TagUpsertOne ¶
type TagUpsertOne struct {
// contains filtered or unexported fields
}
TagUpsertOne is the builder for "upsert"-ing
one Tag node.
func (*TagUpsertOne) ClearShortName ¶
func (u *TagUpsertOne) ClearShortName() *TagUpsertOne
ClearShortName clears the value of the "short_name" field.
func (*TagUpsertOne) DoNothing ¶
func (u *TagUpsertOne) DoNothing() *TagUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertOne) Exec ¶
func (u *TagUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertOne) ExecX ¶
func (u *TagUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertOne) ID ¶
func (u *TagUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TagUpsertOne) IDX ¶
func (u *TagUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*TagUpsertOne) Ignore ¶
func (u *TagUpsertOne) Ignore() *TagUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertOne) SetDescription ¶
func (u *TagUpsertOne) SetDescription(v string) *TagUpsertOne
SetDescription sets the "description" field.
func (*TagUpsertOne) SetIsAllergy ¶
func (u *TagUpsertOne) SetIsAllergy(v bool) *TagUpsertOne
SetIsAllergy sets the "is_allergy" field.
func (*TagUpsertOne) SetName ¶
func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
SetName sets the "name" field.
func (*TagUpsertOne) SetPriority ¶
func (u *TagUpsertOne) SetPriority(v schema.TagPriority) *TagUpsertOne
SetPriority sets the "priority" field.
func (*TagUpsertOne) SetShortName ¶
func (u *TagUpsertOne) SetShortName(v string) *TagUpsertOne
SetShortName sets the "short_name" field.
func (*TagUpsertOne) Update ¶
func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
Update allows overriding fields `UPDATE` values. See the TagCreate.OnConflict documentation for more info.
func (*TagUpsertOne) UpdateDescription ¶
func (u *TagUpsertOne) UpdateDescription() *TagUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TagUpsertOne) UpdateIsAllergy ¶
func (u *TagUpsertOne) UpdateIsAllergy() *TagUpsertOne
UpdateIsAllergy sets the "is_allergy" field to the value that was provided on create.
func (*TagUpsertOne) UpdateName ¶
func (u *TagUpsertOne) UpdateName() *TagUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsertOne) UpdateNewValues ¶
func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tag.FieldID) }), ). Exec(ctx)
func (*TagUpsertOne) UpdatePriority ¶
func (u *TagUpsertOne) UpdatePriority() *TagUpsertOne
UpdatePriority sets the "priority" field to the value that was provided on create.
func (*TagUpsertOne) UpdateShortName ¶
func (u *TagUpsertOne) UpdateShortName() *TagUpsertOne
UpdateShortName sets the "short_name" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Dish is the client for interacting with the Dish builders. Dish *DishClient // DishAlias is the client for interacting with the DishAlias builders. DishAlias *DishAliasClient // Image is the client for interacting with the Image builders. Image *ImageClient // Location is the client for interacting with the Location builders. Location *LocationClient // Occurrence is the client for interacting with the Occurrence builders. Occurrence *OccurrenceClient // Review is the client for interacting with the Review builders. Review *ReviewClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Email holds the value of the "email" field. Email string `json:"-"` // PasswordHash holds the value of the "password_hash" field. PasswordHash string `json:"-"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetEmail(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetEmail(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPasswordHash ¶
func (uc *UserCreate) SetPasswordHash(s string) *UserCreate
SetPasswordHash sets the "password_hash" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetEmail(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) 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 (*UserMutation) 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 (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldPasswordHash ¶
func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)
OldPasswordHash returns the old "password_hash" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) PasswordHash ¶
func (m *UserMutation) PasswordHash() (r string, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetPasswordHash ¶
func (m *UserMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPasswordHash ¶
func (m *UserMutation) SetPasswordHash(s string)
SetPasswordHash sets the "password_hash" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Email string `json:"email,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldEmail). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Email string `json:"email,omitempty"` } client.User.Query(). Select(user.FieldEmail). Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetPasswordHash ¶
func (uu *UserUpdate) SetPasswordHash(s string) *UserUpdate
SetPasswordHash sets the "password_hash" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetPasswordHash ¶
func (uuo *UserUpdateOne) SetPasswordHash(s string) *UserUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetPasswordHash ¶
func (u *UserUpsert) SetPasswordHash(v string) *UserUpsert
SetPasswordHash sets the "password_hash" field.
func (*UserUpsert) SetUpdatedAt ¶
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsert) UpdateEmail ¶
func (u *UserUpsert) UpdateEmail() *UserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsert) UpdatePasswordHash ¶
func (u *UserUpsert) UpdatePasswordHash() *UserUpsert
UpdatePasswordHash sets the "password_hash" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdatedAt ¶
func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetPasswordHash ¶
func (u *UserUpsertBulk) SetPasswordHash(v string) *UserUpsertBulk
SetPasswordHash sets the "password_hash" field.
func (*UserUpsertBulk) SetUpdatedAt ¶
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateEmail ¶
func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdatePasswordHash ¶
func (u *UserUpsertBulk) UpdatePasswordHash() *UserUpsertBulk
UpdatePasswordHash sets the "password_hash" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUpdatedAt ¶
func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetPasswordHash ¶
func (u *UserUpsertOne) SetPasswordHash(v string) *UserUpsertOne
SetPasswordHash sets the "password_hash" field.
func (*UserUpsertOne) SetUpdatedAt ¶
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateEmail ¶
func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdatePasswordHash ¶
func (u *UserUpsertOne) UpdatePasswordHash() *UserUpsertOne
UpdatePasswordHash sets the "password_hash" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUpdatedAt ¶
func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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
- dish.go
- dish_create.go
- dish_delete.go
- dish_query.go
- dish_update.go
- dishalias.go
- dishalias_create.go
- dishalias_delete.go
- dishalias_query.go
- dishalias_update.go
- ent.go
- image.go
- image_create.go
- image_delete.go
- image_query.go
- image_update.go
- location.go
- location_create.go
- location_delete.go
- location_query.go
- location_update.go
- mutation.go
- occurrence.go
- occurrence_create.go
- occurrence_delete.go
- occurrence_query.go
- occurrence_update.go
- review.go
- review_create.go
- review_delete.go
- review_query.go
- review_update.go
- runtime.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go