Versions in this module Expand all Collapse all v0 v0.5.2 Oct 27, 2021 v0.5.1 Oct 17, 2021 v0.5.0 Oct 15, 2021 v0.4.8 Sep 28, 2021 v0.4.7 Sep 23, 2021 v0.4.6 Sep 23, 2021 v0.4.5 Sep 23, 2021 v0.4.4 Sep 17, 2021 v0.4.3 Sep 17, 2021 v0.4.2 Sep 16, 2021 v0.4.1 Sep 11, 2021 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeCompartment + const TypeFridge + const TypeItem + 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 func(*sql.Selector) string + func As(fn AggregateFunc, end string) AggregateFunc + func Count() AggregateFunc + func Max(field string) AggregateFunc + func Mean(field string) AggregateFunc + func Min(field string) AggregateFunc + func Sum(field string) AggregateFunc + type Client struct + Compartment *CompartmentClient + Fridge *FridgeClient + Item *ItemClient + Schema *migrate.Schema + func FromContext(ctx context.Context) *Client + func NewClient(opts ...Option) *Client + func Open(driverName, dataSourceName string, options ...Option) (*Client, error) + 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) Tx(ctx context.Context) (*Tx, error) + func (c *Client) Use(hooks ...Hook) + type CommitFunc func(context.Context, *Tx) error + func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error + type CommitHook func(Committer) Committer + type Committer interface + Commit func(context.Context, *Tx) error + type Compartment struct + Edges CompartmentEdges + ID int + Name string + func (c *Compartment) QueryContents() *ItemQuery + func (c *Compartment) QueryFridge() *FridgeQuery + func (c *Compartment) String() string + func (c *Compartment) Unwrap() *Compartment + func (c *Compartment) Update() *CompartmentUpdateOne + type CompartmentClient struct + func NewCompartmentClient(c config) *CompartmentClient + func (c *CompartmentClient) Create() *CompartmentCreate + func (c *CompartmentClient) CreateBulk(builders ...*CompartmentCreate) *CompartmentCreateBulk + func (c *CompartmentClient) Delete() *CompartmentDelete + func (c *CompartmentClient) DeleteOne(co *Compartment) *CompartmentDeleteOne + func (c *CompartmentClient) DeleteOneID(id int) *CompartmentDeleteOne + func (c *CompartmentClient) Get(ctx context.Context, id int) (*Compartment, error) + func (c *CompartmentClient) GetX(ctx context.Context, id int) *Compartment + func (c *CompartmentClient) Hooks() []Hook + func (c *CompartmentClient) Query() *CompartmentQuery + func (c *CompartmentClient) QueryContents(co *Compartment) *ItemQuery + func (c *CompartmentClient) QueryFridge(co *Compartment) *FridgeQuery + func (c *CompartmentClient) Update() *CompartmentUpdate + func (c *CompartmentClient) UpdateOne(co *Compartment) *CompartmentUpdateOne + func (c *CompartmentClient) UpdateOneID(id int) *CompartmentUpdateOne + func (c *CompartmentClient) Use(hooks ...Hook) + type CompartmentCreate struct + func (cc *CompartmentCreate) AddContentIDs(ids ...int) *CompartmentCreate + func (cc *CompartmentCreate) AddContents(i ...*Item) *CompartmentCreate + func (cc *CompartmentCreate) Exec(ctx context.Context) error + func (cc *CompartmentCreate) ExecX(ctx context.Context) + func (cc *CompartmentCreate) Mutation() *CompartmentMutation + func (cc *CompartmentCreate) Save(ctx context.Context) (*Compartment, error) + func (cc *CompartmentCreate) SaveX(ctx context.Context) *Compartment + func (cc *CompartmentCreate) SetFridge(f *Fridge) *CompartmentCreate + func (cc *CompartmentCreate) SetFridgeID(id int) *CompartmentCreate + func (cc *CompartmentCreate) SetName(s string) *CompartmentCreate + func (cc *CompartmentCreate) SetNillableFridgeID(id *int) *CompartmentCreate + type CompartmentCreateBulk struct + func (ccb *CompartmentCreateBulk) Exec(ctx context.Context) error + func (ccb *CompartmentCreateBulk) ExecX(ctx context.Context) + func (ccb *CompartmentCreateBulk) Save(ctx context.Context) ([]*Compartment, error) + func (ccb *CompartmentCreateBulk) SaveX(ctx context.Context) []*Compartment + type CompartmentDelete struct + func (cd *CompartmentDelete) Exec(ctx context.Context) (int, error) + func (cd *CompartmentDelete) ExecX(ctx context.Context) int + func (cd *CompartmentDelete) Where(ps ...predicate.Compartment) *CompartmentDelete + type CompartmentDeleteOne struct + func (cdo *CompartmentDeleteOne) Exec(ctx context.Context) error + func (cdo *CompartmentDeleteOne) ExecX(ctx context.Context) + type CompartmentEdges struct + Contents []*Item + Fridge *Fridge + func (e CompartmentEdges) ContentsOrErr() ([]*Item, error) + func (e CompartmentEdges) FridgeOrErr() (*Fridge, error) + type CompartmentGroupBy struct + func (cgb *CompartmentGroupBy) Aggregate(fns ...AggregateFunc) *CompartmentGroupBy + func (cgb *CompartmentGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (cgb *CompartmentGroupBy) BoolX(ctx context.Context) bool + func (cgb *CompartmentGroupBy) Bools(ctx context.Context) ([]bool, error) + func (cgb *CompartmentGroupBy) BoolsX(ctx context.Context) []bool + func (cgb *CompartmentGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (cgb *CompartmentGroupBy) Float64X(ctx context.Context) float64 + func (cgb *CompartmentGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (cgb *CompartmentGroupBy) Float64sX(ctx context.Context) []float64 + func (cgb *CompartmentGroupBy) Int(ctx context.Context) (_ int, err error) + func (cgb *CompartmentGroupBy) IntX(ctx context.Context) int + func (cgb *CompartmentGroupBy) Ints(ctx context.Context) ([]int, error) + func (cgb *CompartmentGroupBy) IntsX(ctx context.Context) []int + func (cgb *CompartmentGroupBy) Scan(ctx context.Context, v interface{}) error + func (cgb *CompartmentGroupBy) ScanX(ctx context.Context, v interface{}) + func (cgb *CompartmentGroupBy) String(ctx context.Context) (_ string, err error) + func (cgb *CompartmentGroupBy) StringX(ctx context.Context) string + func (cgb *CompartmentGroupBy) Strings(ctx context.Context) ([]string, error) + func (cgb *CompartmentGroupBy) StringsX(ctx context.Context) []string + type CompartmentMutation struct + func (m *CompartmentMutation) AddContentIDs(ids ...int) + func (m *CompartmentMutation) AddField(name string, value ent.Value) error + func (m *CompartmentMutation) AddedEdges() []string + func (m *CompartmentMutation) AddedField(name string) (ent.Value, bool) + func (m *CompartmentMutation) AddedFields() []string + func (m *CompartmentMutation) AddedIDs(name string) []ent.Value + func (m *CompartmentMutation) ClearContents() + func (m *CompartmentMutation) ClearEdge(name string) error + func (m *CompartmentMutation) ClearField(name string) error + func (m *CompartmentMutation) ClearFridge() + func (m *CompartmentMutation) ClearedEdges() []string + func (m *CompartmentMutation) ClearedFields() []string + func (m *CompartmentMutation) ContentsCleared() bool + func (m *CompartmentMutation) ContentsIDs() (ids []int) + func (m *CompartmentMutation) EdgeCleared(name string) bool + func (m *CompartmentMutation) Field(name string) (ent.Value, bool) + func (m *CompartmentMutation) FieldCleared(name string) bool + func (m *CompartmentMutation) Fields() []string + func (m *CompartmentMutation) FridgeCleared() bool + func (m *CompartmentMutation) FridgeID() (id int, exists bool) + func (m *CompartmentMutation) FridgeIDs() (ids []int) + func (m *CompartmentMutation) ID() (id int, exists bool) + func (m *CompartmentMutation) Name() (r string, exists bool) + func (m *CompartmentMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *CompartmentMutation) OldName(ctx context.Context) (v string, err error) + func (m *CompartmentMutation) Op() Op + func (m *CompartmentMutation) RemoveContentIDs(ids ...int) + func (m *CompartmentMutation) RemovedContentsIDs() (ids []int) + func (m *CompartmentMutation) RemovedEdges() []string + func (m *CompartmentMutation) RemovedIDs(name string) []ent.Value + func (m *CompartmentMutation) ResetContents() + func (m *CompartmentMutation) ResetEdge(name string) error + func (m *CompartmentMutation) ResetField(name string) error + func (m *CompartmentMutation) ResetFridge() + func (m *CompartmentMutation) ResetName() + func (m *CompartmentMutation) SetField(name string, value ent.Value) error + func (m *CompartmentMutation) SetFridgeID(id int) + func (m *CompartmentMutation) SetName(s string) + func (m *CompartmentMutation) Type() string + func (m *CompartmentMutation) Where(ps ...predicate.Compartment) + func (m CompartmentMutation) Client() *Client + func (m CompartmentMutation) Tx() (*Tx, error) + type CompartmentQuery struct + func (cq *CompartmentQuery) All(ctx context.Context) ([]*Compartment, error) + func (cq *CompartmentQuery) AllX(ctx context.Context) []*Compartment + func (cq *CompartmentQuery) Clone() *CompartmentQuery + func (cq *CompartmentQuery) Count(ctx context.Context) (int, error) + func (cq *CompartmentQuery) CountX(ctx context.Context) int + func (cq *CompartmentQuery) Exist(ctx context.Context) (bool, error) + func (cq *CompartmentQuery) ExistX(ctx context.Context) bool + func (cq *CompartmentQuery) First(ctx context.Context) (*Compartment, error) + func (cq *CompartmentQuery) FirstID(ctx context.Context) (id int, err error) + func (cq *CompartmentQuery) FirstIDX(ctx context.Context) int + func (cq *CompartmentQuery) FirstX(ctx context.Context) *Compartment + func (cq *CompartmentQuery) GroupBy(field string, fields ...string) *CompartmentGroupBy + func (cq *CompartmentQuery) IDs(ctx context.Context) ([]int, error) + func (cq *CompartmentQuery) IDsX(ctx context.Context) []int + func (cq *CompartmentQuery) Limit(limit int) *CompartmentQuery + func (cq *CompartmentQuery) Offset(offset int) *CompartmentQuery + func (cq *CompartmentQuery) Only(ctx context.Context) (*Compartment, error) + func (cq *CompartmentQuery) OnlyID(ctx context.Context) (id int, err error) + func (cq *CompartmentQuery) OnlyIDX(ctx context.Context) int + func (cq *CompartmentQuery) OnlyX(ctx context.Context) *Compartment + func (cq *CompartmentQuery) Order(o ...OrderFunc) *CompartmentQuery + func (cq *CompartmentQuery) QueryContents() *ItemQuery + func (cq *CompartmentQuery) QueryFridge() *FridgeQuery + func (cq *CompartmentQuery) Select(fields ...string) *CompartmentSelect + func (cq *CompartmentQuery) Unique(unique bool) *CompartmentQuery + func (cq *CompartmentQuery) Where(ps ...predicate.Compartment) *CompartmentQuery + func (cq *CompartmentQuery) WithContents(opts ...func(*ItemQuery)) *CompartmentQuery + func (cq *CompartmentQuery) WithFridge(opts ...func(*FridgeQuery)) *CompartmentQuery + type CompartmentSelect struct + func (cs *CompartmentSelect) Bool(ctx context.Context) (_ bool, err error) + func (cs *CompartmentSelect) BoolX(ctx context.Context) bool + func (cs *CompartmentSelect) Bools(ctx context.Context) ([]bool, error) + func (cs *CompartmentSelect) BoolsX(ctx context.Context) []bool + func (cs *CompartmentSelect) Float64(ctx context.Context) (_ float64, err error) + func (cs *CompartmentSelect) Float64X(ctx context.Context) float64 + func (cs *CompartmentSelect) Float64s(ctx context.Context) ([]float64, error) + func (cs *CompartmentSelect) Float64sX(ctx context.Context) []float64 + func (cs *CompartmentSelect) Int(ctx context.Context) (_ int, err error) + func (cs *CompartmentSelect) IntX(ctx context.Context) int + func (cs *CompartmentSelect) Ints(ctx context.Context) ([]int, error) + func (cs *CompartmentSelect) IntsX(ctx context.Context) []int + func (cs *CompartmentSelect) Scan(ctx context.Context, v interface{}) error + func (cs *CompartmentSelect) ScanX(ctx context.Context, v interface{}) + func (cs *CompartmentSelect) String(ctx context.Context) (_ string, err error) + func (cs *CompartmentSelect) StringX(ctx context.Context) string + func (cs *CompartmentSelect) Strings(ctx context.Context) ([]string, error) + func (cs *CompartmentSelect) StringsX(ctx context.Context) []string + type CompartmentUpdate struct + func (cu *CompartmentUpdate) AddContentIDs(ids ...int) *CompartmentUpdate + func (cu *CompartmentUpdate) AddContents(i ...*Item) *CompartmentUpdate + func (cu *CompartmentUpdate) ClearContents() *CompartmentUpdate + func (cu *CompartmentUpdate) ClearFridge() *CompartmentUpdate + func (cu *CompartmentUpdate) Exec(ctx context.Context) error + func (cu *CompartmentUpdate) ExecX(ctx context.Context) + func (cu *CompartmentUpdate) Mutation() *CompartmentMutation + func (cu *CompartmentUpdate) RemoveContentIDs(ids ...int) *CompartmentUpdate + func (cu *CompartmentUpdate) RemoveContents(i ...*Item) *CompartmentUpdate + func (cu *CompartmentUpdate) Save(ctx context.Context) (int, error) + func (cu *CompartmentUpdate) SaveX(ctx context.Context) int + func (cu *CompartmentUpdate) SetFridge(f *Fridge) *CompartmentUpdate + func (cu *CompartmentUpdate) SetFridgeID(id int) *CompartmentUpdate + func (cu *CompartmentUpdate) SetName(s string) *CompartmentUpdate + func (cu *CompartmentUpdate) SetNillableFridgeID(id *int) *CompartmentUpdate + func (cu *CompartmentUpdate) Where(ps ...predicate.Compartment) *CompartmentUpdate + type CompartmentUpdateOne struct + func (cuo *CompartmentUpdateOne) AddContentIDs(ids ...int) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) AddContents(i ...*Item) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) ClearContents() *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) ClearFridge() *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) Exec(ctx context.Context) error + func (cuo *CompartmentUpdateOne) ExecX(ctx context.Context) + func (cuo *CompartmentUpdateOne) Mutation() *CompartmentMutation + func (cuo *CompartmentUpdateOne) RemoveContentIDs(ids ...int) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) RemoveContents(i ...*Item) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) Save(ctx context.Context) (*Compartment, error) + func (cuo *CompartmentUpdateOne) SaveX(ctx context.Context) *Compartment + func (cuo *CompartmentUpdateOne) Select(field string, fields ...string) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) SetFridge(f *Fridge) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) SetFridgeID(id int) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) SetName(s string) *CompartmentUpdateOne + func (cuo *CompartmentUpdateOne) SetNillableFridgeID(id *int) *CompartmentUpdateOne + type Compartments []*Compartment + type ConstraintError struct + func (e *ConstraintError) Unwrap() error + func (e ConstraintError) Error() string + type Fridge struct + Edges FridgeEdges + ID int + Title string + func (f *Fridge) QueryCompartments() *CompartmentQuery + func (f *Fridge) String() string + func (f *Fridge) Unwrap() *Fridge + func (f *Fridge) Update() *FridgeUpdateOne + type FridgeClient struct + func NewFridgeClient(c config) *FridgeClient + func (c *FridgeClient) Create() *FridgeCreate + func (c *FridgeClient) CreateBulk(builders ...*FridgeCreate) *FridgeCreateBulk + func (c *FridgeClient) Delete() *FridgeDelete + func (c *FridgeClient) DeleteOne(f *Fridge) *FridgeDeleteOne + func (c *FridgeClient) DeleteOneID(id int) *FridgeDeleteOne + func (c *FridgeClient) Get(ctx context.Context, id int) (*Fridge, error) + func (c *FridgeClient) GetX(ctx context.Context, id int) *Fridge + func (c *FridgeClient) Hooks() []Hook + func (c *FridgeClient) Query() *FridgeQuery + func (c *FridgeClient) QueryCompartments(f *Fridge) *CompartmentQuery + func (c *FridgeClient) Update() *FridgeUpdate + func (c *FridgeClient) UpdateOne(f *Fridge) *FridgeUpdateOne + func (c *FridgeClient) UpdateOneID(id int) *FridgeUpdateOne + func (c *FridgeClient) Use(hooks ...Hook) + type FridgeCreate struct + func (fc *FridgeCreate) AddCompartmentIDs(ids ...int) *FridgeCreate + func (fc *FridgeCreate) AddCompartments(c ...*Compartment) *FridgeCreate + func (fc *FridgeCreate) Exec(ctx context.Context) error + func (fc *FridgeCreate) ExecX(ctx context.Context) + func (fc *FridgeCreate) Mutation() *FridgeMutation + func (fc *FridgeCreate) Save(ctx context.Context) (*Fridge, error) + func (fc *FridgeCreate) SaveX(ctx context.Context) *Fridge + func (fc *FridgeCreate) SetTitle(s string) *FridgeCreate + type FridgeCreateBulk struct + func (fcb *FridgeCreateBulk) Exec(ctx context.Context) error + func (fcb *FridgeCreateBulk) ExecX(ctx context.Context) + func (fcb *FridgeCreateBulk) Save(ctx context.Context) ([]*Fridge, error) + func (fcb *FridgeCreateBulk) SaveX(ctx context.Context) []*Fridge + type FridgeDelete struct + func (fd *FridgeDelete) Exec(ctx context.Context) (int, error) + func (fd *FridgeDelete) ExecX(ctx context.Context) int + func (fd *FridgeDelete) Where(ps ...predicate.Fridge) *FridgeDelete + type FridgeDeleteOne struct + func (fdo *FridgeDeleteOne) Exec(ctx context.Context) error + func (fdo *FridgeDeleteOne) ExecX(ctx context.Context) + type FridgeEdges struct + Compartments []*Compartment + func (e FridgeEdges) CompartmentsOrErr() ([]*Compartment, error) + type FridgeGroupBy struct + func (fgb *FridgeGroupBy) Aggregate(fns ...AggregateFunc) *FridgeGroupBy + func (fgb *FridgeGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (fgb *FridgeGroupBy) BoolX(ctx context.Context) bool + func (fgb *FridgeGroupBy) Bools(ctx context.Context) ([]bool, error) + func (fgb *FridgeGroupBy) BoolsX(ctx context.Context) []bool + func (fgb *FridgeGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (fgb *FridgeGroupBy) Float64X(ctx context.Context) float64 + func (fgb *FridgeGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (fgb *FridgeGroupBy) Float64sX(ctx context.Context) []float64 + func (fgb *FridgeGroupBy) Int(ctx context.Context) (_ int, err error) + func (fgb *FridgeGroupBy) IntX(ctx context.Context) int + func (fgb *FridgeGroupBy) Ints(ctx context.Context) ([]int, error) + func (fgb *FridgeGroupBy) IntsX(ctx context.Context) []int + func (fgb *FridgeGroupBy) Scan(ctx context.Context, v interface{}) error + func (fgb *FridgeGroupBy) ScanX(ctx context.Context, v interface{}) + func (fgb *FridgeGroupBy) String(ctx context.Context) (_ string, err error) + func (fgb *FridgeGroupBy) StringX(ctx context.Context) string + func (fgb *FridgeGroupBy) Strings(ctx context.Context) ([]string, error) + func (fgb *FridgeGroupBy) StringsX(ctx context.Context) []string + type FridgeMutation struct + func (m *FridgeMutation) AddCompartmentIDs(ids ...int) + func (m *FridgeMutation) AddField(name string, value ent.Value) error + func (m *FridgeMutation) AddedEdges() []string + func (m *FridgeMutation) AddedField(name string) (ent.Value, bool) + func (m *FridgeMutation) AddedFields() []string + func (m *FridgeMutation) AddedIDs(name string) []ent.Value + func (m *FridgeMutation) ClearCompartments() + func (m *FridgeMutation) ClearEdge(name string) error + func (m *FridgeMutation) ClearField(name string) error + func (m *FridgeMutation) ClearedEdges() []string + func (m *FridgeMutation) ClearedFields() []string + func (m *FridgeMutation) CompartmentsCleared() bool + func (m *FridgeMutation) CompartmentsIDs() (ids []int) + func (m *FridgeMutation) EdgeCleared(name string) bool + func (m *FridgeMutation) Field(name string) (ent.Value, bool) + func (m *FridgeMutation) FieldCleared(name string) bool + func (m *FridgeMutation) Fields() []string + func (m *FridgeMutation) ID() (id int, exists bool) + func (m *FridgeMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *FridgeMutation) OldTitle(ctx context.Context) (v string, err error) + func (m *FridgeMutation) Op() Op + func (m *FridgeMutation) RemoveCompartmentIDs(ids ...int) + func (m *FridgeMutation) RemovedCompartmentsIDs() (ids []int) + func (m *FridgeMutation) RemovedEdges() []string + func (m *FridgeMutation) RemovedIDs(name string) []ent.Value + func (m *FridgeMutation) ResetCompartments() + func (m *FridgeMutation) ResetEdge(name string) error + func (m *FridgeMutation) ResetField(name string) error + func (m *FridgeMutation) ResetTitle() + func (m *FridgeMutation) SetField(name string, value ent.Value) error + func (m *FridgeMutation) SetTitle(s string) + func (m *FridgeMutation) Title() (r string, exists bool) + func (m *FridgeMutation) Type() string + func (m *FridgeMutation) Where(ps ...predicate.Fridge) + func (m FridgeMutation) Client() *Client + func (m FridgeMutation) Tx() (*Tx, error) + type FridgeQuery struct + func (fq *FridgeQuery) All(ctx context.Context) ([]*Fridge, error) + func (fq *FridgeQuery) AllX(ctx context.Context) []*Fridge + func (fq *FridgeQuery) Clone() *FridgeQuery + func (fq *FridgeQuery) Count(ctx context.Context) (int, error) + func (fq *FridgeQuery) CountX(ctx context.Context) int + func (fq *FridgeQuery) Exist(ctx context.Context) (bool, error) + func (fq *FridgeQuery) ExistX(ctx context.Context) bool + func (fq *FridgeQuery) First(ctx context.Context) (*Fridge, error) + func (fq *FridgeQuery) FirstID(ctx context.Context) (id int, err error) + func (fq *FridgeQuery) FirstIDX(ctx context.Context) int + func (fq *FridgeQuery) FirstX(ctx context.Context) *Fridge + func (fq *FridgeQuery) GroupBy(field string, fields ...string) *FridgeGroupBy + func (fq *FridgeQuery) IDs(ctx context.Context) ([]int, error) + func (fq *FridgeQuery) IDsX(ctx context.Context) []int + func (fq *FridgeQuery) Limit(limit int) *FridgeQuery + func (fq *FridgeQuery) Offset(offset int) *FridgeQuery + func (fq *FridgeQuery) Only(ctx context.Context) (*Fridge, error) + func (fq *FridgeQuery) OnlyID(ctx context.Context) (id int, err error) + func (fq *FridgeQuery) OnlyIDX(ctx context.Context) int + func (fq *FridgeQuery) OnlyX(ctx context.Context) *Fridge + func (fq *FridgeQuery) Order(o ...OrderFunc) *FridgeQuery + func (fq *FridgeQuery) QueryCompartments() *CompartmentQuery + func (fq *FridgeQuery) Select(fields ...string) *FridgeSelect + func (fq *FridgeQuery) Unique(unique bool) *FridgeQuery + func (fq *FridgeQuery) Where(ps ...predicate.Fridge) *FridgeQuery + func (fq *FridgeQuery) WithCompartments(opts ...func(*CompartmentQuery)) *FridgeQuery + type FridgeSelect struct + func (fs *FridgeSelect) Bool(ctx context.Context) (_ bool, err error) + func (fs *FridgeSelect) BoolX(ctx context.Context) bool + func (fs *FridgeSelect) Bools(ctx context.Context) ([]bool, error) + func (fs *FridgeSelect) BoolsX(ctx context.Context) []bool + func (fs *FridgeSelect) Float64(ctx context.Context) (_ float64, err error) + func (fs *FridgeSelect) Float64X(ctx context.Context) float64 + func (fs *FridgeSelect) Float64s(ctx context.Context) ([]float64, error) + func (fs *FridgeSelect) Float64sX(ctx context.Context) []float64 + func (fs *FridgeSelect) Int(ctx context.Context) (_ int, err error) + func (fs *FridgeSelect) IntX(ctx context.Context) int + func (fs *FridgeSelect) Ints(ctx context.Context) ([]int, error) + func (fs *FridgeSelect) IntsX(ctx context.Context) []int + func (fs *FridgeSelect) Scan(ctx context.Context, v interface{}) error + func (fs *FridgeSelect) ScanX(ctx context.Context, v interface{}) + func (fs *FridgeSelect) String(ctx context.Context) (_ string, err error) + func (fs *FridgeSelect) StringX(ctx context.Context) string + func (fs *FridgeSelect) Strings(ctx context.Context) ([]string, error) + func (fs *FridgeSelect) StringsX(ctx context.Context) []string + type FridgeUpdate struct + func (fu *FridgeUpdate) AddCompartmentIDs(ids ...int) *FridgeUpdate + func (fu *FridgeUpdate) AddCompartments(c ...*Compartment) *FridgeUpdate + func (fu *FridgeUpdate) ClearCompartments() *FridgeUpdate + func (fu *FridgeUpdate) Exec(ctx context.Context) error + func (fu *FridgeUpdate) ExecX(ctx context.Context) + func (fu *FridgeUpdate) Mutation() *FridgeMutation + func (fu *FridgeUpdate) RemoveCompartmentIDs(ids ...int) *FridgeUpdate + func (fu *FridgeUpdate) RemoveCompartments(c ...*Compartment) *FridgeUpdate + func (fu *FridgeUpdate) Save(ctx context.Context) (int, error) + func (fu *FridgeUpdate) SaveX(ctx context.Context) int + func (fu *FridgeUpdate) SetTitle(s string) *FridgeUpdate + func (fu *FridgeUpdate) Where(ps ...predicate.Fridge) *FridgeUpdate + type FridgeUpdateOne struct + func (fuo *FridgeUpdateOne) AddCompartmentIDs(ids ...int) *FridgeUpdateOne + func (fuo *FridgeUpdateOne) AddCompartments(c ...*Compartment) *FridgeUpdateOne + func (fuo *FridgeUpdateOne) ClearCompartments() *FridgeUpdateOne + func (fuo *FridgeUpdateOne) Exec(ctx context.Context) error + func (fuo *FridgeUpdateOne) ExecX(ctx context.Context) + func (fuo *FridgeUpdateOne) Mutation() *FridgeMutation + func (fuo *FridgeUpdateOne) RemoveCompartmentIDs(ids ...int) *FridgeUpdateOne + func (fuo *FridgeUpdateOne) RemoveCompartments(c ...*Compartment) *FridgeUpdateOne + func (fuo *FridgeUpdateOne) Save(ctx context.Context) (*Fridge, error) + func (fuo *FridgeUpdateOne) SaveX(ctx context.Context) *Fridge + func (fuo *FridgeUpdateOne) Select(field string, fields ...string) *FridgeUpdateOne + func (fuo *FridgeUpdateOne) SetTitle(s string) *FridgeUpdateOne + type Fridges []*Fridge + type Hook = ent.Hook + type Item struct + Edges ItemEdges + ID int + Name string + func (i *Item) QueryCompartment() *CompartmentQuery + func (i *Item) String() string + func (i *Item) Unwrap() *Item + func (i *Item) Update() *ItemUpdateOne + type ItemClient struct + func NewItemClient(c config) *ItemClient + func (c *ItemClient) Create() *ItemCreate + func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk + func (c *ItemClient) Delete() *ItemDelete + func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne + func (c *ItemClient) DeleteOneID(id int) *ItemDeleteOne + func (c *ItemClient) Get(ctx context.Context, id int) (*Item, error) + func (c *ItemClient) GetX(ctx context.Context, id int) *Item + func (c *ItemClient) Hooks() []Hook + func (c *ItemClient) Query() *ItemQuery + func (c *ItemClient) QueryCompartment(i *Item) *CompartmentQuery + func (c *ItemClient) Update() *ItemUpdate + func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne + func (c *ItemClient) UpdateOneID(id int) *ItemUpdateOne + func (c *ItemClient) Use(hooks ...Hook) + type ItemCreate struct + func (ic *ItemCreate) Exec(ctx context.Context) error + func (ic *ItemCreate) ExecX(ctx context.Context) + func (ic *ItemCreate) Mutation() *ItemMutation + func (ic *ItemCreate) Save(ctx context.Context) (*Item, error) + func (ic *ItemCreate) SaveX(ctx context.Context) *Item + func (ic *ItemCreate) SetCompartment(c *Compartment) *ItemCreate + func (ic *ItemCreate) SetCompartmentID(id int) *ItemCreate + func (ic *ItemCreate) SetName(s string) *ItemCreate + func (ic *ItemCreate) SetNillableCompartmentID(id *int) *ItemCreate + type ItemCreateBulk struct + func (icb *ItemCreateBulk) Exec(ctx context.Context) error + func (icb *ItemCreateBulk) ExecX(ctx context.Context) + func (icb *ItemCreateBulk) Save(ctx context.Context) ([]*Item, error) + func (icb *ItemCreateBulk) SaveX(ctx context.Context) []*Item + type ItemDelete struct + func (id *ItemDelete) Exec(ctx context.Context) (int, error) + func (id *ItemDelete) ExecX(ctx context.Context) int + func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete + type ItemDeleteOne struct + func (ido *ItemDeleteOne) Exec(ctx context.Context) error + func (ido *ItemDeleteOne) ExecX(ctx context.Context) + type ItemEdges struct + Compartment *Compartment + func (e ItemEdges) CompartmentOrErr() (*Compartment, error) + type ItemGroupBy struct + func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy + func (igb *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (igb *ItemGroupBy) BoolX(ctx context.Context) bool + func (igb *ItemGroupBy) Bools(ctx context.Context) ([]bool, error) + func (igb *ItemGroupBy) BoolsX(ctx context.Context) []bool + func (igb *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (igb *ItemGroupBy) Float64X(ctx context.Context) float64 + func (igb *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (igb *ItemGroupBy) Float64sX(ctx context.Context) []float64 + func (igb *ItemGroupBy) Int(ctx context.Context) (_ int, err error) + func (igb *ItemGroupBy) IntX(ctx context.Context) int + func (igb *ItemGroupBy) Ints(ctx context.Context) ([]int, error) + func (igb *ItemGroupBy) IntsX(ctx context.Context) []int + func (igb *ItemGroupBy) Scan(ctx context.Context, v interface{}) error + func (igb *ItemGroupBy) ScanX(ctx context.Context, v interface{}) + func (igb *ItemGroupBy) String(ctx context.Context) (_ string, err error) + func (igb *ItemGroupBy) StringX(ctx context.Context) string + func (igb *ItemGroupBy) Strings(ctx context.Context) ([]string, error) + func (igb *ItemGroupBy) StringsX(ctx context.Context) []string + type ItemMutation struct + func (m *ItemMutation) AddField(name string, value ent.Value) error + func (m *ItemMutation) AddedEdges() []string + func (m *ItemMutation) AddedField(name string) (ent.Value, bool) + func (m *ItemMutation) AddedFields() []string + func (m *ItemMutation) AddedIDs(name string) []ent.Value + func (m *ItemMutation) ClearCompartment() + func (m *ItemMutation) ClearEdge(name string) error + func (m *ItemMutation) ClearField(name string) error + func (m *ItemMutation) ClearedEdges() []string + func (m *ItemMutation) ClearedFields() []string + func (m *ItemMutation) CompartmentCleared() bool + func (m *ItemMutation) CompartmentID() (id int, exists bool) + func (m *ItemMutation) CompartmentIDs() (ids []int) + func (m *ItemMutation) EdgeCleared(name string) bool + func (m *ItemMutation) Field(name string) (ent.Value, bool) + func (m *ItemMutation) FieldCleared(name string) bool + func (m *ItemMutation) Fields() []string + func (m *ItemMutation) ID() (id int, exists bool) + func (m *ItemMutation) Name() (r string, exists bool) + func (m *ItemMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *ItemMutation) OldName(ctx context.Context) (v string, err error) + func (m *ItemMutation) Op() Op + func (m *ItemMutation) RemovedEdges() []string + func (m *ItemMutation) RemovedIDs(name string) []ent.Value + func (m *ItemMutation) ResetCompartment() + func (m *ItemMutation) ResetEdge(name string) error + func (m *ItemMutation) ResetField(name string) error + func (m *ItemMutation) ResetName() + func (m *ItemMutation) SetCompartmentID(id int) + func (m *ItemMutation) SetField(name string, value ent.Value) error + func (m *ItemMutation) SetName(s string) + func (m *ItemMutation) Type() string + func (m *ItemMutation) Where(ps ...predicate.Item) + func (m ItemMutation) Client() *Client + func (m ItemMutation) Tx() (*Tx, error) + type ItemQuery struct + func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error) + func (iq *ItemQuery) AllX(ctx context.Context) []*Item + func (iq *ItemQuery) Clone() *ItemQuery + func (iq *ItemQuery) Count(ctx context.Context) (int, error) + func (iq *ItemQuery) CountX(ctx context.Context) int + func (iq *ItemQuery) Exist(ctx context.Context) (bool, error) + func (iq *ItemQuery) ExistX(ctx context.Context) bool + func (iq *ItemQuery) First(ctx context.Context) (*Item, error) + func (iq *ItemQuery) FirstID(ctx context.Context) (id int, err error) + func (iq *ItemQuery) FirstIDX(ctx context.Context) int + func (iq *ItemQuery) FirstX(ctx context.Context) *Item + func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy + func (iq *ItemQuery) IDs(ctx context.Context) ([]int, error) + func (iq *ItemQuery) IDsX(ctx context.Context) []int + func (iq *ItemQuery) Limit(limit int) *ItemQuery + func (iq *ItemQuery) Offset(offset int) *ItemQuery + func (iq *ItemQuery) Only(ctx context.Context) (*Item, error) + func (iq *ItemQuery) OnlyID(ctx context.Context) (id int, err error) + func (iq *ItemQuery) OnlyIDX(ctx context.Context) int + func (iq *ItemQuery) OnlyX(ctx context.Context) *Item + func (iq *ItemQuery) Order(o ...OrderFunc) *ItemQuery + func (iq *ItemQuery) QueryCompartment() *CompartmentQuery + func (iq *ItemQuery) Select(fields ...string) *ItemSelect + func (iq *ItemQuery) Unique(unique bool) *ItemQuery + func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery + func (iq *ItemQuery) WithCompartment(opts ...func(*CompartmentQuery)) *ItemQuery + type ItemSelect struct + func (is *ItemSelect) Bool(ctx context.Context) (_ bool, err error) + func (is *ItemSelect) BoolX(ctx context.Context) bool + func (is *ItemSelect) Bools(ctx context.Context) ([]bool, error) + func (is *ItemSelect) BoolsX(ctx context.Context) []bool + func (is *ItemSelect) Float64(ctx context.Context) (_ float64, err error) + func (is *ItemSelect) Float64X(ctx context.Context) float64 + func (is *ItemSelect) Float64s(ctx context.Context) ([]float64, error) + func (is *ItemSelect) Float64sX(ctx context.Context) []float64 + func (is *ItemSelect) Int(ctx context.Context) (_ int, err error) + func (is *ItemSelect) IntX(ctx context.Context) int + func (is *ItemSelect) Ints(ctx context.Context) ([]int, error) + func (is *ItemSelect) IntsX(ctx context.Context) []int + func (is *ItemSelect) Scan(ctx context.Context, v interface{}) error + func (is *ItemSelect) ScanX(ctx context.Context, v interface{}) + func (is *ItemSelect) String(ctx context.Context) (_ string, err error) + func (is *ItemSelect) StringX(ctx context.Context) string + func (is *ItemSelect) Strings(ctx context.Context) ([]string, error) + func (is *ItemSelect) StringsX(ctx context.Context) []string + type ItemUpdate struct + func (iu *ItemUpdate) ClearCompartment() *ItemUpdate + func (iu *ItemUpdate) Exec(ctx context.Context) error + func (iu *ItemUpdate) ExecX(ctx context.Context) + func (iu *ItemUpdate) Mutation() *ItemMutation + func (iu *ItemUpdate) Save(ctx context.Context) (int, error) + func (iu *ItemUpdate) SaveX(ctx context.Context) int + func (iu *ItemUpdate) SetCompartment(c *Compartment) *ItemUpdate + func (iu *ItemUpdate) SetCompartmentID(id int) *ItemUpdate + func (iu *ItemUpdate) SetName(s string) *ItemUpdate + func (iu *ItemUpdate) SetNillableCompartmentID(id *int) *ItemUpdate + func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate + type ItemUpdateOne struct + func (iuo *ItemUpdateOne) ClearCompartment() *ItemUpdateOne + func (iuo *ItemUpdateOne) Exec(ctx context.Context) error + func (iuo *ItemUpdateOne) ExecX(ctx context.Context) + func (iuo *ItemUpdateOne) Mutation() *ItemMutation + func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error) + func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item + func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne + func (iuo *ItemUpdateOne) SetCompartment(c *Compartment) *ItemUpdateOne + func (iuo *ItemUpdateOne) SetCompartmentID(id int) *ItemUpdateOne + func (iuo *ItemUpdateOne) SetName(s string) *ItemUpdateOne + func (iuo *ItemUpdateOne) SetNillableCompartmentID(id *int) *ItemUpdateOne + type Items []*Item + type MutateFunc = ent.MutateFunc + type Mutation = ent.Mutation + type Mutator = ent.Mutator + type NotFoundError struct + func (e *NotFoundError) Error() string + type NotLoadedError struct + func (e *NotLoadedError) Error() string + type NotSingularError struct + func (e *NotSingularError) Error() string + type Op = ent.Op + type Option func(*config) + func Debug() Option + func Driver(driver dialect.Driver) Option + func Log(fn func(...interface{})) Option + type OrderFunc func(*sql.Selector) + func Asc(fields ...string) OrderFunc + func Desc(fields ...string) OrderFunc + type Policy = ent.Policy + type Query = ent.Query + type RollbackFunc func(context.Context, *Tx) error + func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error + type RollbackHook func(Rollbacker) Rollbacker + type Rollbacker interface + Rollback func(context.Context, *Tx) error + type Tx struct + Compartment *CompartmentClient + Fridge *FridgeClient + Item *ItemClient + func TxFromContext(ctx context.Context) *Tx + func (tx *Tx) Client() *Client + func (tx *Tx) Commit() error + func (tx *Tx) OnCommit(f CommitHook) + func (tx *Tx) OnRollback(f RollbackHook) + func (tx *Tx) Rollback() error + type ValidationError struct + Name string + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error + type Value = ent.Value