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 AmazonList
- func (al *AmazonList) QueryAmazonOrders() *AmazonOrderQuery
- func (al *AmazonList) QueryAmazonShares() *AmazonShareQuery
- func (al *AmazonList) QueryOwner() *UserQuery
- func (al *AmazonList) String() string
- func (al *AmazonList) Unwrap() *AmazonList
- func (al *AmazonList) Update() *AmazonListUpdateOne
- func (al *AmazonList) Value(name string) (ent.Value, error)
- type AmazonListClient
- func (c *AmazonListClient) Create() *AmazonListCreate
- func (c *AmazonListClient) CreateBulk(builders ...*AmazonListCreate) *AmazonListCreateBulk
- func (c *AmazonListClient) Delete() *AmazonListDelete
- func (c *AmazonListClient) DeleteOne(al *AmazonList) *AmazonListDeleteOne
- func (c *AmazonListClient) DeleteOneID(id int) *AmazonListDeleteOne
- func (c *AmazonListClient) Get(ctx context.Context, id int) (*AmazonList, error)
- func (c *AmazonListClient) GetX(ctx context.Context, id int) *AmazonList
- func (c *AmazonListClient) Hooks() []Hook
- func (c *AmazonListClient) Intercept(interceptors ...Interceptor)
- func (c *AmazonListClient) Interceptors() []Interceptor
- func (c *AmazonListClient) Query() *AmazonListQuery
- func (c *AmazonListClient) QueryAmazonOrders(al *AmazonList) *AmazonOrderQuery
- func (c *AmazonListClient) QueryAmazonShares(al *AmazonList) *AmazonShareQuery
- func (c *AmazonListClient) QueryOwner(al *AmazonList) *UserQuery
- func (c *AmazonListClient) Update() *AmazonListUpdate
- func (c *AmazonListClient) UpdateOne(al *AmazonList) *AmazonListUpdateOne
- func (c *AmazonListClient) UpdateOneID(id int) *AmazonListUpdateOne
- func (c *AmazonListClient) Use(hooks ...Hook)
- type AmazonListCreate
- func (alc *AmazonListCreate) AddAmazonOrderIDs(ids ...int) *AmazonListCreate
- func (alc *AmazonListCreate) AddAmazonOrders(a ...*AmazonOrder) *AmazonListCreate
- func (alc *AmazonListCreate) AddAmazonShareIDs(ids ...int) *AmazonListCreate
- func (alc *AmazonListCreate) AddAmazonShares(a ...*AmazonShare) *AmazonListCreate
- func (alc *AmazonListCreate) AddOwner(u ...*User) *AmazonListCreate
- func (alc *AmazonListCreate) AddOwnerIDs(ids ...int) *AmazonListCreate
- func (alc *AmazonListCreate) Exec(ctx context.Context) error
- func (alc *AmazonListCreate) ExecX(ctx context.Context)
- func (alc *AmazonListCreate) Mutation() *AmazonListMutation
- func (alc *AmazonListCreate) Save(ctx context.Context) (*AmazonList, error)
- func (alc *AmazonListCreate) SaveX(ctx context.Context) *AmazonList
- func (alc *AmazonListCreate) SetCreatedAt(t time.Time) *AmazonListCreate
- func (alc *AmazonListCreate) SetNillableCreatedAt(t *time.Time) *AmazonListCreate
- type AmazonListCreateBulk
- type AmazonListDelete
- type AmazonListDeleteOne
- type AmazonListEdges
- type AmazonListGroupBy
- func (algb *AmazonListGroupBy) Aggregate(fns ...AggregateFunc) *AmazonListGroupBy
- func (s *AmazonListGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AmazonListGroupBy) BoolX(ctx context.Context) bool
- func (s *AmazonListGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AmazonListGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AmazonListGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AmazonListGroupBy) Float64X(ctx context.Context) float64
- func (s *AmazonListGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AmazonListGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AmazonListGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AmazonListGroupBy) IntX(ctx context.Context) int
- func (s *AmazonListGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AmazonListGroupBy) IntsX(ctx context.Context) []int
- func (algb *AmazonListGroupBy) Scan(ctx context.Context, v any) error
- func (s *AmazonListGroupBy) ScanX(ctx context.Context, v any)
- func (s *AmazonListGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AmazonListGroupBy) StringX(ctx context.Context) string
- func (s *AmazonListGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AmazonListGroupBy) StringsX(ctx context.Context) []string
- type AmazonListMutation
- func (m *AmazonListMutation) AddAmazonOrderIDs(ids ...int)
- func (m *AmazonListMutation) AddAmazonShareIDs(ids ...int)
- func (m *AmazonListMutation) AddField(name string, value ent.Value) error
- func (m *AmazonListMutation) AddOwnerIDs(ids ...int)
- func (m *AmazonListMutation) AddedEdges() []string
- func (m *AmazonListMutation) AddedField(name string) (ent.Value, bool)
- func (m *AmazonListMutation) AddedFields() []string
- func (m *AmazonListMutation) AddedIDs(name string) []ent.Value
- func (m *AmazonListMutation) AmazonOrdersCleared() bool
- func (m *AmazonListMutation) AmazonOrdersIDs() (ids []int)
- func (m *AmazonListMutation) AmazonSharesCleared() bool
- func (m *AmazonListMutation) AmazonSharesIDs() (ids []int)
- func (m *AmazonListMutation) ClearAmazonOrders()
- func (m *AmazonListMutation) ClearAmazonShares()
- func (m *AmazonListMutation) ClearEdge(name string) error
- func (m *AmazonListMutation) ClearField(name string) error
- func (m *AmazonListMutation) ClearOwner()
- func (m *AmazonListMutation) ClearedEdges() []string
- func (m *AmazonListMutation) ClearedFields() []string
- func (m AmazonListMutation) Client() *Client
- func (m *AmazonListMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AmazonListMutation) EdgeCleared(name string) bool
- func (m *AmazonListMutation) Field(name string) (ent.Value, bool)
- func (m *AmazonListMutation) FieldCleared(name string) bool
- func (m *AmazonListMutation) Fields() []string
- func (m *AmazonListMutation) ID() (id int, exists bool)
- func (m *AmazonListMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AmazonListMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AmazonListMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AmazonListMutation) Op() Op
- func (m *AmazonListMutation) OwnerCleared() bool
- func (m *AmazonListMutation) OwnerIDs() (ids []int)
- func (m *AmazonListMutation) RemoveAmazonOrderIDs(ids ...int)
- func (m *AmazonListMutation) RemoveAmazonShareIDs(ids ...int)
- func (m *AmazonListMutation) RemoveOwnerIDs(ids ...int)
- func (m *AmazonListMutation) RemovedAmazonOrdersIDs() (ids []int)
- func (m *AmazonListMutation) RemovedAmazonSharesIDs() (ids []int)
- func (m *AmazonListMutation) RemovedEdges() []string
- func (m *AmazonListMutation) RemovedIDs(name string) []ent.Value
- func (m *AmazonListMutation) RemovedOwnerIDs() (ids []int)
- func (m *AmazonListMutation) ResetAmazonOrders()
- func (m *AmazonListMutation) ResetAmazonShares()
- func (m *AmazonListMutation) ResetCreatedAt()
- func (m *AmazonListMutation) ResetEdge(name string) error
- func (m *AmazonListMutation) ResetField(name string) error
- func (m *AmazonListMutation) ResetOwner()
- func (m *AmazonListMutation) SetCreatedAt(t time.Time)
- func (m *AmazonListMutation) SetField(name string, value ent.Value) error
- func (m *AmazonListMutation) SetOp(op Op)
- func (m AmazonListMutation) Tx() (*Tx, error)
- func (m *AmazonListMutation) Type() string
- func (m *AmazonListMutation) Where(ps ...predicate.AmazonList)
- func (m *AmazonListMutation) WhereP(ps ...func(*sql.Selector))
- type AmazonListQuery
- func (alq *AmazonListQuery) Aggregate(fns ...AggregateFunc) *AmazonListSelect
- func (alq *AmazonListQuery) All(ctx context.Context) ([]*AmazonList, error)
- func (alq *AmazonListQuery) AllX(ctx context.Context) []*AmazonList
- func (alq *AmazonListQuery) Clone() *AmazonListQuery
- func (alq *AmazonListQuery) Count(ctx context.Context) (int, error)
- func (alq *AmazonListQuery) CountX(ctx context.Context) int
- func (alq *AmazonListQuery) Exist(ctx context.Context) (bool, error)
- func (alq *AmazonListQuery) ExistX(ctx context.Context) bool
- func (alq *AmazonListQuery) First(ctx context.Context) (*AmazonList, error)
- func (alq *AmazonListQuery) FirstID(ctx context.Context) (id int, err error)
- func (alq *AmazonListQuery) FirstIDX(ctx context.Context) int
- func (alq *AmazonListQuery) FirstX(ctx context.Context) *AmazonList
- func (alq *AmazonListQuery) GroupBy(field string, fields ...string) *AmazonListGroupBy
- func (alq *AmazonListQuery) IDs(ctx context.Context) (ids []int, err error)
- func (alq *AmazonListQuery) IDsX(ctx context.Context) []int
- func (alq *AmazonListQuery) Limit(limit int) *AmazonListQuery
- func (alq *AmazonListQuery) Offset(offset int) *AmazonListQuery
- func (alq *AmazonListQuery) Only(ctx context.Context) (*AmazonList, error)
- func (alq *AmazonListQuery) OnlyID(ctx context.Context) (id int, err error)
- func (alq *AmazonListQuery) OnlyIDX(ctx context.Context) int
- func (alq *AmazonListQuery) OnlyX(ctx context.Context) *AmazonList
- func (alq *AmazonListQuery) Order(o ...amazonlist.OrderOption) *AmazonListQuery
- func (alq *AmazonListQuery) QueryAmazonOrders() *AmazonOrderQuery
- func (alq *AmazonListQuery) QueryAmazonShares() *AmazonShareQuery
- func (alq *AmazonListQuery) QueryOwner() *UserQuery
- func (alq *AmazonListQuery) Select(fields ...string) *AmazonListSelect
- func (alq *AmazonListQuery) Unique(unique bool) *AmazonListQuery
- func (alq *AmazonListQuery) Where(ps ...predicate.AmazonList) *AmazonListQuery
- func (alq *AmazonListQuery) WithAmazonOrders(opts ...func(*AmazonOrderQuery)) *AmazonListQuery
- func (alq *AmazonListQuery) WithAmazonShares(opts ...func(*AmazonShareQuery)) *AmazonListQuery
- func (alq *AmazonListQuery) WithOwner(opts ...func(*UserQuery)) *AmazonListQuery
- type AmazonListSelect
- func (als *AmazonListSelect) Aggregate(fns ...AggregateFunc) *AmazonListSelect
- func (s *AmazonListSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AmazonListSelect) BoolX(ctx context.Context) bool
- func (s *AmazonListSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AmazonListSelect) BoolsX(ctx context.Context) []bool
- func (s *AmazonListSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AmazonListSelect) Float64X(ctx context.Context) float64
- func (s *AmazonListSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AmazonListSelect) Float64sX(ctx context.Context) []float64
- func (s *AmazonListSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AmazonListSelect) IntX(ctx context.Context) int
- func (s *AmazonListSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AmazonListSelect) IntsX(ctx context.Context) []int
- func (als *AmazonListSelect) Scan(ctx context.Context, v any) error
- func (s *AmazonListSelect) ScanX(ctx context.Context, v any)
- func (s *AmazonListSelect) String(ctx context.Context) (_ string, err error)
- func (s *AmazonListSelect) StringX(ctx context.Context) string
- func (s *AmazonListSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AmazonListSelect) StringsX(ctx context.Context) []string
- type AmazonListUpdate
- func (alu *AmazonListUpdate) AddAmazonOrderIDs(ids ...int) *AmazonListUpdate
- func (alu *AmazonListUpdate) AddAmazonOrders(a ...*AmazonOrder) *AmazonListUpdate
- func (alu *AmazonListUpdate) AddAmazonShareIDs(ids ...int) *AmazonListUpdate
- func (alu *AmazonListUpdate) AddAmazonShares(a ...*AmazonShare) *AmazonListUpdate
- func (alu *AmazonListUpdate) AddOwner(u ...*User) *AmazonListUpdate
- func (alu *AmazonListUpdate) AddOwnerIDs(ids ...int) *AmazonListUpdate
- func (alu *AmazonListUpdate) ClearAmazonOrders() *AmazonListUpdate
- func (alu *AmazonListUpdate) ClearAmazonShares() *AmazonListUpdate
- func (alu *AmazonListUpdate) ClearOwner() *AmazonListUpdate
- func (alu *AmazonListUpdate) Exec(ctx context.Context) error
- func (alu *AmazonListUpdate) ExecX(ctx context.Context)
- func (alu *AmazonListUpdate) Mutation() *AmazonListMutation
- func (alu *AmazonListUpdate) RemoveAmazonOrderIDs(ids ...int) *AmazonListUpdate
- func (alu *AmazonListUpdate) RemoveAmazonOrders(a ...*AmazonOrder) *AmazonListUpdate
- func (alu *AmazonListUpdate) RemoveAmazonShareIDs(ids ...int) *AmazonListUpdate
- func (alu *AmazonListUpdate) RemoveAmazonShares(a ...*AmazonShare) *AmazonListUpdate
- func (alu *AmazonListUpdate) RemoveOwner(u ...*User) *AmazonListUpdate
- func (alu *AmazonListUpdate) RemoveOwnerIDs(ids ...int) *AmazonListUpdate
- func (alu *AmazonListUpdate) Save(ctx context.Context) (int, error)
- func (alu *AmazonListUpdate) SaveX(ctx context.Context) int
- func (alu *AmazonListUpdate) SetCreatedAt(t time.Time) *AmazonListUpdate
- func (alu *AmazonListUpdate) SetNillableCreatedAt(t *time.Time) *AmazonListUpdate
- func (alu *AmazonListUpdate) Where(ps ...predicate.AmazonList) *AmazonListUpdate
- type AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) AddAmazonOrderIDs(ids ...int) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) AddAmazonOrders(a ...*AmazonOrder) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) AddAmazonShareIDs(ids ...int) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) AddAmazonShares(a ...*AmazonShare) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) AddOwner(u ...*User) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) AddOwnerIDs(ids ...int) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) ClearAmazonOrders() *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) ClearAmazonShares() *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) ClearOwner() *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) Exec(ctx context.Context) error
- func (aluo *AmazonListUpdateOne) ExecX(ctx context.Context)
- func (aluo *AmazonListUpdateOne) Mutation() *AmazonListMutation
- func (aluo *AmazonListUpdateOne) RemoveAmazonOrderIDs(ids ...int) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) RemoveAmazonOrders(a ...*AmazonOrder) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) RemoveAmazonShareIDs(ids ...int) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) RemoveAmazonShares(a ...*AmazonShare) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) RemoveOwner(u ...*User) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) RemoveOwnerIDs(ids ...int) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) Save(ctx context.Context) (*AmazonList, error)
- func (aluo *AmazonListUpdateOne) SaveX(ctx context.Context) *AmazonList
- func (aluo *AmazonListUpdateOne) Select(field string, fields ...string) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) SetCreatedAt(t time.Time) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) SetNillableCreatedAt(t *time.Time) *AmazonListUpdateOne
- func (aluo *AmazonListUpdateOne) Where(ps ...predicate.AmazonList) *AmazonListUpdateOne
- type AmazonLists
- type AmazonOrder
- type AmazonOrderClient
- func (c *AmazonOrderClient) Create() *AmazonOrderCreate
- func (c *AmazonOrderClient) CreateBulk(builders ...*AmazonOrderCreate) *AmazonOrderCreateBulk
- func (c *AmazonOrderClient) Delete() *AmazonOrderDelete
- func (c *AmazonOrderClient) DeleteOne(ao *AmazonOrder) *AmazonOrderDeleteOne
- func (c *AmazonOrderClient) DeleteOneID(id int) *AmazonOrderDeleteOne
- func (c *AmazonOrderClient) Get(ctx context.Context, id int) (*AmazonOrder, error)
- func (c *AmazonOrderClient) GetX(ctx context.Context, id int) *AmazonOrder
- func (c *AmazonOrderClient) Hooks() []Hook
- func (c *AmazonOrderClient) Intercept(interceptors ...Interceptor)
- func (c *AmazonOrderClient) Interceptors() []Interceptor
- func (c *AmazonOrderClient) Query() *AmazonOrderQuery
- func (c *AmazonOrderClient) QueryAmazonList(ao *AmazonOrder) *AmazonListQuery
- func (c *AmazonOrderClient) Update() *AmazonOrderUpdate
- func (c *AmazonOrderClient) UpdateOne(ao *AmazonOrder) *AmazonOrderUpdateOne
- func (c *AmazonOrderClient) UpdateOneID(id int) *AmazonOrderUpdateOne
- func (c *AmazonOrderClient) Use(hooks ...Hook)
- type AmazonOrderCreate
- func (aoc *AmazonOrderCreate) Exec(ctx context.Context) error
- func (aoc *AmazonOrderCreate) ExecX(ctx context.Context)
- func (aoc *AmazonOrderCreate) Mutation() *AmazonOrderMutation
- func (aoc *AmazonOrderCreate) Save(ctx context.Context) (*AmazonOrder, error)
- func (aoc *AmazonOrderCreate) SaveX(ctx context.Context) *AmazonOrder
- func (aoc *AmazonOrderCreate) SetAddress1(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetAddress2(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetAmazonList(a *AmazonList) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetAmazonListID(id int) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetBrand(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetCategory(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetCity(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetCreatedAt(t time.Time) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetName(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetNillableAmazonListID(id *int) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetNillableCreatedAt(t *time.Time) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetOrderedAt(t time.Time) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetPrice(f float32) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetRefund(b bool) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetSeller(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetState(s string) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetTax(f float32) *AmazonOrderCreate
- func (aoc *AmazonOrderCreate) SetZip(s string) *AmazonOrderCreate
- type AmazonOrderCreateBulk
- type AmazonOrderDelete
- type AmazonOrderDeleteOne
- type AmazonOrderEdges
- type AmazonOrderGroupBy
- func (aogb *AmazonOrderGroupBy) Aggregate(fns ...AggregateFunc) *AmazonOrderGroupBy
- func (s *AmazonOrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AmazonOrderGroupBy) BoolX(ctx context.Context) bool
- func (s *AmazonOrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AmazonOrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AmazonOrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AmazonOrderGroupBy) Float64X(ctx context.Context) float64
- func (s *AmazonOrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AmazonOrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AmazonOrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AmazonOrderGroupBy) IntX(ctx context.Context) int
- func (s *AmazonOrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AmazonOrderGroupBy) IntsX(ctx context.Context) []int
- func (aogb *AmazonOrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *AmazonOrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *AmazonOrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AmazonOrderGroupBy) StringX(ctx context.Context) string
- func (s *AmazonOrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AmazonOrderGroupBy) StringsX(ctx context.Context) []string
- type AmazonOrderMutation
- func (m *AmazonOrderMutation) AddField(name string, value ent.Value) error
- func (m *AmazonOrderMutation) AddPrice(f float32)
- func (m *AmazonOrderMutation) AddTax(f float32)
- func (m *AmazonOrderMutation) AddedEdges() []string
- func (m *AmazonOrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *AmazonOrderMutation) AddedFields() []string
- func (m *AmazonOrderMutation) AddedIDs(name string) []ent.Value
- func (m *AmazonOrderMutation) AddedPrice() (r float32, exists bool)
- func (m *AmazonOrderMutation) AddedTax() (r float32, exists bool)
- func (m *AmazonOrderMutation) Address1() (r string, exists bool)
- func (m *AmazonOrderMutation) Address2() (r string, exists bool)
- func (m *AmazonOrderMutation) AmazonListCleared() bool
- func (m *AmazonOrderMutation) AmazonListID() (id int, exists bool)
- func (m *AmazonOrderMutation) AmazonListIDs() (ids []int)
- func (m *AmazonOrderMutation) Brand() (r string, exists bool)
- func (m *AmazonOrderMutation) Category() (r string, exists bool)
- func (m *AmazonOrderMutation) City() (r string, exists bool)
- func (m *AmazonOrderMutation) ClearAmazonList()
- func (m *AmazonOrderMutation) ClearEdge(name string) error
- func (m *AmazonOrderMutation) ClearField(name string) error
- func (m *AmazonOrderMutation) ClearedEdges() []string
- func (m *AmazonOrderMutation) ClearedFields() []string
- func (m AmazonOrderMutation) Client() *Client
- func (m *AmazonOrderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AmazonOrderMutation) EdgeCleared(name string) bool
- func (m *AmazonOrderMutation) Field(name string) (ent.Value, bool)
- func (m *AmazonOrderMutation) FieldCleared(name string) bool
- func (m *AmazonOrderMutation) Fields() []string
- func (m *AmazonOrderMutation) ID() (id int, exists bool)
- func (m *AmazonOrderMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AmazonOrderMutation) Name() (r string, exists bool)
- func (m *AmazonOrderMutation) OldAddress1(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldAddress2(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldBrand(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldCategory(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AmazonOrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AmazonOrderMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldOrderedAt(ctx context.Context) (v time.Time, err error)
- func (m *AmazonOrderMutation) OldPrice(ctx context.Context) (v float32, err error)
- func (m *AmazonOrderMutation) OldRefund(ctx context.Context) (v bool, err error)
- func (m *AmazonOrderMutation) OldSeller(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldState(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) OldTax(ctx context.Context) (v float32, err error)
- func (m *AmazonOrderMutation) OldZip(ctx context.Context) (v string, err error)
- func (m *AmazonOrderMutation) Op() Op
- func (m *AmazonOrderMutation) OrderedAt() (r time.Time, exists bool)
- func (m *AmazonOrderMutation) Price() (r float32, exists bool)
- func (m *AmazonOrderMutation) Refund() (r bool, exists bool)
- func (m *AmazonOrderMutation) RemovedEdges() []string
- func (m *AmazonOrderMutation) RemovedIDs(name string) []ent.Value
- func (m *AmazonOrderMutation) ResetAddress1()
- func (m *AmazonOrderMutation) ResetAddress2()
- func (m *AmazonOrderMutation) ResetAmazonList()
- func (m *AmazonOrderMutation) ResetBrand()
- func (m *AmazonOrderMutation) ResetCategory()
- func (m *AmazonOrderMutation) ResetCity()
- func (m *AmazonOrderMutation) ResetCreatedAt()
- func (m *AmazonOrderMutation) ResetEdge(name string) error
- func (m *AmazonOrderMutation) ResetField(name string) error
- func (m *AmazonOrderMutation) ResetName()
- func (m *AmazonOrderMutation) ResetOrderedAt()
- func (m *AmazonOrderMutation) ResetPrice()
- func (m *AmazonOrderMutation) ResetRefund()
- func (m *AmazonOrderMutation) ResetSeller()
- func (m *AmazonOrderMutation) ResetState()
- func (m *AmazonOrderMutation) ResetTax()
- func (m *AmazonOrderMutation) ResetZip()
- func (m *AmazonOrderMutation) Seller() (r string, exists bool)
- func (m *AmazonOrderMutation) SetAddress1(s string)
- func (m *AmazonOrderMutation) SetAddress2(s string)
- func (m *AmazonOrderMutation) SetAmazonListID(id int)
- func (m *AmazonOrderMutation) SetBrand(s string)
- func (m *AmazonOrderMutation) SetCategory(s string)
- func (m *AmazonOrderMutation) SetCity(s string)
- func (m *AmazonOrderMutation) SetCreatedAt(t time.Time)
- func (m *AmazonOrderMutation) SetField(name string, value ent.Value) error
- func (m *AmazonOrderMutation) SetName(s string)
- func (m *AmazonOrderMutation) SetOp(op Op)
- func (m *AmazonOrderMutation) SetOrderedAt(t time.Time)
- func (m *AmazonOrderMutation) SetPrice(f float32)
- func (m *AmazonOrderMutation) SetRefund(b bool)
- func (m *AmazonOrderMutation) SetSeller(s string)
- func (m *AmazonOrderMutation) SetState(s string)
- func (m *AmazonOrderMutation) SetTax(f float32)
- func (m *AmazonOrderMutation) SetZip(s string)
- func (m *AmazonOrderMutation) State() (r string, exists bool)
- func (m *AmazonOrderMutation) Tax() (r float32, exists bool)
- func (m AmazonOrderMutation) Tx() (*Tx, error)
- func (m *AmazonOrderMutation) Type() string
- func (m *AmazonOrderMutation) Where(ps ...predicate.AmazonOrder)
- func (m *AmazonOrderMutation) WhereP(ps ...func(*sql.Selector))
- func (m *AmazonOrderMutation) Zip() (r string, exists bool)
- type AmazonOrderQuery
- func (aoq *AmazonOrderQuery) Aggregate(fns ...AggregateFunc) *AmazonOrderSelect
- func (aoq *AmazonOrderQuery) All(ctx context.Context) ([]*AmazonOrder, error)
- func (aoq *AmazonOrderQuery) AllX(ctx context.Context) []*AmazonOrder
- func (aoq *AmazonOrderQuery) Clone() *AmazonOrderQuery
- func (aoq *AmazonOrderQuery) Count(ctx context.Context) (int, error)
- func (aoq *AmazonOrderQuery) CountX(ctx context.Context) int
- func (aoq *AmazonOrderQuery) Exist(ctx context.Context) (bool, error)
- func (aoq *AmazonOrderQuery) ExistX(ctx context.Context) bool
- func (aoq *AmazonOrderQuery) First(ctx context.Context) (*AmazonOrder, error)
- func (aoq *AmazonOrderQuery) FirstID(ctx context.Context) (id int, err error)
- func (aoq *AmazonOrderQuery) FirstIDX(ctx context.Context) int
- func (aoq *AmazonOrderQuery) FirstX(ctx context.Context) *AmazonOrder
- func (aoq *AmazonOrderQuery) GroupBy(field string, fields ...string) *AmazonOrderGroupBy
- func (aoq *AmazonOrderQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aoq *AmazonOrderQuery) IDsX(ctx context.Context) []int
- func (aoq *AmazonOrderQuery) Limit(limit int) *AmazonOrderQuery
- func (aoq *AmazonOrderQuery) Offset(offset int) *AmazonOrderQuery
- func (aoq *AmazonOrderQuery) Only(ctx context.Context) (*AmazonOrder, error)
- func (aoq *AmazonOrderQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aoq *AmazonOrderQuery) OnlyIDX(ctx context.Context) int
- func (aoq *AmazonOrderQuery) OnlyX(ctx context.Context) *AmazonOrder
- func (aoq *AmazonOrderQuery) Order(o ...amazonorder.OrderOption) *AmazonOrderQuery
- func (aoq *AmazonOrderQuery) QueryAmazonList() *AmazonListQuery
- func (aoq *AmazonOrderQuery) Select(fields ...string) *AmazonOrderSelect
- func (aoq *AmazonOrderQuery) Unique(unique bool) *AmazonOrderQuery
- func (aoq *AmazonOrderQuery) Where(ps ...predicate.AmazonOrder) *AmazonOrderQuery
- func (aoq *AmazonOrderQuery) WithAmazonList(opts ...func(*AmazonListQuery)) *AmazonOrderQuery
- type AmazonOrderSelect
- func (aos *AmazonOrderSelect) Aggregate(fns ...AggregateFunc) *AmazonOrderSelect
- func (s *AmazonOrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AmazonOrderSelect) BoolX(ctx context.Context) bool
- func (s *AmazonOrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AmazonOrderSelect) BoolsX(ctx context.Context) []bool
- func (s *AmazonOrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AmazonOrderSelect) Float64X(ctx context.Context) float64
- func (s *AmazonOrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AmazonOrderSelect) Float64sX(ctx context.Context) []float64
- func (s *AmazonOrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AmazonOrderSelect) IntX(ctx context.Context) int
- func (s *AmazonOrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AmazonOrderSelect) IntsX(ctx context.Context) []int
- func (aos *AmazonOrderSelect) Scan(ctx context.Context, v any) error
- func (s *AmazonOrderSelect) ScanX(ctx context.Context, v any)
- func (s *AmazonOrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *AmazonOrderSelect) StringX(ctx context.Context) string
- func (s *AmazonOrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AmazonOrderSelect) StringsX(ctx context.Context) []string
- type AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) AddPrice(f float32) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) AddTax(f float32) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) ClearAmazonList() *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) Exec(ctx context.Context) error
- func (aou *AmazonOrderUpdate) ExecX(ctx context.Context)
- func (aou *AmazonOrderUpdate) Mutation() *AmazonOrderMutation
- func (aou *AmazonOrderUpdate) Save(ctx context.Context) (int, error)
- func (aou *AmazonOrderUpdate) SaveX(ctx context.Context) int
- func (aou *AmazonOrderUpdate) SetAddress1(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetAddress2(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetAmazonList(a *AmazonList) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetAmazonListID(id int) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetBrand(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetCategory(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetCity(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetCreatedAt(t time.Time) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetName(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetNillableAmazonListID(id *int) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetNillableCreatedAt(t *time.Time) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetOrderedAt(t time.Time) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetPrice(f float32) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetRefund(b bool) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetSeller(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetState(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetTax(f float32) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) SetZip(s string) *AmazonOrderUpdate
- func (aou *AmazonOrderUpdate) Where(ps ...predicate.AmazonOrder) *AmazonOrderUpdate
- type AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) AddPrice(f float32) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) AddTax(f float32) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) ClearAmazonList() *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) Exec(ctx context.Context) error
- func (aouo *AmazonOrderUpdateOne) ExecX(ctx context.Context)
- func (aouo *AmazonOrderUpdateOne) Mutation() *AmazonOrderMutation
- func (aouo *AmazonOrderUpdateOne) Save(ctx context.Context) (*AmazonOrder, error)
- func (aouo *AmazonOrderUpdateOne) SaveX(ctx context.Context) *AmazonOrder
- func (aouo *AmazonOrderUpdateOne) Select(field string, fields ...string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetAddress1(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetAddress2(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetAmazonList(a *AmazonList) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetAmazonListID(id int) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetBrand(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetCategory(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetCity(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetCreatedAt(t time.Time) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetName(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetNillableAmazonListID(id *int) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetNillableCreatedAt(t *time.Time) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetOrderedAt(t time.Time) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetPrice(f float32) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetRefund(b bool) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetSeller(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetState(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetTax(f float32) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) SetZip(s string) *AmazonOrderUpdateOne
- func (aouo *AmazonOrderUpdateOne) Where(ps ...predicate.AmazonOrder) *AmazonOrderUpdateOne
- type AmazonOrders
- type AmazonShare
- func (as *AmazonShare) QueryAmazonList() *AmazonListQuery
- func (as *AmazonShare) QueryUser() *UserQuery
- func (as *AmazonShare) String() string
- func (as *AmazonShare) Unwrap() *AmazonShare
- func (as *AmazonShare) Update() *AmazonShareUpdateOne
- func (as *AmazonShare) Value(name string) (ent.Value, error)
- type AmazonShareClient
- func (c *AmazonShareClient) Create() *AmazonShareCreate
- func (c *AmazonShareClient) CreateBulk(builders ...*AmazonShareCreate) *AmazonShareCreateBulk
- func (c *AmazonShareClient) Delete() *AmazonShareDelete
- func (c *AmazonShareClient) DeleteOne(as *AmazonShare) *AmazonShareDeleteOne
- func (c *AmazonShareClient) DeleteOneID(id int) *AmazonShareDeleteOne
- func (c *AmazonShareClient) Get(ctx context.Context, id int) (*AmazonShare, error)
- func (c *AmazonShareClient) GetX(ctx context.Context, id int) *AmazonShare
- func (c *AmazonShareClient) Hooks() []Hook
- func (c *AmazonShareClient) Intercept(interceptors ...Interceptor)
- func (c *AmazonShareClient) Interceptors() []Interceptor
- func (c *AmazonShareClient) Query() *AmazonShareQuery
- func (c *AmazonShareClient) QueryAmazonList(as *AmazonShare) *AmazonListQuery
- func (c *AmazonShareClient) QueryUser(as *AmazonShare) *UserQuery
- func (c *AmazonShareClient) Update() *AmazonShareUpdate
- func (c *AmazonShareClient) UpdateOne(as *AmazonShare) *AmazonShareUpdateOne
- func (c *AmazonShareClient) UpdateOneID(id int) *AmazonShareUpdateOne
- func (c *AmazonShareClient) Use(hooks ...Hook)
- type AmazonShareCreate
- func (asc *AmazonShareCreate) Exec(ctx context.Context) error
- func (asc *AmazonShareCreate) ExecX(ctx context.Context)
- func (asc *AmazonShareCreate) Mutation() *AmazonShareMutation
- func (asc *AmazonShareCreate) Save(ctx context.Context) (*AmazonShare, error)
- func (asc *AmazonShareCreate) SaveX(ctx context.Context) *AmazonShare
- func (asc *AmazonShareCreate) SetAmazonList(a *AmazonList) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetAmazonListID(id int) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetCanEdit(b bool) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetCreatedAt(t time.Time) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetNillableAmazonListID(id *int) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetNillableCanEdit(b *bool) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetNillableUserID(id *int) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetUser(u *User) *AmazonShareCreate
- func (asc *AmazonShareCreate) SetUserID(id int) *AmazonShareCreate
- type AmazonShareCreateBulk
- type AmazonShareDelete
- type AmazonShareDeleteOne
- type AmazonShareEdges
- type AmazonShareGroupBy
- func (asgb *AmazonShareGroupBy) Aggregate(fns ...AggregateFunc) *AmazonShareGroupBy
- func (s *AmazonShareGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AmazonShareGroupBy) BoolX(ctx context.Context) bool
- func (s *AmazonShareGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AmazonShareGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AmazonShareGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AmazonShareGroupBy) Float64X(ctx context.Context) float64
- func (s *AmazonShareGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AmazonShareGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AmazonShareGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AmazonShareGroupBy) IntX(ctx context.Context) int
- func (s *AmazonShareGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AmazonShareGroupBy) IntsX(ctx context.Context) []int
- func (asgb *AmazonShareGroupBy) Scan(ctx context.Context, v any) error
- func (s *AmazonShareGroupBy) ScanX(ctx context.Context, v any)
- func (s *AmazonShareGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AmazonShareGroupBy) StringX(ctx context.Context) string
- func (s *AmazonShareGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AmazonShareGroupBy) StringsX(ctx context.Context) []string
- type AmazonShareMutation
- func (m *AmazonShareMutation) AddField(name string, value ent.Value) error
- func (m *AmazonShareMutation) AddedEdges() []string
- func (m *AmazonShareMutation) AddedField(name string) (ent.Value, bool)
- func (m *AmazonShareMutation) AddedFields() []string
- func (m *AmazonShareMutation) AddedIDs(name string) []ent.Value
- func (m *AmazonShareMutation) AmazonListCleared() bool
- func (m *AmazonShareMutation) AmazonListID() (id int, exists bool)
- func (m *AmazonShareMutation) AmazonListIDs() (ids []int)
- func (m *AmazonShareMutation) CanEdit() (r bool, exists bool)
- func (m *AmazonShareMutation) ClearAmazonList()
- func (m *AmazonShareMutation) ClearEdge(name string) error
- func (m *AmazonShareMutation) ClearField(name string) error
- func (m *AmazonShareMutation) ClearUser()
- func (m *AmazonShareMutation) ClearedEdges() []string
- func (m *AmazonShareMutation) ClearedFields() []string
- func (m AmazonShareMutation) Client() *Client
- func (m *AmazonShareMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AmazonShareMutation) EdgeCleared(name string) bool
- func (m *AmazonShareMutation) Field(name string) (ent.Value, bool)
- func (m *AmazonShareMutation) FieldCleared(name string) bool
- func (m *AmazonShareMutation) Fields() []string
- func (m *AmazonShareMutation) ID() (id int, exists bool)
- func (m *AmazonShareMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AmazonShareMutation) OldCanEdit(ctx context.Context) (v bool, err error)
- func (m *AmazonShareMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AmazonShareMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AmazonShareMutation) Op() Op
- func (m *AmazonShareMutation) RemovedEdges() []string
- func (m *AmazonShareMutation) RemovedIDs(name string) []ent.Value
- func (m *AmazonShareMutation) ResetAmazonList()
- func (m *AmazonShareMutation) ResetCanEdit()
- func (m *AmazonShareMutation) ResetCreatedAt()
- func (m *AmazonShareMutation) ResetEdge(name string) error
- func (m *AmazonShareMutation) ResetField(name string) error
- func (m *AmazonShareMutation) ResetUser()
- func (m *AmazonShareMutation) SetAmazonListID(id int)
- func (m *AmazonShareMutation) SetCanEdit(b bool)
- func (m *AmazonShareMutation) SetCreatedAt(t time.Time)
- func (m *AmazonShareMutation) SetField(name string, value ent.Value) error
- func (m *AmazonShareMutation) SetOp(op Op)
- func (m *AmazonShareMutation) SetUserID(id int)
- func (m AmazonShareMutation) Tx() (*Tx, error)
- func (m *AmazonShareMutation) Type() string
- func (m *AmazonShareMutation) UserCleared() bool
- func (m *AmazonShareMutation) UserID() (id int, exists bool)
- func (m *AmazonShareMutation) UserIDs() (ids []int)
- func (m *AmazonShareMutation) Where(ps ...predicate.AmazonShare)
- func (m *AmazonShareMutation) WhereP(ps ...func(*sql.Selector))
- type AmazonShareQuery
- func (asq *AmazonShareQuery) Aggregate(fns ...AggregateFunc) *AmazonShareSelect
- func (asq *AmazonShareQuery) All(ctx context.Context) ([]*AmazonShare, error)
- func (asq *AmazonShareQuery) AllX(ctx context.Context) []*AmazonShare
- func (asq *AmazonShareQuery) Clone() *AmazonShareQuery
- func (asq *AmazonShareQuery) Count(ctx context.Context) (int, error)
- func (asq *AmazonShareQuery) CountX(ctx context.Context) int
- func (asq *AmazonShareQuery) Exist(ctx context.Context) (bool, error)
- func (asq *AmazonShareQuery) ExistX(ctx context.Context) bool
- func (asq *AmazonShareQuery) First(ctx context.Context) (*AmazonShare, error)
- func (asq *AmazonShareQuery) FirstID(ctx context.Context) (id int, err error)
- func (asq *AmazonShareQuery) FirstIDX(ctx context.Context) int
- func (asq *AmazonShareQuery) FirstX(ctx context.Context) *AmazonShare
- func (asq *AmazonShareQuery) GroupBy(field string, fields ...string) *AmazonShareGroupBy
- func (asq *AmazonShareQuery) IDs(ctx context.Context) (ids []int, err error)
- func (asq *AmazonShareQuery) IDsX(ctx context.Context) []int
- func (asq *AmazonShareQuery) Limit(limit int) *AmazonShareQuery
- func (asq *AmazonShareQuery) Offset(offset int) *AmazonShareQuery
- func (asq *AmazonShareQuery) Only(ctx context.Context) (*AmazonShare, error)
- func (asq *AmazonShareQuery) OnlyID(ctx context.Context) (id int, err error)
- func (asq *AmazonShareQuery) OnlyIDX(ctx context.Context) int
- func (asq *AmazonShareQuery) OnlyX(ctx context.Context) *AmazonShare
- func (asq *AmazonShareQuery) Order(o ...amazonshare.OrderOption) *AmazonShareQuery
- func (asq *AmazonShareQuery) QueryAmazonList() *AmazonListQuery
- func (asq *AmazonShareQuery) QueryUser() *UserQuery
- func (asq *AmazonShareQuery) Select(fields ...string) *AmazonShareSelect
- func (asq *AmazonShareQuery) Unique(unique bool) *AmazonShareQuery
- func (asq *AmazonShareQuery) Where(ps ...predicate.AmazonShare) *AmazonShareQuery
- func (asq *AmazonShareQuery) WithAmazonList(opts ...func(*AmazonListQuery)) *AmazonShareQuery
- func (asq *AmazonShareQuery) WithUser(opts ...func(*UserQuery)) *AmazonShareQuery
- type AmazonShareSelect
- func (ass *AmazonShareSelect) Aggregate(fns ...AggregateFunc) *AmazonShareSelect
- func (s *AmazonShareSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AmazonShareSelect) BoolX(ctx context.Context) bool
- func (s *AmazonShareSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AmazonShareSelect) BoolsX(ctx context.Context) []bool
- func (s *AmazonShareSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AmazonShareSelect) Float64X(ctx context.Context) float64
- func (s *AmazonShareSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AmazonShareSelect) Float64sX(ctx context.Context) []float64
- func (s *AmazonShareSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AmazonShareSelect) IntX(ctx context.Context) int
- func (s *AmazonShareSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AmazonShareSelect) IntsX(ctx context.Context) []int
- func (ass *AmazonShareSelect) Scan(ctx context.Context, v any) error
- func (s *AmazonShareSelect) ScanX(ctx context.Context, v any)
- func (s *AmazonShareSelect) String(ctx context.Context) (_ string, err error)
- func (s *AmazonShareSelect) StringX(ctx context.Context) string
- func (s *AmazonShareSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AmazonShareSelect) StringsX(ctx context.Context) []string
- type AmazonShareUpdate
- func (asu *AmazonShareUpdate) ClearAmazonList() *AmazonShareUpdate
- func (asu *AmazonShareUpdate) ClearUser() *AmazonShareUpdate
- func (asu *AmazonShareUpdate) Exec(ctx context.Context) error
- func (asu *AmazonShareUpdate) ExecX(ctx context.Context)
- func (asu *AmazonShareUpdate) Mutation() *AmazonShareMutation
- func (asu *AmazonShareUpdate) Save(ctx context.Context) (int, error)
- func (asu *AmazonShareUpdate) SaveX(ctx context.Context) int
- func (asu *AmazonShareUpdate) SetAmazonList(a *AmazonList) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetAmazonListID(id int) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetCanEdit(b bool) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetCreatedAt(t time.Time) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetNillableAmazonListID(id *int) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetNillableCanEdit(b *bool) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetNillableUserID(id *int) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetUser(u *User) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) SetUserID(id int) *AmazonShareUpdate
- func (asu *AmazonShareUpdate) Where(ps ...predicate.AmazonShare) *AmazonShareUpdate
- type AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) ClearAmazonList() *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) ClearUser() *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) Exec(ctx context.Context) error
- func (asuo *AmazonShareUpdateOne) ExecX(ctx context.Context)
- func (asuo *AmazonShareUpdateOne) Mutation() *AmazonShareMutation
- func (asuo *AmazonShareUpdateOne) Save(ctx context.Context) (*AmazonShare, error)
- func (asuo *AmazonShareUpdateOne) SaveX(ctx context.Context) *AmazonShare
- func (asuo *AmazonShareUpdateOne) Select(field string, fields ...string) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetAmazonList(a *AmazonList) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetAmazonListID(id int) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetCanEdit(b bool) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetCreatedAt(t time.Time) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetNillableAmazonListID(id *int) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetNillableCanEdit(b *bool) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetNillableUserID(id *int) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetUser(u *User) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) SetUserID(id int) *AmazonShareUpdateOne
- func (asuo *AmazonShareUpdateOne) Where(ps ...predicate.AmazonShare) *AmazonShareUpdateOne
- type AmazonShares
- 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 Drink
- type DrinkClient
- func (c *DrinkClient) Create() *DrinkCreate
- func (c *DrinkClient) CreateBulk(builders ...*DrinkCreate) *DrinkCreateBulk
- func (c *DrinkClient) Delete() *DrinkDelete
- func (c *DrinkClient) DeleteOne(d *Drink) *DrinkDeleteOne
- func (c *DrinkClient) DeleteOneID(id int) *DrinkDeleteOne
- func (c *DrinkClient) Get(ctx context.Context, id int) (*Drink, error)
- func (c *DrinkClient) GetX(ctx context.Context, id int) *Drink
- func (c *DrinkClient) Hooks() []Hook
- func (c *DrinkClient) Intercept(interceptors ...Interceptor)
- func (c *DrinkClient) Interceptors() []Interceptor
- func (c *DrinkClient) Query() *DrinkQuery
- func (c *DrinkClient) QueryOwner(d *Drink) *UserQuery
- func (c *DrinkClient) Update() *DrinkUpdate
- func (c *DrinkClient) UpdateOne(d *Drink) *DrinkUpdateOne
- func (c *DrinkClient) UpdateOneID(id int) *DrinkUpdateOne
- func (c *DrinkClient) Use(hooks ...Hook)
- type DrinkCreate
- func (dc *DrinkCreate) Exec(ctx context.Context) error
- func (dc *DrinkCreate) ExecX(ctx context.Context)
- func (dc *DrinkCreate) Mutation() *DrinkMutation
- func (dc *DrinkCreate) Save(ctx context.Context) (*Drink, error)
- func (dc *DrinkCreate) SaveX(ctx context.Context) *Drink
- func (dc *DrinkCreate) SetAbv(i int8) *DrinkCreate
- func (dc *DrinkCreate) SetCreatedAt(t time.Time) *DrinkCreate
- func (dc *DrinkCreate) SetDay(i int) *DrinkCreate
- func (dc *DrinkCreate) SetMonth(i int) *DrinkCreate
- func (dc *DrinkCreate) SetNillableAbv(i *int8) *DrinkCreate
- func (dc *DrinkCreate) SetNillableCreatedAt(t *time.Time) *DrinkCreate
- func (dc *DrinkCreate) SetNillableDay(i *int) *DrinkCreate
- func (dc *DrinkCreate) SetNillableMonth(i *int) *DrinkCreate
- func (dc *DrinkCreate) SetNillableNote(s *string) *DrinkCreate
- func (dc *DrinkCreate) SetNillableOunces(i *int8) *DrinkCreate
- func (dc *DrinkCreate) SetNillableOwnerID(id *int) *DrinkCreate
- func (dc *DrinkCreate) SetNillableType(d *drink.Type) *DrinkCreate
- func (dc *DrinkCreate) SetNillableYear(i *int) *DrinkCreate
- func (dc *DrinkCreate) SetNote(s string) *DrinkCreate
- func (dc *DrinkCreate) SetOunces(i int8) *DrinkCreate
- func (dc *DrinkCreate) SetOwner(u *User) *DrinkCreate
- func (dc *DrinkCreate) SetOwnerID(id int) *DrinkCreate
- func (dc *DrinkCreate) SetType(d drink.Type) *DrinkCreate
- func (dc *DrinkCreate) SetYear(i int) *DrinkCreate
- type DrinkCreateBulk
- type DrinkDelete
- type DrinkDeleteOne
- type DrinkEdges
- type DrinkGroupBy
- func (dgb *DrinkGroupBy) Aggregate(fns ...AggregateFunc) *DrinkGroupBy
- func (s *DrinkGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DrinkGroupBy) BoolX(ctx context.Context) bool
- func (s *DrinkGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DrinkGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DrinkGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DrinkGroupBy) Float64X(ctx context.Context) float64
- func (s *DrinkGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DrinkGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DrinkGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DrinkGroupBy) IntX(ctx context.Context) int
- func (s *DrinkGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DrinkGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DrinkGroupBy) Scan(ctx context.Context, v any) error
- func (s *DrinkGroupBy) ScanX(ctx context.Context, v any)
- func (s *DrinkGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DrinkGroupBy) StringX(ctx context.Context) string
- func (s *DrinkGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DrinkGroupBy) StringsX(ctx context.Context) []string
- type DrinkMutation
- func (m *DrinkMutation) Abv() (r int8, exists bool)
- func (m *DrinkMutation) AddAbv(i int8)
- func (m *DrinkMutation) AddDay(i int)
- func (m *DrinkMutation) AddField(name string, value ent.Value) error
- func (m *DrinkMutation) AddMonth(i int)
- func (m *DrinkMutation) AddOunces(i int8)
- func (m *DrinkMutation) AddYear(i int)
- func (m *DrinkMutation) AddedAbv() (r int8, exists bool)
- func (m *DrinkMutation) AddedDay() (r int, exists bool)
- func (m *DrinkMutation) AddedEdges() []string
- func (m *DrinkMutation) AddedField(name string) (ent.Value, bool)
- func (m *DrinkMutation) AddedFields() []string
- func (m *DrinkMutation) AddedIDs(name string) []ent.Value
- func (m *DrinkMutation) AddedMonth() (r int, exists bool)
- func (m *DrinkMutation) AddedOunces() (r int8, exists bool)
- func (m *DrinkMutation) AddedYear() (r int, exists bool)
- func (m *DrinkMutation) ClearEdge(name string) error
- func (m *DrinkMutation) ClearField(name string) error
- func (m *DrinkMutation) ClearOwner()
- func (m *DrinkMutation) ClearedEdges() []string
- func (m *DrinkMutation) ClearedFields() []string
- func (m DrinkMutation) Client() *Client
- func (m *DrinkMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DrinkMutation) Day() (r int, exists bool)
- func (m *DrinkMutation) EdgeCleared(name string) bool
- func (m *DrinkMutation) Field(name string) (ent.Value, bool)
- func (m *DrinkMutation) FieldCleared(name string) bool
- func (m *DrinkMutation) Fields() []string
- func (m *DrinkMutation) GetType() (r drink.Type, exists bool)
- func (m *DrinkMutation) ID() (id int, exists bool)
- func (m *DrinkMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DrinkMutation) Month() (r int, exists bool)
- func (m *DrinkMutation) Note() (r string, exists bool)
- func (m *DrinkMutation) OldAbv(ctx context.Context) (v int8, err error)
- func (m *DrinkMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DrinkMutation) OldDay(ctx context.Context) (v int, err error)
- func (m *DrinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DrinkMutation) OldMonth(ctx context.Context) (v int, err error)
- func (m *DrinkMutation) OldNote(ctx context.Context) (v string, err error)
- func (m *DrinkMutation) OldOunces(ctx context.Context) (v int8, err error)
- func (m *DrinkMutation) OldType(ctx context.Context) (v drink.Type, err error)
- func (m *DrinkMutation) OldYear(ctx context.Context) (v int, err error)
- func (m *DrinkMutation) Op() Op
- func (m *DrinkMutation) Ounces() (r int8, exists bool)
- func (m *DrinkMutation) OwnerCleared() bool
- func (m *DrinkMutation) OwnerID() (id int, exists bool)
- func (m *DrinkMutation) OwnerIDs() (ids []int)
- func (m *DrinkMutation) RemovedEdges() []string
- func (m *DrinkMutation) RemovedIDs(name string) []ent.Value
- func (m *DrinkMutation) ResetAbv()
- func (m *DrinkMutation) ResetCreatedAt()
- func (m *DrinkMutation) ResetDay()
- func (m *DrinkMutation) ResetEdge(name string) error
- func (m *DrinkMutation) ResetField(name string) error
- func (m *DrinkMutation) ResetMonth()
- func (m *DrinkMutation) ResetNote()
- func (m *DrinkMutation) ResetOunces()
- func (m *DrinkMutation) ResetOwner()
- func (m *DrinkMutation) ResetType()
- func (m *DrinkMutation) ResetYear()
- func (m *DrinkMutation) SetAbv(i int8)
- func (m *DrinkMutation) SetCreatedAt(t time.Time)
- func (m *DrinkMutation) SetDay(i int)
- func (m *DrinkMutation) SetField(name string, value ent.Value) error
- func (m *DrinkMutation) SetMonth(i int)
- func (m *DrinkMutation) SetNote(s string)
- func (m *DrinkMutation) SetOp(op Op)
- func (m *DrinkMutation) SetOunces(i int8)
- func (m *DrinkMutation) SetOwnerID(id int)
- func (m *DrinkMutation) SetType(d drink.Type)
- func (m *DrinkMutation) SetYear(i int)
- func (m DrinkMutation) Tx() (*Tx, error)
- func (m *DrinkMutation) Type() string
- func (m *DrinkMutation) Where(ps ...predicate.Drink)
- func (m *DrinkMutation) WhereP(ps ...func(*sql.Selector))
- func (m *DrinkMutation) Year() (r int, exists bool)
- type DrinkQuery
- func (dq *DrinkQuery) Aggregate(fns ...AggregateFunc) *DrinkSelect
- func (dq *DrinkQuery) All(ctx context.Context) ([]*Drink, error)
- func (dq *DrinkQuery) AllX(ctx context.Context) []*Drink
- func (dq *DrinkQuery) Clone() *DrinkQuery
- func (dq *DrinkQuery) Count(ctx context.Context) (int, error)
- func (dq *DrinkQuery) CountX(ctx context.Context) int
- func (dq *DrinkQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DrinkQuery) ExistX(ctx context.Context) bool
- func (dq *DrinkQuery) First(ctx context.Context) (*Drink, error)
- func (dq *DrinkQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DrinkQuery) FirstIDX(ctx context.Context) int
- func (dq *DrinkQuery) FirstX(ctx context.Context) *Drink
- func (dq *DrinkQuery) GroupBy(field string, fields ...string) *DrinkGroupBy
- func (dq *DrinkQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dq *DrinkQuery) IDsX(ctx context.Context) []int
- func (dq *DrinkQuery) Limit(limit int) *DrinkQuery
- func (dq *DrinkQuery) Offset(offset int) *DrinkQuery
- func (dq *DrinkQuery) Only(ctx context.Context) (*Drink, error)
- func (dq *DrinkQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DrinkQuery) OnlyIDX(ctx context.Context) int
- func (dq *DrinkQuery) OnlyX(ctx context.Context) *Drink
- func (dq *DrinkQuery) Order(o ...drink.OrderOption) *DrinkQuery
- func (dq *DrinkQuery) QueryOwner() *UserQuery
- func (dq *DrinkQuery) Select(fields ...string) *DrinkSelect
- func (dq *DrinkQuery) Unique(unique bool) *DrinkQuery
- func (dq *DrinkQuery) Where(ps ...predicate.Drink) *DrinkQuery
- func (dq *DrinkQuery) WithOwner(opts ...func(*UserQuery)) *DrinkQuery
- type DrinkSelect
- func (ds *DrinkSelect) Aggregate(fns ...AggregateFunc) *DrinkSelect
- func (s *DrinkSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DrinkSelect) BoolX(ctx context.Context) bool
- func (s *DrinkSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DrinkSelect) BoolsX(ctx context.Context) []bool
- func (s *DrinkSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DrinkSelect) Float64X(ctx context.Context) float64
- func (s *DrinkSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DrinkSelect) Float64sX(ctx context.Context) []float64
- func (s *DrinkSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DrinkSelect) IntX(ctx context.Context) int
- func (s *DrinkSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DrinkSelect) IntsX(ctx context.Context) []int
- func (ds *DrinkSelect) Scan(ctx context.Context, v any) error
- func (s *DrinkSelect) ScanX(ctx context.Context, v any)
- func (s *DrinkSelect) String(ctx context.Context) (_ string, err error)
- func (s *DrinkSelect) StringX(ctx context.Context) string
- func (s *DrinkSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DrinkSelect) StringsX(ctx context.Context) []string
- type DrinkUpdate
- func (du *DrinkUpdate) AddAbv(i int8) *DrinkUpdate
- func (du *DrinkUpdate) AddDay(i int) *DrinkUpdate
- func (du *DrinkUpdate) AddMonth(i int) *DrinkUpdate
- func (du *DrinkUpdate) AddOunces(i int8) *DrinkUpdate
- func (du *DrinkUpdate) AddYear(i int) *DrinkUpdate
- func (du *DrinkUpdate) ClearOwner() *DrinkUpdate
- func (du *DrinkUpdate) Exec(ctx context.Context) error
- func (du *DrinkUpdate) ExecX(ctx context.Context)
- func (du *DrinkUpdate) Mutation() *DrinkMutation
- func (du *DrinkUpdate) Save(ctx context.Context) (int, error)
- func (du *DrinkUpdate) SaveX(ctx context.Context) int
- func (du *DrinkUpdate) SetAbv(i int8) *DrinkUpdate
- func (du *DrinkUpdate) SetCreatedAt(t time.Time) *DrinkUpdate
- func (du *DrinkUpdate) SetDay(i int) *DrinkUpdate
- func (du *DrinkUpdate) SetMonth(i int) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableAbv(i *int8) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableCreatedAt(t *time.Time) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableDay(i *int) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableMonth(i *int) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableNote(s *string) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableOunces(i *int8) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableOwnerID(id *int) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableType(d *drink.Type) *DrinkUpdate
- func (du *DrinkUpdate) SetNillableYear(i *int) *DrinkUpdate
- func (du *DrinkUpdate) SetNote(s string) *DrinkUpdate
- func (du *DrinkUpdate) SetOunces(i int8) *DrinkUpdate
- func (du *DrinkUpdate) SetOwner(u *User) *DrinkUpdate
- func (du *DrinkUpdate) SetOwnerID(id int) *DrinkUpdate
- func (du *DrinkUpdate) SetType(d drink.Type) *DrinkUpdate
- func (du *DrinkUpdate) SetYear(i int) *DrinkUpdate
- func (du *DrinkUpdate) Where(ps ...predicate.Drink) *DrinkUpdate
- type DrinkUpdateOne
- func (duo *DrinkUpdateOne) AddAbv(i int8) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) AddDay(i int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) AddMonth(i int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) AddOunces(i int8) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) AddYear(i int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) ClearOwner() *DrinkUpdateOne
- func (duo *DrinkUpdateOne) Exec(ctx context.Context) error
- func (duo *DrinkUpdateOne) ExecX(ctx context.Context)
- func (duo *DrinkUpdateOne) Mutation() *DrinkMutation
- func (duo *DrinkUpdateOne) Save(ctx context.Context) (*Drink, error)
- func (duo *DrinkUpdateOne) SaveX(ctx context.Context) *Drink
- func (duo *DrinkUpdateOne) Select(field string, fields ...string) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetAbv(i int8) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetCreatedAt(t time.Time) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetDay(i int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetMonth(i int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableAbv(i *int8) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableCreatedAt(t *time.Time) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableDay(i *int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableMonth(i *int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableNote(s *string) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableOunces(i *int8) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableOwnerID(id *int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableType(d *drink.Type) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNillableYear(i *int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetNote(s string) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetOunces(i int8) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetOwner(u *User) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetOwnerID(id int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetType(d drink.Type) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) SetYear(i int) *DrinkUpdateOne
- func (duo *DrinkUpdateOne) Where(ps ...predicate.Drink) *DrinkUpdateOne
- type Drinks
- type GroceryList
- func (gl *GroceryList) QueryGroceryListItems() *GroceryListItemQuery
- func (gl *GroceryList) QueryGroceryListShares() *GroceryListShareQuery
- func (gl *GroceryList) QueryOwner() *UserQuery
- func (gl *GroceryList) String() string
- func (gl *GroceryList) Unwrap() *GroceryList
- func (gl *GroceryList) Update() *GroceryListUpdateOne
- func (gl *GroceryList) Value(name string) (ent.Value, error)
- type GroceryListClient
- func (c *GroceryListClient) Create() *GroceryListCreate
- func (c *GroceryListClient) CreateBulk(builders ...*GroceryListCreate) *GroceryListCreateBulk
- func (c *GroceryListClient) Delete() *GroceryListDelete
- func (c *GroceryListClient) DeleteOne(gl *GroceryList) *GroceryListDeleteOne
- func (c *GroceryListClient) DeleteOneID(id int) *GroceryListDeleteOne
- func (c *GroceryListClient) Get(ctx context.Context, id int) (*GroceryList, error)
- func (c *GroceryListClient) GetX(ctx context.Context, id int) *GroceryList
- func (c *GroceryListClient) Hooks() []Hook
- func (c *GroceryListClient) Intercept(interceptors ...Interceptor)
- func (c *GroceryListClient) Interceptors() []Interceptor
- func (c *GroceryListClient) Query() *GroceryListQuery
- func (c *GroceryListClient) QueryGroceryListItems(gl *GroceryList) *GroceryListItemQuery
- func (c *GroceryListClient) QueryGroceryListShares(gl *GroceryList) *GroceryListShareQuery
- func (c *GroceryListClient) QueryOwner(gl *GroceryList) *UserQuery
- func (c *GroceryListClient) Update() *GroceryListUpdate
- func (c *GroceryListClient) UpdateOne(gl *GroceryList) *GroceryListUpdateOne
- func (c *GroceryListClient) UpdateOneID(id int) *GroceryListUpdateOne
- func (c *GroceryListClient) Use(hooks ...Hook)
- type GroceryListCreate
- func (glc *GroceryListCreate) AddGroceryListItemIDs(ids ...int) *GroceryListCreate
- func (glc *GroceryListCreate) AddGroceryListItems(g ...*GroceryListItem) *GroceryListCreate
- func (glc *GroceryListCreate) AddGroceryListShareIDs(ids ...int) *GroceryListCreate
- func (glc *GroceryListCreate) AddGroceryListShares(g ...*GroceryListShare) *GroceryListCreate
- func (glc *GroceryListCreate) Exec(ctx context.Context) error
- func (glc *GroceryListCreate) ExecX(ctx context.Context)
- func (glc *GroceryListCreate) Mutation() *GroceryListMutation
- func (glc *GroceryListCreate) Save(ctx context.Context) (*GroceryList, error)
- func (glc *GroceryListCreate) SaveX(ctx context.Context) *GroceryList
- func (glc *GroceryListCreate) SetArchived(b bool) *GroceryListCreate
- func (glc *GroceryListCreate) SetCreatedAt(t time.Time) *GroceryListCreate
- func (glc *GroceryListCreate) SetName(s string) *GroceryListCreate
- func (glc *GroceryListCreate) SetNillableArchived(b *bool) *GroceryListCreate
- func (glc *GroceryListCreate) SetNillableCreatedAt(t *time.Time) *GroceryListCreate
- func (glc *GroceryListCreate) SetNillableName(s *string) *GroceryListCreate
- func (glc *GroceryListCreate) SetNillableNote(s *string) *GroceryListCreate
- func (glc *GroceryListCreate) SetNillableOwnerID(id *int) *GroceryListCreate
- func (glc *GroceryListCreate) SetNote(s string) *GroceryListCreate
- func (glc *GroceryListCreate) SetOwner(u *User) *GroceryListCreate
- func (glc *GroceryListCreate) SetOwnerID(id int) *GroceryListCreate
- type GroceryListCreateBulk
- type GroceryListDelete
- type GroceryListDeleteOne
- type GroceryListEdges
- type GroceryListGroupBy
- func (glgb *GroceryListGroupBy) Aggregate(fns ...AggregateFunc) *GroceryListGroupBy
- func (s *GroceryListGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroceryListGroupBy) BoolX(ctx context.Context) bool
- func (s *GroceryListGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroceryListGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroceryListGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroceryListGroupBy) Float64X(ctx context.Context) float64
- func (s *GroceryListGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroceryListGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroceryListGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroceryListGroupBy) IntX(ctx context.Context) int
- func (s *GroceryListGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroceryListGroupBy) IntsX(ctx context.Context) []int
- func (glgb *GroceryListGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroceryListGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroceryListGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroceryListGroupBy) StringX(ctx context.Context) string
- func (s *GroceryListGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroceryListGroupBy) StringsX(ctx context.Context) []string
- type GroceryListItem
- type GroceryListItemClient
- func (c *GroceryListItemClient) Create() *GroceryListItemCreate
- func (c *GroceryListItemClient) CreateBulk(builders ...*GroceryListItemCreate) *GroceryListItemCreateBulk
- func (c *GroceryListItemClient) Delete() *GroceryListItemDelete
- func (c *GroceryListItemClient) DeleteOne(gli *GroceryListItem) *GroceryListItemDeleteOne
- func (c *GroceryListItemClient) DeleteOneID(id int) *GroceryListItemDeleteOne
- func (c *GroceryListItemClient) Get(ctx context.Context, id int) (*GroceryListItem, error)
- func (c *GroceryListItemClient) GetX(ctx context.Context, id int) *GroceryListItem
- func (c *GroceryListItemClient) Hooks() []Hook
- func (c *GroceryListItemClient) Intercept(interceptors ...Interceptor)
- func (c *GroceryListItemClient) Interceptors() []Interceptor
- func (c *GroceryListItemClient) Query() *GroceryListItemQuery
- func (c *GroceryListItemClient) QueryGroceryList(gli *GroceryListItem) *GroceryListQuery
- func (c *GroceryListItemClient) Update() *GroceryListItemUpdate
- func (c *GroceryListItemClient) UpdateOne(gli *GroceryListItem) *GroceryListItemUpdateOne
- func (c *GroceryListItemClient) UpdateOneID(id int) *GroceryListItemUpdateOne
- func (c *GroceryListItemClient) Use(hooks ...Hook)
- type GroceryListItemCreate
- func (glic *GroceryListItemCreate) Exec(ctx context.Context) error
- func (glic *GroceryListItemCreate) ExecX(ctx context.Context)
- func (glic *GroceryListItemCreate) Mutation() *GroceryListItemMutation
- func (glic *GroceryListItemCreate) Save(ctx context.Context) (*GroceryListItem, error)
- func (glic *GroceryListItemCreate) SaveX(ctx context.Context) *GroceryListItem
- func (glic *GroceryListItemCreate) SetCreatedAt(t time.Time) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetGroceryList(g *GroceryList) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetGroceryListID(id int) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetName(s string) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetNillableCreatedAt(t *time.Time) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetNillableGroceryListID(id *int) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetNillableNote(s *string) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetNillableQuantity(i *int) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetNote(s string) *GroceryListItemCreate
- func (glic *GroceryListItemCreate) SetQuantity(i int) *GroceryListItemCreate
- type GroceryListItemCreateBulk
- func (glicb *GroceryListItemCreateBulk) Exec(ctx context.Context) error
- func (glicb *GroceryListItemCreateBulk) ExecX(ctx context.Context)
- func (glicb *GroceryListItemCreateBulk) Save(ctx context.Context) ([]*GroceryListItem, error)
- func (glicb *GroceryListItemCreateBulk) SaveX(ctx context.Context) []*GroceryListItem
- type GroceryListItemDelete
- type GroceryListItemDeleteOne
- type GroceryListItemEdges
- type GroceryListItemGroupBy
- func (gligb *GroceryListItemGroupBy) Aggregate(fns ...AggregateFunc) *GroceryListItemGroupBy
- func (s *GroceryListItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroceryListItemGroupBy) BoolX(ctx context.Context) bool
- func (s *GroceryListItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroceryListItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroceryListItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroceryListItemGroupBy) Float64X(ctx context.Context) float64
- func (s *GroceryListItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroceryListItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroceryListItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroceryListItemGroupBy) IntX(ctx context.Context) int
- func (s *GroceryListItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroceryListItemGroupBy) IntsX(ctx context.Context) []int
- func (gligb *GroceryListItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroceryListItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroceryListItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroceryListItemGroupBy) StringX(ctx context.Context) string
- func (s *GroceryListItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroceryListItemGroupBy) StringsX(ctx context.Context) []string
- type GroceryListItemMutation
- func (m *GroceryListItemMutation) AddField(name string, value ent.Value) error
- func (m *GroceryListItemMutation) AddQuantity(i int)
- func (m *GroceryListItemMutation) AddedEdges() []string
- func (m *GroceryListItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroceryListItemMutation) AddedFields() []string
- func (m *GroceryListItemMutation) AddedIDs(name string) []ent.Value
- func (m *GroceryListItemMutation) AddedQuantity() (r int, exists bool)
- func (m *GroceryListItemMutation) ClearEdge(name string) error
- func (m *GroceryListItemMutation) ClearField(name string) error
- func (m *GroceryListItemMutation) ClearGroceryList()
- func (m *GroceryListItemMutation) ClearedEdges() []string
- func (m *GroceryListItemMutation) ClearedFields() []string
- func (m GroceryListItemMutation) Client() *Client
- func (m *GroceryListItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroceryListItemMutation) EdgeCleared(name string) bool
- func (m *GroceryListItemMutation) Field(name string) (ent.Value, bool)
- func (m *GroceryListItemMutation) FieldCleared(name string) bool
- func (m *GroceryListItemMutation) Fields() []string
- func (m *GroceryListItemMutation) GroceryListCleared() bool
- func (m *GroceryListItemMutation) GroceryListID() (id int, exists bool)
- func (m *GroceryListItemMutation) GroceryListIDs() (ids []int)
- func (m *GroceryListItemMutation) ID() (id int, exists bool)
- func (m *GroceryListItemMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroceryListItemMutation) Name() (r string, exists bool)
- func (m *GroceryListItemMutation) Note() (r string, exists bool)
- func (m *GroceryListItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroceryListItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroceryListItemMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroceryListItemMutation) OldNote(ctx context.Context) (v string, err error)
- func (m *GroceryListItemMutation) OldQuantity(ctx context.Context) (v int, err error)
- func (m *GroceryListItemMutation) Op() Op
- func (m *GroceryListItemMutation) Quantity() (r int, exists bool)
- func (m *GroceryListItemMutation) RemovedEdges() []string
- func (m *GroceryListItemMutation) RemovedIDs(name string) []ent.Value
- func (m *GroceryListItemMutation) ResetCreatedAt()
- func (m *GroceryListItemMutation) ResetEdge(name string) error
- func (m *GroceryListItemMutation) ResetField(name string) error
- func (m *GroceryListItemMutation) ResetGroceryList()
- func (m *GroceryListItemMutation) ResetName()
- func (m *GroceryListItemMutation) ResetNote()
- func (m *GroceryListItemMutation) ResetQuantity()
- func (m *GroceryListItemMutation) SetCreatedAt(t time.Time)
- func (m *GroceryListItemMutation) SetField(name string, value ent.Value) error
- func (m *GroceryListItemMutation) SetGroceryListID(id int)
- func (m *GroceryListItemMutation) SetName(s string)
- func (m *GroceryListItemMutation) SetNote(s string)
- func (m *GroceryListItemMutation) SetOp(op Op)
- func (m *GroceryListItemMutation) SetQuantity(i int)
- func (m GroceryListItemMutation) Tx() (*Tx, error)
- func (m *GroceryListItemMutation) Type() string
- func (m *GroceryListItemMutation) Where(ps ...predicate.GroceryListItem)
- func (m *GroceryListItemMutation) WhereP(ps ...func(*sql.Selector))
- type GroceryListItemQuery
- func (gliq *GroceryListItemQuery) Aggregate(fns ...AggregateFunc) *GroceryListItemSelect
- func (gliq *GroceryListItemQuery) All(ctx context.Context) ([]*GroceryListItem, error)
- func (gliq *GroceryListItemQuery) AllX(ctx context.Context) []*GroceryListItem
- func (gliq *GroceryListItemQuery) Clone() *GroceryListItemQuery
- func (gliq *GroceryListItemQuery) Count(ctx context.Context) (int, error)
- func (gliq *GroceryListItemQuery) CountX(ctx context.Context) int
- func (gliq *GroceryListItemQuery) Exist(ctx context.Context) (bool, error)
- func (gliq *GroceryListItemQuery) ExistX(ctx context.Context) bool
- func (gliq *GroceryListItemQuery) First(ctx context.Context) (*GroceryListItem, error)
- func (gliq *GroceryListItemQuery) FirstID(ctx context.Context) (id int, err error)
- func (gliq *GroceryListItemQuery) FirstIDX(ctx context.Context) int
- func (gliq *GroceryListItemQuery) FirstX(ctx context.Context) *GroceryListItem
- func (gliq *GroceryListItemQuery) GroupBy(field string, fields ...string) *GroceryListItemGroupBy
- func (gliq *GroceryListItemQuery) IDs(ctx context.Context) (ids []int, err error)
- func (gliq *GroceryListItemQuery) IDsX(ctx context.Context) []int
- func (gliq *GroceryListItemQuery) Limit(limit int) *GroceryListItemQuery
- func (gliq *GroceryListItemQuery) Offset(offset int) *GroceryListItemQuery
- func (gliq *GroceryListItemQuery) Only(ctx context.Context) (*GroceryListItem, error)
- func (gliq *GroceryListItemQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gliq *GroceryListItemQuery) OnlyIDX(ctx context.Context) int
- func (gliq *GroceryListItemQuery) OnlyX(ctx context.Context) *GroceryListItem
- func (gliq *GroceryListItemQuery) Order(o ...grocerylistitem.OrderOption) *GroceryListItemQuery
- func (gliq *GroceryListItemQuery) QueryGroceryList() *GroceryListQuery
- func (gliq *GroceryListItemQuery) Select(fields ...string) *GroceryListItemSelect
- func (gliq *GroceryListItemQuery) Unique(unique bool) *GroceryListItemQuery
- func (gliq *GroceryListItemQuery) Where(ps ...predicate.GroceryListItem) *GroceryListItemQuery
- func (gliq *GroceryListItemQuery) WithGroceryList(opts ...func(*GroceryListQuery)) *GroceryListItemQuery
- type GroceryListItemSelect
- func (glis *GroceryListItemSelect) Aggregate(fns ...AggregateFunc) *GroceryListItemSelect
- func (s *GroceryListItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroceryListItemSelect) BoolX(ctx context.Context) bool
- func (s *GroceryListItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroceryListItemSelect) BoolsX(ctx context.Context) []bool
- func (s *GroceryListItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroceryListItemSelect) Float64X(ctx context.Context) float64
- func (s *GroceryListItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroceryListItemSelect) Float64sX(ctx context.Context) []float64
- func (s *GroceryListItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroceryListItemSelect) IntX(ctx context.Context) int
- func (s *GroceryListItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroceryListItemSelect) IntsX(ctx context.Context) []int
- func (glis *GroceryListItemSelect) Scan(ctx context.Context, v any) error
- func (s *GroceryListItemSelect) ScanX(ctx context.Context, v any)
- func (s *GroceryListItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroceryListItemSelect) StringX(ctx context.Context) string
- func (s *GroceryListItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroceryListItemSelect) StringsX(ctx context.Context) []string
- type GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) AddQuantity(i int) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) ClearGroceryList() *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) Exec(ctx context.Context) error
- func (gliu *GroceryListItemUpdate) ExecX(ctx context.Context)
- func (gliu *GroceryListItemUpdate) Mutation() *GroceryListItemMutation
- func (gliu *GroceryListItemUpdate) Save(ctx context.Context) (int, error)
- func (gliu *GroceryListItemUpdate) SaveX(ctx context.Context) int
- func (gliu *GroceryListItemUpdate) SetCreatedAt(t time.Time) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetGroceryList(g *GroceryList) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetGroceryListID(id int) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetName(s string) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetNillableCreatedAt(t *time.Time) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetNillableGroceryListID(id *int) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetNillableNote(s *string) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetNillableQuantity(i *int) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetNote(s string) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) SetQuantity(i int) *GroceryListItemUpdate
- func (gliu *GroceryListItemUpdate) Where(ps ...predicate.GroceryListItem) *GroceryListItemUpdate
- type GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) AddQuantity(i int) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) ClearGroceryList() *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) Exec(ctx context.Context) error
- func (gliuo *GroceryListItemUpdateOne) ExecX(ctx context.Context)
- func (gliuo *GroceryListItemUpdateOne) Mutation() *GroceryListItemMutation
- func (gliuo *GroceryListItemUpdateOne) Save(ctx context.Context) (*GroceryListItem, error)
- func (gliuo *GroceryListItemUpdateOne) SaveX(ctx context.Context) *GroceryListItem
- func (gliuo *GroceryListItemUpdateOne) Select(field string, fields ...string) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetCreatedAt(t time.Time) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetGroceryList(g *GroceryList) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetGroceryListID(id int) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetName(s string) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetNillableCreatedAt(t *time.Time) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetNillableGroceryListID(id *int) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetNillableNote(s *string) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetNillableQuantity(i *int) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetNote(s string) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) SetQuantity(i int) *GroceryListItemUpdateOne
- func (gliuo *GroceryListItemUpdateOne) Where(ps ...predicate.GroceryListItem) *GroceryListItemUpdateOne
- type GroceryListItems
- type GroceryListMutation
- func (m *GroceryListMutation) AddField(name string, value ent.Value) error
- func (m *GroceryListMutation) AddGroceryListItemIDs(ids ...int)
- func (m *GroceryListMutation) AddGroceryListShareIDs(ids ...int)
- func (m *GroceryListMutation) AddedEdges() []string
- func (m *GroceryListMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroceryListMutation) AddedFields() []string
- func (m *GroceryListMutation) AddedIDs(name string) []ent.Value
- func (m *GroceryListMutation) Archived() (r bool, exists bool)
- func (m *GroceryListMutation) ClearEdge(name string) error
- func (m *GroceryListMutation) ClearField(name string) error
- func (m *GroceryListMutation) ClearGroceryListItems()
- func (m *GroceryListMutation) ClearGroceryListShares()
- func (m *GroceryListMutation) ClearOwner()
- func (m *GroceryListMutation) ClearedEdges() []string
- func (m *GroceryListMutation) ClearedFields() []string
- func (m GroceryListMutation) Client() *Client
- func (m *GroceryListMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroceryListMutation) EdgeCleared(name string) bool
- func (m *GroceryListMutation) Field(name string) (ent.Value, bool)
- func (m *GroceryListMutation) FieldCleared(name string) bool
- func (m *GroceryListMutation) Fields() []string
- func (m *GroceryListMutation) GroceryListItemsCleared() bool
- func (m *GroceryListMutation) GroceryListItemsIDs() (ids []int)
- func (m *GroceryListMutation) GroceryListSharesCleared() bool
- func (m *GroceryListMutation) GroceryListSharesIDs() (ids []int)
- func (m *GroceryListMutation) ID() (id int, exists bool)
- func (m *GroceryListMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroceryListMutation) Name() (r string, exists bool)
- func (m *GroceryListMutation) Note() (r string, exists bool)
- func (m *GroceryListMutation) OldArchived(ctx context.Context) (v bool, err error)
- func (m *GroceryListMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroceryListMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroceryListMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroceryListMutation) OldNote(ctx context.Context) (v string, err error)
- func (m *GroceryListMutation) Op() Op
- func (m *GroceryListMutation) OwnerCleared() bool
- func (m *GroceryListMutation) OwnerID() (id int, exists bool)
- func (m *GroceryListMutation) OwnerIDs() (ids []int)
- func (m *GroceryListMutation) RemoveGroceryListItemIDs(ids ...int)
- func (m *GroceryListMutation) RemoveGroceryListShareIDs(ids ...int)
- func (m *GroceryListMutation) RemovedEdges() []string
- func (m *GroceryListMutation) RemovedGroceryListItemsIDs() (ids []int)
- func (m *GroceryListMutation) RemovedGroceryListSharesIDs() (ids []int)
- func (m *GroceryListMutation) RemovedIDs(name string) []ent.Value
- func (m *GroceryListMutation) ResetArchived()
- func (m *GroceryListMutation) ResetCreatedAt()
- func (m *GroceryListMutation) ResetEdge(name string) error
- func (m *GroceryListMutation) ResetField(name string) error
- func (m *GroceryListMutation) ResetGroceryListItems()
- func (m *GroceryListMutation) ResetGroceryListShares()
- func (m *GroceryListMutation) ResetName()
- func (m *GroceryListMutation) ResetNote()
- func (m *GroceryListMutation) ResetOwner()
- func (m *GroceryListMutation) SetArchived(b bool)
- func (m *GroceryListMutation) SetCreatedAt(t time.Time)
- func (m *GroceryListMutation) SetField(name string, value ent.Value) error
- func (m *GroceryListMutation) SetName(s string)
- func (m *GroceryListMutation) SetNote(s string)
- func (m *GroceryListMutation) SetOp(op Op)
- func (m *GroceryListMutation) SetOwnerID(id int)
- func (m GroceryListMutation) Tx() (*Tx, error)
- func (m *GroceryListMutation) Type() string
- func (m *GroceryListMutation) Where(ps ...predicate.GroceryList)
- func (m *GroceryListMutation) WhereP(ps ...func(*sql.Selector))
- type GroceryListQuery
- func (glq *GroceryListQuery) Aggregate(fns ...AggregateFunc) *GroceryListSelect
- func (glq *GroceryListQuery) All(ctx context.Context) ([]*GroceryList, error)
- func (glq *GroceryListQuery) AllX(ctx context.Context) []*GroceryList
- func (glq *GroceryListQuery) Clone() *GroceryListQuery
- func (glq *GroceryListQuery) Count(ctx context.Context) (int, error)
- func (glq *GroceryListQuery) CountX(ctx context.Context) int
- func (glq *GroceryListQuery) Exist(ctx context.Context) (bool, error)
- func (glq *GroceryListQuery) ExistX(ctx context.Context) bool
- func (glq *GroceryListQuery) First(ctx context.Context) (*GroceryList, error)
- func (glq *GroceryListQuery) FirstID(ctx context.Context) (id int, err error)
- func (glq *GroceryListQuery) FirstIDX(ctx context.Context) int
- func (glq *GroceryListQuery) FirstX(ctx context.Context) *GroceryList
- func (glq *GroceryListQuery) GroupBy(field string, fields ...string) *GroceryListGroupBy
- func (glq *GroceryListQuery) IDs(ctx context.Context) (ids []int, err error)
- func (glq *GroceryListQuery) IDsX(ctx context.Context) []int
- func (glq *GroceryListQuery) Limit(limit int) *GroceryListQuery
- func (glq *GroceryListQuery) Offset(offset int) *GroceryListQuery
- func (glq *GroceryListQuery) Only(ctx context.Context) (*GroceryList, error)
- func (glq *GroceryListQuery) OnlyID(ctx context.Context) (id int, err error)
- func (glq *GroceryListQuery) OnlyIDX(ctx context.Context) int
- func (glq *GroceryListQuery) OnlyX(ctx context.Context) *GroceryList
- func (glq *GroceryListQuery) Order(o ...grocerylist.OrderOption) *GroceryListQuery
- func (glq *GroceryListQuery) QueryGroceryListItems() *GroceryListItemQuery
- func (glq *GroceryListQuery) QueryGroceryListShares() *GroceryListShareQuery
- func (glq *GroceryListQuery) QueryOwner() *UserQuery
- func (glq *GroceryListQuery) Select(fields ...string) *GroceryListSelect
- func (glq *GroceryListQuery) Unique(unique bool) *GroceryListQuery
- func (glq *GroceryListQuery) Where(ps ...predicate.GroceryList) *GroceryListQuery
- func (glq *GroceryListQuery) WithGroceryListItems(opts ...func(*GroceryListItemQuery)) *GroceryListQuery
- func (glq *GroceryListQuery) WithGroceryListShares(opts ...func(*GroceryListShareQuery)) *GroceryListQuery
- func (glq *GroceryListQuery) WithOwner(opts ...func(*UserQuery)) *GroceryListQuery
- type GroceryListSelect
- func (gls *GroceryListSelect) Aggregate(fns ...AggregateFunc) *GroceryListSelect
- func (s *GroceryListSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroceryListSelect) BoolX(ctx context.Context) bool
- func (s *GroceryListSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroceryListSelect) BoolsX(ctx context.Context) []bool
- func (s *GroceryListSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroceryListSelect) Float64X(ctx context.Context) float64
- func (s *GroceryListSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroceryListSelect) Float64sX(ctx context.Context) []float64
- func (s *GroceryListSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroceryListSelect) IntX(ctx context.Context) int
- func (s *GroceryListSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroceryListSelect) IntsX(ctx context.Context) []int
- func (gls *GroceryListSelect) Scan(ctx context.Context, v any) error
- func (s *GroceryListSelect) ScanX(ctx context.Context, v any)
- func (s *GroceryListSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroceryListSelect) StringX(ctx context.Context) string
- func (s *GroceryListSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroceryListSelect) StringsX(ctx context.Context) []string
- type GroceryListShare
- func (gls *GroceryListShare) QueryGroceryList() *GroceryListQuery
- func (gls *GroceryListShare) QueryUser() *UserQuery
- func (gls *GroceryListShare) String() string
- func (gls *GroceryListShare) Unwrap() *GroceryListShare
- func (gls *GroceryListShare) Update() *GroceryListShareUpdateOne
- func (gls *GroceryListShare) Value(name string) (ent.Value, error)
- type GroceryListShareClient
- func (c *GroceryListShareClient) Create() *GroceryListShareCreate
- func (c *GroceryListShareClient) CreateBulk(builders ...*GroceryListShareCreate) *GroceryListShareCreateBulk
- func (c *GroceryListShareClient) Delete() *GroceryListShareDelete
- func (c *GroceryListShareClient) DeleteOne(gls *GroceryListShare) *GroceryListShareDeleteOne
- func (c *GroceryListShareClient) DeleteOneID(id int) *GroceryListShareDeleteOne
- func (c *GroceryListShareClient) Get(ctx context.Context, id int) (*GroceryListShare, error)
- func (c *GroceryListShareClient) GetX(ctx context.Context, id int) *GroceryListShare
- func (c *GroceryListShareClient) Hooks() []Hook
- func (c *GroceryListShareClient) Intercept(interceptors ...Interceptor)
- func (c *GroceryListShareClient) Interceptors() []Interceptor
- func (c *GroceryListShareClient) Query() *GroceryListShareQuery
- func (c *GroceryListShareClient) QueryGroceryList(gls *GroceryListShare) *GroceryListQuery
- func (c *GroceryListShareClient) QueryUser(gls *GroceryListShare) *UserQuery
- func (c *GroceryListShareClient) Update() *GroceryListShareUpdate
- func (c *GroceryListShareClient) UpdateOne(gls *GroceryListShare) *GroceryListShareUpdateOne
- func (c *GroceryListShareClient) UpdateOneID(id int) *GroceryListShareUpdateOne
- func (c *GroceryListShareClient) Use(hooks ...Hook)
- type GroceryListShareCreate
- func (glsc *GroceryListShareCreate) Exec(ctx context.Context) error
- func (glsc *GroceryListShareCreate) ExecX(ctx context.Context)
- func (glsc *GroceryListShareCreate) Mutation() *GroceryListShareMutation
- func (glsc *GroceryListShareCreate) Save(ctx context.Context) (*GroceryListShare, error)
- func (glsc *GroceryListShareCreate) SaveX(ctx context.Context) *GroceryListShare
- func (glsc *GroceryListShareCreate) SetCanEdit(b bool) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetCreatedAt(t time.Time) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetGroceryList(g *GroceryList) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetGroceryListID(id int) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetNillableCanEdit(b *bool) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetNillableCreatedAt(t *time.Time) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetNillableGroceryListID(id *int) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetNillableUserID(id *int) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetUser(u *User) *GroceryListShareCreate
- func (glsc *GroceryListShareCreate) SetUserID(id int) *GroceryListShareCreate
- type GroceryListShareCreateBulk
- func (glscb *GroceryListShareCreateBulk) Exec(ctx context.Context) error
- func (glscb *GroceryListShareCreateBulk) ExecX(ctx context.Context)
- func (glscb *GroceryListShareCreateBulk) Save(ctx context.Context) ([]*GroceryListShare, error)
- func (glscb *GroceryListShareCreateBulk) SaveX(ctx context.Context) []*GroceryListShare
- type GroceryListShareDelete
- type GroceryListShareDeleteOne
- type GroceryListShareEdges
- type GroceryListShareGroupBy
- func (glsgb *GroceryListShareGroupBy) Aggregate(fns ...AggregateFunc) *GroceryListShareGroupBy
- func (s *GroceryListShareGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroceryListShareGroupBy) BoolX(ctx context.Context) bool
- func (s *GroceryListShareGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroceryListShareGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroceryListShareGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroceryListShareGroupBy) Float64X(ctx context.Context) float64
- func (s *GroceryListShareGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroceryListShareGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroceryListShareGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroceryListShareGroupBy) IntX(ctx context.Context) int
- func (s *GroceryListShareGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroceryListShareGroupBy) IntsX(ctx context.Context) []int
- func (glsgb *GroceryListShareGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroceryListShareGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroceryListShareGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroceryListShareGroupBy) StringX(ctx context.Context) string
- func (s *GroceryListShareGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroceryListShareGroupBy) StringsX(ctx context.Context) []string
- type GroceryListShareMutation
- func (m *GroceryListShareMutation) AddField(name string, value ent.Value) error
- func (m *GroceryListShareMutation) AddedEdges() []string
- func (m *GroceryListShareMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroceryListShareMutation) AddedFields() []string
- func (m *GroceryListShareMutation) AddedIDs(name string) []ent.Value
- func (m *GroceryListShareMutation) CanEdit() (r bool, exists bool)
- func (m *GroceryListShareMutation) ClearEdge(name string) error
- func (m *GroceryListShareMutation) ClearField(name string) error
- func (m *GroceryListShareMutation) ClearGroceryList()
- func (m *GroceryListShareMutation) ClearUser()
- func (m *GroceryListShareMutation) ClearedEdges() []string
- func (m *GroceryListShareMutation) ClearedFields() []string
- func (m GroceryListShareMutation) Client() *Client
- func (m *GroceryListShareMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroceryListShareMutation) EdgeCleared(name string) bool
- func (m *GroceryListShareMutation) Field(name string) (ent.Value, bool)
- func (m *GroceryListShareMutation) FieldCleared(name string) bool
- func (m *GroceryListShareMutation) Fields() []string
- func (m *GroceryListShareMutation) GroceryListCleared() bool
- func (m *GroceryListShareMutation) GroceryListID() (id int, exists bool)
- func (m *GroceryListShareMutation) GroceryListIDs() (ids []int)
- func (m *GroceryListShareMutation) ID() (id int, exists bool)
- func (m *GroceryListShareMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroceryListShareMutation) OldCanEdit(ctx context.Context) (v bool, err error)
- func (m *GroceryListShareMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroceryListShareMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroceryListShareMutation) Op() Op
- func (m *GroceryListShareMutation) RemovedEdges() []string
- func (m *GroceryListShareMutation) RemovedIDs(name string) []ent.Value
- func (m *GroceryListShareMutation) ResetCanEdit()
- func (m *GroceryListShareMutation) ResetCreatedAt()
- func (m *GroceryListShareMutation) ResetEdge(name string) error
- func (m *GroceryListShareMutation) ResetField(name string) error
- func (m *GroceryListShareMutation) ResetGroceryList()
- func (m *GroceryListShareMutation) ResetUser()
- func (m *GroceryListShareMutation) SetCanEdit(b bool)
- func (m *GroceryListShareMutation) SetCreatedAt(t time.Time)
- func (m *GroceryListShareMutation) SetField(name string, value ent.Value) error
- func (m *GroceryListShareMutation) SetGroceryListID(id int)
- func (m *GroceryListShareMutation) SetOp(op Op)
- func (m *GroceryListShareMutation) SetUserID(id int)
- func (m GroceryListShareMutation) Tx() (*Tx, error)
- func (m *GroceryListShareMutation) Type() string
- func (m *GroceryListShareMutation) UserCleared() bool
- func (m *GroceryListShareMutation) UserID() (id int, exists bool)
- func (m *GroceryListShareMutation) UserIDs() (ids []int)
- func (m *GroceryListShareMutation) Where(ps ...predicate.GroceryListShare)
- func (m *GroceryListShareMutation) WhereP(ps ...func(*sql.Selector))
- type GroceryListShareQuery
- func (glsq *GroceryListShareQuery) Aggregate(fns ...AggregateFunc) *GroceryListShareSelect
- func (glsq *GroceryListShareQuery) All(ctx context.Context) ([]*GroceryListShare, error)
- func (glsq *GroceryListShareQuery) AllX(ctx context.Context) []*GroceryListShare
- func (glsq *GroceryListShareQuery) Clone() *GroceryListShareQuery
- func (glsq *GroceryListShareQuery) Count(ctx context.Context) (int, error)
- func (glsq *GroceryListShareQuery) CountX(ctx context.Context) int
- func (glsq *GroceryListShareQuery) Exist(ctx context.Context) (bool, error)
- func (glsq *GroceryListShareQuery) ExistX(ctx context.Context) bool
- func (glsq *GroceryListShareQuery) First(ctx context.Context) (*GroceryListShare, error)
- func (glsq *GroceryListShareQuery) FirstID(ctx context.Context) (id int, err error)
- func (glsq *GroceryListShareQuery) FirstIDX(ctx context.Context) int
- func (glsq *GroceryListShareQuery) FirstX(ctx context.Context) *GroceryListShare
- func (glsq *GroceryListShareQuery) GroupBy(field string, fields ...string) *GroceryListShareGroupBy
- func (glsq *GroceryListShareQuery) IDs(ctx context.Context) (ids []int, err error)
- func (glsq *GroceryListShareQuery) IDsX(ctx context.Context) []int
- func (glsq *GroceryListShareQuery) Limit(limit int) *GroceryListShareQuery
- func (glsq *GroceryListShareQuery) Offset(offset int) *GroceryListShareQuery
- func (glsq *GroceryListShareQuery) Only(ctx context.Context) (*GroceryListShare, error)
- func (glsq *GroceryListShareQuery) OnlyID(ctx context.Context) (id int, err error)
- func (glsq *GroceryListShareQuery) OnlyIDX(ctx context.Context) int
- func (glsq *GroceryListShareQuery) OnlyX(ctx context.Context) *GroceryListShare
- func (glsq *GroceryListShareQuery) Order(o ...grocerylistshare.OrderOption) *GroceryListShareQuery
- func (glsq *GroceryListShareQuery) QueryGroceryList() *GroceryListQuery
- func (glsq *GroceryListShareQuery) QueryUser() *UserQuery
- func (glsq *GroceryListShareQuery) Select(fields ...string) *GroceryListShareSelect
- func (glsq *GroceryListShareQuery) Unique(unique bool) *GroceryListShareQuery
- func (glsq *GroceryListShareQuery) Where(ps ...predicate.GroceryListShare) *GroceryListShareQuery
- func (glsq *GroceryListShareQuery) WithGroceryList(opts ...func(*GroceryListQuery)) *GroceryListShareQuery
- func (glsq *GroceryListShareQuery) WithUser(opts ...func(*UserQuery)) *GroceryListShareQuery
- type GroceryListShareSelect
- func (glss *GroceryListShareSelect) Aggregate(fns ...AggregateFunc) *GroceryListShareSelect
- func (s *GroceryListShareSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroceryListShareSelect) BoolX(ctx context.Context) bool
- func (s *GroceryListShareSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroceryListShareSelect) BoolsX(ctx context.Context) []bool
- func (s *GroceryListShareSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroceryListShareSelect) Float64X(ctx context.Context) float64
- func (s *GroceryListShareSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroceryListShareSelect) Float64sX(ctx context.Context) []float64
- func (s *GroceryListShareSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroceryListShareSelect) IntX(ctx context.Context) int
- func (s *GroceryListShareSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroceryListShareSelect) IntsX(ctx context.Context) []int
- func (glss *GroceryListShareSelect) Scan(ctx context.Context, v any) error
- func (s *GroceryListShareSelect) ScanX(ctx context.Context, v any)
- func (s *GroceryListShareSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroceryListShareSelect) StringX(ctx context.Context) string
- func (s *GroceryListShareSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroceryListShareSelect) StringsX(ctx context.Context) []string
- type GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) ClearGroceryList() *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) ClearUser() *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) Exec(ctx context.Context) error
- func (glsu *GroceryListShareUpdate) ExecX(ctx context.Context)
- func (glsu *GroceryListShareUpdate) Mutation() *GroceryListShareMutation
- func (glsu *GroceryListShareUpdate) Save(ctx context.Context) (int, error)
- func (glsu *GroceryListShareUpdate) SaveX(ctx context.Context) int
- func (glsu *GroceryListShareUpdate) SetCanEdit(b bool) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetCreatedAt(t time.Time) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetGroceryList(g *GroceryList) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetGroceryListID(id int) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetNillableCanEdit(b *bool) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetNillableCreatedAt(t *time.Time) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetNillableGroceryListID(id *int) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetNillableUserID(id *int) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetUser(u *User) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) SetUserID(id int) *GroceryListShareUpdate
- func (glsu *GroceryListShareUpdate) Where(ps ...predicate.GroceryListShare) *GroceryListShareUpdate
- type GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) ClearGroceryList() *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) ClearUser() *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) Exec(ctx context.Context) error
- func (glsuo *GroceryListShareUpdateOne) ExecX(ctx context.Context)
- func (glsuo *GroceryListShareUpdateOne) Mutation() *GroceryListShareMutation
- func (glsuo *GroceryListShareUpdateOne) Save(ctx context.Context) (*GroceryListShare, error)
- func (glsuo *GroceryListShareUpdateOne) SaveX(ctx context.Context) *GroceryListShare
- func (glsuo *GroceryListShareUpdateOne) Select(field string, fields ...string) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetCanEdit(b bool) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetCreatedAt(t time.Time) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetGroceryList(g *GroceryList) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetGroceryListID(id int) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetNillableCanEdit(b *bool) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetNillableCreatedAt(t *time.Time) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetNillableGroceryListID(id *int) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetNillableUserID(id *int) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetUser(u *User) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) SetUserID(id int) *GroceryListShareUpdateOne
- func (glsuo *GroceryListShareUpdateOne) Where(ps ...predicate.GroceryListShare) *GroceryListShareUpdateOne
- type GroceryListShares
- type GroceryListUpdate
- func (glu *GroceryListUpdate) AddGroceryListItemIDs(ids ...int) *GroceryListUpdate
- func (glu *GroceryListUpdate) AddGroceryListItems(g ...*GroceryListItem) *GroceryListUpdate
- func (glu *GroceryListUpdate) AddGroceryListShareIDs(ids ...int) *GroceryListUpdate
- func (glu *GroceryListUpdate) AddGroceryListShares(g ...*GroceryListShare) *GroceryListUpdate
- func (glu *GroceryListUpdate) ClearGroceryListItems() *GroceryListUpdate
- func (glu *GroceryListUpdate) ClearGroceryListShares() *GroceryListUpdate
- func (glu *GroceryListUpdate) ClearOwner() *GroceryListUpdate
- func (glu *GroceryListUpdate) Exec(ctx context.Context) error
- func (glu *GroceryListUpdate) ExecX(ctx context.Context)
- func (glu *GroceryListUpdate) Mutation() *GroceryListMutation
- func (glu *GroceryListUpdate) RemoveGroceryListItemIDs(ids ...int) *GroceryListUpdate
- func (glu *GroceryListUpdate) RemoveGroceryListItems(g ...*GroceryListItem) *GroceryListUpdate
- func (glu *GroceryListUpdate) RemoveGroceryListShareIDs(ids ...int) *GroceryListUpdate
- func (glu *GroceryListUpdate) RemoveGroceryListShares(g ...*GroceryListShare) *GroceryListUpdate
- func (glu *GroceryListUpdate) Save(ctx context.Context) (int, error)
- func (glu *GroceryListUpdate) SaveX(ctx context.Context) int
- func (glu *GroceryListUpdate) SetArchived(b bool) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetCreatedAt(t time.Time) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetName(s string) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetNillableArchived(b *bool) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetNillableCreatedAt(t *time.Time) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetNillableName(s *string) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetNillableNote(s *string) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetNillableOwnerID(id *int) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetNote(s string) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetOwner(u *User) *GroceryListUpdate
- func (glu *GroceryListUpdate) SetOwnerID(id int) *GroceryListUpdate
- func (glu *GroceryListUpdate) Where(ps ...predicate.GroceryList) *GroceryListUpdate
- type GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) AddGroceryListItemIDs(ids ...int) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) AddGroceryListItems(g ...*GroceryListItem) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) AddGroceryListShareIDs(ids ...int) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) AddGroceryListShares(g ...*GroceryListShare) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) ClearGroceryListItems() *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) ClearGroceryListShares() *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) ClearOwner() *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) Exec(ctx context.Context) error
- func (gluo *GroceryListUpdateOne) ExecX(ctx context.Context)
- func (gluo *GroceryListUpdateOne) Mutation() *GroceryListMutation
- func (gluo *GroceryListUpdateOne) RemoveGroceryListItemIDs(ids ...int) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) RemoveGroceryListItems(g ...*GroceryListItem) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) RemoveGroceryListShareIDs(ids ...int) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) RemoveGroceryListShares(g ...*GroceryListShare) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) Save(ctx context.Context) (*GroceryList, error)
- func (gluo *GroceryListUpdateOne) SaveX(ctx context.Context) *GroceryList
- func (gluo *GroceryListUpdateOne) Select(field string, fields ...string) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetArchived(b bool) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetCreatedAt(t time.Time) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetName(s string) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetNillableArchived(b *bool) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetNillableCreatedAt(t *time.Time) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetNillableName(s *string) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetNillableNote(s *string) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetNillableOwnerID(id *int) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetNote(s string) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetOwner(u *User) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) SetOwnerID(id int) *GroceryListUpdateOne
- func (gluo *GroceryListUpdateOne) Where(ps ...predicate.GroceryList) *GroceryListUpdateOne
- type GroceryLists
- type Hook
- type InterceptFunc
- type Interceptor
- type Movie
- type MovieClient
- func (c *MovieClient) Create() *MovieCreate
- func (c *MovieClient) CreateBulk(builders ...*MovieCreate) *MovieCreateBulk
- func (c *MovieClient) Delete() *MovieDelete
- func (c *MovieClient) DeleteOne(m *Movie) *MovieDeleteOne
- func (c *MovieClient) DeleteOneID(id int) *MovieDeleteOne
- func (c *MovieClient) Get(ctx context.Context, id int) (*Movie, error)
- func (c *MovieClient) GetX(ctx context.Context, id int) *Movie
- func (c *MovieClient) Hooks() []Hook
- func (c *MovieClient) Intercept(interceptors ...Interceptor)
- func (c *MovieClient) Interceptors() []Interceptor
- func (c *MovieClient) Query() *MovieQuery
- func (c *MovieClient) QueryMovieCollection(m *Movie) *MovieCollectionQuery
- func (c *MovieClient) Update() *MovieUpdate
- func (c *MovieClient) UpdateOne(m *Movie) *MovieUpdateOne
- func (c *MovieClient) UpdateOneID(id int) *MovieUpdateOne
- func (c *MovieClient) Use(hooks ...Hook)
- type MovieCollection
- func (mc *MovieCollection) QueryMovieCollectionShares() *MovieCollectionShareQuery
- func (mc *MovieCollection) QueryMovies() *MovieQuery
- func (mc *MovieCollection) QueryOwner() *UserQuery
- func (mc *MovieCollection) String() string
- func (mc *MovieCollection) Unwrap() *MovieCollection
- func (mc *MovieCollection) Update() *MovieCollectionUpdateOne
- func (mc *MovieCollection) Value(name string) (ent.Value, error)
- type MovieCollectionClient
- func (c *MovieCollectionClient) Create() *MovieCollectionCreate
- func (c *MovieCollectionClient) CreateBulk(builders ...*MovieCollectionCreate) *MovieCollectionCreateBulk
- func (c *MovieCollectionClient) Delete() *MovieCollectionDelete
- func (c *MovieCollectionClient) DeleteOne(mc *MovieCollection) *MovieCollectionDeleteOne
- func (c *MovieCollectionClient) DeleteOneID(id int) *MovieCollectionDeleteOne
- func (c *MovieCollectionClient) Get(ctx context.Context, id int) (*MovieCollection, error)
- func (c *MovieCollectionClient) GetX(ctx context.Context, id int) *MovieCollection
- func (c *MovieCollectionClient) Hooks() []Hook
- func (c *MovieCollectionClient) Intercept(interceptors ...Interceptor)
- func (c *MovieCollectionClient) Interceptors() []Interceptor
- func (c *MovieCollectionClient) Query() *MovieCollectionQuery
- func (c *MovieCollectionClient) QueryMovieCollectionShares(mc *MovieCollection) *MovieCollectionShareQuery
- func (c *MovieCollectionClient) QueryMovies(mc *MovieCollection) *MovieQuery
- func (c *MovieCollectionClient) QueryOwner(mc *MovieCollection) *UserQuery
- func (c *MovieCollectionClient) Update() *MovieCollectionUpdate
- func (c *MovieCollectionClient) UpdateOne(mc *MovieCollection) *MovieCollectionUpdateOne
- func (c *MovieCollectionClient) UpdateOneID(id int) *MovieCollectionUpdateOne
- func (c *MovieCollectionClient) Use(hooks ...Hook)
- type MovieCollectionCreate
- func (mcc *MovieCollectionCreate) AddMovieCollectionShareIDs(ids ...int) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) AddMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) AddMovieIDs(ids ...int) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) AddMovies(m ...*Movie) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) Exec(ctx context.Context) error
- func (mcc *MovieCollectionCreate) ExecX(ctx context.Context)
- func (mcc *MovieCollectionCreate) Mutation() *MovieCollectionMutation
- func (mcc *MovieCollectionCreate) Save(ctx context.Context) (*MovieCollection, error)
- func (mcc *MovieCollectionCreate) SaveX(ctx context.Context) *MovieCollection
- func (mcc *MovieCollectionCreate) SetCreatedAt(t time.Time) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetName(s string) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetNillableCreatedAt(t *time.Time) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetNillableName(s *string) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetNillableNote(s *string) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetNillableOwnerID(id *int) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetNillableShowWatched(b *bool) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetNote(s string) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetOwner(u *User) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetOwnerID(id int) *MovieCollectionCreate
- func (mcc *MovieCollectionCreate) SetShowWatched(b bool) *MovieCollectionCreate
- type MovieCollectionCreateBulk
- func (mccb *MovieCollectionCreateBulk) Exec(ctx context.Context) error
- func (mccb *MovieCollectionCreateBulk) ExecX(ctx context.Context)
- func (mccb *MovieCollectionCreateBulk) Save(ctx context.Context) ([]*MovieCollection, error)
- func (mccb *MovieCollectionCreateBulk) SaveX(ctx context.Context) []*MovieCollection
- type MovieCollectionDelete
- type MovieCollectionDeleteOne
- type MovieCollectionEdges
- type MovieCollectionGroupBy
- func (mcgb *MovieCollectionGroupBy) Aggregate(fns ...AggregateFunc) *MovieCollectionGroupBy
- func (s *MovieCollectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MovieCollectionGroupBy) BoolX(ctx context.Context) bool
- func (s *MovieCollectionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MovieCollectionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MovieCollectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MovieCollectionGroupBy) Float64X(ctx context.Context) float64
- func (s *MovieCollectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MovieCollectionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MovieCollectionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MovieCollectionGroupBy) IntX(ctx context.Context) int
- func (s *MovieCollectionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MovieCollectionGroupBy) IntsX(ctx context.Context) []int
- func (mcgb *MovieCollectionGroupBy) Scan(ctx context.Context, v any) error
- func (s *MovieCollectionGroupBy) ScanX(ctx context.Context, v any)
- func (s *MovieCollectionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MovieCollectionGroupBy) StringX(ctx context.Context) string
- func (s *MovieCollectionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MovieCollectionGroupBy) StringsX(ctx context.Context) []string
- type MovieCollectionMutation
- func (m *MovieCollectionMutation) AddField(name string, value ent.Value) error
- func (m *MovieCollectionMutation) AddMovieCollectionShareIDs(ids ...int)
- func (m *MovieCollectionMutation) AddMovieIDs(ids ...int)
- func (m *MovieCollectionMutation) AddedEdges() []string
- func (m *MovieCollectionMutation) AddedField(name string) (ent.Value, bool)
- func (m *MovieCollectionMutation) AddedFields() []string
- func (m *MovieCollectionMutation) AddedIDs(name string) []ent.Value
- func (m *MovieCollectionMutation) ClearEdge(name string) error
- func (m *MovieCollectionMutation) ClearField(name string) error
- func (m *MovieCollectionMutation) ClearMovieCollectionShares()
- func (m *MovieCollectionMutation) ClearMovies()
- func (m *MovieCollectionMutation) ClearOwner()
- func (m *MovieCollectionMutation) ClearedEdges() []string
- func (m *MovieCollectionMutation) ClearedFields() []string
- func (m MovieCollectionMutation) Client() *Client
- func (m *MovieCollectionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MovieCollectionMutation) EdgeCleared(name string) bool
- func (m *MovieCollectionMutation) Field(name string) (ent.Value, bool)
- func (m *MovieCollectionMutation) FieldCleared(name string) bool
- func (m *MovieCollectionMutation) Fields() []string
- func (m *MovieCollectionMutation) ID() (id int, exists bool)
- func (m *MovieCollectionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MovieCollectionMutation) MovieCollectionSharesCleared() bool
- func (m *MovieCollectionMutation) MovieCollectionSharesIDs() (ids []int)
- func (m *MovieCollectionMutation) MoviesCleared() bool
- func (m *MovieCollectionMutation) MoviesIDs() (ids []int)
- func (m *MovieCollectionMutation) Name() (r string, exists bool)
- func (m *MovieCollectionMutation) Note() (r string, exists bool)
- func (m *MovieCollectionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MovieCollectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MovieCollectionMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MovieCollectionMutation) OldNote(ctx context.Context) (v string, err error)
- func (m *MovieCollectionMutation) OldShowWatched(ctx context.Context) (v bool, err error)
- func (m *MovieCollectionMutation) Op() Op
- func (m *MovieCollectionMutation) OwnerCleared() bool
- func (m *MovieCollectionMutation) OwnerID() (id int, exists bool)
- func (m *MovieCollectionMutation) OwnerIDs() (ids []int)
- func (m *MovieCollectionMutation) RemoveMovieCollectionShareIDs(ids ...int)
- func (m *MovieCollectionMutation) RemoveMovieIDs(ids ...int)
- func (m *MovieCollectionMutation) RemovedEdges() []string
- func (m *MovieCollectionMutation) RemovedIDs(name string) []ent.Value
- func (m *MovieCollectionMutation) RemovedMovieCollectionSharesIDs() (ids []int)
- func (m *MovieCollectionMutation) RemovedMoviesIDs() (ids []int)
- func (m *MovieCollectionMutation) ResetCreatedAt()
- func (m *MovieCollectionMutation) ResetEdge(name string) error
- func (m *MovieCollectionMutation) ResetField(name string) error
- func (m *MovieCollectionMutation) ResetMovieCollectionShares()
- func (m *MovieCollectionMutation) ResetMovies()
- func (m *MovieCollectionMutation) ResetName()
- func (m *MovieCollectionMutation) ResetNote()
- func (m *MovieCollectionMutation) ResetOwner()
- func (m *MovieCollectionMutation) ResetShowWatched()
- func (m *MovieCollectionMutation) SetCreatedAt(t time.Time)
- func (m *MovieCollectionMutation) SetField(name string, value ent.Value) error
- func (m *MovieCollectionMutation) SetName(s string)
- func (m *MovieCollectionMutation) SetNote(s string)
- func (m *MovieCollectionMutation) SetOp(op Op)
- func (m *MovieCollectionMutation) SetOwnerID(id int)
- func (m *MovieCollectionMutation) SetShowWatched(b bool)
- func (m *MovieCollectionMutation) ShowWatched() (r bool, exists bool)
- func (m MovieCollectionMutation) Tx() (*Tx, error)
- func (m *MovieCollectionMutation) Type() string
- func (m *MovieCollectionMutation) Where(ps ...predicate.MovieCollection)
- func (m *MovieCollectionMutation) WhereP(ps ...func(*sql.Selector))
- type MovieCollectionQuery
- func (mcq *MovieCollectionQuery) Aggregate(fns ...AggregateFunc) *MovieCollectionSelect
- func (mcq *MovieCollectionQuery) All(ctx context.Context) ([]*MovieCollection, error)
- func (mcq *MovieCollectionQuery) AllX(ctx context.Context) []*MovieCollection
- func (mcq *MovieCollectionQuery) Clone() *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) Count(ctx context.Context) (int, error)
- func (mcq *MovieCollectionQuery) CountX(ctx context.Context) int
- func (mcq *MovieCollectionQuery) Exist(ctx context.Context) (bool, error)
- func (mcq *MovieCollectionQuery) ExistX(ctx context.Context) bool
- func (mcq *MovieCollectionQuery) First(ctx context.Context) (*MovieCollection, error)
- func (mcq *MovieCollectionQuery) FirstID(ctx context.Context) (id int, err error)
- func (mcq *MovieCollectionQuery) FirstIDX(ctx context.Context) int
- func (mcq *MovieCollectionQuery) FirstX(ctx context.Context) *MovieCollection
- func (mcq *MovieCollectionQuery) GroupBy(field string, fields ...string) *MovieCollectionGroupBy
- func (mcq *MovieCollectionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mcq *MovieCollectionQuery) IDsX(ctx context.Context) []int
- func (mcq *MovieCollectionQuery) Limit(limit int) *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) Offset(offset int) *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) Only(ctx context.Context) (*MovieCollection, error)
- func (mcq *MovieCollectionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mcq *MovieCollectionQuery) OnlyIDX(ctx context.Context) int
- func (mcq *MovieCollectionQuery) OnlyX(ctx context.Context) *MovieCollection
- func (mcq *MovieCollectionQuery) Order(o ...moviecollection.OrderOption) *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) QueryMovieCollectionShares() *MovieCollectionShareQuery
- func (mcq *MovieCollectionQuery) QueryMovies() *MovieQuery
- func (mcq *MovieCollectionQuery) QueryOwner() *UserQuery
- func (mcq *MovieCollectionQuery) Select(fields ...string) *MovieCollectionSelect
- func (mcq *MovieCollectionQuery) Unique(unique bool) *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) Where(ps ...predicate.MovieCollection) *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) WithMovieCollectionShares(opts ...func(*MovieCollectionShareQuery)) *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) WithMovies(opts ...func(*MovieQuery)) *MovieCollectionQuery
- func (mcq *MovieCollectionQuery) WithOwner(opts ...func(*UserQuery)) *MovieCollectionQuery
- type MovieCollectionSelect
- func (mcs *MovieCollectionSelect) Aggregate(fns ...AggregateFunc) *MovieCollectionSelect
- func (s *MovieCollectionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MovieCollectionSelect) BoolX(ctx context.Context) bool
- func (s *MovieCollectionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MovieCollectionSelect) BoolsX(ctx context.Context) []bool
- func (s *MovieCollectionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MovieCollectionSelect) Float64X(ctx context.Context) float64
- func (s *MovieCollectionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MovieCollectionSelect) Float64sX(ctx context.Context) []float64
- func (s *MovieCollectionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MovieCollectionSelect) IntX(ctx context.Context) int
- func (s *MovieCollectionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MovieCollectionSelect) IntsX(ctx context.Context) []int
- func (mcs *MovieCollectionSelect) Scan(ctx context.Context, v any) error
- func (s *MovieCollectionSelect) ScanX(ctx context.Context, v any)
- func (s *MovieCollectionSelect) String(ctx context.Context) (_ string, err error)
- func (s *MovieCollectionSelect) StringX(ctx context.Context) string
- func (s *MovieCollectionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MovieCollectionSelect) StringsX(ctx context.Context) []string
- type MovieCollectionShare
- func (mcs *MovieCollectionShare) QueryMovieCollection() *MovieCollectionQuery
- func (mcs *MovieCollectionShare) QueryUser() *UserQuery
- func (mcs *MovieCollectionShare) String() string
- func (mcs *MovieCollectionShare) Unwrap() *MovieCollectionShare
- func (mcs *MovieCollectionShare) Update() *MovieCollectionShareUpdateOne
- func (mcs *MovieCollectionShare) Value(name string) (ent.Value, error)
- type MovieCollectionShareClient
- func (c *MovieCollectionShareClient) Create() *MovieCollectionShareCreate
- func (c *MovieCollectionShareClient) CreateBulk(builders ...*MovieCollectionShareCreate) *MovieCollectionShareCreateBulk
- func (c *MovieCollectionShareClient) Delete() *MovieCollectionShareDelete
- func (c *MovieCollectionShareClient) DeleteOne(mcs *MovieCollectionShare) *MovieCollectionShareDeleteOne
- func (c *MovieCollectionShareClient) DeleteOneID(id int) *MovieCollectionShareDeleteOne
- func (c *MovieCollectionShareClient) Get(ctx context.Context, id int) (*MovieCollectionShare, error)
- func (c *MovieCollectionShareClient) GetX(ctx context.Context, id int) *MovieCollectionShare
- func (c *MovieCollectionShareClient) Hooks() []Hook
- func (c *MovieCollectionShareClient) Intercept(interceptors ...Interceptor)
- func (c *MovieCollectionShareClient) Interceptors() []Interceptor
- func (c *MovieCollectionShareClient) Query() *MovieCollectionShareQuery
- func (c *MovieCollectionShareClient) QueryMovieCollection(mcs *MovieCollectionShare) *MovieCollectionQuery
- func (c *MovieCollectionShareClient) QueryUser(mcs *MovieCollectionShare) *UserQuery
- func (c *MovieCollectionShareClient) Update() *MovieCollectionShareUpdate
- func (c *MovieCollectionShareClient) UpdateOne(mcs *MovieCollectionShare) *MovieCollectionShareUpdateOne
- func (c *MovieCollectionShareClient) UpdateOneID(id int) *MovieCollectionShareUpdateOne
- func (c *MovieCollectionShareClient) Use(hooks ...Hook)
- type MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) Exec(ctx context.Context) error
- func (mcsc *MovieCollectionShareCreate) ExecX(ctx context.Context)
- func (mcsc *MovieCollectionShareCreate) Mutation() *MovieCollectionShareMutation
- func (mcsc *MovieCollectionShareCreate) Save(ctx context.Context) (*MovieCollectionShare, error)
- func (mcsc *MovieCollectionShareCreate) SaveX(ctx context.Context) *MovieCollectionShare
- func (mcsc *MovieCollectionShareCreate) SetCanEdit(b bool) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetCreatedAt(t time.Time) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetMovieCollection(m *MovieCollection) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetMovieCollectionID(id int) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetNillableCanEdit(b *bool) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetNillableCreatedAt(t *time.Time) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetNillableMovieCollectionID(id *int) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetNillableUserID(id *int) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetUser(u *User) *MovieCollectionShareCreate
- func (mcsc *MovieCollectionShareCreate) SetUserID(id int) *MovieCollectionShareCreate
- type MovieCollectionShareCreateBulk
- func (mcscb *MovieCollectionShareCreateBulk) Exec(ctx context.Context) error
- func (mcscb *MovieCollectionShareCreateBulk) ExecX(ctx context.Context)
- func (mcscb *MovieCollectionShareCreateBulk) Save(ctx context.Context) ([]*MovieCollectionShare, error)
- func (mcscb *MovieCollectionShareCreateBulk) SaveX(ctx context.Context) []*MovieCollectionShare
- type MovieCollectionShareDelete
- type MovieCollectionShareDeleteOne
- type MovieCollectionShareEdges
- type MovieCollectionShareGroupBy
- func (mcsgb *MovieCollectionShareGroupBy) Aggregate(fns ...AggregateFunc) *MovieCollectionShareGroupBy
- func (s *MovieCollectionShareGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MovieCollectionShareGroupBy) BoolX(ctx context.Context) bool
- func (s *MovieCollectionShareGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MovieCollectionShareGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MovieCollectionShareGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MovieCollectionShareGroupBy) Float64X(ctx context.Context) float64
- func (s *MovieCollectionShareGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MovieCollectionShareGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MovieCollectionShareGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MovieCollectionShareGroupBy) IntX(ctx context.Context) int
- func (s *MovieCollectionShareGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MovieCollectionShareGroupBy) IntsX(ctx context.Context) []int
- func (mcsgb *MovieCollectionShareGroupBy) Scan(ctx context.Context, v any) error
- func (s *MovieCollectionShareGroupBy) ScanX(ctx context.Context, v any)
- func (s *MovieCollectionShareGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MovieCollectionShareGroupBy) StringX(ctx context.Context) string
- func (s *MovieCollectionShareGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MovieCollectionShareGroupBy) StringsX(ctx context.Context) []string
- type MovieCollectionShareMutation
- func (m *MovieCollectionShareMutation) AddField(name string, value ent.Value) error
- func (m *MovieCollectionShareMutation) AddedEdges() []string
- func (m *MovieCollectionShareMutation) AddedField(name string) (ent.Value, bool)
- func (m *MovieCollectionShareMutation) AddedFields() []string
- func (m *MovieCollectionShareMutation) AddedIDs(name string) []ent.Value
- func (m *MovieCollectionShareMutation) CanEdit() (r bool, exists bool)
- func (m *MovieCollectionShareMutation) ClearEdge(name string) error
- func (m *MovieCollectionShareMutation) ClearField(name string) error
- func (m *MovieCollectionShareMutation) ClearMovieCollection()
- func (m *MovieCollectionShareMutation) ClearUser()
- func (m *MovieCollectionShareMutation) ClearedEdges() []string
- func (m *MovieCollectionShareMutation) ClearedFields() []string
- func (m MovieCollectionShareMutation) Client() *Client
- func (m *MovieCollectionShareMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MovieCollectionShareMutation) EdgeCleared(name string) bool
- func (m *MovieCollectionShareMutation) Field(name string) (ent.Value, bool)
- func (m *MovieCollectionShareMutation) FieldCleared(name string) bool
- func (m *MovieCollectionShareMutation) Fields() []string
- func (m *MovieCollectionShareMutation) ID() (id int, exists bool)
- func (m *MovieCollectionShareMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MovieCollectionShareMutation) MovieCollectionCleared() bool
- func (m *MovieCollectionShareMutation) MovieCollectionID() (id int, exists bool)
- func (m *MovieCollectionShareMutation) MovieCollectionIDs() (ids []int)
- func (m *MovieCollectionShareMutation) OldCanEdit(ctx context.Context) (v bool, err error)
- func (m *MovieCollectionShareMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MovieCollectionShareMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MovieCollectionShareMutation) Op() Op
- func (m *MovieCollectionShareMutation) RemovedEdges() []string
- func (m *MovieCollectionShareMutation) RemovedIDs(name string) []ent.Value
- func (m *MovieCollectionShareMutation) ResetCanEdit()
- func (m *MovieCollectionShareMutation) ResetCreatedAt()
- func (m *MovieCollectionShareMutation) ResetEdge(name string) error
- func (m *MovieCollectionShareMutation) ResetField(name string) error
- func (m *MovieCollectionShareMutation) ResetMovieCollection()
- func (m *MovieCollectionShareMutation) ResetUser()
- func (m *MovieCollectionShareMutation) SetCanEdit(b bool)
- func (m *MovieCollectionShareMutation) SetCreatedAt(t time.Time)
- func (m *MovieCollectionShareMutation) SetField(name string, value ent.Value) error
- func (m *MovieCollectionShareMutation) SetMovieCollectionID(id int)
- func (m *MovieCollectionShareMutation) SetOp(op Op)
- func (m *MovieCollectionShareMutation) SetUserID(id int)
- func (m MovieCollectionShareMutation) Tx() (*Tx, error)
- func (m *MovieCollectionShareMutation) Type() string
- func (m *MovieCollectionShareMutation) UserCleared() bool
- func (m *MovieCollectionShareMutation) UserID() (id int, exists bool)
- func (m *MovieCollectionShareMutation) UserIDs() (ids []int)
- func (m *MovieCollectionShareMutation) Where(ps ...predicate.MovieCollectionShare)
- func (m *MovieCollectionShareMutation) WhereP(ps ...func(*sql.Selector))
- type MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) Aggregate(fns ...AggregateFunc) *MovieCollectionShareSelect
- func (mcsq *MovieCollectionShareQuery) All(ctx context.Context) ([]*MovieCollectionShare, error)
- func (mcsq *MovieCollectionShareQuery) AllX(ctx context.Context) []*MovieCollectionShare
- func (mcsq *MovieCollectionShareQuery) Clone() *MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) Count(ctx context.Context) (int, error)
- func (mcsq *MovieCollectionShareQuery) CountX(ctx context.Context) int
- func (mcsq *MovieCollectionShareQuery) Exist(ctx context.Context) (bool, error)
- func (mcsq *MovieCollectionShareQuery) ExistX(ctx context.Context) bool
- func (mcsq *MovieCollectionShareQuery) First(ctx context.Context) (*MovieCollectionShare, error)
- func (mcsq *MovieCollectionShareQuery) FirstID(ctx context.Context) (id int, err error)
- func (mcsq *MovieCollectionShareQuery) FirstIDX(ctx context.Context) int
- func (mcsq *MovieCollectionShareQuery) FirstX(ctx context.Context) *MovieCollectionShare
- func (mcsq *MovieCollectionShareQuery) GroupBy(field string, fields ...string) *MovieCollectionShareGroupBy
- func (mcsq *MovieCollectionShareQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mcsq *MovieCollectionShareQuery) IDsX(ctx context.Context) []int
- func (mcsq *MovieCollectionShareQuery) Limit(limit int) *MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) Offset(offset int) *MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) Only(ctx context.Context) (*MovieCollectionShare, error)
- func (mcsq *MovieCollectionShareQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mcsq *MovieCollectionShareQuery) OnlyIDX(ctx context.Context) int
- func (mcsq *MovieCollectionShareQuery) OnlyX(ctx context.Context) *MovieCollectionShare
- func (mcsq *MovieCollectionShareQuery) Order(o ...moviecollectionshare.OrderOption) *MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) QueryMovieCollection() *MovieCollectionQuery
- func (mcsq *MovieCollectionShareQuery) QueryUser() *UserQuery
- func (mcsq *MovieCollectionShareQuery) Select(fields ...string) *MovieCollectionShareSelect
- func (mcsq *MovieCollectionShareQuery) Unique(unique bool) *MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) WithMovieCollection(opts ...func(*MovieCollectionQuery)) *MovieCollectionShareQuery
- func (mcsq *MovieCollectionShareQuery) WithUser(opts ...func(*UserQuery)) *MovieCollectionShareQuery
- type MovieCollectionShareSelect
- func (mcss *MovieCollectionShareSelect) Aggregate(fns ...AggregateFunc) *MovieCollectionShareSelect
- func (s *MovieCollectionShareSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MovieCollectionShareSelect) BoolX(ctx context.Context) bool
- func (s *MovieCollectionShareSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MovieCollectionShareSelect) BoolsX(ctx context.Context) []bool
- func (s *MovieCollectionShareSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MovieCollectionShareSelect) Float64X(ctx context.Context) float64
- func (s *MovieCollectionShareSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MovieCollectionShareSelect) Float64sX(ctx context.Context) []float64
- func (s *MovieCollectionShareSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MovieCollectionShareSelect) IntX(ctx context.Context) int
- func (s *MovieCollectionShareSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MovieCollectionShareSelect) IntsX(ctx context.Context) []int
- func (mcss *MovieCollectionShareSelect) Scan(ctx context.Context, v any) error
- func (s *MovieCollectionShareSelect) ScanX(ctx context.Context, v any)
- func (s *MovieCollectionShareSelect) String(ctx context.Context) (_ string, err error)
- func (s *MovieCollectionShareSelect) StringX(ctx context.Context) string
- func (s *MovieCollectionShareSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MovieCollectionShareSelect) StringsX(ctx context.Context) []string
- type MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) ClearMovieCollection() *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) ClearUser() *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) Exec(ctx context.Context) error
- func (mcsu *MovieCollectionShareUpdate) ExecX(ctx context.Context)
- func (mcsu *MovieCollectionShareUpdate) Mutation() *MovieCollectionShareMutation
- func (mcsu *MovieCollectionShareUpdate) Save(ctx context.Context) (int, error)
- func (mcsu *MovieCollectionShareUpdate) SaveX(ctx context.Context) int
- func (mcsu *MovieCollectionShareUpdate) SetCanEdit(b bool) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetCreatedAt(t time.Time) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetMovieCollection(m *MovieCollection) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetMovieCollectionID(id int) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetNillableCanEdit(b *bool) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetNillableCreatedAt(t *time.Time) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetNillableMovieCollectionID(id *int) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetNillableUserID(id *int) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetUser(u *User) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) SetUserID(id int) *MovieCollectionShareUpdate
- func (mcsu *MovieCollectionShareUpdate) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareUpdate
- type MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) ClearMovieCollection() *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) ClearUser() *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) Exec(ctx context.Context) error
- func (mcsuo *MovieCollectionShareUpdateOne) ExecX(ctx context.Context)
- func (mcsuo *MovieCollectionShareUpdateOne) Mutation() *MovieCollectionShareMutation
- func (mcsuo *MovieCollectionShareUpdateOne) Save(ctx context.Context) (*MovieCollectionShare, error)
- func (mcsuo *MovieCollectionShareUpdateOne) SaveX(ctx context.Context) *MovieCollectionShare
- func (mcsuo *MovieCollectionShareUpdateOne) Select(field string, fields ...string) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetCanEdit(b bool) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetCreatedAt(t time.Time) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetMovieCollection(m *MovieCollection) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetMovieCollectionID(id int) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetNillableCanEdit(b *bool) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetNillableCreatedAt(t *time.Time) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetNillableMovieCollectionID(id *int) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetNillableUserID(id *int) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetUser(u *User) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) SetUserID(id int) *MovieCollectionShareUpdateOne
- func (mcsuo *MovieCollectionShareUpdateOne) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareUpdateOne
- type MovieCollectionShares
- type MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) AddMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) AddMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) AddMovieIDs(ids ...int) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) AddMovies(m ...*Movie) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) ClearMovieCollectionShares() *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) ClearMovies() *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) ClearOwner() *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) Exec(ctx context.Context) error
- func (mcu *MovieCollectionUpdate) ExecX(ctx context.Context)
- func (mcu *MovieCollectionUpdate) Mutation() *MovieCollectionMutation
- func (mcu *MovieCollectionUpdate) RemoveMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) RemoveMovieIDs(ids ...int) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) RemoveMovies(m ...*Movie) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) Save(ctx context.Context) (int, error)
- func (mcu *MovieCollectionUpdate) SaveX(ctx context.Context) int
- func (mcu *MovieCollectionUpdate) SetCreatedAt(t time.Time) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetName(s string) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetNillableCreatedAt(t *time.Time) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetNillableName(s *string) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetNillableNote(s *string) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetNillableOwnerID(id *int) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetNillableShowWatched(b *bool) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetNote(s string) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetOwner(u *User) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetOwnerID(id int) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) SetShowWatched(b bool) *MovieCollectionUpdate
- func (mcu *MovieCollectionUpdate) Where(ps ...predicate.MovieCollection) *MovieCollectionUpdate
- type MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) AddMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) AddMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) AddMovieIDs(ids ...int) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) AddMovies(m ...*Movie) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) ClearMovieCollectionShares() *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) ClearMovies() *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) ClearOwner() *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) Exec(ctx context.Context) error
- func (mcuo *MovieCollectionUpdateOne) ExecX(ctx context.Context)
- func (mcuo *MovieCollectionUpdateOne) Mutation() *MovieCollectionMutation
- func (mcuo *MovieCollectionUpdateOne) RemoveMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) RemoveMovieIDs(ids ...int) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) RemoveMovies(m ...*Movie) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) Save(ctx context.Context) (*MovieCollection, error)
- func (mcuo *MovieCollectionUpdateOne) SaveX(ctx context.Context) *MovieCollection
- func (mcuo *MovieCollectionUpdateOne) Select(field string, fields ...string) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetCreatedAt(t time.Time) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetName(s string) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetNillableCreatedAt(t *time.Time) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetNillableName(s *string) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetNillableNote(s *string) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetNillableOwnerID(id *int) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetNillableShowWatched(b *bool) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetNote(s string) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetOwner(u *User) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetOwnerID(id int) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) SetShowWatched(b bool) *MovieCollectionUpdateOne
- func (mcuo *MovieCollectionUpdateOne) Where(ps ...predicate.MovieCollection) *MovieCollectionUpdateOne
- type MovieCollections
- type MovieCreate
- func (mc *MovieCreate) Exec(ctx context.Context) error
- func (mc *MovieCreate) ExecX(ctx context.Context)
- func (mc *MovieCreate) Mutation() *MovieMutation
- func (mc *MovieCreate) Save(ctx context.Context) (*Movie, error)
- func (mc *MovieCreate) SaveX(ctx context.Context) *Movie
- func (mc *MovieCreate) SetCreatedAt(t time.Time) *MovieCreate
- func (mc *MovieCreate) SetMovieCollection(m *MovieCollection) *MovieCreate
- func (mc *MovieCreate) SetMovieCollectionID(id int) *MovieCreate
- func (mc *MovieCreate) SetName(s string) *MovieCreate
- func (mc *MovieCreate) SetNillableCreatedAt(t *time.Time) *MovieCreate
- func (mc *MovieCreate) SetNillableMovieCollectionID(id *int) *MovieCreate
- func (mc *MovieCreate) SetNillableNote(s *string) *MovieCreate
- func (mc *MovieCreate) SetNillableWatched(b *bool) *MovieCreate
- func (mc *MovieCreate) SetNote(s string) *MovieCreate
- func (mc *MovieCreate) SetWatched(b bool) *MovieCreate
- type MovieCreateBulk
- type MovieDelete
- type MovieDeleteOne
- type MovieEdges
- type MovieGroupBy
- func (mgb *MovieGroupBy) Aggregate(fns ...AggregateFunc) *MovieGroupBy
- func (s *MovieGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MovieGroupBy) BoolX(ctx context.Context) bool
- func (s *MovieGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MovieGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MovieGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MovieGroupBy) Float64X(ctx context.Context) float64
- func (s *MovieGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MovieGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MovieGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MovieGroupBy) IntX(ctx context.Context) int
- func (s *MovieGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MovieGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MovieGroupBy) Scan(ctx context.Context, v any) error
- func (s *MovieGroupBy) ScanX(ctx context.Context, v any)
- func (s *MovieGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MovieGroupBy) StringX(ctx context.Context) string
- func (s *MovieGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MovieGroupBy) StringsX(ctx context.Context) []string
- type MovieMutation
- func (m *MovieMutation) AddField(name string, value ent.Value) error
- func (m *MovieMutation) AddedEdges() []string
- func (m *MovieMutation) AddedField(name string) (ent.Value, bool)
- func (m *MovieMutation) AddedFields() []string
- func (m *MovieMutation) AddedIDs(name string) []ent.Value
- func (m *MovieMutation) ClearEdge(name string) error
- func (m *MovieMutation) ClearField(name string) error
- func (m *MovieMutation) ClearMovieCollection()
- func (m *MovieMutation) ClearedEdges() []string
- func (m *MovieMutation) ClearedFields() []string
- func (m MovieMutation) Client() *Client
- func (m *MovieMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MovieMutation) EdgeCleared(name string) bool
- func (m *MovieMutation) Field(name string) (ent.Value, bool)
- func (m *MovieMutation) FieldCleared(name string) bool
- func (m *MovieMutation) Fields() []string
- func (m *MovieMutation) ID() (id int, exists bool)
- func (m *MovieMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MovieMutation) MovieCollectionCleared() bool
- func (m *MovieMutation) MovieCollectionID() (id int, exists bool)
- func (m *MovieMutation) MovieCollectionIDs() (ids []int)
- func (m *MovieMutation) Name() (r string, exists bool)
- func (m *MovieMutation) Note() (r string, exists bool)
- func (m *MovieMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MovieMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MovieMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MovieMutation) OldNote(ctx context.Context) (v string, err error)
- func (m *MovieMutation) OldWatched(ctx context.Context) (v bool, err error)
- func (m *MovieMutation) Op() Op
- func (m *MovieMutation) RemovedEdges() []string
- func (m *MovieMutation) RemovedIDs(name string) []ent.Value
- func (m *MovieMutation) ResetCreatedAt()
- func (m *MovieMutation) ResetEdge(name string) error
- func (m *MovieMutation) ResetField(name string) error
- func (m *MovieMutation) ResetMovieCollection()
- func (m *MovieMutation) ResetName()
- func (m *MovieMutation) ResetNote()
- func (m *MovieMutation) ResetWatched()
- func (m *MovieMutation) SetCreatedAt(t time.Time)
- func (m *MovieMutation) SetField(name string, value ent.Value) error
- func (m *MovieMutation) SetMovieCollectionID(id int)
- func (m *MovieMutation) SetName(s string)
- func (m *MovieMutation) SetNote(s string)
- func (m *MovieMutation) SetOp(op Op)
- func (m *MovieMutation) SetWatched(b bool)
- func (m MovieMutation) Tx() (*Tx, error)
- func (m *MovieMutation) Type() string
- func (m *MovieMutation) Watched() (r bool, exists bool)
- func (m *MovieMutation) Where(ps ...predicate.Movie)
- func (m *MovieMutation) WhereP(ps ...func(*sql.Selector))
- type MovieQuery
- func (mq *MovieQuery) Aggregate(fns ...AggregateFunc) *MovieSelect
- func (mq *MovieQuery) All(ctx context.Context) ([]*Movie, error)
- func (mq *MovieQuery) AllX(ctx context.Context) []*Movie
- func (mq *MovieQuery) Clone() *MovieQuery
- func (mq *MovieQuery) Count(ctx context.Context) (int, error)
- func (mq *MovieQuery) CountX(ctx context.Context) int
- func (mq *MovieQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MovieQuery) ExistX(ctx context.Context) bool
- func (mq *MovieQuery) First(ctx context.Context) (*Movie, error)
- func (mq *MovieQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MovieQuery) FirstIDX(ctx context.Context) int
- func (mq *MovieQuery) FirstX(ctx context.Context) *Movie
- func (mq *MovieQuery) GroupBy(field string, fields ...string) *MovieGroupBy
- func (mq *MovieQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mq *MovieQuery) IDsX(ctx context.Context) []int
- func (mq *MovieQuery) Limit(limit int) *MovieQuery
- func (mq *MovieQuery) Offset(offset int) *MovieQuery
- func (mq *MovieQuery) Only(ctx context.Context) (*Movie, error)
- func (mq *MovieQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MovieQuery) OnlyIDX(ctx context.Context) int
- func (mq *MovieQuery) OnlyX(ctx context.Context) *Movie
- func (mq *MovieQuery) Order(o ...movie.OrderOption) *MovieQuery
- func (mq *MovieQuery) QueryMovieCollection() *MovieCollectionQuery
- func (mq *MovieQuery) Select(fields ...string) *MovieSelect
- func (mq *MovieQuery) Unique(unique bool) *MovieQuery
- func (mq *MovieQuery) Where(ps ...predicate.Movie) *MovieQuery
- func (mq *MovieQuery) WithMovieCollection(opts ...func(*MovieCollectionQuery)) *MovieQuery
- type MovieSelect
- func (ms *MovieSelect) Aggregate(fns ...AggregateFunc) *MovieSelect
- func (s *MovieSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MovieSelect) BoolX(ctx context.Context) bool
- func (s *MovieSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MovieSelect) BoolsX(ctx context.Context) []bool
- func (s *MovieSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MovieSelect) Float64X(ctx context.Context) float64
- func (s *MovieSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MovieSelect) Float64sX(ctx context.Context) []float64
- func (s *MovieSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MovieSelect) IntX(ctx context.Context) int
- func (s *MovieSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MovieSelect) IntsX(ctx context.Context) []int
- func (ms *MovieSelect) Scan(ctx context.Context, v any) error
- func (s *MovieSelect) ScanX(ctx context.Context, v any)
- func (s *MovieSelect) String(ctx context.Context) (_ string, err error)
- func (s *MovieSelect) StringX(ctx context.Context) string
- func (s *MovieSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MovieSelect) StringsX(ctx context.Context) []string
- type MovieUpdate
- func (mu *MovieUpdate) ClearMovieCollection() *MovieUpdate
- func (mu *MovieUpdate) Exec(ctx context.Context) error
- func (mu *MovieUpdate) ExecX(ctx context.Context)
- func (mu *MovieUpdate) Mutation() *MovieMutation
- func (mu *MovieUpdate) Save(ctx context.Context) (int, error)
- func (mu *MovieUpdate) SaveX(ctx context.Context) int
- func (mu *MovieUpdate) SetCreatedAt(t time.Time) *MovieUpdate
- func (mu *MovieUpdate) SetMovieCollection(m *MovieCollection) *MovieUpdate
- func (mu *MovieUpdate) SetMovieCollectionID(id int) *MovieUpdate
- func (mu *MovieUpdate) SetName(s string) *MovieUpdate
- func (mu *MovieUpdate) SetNillableCreatedAt(t *time.Time) *MovieUpdate
- func (mu *MovieUpdate) SetNillableMovieCollectionID(id *int) *MovieUpdate
- func (mu *MovieUpdate) SetNillableNote(s *string) *MovieUpdate
- func (mu *MovieUpdate) SetNillableWatched(b *bool) *MovieUpdate
- func (mu *MovieUpdate) SetNote(s string) *MovieUpdate
- func (mu *MovieUpdate) SetWatched(b bool) *MovieUpdate
- func (mu *MovieUpdate) Where(ps ...predicate.Movie) *MovieUpdate
- type MovieUpdateOne
- func (muo *MovieUpdateOne) ClearMovieCollection() *MovieUpdateOne
- func (muo *MovieUpdateOne) Exec(ctx context.Context) error
- func (muo *MovieUpdateOne) ExecX(ctx context.Context)
- func (muo *MovieUpdateOne) Mutation() *MovieMutation
- func (muo *MovieUpdateOne) Save(ctx context.Context) (*Movie, error)
- func (muo *MovieUpdateOne) SaveX(ctx context.Context) *Movie
- func (muo *MovieUpdateOne) Select(field string, fields ...string) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetCreatedAt(t time.Time) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetMovieCollection(m *MovieCollection) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetMovieCollectionID(id int) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetName(s string) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetNillableCreatedAt(t *time.Time) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetNillableMovieCollectionID(id *int) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetNillableNote(s *string) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetNillableWatched(b *bool) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetNote(s string) *MovieUpdateOne
- func (muo *MovieUpdateOne) SetWatched(b bool) *MovieUpdateOne
- func (muo *MovieUpdateOne) Where(ps ...predicate.Movie) *MovieUpdateOne
- type Movies
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- func (u *User) QueryAmazonLists() *AmazonListQuery
- func (u *User) QueryAmazonShares() *AmazonShareQuery
- func (u *User) QueryDrinks() *DrinkQuery
- func (u *User) QueryGroceryListShares() *GroceryListShareQuery
- func (u *User) QueryGroceryLists() *GroceryListQuery
- func (u *User) QueryMovieCollectionShares() *MovieCollectionShareQuery
- func (u *User) QueryMovieCollections() *MovieCollectionQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryAmazonLists(u *User) *AmazonListQuery
- func (c *UserClient) QueryAmazonShares(u *User) *AmazonShareQuery
- func (c *UserClient) QueryDrinks(u *User) *DrinkQuery
- func (c *UserClient) QueryGroceryListShares(u *User) *GroceryListShareQuery
- func (c *UserClient) QueryGroceryLists(u *User) *GroceryListQuery
- func (c *UserClient) QueryMovieCollectionShares(u *User) *MovieCollectionShareQuery
- func (c *UserClient) QueryMovieCollections(u *User) *MovieCollectionQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddAmazonListIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddAmazonLists(a ...*AmazonList) *UserCreate
- func (uc *UserCreate) AddAmazonShareIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddAmazonShares(a ...*AmazonShare) *UserCreate
- func (uc *UserCreate) AddDrinkIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddDrinks(d ...*Drink) *UserCreate
- func (uc *UserCreate) AddGroceryListIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddGroceryListShareIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddGroceryListShares(g ...*GroceryListShare) *UserCreate
- func (uc *UserCreate) AddGroceryLists(g ...*GroceryList) *UserCreate
- func (uc *UserCreate) AddMovieCollectionIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddMovieCollectionShareIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddMovieCollectionShares(m ...*MovieCollectionShare) *UserCreate
- func (uc *UserCreate) AddMovieCollections(m ...*MovieCollection) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDisplayName(s string) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetLastLogin(t time.Time) *UserCreate
- func (uc *UserCreate) SetLocked(b bool) *UserCreate
- func (uc *UserCreate) SetNameChanges(i int8) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableLocked(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableNameChanges(i *int8) *UserCreate
- func (uc *UserCreate) SetNillableVerified(b *bool) *UserCreate
- func (uc *UserCreate) SetVerified(b bool) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) AmazonListsOrErr() ([]*AmazonList, error)
- func (e UserEdges) AmazonSharesOrErr() ([]*AmazonShare, error)
- func (e UserEdges) DrinksOrErr() ([]*Drink, error)
- func (e UserEdges) GroceryListSharesOrErr() ([]*GroceryListShare, error)
- func (e UserEdges) GroceryListsOrErr() ([]*GroceryList, error)
- func (e UserEdges) MovieCollectionSharesOrErr() ([]*MovieCollectionShare, error)
- func (e UserEdges) MovieCollectionsOrErr() ([]*MovieCollection, error)
- 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) AddAmazonListIDs(ids ...int)
- func (m *UserMutation) AddAmazonShareIDs(ids ...int)
- func (m *UserMutation) AddDrinkIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddGroceryListIDs(ids ...int)
- func (m *UserMutation) AddGroceryListShareIDs(ids ...int)
- func (m *UserMutation) AddMovieCollectionIDs(ids ...int)
- func (m *UserMutation) AddMovieCollectionShareIDs(ids ...int)
- func (m *UserMutation) AddNameChanges(i int8)
- 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) AddedNameChanges() (r int8, exists bool)
- func (m *UserMutation) AmazonListsCleared() bool
- func (m *UserMutation) AmazonListsIDs() (ids []int)
- func (m *UserMutation) AmazonSharesCleared() bool
- func (m *UserMutation) AmazonSharesIDs() (ids []int)
- func (m *UserMutation) ClearAmazonLists()
- func (m *UserMutation) ClearAmazonShares()
- func (m *UserMutation) ClearDrinks()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearGroceryListShares()
- func (m *UserMutation) ClearGroceryLists()
- func (m *UserMutation) ClearMovieCollectionShares()
- func (m *UserMutation) ClearMovieCollections()
- 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) DisplayName() (r string, exists bool)
- func (m *UserMutation) DrinksCleared() bool
- func (m *UserMutation) DrinksIDs() (ids []int)
- 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) GroceryListSharesCleared() bool
- func (m *UserMutation) GroceryListSharesIDs() (ids []int)
- func (m *UserMutation) GroceryListsCleared() bool
- func (m *UserMutation) GroceryListsIDs() (ids []int)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) LastLogin() (r time.Time, exists bool)
- func (m *UserMutation) Locked() (r bool, exists bool)
- func (m *UserMutation) MovieCollectionSharesCleared() bool
- func (m *UserMutation) MovieCollectionSharesIDs() (ids []int)
- func (m *UserMutation) MovieCollectionsCleared() bool
- func (m *UserMutation) MovieCollectionsIDs() (ids []int)
- func (m *UserMutation) NameChanges() (r int8, exists bool)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, 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) OldLastLogin(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldLocked(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldNameChanges(ctx context.Context) (v int8, err error)
- func (m *UserMutation) OldVerified(ctx context.Context) (v bool, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemoveAmazonListIDs(ids ...int)
- func (m *UserMutation) RemoveAmazonShareIDs(ids ...int)
- func (m *UserMutation) RemoveDrinkIDs(ids ...int)
- func (m *UserMutation) RemoveGroceryListIDs(ids ...int)
- func (m *UserMutation) RemoveGroceryListShareIDs(ids ...int)
- func (m *UserMutation) RemoveMovieCollectionIDs(ids ...int)
- func (m *UserMutation) RemoveMovieCollectionShareIDs(ids ...int)
- func (m *UserMutation) RemovedAmazonListsIDs() (ids []int)
- func (m *UserMutation) RemovedAmazonSharesIDs() (ids []int)
- func (m *UserMutation) RemovedDrinksIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedGroceryListSharesIDs() (ids []int)
- func (m *UserMutation) RemovedGroceryListsIDs() (ids []int)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedMovieCollectionSharesIDs() (ids []int)
- func (m *UserMutation) RemovedMovieCollectionsIDs() (ids []int)
- func (m *UserMutation) ResetAmazonLists()
- func (m *UserMutation) ResetAmazonShares()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDisplayName()
- func (m *UserMutation) ResetDrinks()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGroceryListShares()
- func (m *UserMutation) ResetGroceryLists()
- func (m *UserMutation) ResetLastLogin()
- func (m *UserMutation) ResetLocked()
- func (m *UserMutation) ResetMovieCollectionShares()
- func (m *UserMutation) ResetMovieCollections()
- func (m *UserMutation) ResetNameChanges()
- func (m *UserMutation) ResetVerified()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDisplayName(s string)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetLastLogin(t time.Time)
- func (m *UserMutation) SetLocked(b bool)
- func (m *UserMutation) SetNameChanges(i int8)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetVerified(b bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Verified() (r bool, 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 int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryAmazonLists() *AmazonListQuery
- func (uq *UserQuery) QueryAmazonShares() *AmazonShareQuery
- func (uq *UserQuery) QueryDrinks() *DrinkQuery
- func (uq *UserQuery) QueryGroceryListShares() *GroceryListShareQuery
- func (uq *UserQuery) QueryGroceryLists() *GroceryListQuery
- func (uq *UserQuery) QueryMovieCollectionShares() *MovieCollectionShareQuery
- func (uq *UserQuery) QueryMovieCollections() *MovieCollectionQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithAmazonLists(opts ...func(*AmazonListQuery)) *UserQuery
- func (uq *UserQuery) WithAmazonShares(opts ...func(*AmazonShareQuery)) *UserQuery
- func (uq *UserQuery) WithDrinks(opts ...func(*DrinkQuery)) *UserQuery
- func (uq *UserQuery) WithGroceryListShares(opts ...func(*GroceryListShareQuery)) *UserQuery
- func (uq *UserQuery) WithGroceryLists(opts ...func(*GroceryListQuery)) *UserQuery
- func (uq *UserQuery) WithMovieCollectionShares(opts ...func(*MovieCollectionShareQuery)) *UserQuery
- func (uq *UserQuery) WithMovieCollections(opts ...func(*MovieCollectionQuery)) *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) AddAmazonListIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddAmazonLists(a ...*AmazonList) *UserUpdate
- func (uu *UserUpdate) AddAmazonShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddAmazonShares(a ...*AmazonShare) *UserUpdate
- func (uu *UserUpdate) AddDrinkIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddDrinks(d ...*Drink) *UserUpdate
- func (uu *UserUpdate) AddGroceryListIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddGroceryListShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddGroceryListShares(g ...*GroceryListShare) *UserUpdate
- func (uu *UserUpdate) AddGroceryLists(g ...*GroceryList) *UserUpdate
- func (uu *UserUpdate) AddMovieCollectionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddMovieCollectionShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdate
- func (uu *UserUpdate) AddMovieCollections(m ...*MovieCollection) *UserUpdate
- func (uu *UserUpdate) AddNameChanges(i int8) *UserUpdate
- func (uu *UserUpdate) ClearAmazonLists() *UserUpdate
- func (uu *UserUpdate) ClearAmazonShares() *UserUpdate
- func (uu *UserUpdate) ClearDrinks() *UserUpdate
- func (uu *UserUpdate) ClearGroceryListShares() *UserUpdate
- func (uu *UserUpdate) ClearGroceryLists() *UserUpdate
- func (uu *UserUpdate) ClearMovieCollectionShares() *UserUpdate
- func (uu *UserUpdate) ClearMovieCollections() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveAmazonListIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveAmazonLists(a ...*AmazonList) *UserUpdate
- func (uu *UserUpdate) RemoveAmazonShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveAmazonShares(a ...*AmazonShare) *UserUpdate
- func (uu *UserUpdate) RemoveDrinkIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveDrinks(d ...*Drink) *UserUpdate
- func (uu *UserUpdate) RemoveGroceryListIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveGroceryListShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveGroceryListShares(g ...*GroceryListShare) *UserUpdate
- func (uu *UserUpdate) RemoveGroceryLists(g ...*GroceryList) *UserUpdate
- func (uu *UserUpdate) RemoveMovieCollectionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveMovieCollectionShareIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdate
- func (uu *UserUpdate) RemoveMovieCollections(m ...*MovieCollection) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetLocked(b bool) *UserUpdate
- func (uu *UserUpdate) SetNameChanges(i int8) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLocked(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableNameChanges(i *int8) *UserUpdate
- func (uu *UserUpdate) SetNillableVerified(b *bool) *UserUpdate
- func (uu *UserUpdate) SetVerified(b bool) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAmazonListIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddAmazonLists(a ...*AmazonList) *UserUpdateOne
- func (uuo *UserUpdateOne) AddAmazonShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddAmazonShares(a ...*AmazonShare) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDrinkIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddDrinks(d ...*Drink) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroceryListIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroceryListShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroceryListShares(g ...*GroceryListShare) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroceryLists(g ...*GroceryList) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMovieCollectionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMovieCollectionShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMovieCollections(m ...*MovieCollection) *UserUpdateOne
- func (uuo *UserUpdateOne) AddNameChanges(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAmazonLists() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAmazonShares() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDrinks() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroceryListShares() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroceryLists() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMovieCollectionShares() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMovieCollections() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveAmazonListIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveAmazonLists(a ...*AmazonList) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveAmazonShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveAmazonShares(a ...*AmazonShare) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveDrinkIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveDrinks(d ...*Drink) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroceryListIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroceryListShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroceryListShares(g ...*GroceryListShare) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroceryLists(g ...*GroceryList) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMovieCollectionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMovieCollectionShareIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMovieCollections(m ...*MovieCollection) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastLogin(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLocked(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNameChanges(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLocked(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableNameChanges(i *int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableVerified(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetVerified(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAmazonList = "AmazonList" TypeAmazonOrder = "AmazonOrder" TypeDrink = "Drink" TypeGroceryList = "GroceryList" TypeGroceryListItem = "GroceryListItem" TypeMovie = "Movie" TypeMovieCollection = "MovieCollection" 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 AmazonList ¶
type AmazonList struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AmazonListQuery when eager-loading is set. Edges AmazonListEdges `json:"edges"` // contains filtered or unexported fields }
AmazonList is the model entity for the AmazonList schema.
func (*AmazonList) QueryAmazonOrders ¶
func (al *AmazonList) QueryAmazonOrders() *AmazonOrderQuery
QueryAmazonOrders queries the "amazon_orders" edge of the AmazonList entity.
func (*AmazonList) QueryAmazonShares ¶
func (al *AmazonList) QueryAmazonShares() *AmazonShareQuery
QueryAmazonShares queries the "amazon_shares" edge of the AmazonList entity.
func (*AmazonList) QueryOwner ¶
func (al *AmazonList) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the AmazonList entity.
func (*AmazonList) String ¶
func (al *AmazonList) String() string
String implements the fmt.Stringer.
func (*AmazonList) Unwrap ¶
func (al *AmazonList) Unwrap() *AmazonList
Unwrap unwraps the AmazonList 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 (*AmazonList) Update ¶
func (al *AmazonList) Update() *AmazonListUpdateOne
Update returns a builder for updating this AmazonList. Note that you need to call AmazonList.Unwrap() before calling this method if this AmazonList was returned from a transaction, and the transaction was committed or rolled back.
type AmazonListClient ¶
type AmazonListClient struct {
// contains filtered or unexported fields
}
AmazonListClient is a client for the AmazonList schema.
func NewAmazonListClient ¶
func NewAmazonListClient(c config) *AmazonListClient
NewAmazonListClient returns a client for the AmazonList from the given config.
func (*AmazonListClient) Create ¶
func (c *AmazonListClient) Create() *AmazonListCreate
Create returns a builder for creating a AmazonList entity.
func (*AmazonListClient) CreateBulk ¶
func (c *AmazonListClient) CreateBulk(builders ...*AmazonListCreate) *AmazonListCreateBulk
CreateBulk returns a builder for creating a bulk of AmazonList entities.
func (*AmazonListClient) Delete ¶
func (c *AmazonListClient) Delete() *AmazonListDelete
Delete returns a delete builder for AmazonList.
func (*AmazonListClient) DeleteOne ¶
func (c *AmazonListClient) DeleteOne(al *AmazonList) *AmazonListDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AmazonListClient) DeleteOneID ¶
func (c *AmazonListClient) DeleteOneID(id int) *AmazonListDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AmazonListClient) Get ¶
func (c *AmazonListClient) Get(ctx context.Context, id int) (*AmazonList, error)
Get returns a AmazonList entity by its id.
func (*AmazonListClient) GetX ¶
func (c *AmazonListClient) GetX(ctx context.Context, id int) *AmazonList
GetX is like Get, but panics if an error occurs.
func (*AmazonListClient) Hooks ¶
func (c *AmazonListClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AmazonListClient) Intercept ¶
func (c *AmazonListClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `amazonlist.Intercept(f(g(h())))`.
func (*AmazonListClient) Interceptors ¶
func (c *AmazonListClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AmazonListClient) Query ¶
func (c *AmazonListClient) Query() *AmazonListQuery
Query returns a query builder for AmazonList.
func (*AmazonListClient) QueryAmazonOrders ¶
func (c *AmazonListClient) QueryAmazonOrders(al *AmazonList) *AmazonOrderQuery
QueryAmazonOrders queries the amazon_orders edge of a AmazonList.
func (*AmazonListClient) QueryAmazonShares ¶
func (c *AmazonListClient) QueryAmazonShares(al *AmazonList) *AmazonShareQuery
QueryAmazonShares queries the amazon_shares edge of a AmazonList.
func (*AmazonListClient) QueryOwner ¶
func (c *AmazonListClient) QueryOwner(al *AmazonList) *UserQuery
QueryOwner queries the owner edge of a AmazonList.
func (*AmazonListClient) Update ¶
func (c *AmazonListClient) Update() *AmazonListUpdate
Update returns an update builder for AmazonList.
func (*AmazonListClient) UpdateOne ¶
func (c *AmazonListClient) UpdateOne(al *AmazonList) *AmazonListUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AmazonListClient) UpdateOneID ¶
func (c *AmazonListClient) UpdateOneID(id int) *AmazonListUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AmazonListClient) Use ¶
func (c *AmazonListClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `amazonlist.Hooks(f(g(h())))`.
type AmazonListCreate ¶
type AmazonListCreate struct {
// contains filtered or unexported fields
}
AmazonListCreate is the builder for creating a AmazonList entity.
func (*AmazonListCreate) AddAmazonOrderIDs ¶
func (alc *AmazonListCreate) AddAmazonOrderIDs(ids ...int) *AmazonListCreate
AddAmazonOrderIDs adds the "amazon_orders" edge to the AmazonOrder entity by IDs.
func (*AmazonListCreate) AddAmazonOrders ¶
func (alc *AmazonListCreate) AddAmazonOrders(a ...*AmazonOrder) *AmazonListCreate
AddAmazonOrders adds the "amazon_orders" edges to the AmazonOrder entity.
func (*AmazonListCreate) AddAmazonShareIDs ¶
func (alc *AmazonListCreate) AddAmazonShareIDs(ids ...int) *AmazonListCreate
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*AmazonListCreate) AddAmazonShares ¶
func (alc *AmazonListCreate) AddAmazonShares(a ...*AmazonShare) *AmazonListCreate
AddAmazonShares adds the "amazon_shares" edges to the AmazonShare entity.
func (*AmazonListCreate) AddOwner ¶
func (alc *AmazonListCreate) AddOwner(u ...*User) *AmazonListCreate
AddOwner adds the "owner" edges to the User entity.
func (*AmazonListCreate) AddOwnerIDs ¶
func (alc *AmazonListCreate) AddOwnerIDs(ids ...int) *AmazonListCreate
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*AmazonListCreate) Exec ¶
func (alc *AmazonListCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonListCreate) ExecX ¶
func (alc *AmazonListCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonListCreate) Mutation ¶
func (alc *AmazonListCreate) Mutation() *AmazonListMutation
Mutation returns the AmazonListMutation object of the builder.
func (*AmazonListCreate) Save ¶
func (alc *AmazonListCreate) Save(ctx context.Context) (*AmazonList, error)
Save creates the AmazonList in the database.
func (*AmazonListCreate) SaveX ¶
func (alc *AmazonListCreate) SaveX(ctx context.Context) *AmazonList
SaveX calls Save and panics if Save returns an error.
func (*AmazonListCreate) SetCreatedAt ¶
func (alc *AmazonListCreate) SetCreatedAt(t time.Time) *AmazonListCreate
SetCreatedAt sets the "created_at" field.
func (*AmazonListCreate) SetNillableCreatedAt ¶
func (alc *AmazonListCreate) SetNillableCreatedAt(t *time.Time) *AmazonListCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
type AmazonListCreateBulk ¶
type AmazonListCreateBulk struct {
// contains filtered or unexported fields
}
AmazonListCreateBulk is the builder for creating many AmazonList entities in bulk.
func (*AmazonListCreateBulk) Exec ¶
func (alcb *AmazonListCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonListCreateBulk) ExecX ¶
func (alcb *AmazonListCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonListCreateBulk) Save ¶
func (alcb *AmazonListCreateBulk) Save(ctx context.Context) ([]*AmazonList, error)
Save creates the AmazonList entities in the database.
func (*AmazonListCreateBulk) SaveX ¶
func (alcb *AmazonListCreateBulk) SaveX(ctx context.Context) []*AmazonList
SaveX is like Save, but panics if an error occurs.
type AmazonListDelete ¶
type AmazonListDelete struct {
// contains filtered or unexported fields
}
AmazonListDelete is the builder for deleting a AmazonList entity.
func (*AmazonListDelete) Exec ¶
func (ald *AmazonListDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AmazonListDelete) ExecX ¶
func (ald *AmazonListDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AmazonListDelete) Where ¶
func (ald *AmazonListDelete) Where(ps ...predicate.AmazonList) *AmazonListDelete
Where appends a list predicates to the AmazonListDelete builder.
type AmazonListDeleteOne ¶
type AmazonListDeleteOne struct {
// contains filtered or unexported fields
}
AmazonListDeleteOne is the builder for deleting a single AmazonList entity.
func (*AmazonListDeleteOne) Exec ¶
func (aldo *AmazonListDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AmazonListDeleteOne) ExecX ¶
func (aldo *AmazonListDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonListDeleteOne) Where ¶
func (aldo *AmazonListDeleteOne) Where(ps ...predicate.AmazonList) *AmazonListDeleteOne
Where appends a list predicates to the AmazonListDelete builder.
type AmazonListEdges ¶
type AmazonListEdges struct { // AmazonOrders holds the value of the amazon_orders edge. AmazonOrders []*AmazonOrder `json:"amazon_orders,omitempty"` // Owner holds the value of the owner edge. Owner []*User `json:"owner,omitempty"` AmazonShares []*AmazonShare `json:"amazon_shares,omitempty"` // contains filtered or unexported fields }
AmazonListEdges holds the relations/edges for other nodes in the graph.
func (AmazonListEdges) AmazonOrdersOrErr ¶
func (e AmazonListEdges) AmazonOrdersOrErr() ([]*AmazonOrder, error)
AmazonOrdersOrErr returns the AmazonOrders value or an error if the edge was not loaded in eager-loading.
func (AmazonListEdges) AmazonSharesOrErr ¶
func (e AmazonListEdges) AmazonSharesOrErr() ([]*AmazonShare, error)
AmazonSharesOrErr returns the AmazonShares value or an error if the edge was not loaded in eager-loading.
func (AmazonListEdges) OwnerOrErr ¶
func (e AmazonListEdges) OwnerOrErr() ([]*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading.
type AmazonListGroupBy ¶
type AmazonListGroupBy struct {
// contains filtered or unexported fields
}
AmazonListGroupBy is the group-by builder for AmazonList entities.
func (*AmazonListGroupBy) Aggregate ¶
func (algb *AmazonListGroupBy) Aggregate(fns ...AggregateFunc) *AmazonListGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AmazonListGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AmazonListGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AmazonListGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AmazonListGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AmazonListGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AmazonListGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AmazonListGroupBy) Scan ¶
func (algb *AmazonListGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AmazonListGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AmazonListMutation ¶
type AmazonListMutation struct {
// contains filtered or unexported fields
}
AmazonListMutation represents an operation that mutates the AmazonList nodes in the graph.
func (*AmazonListMutation) AddAmazonOrderIDs ¶
func (m *AmazonListMutation) AddAmazonOrderIDs(ids ...int)
AddAmazonOrderIDs adds the "amazon_orders" edge to the AmazonOrder entity by ids.
func (*AmazonListMutation) AddAmazonShareIDs ¶
func (m *AmazonListMutation) AddAmazonShareIDs(ids ...int)
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by ids.
func (*AmazonListMutation) AddField ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) AddOwnerIDs ¶
func (m *AmazonListMutation) AddOwnerIDs(ids ...int)
AddOwnerIDs adds the "owner" edge to the User entity by ids.
func (*AmazonListMutation) AddedEdges ¶
func (m *AmazonListMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AmazonListMutation) AddedField ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) AddedFields ¶
func (m *AmazonListMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AmazonListMutation) AddedIDs ¶
func (m *AmazonListMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AmazonListMutation) AmazonOrdersCleared ¶
func (m *AmazonListMutation) AmazonOrdersCleared() bool
AmazonOrdersCleared reports if the "amazon_orders" edge to the AmazonOrder entity was cleared.
func (*AmazonListMutation) AmazonOrdersIDs ¶
func (m *AmazonListMutation) AmazonOrdersIDs() (ids []int)
AmazonOrdersIDs returns the "amazon_orders" edge IDs in the mutation.
func (*AmazonListMutation) AmazonSharesCleared ¶
func (m *AmazonListMutation) AmazonSharesCleared() bool
AmazonSharesCleared reports if the "amazon_shares" edge to the AmazonShare entity was cleared.
func (*AmazonListMutation) AmazonSharesIDs ¶
func (m *AmazonListMutation) AmazonSharesIDs() (ids []int)
AmazonSharesIDs returns the "amazon_shares" edge IDs in the mutation.
func (*AmazonListMutation) ClearAmazonOrders ¶
func (m *AmazonListMutation) ClearAmazonOrders()
ClearAmazonOrders clears the "amazon_orders" edge to the AmazonOrder entity.
func (*AmazonListMutation) ClearAmazonShares ¶
func (m *AmazonListMutation) ClearAmazonShares()
ClearAmazonShares clears the "amazon_shares" edge to the AmazonShare entity.
func (*AmazonListMutation) ClearEdge ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) ClearField ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) ClearOwner ¶
func (m *AmazonListMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*AmazonListMutation) ClearedEdges ¶
func (m *AmazonListMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AmazonListMutation) ClearedFields ¶
func (m *AmazonListMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AmazonListMutation) Client ¶
func (m AmazonListMutation) 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 (*AmazonListMutation) CreatedAt ¶
func (m *AmazonListMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AmazonListMutation) EdgeCleared ¶
func (m *AmazonListMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AmazonListMutation) Field ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) FieldCleared ¶
func (m *AmazonListMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AmazonListMutation) Fields ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) ID ¶
func (m *AmazonListMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AmazonListMutation) IDs ¶
func (m *AmazonListMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AmazonListMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AmazonList entity. If the AmazonList 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 (*AmazonListMutation) 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 (*AmazonListMutation) OwnerCleared ¶
func (m *AmazonListMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*AmazonListMutation) OwnerIDs ¶
func (m *AmazonListMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation.
func (*AmazonListMutation) RemoveAmazonOrderIDs ¶
func (m *AmazonListMutation) RemoveAmazonOrderIDs(ids ...int)
RemoveAmazonOrderIDs removes the "amazon_orders" edge to the AmazonOrder entity by IDs.
func (*AmazonListMutation) RemoveAmazonShareIDs ¶
func (m *AmazonListMutation) RemoveAmazonShareIDs(ids ...int)
RemoveAmazonShareIDs removes the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*AmazonListMutation) RemoveOwnerIDs ¶
func (m *AmazonListMutation) RemoveOwnerIDs(ids ...int)
RemoveOwnerIDs removes the "owner" edge to the User entity by IDs.
func (*AmazonListMutation) RemovedAmazonOrdersIDs ¶
func (m *AmazonListMutation) RemovedAmazonOrdersIDs() (ids []int)
RemovedAmazonOrders returns the removed IDs of the "amazon_orders" edge to the AmazonOrder entity.
func (*AmazonListMutation) RemovedAmazonSharesIDs ¶
func (m *AmazonListMutation) RemovedAmazonSharesIDs() (ids []int)
RemovedAmazonShares returns the removed IDs of the "amazon_shares" edge to the AmazonShare entity.
func (*AmazonListMutation) RemovedEdges ¶
func (m *AmazonListMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AmazonListMutation) RemovedIDs ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) RemovedOwnerIDs ¶
func (m *AmazonListMutation) RemovedOwnerIDs() (ids []int)
RemovedOwner returns the removed IDs of the "owner" edge to the User entity.
func (*AmazonListMutation) ResetAmazonOrders ¶
func (m *AmazonListMutation) ResetAmazonOrders()
ResetAmazonOrders resets all changes to the "amazon_orders" edge.
func (*AmazonListMutation) ResetAmazonShares ¶
func (m *AmazonListMutation) ResetAmazonShares()
ResetAmazonShares resets all changes to the "amazon_shares" edge.
func (*AmazonListMutation) ResetCreatedAt ¶
func (m *AmazonListMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AmazonListMutation) ResetEdge ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) ResetField ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) ResetOwner ¶
func (m *AmazonListMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*AmazonListMutation) SetCreatedAt ¶
func (m *AmazonListMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AmazonListMutation) SetField ¶
func (m *AmazonListMutation) 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 (*AmazonListMutation) SetOp ¶
func (m *AmazonListMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (AmazonListMutation) Tx ¶
func (m AmazonListMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AmazonListMutation) Type ¶
func (m *AmazonListMutation) Type() string
Type returns the node type of this mutation (AmazonList).
func (*AmazonListMutation) Where ¶
func (m *AmazonListMutation) Where(ps ...predicate.AmazonList)
Where appends a list predicates to the AmazonListMutation builder.
func (*AmazonListMutation) WhereP ¶
func (m *AmazonListMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AmazonListMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AmazonListQuery ¶
type AmazonListQuery struct {
// contains filtered or unexported fields
}
AmazonListQuery is the builder for querying AmazonList entities.
func (*AmazonListQuery) Aggregate ¶
func (alq *AmazonListQuery) Aggregate(fns ...AggregateFunc) *AmazonListSelect
Aggregate returns a AmazonListSelect configured with the given aggregations.
func (*AmazonListQuery) All ¶
func (alq *AmazonListQuery) All(ctx context.Context) ([]*AmazonList, error)
All executes the query and returns a list of AmazonLists.
func (*AmazonListQuery) AllX ¶
func (alq *AmazonListQuery) AllX(ctx context.Context) []*AmazonList
AllX is like All, but panics if an error occurs.
func (*AmazonListQuery) Clone ¶
func (alq *AmazonListQuery) Clone() *AmazonListQuery
Clone returns a duplicate of the AmazonListQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AmazonListQuery) Count ¶
func (alq *AmazonListQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AmazonListQuery) CountX ¶
func (alq *AmazonListQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AmazonListQuery) Exist ¶
func (alq *AmazonListQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AmazonListQuery) ExistX ¶
func (alq *AmazonListQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AmazonListQuery) First ¶
func (alq *AmazonListQuery) First(ctx context.Context) (*AmazonList, error)
First returns the first AmazonList entity from the query. Returns a *NotFoundError when no AmazonList was found.
func (*AmazonListQuery) FirstID ¶
func (alq *AmazonListQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AmazonList ID from the query. Returns a *NotFoundError when no AmazonList ID was found.
func (*AmazonListQuery) FirstIDX ¶
func (alq *AmazonListQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AmazonListQuery) FirstX ¶
func (alq *AmazonListQuery) FirstX(ctx context.Context) *AmazonList
FirstX is like First, but panics if an error occurs.
func (*AmazonListQuery) GroupBy ¶
func (alq *AmazonListQuery) GroupBy(field string, fields ...string) *AmazonListGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.AmazonList.Query(). GroupBy(amazonlist.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AmazonListQuery) IDs ¶
func (alq *AmazonListQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of AmazonList IDs.
func (*AmazonListQuery) IDsX ¶
func (alq *AmazonListQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AmazonListQuery) Limit ¶
func (alq *AmazonListQuery) Limit(limit int) *AmazonListQuery
Limit the number of records to be returned by this query.
func (*AmazonListQuery) Offset ¶
func (alq *AmazonListQuery) Offset(offset int) *AmazonListQuery
Offset to start from.
func (*AmazonListQuery) Only ¶
func (alq *AmazonListQuery) Only(ctx context.Context) (*AmazonList, error)
Only returns a single AmazonList entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AmazonList entity is found. Returns a *NotFoundError when no AmazonList entities are found.
func (*AmazonListQuery) OnlyID ¶
func (alq *AmazonListQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AmazonList ID in the query. Returns a *NotSingularError when more than one AmazonList ID is found. Returns a *NotFoundError when no entities are found.
func (*AmazonListQuery) OnlyIDX ¶
func (alq *AmazonListQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AmazonListQuery) OnlyX ¶
func (alq *AmazonListQuery) OnlyX(ctx context.Context) *AmazonList
OnlyX is like Only, but panics if an error occurs.
func (*AmazonListQuery) Order ¶
func (alq *AmazonListQuery) Order(o ...amazonlist.OrderOption) *AmazonListQuery
Order specifies how the records should be ordered.
func (*AmazonListQuery) QueryAmazonOrders ¶
func (alq *AmazonListQuery) QueryAmazonOrders() *AmazonOrderQuery
QueryAmazonOrders chains the current query on the "amazon_orders" edge.
func (*AmazonListQuery) QueryAmazonShares ¶
func (alq *AmazonListQuery) QueryAmazonShares() *AmazonShareQuery
QueryAmazonShares chains the current query on the "amazon_shares" edge.
func (*AmazonListQuery) QueryOwner ¶
func (alq *AmazonListQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*AmazonListQuery) Select ¶
func (alq *AmazonListQuery) Select(fields ...string) *AmazonListSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.AmazonList.Query(). Select(amazonlist.FieldCreatedAt). Scan(ctx, &v)
func (*AmazonListQuery) Unique ¶
func (alq *AmazonListQuery) Unique(unique bool) *AmazonListQuery
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 (*AmazonListQuery) Where ¶
func (alq *AmazonListQuery) Where(ps ...predicate.AmazonList) *AmazonListQuery
Where adds a new predicate for the AmazonListQuery builder.
func (*AmazonListQuery) WithAmazonOrders ¶
func (alq *AmazonListQuery) WithAmazonOrders(opts ...func(*AmazonOrderQuery)) *AmazonListQuery
WithAmazonOrders tells the query-builder to eager-load the nodes that are connected to the "amazon_orders" edge. The optional arguments are used to configure the query builder of the edge.
func (*AmazonListQuery) WithAmazonShares ¶
func (alq *AmazonListQuery) WithAmazonShares(opts ...func(*AmazonShareQuery)) *AmazonListQuery
WithAmazonShares tells the query-builder to eager-load the nodes that are connected to the "amazon_shares" edge. The optional arguments are used to configure the query builder of the edge.
func (*AmazonListQuery) WithOwner ¶
func (alq *AmazonListQuery) WithOwner(opts ...func(*UserQuery)) *AmazonListQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type AmazonListSelect ¶
type AmazonListSelect struct { *AmazonListQuery // contains filtered or unexported fields }
AmazonListSelect is the builder for selecting fields of AmazonList entities.
func (*AmazonListSelect) Aggregate ¶
func (als *AmazonListSelect) Aggregate(fns ...AggregateFunc) *AmazonListSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AmazonListSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AmazonListSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AmazonListSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AmazonListSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AmazonListSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AmazonListSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AmazonListSelect) Scan ¶
func (als *AmazonListSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AmazonListSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AmazonListUpdate ¶
type AmazonListUpdate struct {
// contains filtered or unexported fields
}
AmazonListUpdate is the builder for updating AmazonList entities.
func (*AmazonListUpdate) AddAmazonOrderIDs ¶
func (alu *AmazonListUpdate) AddAmazonOrderIDs(ids ...int) *AmazonListUpdate
AddAmazonOrderIDs adds the "amazon_orders" edge to the AmazonOrder entity by IDs.
func (*AmazonListUpdate) AddAmazonOrders ¶
func (alu *AmazonListUpdate) AddAmazonOrders(a ...*AmazonOrder) *AmazonListUpdate
AddAmazonOrders adds the "amazon_orders" edges to the AmazonOrder entity.
func (*AmazonListUpdate) AddAmazonShareIDs ¶
func (alu *AmazonListUpdate) AddAmazonShareIDs(ids ...int) *AmazonListUpdate
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*AmazonListUpdate) AddAmazonShares ¶
func (alu *AmazonListUpdate) AddAmazonShares(a ...*AmazonShare) *AmazonListUpdate
AddAmazonShares adds the "amazon_shares" edges to the AmazonShare entity.
func (*AmazonListUpdate) AddOwner ¶
func (alu *AmazonListUpdate) AddOwner(u ...*User) *AmazonListUpdate
AddOwner adds the "owner" edges to the User entity.
func (*AmazonListUpdate) AddOwnerIDs ¶
func (alu *AmazonListUpdate) AddOwnerIDs(ids ...int) *AmazonListUpdate
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*AmazonListUpdate) ClearAmazonOrders ¶
func (alu *AmazonListUpdate) ClearAmazonOrders() *AmazonListUpdate
ClearAmazonOrders clears all "amazon_orders" edges to the AmazonOrder entity.
func (*AmazonListUpdate) ClearAmazonShares ¶
func (alu *AmazonListUpdate) ClearAmazonShares() *AmazonListUpdate
ClearAmazonShares clears all "amazon_shares" edges to the AmazonShare entity.
func (*AmazonListUpdate) ClearOwner ¶
func (alu *AmazonListUpdate) ClearOwner() *AmazonListUpdate
ClearOwner clears all "owner" edges to the User entity.
func (*AmazonListUpdate) Exec ¶
func (alu *AmazonListUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonListUpdate) ExecX ¶
func (alu *AmazonListUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonListUpdate) Mutation ¶
func (alu *AmazonListUpdate) Mutation() *AmazonListMutation
Mutation returns the AmazonListMutation object of the builder.
func (*AmazonListUpdate) RemoveAmazonOrderIDs ¶
func (alu *AmazonListUpdate) RemoveAmazonOrderIDs(ids ...int) *AmazonListUpdate
RemoveAmazonOrderIDs removes the "amazon_orders" edge to AmazonOrder entities by IDs.
func (*AmazonListUpdate) RemoveAmazonOrders ¶
func (alu *AmazonListUpdate) RemoveAmazonOrders(a ...*AmazonOrder) *AmazonListUpdate
RemoveAmazonOrders removes "amazon_orders" edges to AmazonOrder entities.
func (*AmazonListUpdate) RemoveAmazonShareIDs ¶
func (alu *AmazonListUpdate) RemoveAmazonShareIDs(ids ...int) *AmazonListUpdate
RemoveAmazonShareIDs removes the "amazon_shares" edge to AmazonShare entities by IDs.
func (*AmazonListUpdate) RemoveAmazonShares ¶
func (alu *AmazonListUpdate) RemoveAmazonShares(a ...*AmazonShare) *AmazonListUpdate
RemoveAmazonShares removes "amazon_shares" edges to AmazonShare entities.
func (*AmazonListUpdate) RemoveOwner ¶
func (alu *AmazonListUpdate) RemoveOwner(u ...*User) *AmazonListUpdate
RemoveOwner removes "owner" edges to User entities.
func (*AmazonListUpdate) RemoveOwnerIDs ¶
func (alu *AmazonListUpdate) RemoveOwnerIDs(ids ...int) *AmazonListUpdate
RemoveOwnerIDs removes the "owner" edge to User entities by IDs.
func (*AmazonListUpdate) Save ¶
func (alu *AmazonListUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AmazonListUpdate) SaveX ¶
func (alu *AmazonListUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AmazonListUpdate) SetCreatedAt ¶
func (alu *AmazonListUpdate) SetCreatedAt(t time.Time) *AmazonListUpdate
SetCreatedAt sets the "created_at" field.
func (*AmazonListUpdate) SetNillableCreatedAt ¶
func (alu *AmazonListUpdate) SetNillableCreatedAt(t *time.Time) *AmazonListUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AmazonListUpdate) Where ¶
func (alu *AmazonListUpdate) Where(ps ...predicate.AmazonList) *AmazonListUpdate
Where appends a list predicates to the AmazonListUpdate builder.
type AmazonListUpdateOne ¶
type AmazonListUpdateOne struct {
// contains filtered or unexported fields
}
AmazonListUpdateOne is the builder for updating a single AmazonList entity.
func (*AmazonListUpdateOne) AddAmazonOrderIDs ¶
func (aluo *AmazonListUpdateOne) AddAmazonOrderIDs(ids ...int) *AmazonListUpdateOne
AddAmazonOrderIDs adds the "amazon_orders" edge to the AmazonOrder entity by IDs.
func (*AmazonListUpdateOne) AddAmazonOrders ¶
func (aluo *AmazonListUpdateOne) AddAmazonOrders(a ...*AmazonOrder) *AmazonListUpdateOne
AddAmazonOrders adds the "amazon_orders" edges to the AmazonOrder entity.
func (*AmazonListUpdateOne) AddAmazonShareIDs ¶
func (aluo *AmazonListUpdateOne) AddAmazonShareIDs(ids ...int) *AmazonListUpdateOne
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*AmazonListUpdateOne) AddAmazonShares ¶
func (aluo *AmazonListUpdateOne) AddAmazonShares(a ...*AmazonShare) *AmazonListUpdateOne
AddAmazonShares adds the "amazon_shares" edges to the AmazonShare entity.
func (*AmazonListUpdateOne) AddOwner ¶
func (aluo *AmazonListUpdateOne) AddOwner(u ...*User) *AmazonListUpdateOne
AddOwner adds the "owner" edges to the User entity.
func (*AmazonListUpdateOne) AddOwnerIDs ¶
func (aluo *AmazonListUpdateOne) AddOwnerIDs(ids ...int) *AmazonListUpdateOne
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*AmazonListUpdateOne) ClearAmazonOrders ¶
func (aluo *AmazonListUpdateOne) ClearAmazonOrders() *AmazonListUpdateOne
ClearAmazonOrders clears all "amazon_orders" edges to the AmazonOrder entity.
func (*AmazonListUpdateOne) ClearAmazonShares ¶
func (aluo *AmazonListUpdateOne) ClearAmazonShares() *AmazonListUpdateOne
ClearAmazonShares clears all "amazon_shares" edges to the AmazonShare entity.
func (*AmazonListUpdateOne) ClearOwner ¶
func (aluo *AmazonListUpdateOne) ClearOwner() *AmazonListUpdateOne
ClearOwner clears all "owner" edges to the User entity.
func (*AmazonListUpdateOne) Exec ¶
func (aluo *AmazonListUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AmazonListUpdateOne) ExecX ¶
func (aluo *AmazonListUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonListUpdateOne) Mutation ¶
func (aluo *AmazonListUpdateOne) Mutation() *AmazonListMutation
Mutation returns the AmazonListMutation object of the builder.
func (*AmazonListUpdateOne) RemoveAmazonOrderIDs ¶
func (aluo *AmazonListUpdateOne) RemoveAmazonOrderIDs(ids ...int) *AmazonListUpdateOne
RemoveAmazonOrderIDs removes the "amazon_orders" edge to AmazonOrder entities by IDs.
func (*AmazonListUpdateOne) RemoveAmazonOrders ¶
func (aluo *AmazonListUpdateOne) RemoveAmazonOrders(a ...*AmazonOrder) *AmazonListUpdateOne
RemoveAmazonOrders removes "amazon_orders" edges to AmazonOrder entities.
func (*AmazonListUpdateOne) RemoveAmazonShareIDs ¶
func (aluo *AmazonListUpdateOne) RemoveAmazonShareIDs(ids ...int) *AmazonListUpdateOne
RemoveAmazonShareIDs removes the "amazon_shares" edge to AmazonShare entities by IDs.
func (*AmazonListUpdateOne) RemoveAmazonShares ¶
func (aluo *AmazonListUpdateOne) RemoveAmazonShares(a ...*AmazonShare) *AmazonListUpdateOne
RemoveAmazonShares removes "amazon_shares" edges to AmazonShare entities.
func (*AmazonListUpdateOne) RemoveOwner ¶
func (aluo *AmazonListUpdateOne) RemoveOwner(u ...*User) *AmazonListUpdateOne
RemoveOwner removes "owner" edges to User entities.
func (*AmazonListUpdateOne) RemoveOwnerIDs ¶
func (aluo *AmazonListUpdateOne) RemoveOwnerIDs(ids ...int) *AmazonListUpdateOne
RemoveOwnerIDs removes the "owner" edge to User entities by IDs.
func (*AmazonListUpdateOne) Save ¶
func (aluo *AmazonListUpdateOne) Save(ctx context.Context) (*AmazonList, error)
Save executes the query and returns the updated AmazonList entity.
func (*AmazonListUpdateOne) SaveX ¶
func (aluo *AmazonListUpdateOne) SaveX(ctx context.Context) *AmazonList
SaveX is like Save, but panics if an error occurs.
func (*AmazonListUpdateOne) Select ¶
func (aluo *AmazonListUpdateOne) Select(field string, fields ...string) *AmazonListUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AmazonListUpdateOne) SetCreatedAt ¶
func (aluo *AmazonListUpdateOne) SetCreatedAt(t time.Time) *AmazonListUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AmazonListUpdateOne) SetNillableCreatedAt ¶
func (aluo *AmazonListUpdateOne) SetNillableCreatedAt(t *time.Time) *AmazonListUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AmazonListUpdateOne) Where ¶
func (aluo *AmazonListUpdateOne) Where(ps ...predicate.AmazonList) *AmazonListUpdateOne
Where appends a list predicates to the AmazonListUpdate builder.
type AmazonOrder ¶
type AmazonOrder struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Category holds the value of the "category" field. Category string `json:"category,omitempty"` // Brand holds the value of the "brand" field. Brand string `json:"brand,omitempty"` // Seller holds the value of the "seller" field. Seller string `json:"seller,omitempty"` // Address1 holds the value of the "address1" field. Address1 string `json:"address1,omitempty"` // Address2 holds the value of the "address2" field. Address2 string `json:"address2,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // State holds the value of the "state" field. State string `json:"state,omitempty"` // Zip holds the value of the "zip" field. Zip string `json:"zip,omitempty"` // Price holds the value of the "price" field. Price float32 `json:"price,omitempty"` // Tax holds the value of the "tax" field. Tax float32 `json:"tax,omitempty"` // Refund holds the value of the "refund" field. Refund bool `json:"refund,omitempty"` // OrderedAt holds the value of the "ordered_at" field. OrderedAt time.Time `json:"ordered_at,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AmazonOrderQuery when eager-loading is set. Edges AmazonOrderEdges `json:"edges"` // contains filtered or unexported fields }
AmazonOrder is the model entity for the AmazonOrder schema.
func (*AmazonOrder) QueryAmazonList ¶
func (ao *AmazonOrder) QueryAmazonList() *AmazonListQuery
QueryAmazonList queries the "amazon_list" edge of the AmazonOrder entity.
func (*AmazonOrder) String ¶
func (ao *AmazonOrder) String() string
String implements the fmt.Stringer.
func (*AmazonOrder) Unwrap ¶
func (ao *AmazonOrder) Unwrap() *AmazonOrder
Unwrap unwraps the AmazonOrder 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 (*AmazonOrder) Update ¶
func (ao *AmazonOrder) Update() *AmazonOrderUpdateOne
Update returns a builder for updating this AmazonOrder. Note that you need to call AmazonOrder.Unwrap() before calling this method if this AmazonOrder was returned from a transaction, and the transaction was committed or rolled back.
type AmazonOrderClient ¶
type AmazonOrderClient struct {
// contains filtered or unexported fields
}
AmazonOrderClient is a client for the AmazonOrder schema.
func NewAmazonOrderClient ¶
func NewAmazonOrderClient(c config) *AmazonOrderClient
NewAmazonOrderClient returns a client for the AmazonOrder from the given config.
func (*AmazonOrderClient) Create ¶
func (c *AmazonOrderClient) Create() *AmazonOrderCreate
Create returns a builder for creating a AmazonOrder entity.
func (*AmazonOrderClient) CreateBulk ¶
func (c *AmazonOrderClient) CreateBulk(builders ...*AmazonOrderCreate) *AmazonOrderCreateBulk
CreateBulk returns a builder for creating a bulk of AmazonOrder entities.
func (*AmazonOrderClient) Delete ¶
func (c *AmazonOrderClient) Delete() *AmazonOrderDelete
Delete returns a delete builder for AmazonOrder.
func (*AmazonOrderClient) DeleteOne ¶
func (c *AmazonOrderClient) DeleteOne(ao *AmazonOrder) *AmazonOrderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AmazonOrderClient) DeleteOneID ¶
func (c *AmazonOrderClient) DeleteOneID(id int) *AmazonOrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AmazonOrderClient) Get ¶
func (c *AmazonOrderClient) Get(ctx context.Context, id int) (*AmazonOrder, error)
Get returns a AmazonOrder entity by its id.
func (*AmazonOrderClient) GetX ¶
func (c *AmazonOrderClient) GetX(ctx context.Context, id int) *AmazonOrder
GetX is like Get, but panics if an error occurs.
func (*AmazonOrderClient) Hooks ¶
func (c *AmazonOrderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AmazonOrderClient) Intercept ¶
func (c *AmazonOrderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `amazonorder.Intercept(f(g(h())))`.
func (*AmazonOrderClient) Interceptors ¶
func (c *AmazonOrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AmazonOrderClient) Query ¶
func (c *AmazonOrderClient) Query() *AmazonOrderQuery
Query returns a query builder for AmazonOrder.
func (*AmazonOrderClient) QueryAmazonList ¶
func (c *AmazonOrderClient) QueryAmazonList(ao *AmazonOrder) *AmazonListQuery
QueryAmazonList queries the amazon_list edge of a AmazonOrder.
func (*AmazonOrderClient) Update ¶
func (c *AmazonOrderClient) Update() *AmazonOrderUpdate
Update returns an update builder for AmazonOrder.
func (*AmazonOrderClient) UpdateOne ¶
func (c *AmazonOrderClient) UpdateOne(ao *AmazonOrder) *AmazonOrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AmazonOrderClient) UpdateOneID ¶
func (c *AmazonOrderClient) UpdateOneID(id int) *AmazonOrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AmazonOrderClient) Use ¶
func (c *AmazonOrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `amazonorder.Hooks(f(g(h())))`.
type AmazonOrderCreate ¶
type AmazonOrderCreate struct {
// contains filtered or unexported fields
}
AmazonOrderCreate is the builder for creating a AmazonOrder entity.
func (*AmazonOrderCreate) Exec ¶
func (aoc *AmazonOrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonOrderCreate) ExecX ¶
func (aoc *AmazonOrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonOrderCreate) Mutation ¶
func (aoc *AmazonOrderCreate) Mutation() *AmazonOrderMutation
Mutation returns the AmazonOrderMutation object of the builder.
func (*AmazonOrderCreate) Save ¶
func (aoc *AmazonOrderCreate) Save(ctx context.Context) (*AmazonOrder, error)
Save creates the AmazonOrder in the database.
func (*AmazonOrderCreate) SaveX ¶
func (aoc *AmazonOrderCreate) SaveX(ctx context.Context) *AmazonOrder
SaveX calls Save and panics if Save returns an error.
func (*AmazonOrderCreate) SetAddress1 ¶
func (aoc *AmazonOrderCreate) SetAddress1(s string) *AmazonOrderCreate
SetAddress1 sets the "address1" field.
func (*AmazonOrderCreate) SetAddress2 ¶
func (aoc *AmazonOrderCreate) SetAddress2(s string) *AmazonOrderCreate
SetAddress2 sets the "address2" field.
func (*AmazonOrderCreate) SetAmazonList ¶
func (aoc *AmazonOrderCreate) SetAmazonList(a *AmazonList) *AmazonOrderCreate
SetAmazonList sets the "amazon_list" edge to the AmazonList entity.
func (*AmazonOrderCreate) SetAmazonListID ¶
func (aoc *AmazonOrderCreate) SetAmazonListID(id int) *AmazonOrderCreate
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID.
func (*AmazonOrderCreate) SetBrand ¶
func (aoc *AmazonOrderCreate) SetBrand(s string) *AmazonOrderCreate
SetBrand sets the "brand" field.
func (*AmazonOrderCreate) SetCategory ¶
func (aoc *AmazonOrderCreate) SetCategory(s string) *AmazonOrderCreate
SetCategory sets the "category" field.
func (*AmazonOrderCreate) SetCity ¶
func (aoc *AmazonOrderCreate) SetCity(s string) *AmazonOrderCreate
SetCity sets the "city" field.
func (*AmazonOrderCreate) SetCreatedAt ¶
func (aoc *AmazonOrderCreate) SetCreatedAt(t time.Time) *AmazonOrderCreate
SetCreatedAt sets the "created_at" field.
func (*AmazonOrderCreate) SetName ¶
func (aoc *AmazonOrderCreate) SetName(s string) *AmazonOrderCreate
SetName sets the "name" field.
func (*AmazonOrderCreate) SetNillableAmazonListID ¶
func (aoc *AmazonOrderCreate) SetNillableAmazonListID(id *int) *AmazonOrderCreate
SetNillableAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID if the given value is not nil.
func (*AmazonOrderCreate) SetNillableCreatedAt ¶
func (aoc *AmazonOrderCreate) SetNillableCreatedAt(t *time.Time) *AmazonOrderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AmazonOrderCreate) SetOrderedAt ¶
func (aoc *AmazonOrderCreate) SetOrderedAt(t time.Time) *AmazonOrderCreate
SetOrderedAt sets the "ordered_at" field.
func (*AmazonOrderCreate) SetPrice ¶
func (aoc *AmazonOrderCreate) SetPrice(f float32) *AmazonOrderCreate
SetPrice sets the "price" field.
func (*AmazonOrderCreate) SetRefund ¶
func (aoc *AmazonOrderCreate) SetRefund(b bool) *AmazonOrderCreate
SetRefund sets the "refund" field.
func (*AmazonOrderCreate) SetSeller ¶
func (aoc *AmazonOrderCreate) SetSeller(s string) *AmazonOrderCreate
SetSeller sets the "seller" field.
func (*AmazonOrderCreate) SetState ¶
func (aoc *AmazonOrderCreate) SetState(s string) *AmazonOrderCreate
SetState sets the "state" field.
func (*AmazonOrderCreate) SetTax ¶
func (aoc *AmazonOrderCreate) SetTax(f float32) *AmazonOrderCreate
SetTax sets the "tax" field.
func (*AmazonOrderCreate) SetZip ¶
func (aoc *AmazonOrderCreate) SetZip(s string) *AmazonOrderCreate
SetZip sets the "zip" field.
type AmazonOrderCreateBulk ¶
type AmazonOrderCreateBulk struct {
// contains filtered or unexported fields
}
AmazonOrderCreateBulk is the builder for creating many AmazonOrder entities in bulk.
func (*AmazonOrderCreateBulk) Exec ¶
func (aocb *AmazonOrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonOrderCreateBulk) ExecX ¶
func (aocb *AmazonOrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonOrderCreateBulk) Save ¶
func (aocb *AmazonOrderCreateBulk) Save(ctx context.Context) ([]*AmazonOrder, error)
Save creates the AmazonOrder entities in the database.
func (*AmazonOrderCreateBulk) SaveX ¶
func (aocb *AmazonOrderCreateBulk) SaveX(ctx context.Context) []*AmazonOrder
SaveX is like Save, but panics if an error occurs.
type AmazonOrderDelete ¶
type AmazonOrderDelete struct {
// contains filtered or unexported fields
}
AmazonOrderDelete is the builder for deleting a AmazonOrder entity.
func (*AmazonOrderDelete) Exec ¶
func (aod *AmazonOrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AmazonOrderDelete) ExecX ¶
func (aod *AmazonOrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AmazonOrderDelete) Where ¶
func (aod *AmazonOrderDelete) Where(ps ...predicate.AmazonOrder) *AmazonOrderDelete
Where appends a list predicates to the AmazonOrderDelete builder.
type AmazonOrderDeleteOne ¶
type AmazonOrderDeleteOne struct {
// contains filtered or unexported fields
}
AmazonOrderDeleteOne is the builder for deleting a single AmazonOrder entity.
func (*AmazonOrderDeleteOne) Exec ¶
func (aodo *AmazonOrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AmazonOrderDeleteOne) ExecX ¶
func (aodo *AmazonOrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonOrderDeleteOne) Where ¶
func (aodo *AmazonOrderDeleteOne) Where(ps ...predicate.AmazonOrder) *AmazonOrderDeleteOne
Where appends a list predicates to the AmazonOrderDelete builder.
type AmazonOrderEdges ¶
type AmazonOrderEdges struct { // AmazonList holds the value of the amazon_list edge. AmazonList *AmazonList `json:"amazon_list,omitempty"` // contains filtered or unexported fields }
AmazonOrderEdges holds the relations/edges for other nodes in the graph.
func (AmazonOrderEdges) AmazonListOrErr ¶
func (e AmazonOrderEdges) AmazonListOrErr() (*AmazonList, error)
AmazonListOrErr returns the AmazonList value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AmazonOrderGroupBy ¶
type AmazonOrderGroupBy struct {
// contains filtered or unexported fields
}
AmazonOrderGroupBy is the group-by builder for AmazonOrder entities.
func (*AmazonOrderGroupBy) Aggregate ¶
func (aogb *AmazonOrderGroupBy) Aggregate(fns ...AggregateFunc) *AmazonOrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AmazonOrderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AmazonOrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AmazonOrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AmazonOrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AmazonOrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AmazonOrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AmazonOrderGroupBy) Scan ¶
func (aogb *AmazonOrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AmazonOrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AmazonOrderMutation ¶
type AmazonOrderMutation struct {
// contains filtered or unexported fields
}
AmazonOrderMutation represents an operation that mutates the AmazonOrder nodes in the graph.
func (*AmazonOrderMutation) AddField ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) AddPrice ¶
func (m *AmazonOrderMutation) AddPrice(f float32)
AddPrice adds f to the "price" field.
func (*AmazonOrderMutation) AddTax ¶
func (m *AmazonOrderMutation) AddTax(f float32)
AddTax adds f to the "tax" field.
func (*AmazonOrderMutation) AddedEdges ¶
func (m *AmazonOrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AmazonOrderMutation) AddedField ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) AddedFields ¶
func (m *AmazonOrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AmazonOrderMutation) AddedIDs ¶
func (m *AmazonOrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AmazonOrderMutation) AddedPrice ¶
func (m *AmazonOrderMutation) AddedPrice() (r float32, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*AmazonOrderMutation) AddedTax ¶
func (m *AmazonOrderMutation) AddedTax() (r float32, exists bool)
AddedTax returns the value that was added to the "tax" field in this mutation.
func (*AmazonOrderMutation) Address1 ¶
func (m *AmazonOrderMutation) Address1() (r string, exists bool)
Address1 returns the value of the "address1" field in the mutation.
func (*AmazonOrderMutation) Address2 ¶
func (m *AmazonOrderMutation) Address2() (r string, exists bool)
Address2 returns the value of the "address2" field in the mutation.
func (*AmazonOrderMutation) AmazonListCleared ¶
func (m *AmazonOrderMutation) AmazonListCleared() bool
AmazonListCleared reports if the "amazon_list" edge to the AmazonList entity was cleared.
func (*AmazonOrderMutation) AmazonListID ¶
func (m *AmazonOrderMutation) AmazonListID() (id int, exists bool)
AmazonListID returns the "amazon_list" edge ID in the mutation.
func (*AmazonOrderMutation) AmazonListIDs ¶
func (m *AmazonOrderMutation) AmazonListIDs() (ids []int)
AmazonListIDs returns the "amazon_list" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AmazonListID instead. It exists only for internal usage by the builders.
func (*AmazonOrderMutation) Brand ¶
func (m *AmazonOrderMutation) Brand() (r string, exists bool)
Brand returns the value of the "brand" field in the mutation.
func (*AmazonOrderMutation) Category ¶
func (m *AmazonOrderMutation) Category() (r string, exists bool)
Category returns the value of the "category" field in the mutation.
func (*AmazonOrderMutation) City ¶
func (m *AmazonOrderMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*AmazonOrderMutation) ClearAmazonList ¶
func (m *AmazonOrderMutation) ClearAmazonList()
ClearAmazonList clears the "amazon_list" edge to the AmazonList entity.
func (*AmazonOrderMutation) ClearEdge ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) ClearField ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) ClearedEdges ¶
func (m *AmazonOrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AmazonOrderMutation) ClearedFields ¶
func (m *AmazonOrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AmazonOrderMutation) Client ¶
func (m AmazonOrderMutation) 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 (*AmazonOrderMutation) CreatedAt ¶
func (m *AmazonOrderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AmazonOrderMutation) EdgeCleared ¶
func (m *AmazonOrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AmazonOrderMutation) Field ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) FieldCleared ¶
func (m *AmazonOrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AmazonOrderMutation) Fields ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) ID ¶
func (m *AmazonOrderMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AmazonOrderMutation) IDs ¶
func (m *AmazonOrderMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AmazonOrderMutation) Name ¶
func (m *AmazonOrderMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AmazonOrderMutation) OldAddress1 ¶
func (m *AmazonOrderMutation) OldAddress1(ctx context.Context) (v string, err error)
OldAddress1 returns the old "address1" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldAddress2 ¶
func (m *AmazonOrderMutation) OldAddress2(ctx context.Context) (v string, err error)
OldAddress2 returns the old "address2" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldBrand ¶
func (m *AmazonOrderMutation) OldBrand(ctx context.Context) (v string, err error)
OldBrand returns the old "brand" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldCategory ¶
func (m *AmazonOrderMutation) OldCategory(ctx context.Context) (v string, err error)
OldCategory returns the old "category" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldCity ¶
func (m *AmazonOrderMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) 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 (*AmazonOrderMutation) OldName ¶
func (m *AmazonOrderMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldOrderedAt ¶
OldOrderedAt returns the old "ordered_at" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldPrice ¶
func (m *AmazonOrderMutation) OldPrice(ctx context.Context) (v float32, err error)
OldPrice returns the old "price" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldRefund ¶
func (m *AmazonOrderMutation) OldRefund(ctx context.Context) (v bool, err error)
OldRefund returns the old "refund" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldSeller ¶
func (m *AmazonOrderMutation) OldSeller(ctx context.Context) (v string, err error)
OldSeller returns the old "seller" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldState ¶
func (m *AmazonOrderMutation) OldState(ctx context.Context) (v string, err error)
OldState returns the old "state" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldTax ¶
func (m *AmazonOrderMutation) OldTax(ctx context.Context) (v float32, err error)
OldTax returns the old "tax" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) OldZip ¶
func (m *AmazonOrderMutation) OldZip(ctx context.Context) (v string, err error)
OldZip returns the old "zip" field's value of the AmazonOrder entity. If the AmazonOrder 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 (*AmazonOrderMutation) Op ¶
func (m *AmazonOrderMutation) Op() Op
Op returns the operation name.
func (*AmazonOrderMutation) OrderedAt ¶
func (m *AmazonOrderMutation) OrderedAt() (r time.Time, exists bool)
OrderedAt returns the value of the "ordered_at" field in the mutation.
func (*AmazonOrderMutation) Price ¶
func (m *AmazonOrderMutation) Price() (r float32, exists bool)
Price returns the value of the "price" field in the mutation.
func (*AmazonOrderMutation) Refund ¶
func (m *AmazonOrderMutation) Refund() (r bool, exists bool)
Refund returns the value of the "refund" field in the mutation.
func (*AmazonOrderMutation) RemovedEdges ¶
func (m *AmazonOrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AmazonOrderMutation) RemovedIDs ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) ResetAddress1 ¶
func (m *AmazonOrderMutation) ResetAddress1()
ResetAddress1 resets all changes to the "address1" field.
func (*AmazonOrderMutation) ResetAddress2 ¶
func (m *AmazonOrderMutation) ResetAddress2()
ResetAddress2 resets all changes to the "address2" field.
func (*AmazonOrderMutation) ResetAmazonList ¶
func (m *AmazonOrderMutation) ResetAmazonList()
ResetAmazonList resets all changes to the "amazon_list" edge.
func (*AmazonOrderMutation) ResetBrand ¶
func (m *AmazonOrderMutation) ResetBrand()
ResetBrand resets all changes to the "brand" field.
func (*AmazonOrderMutation) ResetCategory ¶
func (m *AmazonOrderMutation) ResetCategory()
ResetCategory resets all changes to the "category" field.
func (*AmazonOrderMutation) ResetCity ¶
func (m *AmazonOrderMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*AmazonOrderMutation) ResetCreatedAt ¶
func (m *AmazonOrderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AmazonOrderMutation) ResetEdge ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) ResetField ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) ResetName ¶
func (m *AmazonOrderMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AmazonOrderMutation) ResetOrderedAt ¶
func (m *AmazonOrderMutation) ResetOrderedAt()
ResetOrderedAt resets all changes to the "ordered_at" field.
func (*AmazonOrderMutation) ResetPrice ¶
func (m *AmazonOrderMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*AmazonOrderMutation) ResetRefund ¶
func (m *AmazonOrderMutation) ResetRefund()
ResetRefund resets all changes to the "refund" field.
func (*AmazonOrderMutation) ResetSeller ¶
func (m *AmazonOrderMutation) ResetSeller()
ResetSeller resets all changes to the "seller" field.
func (*AmazonOrderMutation) ResetState ¶
func (m *AmazonOrderMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*AmazonOrderMutation) ResetTax ¶
func (m *AmazonOrderMutation) ResetTax()
ResetTax resets all changes to the "tax" field.
func (*AmazonOrderMutation) ResetZip ¶
func (m *AmazonOrderMutation) ResetZip()
ResetZip resets all changes to the "zip" field.
func (*AmazonOrderMutation) Seller ¶
func (m *AmazonOrderMutation) Seller() (r string, exists bool)
Seller returns the value of the "seller" field in the mutation.
func (*AmazonOrderMutation) SetAddress1 ¶
func (m *AmazonOrderMutation) SetAddress1(s string)
SetAddress1 sets the "address1" field.
func (*AmazonOrderMutation) SetAddress2 ¶
func (m *AmazonOrderMutation) SetAddress2(s string)
SetAddress2 sets the "address2" field.
func (*AmazonOrderMutation) SetAmazonListID ¶
func (m *AmazonOrderMutation) SetAmazonListID(id int)
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by id.
func (*AmazonOrderMutation) SetBrand ¶
func (m *AmazonOrderMutation) SetBrand(s string)
SetBrand sets the "brand" field.
func (*AmazonOrderMutation) SetCategory ¶
func (m *AmazonOrderMutation) SetCategory(s string)
SetCategory sets the "category" field.
func (*AmazonOrderMutation) SetCity ¶
func (m *AmazonOrderMutation) SetCity(s string)
SetCity sets the "city" field.
func (*AmazonOrderMutation) SetCreatedAt ¶
func (m *AmazonOrderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AmazonOrderMutation) SetField ¶
func (m *AmazonOrderMutation) 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 (*AmazonOrderMutation) SetName ¶
func (m *AmazonOrderMutation) SetName(s string)
SetName sets the "name" field.
func (*AmazonOrderMutation) SetOp ¶
func (m *AmazonOrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AmazonOrderMutation) SetOrderedAt ¶
func (m *AmazonOrderMutation) SetOrderedAt(t time.Time)
SetOrderedAt sets the "ordered_at" field.
func (*AmazonOrderMutation) SetPrice ¶
func (m *AmazonOrderMutation) SetPrice(f float32)
SetPrice sets the "price" field.
func (*AmazonOrderMutation) SetRefund ¶
func (m *AmazonOrderMutation) SetRefund(b bool)
SetRefund sets the "refund" field.
func (*AmazonOrderMutation) SetSeller ¶
func (m *AmazonOrderMutation) SetSeller(s string)
SetSeller sets the "seller" field.
func (*AmazonOrderMutation) SetState ¶
func (m *AmazonOrderMutation) SetState(s string)
SetState sets the "state" field.
func (*AmazonOrderMutation) SetTax ¶
func (m *AmazonOrderMutation) SetTax(f float32)
SetTax sets the "tax" field.
func (*AmazonOrderMutation) SetZip ¶
func (m *AmazonOrderMutation) SetZip(s string)
SetZip sets the "zip" field.
func (*AmazonOrderMutation) State ¶
func (m *AmazonOrderMutation) State() (r string, exists bool)
State returns the value of the "state" field in the mutation.
func (*AmazonOrderMutation) Tax ¶
func (m *AmazonOrderMutation) Tax() (r float32, exists bool)
Tax returns the value of the "tax" field in the mutation.
func (AmazonOrderMutation) Tx ¶
func (m AmazonOrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AmazonOrderMutation) Type ¶
func (m *AmazonOrderMutation) Type() string
Type returns the node type of this mutation (AmazonOrder).
func (*AmazonOrderMutation) Where ¶
func (m *AmazonOrderMutation) Where(ps ...predicate.AmazonOrder)
Where appends a list predicates to the AmazonOrderMutation builder.
func (*AmazonOrderMutation) WhereP ¶
func (m *AmazonOrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AmazonOrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*AmazonOrderMutation) Zip ¶
func (m *AmazonOrderMutation) Zip() (r string, exists bool)
Zip returns the value of the "zip" field in the mutation.
type AmazonOrderQuery ¶
type AmazonOrderQuery struct {
// contains filtered or unexported fields
}
AmazonOrderQuery is the builder for querying AmazonOrder entities.
func (*AmazonOrderQuery) Aggregate ¶
func (aoq *AmazonOrderQuery) Aggregate(fns ...AggregateFunc) *AmazonOrderSelect
Aggregate returns a AmazonOrderSelect configured with the given aggregations.
func (*AmazonOrderQuery) All ¶
func (aoq *AmazonOrderQuery) All(ctx context.Context) ([]*AmazonOrder, error)
All executes the query and returns a list of AmazonOrders.
func (*AmazonOrderQuery) AllX ¶
func (aoq *AmazonOrderQuery) AllX(ctx context.Context) []*AmazonOrder
AllX is like All, but panics if an error occurs.
func (*AmazonOrderQuery) Clone ¶
func (aoq *AmazonOrderQuery) Clone() *AmazonOrderQuery
Clone returns a duplicate of the AmazonOrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AmazonOrderQuery) Count ¶
func (aoq *AmazonOrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AmazonOrderQuery) CountX ¶
func (aoq *AmazonOrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AmazonOrderQuery) Exist ¶
func (aoq *AmazonOrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AmazonOrderQuery) ExistX ¶
func (aoq *AmazonOrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AmazonOrderQuery) First ¶
func (aoq *AmazonOrderQuery) First(ctx context.Context) (*AmazonOrder, error)
First returns the first AmazonOrder entity from the query. Returns a *NotFoundError when no AmazonOrder was found.
func (*AmazonOrderQuery) FirstID ¶
func (aoq *AmazonOrderQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AmazonOrder ID from the query. Returns a *NotFoundError when no AmazonOrder ID was found.
func (*AmazonOrderQuery) FirstIDX ¶
func (aoq *AmazonOrderQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AmazonOrderQuery) FirstX ¶
func (aoq *AmazonOrderQuery) FirstX(ctx context.Context) *AmazonOrder
FirstX is like First, but panics if an error occurs.
func (*AmazonOrderQuery) GroupBy ¶
func (aoq *AmazonOrderQuery) GroupBy(field string, fields ...string) *AmazonOrderGroupBy
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.AmazonOrder.Query(). GroupBy(amazonorder.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AmazonOrderQuery) IDs ¶
func (aoq *AmazonOrderQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of AmazonOrder IDs.
func (*AmazonOrderQuery) IDsX ¶
func (aoq *AmazonOrderQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AmazonOrderQuery) Limit ¶
func (aoq *AmazonOrderQuery) Limit(limit int) *AmazonOrderQuery
Limit the number of records to be returned by this query.
func (*AmazonOrderQuery) Offset ¶
func (aoq *AmazonOrderQuery) Offset(offset int) *AmazonOrderQuery
Offset to start from.
func (*AmazonOrderQuery) Only ¶
func (aoq *AmazonOrderQuery) Only(ctx context.Context) (*AmazonOrder, error)
Only returns a single AmazonOrder entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AmazonOrder entity is found. Returns a *NotFoundError when no AmazonOrder entities are found.
func (*AmazonOrderQuery) OnlyID ¶
func (aoq *AmazonOrderQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AmazonOrder ID in the query. Returns a *NotSingularError when more than one AmazonOrder ID is found. Returns a *NotFoundError when no entities are found.
func (*AmazonOrderQuery) OnlyIDX ¶
func (aoq *AmazonOrderQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AmazonOrderQuery) OnlyX ¶
func (aoq *AmazonOrderQuery) OnlyX(ctx context.Context) *AmazonOrder
OnlyX is like Only, but panics if an error occurs.
func (*AmazonOrderQuery) Order ¶
func (aoq *AmazonOrderQuery) Order(o ...amazonorder.OrderOption) *AmazonOrderQuery
Order specifies how the records should be ordered.
func (*AmazonOrderQuery) QueryAmazonList ¶
func (aoq *AmazonOrderQuery) QueryAmazonList() *AmazonListQuery
QueryAmazonList chains the current query on the "amazon_list" edge.
func (*AmazonOrderQuery) Select ¶
func (aoq *AmazonOrderQuery) Select(fields ...string) *AmazonOrderSelect
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.AmazonOrder.Query(). Select(amazonorder.FieldName). Scan(ctx, &v)
func (*AmazonOrderQuery) Unique ¶
func (aoq *AmazonOrderQuery) Unique(unique bool) *AmazonOrderQuery
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 (*AmazonOrderQuery) Where ¶
func (aoq *AmazonOrderQuery) Where(ps ...predicate.AmazonOrder) *AmazonOrderQuery
Where adds a new predicate for the AmazonOrderQuery builder.
func (*AmazonOrderQuery) WithAmazonList ¶
func (aoq *AmazonOrderQuery) WithAmazonList(opts ...func(*AmazonListQuery)) *AmazonOrderQuery
WithAmazonList tells the query-builder to eager-load the nodes that are connected to the "amazon_list" edge. The optional arguments are used to configure the query builder of the edge.
type AmazonOrderSelect ¶
type AmazonOrderSelect struct { *AmazonOrderQuery // contains filtered or unexported fields }
AmazonOrderSelect is the builder for selecting fields of AmazonOrder entities.
func (*AmazonOrderSelect) Aggregate ¶
func (aos *AmazonOrderSelect) Aggregate(fns ...AggregateFunc) *AmazonOrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AmazonOrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AmazonOrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AmazonOrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AmazonOrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AmazonOrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AmazonOrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AmazonOrderSelect) Scan ¶
func (aos *AmazonOrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AmazonOrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AmazonOrderUpdate ¶
type AmazonOrderUpdate struct {
// contains filtered or unexported fields
}
AmazonOrderUpdate is the builder for updating AmazonOrder entities.
func (*AmazonOrderUpdate) AddPrice ¶
func (aou *AmazonOrderUpdate) AddPrice(f float32) *AmazonOrderUpdate
AddPrice adds f to the "price" field.
func (*AmazonOrderUpdate) AddTax ¶
func (aou *AmazonOrderUpdate) AddTax(f float32) *AmazonOrderUpdate
AddTax adds f to the "tax" field.
func (*AmazonOrderUpdate) ClearAmazonList ¶
func (aou *AmazonOrderUpdate) ClearAmazonList() *AmazonOrderUpdate
ClearAmazonList clears the "amazon_list" edge to the AmazonList entity.
func (*AmazonOrderUpdate) Exec ¶
func (aou *AmazonOrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonOrderUpdate) ExecX ¶
func (aou *AmazonOrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonOrderUpdate) Mutation ¶
func (aou *AmazonOrderUpdate) Mutation() *AmazonOrderMutation
Mutation returns the AmazonOrderMutation object of the builder.
func (*AmazonOrderUpdate) Save ¶
func (aou *AmazonOrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AmazonOrderUpdate) SaveX ¶
func (aou *AmazonOrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AmazonOrderUpdate) SetAddress1 ¶
func (aou *AmazonOrderUpdate) SetAddress1(s string) *AmazonOrderUpdate
SetAddress1 sets the "address1" field.
func (*AmazonOrderUpdate) SetAddress2 ¶
func (aou *AmazonOrderUpdate) SetAddress2(s string) *AmazonOrderUpdate
SetAddress2 sets the "address2" field.
func (*AmazonOrderUpdate) SetAmazonList ¶
func (aou *AmazonOrderUpdate) SetAmazonList(a *AmazonList) *AmazonOrderUpdate
SetAmazonList sets the "amazon_list" edge to the AmazonList entity.
func (*AmazonOrderUpdate) SetAmazonListID ¶
func (aou *AmazonOrderUpdate) SetAmazonListID(id int) *AmazonOrderUpdate
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID.
func (*AmazonOrderUpdate) SetBrand ¶
func (aou *AmazonOrderUpdate) SetBrand(s string) *AmazonOrderUpdate
SetBrand sets the "brand" field.
func (*AmazonOrderUpdate) SetCategory ¶
func (aou *AmazonOrderUpdate) SetCategory(s string) *AmazonOrderUpdate
SetCategory sets the "category" field.
func (*AmazonOrderUpdate) SetCity ¶
func (aou *AmazonOrderUpdate) SetCity(s string) *AmazonOrderUpdate
SetCity sets the "city" field.
func (*AmazonOrderUpdate) SetCreatedAt ¶
func (aou *AmazonOrderUpdate) SetCreatedAt(t time.Time) *AmazonOrderUpdate
SetCreatedAt sets the "created_at" field.
func (*AmazonOrderUpdate) SetName ¶
func (aou *AmazonOrderUpdate) SetName(s string) *AmazonOrderUpdate
SetName sets the "name" field.
func (*AmazonOrderUpdate) SetNillableAmazonListID ¶
func (aou *AmazonOrderUpdate) SetNillableAmazonListID(id *int) *AmazonOrderUpdate
SetNillableAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID if the given value is not nil.
func (*AmazonOrderUpdate) SetNillableCreatedAt ¶
func (aou *AmazonOrderUpdate) SetNillableCreatedAt(t *time.Time) *AmazonOrderUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AmazonOrderUpdate) SetOrderedAt ¶
func (aou *AmazonOrderUpdate) SetOrderedAt(t time.Time) *AmazonOrderUpdate
SetOrderedAt sets the "ordered_at" field.
func (*AmazonOrderUpdate) SetPrice ¶
func (aou *AmazonOrderUpdate) SetPrice(f float32) *AmazonOrderUpdate
SetPrice sets the "price" field.
func (*AmazonOrderUpdate) SetRefund ¶
func (aou *AmazonOrderUpdate) SetRefund(b bool) *AmazonOrderUpdate
SetRefund sets the "refund" field.
func (*AmazonOrderUpdate) SetSeller ¶
func (aou *AmazonOrderUpdate) SetSeller(s string) *AmazonOrderUpdate
SetSeller sets the "seller" field.
func (*AmazonOrderUpdate) SetState ¶
func (aou *AmazonOrderUpdate) SetState(s string) *AmazonOrderUpdate
SetState sets the "state" field.
func (*AmazonOrderUpdate) SetTax ¶
func (aou *AmazonOrderUpdate) SetTax(f float32) *AmazonOrderUpdate
SetTax sets the "tax" field.
func (*AmazonOrderUpdate) SetZip ¶
func (aou *AmazonOrderUpdate) SetZip(s string) *AmazonOrderUpdate
SetZip sets the "zip" field.
func (*AmazonOrderUpdate) Where ¶
func (aou *AmazonOrderUpdate) Where(ps ...predicate.AmazonOrder) *AmazonOrderUpdate
Where appends a list predicates to the AmazonOrderUpdate builder.
type AmazonOrderUpdateOne ¶
type AmazonOrderUpdateOne struct {
// contains filtered or unexported fields
}
AmazonOrderUpdateOne is the builder for updating a single AmazonOrder entity.
func (*AmazonOrderUpdateOne) AddPrice ¶
func (aouo *AmazonOrderUpdateOne) AddPrice(f float32) *AmazonOrderUpdateOne
AddPrice adds f to the "price" field.
func (*AmazonOrderUpdateOne) AddTax ¶
func (aouo *AmazonOrderUpdateOne) AddTax(f float32) *AmazonOrderUpdateOne
AddTax adds f to the "tax" field.
func (*AmazonOrderUpdateOne) ClearAmazonList ¶
func (aouo *AmazonOrderUpdateOne) ClearAmazonList() *AmazonOrderUpdateOne
ClearAmazonList clears the "amazon_list" edge to the AmazonList entity.
func (*AmazonOrderUpdateOne) Exec ¶
func (aouo *AmazonOrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AmazonOrderUpdateOne) ExecX ¶
func (aouo *AmazonOrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonOrderUpdateOne) Mutation ¶
func (aouo *AmazonOrderUpdateOne) Mutation() *AmazonOrderMutation
Mutation returns the AmazonOrderMutation object of the builder.
func (*AmazonOrderUpdateOne) Save ¶
func (aouo *AmazonOrderUpdateOne) Save(ctx context.Context) (*AmazonOrder, error)
Save executes the query and returns the updated AmazonOrder entity.
func (*AmazonOrderUpdateOne) SaveX ¶
func (aouo *AmazonOrderUpdateOne) SaveX(ctx context.Context) *AmazonOrder
SaveX is like Save, but panics if an error occurs.
func (*AmazonOrderUpdateOne) Select ¶
func (aouo *AmazonOrderUpdateOne) Select(field string, fields ...string) *AmazonOrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AmazonOrderUpdateOne) SetAddress1 ¶
func (aouo *AmazonOrderUpdateOne) SetAddress1(s string) *AmazonOrderUpdateOne
SetAddress1 sets the "address1" field.
func (*AmazonOrderUpdateOne) SetAddress2 ¶
func (aouo *AmazonOrderUpdateOne) SetAddress2(s string) *AmazonOrderUpdateOne
SetAddress2 sets the "address2" field.
func (*AmazonOrderUpdateOne) SetAmazonList ¶
func (aouo *AmazonOrderUpdateOne) SetAmazonList(a *AmazonList) *AmazonOrderUpdateOne
SetAmazonList sets the "amazon_list" edge to the AmazonList entity.
func (*AmazonOrderUpdateOne) SetAmazonListID ¶
func (aouo *AmazonOrderUpdateOne) SetAmazonListID(id int) *AmazonOrderUpdateOne
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID.
func (*AmazonOrderUpdateOne) SetBrand ¶
func (aouo *AmazonOrderUpdateOne) SetBrand(s string) *AmazonOrderUpdateOne
SetBrand sets the "brand" field.
func (*AmazonOrderUpdateOne) SetCategory ¶
func (aouo *AmazonOrderUpdateOne) SetCategory(s string) *AmazonOrderUpdateOne
SetCategory sets the "category" field.
func (*AmazonOrderUpdateOne) SetCity ¶
func (aouo *AmazonOrderUpdateOne) SetCity(s string) *AmazonOrderUpdateOne
SetCity sets the "city" field.
func (*AmazonOrderUpdateOne) SetCreatedAt ¶
func (aouo *AmazonOrderUpdateOne) SetCreatedAt(t time.Time) *AmazonOrderUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AmazonOrderUpdateOne) SetName ¶
func (aouo *AmazonOrderUpdateOne) SetName(s string) *AmazonOrderUpdateOne
SetName sets the "name" field.
func (*AmazonOrderUpdateOne) SetNillableAmazonListID ¶
func (aouo *AmazonOrderUpdateOne) SetNillableAmazonListID(id *int) *AmazonOrderUpdateOne
SetNillableAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID if the given value is not nil.
func (*AmazonOrderUpdateOne) SetNillableCreatedAt ¶
func (aouo *AmazonOrderUpdateOne) SetNillableCreatedAt(t *time.Time) *AmazonOrderUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AmazonOrderUpdateOne) SetOrderedAt ¶
func (aouo *AmazonOrderUpdateOne) SetOrderedAt(t time.Time) *AmazonOrderUpdateOne
SetOrderedAt sets the "ordered_at" field.
func (*AmazonOrderUpdateOne) SetPrice ¶
func (aouo *AmazonOrderUpdateOne) SetPrice(f float32) *AmazonOrderUpdateOne
SetPrice sets the "price" field.
func (*AmazonOrderUpdateOne) SetRefund ¶
func (aouo *AmazonOrderUpdateOne) SetRefund(b bool) *AmazonOrderUpdateOne
SetRefund sets the "refund" field.
func (*AmazonOrderUpdateOne) SetSeller ¶
func (aouo *AmazonOrderUpdateOne) SetSeller(s string) *AmazonOrderUpdateOne
SetSeller sets the "seller" field.
func (*AmazonOrderUpdateOne) SetState ¶
func (aouo *AmazonOrderUpdateOne) SetState(s string) *AmazonOrderUpdateOne
SetState sets the "state" field.
func (*AmazonOrderUpdateOne) SetTax ¶
func (aouo *AmazonOrderUpdateOne) SetTax(f float32) *AmazonOrderUpdateOne
SetTax sets the "tax" field.
func (*AmazonOrderUpdateOne) SetZip ¶
func (aouo *AmazonOrderUpdateOne) SetZip(s string) *AmazonOrderUpdateOne
SetZip sets the "zip" field.
func (*AmazonOrderUpdateOne) Where ¶
func (aouo *AmazonOrderUpdateOne) Where(ps ...predicate.AmazonOrder) *AmazonOrderUpdateOne
Where appends a list predicates to the AmazonOrderUpdate builder.
type AmazonOrders ¶
type AmazonOrders []*AmazonOrder
AmazonOrders is a parsable slice of AmazonOrder.
type AmazonShare ¶
type AmazonShare struct { int `json:"id,omitempty"` CanEdit bool `json:"can_edit,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` // The values are being populated by the AmazonShareQuery when eager-loading is set. Edges AmazonShareEdges `json:"edges"` // contains filtered or unexported fields }ID
AmazonShare is the model entity for the AmazonShare schema.
func (*AmazonShare) QueryAmazonList ¶
func (as *AmazonShare) QueryAmazonList() *AmazonListQuery
QueryAmazonList queries the "amazon_list" edge of the AmazonShare entity.
func (*AmazonShare) QueryUser ¶
func (as *AmazonShare) QueryUser() *UserQuery
QueryUser queries the "user" edge of the AmazonShare entity.
func (*AmazonShare) String ¶
func (as *AmazonShare) String() string
String implements the fmt.Stringer.
func (*AmazonShare) Unwrap ¶
func (as *AmazonShare) Unwrap() *AmazonShare
Unwrap unwraps the AmazonShare 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 (*AmazonShare) Update ¶
func (as *AmazonShare) Update() *AmazonShareUpdateOne
Update returns a builder for updating this AmazonShare. Note that you need to call AmazonShare.Unwrap() before calling this method if this AmazonShare was returned from a transaction, and the transaction was committed or rolled back.
type AmazonShareClient ¶
type AmazonShareClient struct {
// contains filtered or unexported fields
}
AmazonShareClient is a client for the AmazonShare schema.
func NewAmazonShareClient ¶
func NewAmazonShareClient(c config) *AmazonShareClient
NewAmazonShareClient returns a client for the AmazonShare from the given config.
func (*AmazonShareClient) Create ¶
func (c *AmazonShareClient) Create() *AmazonShareCreate
Create returns a builder for creating a AmazonShare entity.
func (*AmazonShareClient) CreateBulk ¶
func (c *AmazonShareClient) CreateBulk(builders ...*AmazonShareCreate) *AmazonShareCreateBulk
CreateBulk returns a builder for creating a bulk of AmazonShare entities.
func (*AmazonShareClient) Delete ¶
func (c *AmazonShareClient) Delete() *AmazonShareDelete
Delete returns a delete builder for AmazonShare.
func (*AmazonShareClient) DeleteOne ¶
func (c *AmazonShareClient) DeleteOne(as *AmazonShare) *AmazonShareDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AmazonShareClient) DeleteOneID ¶
func (c *AmazonShareClient) DeleteOneID(id int) *AmazonShareDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AmazonShareClient) Get ¶
func (c *AmazonShareClient) Get(ctx context.Context, id int) (*AmazonShare, error)
Get returns a AmazonShare entity by its id.
func (*AmazonShareClient) GetX ¶
func (c *AmazonShareClient) GetX(ctx context.Context, id int) *AmazonShare
GetX is like Get, but panics if an error occurs.
func (*AmazonShareClient) Hooks ¶
func (c *AmazonShareClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AmazonShareClient) Intercept ¶
func (c *AmazonShareClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `amazonshare.Intercept(f(g(h())))`.
func (*AmazonShareClient) Interceptors ¶
func (c *AmazonShareClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AmazonShareClient) Query ¶
func (c *AmazonShareClient) Query() *AmazonShareQuery
Query returns a query builder for AmazonShare.
func (*AmazonShareClient) QueryAmazonList ¶
func (c *AmazonShareClient) QueryAmazonList(as *AmazonShare) *AmazonListQuery
QueryAmazonList queries the amazon_list edge of a AmazonShare.
func (*AmazonShareClient) QueryUser ¶
func (c *AmazonShareClient) QueryUser(as *AmazonShare) *UserQuery
QueryUser queries the user edge of a AmazonShare.
func (*AmazonShareClient) Update ¶
func (c *AmazonShareClient) Update() *AmazonShareUpdate
Update returns an update builder for AmazonShare.
func (*AmazonShareClient) UpdateOne ¶
func (c *AmazonShareClient) UpdateOne(as *AmazonShare) *AmazonShareUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AmazonShareClient) UpdateOneID ¶
func (c *AmazonShareClient) UpdateOneID(id int) *AmazonShareUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AmazonShareClient) Use ¶
func (c *AmazonShareClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `amazonshare.Hooks(f(g(h())))`.
type AmazonShareCreate ¶
type AmazonShareCreate struct {
// contains filtered or unexported fields
}
AmazonShareCreate is the builder for creating a AmazonShare entity.
func (*AmazonShareCreate) Exec ¶
func (asc *AmazonShareCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonShareCreate) ExecX ¶
func (asc *AmazonShareCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonShareCreate) Mutation ¶
func (asc *AmazonShareCreate) Mutation() *AmazonShareMutation
Mutation returns the AmazonShareMutation object of the builder.
func (*AmazonShareCreate) Save ¶
func (asc *AmazonShareCreate) Save(ctx context.Context) (*AmazonShare, error)
Save creates the AmazonShare in the database.
func (*AmazonShareCreate) SaveX ¶
func (asc *AmazonShareCreate) SaveX(ctx context.Context) *AmazonShare
SaveX calls Save and panics if Save returns an error.
func (*AmazonShareCreate) SetAmazonList ¶
func (asc *AmazonShareCreate) SetAmazonList(a *AmazonList) *AmazonShareCreate
SetAmazonList sets the "amazon_list" edge to the AmazonList entity.
func (*AmazonShareCreate) SetAmazonListID ¶
func (asc *AmazonShareCreate) SetAmazonListID(id int) *AmazonShareCreate
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID.
func (*AmazonShareCreate) SetCanEdit ¶
func (asc *AmazonShareCreate) SetCanEdit(b bool) *AmazonShareCreate
SetCanEdit sets the "can_edit" field.
func (*AmazonShareCreate) SetCreatedAt ¶
func (asc *AmazonShareCreate) SetCreatedAt(t time.Time) *AmazonShareCreate
SetCreatedAt sets the "created_at" field.
func (*AmazonShareCreate) SetNillableAmazonListID ¶
func (asc *AmazonShareCreate) SetNillableAmazonListID(id *int) *AmazonShareCreate
SetNillableAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID if the given value is not nil.
func (*AmazonShareCreate) SetNillableCanEdit ¶
func (asc *AmazonShareCreate) SetNillableCanEdit(b *bool) *AmazonShareCreate
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*AmazonShareCreate) SetNillableUserID ¶
func (asc *AmazonShareCreate) SetNillableUserID(id *int) *AmazonShareCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AmazonShareCreate) SetUser ¶
func (asc *AmazonShareCreate) SetUser(u *User) *AmazonShareCreate
SetUser sets the "user" edge to the User entity.
func (*AmazonShareCreate) SetUserID ¶
func (asc *AmazonShareCreate) SetUserID(id int) *AmazonShareCreate
SetUserID sets the "user" edge to the User entity by ID.
type AmazonShareCreateBulk ¶
type AmazonShareCreateBulk struct {
// contains filtered or unexported fields
}
AmazonShareCreateBulk is the builder for creating many AmazonShare entities in bulk.
func (*AmazonShareCreateBulk) Exec ¶
func (ascb *AmazonShareCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonShareCreateBulk) ExecX ¶
func (ascb *AmazonShareCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonShareCreateBulk) Save ¶
func (ascb *AmazonShareCreateBulk) Save(ctx context.Context) ([]*AmazonShare, error)
Save creates the AmazonShare entities in the database.
func (*AmazonShareCreateBulk) SaveX ¶
func (ascb *AmazonShareCreateBulk) SaveX(ctx context.Context) []*AmazonShare
SaveX is like Save, but panics if an error occurs.
type AmazonShareDelete ¶
type AmazonShareDelete struct {
// contains filtered or unexported fields
}
AmazonShareDelete is the builder for deleting a AmazonShare entity.
func (*AmazonShareDelete) Exec ¶
func (asd *AmazonShareDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AmazonShareDelete) ExecX ¶
func (asd *AmazonShareDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AmazonShareDelete) Where ¶
func (asd *AmazonShareDelete) Where(ps ...predicate.AmazonShare) *AmazonShareDelete
Where appends a list predicates to the AmazonShareDelete builder.
type AmazonShareDeleteOne ¶
type AmazonShareDeleteOne struct {
// contains filtered or unexported fields
}
AmazonShareDeleteOne is the builder for deleting a single AmazonShare entity.
func (*AmazonShareDeleteOne) Exec ¶
func (asdo *AmazonShareDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AmazonShareDeleteOne) ExecX ¶
func (asdo *AmazonShareDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonShareDeleteOne) Where ¶
func (asdo *AmazonShareDeleteOne) Where(ps ...predicate.AmazonShare) *AmazonShareDeleteOne
Where appends a list predicates to the AmazonShareDelete builder.
type AmazonShareEdges ¶
type AmazonShareEdges struct { User `json:"user,omitempty"` AmazonList *AmazonList `json:"amazon_list,omitempty"` // contains filtered or unexported fields }User *
AmazonShareEdges holds the relations/edges for other nodes in the graph.
func (AmazonShareEdges) AmazonListOrErr ¶
func (e AmazonShareEdges) AmazonListOrErr() (*AmazonList, error)
AmazonListOrErr returns the AmazonList value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (AmazonShareEdges) UserOrErr ¶
func (e AmazonShareEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AmazonShareGroupBy ¶
type AmazonShareGroupBy struct {
// contains filtered or unexported fields
}
AmazonShareGroupBy is the group-by builder for AmazonShare entities.
func (*AmazonShareGroupBy) Aggregate ¶
func (asgb *AmazonShareGroupBy) Aggregate(fns ...AggregateFunc) *AmazonShareGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AmazonShareGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AmazonShareGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AmazonShareGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AmazonShareGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AmazonShareGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AmazonShareGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AmazonShareGroupBy) Scan ¶
func (asgb *AmazonShareGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AmazonShareGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AmazonShareMutation ¶
type AmazonShareMutation struct {
// contains filtered or unexported fields
}
AmazonShareMutation represents an operation that mutates the AmazonShare nodes in the graph.
func (*AmazonShareMutation) AddField ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) AddedEdges ¶
func (m *AmazonShareMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AmazonShareMutation) AddedField ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) AddedFields ¶
func (m *AmazonShareMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AmazonShareMutation) AddedIDs ¶
func (m *AmazonShareMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AmazonShareMutation) AmazonListCleared ¶
func (m *AmazonShareMutation) AmazonListCleared() bool
AmazonListCleared reports if the "amazon_list" edge to the AmazonList entity was cleared.
func (*AmazonShareMutation) AmazonListID ¶
func (m *AmazonShareMutation) AmazonListID() (id int, exists bool)
AmazonListID returns the "amazon_list" edge ID in the mutation.
func (*AmazonShareMutation) AmazonListIDs ¶
func (m *AmazonShareMutation) AmazonListIDs() (ids []int)
AmazonListIDs returns the "amazon_list" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AmazonListID instead. It exists only for internal usage by the builders.
func (*AmazonShareMutation) CanEdit ¶
func (m *AmazonShareMutation) CanEdit() (r bool, exists bool)
CanEdit returns the value of the "can_edit" field in the mutation.
func (*AmazonShareMutation) ClearAmazonList ¶
func (m *AmazonShareMutation) ClearAmazonList()
ClearAmazonList clears the "amazon_list" edge to the AmazonList entity.
func (*AmazonShareMutation) ClearEdge ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) ClearField ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) ClearUser ¶
func (m *AmazonShareMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*AmazonShareMutation) ClearedEdges ¶
func (m *AmazonShareMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AmazonShareMutation) ClearedFields ¶
func (m *AmazonShareMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AmazonShareMutation) Client ¶
func (m AmazonShareMutation) 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 (*AmazonShareMutation) CreatedAt ¶
func (m *AmazonShareMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AmazonShareMutation) EdgeCleared ¶
func (m *AmazonShareMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AmazonShareMutation) Field ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) FieldCleared ¶
func (m *AmazonShareMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AmazonShareMutation) Fields ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) ID ¶
func (m *AmazonShareMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AmazonShareMutation) IDs ¶
func (m *AmazonShareMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AmazonShareMutation) OldCanEdit ¶
func (m *AmazonShareMutation) OldCanEdit(ctx context.Context) (v bool, err error)
OldCanEdit returns the old "can_edit" field's value of the AmazonShare entity. If the AmazonShare 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 (*AmazonShareMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AmazonShare entity. If the AmazonShare 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 (*AmazonShareMutation) 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 (*AmazonShareMutation) Op ¶
func (m *AmazonShareMutation) Op() Op
Op returns the operation name.
func (*AmazonShareMutation) RemovedEdges ¶
func (m *AmazonShareMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AmazonShareMutation) RemovedIDs ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) ResetAmazonList ¶
func (m *AmazonShareMutation) ResetAmazonList()
ResetAmazonList resets all changes to the "amazon_list" edge.
func (*AmazonShareMutation) ResetCanEdit ¶
func (m *AmazonShareMutation) ResetCanEdit()
ResetCanEdit resets all changes to the "can_edit" field.
func (*AmazonShareMutation) ResetCreatedAt ¶
func (m *AmazonShareMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AmazonShareMutation) ResetEdge ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) ResetField ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) ResetUser ¶
func (m *AmazonShareMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*AmazonShareMutation) SetAmazonListID ¶
func (m *AmazonShareMutation) SetAmazonListID(id int)
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by id.
func (*AmazonShareMutation) SetCanEdit ¶
func (m *AmazonShareMutation) SetCanEdit(b bool)
SetCanEdit sets the "can_edit" field.
func (*AmazonShareMutation) SetCreatedAt ¶
func (m *AmazonShareMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AmazonShareMutation) SetField ¶
func (m *AmazonShareMutation) 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 (*AmazonShareMutation) SetOp ¶
func (m *AmazonShareMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AmazonShareMutation) SetUserID ¶
func (m *AmazonShareMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (AmazonShareMutation) Tx ¶
func (m AmazonShareMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AmazonShareMutation) Type ¶
func (m *AmazonShareMutation) Type() string
Type returns the node type of this mutation (AmazonShare).
func (*AmazonShareMutation) UserCleared ¶
func (m *AmazonShareMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*AmazonShareMutation) UserID ¶
func (m *AmazonShareMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*AmazonShareMutation) UserIDs ¶
func (m *AmazonShareMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*AmazonShareMutation) Where ¶
func (m *AmazonShareMutation) Where(ps ...predicate.AmazonShare)
Where appends a list predicates to the AmazonShareMutation builder.
func (*AmazonShareMutation) WhereP ¶
func (m *AmazonShareMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AmazonShareMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AmazonShareQuery ¶
type AmazonShareQuery struct {
// contains filtered or unexported fields
}
AmazonShareQuery is the builder for querying AmazonShare entities.
func (*AmazonShareQuery) Aggregate ¶
func (asq *AmazonShareQuery) Aggregate(fns ...AggregateFunc) *AmazonShareSelect
Aggregate returns a AmazonShareSelect configured with the given aggregations.
func (*AmazonShareQuery) All ¶
func (asq *AmazonShareQuery) All(ctx context.Context) ([]*AmazonShare, error)
All executes the query and returns a list of AmazonShares.
func (*AmazonShareQuery) AllX ¶
func (asq *AmazonShareQuery) AllX(ctx context.Context) []*AmazonShare
AllX is like All, but panics if an error occurs.
func (*AmazonShareQuery) Clone ¶
func (asq *AmazonShareQuery) Clone() *AmazonShareQuery
Clone returns a duplicate of the AmazonShareQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AmazonShareQuery) Count ¶
func (asq *AmazonShareQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AmazonShareQuery) CountX ¶
func (asq *AmazonShareQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AmazonShareQuery) Exist ¶
func (asq *AmazonShareQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AmazonShareQuery) ExistX ¶
func (asq *AmazonShareQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AmazonShareQuery) First ¶
func (asq *AmazonShareQuery) First(ctx context.Context) (*AmazonShare, error)
First returns the first AmazonShare entity from the query. Returns a *NotFoundError when no AmazonShare was found.
func (*AmazonShareQuery) FirstID ¶
func (asq *AmazonShareQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AmazonShare ID from the query. Returns a *NotFoundError when no AmazonShare ID was found.
func (*AmazonShareQuery) FirstIDX ¶
func (asq *AmazonShareQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AmazonShareQuery) FirstX ¶
func (asq *AmazonShareQuery) FirstX(ctx context.Context) *AmazonShare
FirstX is like First, but panics if an error occurs.
func (*AmazonShareQuery) GroupBy ¶
func (asq *AmazonShareQuery) GroupBy(field string, fields ...string) *AmazonShareGroupBy
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 { CanEdit bool `json:"can_edit,omitempty"` Count int `json:"count,omitempty"` } client.AmazonShare.Query(). GroupBy(amazonshare.FieldCanEdit). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AmazonShareQuery) IDs ¶
func (asq *AmazonShareQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of AmazonShare IDs.
func (*AmazonShareQuery) IDsX ¶
func (asq *AmazonShareQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AmazonShareQuery) Limit ¶
func (asq *AmazonShareQuery) Limit(limit int) *AmazonShareQuery
Limit the number of records to be returned by this query.
func (*AmazonShareQuery) Offset ¶
func (asq *AmazonShareQuery) Offset(offset int) *AmazonShareQuery
Offset to start from.
func (*AmazonShareQuery) Only ¶
func (asq *AmazonShareQuery) Only(ctx context.Context) (*AmazonShare, error)
Only returns a single AmazonShare entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AmazonShare entity is found. Returns a *NotFoundError when no AmazonShare entities are found.
func (*AmazonShareQuery) OnlyID ¶
func (asq *AmazonShareQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AmazonShare ID in the query. Returns a *NotSingularError when more than one AmazonShare ID is found. Returns a *NotFoundError when no entities are found.
func (*AmazonShareQuery) OnlyIDX ¶
func (asq *AmazonShareQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AmazonShareQuery) OnlyX ¶
func (asq *AmazonShareQuery) OnlyX(ctx context.Context) *AmazonShare
OnlyX is like Only, but panics if an error occurs.
func (*AmazonShareQuery) Order ¶
func (asq *AmazonShareQuery) Order(o ...amazonshare.OrderOption) *AmazonShareQuery
Order specifies how the records should be ordered.
func (*AmazonShareQuery) QueryAmazonList ¶
func (asq *AmazonShareQuery) QueryAmazonList() *AmazonListQuery
QueryAmazonList chains the current query on the "amazon_list" edge.
func (*AmazonShareQuery) QueryUser ¶
func (asq *AmazonShareQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*AmazonShareQuery) Select ¶
func (asq *AmazonShareQuery) Select(fields ...string) *AmazonShareSelect
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 { CanEdit bool `json:"can_edit,omitempty"` } client.AmazonShare.Query(). Select(amazonshare.FieldCanEdit). Scan(ctx, &v)
func (*AmazonShareQuery) Unique ¶
func (asq *AmazonShareQuery) Unique(unique bool) *AmazonShareQuery
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 (*AmazonShareQuery) Where ¶
func (asq *AmazonShareQuery) Where(ps ...predicate.AmazonShare) *AmazonShareQuery
Where adds a new predicate for the AmazonShareQuery builder.
func (*AmazonShareQuery) WithAmazonList ¶
func (asq *AmazonShareQuery) WithAmazonList(opts ...func(*AmazonListQuery)) *AmazonShareQuery
WithAmazonList tells the query-builder to eager-load the nodes that are connected to the "amazon_list" edge. The optional arguments are used to configure the query builder of the edge.
func (*AmazonShareQuery) WithUser ¶
func (asq *AmazonShareQuery) WithUser(opts ...func(*UserQuery)) *AmazonShareQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type AmazonShareSelect ¶
type AmazonShareSelect struct { // contains filtered or unexported fields }
AmazonShareSelect is the builder for selecting fields of AmazonShare entities.
func (*AmazonShareSelect) Aggregate ¶
func (ass *AmazonShareSelect) Aggregate(fns ...AggregateFunc) *AmazonShareSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AmazonShareSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AmazonShareSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AmazonShareSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AmazonShareSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AmazonShareSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AmazonShareSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AmazonShareSelect) Scan ¶
func (ass *AmazonShareSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AmazonShareSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AmazonShareUpdate ¶
type AmazonShareUpdate struct {
// contains filtered or unexported fields
}
AmazonShareUpdate is the builder for updating AmazonShare entities.
func (*AmazonShareUpdate) ClearAmazonList ¶
func (asu *AmazonShareUpdate) ClearAmazonList() *AmazonShareUpdate
ClearAmazonList clears the "amazon_list" edge to the AmazonList entity.
func (*AmazonShareUpdate) ClearUser ¶
func (asu *AmazonShareUpdate) ClearUser() *AmazonShareUpdate
ClearUser clears the "user" edge to the User entity.
func (*AmazonShareUpdate) Exec ¶
func (asu *AmazonShareUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AmazonShareUpdate) ExecX ¶
func (asu *AmazonShareUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonShareUpdate) Mutation ¶
func (asu *AmazonShareUpdate) Mutation() *AmazonShareMutation
Mutation returns the AmazonShareMutation object of the builder.
func (*AmazonShareUpdate) Save ¶
func (asu *AmazonShareUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AmazonShareUpdate) SaveX ¶
func (asu *AmazonShareUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AmazonShareUpdate) SetAmazonList ¶
func (asu *AmazonShareUpdate) SetAmazonList(a *AmazonList) *AmazonShareUpdate
SetAmazonList sets the "amazon_list" edge to the AmazonList entity.
func (*AmazonShareUpdate) SetAmazonListID ¶
func (asu *AmazonShareUpdate) SetAmazonListID(id int) *AmazonShareUpdate
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID.
func (*AmazonShareUpdate) SetCanEdit ¶
func (asu *AmazonShareUpdate) SetCanEdit(b bool) *AmazonShareUpdate
SetCanEdit sets the "can_edit" field.
func (*AmazonShareUpdate) SetCreatedAt ¶
func (asu *AmazonShareUpdate) SetCreatedAt(t time.Time) *AmazonShareUpdate
SetCreatedAt sets the "created_at" field.
func (*AmazonShareUpdate) SetNillableAmazonListID ¶
func (asu *AmazonShareUpdate) SetNillableAmazonListID(id *int) *AmazonShareUpdate
SetNillableAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID if the given value is not nil.
func (*AmazonShareUpdate) SetNillableCanEdit ¶
func (asu *AmazonShareUpdate) SetNillableCanEdit(b *bool) *AmazonShareUpdate
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*AmazonShareUpdate) SetNillableUserID ¶
func (asu *AmazonShareUpdate) SetNillableUserID(id *int) *AmazonShareUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AmazonShareUpdate) SetUser ¶
func (asu *AmazonShareUpdate) SetUser(u *User) *AmazonShareUpdate
SetUser sets the "user" edge to the User entity.
func (*AmazonShareUpdate) SetUserID ¶
func (asu *AmazonShareUpdate) SetUserID(id int) *AmazonShareUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*AmazonShareUpdate) Where ¶
func (asu *AmazonShareUpdate) Where(ps ...predicate.AmazonShare) *AmazonShareUpdate
Where appends a list predicates to the AmazonShareUpdate builder.
type AmazonShareUpdateOne ¶
type AmazonShareUpdateOne struct {
// contains filtered or unexported fields
}
AmazonShareUpdateOne is the builder for updating a single AmazonShare entity.
func (*AmazonShareUpdateOne) ClearAmazonList ¶
func (asuo *AmazonShareUpdateOne) ClearAmazonList() *AmazonShareUpdateOne
ClearAmazonList clears the "amazon_list" edge to the AmazonList entity.
func (*AmazonShareUpdateOne) ClearUser ¶
func (asuo *AmazonShareUpdateOne) ClearUser() *AmazonShareUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*AmazonShareUpdateOne) Exec ¶
func (asuo *AmazonShareUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AmazonShareUpdateOne) ExecX ¶
func (asuo *AmazonShareUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AmazonShareUpdateOne) Mutation ¶
func (asuo *AmazonShareUpdateOne) Mutation() *AmazonShareMutation
Mutation returns the AmazonShareMutation object of the builder.
func (*AmazonShareUpdateOne) Save ¶
func (asuo *AmazonShareUpdateOne) Save(ctx context.Context) (*AmazonShare, error)
Save executes the query and returns the updated AmazonShare entity.
func (*AmazonShareUpdateOne) SaveX ¶
func (asuo *AmazonShareUpdateOne) SaveX(ctx context.Context) *AmazonShare
SaveX is like Save, but panics if an error occurs.
func (*AmazonShareUpdateOne) Select ¶
func (asuo *AmazonShareUpdateOne) Select(field string, fields ...string) *AmazonShareUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AmazonShareUpdateOne) SetAmazonList ¶
func (asuo *AmazonShareUpdateOne) SetAmazonList(a *AmazonList) *AmazonShareUpdateOne
SetAmazonList sets the "amazon_list" edge to the AmazonList entity.
func (*AmazonShareUpdateOne) SetAmazonListID ¶
func (asuo *AmazonShareUpdateOne) SetAmazonListID(id int) *AmazonShareUpdateOne
SetAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID.
func (*AmazonShareUpdateOne) SetCanEdit ¶
func (asuo *AmazonShareUpdateOne) SetCanEdit(b bool) *AmazonShareUpdateOne
SetCanEdit sets the "can_edit" field.
func (*AmazonShareUpdateOne) SetCreatedAt ¶
func (asuo *AmazonShareUpdateOne) SetCreatedAt(t time.Time) *AmazonShareUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AmazonShareUpdateOne) SetNillableAmazonListID ¶
func (asuo *AmazonShareUpdateOne) SetNillableAmazonListID(id *int) *AmazonShareUpdateOne
SetNillableAmazonListID sets the "amazon_list" edge to the AmazonList entity by ID if the given value is not nil.
func (*AmazonShareUpdateOne) SetNillableCanEdit ¶
func (asuo *AmazonShareUpdateOne) SetNillableCanEdit(b *bool) *AmazonShareUpdateOne
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*AmazonShareUpdateOne) SetNillableUserID ¶
func (asuo *AmazonShareUpdateOne) SetNillableUserID(id *int) *AmazonShareUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*AmazonShareUpdateOne) SetUser ¶
func (asuo *AmazonShareUpdateOne) SetUser(u *User) *AmazonShareUpdateOne
SetUser sets the "user" edge to the User entity.
func (*AmazonShareUpdateOne) SetUserID ¶
func (asuo *AmazonShareUpdateOne) SetUserID(id int) *AmazonShareUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*AmazonShareUpdateOne) Where ¶
func (asuo *AmazonShareUpdateOne) Where(ps ...predicate.AmazonShare) *AmazonShareUpdateOne
Where appends a list predicates to the AmazonShareUpdate builder.
type AmazonShares ¶
type AmazonShares []*AmazonShare
AmazonShares is a parsable slice of AmazonShare.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // AmazonList is the client for interacting with the AmazonList builders. AmazonList *AmazonListClient // AmazonOrder is the client for interacting with the AmazonOrder builders. AmazonOrder *AmazonOrderClient AmazonShare *AmazonShareClient // Drink is the client for interacting with the Drink builders. Drink *DrinkClient // GroceryList is the client for interacting with the GroceryList builders. GroceryList *GroceryListClient // GroceryListItem is the client for interacting with the GroceryListItem builders. GroceryListItem *GroceryListItemClient GroceryListShare *GroceryListShareClient // Movie is the client for interacting with the Movie builders. Movie *MovieClient // MovieCollection is the client for interacting with the MovieCollection builders. MovieCollection *MovieCollectionClient MovieCollectionShare *MovieCollectionShareClient // 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(). AmazonList. 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 Drink ¶
type Drink struct { // ID of the ent. ID int `json:"id,omitempty"` // Type holds the value of the "type" field. Type drink.Type `json:"type,omitempty"` // Abv holds the value of the "abv" field. Abv int8 `json:"abv,omitempty"` // Ounces holds the value of the "ounces" field. Ounces int8 `json:"ounces,omitempty"` // Year holds the value of the "year" field. Year int `json:"year,omitempty"` // Month holds the value of the "month" field. Month int `json:"month,omitempty"` // Day holds the value of the "day" field. Day int `json:"day,omitempty"` // Note holds the value of the "note" field. Note string `json:"note,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DrinkQuery when eager-loading is set. Edges DrinkEdges `json:"edges"` // contains filtered or unexported fields }
Drink is the model entity for the Drink schema.
func (*Drink) QueryOwner ¶
QueryOwner queries the "owner" edge of the Drink entity.
func (*Drink) Unwrap ¶
Unwrap unwraps the Drink 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 (*Drink) Update ¶
func (d *Drink) Update() *DrinkUpdateOne
Update returns a builder for updating this Drink. Note that you need to call Drink.Unwrap() before calling this method if this Drink was returned from a transaction, and the transaction was committed or rolled back.
type DrinkClient ¶
type DrinkClient struct {
// contains filtered or unexported fields
}
DrinkClient is a client for the Drink schema.
func NewDrinkClient ¶
func NewDrinkClient(c config) *DrinkClient
NewDrinkClient returns a client for the Drink from the given config.
func (*DrinkClient) Create ¶
func (c *DrinkClient) Create() *DrinkCreate
Create returns a builder for creating a Drink entity.
func (*DrinkClient) CreateBulk ¶
func (c *DrinkClient) CreateBulk(builders ...*DrinkCreate) *DrinkCreateBulk
CreateBulk returns a builder for creating a bulk of Drink entities.
func (*DrinkClient) Delete ¶
func (c *DrinkClient) Delete() *DrinkDelete
Delete returns a delete builder for Drink.
func (*DrinkClient) DeleteOne ¶
func (c *DrinkClient) DeleteOne(d *Drink) *DrinkDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DrinkClient) DeleteOneID ¶
func (c *DrinkClient) DeleteOneID(id int) *DrinkDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DrinkClient) GetX ¶
func (c *DrinkClient) GetX(ctx context.Context, id int) *Drink
GetX is like Get, but panics if an error occurs.
func (*DrinkClient) Intercept ¶
func (c *DrinkClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `drink.Intercept(f(g(h())))`.
func (*DrinkClient) Interceptors ¶
func (c *DrinkClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DrinkClient) Query ¶
func (c *DrinkClient) Query() *DrinkQuery
Query returns a query builder for Drink.
func (*DrinkClient) QueryOwner ¶
func (c *DrinkClient) QueryOwner(d *Drink) *UserQuery
QueryOwner queries the owner edge of a Drink.
func (*DrinkClient) Update ¶
func (c *DrinkClient) Update() *DrinkUpdate
Update returns an update builder for Drink.
func (*DrinkClient) UpdateOne ¶
func (c *DrinkClient) UpdateOne(d *Drink) *DrinkUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DrinkClient) UpdateOneID ¶
func (c *DrinkClient) UpdateOneID(id int) *DrinkUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DrinkClient) Use ¶
func (c *DrinkClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `drink.Hooks(f(g(h())))`.
type DrinkCreate ¶
type DrinkCreate struct {
// contains filtered or unexported fields
}
DrinkCreate is the builder for creating a Drink entity.
func (*DrinkCreate) Exec ¶
func (dc *DrinkCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DrinkCreate) ExecX ¶
func (dc *DrinkCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DrinkCreate) Mutation ¶
func (dc *DrinkCreate) Mutation() *DrinkMutation
Mutation returns the DrinkMutation object of the builder.
func (*DrinkCreate) Save ¶
func (dc *DrinkCreate) Save(ctx context.Context) (*Drink, error)
Save creates the Drink in the database.
func (*DrinkCreate) SaveX ¶
func (dc *DrinkCreate) SaveX(ctx context.Context) *Drink
SaveX calls Save and panics if Save returns an error.
func (*DrinkCreate) SetAbv ¶
func (dc *DrinkCreate) SetAbv(i int8) *DrinkCreate
SetAbv sets the "abv" field.
func (*DrinkCreate) SetCreatedAt ¶
func (dc *DrinkCreate) SetCreatedAt(t time.Time) *DrinkCreate
SetCreatedAt sets the "created_at" field.
func (*DrinkCreate) SetDay ¶
func (dc *DrinkCreate) SetDay(i int) *DrinkCreate
SetDay sets the "day" field.
func (*DrinkCreate) SetMonth ¶
func (dc *DrinkCreate) SetMonth(i int) *DrinkCreate
SetMonth sets the "month" field.
func (*DrinkCreate) SetNillableAbv ¶
func (dc *DrinkCreate) SetNillableAbv(i *int8) *DrinkCreate
SetNillableAbv sets the "abv" field if the given value is not nil.
func (*DrinkCreate) SetNillableCreatedAt ¶
func (dc *DrinkCreate) SetNillableCreatedAt(t *time.Time) *DrinkCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DrinkCreate) SetNillableDay ¶
func (dc *DrinkCreate) SetNillableDay(i *int) *DrinkCreate
SetNillableDay sets the "day" field if the given value is not nil.
func (*DrinkCreate) SetNillableMonth ¶
func (dc *DrinkCreate) SetNillableMonth(i *int) *DrinkCreate
SetNillableMonth sets the "month" field if the given value is not nil.
func (*DrinkCreate) SetNillableNote ¶
func (dc *DrinkCreate) SetNillableNote(s *string) *DrinkCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*DrinkCreate) SetNillableOunces ¶
func (dc *DrinkCreate) SetNillableOunces(i *int8) *DrinkCreate
SetNillableOunces sets the "ounces" field if the given value is not nil.
func (*DrinkCreate) SetNillableOwnerID ¶
func (dc *DrinkCreate) SetNillableOwnerID(id *int) *DrinkCreate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*DrinkCreate) SetNillableType ¶
func (dc *DrinkCreate) SetNillableType(d *drink.Type) *DrinkCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*DrinkCreate) SetNillableYear ¶
func (dc *DrinkCreate) SetNillableYear(i *int) *DrinkCreate
SetNillableYear sets the "year" field if the given value is not nil.
func (*DrinkCreate) SetNote ¶
func (dc *DrinkCreate) SetNote(s string) *DrinkCreate
SetNote sets the "note" field.
func (*DrinkCreate) SetOunces ¶
func (dc *DrinkCreate) SetOunces(i int8) *DrinkCreate
SetOunces sets the "ounces" field.
func (*DrinkCreate) SetOwner ¶
func (dc *DrinkCreate) SetOwner(u *User) *DrinkCreate
SetOwner sets the "owner" edge to the User entity.
func (*DrinkCreate) SetOwnerID ¶
func (dc *DrinkCreate) SetOwnerID(id int) *DrinkCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*DrinkCreate) SetType ¶
func (dc *DrinkCreate) SetType(d drink.Type) *DrinkCreate
SetType sets the "type" field.
func (*DrinkCreate) SetYear ¶
func (dc *DrinkCreate) SetYear(i int) *DrinkCreate
SetYear sets the "year" field.
type DrinkCreateBulk ¶
type DrinkCreateBulk struct {
// contains filtered or unexported fields
}
DrinkCreateBulk is the builder for creating many Drink entities in bulk.
func (*DrinkCreateBulk) Exec ¶
func (dcb *DrinkCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DrinkCreateBulk) ExecX ¶
func (dcb *DrinkCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DrinkDelete ¶
type DrinkDelete struct {
// contains filtered or unexported fields
}
DrinkDelete is the builder for deleting a Drink entity.
func (*DrinkDelete) Exec ¶
func (dd *DrinkDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DrinkDelete) ExecX ¶
func (dd *DrinkDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DrinkDelete) Where ¶
func (dd *DrinkDelete) Where(ps ...predicate.Drink) *DrinkDelete
Where appends a list predicates to the DrinkDelete builder.
type DrinkDeleteOne ¶
type DrinkDeleteOne struct {
// contains filtered or unexported fields
}
DrinkDeleteOne is the builder for deleting a single Drink entity.
func (*DrinkDeleteOne) Exec ¶
func (ddo *DrinkDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DrinkDeleteOne) ExecX ¶
func (ddo *DrinkDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DrinkDeleteOne) Where ¶
func (ddo *DrinkDeleteOne) Where(ps ...predicate.Drink) *DrinkDeleteOne
Where appends a list predicates to the DrinkDelete builder.
type DrinkEdges ¶
type DrinkEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
DrinkEdges holds the relations/edges for other nodes in the graph.
func (DrinkEdges) OwnerOrErr ¶
func (e DrinkEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DrinkGroupBy ¶
type DrinkGroupBy struct {
// contains filtered or unexported fields
}
DrinkGroupBy is the group-by builder for Drink entities.
func (*DrinkGroupBy) Aggregate ¶
func (dgb *DrinkGroupBy) Aggregate(fns ...AggregateFunc) *DrinkGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DrinkGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DrinkGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DrinkGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DrinkGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DrinkGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DrinkGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DrinkGroupBy) Scan ¶
func (dgb *DrinkGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DrinkGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DrinkMutation ¶
type DrinkMutation struct {
// contains filtered or unexported fields
}
DrinkMutation represents an operation that mutates the Drink nodes in the graph.
func (*DrinkMutation) Abv ¶
func (m *DrinkMutation) Abv() (r int8, exists bool)
Abv returns the value of the "abv" field in the mutation.
func (*DrinkMutation) AddAbv ¶
func (m *DrinkMutation) AddAbv(i int8)
AddAbv adds i to the "abv" field.
func (*DrinkMutation) AddDay ¶
func (m *DrinkMutation) AddDay(i int)
AddDay adds i to the "day" field.
func (*DrinkMutation) AddField ¶
func (m *DrinkMutation) 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 (*DrinkMutation) AddMonth ¶
func (m *DrinkMutation) AddMonth(i int)
AddMonth adds i to the "month" field.
func (*DrinkMutation) AddOunces ¶
func (m *DrinkMutation) AddOunces(i int8)
AddOunces adds i to the "ounces" field.
func (*DrinkMutation) AddYear ¶
func (m *DrinkMutation) AddYear(i int)
AddYear adds i to the "year" field.
func (*DrinkMutation) AddedAbv ¶
func (m *DrinkMutation) AddedAbv() (r int8, exists bool)
AddedAbv returns the value that was added to the "abv" field in this mutation.
func (*DrinkMutation) AddedDay ¶
func (m *DrinkMutation) AddedDay() (r int, exists bool)
AddedDay returns the value that was added to the "day" field in this mutation.
func (*DrinkMutation) AddedEdges ¶
func (m *DrinkMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DrinkMutation) AddedField ¶
func (m *DrinkMutation) 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 (*DrinkMutation) AddedFields ¶
func (m *DrinkMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DrinkMutation) AddedIDs ¶
func (m *DrinkMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DrinkMutation) AddedMonth ¶
func (m *DrinkMutation) AddedMonth() (r int, exists bool)
AddedMonth returns the value that was added to the "month" field in this mutation.
func (*DrinkMutation) AddedOunces ¶
func (m *DrinkMutation) AddedOunces() (r int8, exists bool)
AddedOunces returns the value that was added to the "ounces" field in this mutation.
func (*DrinkMutation) AddedYear ¶
func (m *DrinkMutation) AddedYear() (r int, exists bool)
AddedYear returns the value that was added to the "year" field in this mutation.
func (*DrinkMutation) ClearEdge ¶
func (m *DrinkMutation) 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 (*DrinkMutation) ClearField ¶
func (m *DrinkMutation) 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 (*DrinkMutation) ClearOwner ¶
func (m *DrinkMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*DrinkMutation) ClearedEdges ¶
func (m *DrinkMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DrinkMutation) ClearedFields ¶
func (m *DrinkMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DrinkMutation) Client ¶
func (m DrinkMutation) 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 (*DrinkMutation) CreatedAt ¶
func (m *DrinkMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DrinkMutation) Day ¶
func (m *DrinkMutation) Day() (r int, exists bool)
Day returns the value of the "day" field in the mutation.
func (*DrinkMutation) EdgeCleared ¶
func (m *DrinkMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DrinkMutation) Field ¶
func (m *DrinkMutation) 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 (*DrinkMutation) FieldCleared ¶
func (m *DrinkMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DrinkMutation) Fields ¶
func (m *DrinkMutation) 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 (*DrinkMutation) GetType ¶
func (m *DrinkMutation) GetType() (r drink.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*DrinkMutation) ID ¶
func (m *DrinkMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DrinkMutation) IDs ¶
func (m *DrinkMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DrinkMutation) Month ¶
func (m *DrinkMutation) Month() (r int, exists bool)
Month returns the value of the "month" field in the mutation.
func (*DrinkMutation) Note ¶
func (m *DrinkMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*DrinkMutation) OldAbv ¶
func (m *DrinkMutation) OldAbv(ctx context.Context) (v int8, err error)
OldAbv returns the old "abv" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) OldDay ¶
func (m *DrinkMutation) OldDay(ctx context.Context) (v int, err error)
OldDay returns the old "day" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) 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 (*DrinkMutation) OldMonth ¶
func (m *DrinkMutation) OldMonth(ctx context.Context) (v int, err error)
OldMonth returns the old "month" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) OldNote ¶
func (m *DrinkMutation) OldNote(ctx context.Context) (v string, err error)
OldNote returns the old "note" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) OldOunces ¶
func (m *DrinkMutation) OldOunces(ctx context.Context) (v int8, err error)
OldOunces returns the old "ounces" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) OldType ¶
OldType returns the old "type" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) OldYear ¶
func (m *DrinkMutation) OldYear(ctx context.Context) (v int, err error)
OldYear returns the old "year" field's value of the Drink entity. If the Drink 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 (*DrinkMutation) Ounces ¶
func (m *DrinkMutation) Ounces() (r int8, exists bool)
Ounces returns the value of the "ounces" field in the mutation.
func (*DrinkMutation) OwnerCleared ¶
func (m *DrinkMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*DrinkMutation) OwnerID ¶
func (m *DrinkMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*DrinkMutation) OwnerIDs ¶
func (m *DrinkMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*DrinkMutation) RemovedEdges ¶
func (m *DrinkMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DrinkMutation) RemovedIDs ¶
func (m *DrinkMutation) 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 (*DrinkMutation) ResetAbv ¶
func (m *DrinkMutation) ResetAbv()
ResetAbv resets all changes to the "abv" field.
func (*DrinkMutation) ResetCreatedAt ¶
func (m *DrinkMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DrinkMutation) ResetDay ¶
func (m *DrinkMutation) ResetDay()
ResetDay resets all changes to the "day" field.
func (*DrinkMutation) ResetEdge ¶
func (m *DrinkMutation) 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 (*DrinkMutation) ResetField ¶
func (m *DrinkMutation) 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 (*DrinkMutation) ResetMonth ¶
func (m *DrinkMutation) ResetMonth()
ResetMonth resets all changes to the "month" field.
func (*DrinkMutation) ResetNote ¶
func (m *DrinkMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*DrinkMutation) ResetOunces ¶
func (m *DrinkMutation) ResetOunces()
ResetOunces resets all changes to the "ounces" field.
func (*DrinkMutation) ResetOwner ¶
func (m *DrinkMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*DrinkMutation) ResetType ¶
func (m *DrinkMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*DrinkMutation) ResetYear ¶
func (m *DrinkMutation) ResetYear()
ResetYear resets all changes to the "year" field.
func (*DrinkMutation) SetCreatedAt ¶
func (m *DrinkMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DrinkMutation) SetField ¶
func (m *DrinkMutation) 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 (*DrinkMutation) SetMonth ¶
func (m *DrinkMutation) SetMonth(i int)
SetMonth sets the "month" field.
func (*DrinkMutation) SetNote ¶
func (m *DrinkMutation) SetNote(s string)
SetNote sets the "note" field.
func (*DrinkMutation) SetOp ¶
func (m *DrinkMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DrinkMutation) SetOunces ¶
func (m *DrinkMutation) SetOunces(i int8)
SetOunces sets the "ounces" field.
func (*DrinkMutation) SetOwnerID ¶
func (m *DrinkMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (*DrinkMutation) SetType ¶
func (m *DrinkMutation) SetType(d drink.Type)
SetType sets the "type" field.
func (*DrinkMutation) SetYear ¶
func (m *DrinkMutation) SetYear(i int)
SetYear sets the "year" field.
func (DrinkMutation) Tx ¶
func (m DrinkMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DrinkMutation) Type ¶
func (m *DrinkMutation) Type() string
Type returns the node type of this mutation (Drink).
func (*DrinkMutation) Where ¶
func (m *DrinkMutation) Where(ps ...predicate.Drink)
Where appends a list predicates to the DrinkMutation builder.
func (*DrinkMutation) WhereP ¶
func (m *DrinkMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DrinkMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*DrinkMutation) Year ¶
func (m *DrinkMutation) Year() (r int, exists bool)
Year returns the value of the "year" field in the mutation.
type DrinkQuery ¶
type DrinkQuery struct {
// contains filtered or unexported fields
}
DrinkQuery is the builder for querying Drink entities.
func (*DrinkQuery) Aggregate ¶
func (dq *DrinkQuery) Aggregate(fns ...AggregateFunc) *DrinkSelect
Aggregate returns a DrinkSelect configured with the given aggregations.
func (*DrinkQuery) All ¶
func (dq *DrinkQuery) All(ctx context.Context) ([]*Drink, error)
All executes the query and returns a list of Drinks.
func (*DrinkQuery) AllX ¶
func (dq *DrinkQuery) AllX(ctx context.Context) []*Drink
AllX is like All, but panics if an error occurs.
func (*DrinkQuery) Clone ¶
func (dq *DrinkQuery) Clone() *DrinkQuery
Clone returns a duplicate of the DrinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DrinkQuery) Count ¶
func (dq *DrinkQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DrinkQuery) CountX ¶
func (dq *DrinkQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DrinkQuery) Exist ¶
func (dq *DrinkQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DrinkQuery) ExistX ¶
func (dq *DrinkQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DrinkQuery) First ¶
func (dq *DrinkQuery) First(ctx context.Context) (*Drink, error)
First returns the first Drink entity from the query. Returns a *NotFoundError when no Drink was found.
func (*DrinkQuery) FirstID ¶
func (dq *DrinkQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Drink ID from the query. Returns a *NotFoundError when no Drink ID was found.
func (*DrinkQuery) FirstIDX ¶
func (dq *DrinkQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DrinkQuery) FirstX ¶
func (dq *DrinkQuery) FirstX(ctx context.Context) *Drink
FirstX is like First, but panics if an error occurs.
func (*DrinkQuery) GroupBy ¶
func (dq *DrinkQuery) GroupBy(field string, fields ...string) *DrinkGroupBy
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 { Type drink.Type `json:"type,omitempty"` Count int `json:"count,omitempty"` } client.Drink.Query(). GroupBy(drink.FieldType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DrinkQuery) IDs ¶
func (dq *DrinkQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Drink IDs.
func (*DrinkQuery) IDsX ¶
func (dq *DrinkQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DrinkQuery) Limit ¶
func (dq *DrinkQuery) Limit(limit int) *DrinkQuery
Limit the number of records to be returned by this query.
func (*DrinkQuery) Offset ¶
func (dq *DrinkQuery) Offset(offset int) *DrinkQuery
Offset to start from.
func (*DrinkQuery) Only ¶
func (dq *DrinkQuery) Only(ctx context.Context) (*Drink, error)
Only returns a single Drink entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Drink entity is found. Returns a *NotFoundError when no Drink entities are found.
func (*DrinkQuery) OnlyID ¶
func (dq *DrinkQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Drink ID in the query. Returns a *NotSingularError when more than one Drink ID is found. Returns a *NotFoundError when no entities are found.
func (*DrinkQuery) OnlyIDX ¶
func (dq *DrinkQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DrinkQuery) OnlyX ¶
func (dq *DrinkQuery) OnlyX(ctx context.Context) *Drink
OnlyX is like Only, but panics if an error occurs.
func (*DrinkQuery) Order ¶
func (dq *DrinkQuery) Order(o ...drink.OrderOption) *DrinkQuery
Order specifies how the records should be ordered.
func (*DrinkQuery) QueryOwner ¶
func (dq *DrinkQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*DrinkQuery) Select ¶
func (dq *DrinkQuery) Select(fields ...string) *DrinkSelect
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 { Type drink.Type `json:"type,omitempty"` } client.Drink.Query(). Select(drink.FieldType). Scan(ctx, &v)
func (*DrinkQuery) Unique ¶
func (dq *DrinkQuery) Unique(unique bool) *DrinkQuery
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 (*DrinkQuery) Where ¶
func (dq *DrinkQuery) Where(ps ...predicate.Drink) *DrinkQuery
Where adds a new predicate for the DrinkQuery builder.
func (*DrinkQuery) WithOwner ¶
func (dq *DrinkQuery) WithOwner(opts ...func(*UserQuery)) *DrinkQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type DrinkSelect ¶
type DrinkSelect struct { *DrinkQuery // contains filtered or unexported fields }
DrinkSelect is the builder for selecting fields of Drink entities.
func (*DrinkSelect) Aggregate ¶
func (ds *DrinkSelect) Aggregate(fns ...AggregateFunc) *DrinkSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DrinkSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DrinkSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DrinkSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DrinkSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DrinkSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DrinkSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DrinkSelect) Scan ¶
func (ds *DrinkSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DrinkSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DrinkUpdate ¶
type DrinkUpdate struct {
// contains filtered or unexported fields
}
DrinkUpdate is the builder for updating Drink entities.
func (*DrinkUpdate) AddAbv ¶
func (du *DrinkUpdate) AddAbv(i int8) *DrinkUpdate
AddAbv adds i to the "abv" field.
func (*DrinkUpdate) AddDay ¶
func (du *DrinkUpdate) AddDay(i int) *DrinkUpdate
AddDay adds i to the "day" field.
func (*DrinkUpdate) AddMonth ¶
func (du *DrinkUpdate) AddMonth(i int) *DrinkUpdate
AddMonth adds i to the "month" field.
func (*DrinkUpdate) AddOunces ¶
func (du *DrinkUpdate) AddOunces(i int8) *DrinkUpdate
AddOunces adds i to the "ounces" field.
func (*DrinkUpdate) AddYear ¶
func (du *DrinkUpdate) AddYear(i int) *DrinkUpdate
AddYear adds i to the "year" field.
func (*DrinkUpdate) ClearOwner ¶
func (du *DrinkUpdate) ClearOwner() *DrinkUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*DrinkUpdate) Exec ¶
func (du *DrinkUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DrinkUpdate) ExecX ¶
func (du *DrinkUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DrinkUpdate) Mutation ¶
func (du *DrinkUpdate) Mutation() *DrinkMutation
Mutation returns the DrinkMutation object of the builder.
func (*DrinkUpdate) Save ¶
func (du *DrinkUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DrinkUpdate) SaveX ¶
func (du *DrinkUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DrinkUpdate) SetAbv ¶
func (du *DrinkUpdate) SetAbv(i int8) *DrinkUpdate
SetAbv sets the "abv" field.
func (*DrinkUpdate) SetCreatedAt ¶
func (du *DrinkUpdate) SetCreatedAt(t time.Time) *DrinkUpdate
SetCreatedAt sets the "created_at" field.
func (*DrinkUpdate) SetDay ¶
func (du *DrinkUpdate) SetDay(i int) *DrinkUpdate
SetDay sets the "day" field.
func (*DrinkUpdate) SetMonth ¶
func (du *DrinkUpdate) SetMonth(i int) *DrinkUpdate
SetMonth sets the "month" field.
func (*DrinkUpdate) SetNillableAbv ¶
func (du *DrinkUpdate) SetNillableAbv(i *int8) *DrinkUpdate
SetNillableAbv sets the "abv" field if the given value is not nil.
func (*DrinkUpdate) SetNillableCreatedAt ¶
func (du *DrinkUpdate) SetNillableCreatedAt(t *time.Time) *DrinkUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DrinkUpdate) SetNillableDay ¶
func (du *DrinkUpdate) SetNillableDay(i *int) *DrinkUpdate
SetNillableDay sets the "day" field if the given value is not nil.
func (*DrinkUpdate) SetNillableMonth ¶
func (du *DrinkUpdate) SetNillableMonth(i *int) *DrinkUpdate
SetNillableMonth sets the "month" field if the given value is not nil.
func (*DrinkUpdate) SetNillableNote ¶
func (du *DrinkUpdate) SetNillableNote(s *string) *DrinkUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*DrinkUpdate) SetNillableOunces ¶
func (du *DrinkUpdate) SetNillableOunces(i *int8) *DrinkUpdate
SetNillableOunces sets the "ounces" field if the given value is not nil.
func (*DrinkUpdate) SetNillableOwnerID ¶
func (du *DrinkUpdate) SetNillableOwnerID(id *int) *DrinkUpdate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*DrinkUpdate) SetNillableType ¶
func (du *DrinkUpdate) SetNillableType(d *drink.Type) *DrinkUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*DrinkUpdate) SetNillableYear ¶
func (du *DrinkUpdate) SetNillableYear(i *int) *DrinkUpdate
SetNillableYear sets the "year" field if the given value is not nil.
func (*DrinkUpdate) SetNote ¶
func (du *DrinkUpdate) SetNote(s string) *DrinkUpdate
SetNote sets the "note" field.
func (*DrinkUpdate) SetOunces ¶
func (du *DrinkUpdate) SetOunces(i int8) *DrinkUpdate
SetOunces sets the "ounces" field.
func (*DrinkUpdate) SetOwner ¶
func (du *DrinkUpdate) SetOwner(u *User) *DrinkUpdate
SetOwner sets the "owner" edge to the User entity.
func (*DrinkUpdate) SetOwnerID ¶
func (du *DrinkUpdate) SetOwnerID(id int) *DrinkUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*DrinkUpdate) SetType ¶
func (du *DrinkUpdate) SetType(d drink.Type) *DrinkUpdate
SetType sets the "type" field.
func (*DrinkUpdate) SetYear ¶
func (du *DrinkUpdate) SetYear(i int) *DrinkUpdate
SetYear sets the "year" field.
func (*DrinkUpdate) Where ¶
func (du *DrinkUpdate) Where(ps ...predicate.Drink) *DrinkUpdate
Where appends a list predicates to the DrinkUpdate builder.
type DrinkUpdateOne ¶
type DrinkUpdateOne struct {
// contains filtered or unexported fields
}
DrinkUpdateOne is the builder for updating a single Drink entity.
func (*DrinkUpdateOne) AddAbv ¶
func (duo *DrinkUpdateOne) AddAbv(i int8) *DrinkUpdateOne
AddAbv adds i to the "abv" field.
func (*DrinkUpdateOne) AddDay ¶
func (duo *DrinkUpdateOne) AddDay(i int) *DrinkUpdateOne
AddDay adds i to the "day" field.
func (*DrinkUpdateOne) AddMonth ¶
func (duo *DrinkUpdateOne) AddMonth(i int) *DrinkUpdateOne
AddMonth adds i to the "month" field.
func (*DrinkUpdateOne) AddOunces ¶
func (duo *DrinkUpdateOne) AddOunces(i int8) *DrinkUpdateOne
AddOunces adds i to the "ounces" field.
func (*DrinkUpdateOne) AddYear ¶
func (duo *DrinkUpdateOne) AddYear(i int) *DrinkUpdateOne
AddYear adds i to the "year" field.
func (*DrinkUpdateOne) ClearOwner ¶
func (duo *DrinkUpdateOne) ClearOwner() *DrinkUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*DrinkUpdateOne) Exec ¶
func (duo *DrinkUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DrinkUpdateOne) ExecX ¶
func (duo *DrinkUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DrinkUpdateOne) Mutation ¶
func (duo *DrinkUpdateOne) Mutation() *DrinkMutation
Mutation returns the DrinkMutation object of the builder.
func (*DrinkUpdateOne) Save ¶
func (duo *DrinkUpdateOne) Save(ctx context.Context) (*Drink, error)
Save executes the query and returns the updated Drink entity.
func (*DrinkUpdateOne) SaveX ¶
func (duo *DrinkUpdateOne) SaveX(ctx context.Context) *Drink
SaveX is like Save, but panics if an error occurs.
func (*DrinkUpdateOne) Select ¶
func (duo *DrinkUpdateOne) Select(field string, fields ...string) *DrinkUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DrinkUpdateOne) SetAbv ¶
func (duo *DrinkUpdateOne) SetAbv(i int8) *DrinkUpdateOne
SetAbv sets the "abv" field.
func (*DrinkUpdateOne) SetCreatedAt ¶
func (duo *DrinkUpdateOne) SetCreatedAt(t time.Time) *DrinkUpdateOne
SetCreatedAt sets the "created_at" field.
func (*DrinkUpdateOne) SetDay ¶
func (duo *DrinkUpdateOne) SetDay(i int) *DrinkUpdateOne
SetDay sets the "day" field.
func (*DrinkUpdateOne) SetMonth ¶
func (duo *DrinkUpdateOne) SetMonth(i int) *DrinkUpdateOne
SetMonth sets the "month" field.
func (*DrinkUpdateOne) SetNillableAbv ¶
func (duo *DrinkUpdateOne) SetNillableAbv(i *int8) *DrinkUpdateOne
SetNillableAbv sets the "abv" field if the given value is not nil.
func (*DrinkUpdateOne) SetNillableCreatedAt ¶
func (duo *DrinkUpdateOne) SetNillableCreatedAt(t *time.Time) *DrinkUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DrinkUpdateOne) SetNillableDay ¶
func (duo *DrinkUpdateOne) SetNillableDay(i *int) *DrinkUpdateOne
SetNillableDay sets the "day" field if the given value is not nil.
func (*DrinkUpdateOne) SetNillableMonth ¶
func (duo *DrinkUpdateOne) SetNillableMonth(i *int) *DrinkUpdateOne
SetNillableMonth sets the "month" field if the given value is not nil.
func (*DrinkUpdateOne) SetNillableNote ¶
func (duo *DrinkUpdateOne) SetNillableNote(s *string) *DrinkUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*DrinkUpdateOne) SetNillableOunces ¶
func (duo *DrinkUpdateOne) SetNillableOunces(i *int8) *DrinkUpdateOne
SetNillableOunces sets the "ounces" field if the given value is not nil.
func (*DrinkUpdateOne) SetNillableOwnerID ¶
func (duo *DrinkUpdateOne) SetNillableOwnerID(id *int) *DrinkUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*DrinkUpdateOne) SetNillableType ¶
func (duo *DrinkUpdateOne) SetNillableType(d *drink.Type) *DrinkUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*DrinkUpdateOne) SetNillableYear ¶
func (duo *DrinkUpdateOne) SetNillableYear(i *int) *DrinkUpdateOne
SetNillableYear sets the "year" field if the given value is not nil.
func (*DrinkUpdateOne) SetNote ¶
func (duo *DrinkUpdateOne) SetNote(s string) *DrinkUpdateOne
SetNote sets the "note" field.
func (*DrinkUpdateOne) SetOunces ¶
func (duo *DrinkUpdateOne) SetOunces(i int8) *DrinkUpdateOne
SetOunces sets the "ounces" field.
func (*DrinkUpdateOne) SetOwner ¶
func (duo *DrinkUpdateOne) SetOwner(u *User) *DrinkUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*DrinkUpdateOne) SetOwnerID ¶
func (duo *DrinkUpdateOne) SetOwnerID(id int) *DrinkUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*DrinkUpdateOne) SetType ¶
func (duo *DrinkUpdateOne) SetType(d drink.Type) *DrinkUpdateOne
SetType sets the "type" field.
func (*DrinkUpdateOne) SetYear ¶
func (duo *DrinkUpdateOne) SetYear(i int) *DrinkUpdateOne
SetYear sets the "year" field.
func (*DrinkUpdateOne) Where ¶
func (duo *DrinkUpdateOne) Where(ps ...predicate.Drink) *DrinkUpdateOne
Where appends a list predicates to the DrinkUpdate builder.
type GroceryList ¶
type GroceryList struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Note holds the value of the "note" field. Note string `json:"note,omitempty"` // Archived holds the value of the "archived" field. Archived bool `json:"archived,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroceryListQuery when eager-loading is set. Edges GroceryListEdges `json:"edges"` // contains filtered or unexported fields }
GroceryList is the model entity for the GroceryList schema.
func (*GroceryList) QueryGroceryListItems ¶
func (gl *GroceryList) QueryGroceryListItems() *GroceryListItemQuery
QueryGroceryListItems queries the "grocery_list_items" edge of the GroceryList entity.
func (*GroceryList) QueryGroceryListShares ¶
func (gl *GroceryList) QueryGroceryListShares() *GroceryListShareQuery
QueryGroceryListShares queries the "grocery_list_shares" edge of the GroceryList entity.
func (*GroceryList) QueryOwner ¶
func (gl *GroceryList) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the GroceryList entity.
func (*GroceryList) String ¶
func (gl *GroceryList) String() string
String implements the fmt.Stringer.
func (*GroceryList) Unwrap ¶
func (gl *GroceryList) Unwrap() *GroceryList
Unwrap unwraps the GroceryList 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 (*GroceryList) Update ¶
func (gl *GroceryList) Update() *GroceryListUpdateOne
Update returns a builder for updating this GroceryList. Note that you need to call GroceryList.Unwrap() before calling this method if this GroceryList was returned from a transaction, and the transaction was committed or rolled back.
type GroceryListClient ¶
type GroceryListClient struct {
// contains filtered or unexported fields
}
GroceryListClient is a client for the GroceryList schema.
func NewGroceryListClient ¶
func NewGroceryListClient(c config) *GroceryListClient
NewGroceryListClient returns a client for the GroceryList from the given config.
func (*GroceryListClient) Create ¶
func (c *GroceryListClient) Create() *GroceryListCreate
Create returns a builder for creating a GroceryList entity.
func (*GroceryListClient) CreateBulk ¶
func (c *GroceryListClient) CreateBulk(builders ...*GroceryListCreate) *GroceryListCreateBulk
CreateBulk returns a builder for creating a bulk of GroceryList entities.
func (*GroceryListClient) Delete ¶
func (c *GroceryListClient) Delete() *GroceryListDelete
Delete returns a delete builder for GroceryList.
func (*GroceryListClient) DeleteOne ¶
func (c *GroceryListClient) DeleteOne(gl *GroceryList) *GroceryListDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroceryListClient) DeleteOneID ¶
func (c *GroceryListClient) DeleteOneID(id int) *GroceryListDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroceryListClient) Get ¶
func (c *GroceryListClient) Get(ctx context.Context, id int) (*GroceryList, error)
Get returns a GroceryList entity by its id.
func (*GroceryListClient) GetX ¶
func (c *GroceryListClient) GetX(ctx context.Context, id int) *GroceryList
GetX is like Get, but panics if an error occurs.
func (*GroceryListClient) Hooks ¶
func (c *GroceryListClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroceryListClient) Intercept ¶
func (c *GroceryListClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `grocerylist.Intercept(f(g(h())))`.
func (*GroceryListClient) Interceptors ¶
func (c *GroceryListClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroceryListClient) Query ¶
func (c *GroceryListClient) Query() *GroceryListQuery
Query returns a query builder for GroceryList.
func (*GroceryListClient) QueryGroceryListItems ¶
func (c *GroceryListClient) QueryGroceryListItems(gl *GroceryList) *GroceryListItemQuery
QueryGroceryListItems queries the grocery_list_items edge of a GroceryList.
func (*GroceryListClient) QueryGroceryListShares ¶
func (c *GroceryListClient) QueryGroceryListShares(gl *GroceryList) *GroceryListShareQuery
QueryGroceryListShares queries the grocery_list_shares edge of a GroceryList.
func (*GroceryListClient) QueryOwner ¶
func (c *GroceryListClient) QueryOwner(gl *GroceryList) *UserQuery
QueryOwner queries the owner edge of a GroceryList.
func (*GroceryListClient) Update ¶
func (c *GroceryListClient) Update() *GroceryListUpdate
Update returns an update builder for GroceryList.
func (*GroceryListClient) UpdateOne ¶
func (c *GroceryListClient) UpdateOne(gl *GroceryList) *GroceryListUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroceryListClient) UpdateOneID ¶
func (c *GroceryListClient) UpdateOneID(id int) *GroceryListUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroceryListClient) Use ¶
func (c *GroceryListClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `grocerylist.Hooks(f(g(h())))`.
type GroceryListCreate ¶
type GroceryListCreate struct {
// contains filtered or unexported fields
}
GroceryListCreate is the builder for creating a GroceryList entity.
func (*GroceryListCreate) AddGroceryListItemIDs ¶
func (glc *GroceryListCreate) AddGroceryListItemIDs(ids ...int) *GroceryListCreate
AddGroceryListItemIDs adds the "grocery_list_items" edge to the GroceryListItem entity by IDs.
func (*GroceryListCreate) AddGroceryListItems ¶
func (glc *GroceryListCreate) AddGroceryListItems(g ...*GroceryListItem) *GroceryListCreate
AddGroceryListItems adds the "grocery_list_items" edges to the GroceryListItem entity.
func (*GroceryListCreate) AddGroceryListShareIDs ¶
func (glc *GroceryListCreate) AddGroceryListShareIDs(ids ...int) *GroceryListCreate
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*GroceryListCreate) AddGroceryListShares ¶
func (glc *GroceryListCreate) AddGroceryListShares(g ...*GroceryListShare) *GroceryListCreate
AddGroceryListShares adds the "grocery_list_shares" edges to the GroceryListShare entity.
func (*GroceryListCreate) Exec ¶
func (glc *GroceryListCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListCreate) ExecX ¶
func (glc *GroceryListCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListCreate) Mutation ¶
func (glc *GroceryListCreate) Mutation() *GroceryListMutation
Mutation returns the GroceryListMutation object of the builder.
func (*GroceryListCreate) Save ¶
func (glc *GroceryListCreate) Save(ctx context.Context) (*GroceryList, error)
Save creates the GroceryList in the database.
func (*GroceryListCreate) SaveX ¶
func (glc *GroceryListCreate) SaveX(ctx context.Context) *GroceryList
SaveX calls Save and panics if Save returns an error.
func (*GroceryListCreate) SetArchived ¶
func (glc *GroceryListCreate) SetArchived(b bool) *GroceryListCreate
SetArchived sets the "archived" field.
func (*GroceryListCreate) SetCreatedAt ¶
func (glc *GroceryListCreate) SetCreatedAt(t time.Time) *GroceryListCreate
SetCreatedAt sets the "created_at" field.
func (*GroceryListCreate) SetName ¶
func (glc *GroceryListCreate) SetName(s string) *GroceryListCreate
SetName sets the "name" field.
func (*GroceryListCreate) SetNillableArchived ¶
func (glc *GroceryListCreate) SetNillableArchived(b *bool) *GroceryListCreate
SetNillableArchived sets the "archived" field if the given value is not nil.
func (*GroceryListCreate) SetNillableCreatedAt ¶
func (glc *GroceryListCreate) SetNillableCreatedAt(t *time.Time) *GroceryListCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListCreate) SetNillableName ¶
func (glc *GroceryListCreate) SetNillableName(s *string) *GroceryListCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*GroceryListCreate) SetNillableNote ¶
func (glc *GroceryListCreate) SetNillableNote(s *string) *GroceryListCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*GroceryListCreate) SetNillableOwnerID ¶
func (glc *GroceryListCreate) SetNillableOwnerID(id *int) *GroceryListCreate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*GroceryListCreate) SetNote ¶
func (glc *GroceryListCreate) SetNote(s string) *GroceryListCreate
SetNote sets the "note" field.
func (*GroceryListCreate) SetOwner ¶
func (glc *GroceryListCreate) SetOwner(u *User) *GroceryListCreate
SetOwner sets the "owner" edge to the User entity.
func (*GroceryListCreate) SetOwnerID ¶
func (glc *GroceryListCreate) SetOwnerID(id int) *GroceryListCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
type GroceryListCreateBulk ¶
type GroceryListCreateBulk struct {
// contains filtered or unexported fields
}
GroceryListCreateBulk is the builder for creating many GroceryList entities in bulk.
func (*GroceryListCreateBulk) Exec ¶
func (glcb *GroceryListCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListCreateBulk) ExecX ¶
func (glcb *GroceryListCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListCreateBulk) Save ¶
func (glcb *GroceryListCreateBulk) Save(ctx context.Context) ([]*GroceryList, error)
Save creates the GroceryList entities in the database.
func (*GroceryListCreateBulk) SaveX ¶
func (glcb *GroceryListCreateBulk) SaveX(ctx context.Context) []*GroceryList
SaveX is like Save, but panics if an error occurs.
type GroceryListDelete ¶
type GroceryListDelete struct {
// contains filtered or unexported fields
}
GroceryListDelete is the builder for deleting a GroceryList entity.
func (*GroceryListDelete) Exec ¶
func (gld *GroceryListDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroceryListDelete) ExecX ¶
func (gld *GroceryListDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListDelete) Where ¶
func (gld *GroceryListDelete) Where(ps ...predicate.GroceryList) *GroceryListDelete
Where appends a list predicates to the GroceryListDelete builder.
type GroceryListDeleteOne ¶
type GroceryListDeleteOne struct {
// contains filtered or unexported fields
}
GroceryListDeleteOne is the builder for deleting a single GroceryList entity.
func (*GroceryListDeleteOne) Exec ¶
func (gldo *GroceryListDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroceryListDeleteOne) ExecX ¶
func (gldo *GroceryListDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListDeleteOne) Where ¶
func (gldo *GroceryListDeleteOne) Where(ps ...predicate.GroceryList) *GroceryListDeleteOne
Where appends a list predicates to the GroceryListDelete builder.
type GroceryListEdges ¶
type GroceryListEdges struct { // GroceryListItems holds the value of the grocery_list_items edge. GroceryListItems []*GroceryListItem `json:"grocery_list_items,omitempty"` // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` GroceryListShares []*GroceryListShare `json:"grocery_list_shares,omitempty"` // contains filtered or unexported fields }
GroceryListEdges holds the relations/edges for other nodes in the graph.
func (GroceryListEdges) GroceryListItemsOrErr ¶
func (e GroceryListEdges) GroceryListItemsOrErr() ([]*GroceryListItem, error)
GroceryListItemsOrErr returns the GroceryListItems value or an error if the edge was not loaded in eager-loading.
func (GroceryListEdges) GroceryListSharesOrErr ¶
func (e GroceryListEdges) GroceryListSharesOrErr() ([]*GroceryListShare, error)
GroceryListSharesOrErr returns the GroceryListShares value or an error if the edge was not loaded in eager-loading.
func (GroceryListEdges) OwnerOrErr ¶
func (e GroceryListEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroceryListGroupBy ¶
type GroceryListGroupBy struct {
// contains filtered or unexported fields
}
GroceryListGroupBy is the group-by builder for GroceryList entities.
func (*GroceryListGroupBy) Aggregate ¶
func (glgb *GroceryListGroupBy) Aggregate(fns ...AggregateFunc) *GroceryListGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroceryListGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroceryListGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroceryListGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroceryListGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroceryListGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroceryListGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroceryListGroupBy) Scan ¶
func (glgb *GroceryListGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroceryListGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroceryListItem ¶
type GroceryListItem struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Quantity holds the value of the "quantity" field. Quantity int `json:"quantity,omitempty"` // Note holds the value of the "note" field. Note string `json:"note,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroceryListItemQuery when eager-loading is set. Edges GroceryListItemEdges `json:"edges"` // contains filtered or unexported fields }
GroceryListItem is the model entity for the GroceryListItem schema.
func (*GroceryListItem) QueryGroceryList ¶
func (gli *GroceryListItem) QueryGroceryList() *GroceryListQuery
QueryGroceryList queries the "grocery_list" edge of the GroceryListItem entity.
func (*GroceryListItem) String ¶
func (gli *GroceryListItem) String() string
String implements the fmt.Stringer.
func (*GroceryListItem) Unwrap ¶
func (gli *GroceryListItem) Unwrap() *GroceryListItem
Unwrap unwraps the GroceryListItem 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 (*GroceryListItem) Update ¶
func (gli *GroceryListItem) Update() *GroceryListItemUpdateOne
Update returns a builder for updating this GroceryListItem. Note that you need to call GroceryListItem.Unwrap() before calling this method if this GroceryListItem was returned from a transaction, and the transaction was committed or rolled back.
type GroceryListItemClient ¶
type GroceryListItemClient struct {
// contains filtered or unexported fields
}
GroceryListItemClient is a client for the GroceryListItem schema.
func NewGroceryListItemClient ¶
func NewGroceryListItemClient(c config) *GroceryListItemClient
NewGroceryListItemClient returns a client for the GroceryListItem from the given config.
func (*GroceryListItemClient) Create ¶
func (c *GroceryListItemClient) Create() *GroceryListItemCreate
Create returns a builder for creating a GroceryListItem entity.
func (*GroceryListItemClient) CreateBulk ¶
func (c *GroceryListItemClient) CreateBulk(builders ...*GroceryListItemCreate) *GroceryListItemCreateBulk
CreateBulk returns a builder for creating a bulk of GroceryListItem entities.
func (*GroceryListItemClient) Delete ¶
func (c *GroceryListItemClient) Delete() *GroceryListItemDelete
Delete returns a delete builder for GroceryListItem.
func (*GroceryListItemClient) DeleteOne ¶
func (c *GroceryListItemClient) DeleteOne(gli *GroceryListItem) *GroceryListItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroceryListItemClient) DeleteOneID ¶
func (c *GroceryListItemClient) DeleteOneID(id int) *GroceryListItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroceryListItemClient) Get ¶
func (c *GroceryListItemClient) Get(ctx context.Context, id int) (*GroceryListItem, error)
Get returns a GroceryListItem entity by its id.
func (*GroceryListItemClient) GetX ¶
func (c *GroceryListItemClient) GetX(ctx context.Context, id int) *GroceryListItem
GetX is like Get, but panics if an error occurs.
func (*GroceryListItemClient) Hooks ¶
func (c *GroceryListItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroceryListItemClient) Intercept ¶
func (c *GroceryListItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `grocerylistitem.Intercept(f(g(h())))`.
func (*GroceryListItemClient) Interceptors ¶
func (c *GroceryListItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroceryListItemClient) Query ¶
func (c *GroceryListItemClient) Query() *GroceryListItemQuery
Query returns a query builder for GroceryListItem.
func (*GroceryListItemClient) QueryGroceryList ¶
func (c *GroceryListItemClient) QueryGroceryList(gli *GroceryListItem) *GroceryListQuery
QueryGroceryList queries the grocery_list edge of a GroceryListItem.
func (*GroceryListItemClient) Update ¶
func (c *GroceryListItemClient) Update() *GroceryListItemUpdate
Update returns an update builder for GroceryListItem.
func (*GroceryListItemClient) UpdateOne ¶
func (c *GroceryListItemClient) UpdateOne(gli *GroceryListItem) *GroceryListItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroceryListItemClient) UpdateOneID ¶
func (c *GroceryListItemClient) UpdateOneID(id int) *GroceryListItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroceryListItemClient) Use ¶
func (c *GroceryListItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `grocerylistitem.Hooks(f(g(h())))`.
type GroceryListItemCreate ¶
type GroceryListItemCreate struct {
// contains filtered or unexported fields
}
GroceryListItemCreate is the builder for creating a GroceryListItem entity.
func (*GroceryListItemCreate) Exec ¶
func (glic *GroceryListItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListItemCreate) ExecX ¶
func (glic *GroceryListItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListItemCreate) Mutation ¶
func (glic *GroceryListItemCreate) Mutation() *GroceryListItemMutation
Mutation returns the GroceryListItemMutation object of the builder.
func (*GroceryListItemCreate) Save ¶
func (glic *GroceryListItemCreate) Save(ctx context.Context) (*GroceryListItem, error)
Save creates the GroceryListItem in the database.
func (*GroceryListItemCreate) SaveX ¶
func (glic *GroceryListItemCreate) SaveX(ctx context.Context) *GroceryListItem
SaveX calls Save and panics if Save returns an error.
func (*GroceryListItemCreate) SetCreatedAt ¶
func (glic *GroceryListItemCreate) SetCreatedAt(t time.Time) *GroceryListItemCreate
SetCreatedAt sets the "created_at" field.
func (*GroceryListItemCreate) SetGroceryList ¶
func (glic *GroceryListItemCreate) SetGroceryList(g *GroceryList) *GroceryListItemCreate
SetGroceryList sets the "grocery_list" edge to the GroceryList entity.
func (*GroceryListItemCreate) SetGroceryListID ¶
func (glic *GroceryListItemCreate) SetGroceryListID(id int) *GroceryListItemCreate
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID.
func (*GroceryListItemCreate) SetName ¶
func (glic *GroceryListItemCreate) SetName(s string) *GroceryListItemCreate
SetName sets the "name" field.
func (*GroceryListItemCreate) SetNillableCreatedAt ¶
func (glic *GroceryListItemCreate) SetNillableCreatedAt(t *time.Time) *GroceryListItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListItemCreate) SetNillableGroceryListID ¶
func (glic *GroceryListItemCreate) SetNillableGroceryListID(id *int) *GroceryListItemCreate
SetNillableGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID if the given value is not nil.
func (*GroceryListItemCreate) SetNillableNote ¶
func (glic *GroceryListItemCreate) SetNillableNote(s *string) *GroceryListItemCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*GroceryListItemCreate) SetNillableQuantity ¶
func (glic *GroceryListItemCreate) SetNillableQuantity(i *int) *GroceryListItemCreate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*GroceryListItemCreate) SetNote ¶
func (glic *GroceryListItemCreate) SetNote(s string) *GroceryListItemCreate
SetNote sets the "note" field.
func (*GroceryListItemCreate) SetQuantity ¶
func (glic *GroceryListItemCreate) SetQuantity(i int) *GroceryListItemCreate
SetQuantity sets the "quantity" field.
type GroceryListItemCreateBulk ¶
type GroceryListItemCreateBulk struct {
// contains filtered or unexported fields
}
GroceryListItemCreateBulk is the builder for creating many GroceryListItem entities in bulk.
func (*GroceryListItemCreateBulk) Exec ¶
func (glicb *GroceryListItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListItemCreateBulk) ExecX ¶
func (glicb *GroceryListItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListItemCreateBulk) Save ¶
func (glicb *GroceryListItemCreateBulk) Save(ctx context.Context) ([]*GroceryListItem, error)
Save creates the GroceryListItem entities in the database.
func (*GroceryListItemCreateBulk) SaveX ¶
func (glicb *GroceryListItemCreateBulk) SaveX(ctx context.Context) []*GroceryListItem
SaveX is like Save, but panics if an error occurs.
type GroceryListItemDelete ¶
type GroceryListItemDelete struct {
// contains filtered or unexported fields
}
GroceryListItemDelete is the builder for deleting a GroceryListItem entity.
func (*GroceryListItemDelete) Exec ¶
func (glid *GroceryListItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroceryListItemDelete) ExecX ¶
func (glid *GroceryListItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListItemDelete) Where ¶
func (glid *GroceryListItemDelete) Where(ps ...predicate.GroceryListItem) *GroceryListItemDelete
Where appends a list predicates to the GroceryListItemDelete builder.
type GroceryListItemDeleteOne ¶
type GroceryListItemDeleteOne struct {
// contains filtered or unexported fields
}
GroceryListItemDeleteOne is the builder for deleting a single GroceryListItem entity.
func (*GroceryListItemDeleteOne) Exec ¶
func (glido *GroceryListItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroceryListItemDeleteOne) ExecX ¶
func (glido *GroceryListItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListItemDeleteOne) Where ¶
func (glido *GroceryListItemDeleteOne) Where(ps ...predicate.GroceryListItem) *GroceryListItemDeleteOne
Where appends a list predicates to the GroceryListItemDelete builder.
type GroceryListItemEdges ¶
type GroceryListItemEdges struct { // GroceryList holds the value of the grocery_list edge. GroceryList *GroceryList `json:"grocery_list,omitempty"` // contains filtered or unexported fields }
GroceryListItemEdges holds the relations/edges for other nodes in the graph.
func (GroceryListItemEdges) GroceryListOrErr ¶
func (e GroceryListItemEdges) GroceryListOrErr() (*GroceryList, error)
GroceryListOrErr returns the GroceryList value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroceryListItemGroupBy ¶
type GroceryListItemGroupBy struct {
// contains filtered or unexported fields
}
GroceryListItemGroupBy is the group-by builder for GroceryListItem entities.
func (*GroceryListItemGroupBy) Aggregate ¶
func (gligb *GroceryListItemGroupBy) Aggregate(fns ...AggregateFunc) *GroceryListItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroceryListItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroceryListItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroceryListItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroceryListItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroceryListItemGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroceryListItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroceryListItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroceryListItemGroupBy) Scan ¶
func (gligb *GroceryListItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroceryListItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroceryListItemMutation ¶
type GroceryListItemMutation struct {
// contains filtered or unexported fields
}
GroceryListItemMutation represents an operation that mutates the GroceryListItem nodes in the graph.
func (*GroceryListItemMutation) AddField ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) AddQuantity ¶
func (m *GroceryListItemMutation) AddQuantity(i int)
AddQuantity adds i to the "quantity" field.
func (*GroceryListItemMutation) AddedEdges ¶
func (m *GroceryListItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroceryListItemMutation) AddedField ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) AddedFields ¶
func (m *GroceryListItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroceryListItemMutation) AddedIDs ¶
func (m *GroceryListItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroceryListItemMutation) AddedQuantity ¶
func (m *GroceryListItemMutation) AddedQuantity() (r int, exists bool)
AddedQuantity returns the value that was added to the "quantity" field in this mutation.
func (*GroceryListItemMutation) ClearEdge ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) ClearField ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) ClearGroceryList ¶
func (m *GroceryListItemMutation) ClearGroceryList()
ClearGroceryList clears the "grocery_list" edge to the GroceryList entity.
func (*GroceryListItemMutation) ClearedEdges ¶
func (m *GroceryListItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroceryListItemMutation) ClearedFields ¶
func (m *GroceryListItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroceryListItemMutation) Client ¶
func (m GroceryListItemMutation) 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 (*GroceryListItemMutation) CreatedAt ¶
func (m *GroceryListItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GroceryListItemMutation) EdgeCleared ¶
func (m *GroceryListItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroceryListItemMutation) Field ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) FieldCleared ¶
func (m *GroceryListItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroceryListItemMutation) Fields ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) GroceryListCleared ¶
func (m *GroceryListItemMutation) GroceryListCleared() bool
GroceryListCleared reports if the "grocery_list" edge to the GroceryList entity was cleared.
func (*GroceryListItemMutation) GroceryListID ¶
func (m *GroceryListItemMutation) GroceryListID() (id int, exists bool)
GroceryListID returns the "grocery_list" edge ID in the mutation.
func (*GroceryListItemMutation) GroceryListIDs ¶
func (m *GroceryListItemMutation) GroceryListIDs() (ids []int)
GroceryListIDs returns the "grocery_list" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroceryListID instead. It exists only for internal usage by the builders.
func (*GroceryListItemMutation) ID ¶
func (m *GroceryListItemMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroceryListItemMutation) IDs ¶
func (m *GroceryListItemMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroceryListItemMutation) Name ¶
func (m *GroceryListItemMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroceryListItemMutation) Note ¶
func (m *GroceryListItemMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*GroceryListItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the GroceryListItem entity. If the GroceryListItem 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 (*GroceryListItemMutation) 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 (*GroceryListItemMutation) OldName ¶
func (m *GroceryListItemMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the GroceryListItem entity. If the GroceryListItem 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 (*GroceryListItemMutation) OldNote ¶
func (m *GroceryListItemMutation) OldNote(ctx context.Context) (v string, err error)
OldNote returns the old "note" field's value of the GroceryListItem entity. If the GroceryListItem 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 (*GroceryListItemMutation) OldQuantity ¶
func (m *GroceryListItemMutation) OldQuantity(ctx context.Context) (v int, err error)
OldQuantity returns the old "quantity" field's value of the GroceryListItem entity. If the GroceryListItem 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 (*GroceryListItemMutation) Op ¶
func (m *GroceryListItemMutation) Op() Op
Op returns the operation name.
func (*GroceryListItemMutation) Quantity ¶
func (m *GroceryListItemMutation) Quantity() (r int, exists bool)
Quantity returns the value of the "quantity" field in the mutation.
func (*GroceryListItemMutation) RemovedEdges ¶
func (m *GroceryListItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroceryListItemMutation) RemovedIDs ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) ResetCreatedAt ¶
func (m *GroceryListItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GroceryListItemMutation) ResetEdge ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) ResetField ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) ResetGroceryList ¶
func (m *GroceryListItemMutation) ResetGroceryList()
ResetGroceryList resets all changes to the "grocery_list" edge.
func (*GroceryListItemMutation) ResetName ¶
func (m *GroceryListItemMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroceryListItemMutation) ResetNote ¶
func (m *GroceryListItemMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*GroceryListItemMutation) ResetQuantity ¶
func (m *GroceryListItemMutation) ResetQuantity()
ResetQuantity resets all changes to the "quantity" field.
func (*GroceryListItemMutation) SetCreatedAt ¶
func (m *GroceryListItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GroceryListItemMutation) SetField ¶
func (m *GroceryListItemMutation) 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 (*GroceryListItemMutation) SetGroceryListID ¶
func (m *GroceryListItemMutation) SetGroceryListID(id int)
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by id.
func (*GroceryListItemMutation) SetName ¶
func (m *GroceryListItemMutation) SetName(s string)
SetName sets the "name" field.
func (*GroceryListItemMutation) SetNote ¶
func (m *GroceryListItemMutation) SetNote(s string)
SetNote sets the "note" field.
func (*GroceryListItemMutation) SetOp ¶
func (m *GroceryListItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroceryListItemMutation) SetQuantity ¶
func (m *GroceryListItemMutation) SetQuantity(i int)
SetQuantity sets the "quantity" field.
func (GroceryListItemMutation) Tx ¶
func (m GroceryListItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroceryListItemMutation) Type ¶
func (m *GroceryListItemMutation) Type() string
Type returns the node type of this mutation (GroceryListItem).
func (*GroceryListItemMutation) Where ¶
func (m *GroceryListItemMutation) Where(ps ...predicate.GroceryListItem)
Where appends a list predicates to the GroceryListItemMutation builder.
func (*GroceryListItemMutation) WhereP ¶
func (m *GroceryListItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroceryListItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroceryListItemQuery ¶
type GroceryListItemQuery struct {
// contains filtered or unexported fields
}
GroceryListItemQuery is the builder for querying GroceryListItem entities.
func (*GroceryListItemQuery) Aggregate ¶
func (gliq *GroceryListItemQuery) Aggregate(fns ...AggregateFunc) *GroceryListItemSelect
Aggregate returns a GroceryListItemSelect configured with the given aggregations.
func (*GroceryListItemQuery) All ¶
func (gliq *GroceryListItemQuery) All(ctx context.Context) ([]*GroceryListItem, error)
All executes the query and returns a list of GroceryListItems.
func (*GroceryListItemQuery) AllX ¶
func (gliq *GroceryListItemQuery) AllX(ctx context.Context) []*GroceryListItem
AllX is like All, but panics if an error occurs.
func (*GroceryListItemQuery) Clone ¶
func (gliq *GroceryListItemQuery) Clone() *GroceryListItemQuery
Clone returns a duplicate of the GroceryListItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroceryListItemQuery) Count ¶
func (gliq *GroceryListItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroceryListItemQuery) CountX ¶
func (gliq *GroceryListItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroceryListItemQuery) Exist ¶
func (gliq *GroceryListItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroceryListItemQuery) ExistX ¶
func (gliq *GroceryListItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroceryListItemQuery) First ¶
func (gliq *GroceryListItemQuery) First(ctx context.Context) (*GroceryListItem, error)
First returns the first GroceryListItem entity from the query. Returns a *NotFoundError when no GroceryListItem was found.
func (*GroceryListItemQuery) FirstID ¶
func (gliq *GroceryListItemQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GroceryListItem ID from the query. Returns a *NotFoundError when no GroceryListItem ID was found.
func (*GroceryListItemQuery) FirstIDX ¶
func (gliq *GroceryListItemQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroceryListItemQuery) FirstX ¶
func (gliq *GroceryListItemQuery) FirstX(ctx context.Context) *GroceryListItem
FirstX is like First, but panics if an error occurs.
func (*GroceryListItemQuery) GroupBy ¶
func (gliq *GroceryListItemQuery) GroupBy(field string, fields ...string) *GroceryListItemGroupBy
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.GroceryListItem.Query(). GroupBy(grocerylistitem.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroceryListItemQuery) IDs ¶
func (gliq *GroceryListItemQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GroceryListItem IDs.
func (*GroceryListItemQuery) IDsX ¶
func (gliq *GroceryListItemQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroceryListItemQuery) Limit ¶
func (gliq *GroceryListItemQuery) Limit(limit int) *GroceryListItemQuery
Limit the number of records to be returned by this query.
func (*GroceryListItemQuery) Offset ¶
func (gliq *GroceryListItemQuery) Offset(offset int) *GroceryListItemQuery
Offset to start from.
func (*GroceryListItemQuery) Only ¶
func (gliq *GroceryListItemQuery) Only(ctx context.Context) (*GroceryListItem, error)
Only returns a single GroceryListItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GroceryListItem entity is found. Returns a *NotFoundError when no GroceryListItem entities are found.
func (*GroceryListItemQuery) OnlyID ¶
func (gliq *GroceryListItemQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GroceryListItem ID in the query. Returns a *NotSingularError when more than one GroceryListItem ID is found. Returns a *NotFoundError when no entities are found.
func (*GroceryListItemQuery) OnlyIDX ¶
func (gliq *GroceryListItemQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroceryListItemQuery) OnlyX ¶
func (gliq *GroceryListItemQuery) OnlyX(ctx context.Context) *GroceryListItem
OnlyX is like Only, but panics if an error occurs.
func (*GroceryListItemQuery) Order ¶
func (gliq *GroceryListItemQuery) Order(o ...grocerylistitem.OrderOption) *GroceryListItemQuery
Order specifies how the records should be ordered.
func (*GroceryListItemQuery) QueryGroceryList ¶
func (gliq *GroceryListItemQuery) QueryGroceryList() *GroceryListQuery
QueryGroceryList chains the current query on the "grocery_list" edge.
func (*GroceryListItemQuery) Select ¶
func (gliq *GroceryListItemQuery) Select(fields ...string) *GroceryListItemSelect
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.GroceryListItem.Query(). Select(grocerylistitem.FieldName). Scan(ctx, &v)
func (*GroceryListItemQuery) Unique ¶
func (gliq *GroceryListItemQuery) Unique(unique bool) *GroceryListItemQuery
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 (*GroceryListItemQuery) Where ¶
func (gliq *GroceryListItemQuery) Where(ps ...predicate.GroceryListItem) *GroceryListItemQuery
Where adds a new predicate for the GroceryListItemQuery builder.
func (*GroceryListItemQuery) WithGroceryList ¶
func (gliq *GroceryListItemQuery) WithGroceryList(opts ...func(*GroceryListQuery)) *GroceryListItemQuery
WithGroceryList tells the query-builder to eager-load the nodes that are connected to the "grocery_list" edge. The optional arguments are used to configure the query builder of the edge.
type GroceryListItemSelect ¶
type GroceryListItemSelect struct { *GroceryListItemQuery // contains filtered or unexported fields }
GroceryListItemSelect is the builder for selecting fields of GroceryListItem entities.
func (*GroceryListItemSelect) Aggregate ¶
func (glis *GroceryListItemSelect) Aggregate(fns ...AggregateFunc) *GroceryListItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroceryListItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroceryListItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroceryListItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroceryListItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroceryListItemSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroceryListItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroceryListItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroceryListItemSelect) Scan ¶
func (glis *GroceryListItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroceryListItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroceryListItemUpdate ¶
type GroceryListItemUpdate struct {
// contains filtered or unexported fields
}
GroceryListItemUpdate is the builder for updating GroceryListItem entities.
func (*GroceryListItemUpdate) AddQuantity ¶
func (gliu *GroceryListItemUpdate) AddQuantity(i int) *GroceryListItemUpdate
AddQuantity adds i to the "quantity" field.
func (*GroceryListItemUpdate) ClearGroceryList ¶
func (gliu *GroceryListItemUpdate) ClearGroceryList() *GroceryListItemUpdate
ClearGroceryList clears the "grocery_list" edge to the GroceryList entity.
func (*GroceryListItemUpdate) Exec ¶
func (gliu *GroceryListItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListItemUpdate) ExecX ¶
func (gliu *GroceryListItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListItemUpdate) Mutation ¶
func (gliu *GroceryListItemUpdate) Mutation() *GroceryListItemMutation
Mutation returns the GroceryListItemMutation object of the builder.
func (*GroceryListItemUpdate) Save ¶
func (gliu *GroceryListItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroceryListItemUpdate) SaveX ¶
func (gliu *GroceryListItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroceryListItemUpdate) SetCreatedAt ¶
func (gliu *GroceryListItemUpdate) SetCreatedAt(t time.Time) *GroceryListItemUpdate
SetCreatedAt sets the "created_at" field.
func (*GroceryListItemUpdate) SetGroceryList ¶
func (gliu *GroceryListItemUpdate) SetGroceryList(g *GroceryList) *GroceryListItemUpdate
SetGroceryList sets the "grocery_list" edge to the GroceryList entity.
func (*GroceryListItemUpdate) SetGroceryListID ¶
func (gliu *GroceryListItemUpdate) SetGroceryListID(id int) *GroceryListItemUpdate
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID.
func (*GroceryListItemUpdate) SetName ¶
func (gliu *GroceryListItemUpdate) SetName(s string) *GroceryListItemUpdate
SetName sets the "name" field.
func (*GroceryListItemUpdate) SetNillableCreatedAt ¶
func (gliu *GroceryListItemUpdate) SetNillableCreatedAt(t *time.Time) *GroceryListItemUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListItemUpdate) SetNillableGroceryListID ¶
func (gliu *GroceryListItemUpdate) SetNillableGroceryListID(id *int) *GroceryListItemUpdate
SetNillableGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID if the given value is not nil.
func (*GroceryListItemUpdate) SetNillableNote ¶
func (gliu *GroceryListItemUpdate) SetNillableNote(s *string) *GroceryListItemUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*GroceryListItemUpdate) SetNillableQuantity ¶
func (gliu *GroceryListItemUpdate) SetNillableQuantity(i *int) *GroceryListItemUpdate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*GroceryListItemUpdate) SetNote ¶
func (gliu *GroceryListItemUpdate) SetNote(s string) *GroceryListItemUpdate
SetNote sets the "note" field.
func (*GroceryListItemUpdate) SetQuantity ¶
func (gliu *GroceryListItemUpdate) SetQuantity(i int) *GroceryListItemUpdate
SetQuantity sets the "quantity" field.
func (*GroceryListItemUpdate) Where ¶
func (gliu *GroceryListItemUpdate) Where(ps ...predicate.GroceryListItem) *GroceryListItemUpdate
Where appends a list predicates to the GroceryListItemUpdate builder.
type GroceryListItemUpdateOne ¶
type GroceryListItemUpdateOne struct {
// contains filtered or unexported fields
}
GroceryListItemUpdateOne is the builder for updating a single GroceryListItem entity.
func (*GroceryListItemUpdateOne) AddQuantity ¶
func (gliuo *GroceryListItemUpdateOne) AddQuantity(i int) *GroceryListItemUpdateOne
AddQuantity adds i to the "quantity" field.
func (*GroceryListItemUpdateOne) ClearGroceryList ¶
func (gliuo *GroceryListItemUpdateOne) ClearGroceryList() *GroceryListItemUpdateOne
ClearGroceryList clears the "grocery_list" edge to the GroceryList entity.
func (*GroceryListItemUpdateOne) Exec ¶
func (gliuo *GroceryListItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroceryListItemUpdateOne) ExecX ¶
func (gliuo *GroceryListItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListItemUpdateOne) Mutation ¶
func (gliuo *GroceryListItemUpdateOne) Mutation() *GroceryListItemMutation
Mutation returns the GroceryListItemMutation object of the builder.
func (*GroceryListItemUpdateOne) Save ¶
func (gliuo *GroceryListItemUpdateOne) Save(ctx context.Context) (*GroceryListItem, error)
Save executes the query and returns the updated GroceryListItem entity.
func (*GroceryListItemUpdateOne) SaveX ¶
func (gliuo *GroceryListItemUpdateOne) SaveX(ctx context.Context) *GroceryListItem
SaveX is like Save, but panics if an error occurs.
func (*GroceryListItemUpdateOne) Select ¶
func (gliuo *GroceryListItemUpdateOne) Select(field string, fields ...string) *GroceryListItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroceryListItemUpdateOne) SetCreatedAt ¶
func (gliuo *GroceryListItemUpdateOne) SetCreatedAt(t time.Time) *GroceryListItemUpdateOne
SetCreatedAt sets the "created_at" field.
func (*GroceryListItemUpdateOne) SetGroceryList ¶
func (gliuo *GroceryListItemUpdateOne) SetGroceryList(g *GroceryList) *GroceryListItemUpdateOne
SetGroceryList sets the "grocery_list" edge to the GroceryList entity.
func (*GroceryListItemUpdateOne) SetGroceryListID ¶
func (gliuo *GroceryListItemUpdateOne) SetGroceryListID(id int) *GroceryListItemUpdateOne
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID.
func (*GroceryListItemUpdateOne) SetName ¶
func (gliuo *GroceryListItemUpdateOne) SetName(s string) *GroceryListItemUpdateOne
SetName sets the "name" field.
func (*GroceryListItemUpdateOne) SetNillableCreatedAt ¶
func (gliuo *GroceryListItemUpdateOne) SetNillableCreatedAt(t *time.Time) *GroceryListItemUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListItemUpdateOne) SetNillableGroceryListID ¶
func (gliuo *GroceryListItemUpdateOne) SetNillableGroceryListID(id *int) *GroceryListItemUpdateOne
SetNillableGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID if the given value is not nil.
func (*GroceryListItemUpdateOne) SetNillableNote ¶
func (gliuo *GroceryListItemUpdateOne) SetNillableNote(s *string) *GroceryListItemUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*GroceryListItemUpdateOne) SetNillableQuantity ¶
func (gliuo *GroceryListItemUpdateOne) SetNillableQuantity(i *int) *GroceryListItemUpdateOne
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*GroceryListItemUpdateOne) SetNote ¶
func (gliuo *GroceryListItemUpdateOne) SetNote(s string) *GroceryListItemUpdateOne
SetNote sets the "note" field.
func (*GroceryListItemUpdateOne) SetQuantity ¶
func (gliuo *GroceryListItemUpdateOne) SetQuantity(i int) *GroceryListItemUpdateOne
SetQuantity sets the "quantity" field.
func (*GroceryListItemUpdateOne) Where ¶
func (gliuo *GroceryListItemUpdateOne) Where(ps ...predicate.GroceryListItem) *GroceryListItemUpdateOne
Where appends a list predicates to the GroceryListItemUpdate builder.
type GroceryListItems ¶
type GroceryListItems []*GroceryListItem
GroceryListItems is a parsable slice of GroceryListItem.
type GroceryListMutation ¶
type GroceryListMutation struct {
// contains filtered or unexported fields
}
GroceryListMutation represents an operation that mutates the GroceryList nodes in the graph.
func (*GroceryListMutation) AddField ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) AddGroceryListItemIDs ¶
func (m *GroceryListMutation) AddGroceryListItemIDs(ids ...int)
AddGroceryListItemIDs adds the "grocery_list_items" edge to the GroceryListItem entity by ids.
func (*GroceryListMutation) AddGroceryListShareIDs ¶
func (m *GroceryListMutation) AddGroceryListShareIDs(ids ...int)
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by ids.
func (*GroceryListMutation) AddedEdges ¶
func (m *GroceryListMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroceryListMutation) AddedField ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) AddedFields ¶
func (m *GroceryListMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroceryListMutation) AddedIDs ¶
func (m *GroceryListMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroceryListMutation) Archived ¶
func (m *GroceryListMutation) Archived() (r bool, exists bool)
Archived returns the value of the "archived" field in the mutation.
func (*GroceryListMutation) ClearEdge ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) ClearField ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) ClearGroceryListItems ¶
func (m *GroceryListMutation) ClearGroceryListItems()
ClearGroceryListItems clears the "grocery_list_items" edge to the GroceryListItem entity.
func (*GroceryListMutation) ClearGroceryListShares ¶
func (m *GroceryListMutation) ClearGroceryListShares()
ClearGroceryListShares clears the "grocery_list_shares" edge to the GroceryListShare entity.
func (*GroceryListMutation) ClearOwner ¶
func (m *GroceryListMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*GroceryListMutation) ClearedEdges ¶
func (m *GroceryListMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroceryListMutation) ClearedFields ¶
func (m *GroceryListMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroceryListMutation) Client ¶
func (m GroceryListMutation) 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 (*GroceryListMutation) CreatedAt ¶
func (m *GroceryListMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GroceryListMutation) EdgeCleared ¶
func (m *GroceryListMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroceryListMutation) Field ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) FieldCleared ¶
func (m *GroceryListMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroceryListMutation) Fields ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) GroceryListItemsCleared ¶
func (m *GroceryListMutation) GroceryListItemsCleared() bool
GroceryListItemsCleared reports if the "grocery_list_items" edge to the GroceryListItem entity was cleared.
func (*GroceryListMutation) GroceryListItemsIDs ¶
func (m *GroceryListMutation) GroceryListItemsIDs() (ids []int)
GroceryListItemsIDs returns the "grocery_list_items" edge IDs in the mutation.
func (*GroceryListMutation) GroceryListSharesCleared ¶
func (m *GroceryListMutation) GroceryListSharesCleared() bool
GroceryListSharesCleared reports if the "grocery_list_shares" edge to the GroceryListShare entity was cleared.
func (*GroceryListMutation) GroceryListSharesIDs ¶
func (m *GroceryListMutation) GroceryListSharesIDs() (ids []int)
GroceryListSharesIDs returns the "grocery_list_shares" edge IDs in the mutation.
func (*GroceryListMutation) ID ¶
func (m *GroceryListMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroceryListMutation) IDs ¶
func (m *GroceryListMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroceryListMutation) Name ¶
func (m *GroceryListMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroceryListMutation) Note ¶
func (m *GroceryListMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*GroceryListMutation) OldArchived ¶
func (m *GroceryListMutation) OldArchived(ctx context.Context) (v bool, err error)
OldArchived returns the old "archived" field's value of the GroceryList entity. If the GroceryList 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 (*GroceryListMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the GroceryList entity. If the GroceryList 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 (*GroceryListMutation) 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 (*GroceryListMutation) OldName ¶
func (m *GroceryListMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the GroceryList entity. If the GroceryList 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 (*GroceryListMutation) OldNote ¶
func (m *GroceryListMutation) OldNote(ctx context.Context) (v string, err error)
OldNote returns the old "note" field's value of the GroceryList entity. If the GroceryList 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 (*GroceryListMutation) Op ¶
func (m *GroceryListMutation) Op() Op
Op returns the operation name.
func (*GroceryListMutation) OwnerCleared ¶
func (m *GroceryListMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*GroceryListMutation) OwnerID ¶
func (m *GroceryListMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*GroceryListMutation) OwnerIDs ¶
func (m *GroceryListMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*GroceryListMutation) RemoveGroceryListItemIDs ¶
func (m *GroceryListMutation) RemoveGroceryListItemIDs(ids ...int)
RemoveGroceryListItemIDs removes the "grocery_list_items" edge to the GroceryListItem entity by IDs.
func (*GroceryListMutation) RemoveGroceryListShareIDs ¶
func (m *GroceryListMutation) RemoveGroceryListShareIDs(ids ...int)
RemoveGroceryListShareIDs removes the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*GroceryListMutation) RemovedEdges ¶
func (m *GroceryListMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroceryListMutation) RemovedGroceryListItemsIDs ¶
func (m *GroceryListMutation) RemovedGroceryListItemsIDs() (ids []int)
RemovedGroceryListItems returns the removed IDs of the "grocery_list_items" edge to the GroceryListItem entity.
func (*GroceryListMutation) RemovedGroceryListSharesIDs ¶
func (m *GroceryListMutation) RemovedGroceryListSharesIDs() (ids []int)
RemovedGroceryListShares returns the removed IDs of the "grocery_list_shares" edge to the GroceryListShare entity.
func (*GroceryListMutation) RemovedIDs ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) ResetArchived ¶
func (m *GroceryListMutation) ResetArchived()
ResetArchived resets all changes to the "archived" field.
func (*GroceryListMutation) ResetCreatedAt ¶
func (m *GroceryListMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GroceryListMutation) ResetEdge ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) ResetField ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) ResetGroceryListItems ¶
func (m *GroceryListMutation) ResetGroceryListItems()
ResetGroceryListItems resets all changes to the "grocery_list_items" edge.
func (*GroceryListMutation) ResetGroceryListShares ¶
func (m *GroceryListMutation) ResetGroceryListShares()
ResetGroceryListShares resets all changes to the "grocery_list_shares" edge.
func (*GroceryListMutation) ResetName ¶
func (m *GroceryListMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroceryListMutation) ResetNote ¶
func (m *GroceryListMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*GroceryListMutation) ResetOwner ¶
func (m *GroceryListMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*GroceryListMutation) SetArchived ¶
func (m *GroceryListMutation) SetArchived(b bool)
SetArchived sets the "archived" field.
func (*GroceryListMutation) SetCreatedAt ¶
func (m *GroceryListMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GroceryListMutation) SetField ¶
func (m *GroceryListMutation) 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 (*GroceryListMutation) SetName ¶
func (m *GroceryListMutation) SetName(s string)
SetName sets the "name" field.
func (*GroceryListMutation) SetNote ¶
func (m *GroceryListMutation) SetNote(s string)
SetNote sets the "note" field.
func (*GroceryListMutation) SetOp ¶
func (m *GroceryListMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroceryListMutation) SetOwnerID ¶
func (m *GroceryListMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (GroceryListMutation) Tx ¶
func (m GroceryListMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroceryListMutation) Type ¶
func (m *GroceryListMutation) Type() string
Type returns the node type of this mutation (GroceryList).
func (*GroceryListMutation) Where ¶
func (m *GroceryListMutation) Where(ps ...predicate.GroceryList)
Where appends a list predicates to the GroceryListMutation builder.
func (*GroceryListMutation) WhereP ¶
func (m *GroceryListMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroceryListMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroceryListQuery ¶
type GroceryListQuery struct {
// contains filtered or unexported fields
}
GroceryListQuery is the builder for querying GroceryList entities.
func (*GroceryListQuery) Aggregate ¶
func (glq *GroceryListQuery) Aggregate(fns ...AggregateFunc) *GroceryListSelect
Aggregate returns a GroceryListSelect configured with the given aggregations.
func (*GroceryListQuery) All ¶
func (glq *GroceryListQuery) All(ctx context.Context) ([]*GroceryList, error)
All executes the query and returns a list of GroceryLists.
func (*GroceryListQuery) AllX ¶
func (glq *GroceryListQuery) AllX(ctx context.Context) []*GroceryList
AllX is like All, but panics if an error occurs.
func (*GroceryListQuery) Clone ¶
func (glq *GroceryListQuery) Clone() *GroceryListQuery
Clone returns a duplicate of the GroceryListQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroceryListQuery) Count ¶
func (glq *GroceryListQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroceryListQuery) CountX ¶
func (glq *GroceryListQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroceryListQuery) Exist ¶
func (glq *GroceryListQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroceryListQuery) ExistX ¶
func (glq *GroceryListQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroceryListQuery) First ¶
func (glq *GroceryListQuery) First(ctx context.Context) (*GroceryList, error)
First returns the first GroceryList entity from the query. Returns a *NotFoundError when no GroceryList was found.
func (*GroceryListQuery) FirstID ¶
func (glq *GroceryListQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GroceryList ID from the query. Returns a *NotFoundError when no GroceryList ID was found.
func (*GroceryListQuery) FirstIDX ¶
func (glq *GroceryListQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroceryListQuery) FirstX ¶
func (glq *GroceryListQuery) FirstX(ctx context.Context) *GroceryList
FirstX is like First, but panics if an error occurs.
func (*GroceryListQuery) GroupBy ¶
func (glq *GroceryListQuery) GroupBy(field string, fields ...string) *GroceryListGroupBy
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.GroceryList.Query(). GroupBy(grocerylist.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroceryListQuery) IDs ¶
func (glq *GroceryListQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GroceryList IDs.
func (*GroceryListQuery) IDsX ¶
func (glq *GroceryListQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroceryListQuery) Limit ¶
func (glq *GroceryListQuery) Limit(limit int) *GroceryListQuery
Limit the number of records to be returned by this query.
func (*GroceryListQuery) Offset ¶
func (glq *GroceryListQuery) Offset(offset int) *GroceryListQuery
Offset to start from.
func (*GroceryListQuery) Only ¶
func (glq *GroceryListQuery) Only(ctx context.Context) (*GroceryList, error)
Only returns a single GroceryList entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GroceryList entity is found. Returns a *NotFoundError when no GroceryList entities are found.
func (*GroceryListQuery) OnlyID ¶
func (glq *GroceryListQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GroceryList ID in the query. Returns a *NotSingularError when more than one GroceryList ID is found. Returns a *NotFoundError when no entities are found.
func (*GroceryListQuery) OnlyIDX ¶
func (glq *GroceryListQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroceryListQuery) OnlyX ¶
func (glq *GroceryListQuery) OnlyX(ctx context.Context) *GroceryList
OnlyX is like Only, but panics if an error occurs.
func (*GroceryListQuery) Order ¶
func (glq *GroceryListQuery) Order(o ...grocerylist.OrderOption) *GroceryListQuery
Order specifies how the records should be ordered.
func (*GroceryListQuery) QueryGroceryListItems ¶
func (glq *GroceryListQuery) QueryGroceryListItems() *GroceryListItemQuery
QueryGroceryListItems chains the current query on the "grocery_list_items" edge.
func (*GroceryListQuery) QueryGroceryListShares ¶
func (glq *GroceryListQuery) QueryGroceryListShares() *GroceryListShareQuery
QueryGroceryListShares chains the current query on the "grocery_list_shares" edge.
func (*GroceryListQuery) QueryOwner ¶
func (glq *GroceryListQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*GroceryListQuery) Select ¶
func (glq *GroceryListQuery) Select(fields ...string) *GroceryListSelect
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.GroceryList.Query(). Select(grocerylist.FieldName). Scan(ctx, &v)
func (*GroceryListQuery) Unique ¶
func (glq *GroceryListQuery) Unique(unique bool) *GroceryListQuery
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 (*GroceryListQuery) Where ¶
func (glq *GroceryListQuery) Where(ps ...predicate.GroceryList) *GroceryListQuery
Where adds a new predicate for the GroceryListQuery builder.
func (*GroceryListQuery) WithGroceryListItems ¶
func (glq *GroceryListQuery) WithGroceryListItems(opts ...func(*GroceryListItemQuery)) *GroceryListQuery
WithGroceryListItems tells the query-builder to eager-load the nodes that are connected to the "grocery_list_items" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroceryListQuery) WithGroceryListShares ¶
func (glq *GroceryListQuery) WithGroceryListShares(opts ...func(*GroceryListShareQuery)) *GroceryListQuery
WithGroceryListShares tells the query-builder to eager-load the nodes that are connected to the "grocery_list_shares" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroceryListQuery) WithOwner ¶
func (glq *GroceryListQuery) WithOwner(opts ...func(*UserQuery)) *GroceryListQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type GroceryListSelect ¶
type GroceryListSelect struct { *GroceryListQuery // contains filtered or unexported fields }
GroceryListSelect is the builder for selecting fields of GroceryList entities.
func (*GroceryListSelect) Aggregate ¶
func (gls *GroceryListSelect) Aggregate(fns ...AggregateFunc) *GroceryListSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroceryListSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroceryListSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroceryListSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroceryListSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroceryListSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroceryListSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroceryListSelect) Scan ¶
func (gls *GroceryListSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroceryListSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroceryListShare ¶
type GroceryListShare struct { int `json:"id,omitempty"` CanEdit bool `json:"can_edit,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` // The values are being populated by the GroceryListShareQuery when eager-loading is set. Edges GroceryListShareEdges `json:"edges"` // contains filtered or unexported fields }ID
GroceryListShare is the model entity for the GroceryListShare schema.
func (*GroceryListShare) QueryGroceryList ¶
func (gls *GroceryListShare) QueryGroceryList() *GroceryListQuery
QueryGroceryList queries the "grocery_list" edge of the GroceryListShare entity.
func (*GroceryListShare) QueryUser ¶
func (gls *GroceryListShare) QueryUser() *UserQuery
QueryUser queries the "user" edge of the GroceryListShare entity.
func (*GroceryListShare) String ¶
func (gls *GroceryListShare) String() string
String implements the fmt.Stringer.
func (*GroceryListShare) Unwrap ¶
func (gls *GroceryListShare) Unwrap() *GroceryListShare
Unwrap unwraps the GroceryListShare 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 (*GroceryListShare) Update ¶
func (gls *GroceryListShare) Update() *GroceryListShareUpdateOne
Update returns a builder for updating this GroceryListShare. Note that you need to call GroceryListShare.Unwrap() before calling this method if this GroceryListShare was returned from a transaction, and the transaction was committed or rolled back.
type GroceryListShareClient ¶
type GroceryListShareClient struct {
// contains filtered or unexported fields
}
GroceryListShareClient is a client for the GroceryListShare schema.
func NewGroceryListShareClient ¶
func NewGroceryListShareClient(c config) *GroceryListShareClient
NewGroceryListShareClient returns a client for the GroceryListShare from the given config.
func (*GroceryListShareClient) Create ¶
func (c *GroceryListShareClient) Create() *GroceryListShareCreate
Create returns a builder for creating a GroceryListShare entity.
func (*GroceryListShareClient) CreateBulk ¶
func (c *GroceryListShareClient) CreateBulk(builders ...*GroceryListShareCreate) *GroceryListShareCreateBulk
CreateBulk returns a builder for creating a bulk of GroceryListShare entities.
func (*GroceryListShareClient) Delete ¶
func (c *GroceryListShareClient) Delete() *GroceryListShareDelete
Delete returns a delete builder for GroceryListShare.
func (*GroceryListShareClient) DeleteOne ¶
func (c *GroceryListShareClient) DeleteOne(gls *GroceryListShare) *GroceryListShareDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroceryListShareClient) DeleteOneID ¶
func (c *GroceryListShareClient) DeleteOneID(id int) *GroceryListShareDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroceryListShareClient) Get ¶
func (c *GroceryListShareClient) Get(ctx context.Context, id int) (*GroceryListShare, error)
Get returns a GroceryListShare entity by its id.
func (*GroceryListShareClient) GetX ¶
func (c *GroceryListShareClient) GetX(ctx context.Context, id int) *GroceryListShare
GetX is like Get, but panics if an error occurs.
func (*GroceryListShareClient) Hooks ¶
func (c *GroceryListShareClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroceryListShareClient) Intercept ¶
func (c *GroceryListShareClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `grocerylistshare.Intercept(f(g(h())))`.
func (*GroceryListShareClient) Interceptors ¶
func (c *GroceryListShareClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroceryListShareClient) Query ¶
func (c *GroceryListShareClient) Query() *GroceryListShareQuery
Query returns a query builder for GroceryListShare.
func (*GroceryListShareClient) QueryGroceryList ¶
func (c *GroceryListShareClient) QueryGroceryList(gls *GroceryListShare) *GroceryListQuery
QueryGroceryList queries the grocery_list edge of a GroceryListShare.
func (*GroceryListShareClient) QueryUser ¶
func (c *GroceryListShareClient) QueryUser(gls *GroceryListShare) *UserQuery
QueryUser queries the user edge of a GroceryListShare.
func (*GroceryListShareClient) Update ¶
func (c *GroceryListShareClient) Update() *GroceryListShareUpdate
Update returns an update builder for GroceryListShare.
func (*GroceryListShareClient) UpdateOne ¶
func (c *GroceryListShareClient) UpdateOne(gls *GroceryListShare) *GroceryListShareUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroceryListShareClient) UpdateOneID ¶
func (c *GroceryListShareClient) UpdateOneID(id int) *GroceryListShareUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroceryListShareClient) Use ¶
func (c *GroceryListShareClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `grocerylistshare.Hooks(f(g(h())))`.
type GroceryListShareCreate ¶
type GroceryListShareCreate struct {
// contains filtered or unexported fields
}
GroceryListShareCreate is the builder for creating a GroceryListShare entity.
func (*GroceryListShareCreate) Exec ¶
func (glsc *GroceryListShareCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListShareCreate) ExecX ¶
func (glsc *GroceryListShareCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListShareCreate) Mutation ¶
func (glsc *GroceryListShareCreate) Mutation() *GroceryListShareMutation
Mutation returns the GroceryListShareMutation object of the builder.
func (*GroceryListShareCreate) Save ¶
func (glsc *GroceryListShareCreate) Save(ctx context.Context) (*GroceryListShare, error)
Save creates the GroceryListShare in the database.
func (*GroceryListShareCreate) SaveX ¶
func (glsc *GroceryListShareCreate) SaveX(ctx context.Context) *GroceryListShare
SaveX calls Save and panics if Save returns an error.
func (*GroceryListShareCreate) SetCanEdit ¶
func (glsc *GroceryListShareCreate) SetCanEdit(b bool) *GroceryListShareCreate
SetCanEdit sets the "can_edit" field.
func (*GroceryListShareCreate) SetCreatedAt ¶
func (glsc *GroceryListShareCreate) SetCreatedAt(t time.Time) *GroceryListShareCreate
SetCreatedAt sets the "created_at" field.
func (*GroceryListShareCreate) SetGroceryList ¶
func (glsc *GroceryListShareCreate) SetGroceryList(g *GroceryList) *GroceryListShareCreate
SetGroceryList sets the "grocery_list" edge to the GroceryList entity.
func (*GroceryListShareCreate) SetGroceryListID ¶
func (glsc *GroceryListShareCreate) SetGroceryListID(id int) *GroceryListShareCreate
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID.
func (*GroceryListShareCreate) SetNillableCanEdit ¶
func (glsc *GroceryListShareCreate) SetNillableCanEdit(b *bool) *GroceryListShareCreate
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*GroceryListShareCreate) SetNillableCreatedAt ¶
func (glsc *GroceryListShareCreate) SetNillableCreatedAt(t *time.Time) *GroceryListShareCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListShareCreate) SetNillableGroceryListID ¶
func (glsc *GroceryListShareCreate) SetNillableGroceryListID(id *int) *GroceryListShareCreate
SetNillableGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID if the given value is not nil.
func (*GroceryListShareCreate) SetNillableUserID ¶
func (glsc *GroceryListShareCreate) SetNillableUserID(id *int) *GroceryListShareCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*GroceryListShareCreate) SetUser ¶
func (glsc *GroceryListShareCreate) SetUser(u *User) *GroceryListShareCreate
SetUser sets the "user" edge to the User entity.
func (*GroceryListShareCreate) SetUserID ¶
func (glsc *GroceryListShareCreate) SetUserID(id int) *GroceryListShareCreate
SetUserID sets the "user" edge to the User entity by ID.
type GroceryListShareCreateBulk ¶
type GroceryListShareCreateBulk struct {
// contains filtered or unexported fields
}
GroceryListShareCreateBulk is the builder for creating many GroceryListShare entities in bulk.
func (*GroceryListShareCreateBulk) Exec ¶
func (glscb *GroceryListShareCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListShareCreateBulk) ExecX ¶
func (glscb *GroceryListShareCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListShareCreateBulk) Save ¶
func (glscb *GroceryListShareCreateBulk) Save(ctx context.Context) ([]*GroceryListShare, error)
Save creates the GroceryListShare entities in the database.
func (*GroceryListShareCreateBulk) SaveX ¶
func (glscb *GroceryListShareCreateBulk) SaveX(ctx context.Context) []*GroceryListShare
SaveX is like Save, but panics if an error occurs.
type GroceryListShareDelete ¶
type GroceryListShareDelete struct {
// contains filtered or unexported fields
}
GroceryListShareDelete is the builder for deleting a GroceryListShare entity.
func (*GroceryListShareDelete) Exec ¶
func (glsd *GroceryListShareDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroceryListShareDelete) ExecX ¶
func (glsd *GroceryListShareDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListShareDelete) Where ¶
func (glsd *GroceryListShareDelete) Where(ps ...predicate.GroceryListShare) *GroceryListShareDelete
Where appends a list predicates to the GroceryListShareDelete builder.
type GroceryListShareDeleteOne ¶
type GroceryListShareDeleteOne struct {
// contains filtered or unexported fields
}
GroceryListShareDeleteOne is the builder for deleting a single GroceryListShare entity.
func (*GroceryListShareDeleteOne) Exec ¶
func (glsdo *GroceryListShareDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroceryListShareDeleteOne) ExecX ¶
func (glsdo *GroceryListShareDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListShareDeleteOne) Where ¶
func (glsdo *GroceryListShareDeleteOne) Where(ps ...predicate.GroceryListShare) *GroceryListShareDeleteOne
Where appends a list predicates to the GroceryListShareDelete builder.
type GroceryListShareEdges ¶
type GroceryListShareEdges struct { User `json:"user,omitempty"` GroceryList *GroceryList `json:"grocery_list,omitempty"` // contains filtered or unexported fields }User *
GroceryListShareEdges holds the relations/edges for other nodes in the graph.
func (GroceryListShareEdges) GroceryListOrErr ¶
func (e GroceryListShareEdges) GroceryListOrErr() (*GroceryList, error)
GroceryListOrErr returns the GroceryList value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GroceryListShareEdges) UserOrErr ¶
func (e GroceryListShareEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroceryListShareGroupBy ¶
type GroceryListShareGroupBy struct {
// contains filtered or unexported fields
}
GroceryListShareGroupBy is the group-by builder for GroceryListShare entities.
func (*GroceryListShareGroupBy) Aggregate ¶
func (glsgb *GroceryListShareGroupBy) Aggregate(fns ...AggregateFunc) *GroceryListShareGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroceryListShareGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroceryListShareGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroceryListShareGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroceryListShareGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroceryListShareGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroceryListShareGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroceryListShareGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroceryListShareGroupBy) Scan ¶
func (glsgb *GroceryListShareGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroceryListShareGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroceryListShareMutation ¶
type GroceryListShareMutation struct {
// contains filtered or unexported fields
}
GroceryListShareMutation represents an operation that mutates the GroceryListShare nodes in the graph.
func (*GroceryListShareMutation) AddField ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) AddedEdges ¶
func (m *GroceryListShareMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroceryListShareMutation) AddedField ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) AddedFields ¶
func (m *GroceryListShareMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroceryListShareMutation) AddedIDs ¶
func (m *GroceryListShareMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroceryListShareMutation) CanEdit ¶
func (m *GroceryListShareMutation) CanEdit() (r bool, exists bool)
CanEdit returns the value of the "can_edit" field in the mutation.
func (*GroceryListShareMutation) ClearEdge ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) ClearField ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) ClearGroceryList ¶
func (m *GroceryListShareMutation) ClearGroceryList()
ClearGroceryList clears the "grocery_list" edge to the GroceryList entity.
func (*GroceryListShareMutation) ClearUser ¶
func (m *GroceryListShareMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*GroceryListShareMutation) ClearedEdges ¶
func (m *GroceryListShareMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroceryListShareMutation) ClearedFields ¶
func (m *GroceryListShareMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroceryListShareMutation) Client ¶
func (m GroceryListShareMutation) 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 (*GroceryListShareMutation) CreatedAt ¶
func (m *GroceryListShareMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GroceryListShareMutation) EdgeCleared ¶
func (m *GroceryListShareMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroceryListShareMutation) Field ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) FieldCleared ¶
func (m *GroceryListShareMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroceryListShareMutation) Fields ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) GroceryListCleared ¶
func (m *GroceryListShareMutation) GroceryListCleared() bool
GroceryListCleared reports if the "grocery_list" edge to the GroceryList entity was cleared.
func (*GroceryListShareMutation) GroceryListID ¶
func (m *GroceryListShareMutation) GroceryListID() (id int, exists bool)
GroceryListID returns the "grocery_list" edge ID in the mutation.
func (*GroceryListShareMutation) GroceryListIDs ¶
func (m *GroceryListShareMutation) GroceryListIDs() (ids []int)
GroceryListIDs returns the "grocery_list" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroceryListID instead. It exists only for internal usage by the builders.
func (*GroceryListShareMutation) ID ¶
func (m *GroceryListShareMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroceryListShareMutation) IDs ¶
func (m *GroceryListShareMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroceryListShareMutation) OldCanEdit ¶
func (m *GroceryListShareMutation) OldCanEdit(ctx context.Context) (v bool, err error)
OldCanEdit returns the old "can_edit" field's value of the GroceryListShare entity. If the GroceryListShare 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 (*GroceryListShareMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the GroceryListShare entity. If the GroceryListShare 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 (*GroceryListShareMutation) 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 (*GroceryListShareMutation) Op ¶
func (m *GroceryListShareMutation) Op() Op
Op returns the operation name.
func (*GroceryListShareMutation) RemovedEdges ¶
func (m *GroceryListShareMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroceryListShareMutation) RemovedIDs ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) ResetCanEdit ¶
func (m *GroceryListShareMutation) ResetCanEdit()
ResetCanEdit resets all changes to the "can_edit" field.
func (*GroceryListShareMutation) ResetCreatedAt ¶
func (m *GroceryListShareMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GroceryListShareMutation) ResetEdge ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) ResetField ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) ResetGroceryList ¶
func (m *GroceryListShareMutation) ResetGroceryList()
ResetGroceryList resets all changes to the "grocery_list" edge.
func (*GroceryListShareMutation) ResetUser ¶
func (m *GroceryListShareMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*GroceryListShareMutation) SetCanEdit ¶
func (m *GroceryListShareMutation) SetCanEdit(b bool)
SetCanEdit sets the "can_edit" field.
func (*GroceryListShareMutation) SetCreatedAt ¶
func (m *GroceryListShareMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GroceryListShareMutation) SetField ¶
func (m *GroceryListShareMutation) 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 (*GroceryListShareMutation) SetGroceryListID ¶
func (m *GroceryListShareMutation) SetGroceryListID(id int)
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by id.
func (*GroceryListShareMutation) SetOp ¶
func (m *GroceryListShareMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroceryListShareMutation) SetUserID ¶
func (m *GroceryListShareMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (GroceryListShareMutation) Tx ¶
func (m GroceryListShareMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroceryListShareMutation) Type ¶
func (m *GroceryListShareMutation) Type() string
Type returns the node type of this mutation (GroceryListShare).
func (*GroceryListShareMutation) UserCleared ¶
func (m *GroceryListShareMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*GroceryListShareMutation) UserID ¶
func (m *GroceryListShareMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*GroceryListShareMutation) UserIDs ¶
func (m *GroceryListShareMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*GroceryListShareMutation) Where ¶
func (m *GroceryListShareMutation) Where(ps ...predicate.GroceryListShare)
Where appends a list predicates to the GroceryListShareMutation builder.
func (*GroceryListShareMutation) WhereP ¶
func (m *GroceryListShareMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroceryListShareMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroceryListShareQuery ¶
type GroceryListShareQuery struct {
// contains filtered or unexported fields
}
GroceryListShareQuery is the builder for querying GroceryListShare entities.
func (*GroceryListShareQuery) Aggregate ¶
func (glsq *GroceryListShareQuery) Aggregate(fns ...AggregateFunc) *GroceryListShareSelect
Aggregate returns a GroceryListShareSelect configured with the given aggregations.
func (*GroceryListShareQuery) All ¶
func (glsq *GroceryListShareQuery) All(ctx context.Context) ([]*GroceryListShare, error)
All executes the query and returns a list of GroceryListShares.
func (*GroceryListShareQuery) AllX ¶
func (glsq *GroceryListShareQuery) AllX(ctx context.Context) []*GroceryListShare
AllX is like All, but panics if an error occurs.
func (*GroceryListShareQuery) Clone ¶
func (glsq *GroceryListShareQuery) Clone() *GroceryListShareQuery
Clone returns a duplicate of the GroceryListShareQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroceryListShareQuery) Count ¶
func (glsq *GroceryListShareQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroceryListShareQuery) CountX ¶
func (glsq *GroceryListShareQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroceryListShareQuery) Exist ¶
func (glsq *GroceryListShareQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroceryListShareQuery) ExistX ¶
func (glsq *GroceryListShareQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroceryListShareQuery) First ¶
func (glsq *GroceryListShareQuery) First(ctx context.Context) (*GroceryListShare, error)
First returns the first GroceryListShare entity from the query. Returns a *NotFoundError when no GroceryListShare was found.
func (*GroceryListShareQuery) FirstID ¶
func (glsq *GroceryListShareQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GroceryListShare ID from the query. Returns a *NotFoundError when no GroceryListShare ID was found.
func (*GroceryListShareQuery) FirstIDX ¶
func (glsq *GroceryListShareQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroceryListShareQuery) FirstX ¶
func (glsq *GroceryListShareQuery) FirstX(ctx context.Context) *GroceryListShare
FirstX is like First, but panics if an error occurs.
func (*GroceryListShareQuery) GroupBy ¶
func (glsq *GroceryListShareQuery) GroupBy(field string, fields ...string) *GroceryListShareGroupBy
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 { CanEdit bool `json:"can_edit,omitempty"` Count int `json:"count,omitempty"` } client.GroceryListShare.Query(). GroupBy(grocerylistshare.FieldCanEdit). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroceryListShareQuery) IDs ¶
func (glsq *GroceryListShareQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GroceryListShare IDs.
func (*GroceryListShareQuery) IDsX ¶
func (glsq *GroceryListShareQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroceryListShareQuery) Limit ¶
func (glsq *GroceryListShareQuery) Limit(limit int) *GroceryListShareQuery
Limit the number of records to be returned by this query.
func (*GroceryListShareQuery) Offset ¶
func (glsq *GroceryListShareQuery) Offset(offset int) *GroceryListShareQuery
Offset to start from.
func (*GroceryListShareQuery) Only ¶
func (glsq *GroceryListShareQuery) Only(ctx context.Context) (*GroceryListShare, error)
Only returns a single GroceryListShare entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GroceryListShare entity is found. Returns a *NotFoundError when no GroceryListShare entities are found.
func (*GroceryListShareQuery) OnlyID ¶
func (glsq *GroceryListShareQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GroceryListShare ID in the query. Returns a *NotSingularError when more than one GroceryListShare ID is found. Returns a *NotFoundError when no entities are found.
func (*GroceryListShareQuery) OnlyIDX ¶
func (glsq *GroceryListShareQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroceryListShareQuery) OnlyX ¶
func (glsq *GroceryListShareQuery) OnlyX(ctx context.Context) *GroceryListShare
OnlyX is like Only, but panics if an error occurs.
func (*GroceryListShareQuery) Order ¶
func (glsq *GroceryListShareQuery) Order(o ...grocerylistshare.OrderOption) *GroceryListShareQuery
Order specifies how the records should be ordered.
func (*GroceryListShareQuery) QueryGroceryList ¶
func (glsq *GroceryListShareQuery) QueryGroceryList() *GroceryListQuery
QueryGroceryList chains the current query on the "grocery_list" edge.
func (*GroceryListShareQuery) QueryUser ¶
func (glsq *GroceryListShareQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*GroceryListShareQuery) Select ¶
func (glsq *GroceryListShareQuery) Select(fields ...string) *GroceryListShareSelect
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 { CanEdit bool `json:"can_edit,omitempty"` } client.GroceryListShare.Query(). Select(grocerylistshare.FieldCanEdit). Scan(ctx, &v)
func (*GroceryListShareQuery) Unique ¶
func (glsq *GroceryListShareQuery) Unique(unique bool) *GroceryListShareQuery
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 (*GroceryListShareQuery) Where ¶
func (glsq *GroceryListShareQuery) Where(ps ...predicate.GroceryListShare) *GroceryListShareQuery
Where adds a new predicate for the GroceryListShareQuery builder.
func (*GroceryListShareQuery) WithGroceryList ¶
func (glsq *GroceryListShareQuery) WithGroceryList(opts ...func(*GroceryListQuery)) *GroceryListShareQuery
WithGroceryList tells the query-builder to eager-load the nodes that are connected to the "grocery_list" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroceryListShareQuery) WithUser ¶
func (glsq *GroceryListShareQuery) WithUser(opts ...func(*UserQuery)) *GroceryListShareQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type GroceryListShareSelect ¶
type GroceryListShareSelect struct { // contains filtered or unexported fields }
GroceryListShareSelect is the builder for selecting fields of GroceryListShare entities.
func (*GroceryListShareSelect) Aggregate ¶
func (glss *GroceryListShareSelect) Aggregate(fns ...AggregateFunc) *GroceryListShareSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroceryListShareSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroceryListShareSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroceryListShareSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroceryListShareSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroceryListShareSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroceryListShareSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroceryListShareSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroceryListShareSelect) Scan ¶
func (glss *GroceryListShareSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroceryListShareSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroceryListShareUpdate ¶
type GroceryListShareUpdate struct {
// contains filtered or unexported fields
}
GroceryListShareUpdate is the builder for updating GroceryListShare entities.
func (*GroceryListShareUpdate) ClearGroceryList ¶
func (glsu *GroceryListShareUpdate) ClearGroceryList() *GroceryListShareUpdate
ClearGroceryList clears the "grocery_list" edge to the GroceryList entity.
func (*GroceryListShareUpdate) ClearUser ¶
func (glsu *GroceryListShareUpdate) ClearUser() *GroceryListShareUpdate
ClearUser clears the "user" edge to the User entity.
func (*GroceryListShareUpdate) Exec ¶
func (glsu *GroceryListShareUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListShareUpdate) ExecX ¶
func (glsu *GroceryListShareUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListShareUpdate) Mutation ¶
func (glsu *GroceryListShareUpdate) Mutation() *GroceryListShareMutation
Mutation returns the GroceryListShareMutation object of the builder.
func (*GroceryListShareUpdate) Save ¶
func (glsu *GroceryListShareUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroceryListShareUpdate) SaveX ¶
func (glsu *GroceryListShareUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroceryListShareUpdate) SetCanEdit ¶
func (glsu *GroceryListShareUpdate) SetCanEdit(b bool) *GroceryListShareUpdate
SetCanEdit sets the "can_edit" field.
func (*GroceryListShareUpdate) SetCreatedAt ¶
func (glsu *GroceryListShareUpdate) SetCreatedAt(t time.Time) *GroceryListShareUpdate
SetCreatedAt sets the "created_at" field.
func (*GroceryListShareUpdate) SetGroceryList ¶
func (glsu *GroceryListShareUpdate) SetGroceryList(g *GroceryList) *GroceryListShareUpdate
SetGroceryList sets the "grocery_list" edge to the GroceryList entity.
func (*GroceryListShareUpdate) SetGroceryListID ¶
func (glsu *GroceryListShareUpdate) SetGroceryListID(id int) *GroceryListShareUpdate
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID.
func (*GroceryListShareUpdate) SetNillableCanEdit ¶
func (glsu *GroceryListShareUpdate) SetNillableCanEdit(b *bool) *GroceryListShareUpdate
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*GroceryListShareUpdate) SetNillableCreatedAt ¶
func (glsu *GroceryListShareUpdate) SetNillableCreatedAt(t *time.Time) *GroceryListShareUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListShareUpdate) SetNillableGroceryListID ¶
func (glsu *GroceryListShareUpdate) SetNillableGroceryListID(id *int) *GroceryListShareUpdate
SetNillableGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID if the given value is not nil.
func (*GroceryListShareUpdate) SetNillableUserID ¶
func (glsu *GroceryListShareUpdate) SetNillableUserID(id *int) *GroceryListShareUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*GroceryListShareUpdate) SetUser ¶
func (glsu *GroceryListShareUpdate) SetUser(u *User) *GroceryListShareUpdate
SetUser sets the "user" edge to the User entity.
func (*GroceryListShareUpdate) SetUserID ¶
func (glsu *GroceryListShareUpdate) SetUserID(id int) *GroceryListShareUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*GroceryListShareUpdate) Where ¶
func (glsu *GroceryListShareUpdate) Where(ps ...predicate.GroceryListShare) *GroceryListShareUpdate
Where appends a list predicates to the GroceryListShareUpdate builder.
type GroceryListShareUpdateOne ¶
type GroceryListShareUpdateOne struct {
// contains filtered or unexported fields
}
GroceryListShareUpdateOne is the builder for updating a single GroceryListShare entity.
func (*GroceryListShareUpdateOne) ClearGroceryList ¶
func (glsuo *GroceryListShareUpdateOne) ClearGroceryList() *GroceryListShareUpdateOne
ClearGroceryList clears the "grocery_list" edge to the GroceryList entity.
func (*GroceryListShareUpdateOne) ClearUser ¶
func (glsuo *GroceryListShareUpdateOne) ClearUser() *GroceryListShareUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*GroceryListShareUpdateOne) Exec ¶
func (glsuo *GroceryListShareUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroceryListShareUpdateOne) ExecX ¶
func (glsuo *GroceryListShareUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListShareUpdateOne) Mutation ¶
func (glsuo *GroceryListShareUpdateOne) Mutation() *GroceryListShareMutation
Mutation returns the GroceryListShareMutation object of the builder.
func (*GroceryListShareUpdateOne) Save ¶
func (glsuo *GroceryListShareUpdateOne) Save(ctx context.Context) (*GroceryListShare, error)
Save executes the query and returns the updated GroceryListShare entity.
func (*GroceryListShareUpdateOne) SaveX ¶
func (glsuo *GroceryListShareUpdateOne) SaveX(ctx context.Context) *GroceryListShare
SaveX is like Save, but panics if an error occurs.
func (*GroceryListShareUpdateOne) Select ¶
func (glsuo *GroceryListShareUpdateOne) Select(field string, fields ...string) *GroceryListShareUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroceryListShareUpdateOne) SetCanEdit ¶
func (glsuo *GroceryListShareUpdateOne) SetCanEdit(b bool) *GroceryListShareUpdateOne
SetCanEdit sets the "can_edit" field.
func (*GroceryListShareUpdateOne) SetCreatedAt ¶
func (glsuo *GroceryListShareUpdateOne) SetCreatedAt(t time.Time) *GroceryListShareUpdateOne
SetCreatedAt sets the "created_at" field.
func (*GroceryListShareUpdateOne) SetGroceryList ¶
func (glsuo *GroceryListShareUpdateOne) SetGroceryList(g *GroceryList) *GroceryListShareUpdateOne
SetGroceryList sets the "grocery_list" edge to the GroceryList entity.
func (*GroceryListShareUpdateOne) SetGroceryListID ¶
func (glsuo *GroceryListShareUpdateOne) SetGroceryListID(id int) *GroceryListShareUpdateOne
SetGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID.
func (*GroceryListShareUpdateOne) SetNillableCanEdit ¶
func (glsuo *GroceryListShareUpdateOne) SetNillableCanEdit(b *bool) *GroceryListShareUpdateOne
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*GroceryListShareUpdateOne) SetNillableCreatedAt ¶
func (glsuo *GroceryListShareUpdateOne) SetNillableCreatedAt(t *time.Time) *GroceryListShareUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListShareUpdateOne) SetNillableGroceryListID ¶
func (glsuo *GroceryListShareUpdateOne) SetNillableGroceryListID(id *int) *GroceryListShareUpdateOne
SetNillableGroceryListID sets the "grocery_list" edge to the GroceryList entity by ID if the given value is not nil.
func (*GroceryListShareUpdateOne) SetNillableUserID ¶
func (glsuo *GroceryListShareUpdateOne) SetNillableUserID(id *int) *GroceryListShareUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*GroceryListShareUpdateOne) SetUser ¶
func (glsuo *GroceryListShareUpdateOne) SetUser(u *User) *GroceryListShareUpdateOne
SetUser sets the "user" edge to the User entity.
func (*GroceryListShareUpdateOne) SetUserID ¶
func (glsuo *GroceryListShareUpdateOne) SetUserID(id int) *GroceryListShareUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*GroceryListShareUpdateOne) Where ¶
func (glsuo *GroceryListShareUpdateOne) Where(ps ...predicate.GroceryListShare) *GroceryListShareUpdateOne
Where appends a list predicates to the GroceryListShareUpdate builder.
type GroceryListShares ¶
type GroceryListShares []*GroceryListShare
GroceryListShares is a parsable slice of GroceryListShare.
type GroceryListUpdate ¶
type GroceryListUpdate struct {
// contains filtered or unexported fields
}
GroceryListUpdate is the builder for updating GroceryList entities.
func (*GroceryListUpdate) AddGroceryListItemIDs ¶
func (glu *GroceryListUpdate) AddGroceryListItemIDs(ids ...int) *GroceryListUpdate
AddGroceryListItemIDs adds the "grocery_list_items" edge to the GroceryListItem entity by IDs.
func (*GroceryListUpdate) AddGroceryListItems ¶
func (glu *GroceryListUpdate) AddGroceryListItems(g ...*GroceryListItem) *GroceryListUpdate
AddGroceryListItems adds the "grocery_list_items" edges to the GroceryListItem entity.
func (*GroceryListUpdate) AddGroceryListShareIDs ¶
func (glu *GroceryListUpdate) AddGroceryListShareIDs(ids ...int) *GroceryListUpdate
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*GroceryListUpdate) AddGroceryListShares ¶
func (glu *GroceryListUpdate) AddGroceryListShares(g ...*GroceryListShare) *GroceryListUpdate
AddGroceryListShares adds the "grocery_list_shares" edges to the GroceryListShare entity.
func (*GroceryListUpdate) ClearGroceryListItems ¶
func (glu *GroceryListUpdate) ClearGroceryListItems() *GroceryListUpdate
ClearGroceryListItems clears all "grocery_list_items" edges to the GroceryListItem entity.
func (*GroceryListUpdate) ClearGroceryListShares ¶
func (glu *GroceryListUpdate) ClearGroceryListShares() *GroceryListUpdate
ClearGroceryListShares clears all "grocery_list_shares" edges to the GroceryListShare entity.
func (*GroceryListUpdate) ClearOwner ¶
func (glu *GroceryListUpdate) ClearOwner() *GroceryListUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*GroceryListUpdate) Exec ¶
func (glu *GroceryListUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroceryListUpdate) ExecX ¶
func (glu *GroceryListUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListUpdate) Mutation ¶
func (glu *GroceryListUpdate) Mutation() *GroceryListMutation
Mutation returns the GroceryListMutation object of the builder.
func (*GroceryListUpdate) RemoveGroceryListItemIDs ¶
func (glu *GroceryListUpdate) RemoveGroceryListItemIDs(ids ...int) *GroceryListUpdate
RemoveGroceryListItemIDs removes the "grocery_list_items" edge to GroceryListItem entities by IDs.
func (*GroceryListUpdate) RemoveGroceryListItems ¶
func (glu *GroceryListUpdate) RemoveGroceryListItems(g ...*GroceryListItem) *GroceryListUpdate
RemoveGroceryListItems removes "grocery_list_items" edges to GroceryListItem entities.
func (*GroceryListUpdate) RemoveGroceryListShareIDs ¶
func (glu *GroceryListUpdate) RemoveGroceryListShareIDs(ids ...int) *GroceryListUpdate
RemoveGroceryListShareIDs removes the "grocery_list_shares" edge to GroceryListShare entities by IDs.
func (*GroceryListUpdate) RemoveGroceryListShares ¶
func (glu *GroceryListUpdate) RemoveGroceryListShares(g ...*GroceryListShare) *GroceryListUpdate
RemoveGroceryListShares removes "grocery_list_shares" edges to GroceryListShare entities.
func (*GroceryListUpdate) Save ¶
func (glu *GroceryListUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroceryListUpdate) SaveX ¶
func (glu *GroceryListUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroceryListUpdate) SetArchived ¶
func (glu *GroceryListUpdate) SetArchived(b bool) *GroceryListUpdate
SetArchived sets the "archived" field.
func (*GroceryListUpdate) SetCreatedAt ¶
func (glu *GroceryListUpdate) SetCreatedAt(t time.Time) *GroceryListUpdate
SetCreatedAt sets the "created_at" field.
func (*GroceryListUpdate) SetName ¶
func (glu *GroceryListUpdate) SetName(s string) *GroceryListUpdate
SetName sets the "name" field.
func (*GroceryListUpdate) SetNillableArchived ¶
func (glu *GroceryListUpdate) SetNillableArchived(b *bool) *GroceryListUpdate
SetNillableArchived sets the "archived" field if the given value is not nil.
func (*GroceryListUpdate) SetNillableCreatedAt ¶
func (glu *GroceryListUpdate) SetNillableCreatedAt(t *time.Time) *GroceryListUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListUpdate) SetNillableName ¶
func (glu *GroceryListUpdate) SetNillableName(s *string) *GroceryListUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*GroceryListUpdate) SetNillableNote ¶
func (glu *GroceryListUpdate) SetNillableNote(s *string) *GroceryListUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*GroceryListUpdate) SetNillableOwnerID ¶
func (glu *GroceryListUpdate) SetNillableOwnerID(id *int) *GroceryListUpdate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*GroceryListUpdate) SetNote ¶
func (glu *GroceryListUpdate) SetNote(s string) *GroceryListUpdate
SetNote sets the "note" field.
func (*GroceryListUpdate) SetOwner ¶
func (glu *GroceryListUpdate) SetOwner(u *User) *GroceryListUpdate
SetOwner sets the "owner" edge to the User entity.
func (*GroceryListUpdate) SetOwnerID ¶
func (glu *GroceryListUpdate) SetOwnerID(id int) *GroceryListUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*GroceryListUpdate) Where ¶
func (glu *GroceryListUpdate) Where(ps ...predicate.GroceryList) *GroceryListUpdate
Where appends a list predicates to the GroceryListUpdate builder.
type GroceryListUpdateOne ¶
type GroceryListUpdateOne struct {
// contains filtered or unexported fields
}
GroceryListUpdateOne is the builder for updating a single GroceryList entity.
func (*GroceryListUpdateOne) AddGroceryListItemIDs ¶
func (gluo *GroceryListUpdateOne) AddGroceryListItemIDs(ids ...int) *GroceryListUpdateOne
AddGroceryListItemIDs adds the "grocery_list_items" edge to the GroceryListItem entity by IDs.
func (*GroceryListUpdateOne) AddGroceryListItems ¶
func (gluo *GroceryListUpdateOne) AddGroceryListItems(g ...*GroceryListItem) *GroceryListUpdateOne
AddGroceryListItems adds the "grocery_list_items" edges to the GroceryListItem entity.
func (*GroceryListUpdateOne) AddGroceryListShareIDs ¶
func (gluo *GroceryListUpdateOne) AddGroceryListShareIDs(ids ...int) *GroceryListUpdateOne
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*GroceryListUpdateOne) AddGroceryListShares ¶
func (gluo *GroceryListUpdateOne) AddGroceryListShares(g ...*GroceryListShare) *GroceryListUpdateOne
AddGroceryListShares adds the "grocery_list_shares" edges to the GroceryListShare entity.
func (*GroceryListUpdateOne) ClearGroceryListItems ¶
func (gluo *GroceryListUpdateOne) ClearGroceryListItems() *GroceryListUpdateOne
ClearGroceryListItems clears all "grocery_list_items" edges to the GroceryListItem entity.
func (*GroceryListUpdateOne) ClearGroceryListShares ¶
func (gluo *GroceryListUpdateOne) ClearGroceryListShares() *GroceryListUpdateOne
ClearGroceryListShares clears all "grocery_list_shares" edges to the GroceryListShare entity.
func (*GroceryListUpdateOne) ClearOwner ¶
func (gluo *GroceryListUpdateOne) ClearOwner() *GroceryListUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*GroceryListUpdateOne) Exec ¶
func (gluo *GroceryListUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroceryListUpdateOne) ExecX ¶
func (gluo *GroceryListUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroceryListUpdateOne) Mutation ¶
func (gluo *GroceryListUpdateOne) Mutation() *GroceryListMutation
Mutation returns the GroceryListMutation object of the builder.
func (*GroceryListUpdateOne) RemoveGroceryListItemIDs ¶
func (gluo *GroceryListUpdateOne) RemoveGroceryListItemIDs(ids ...int) *GroceryListUpdateOne
RemoveGroceryListItemIDs removes the "grocery_list_items" edge to GroceryListItem entities by IDs.
func (*GroceryListUpdateOne) RemoveGroceryListItems ¶
func (gluo *GroceryListUpdateOne) RemoveGroceryListItems(g ...*GroceryListItem) *GroceryListUpdateOne
RemoveGroceryListItems removes "grocery_list_items" edges to GroceryListItem entities.
func (*GroceryListUpdateOne) RemoveGroceryListShareIDs ¶
func (gluo *GroceryListUpdateOne) RemoveGroceryListShareIDs(ids ...int) *GroceryListUpdateOne
RemoveGroceryListShareIDs removes the "grocery_list_shares" edge to GroceryListShare entities by IDs.
func (*GroceryListUpdateOne) RemoveGroceryListShares ¶
func (gluo *GroceryListUpdateOne) RemoveGroceryListShares(g ...*GroceryListShare) *GroceryListUpdateOne
RemoveGroceryListShares removes "grocery_list_shares" edges to GroceryListShare entities.
func (*GroceryListUpdateOne) Save ¶
func (gluo *GroceryListUpdateOne) Save(ctx context.Context) (*GroceryList, error)
Save executes the query and returns the updated GroceryList entity.
func (*GroceryListUpdateOne) SaveX ¶
func (gluo *GroceryListUpdateOne) SaveX(ctx context.Context) *GroceryList
SaveX is like Save, but panics if an error occurs.
func (*GroceryListUpdateOne) Select ¶
func (gluo *GroceryListUpdateOne) Select(field string, fields ...string) *GroceryListUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroceryListUpdateOne) SetArchived ¶
func (gluo *GroceryListUpdateOne) SetArchived(b bool) *GroceryListUpdateOne
SetArchived sets the "archived" field.
func (*GroceryListUpdateOne) SetCreatedAt ¶
func (gluo *GroceryListUpdateOne) SetCreatedAt(t time.Time) *GroceryListUpdateOne
SetCreatedAt sets the "created_at" field.
func (*GroceryListUpdateOne) SetName ¶
func (gluo *GroceryListUpdateOne) SetName(s string) *GroceryListUpdateOne
SetName sets the "name" field.
func (*GroceryListUpdateOne) SetNillableArchived ¶
func (gluo *GroceryListUpdateOne) SetNillableArchived(b *bool) *GroceryListUpdateOne
SetNillableArchived sets the "archived" field if the given value is not nil.
func (*GroceryListUpdateOne) SetNillableCreatedAt ¶
func (gluo *GroceryListUpdateOne) SetNillableCreatedAt(t *time.Time) *GroceryListUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GroceryListUpdateOne) SetNillableName ¶
func (gluo *GroceryListUpdateOne) SetNillableName(s *string) *GroceryListUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*GroceryListUpdateOne) SetNillableNote ¶
func (gluo *GroceryListUpdateOne) SetNillableNote(s *string) *GroceryListUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*GroceryListUpdateOne) SetNillableOwnerID ¶
func (gluo *GroceryListUpdateOne) SetNillableOwnerID(id *int) *GroceryListUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*GroceryListUpdateOne) SetNote ¶
func (gluo *GroceryListUpdateOne) SetNote(s string) *GroceryListUpdateOne
SetNote sets the "note" field.
func (*GroceryListUpdateOne) SetOwner ¶
func (gluo *GroceryListUpdateOne) SetOwner(u *User) *GroceryListUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*GroceryListUpdateOne) SetOwnerID ¶
func (gluo *GroceryListUpdateOne) SetOwnerID(id int) *GroceryListUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*GroceryListUpdateOne) Where ¶
func (gluo *GroceryListUpdateOne) Where(ps ...predicate.GroceryList) *GroceryListUpdateOne
Where appends a list predicates to the GroceryListUpdate builder.
type GroceryLists ¶
type GroceryLists []*GroceryList
GroceryLists is a parsable slice of GroceryList.
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 Movie ¶
type Movie struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Note holds the value of the "note" field. Note string `json:"note,omitempty"` // Watched holds the value of the "watched" field. Watched bool `json:"watched,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MovieQuery when eager-loading is set. Edges MovieEdges `json:"edges"` // contains filtered or unexported fields }
Movie is the model entity for the Movie schema.
func (*Movie) QueryMovieCollection ¶
func (m *Movie) QueryMovieCollection() *MovieCollectionQuery
QueryMovieCollection queries the "movie_collection" edge of the Movie entity.
func (*Movie) Unwrap ¶
Unwrap unwraps the Movie 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 (*Movie) Update ¶
func (m *Movie) Update() *MovieUpdateOne
Update returns a builder for updating this Movie. Note that you need to call Movie.Unwrap() before calling this method if this Movie was returned from a transaction, and the transaction was committed or rolled back.
type MovieClient ¶
type MovieClient struct {
// contains filtered or unexported fields
}
MovieClient is a client for the Movie schema.
func NewMovieClient ¶
func NewMovieClient(c config) *MovieClient
NewMovieClient returns a client for the Movie from the given config.
func (*MovieClient) Create ¶
func (c *MovieClient) Create() *MovieCreate
Create returns a builder for creating a Movie entity.
func (*MovieClient) CreateBulk ¶
func (c *MovieClient) CreateBulk(builders ...*MovieCreate) *MovieCreateBulk
CreateBulk returns a builder for creating a bulk of Movie entities.
func (*MovieClient) Delete ¶
func (c *MovieClient) Delete() *MovieDelete
Delete returns a delete builder for Movie.
func (*MovieClient) DeleteOne ¶
func (c *MovieClient) DeleteOne(m *Movie) *MovieDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MovieClient) DeleteOneID ¶
func (c *MovieClient) DeleteOneID(id int) *MovieDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MovieClient) GetX ¶
func (c *MovieClient) GetX(ctx context.Context, id int) *Movie
GetX is like Get, but panics if an error occurs.
func (*MovieClient) Intercept ¶
func (c *MovieClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `movie.Intercept(f(g(h())))`.
func (*MovieClient) Interceptors ¶
func (c *MovieClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MovieClient) Query ¶
func (c *MovieClient) Query() *MovieQuery
Query returns a query builder for Movie.
func (*MovieClient) QueryMovieCollection ¶
func (c *MovieClient) QueryMovieCollection(m *Movie) *MovieCollectionQuery
QueryMovieCollection queries the movie_collection edge of a Movie.
func (*MovieClient) Update ¶
func (c *MovieClient) Update() *MovieUpdate
Update returns an update builder for Movie.
func (*MovieClient) UpdateOne ¶
func (c *MovieClient) UpdateOne(m *Movie) *MovieUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MovieClient) UpdateOneID ¶
func (c *MovieClient) UpdateOneID(id int) *MovieUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MovieClient) Use ¶
func (c *MovieClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `movie.Hooks(f(g(h())))`.
type MovieCollection ¶
type MovieCollection struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Note holds the value of the "note" field. Note string `json:"note,omitempty"` // ShowWatched holds the value of the "show_watched" field. ShowWatched bool `json:"show_watched,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MovieCollectionQuery when eager-loading is set. Edges MovieCollectionEdges `json:"edges"` // contains filtered or unexported fields }
MovieCollection is the model entity for the MovieCollection schema.
func (*MovieCollection) QueryMovieCollectionShares ¶
func (mc *MovieCollection) QueryMovieCollectionShares() *MovieCollectionShareQuery
QueryMovieCollectionShares queries the "movie_collection_shares" edge of the MovieCollection entity.
func (*MovieCollection) QueryMovies ¶
func (mc *MovieCollection) QueryMovies() *MovieQuery
QueryMovies queries the "movies" edge of the MovieCollection entity.
func (*MovieCollection) QueryOwner ¶
func (mc *MovieCollection) QueryOwner() *UserQuery
QueryOwner queries the "owner" edge of the MovieCollection entity.
func (*MovieCollection) String ¶
func (mc *MovieCollection) String() string
String implements the fmt.Stringer.
func (*MovieCollection) Unwrap ¶
func (mc *MovieCollection) Unwrap() *MovieCollection
Unwrap unwraps the MovieCollection 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 (*MovieCollection) Update ¶
func (mc *MovieCollection) Update() *MovieCollectionUpdateOne
Update returns a builder for updating this MovieCollection. Note that you need to call MovieCollection.Unwrap() before calling this method if this MovieCollection was returned from a transaction, and the transaction was committed or rolled back.
type MovieCollectionClient ¶
type MovieCollectionClient struct {
// contains filtered or unexported fields
}
MovieCollectionClient is a client for the MovieCollection schema.
func NewMovieCollectionClient ¶
func NewMovieCollectionClient(c config) *MovieCollectionClient
NewMovieCollectionClient returns a client for the MovieCollection from the given config.
func (*MovieCollectionClient) Create ¶
func (c *MovieCollectionClient) Create() *MovieCollectionCreate
Create returns a builder for creating a MovieCollection entity.
func (*MovieCollectionClient) CreateBulk ¶
func (c *MovieCollectionClient) CreateBulk(builders ...*MovieCollectionCreate) *MovieCollectionCreateBulk
CreateBulk returns a builder for creating a bulk of MovieCollection entities.
func (*MovieCollectionClient) Delete ¶
func (c *MovieCollectionClient) Delete() *MovieCollectionDelete
Delete returns a delete builder for MovieCollection.
func (*MovieCollectionClient) DeleteOne ¶
func (c *MovieCollectionClient) DeleteOne(mc *MovieCollection) *MovieCollectionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MovieCollectionClient) DeleteOneID ¶
func (c *MovieCollectionClient) DeleteOneID(id int) *MovieCollectionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MovieCollectionClient) Get ¶
func (c *MovieCollectionClient) Get(ctx context.Context, id int) (*MovieCollection, error)
Get returns a MovieCollection entity by its id.
func (*MovieCollectionClient) GetX ¶
func (c *MovieCollectionClient) GetX(ctx context.Context, id int) *MovieCollection
GetX is like Get, but panics if an error occurs.
func (*MovieCollectionClient) Hooks ¶
func (c *MovieCollectionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MovieCollectionClient) Intercept ¶
func (c *MovieCollectionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `moviecollection.Intercept(f(g(h())))`.
func (*MovieCollectionClient) Interceptors ¶
func (c *MovieCollectionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MovieCollectionClient) Query ¶
func (c *MovieCollectionClient) Query() *MovieCollectionQuery
Query returns a query builder for MovieCollection.
func (*MovieCollectionClient) QueryMovieCollectionShares ¶
func (c *MovieCollectionClient) QueryMovieCollectionShares(mc *MovieCollection) *MovieCollectionShareQuery
QueryMovieCollectionShares queries the movie_collection_shares edge of a MovieCollection.
func (*MovieCollectionClient) QueryMovies ¶
func (c *MovieCollectionClient) QueryMovies(mc *MovieCollection) *MovieQuery
QueryMovies queries the movies edge of a MovieCollection.
func (*MovieCollectionClient) QueryOwner ¶
func (c *MovieCollectionClient) QueryOwner(mc *MovieCollection) *UserQuery
QueryOwner queries the owner edge of a MovieCollection.
func (*MovieCollectionClient) Update ¶
func (c *MovieCollectionClient) Update() *MovieCollectionUpdate
Update returns an update builder for MovieCollection.
func (*MovieCollectionClient) UpdateOne ¶
func (c *MovieCollectionClient) UpdateOne(mc *MovieCollection) *MovieCollectionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MovieCollectionClient) UpdateOneID ¶
func (c *MovieCollectionClient) UpdateOneID(id int) *MovieCollectionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MovieCollectionClient) Use ¶
func (c *MovieCollectionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `moviecollection.Hooks(f(g(h())))`.
type MovieCollectionCreate ¶
type MovieCollectionCreate struct {
// contains filtered or unexported fields
}
MovieCollectionCreate is the builder for creating a MovieCollection entity.
func (*MovieCollectionCreate) AddMovieCollectionShareIDs ¶
func (mcc *MovieCollectionCreate) AddMovieCollectionShareIDs(ids ...int) *MovieCollectionCreate
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*MovieCollectionCreate) AddMovieCollectionShares ¶
func (mcc *MovieCollectionCreate) AddMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionCreate
AddMovieCollectionShares adds the "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*MovieCollectionCreate) AddMovieIDs ¶
func (mcc *MovieCollectionCreate) AddMovieIDs(ids ...int) *MovieCollectionCreate
AddMovieIDs adds the "movies" edge to the Movie entity by IDs.
func (*MovieCollectionCreate) AddMovies ¶
func (mcc *MovieCollectionCreate) AddMovies(m ...*Movie) *MovieCollectionCreate
AddMovies adds the "movies" edges to the Movie entity.
func (*MovieCollectionCreate) Exec ¶
func (mcc *MovieCollectionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCollectionCreate) ExecX ¶
func (mcc *MovieCollectionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionCreate) Mutation ¶
func (mcc *MovieCollectionCreate) Mutation() *MovieCollectionMutation
Mutation returns the MovieCollectionMutation object of the builder.
func (*MovieCollectionCreate) Save ¶
func (mcc *MovieCollectionCreate) Save(ctx context.Context) (*MovieCollection, error)
Save creates the MovieCollection in the database.
func (*MovieCollectionCreate) SaveX ¶
func (mcc *MovieCollectionCreate) SaveX(ctx context.Context) *MovieCollection
SaveX calls Save and panics if Save returns an error.
func (*MovieCollectionCreate) SetCreatedAt ¶
func (mcc *MovieCollectionCreate) SetCreatedAt(t time.Time) *MovieCollectionCreate
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionCreate) SetName ¶
func (mcc *MovieCollectionCreate) SetName(s string) *MovieCollectionCreate
SetName sets the "name" field.
func (*MovieCollectionCreate) SetNillableCreatedAt ¶
func (mcc *MovieCollectionCreate) SetNillableCreatedAt(t *time.Time) *MovieCollectionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieCollectionCreate) SetNillableName ¶
func (mcc *MovieCollectionCreate) SetNillableName(s *string) *MovieCollectionCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*MovieCollectionCreate) SetNillableNote ¶
func (mcc *MovieCollectionCreate) SetNillableNote(s *string) *MovieCollectionCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*MovieCollectionCreate) SetNillableOwnerID ¶
func (mcc *MovieCollectionCreate) SetNillableOwnerID(id *int) *MovieCollectionCreate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*MovieCollectionCreate) SetNillableShowWatched ¶
func (mcc *MovieCollectionCreate) SetNillableShowWatched(b *bool) *MovieCollectionCreate
SetNillableShowWatched sets the "show_watched" field if the given value is not nil.
func (*MovieCollectionCreate) SetNote ¶
func (mcc *MovieCollectionCreate) SetNote(s string) *MovieCollectionCreate
SetNote sets the "note" field.
func (*MovieCollectionCreate) SetOwner ¶
func (mcc *MovieCollectionCreate) SetOwner(u *User) *MovieCollectionCreate
SetOwner sets the "owner" edge to the User entity.
func (*MovieCollectionCreate) SetOwnerID ¶
func (mcc *MovieCollectionCreate) SetOwnerID(id int) *MovieCollectionCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*MovieCollectionCreate) SetShowWatched ¶
func (mcc *MovieCollectionCreate) SetShowWatched(b bool) *MovieCollectionCreate
SetShowWatched sets the "show_watched" field.
type MovieCollectionCreateBulk ¶
type MovieCollectionCreateBulk struct {
// contains filtered or unexported fields
}
MovieCollectionCreateBulk is the builder for creating many MovieCollection entities in bulk.
func (*MovieCollectionCreateBulk) Exec ¶
func (mccb *MovieCollectionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCollectionCreateBulk) ExecX ¶
func (mccb *MovieCollectionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionCreateBulk) Save ¶
func (mccb *MovieCollectionCreateBulk) Save(ctx context.Context) ([]*MovieCollection, error)
Save creates the MovieCollection entities in the database.
func (*MovieCollectionCreateBulk) SaveX ¶
func (mccb *MovieCollectionCreateBulk) SaveX(ctx context.Context) []*MovieCollection
SaveX is like Save, but panics if an error occurs.
type MovieCollectionDelete ¶
type MovieCollectionDelete struct {
// contains filtered or unexported fields
}
MovieCollectionDelete is the builder for deleting a MovieCollection entity.
func (*MovieCollectionDelete) Exec ¶
func (mcd *MovieCollectionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MovieCollectionDelete) ExecX ¶
func (mcd *MovieCollectionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionDelete) Where ¶
func (mcd *MovieCollectionDelete) Where(ps ...predicate.MovieCollection) *MovieCollectionDelete
Where appends a list predicates to the MovieCollectionDelete builder.
type MovieCollectionDeleteOne ¶
type MovieCollectionDeleteOne struct {
// contains filtered or unexported fields
}
MovieCollectionDeleteOne is the builder for deleting a single MovieCollection entity.
func (*MovieCollectionDeleteOne) Exec ¶
func (mcdo *MovieCollectionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MovieCollectionDeleteOne) ExecX ¶
func (mcdo *MovieCollectionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionDeleteOne) Where ¶
func (mcdo *MovieCollectionDeleteOne) Where(ps ...predicate.MovieCollection) *MovieCollectionDeleteOne
Where appends a list predicates to the MovieCollectionDelete builder.
type MovieCollectionEdges ¶
type MovieCollectionEdges struct { // Movies holds the value of the movies edge. Movies []*Movie `json:"movies,omitempty"` // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` MovieCollectionShares []*MovieCollectionShare `json:"movie_collection_shares,omitempty"` // contains filtered or unexported fields }
MovieCollectionEdges holds the relations/edges for other nodes in the graph.
func (MovieCollectionEdges) MovieCollectionSharesOrErr ¶
func (e MovieCollectionEdges) MovieCollectionSharesOrErr() ([]*MovieCollectionShare, error)
MovieCollectionSharesOrErr returns the MovieCollectionShares value or an error if the edge was not loaded in eager-loading.
func (MovieCollectionEdges) MoviesOrErr ¶
func (e MovieCollectionEdges) MoviesOrErr() ([]*Movie, error)
MoviesOrErr returns the Movies value or an error if the edge was not loaded in eager-loading.
func (MovieCollectionEdges) OwnerOrErr ¶
func (e MovieCollectionEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MovieCollectionGroupBy ¶
type MovieCollectionGroupBy struct {
// contains filtered or unexported fields
}
MovieCollectionGroupBy is the group-by builder for MovieCollection entities.
func (*MovieCollectionGroupBy) Aggregate ¶
func (mcgb *MovieCollectionGroupBy) Aggregate(fns ...AggregateFunc) *MovieCollectionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MovieCollectionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MovieCollectionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MovieCollectionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MovieCollectionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MovieCollectionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MovieCollectionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MovieCollectionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MovieCollectionGroupBy) Scan ¶
func (mcgb *MovieCollectionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MovieCollectionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MovieCollectionMutation ¶
type MovieCollectionMutation struct {
// contains filtered or unexported fields
}
MovieCollectionMutation represents an operation that mutates the MovieCollection nodes in the graph.
func (*MovieCollectionMutation) AddField ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) AddMovieCollectionShareIDs ¶
func (m *MovieCollectionMutation) AddMovieCollectionShareIDs(ids ...int)
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by ids.
func (*MovieCollectionMutation) AddMovieIDs ¶
func (m *MovieCollectionMutation) AddMovieIDs(ids ...int)
AddMovieIDs adds the "movies" edge to the Movie entity by ids.
func (*MovieCollectionMutation) AddedEdges ¶
func (m *MovieCollectionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MovieCollectionMutation) AddedField ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) AddedFields ¶
func (m *MovieCollectionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MovieCollectionMutation) AddedIDs ¶
func (m *MovieCollectionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MovieCollectionMutation) ClearEdge ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) ClearField ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) ClearMovieCollectionShares ¶
func (m *MovieCollectionMutation) ClearMovieCollectionShares()
ClearMovieCollectionShares clears the "movie_collection_shares" edge to the MovieCollectionShare entity.
func (*MovieCollectionMutation) ClearMovies ¶
func (m *MovieCollectionMutation) ClearMovies()
ClearMovies clears the "movies" edge to the Movie entity.
func (*MovieCollectionMutation) ClearOwner ¶
func (m *MovieCollectionMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*MovieCollectionMutation) ClearedEdges ¶
func (m *MovieCollectionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MovieCollectionMutation) ClearedFields ¶
func (m *MovieCollectionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MovieCollectionMutation) Client ¶
func (m MovieCollectionMutation) 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 (*MovieCollectionMutation) CreatedAt ¶
func (m *MovieCollectionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MovieCollectionMutation) EdgeCleared ¶
func (m *MovieCollectionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MovieCollectionMutation) Field ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) FieldCleared ¶
func (m *MovieCollectionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MovieCollectionMutation) Fields ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) ID ¶
func (m *MovieCollectionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MovieCollectionMutation) IDs ¶
func (m *MovieCollectionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MovieCollectionMutation) MovieCollectionSharesCleared ¶
func (m *MovieCollectionMutation) MovieCollectionSharesCleared() bool
MovieCollectionSharesCleared reports if the "movie_collection_shares" edge to the MovieCollectionShare entity was cleared.
func (*MovieCollectionMutation) MovieCollectionSharesIDs ¶
func (m *MovieCollectionMutation) MovieCollectionSharesIDs() (ids []int)
MovieCollectionSharesIDs returns the "movie_collection_shares" edge IDs in the mutation.
func (*MovieCollectionMutation) MoviesCleared ¶
func (m *MovieCollectionMutation) MoviesCleared() bool
MoviesCleared reports if the "movies" edge to the Movie entity was cleared.
func (*MovieCollectionMutation) MoviesIDs ¶
func (m *MovieCollectionMutation) MoviesIDs() (ids []int)
MoviesIDs returns the "movies" edge IDs in the mutation.
func (*MovieCollectionMutation) Name ¶
func (m *MovieCollectionMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*MovieCollectionMutation) Note ¶
func (m *MovieCollectionMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*MovieCollectionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the MovieCollection entity. If the MovieCollection 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 (*MovieCollectionMutation) 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 (*MovieCollectionMutation) OldName ¶
func (m *MovieCollectionMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the MovieCollection entity. If the MovieCollection 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 (*MovieCollectionMutation) OldNote ¶
func (m *MovieCollectionMutation) OldNote(ctx context.Context) (v string, err error)
OldNote returns the old "note" field's value of the MovieCollection entity. If the MovieCollection 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 (*MovieCollectionMutation) OldShowWatched ¶
func (m *MovieCollectionMutation) OldShowWatched(ctx context.Context) (v bool, err error)
OldShowWatched returns the old "show_watched" field's value of the MovieCollection entity. If the MovieCollection 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 (*MovieCollectionMutation) Op ¶
func (m *MovieCollectionMutation) Op() Op
Op returns the operation name.
func (*MovieCollectionMutation) OwnerCleared ¶
func (m *MovieCollectionMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*MovieCollectionMutation) OwnerID ¶
func (m *MovieCollectionMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*MovieCollectionMutation) OwnerIDs ¶
func (m *MovieCollectionMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*MovieCollectionMutation) RemoveMovieCollectionShareIDs ¶
func (m *MovieCollectionMutation) RemoveMovieCollectionShareIDs(ids ...int)
RemoveMovieCollectionShareIDs removes the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*MovieCollectionMutation) RemoveMovieIDs ¶
func (m *MovieCollectionMutation) RemoveMovieIDs(ids ...int)
RemoveMovieIDs removes the "movies" edge to the Movie entity by IDs.
func (*MovieCollectionMutation) RemovedEdges ¶
func (m *MovieCollectionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MovieCollectionMutation) RemovedIDs ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) RemovedMovieCollectionSharesIDs ¶
func (m *MovieCollectionMutation) RemovedMovieCollectionSharesIDs() (ids []int)
RemovedMovieCollectionShares returns the removed IDs of the "movie_collection_shares" edge to the MovieCollectionShare entity.
func (*MovieCollectionMutation) RemovedMoviesIDs ¶
func (m *MovieCollectionMutation) RemovedMoviesIDs() (ids []int)
RemovedMovies returns the removed IDs of the "movies" edge to the Movie entity.
func (*MovieCollectionMutation) ResetCreatedAt ¶
func (m *MovieCollectionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MovieCollectionMutation) ResetEdge ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) ResetField ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) ResetMovieCollectionShares ¶
func (m *MovieCollectionMutation) ResetMovieCollectionShares()
ResetMovieCollectionShares resets all changes to the "movie_collection_shares" edge.
func (*MovieCollectionMutation) ResetMovies ¶
func (m *MovieCollectionMutation) ResetMovies()
ResetMovies resets all changes to the "movies" edge.
func (*MovieCollectionMutation) ResetName ¶
func (m *MovieCollectionMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*MovieCollectionMutation) ResetNote ¶
func (m *MovieCollectionMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*MovieCollectionMutation) ResetOwner ¶
func (m *MovieCollectionMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*MovieCollectionMutation) ResetShowWatched ¶
func (m *MovieCollectionMutation) ResetShowWatched()
ResetShowWatched resets all changes to the "show_watched" field.
func (*MovieCollectionMutation) SetCreatedAt ¶
func (m *MovieCollectionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionMutation) SetField ¶
func (m *MovieCollectionMutation) 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 (*MovieCollectionMutation) SetName ¶
func (m *MovieCollectionMutation) SetName(s string)
SetName sets the "name" field.
func (*MovieCollectionMutation) SetNote ¶
func (m *MovieCollectionMutation) SetNote(s string)
SetNote sets the "note" field.
func (*MovieCollectionMutation) SetOp ¶
func (m *MovieCollectionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MovieCollectionMutation) SetOwnerID ¶
func (m *MovieCollectionMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (*MovieCollectionMutation) SetShowWatched ¶
func (m *MovieCollectionMutation) SetShowWatched(b bool)
SetShowWatched sets the "show_watched" field.
func (*MovieCollectionMutation) ShowWatched ¶
func (m *MovieCollectionMutation) ShowWatched() (r bool, exists bool)
ShowWatched returns the value of the "show_watched" field in the mutation.
func (MovieCollectionMutation) Tx ¶
func (m MovieCollectionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MovieCollectionMutation) Type ¶
func (m *MovieCollectionMutation) Type() string
Type returns the node type of this mutation (MovieCollection).
func (*MovieCollectionMutation) Where ¶
func (m *MovieCollectionMutation) Where(ps ...predicate.MovieCollection)
Where appends a list predicates to the MovieCollectionMutation builder.
func (*MovieCollectionMutation) WhereP ¶
func (m *MovieCollectionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MovieCollectionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MovieCollectionQuery ¶
type MovieCollectionQuery struct {
// contains filtered or unexported fields
}
MovieCollectionQuery is the builder for querying MovieCollection entities.
func (*MovieCollectionQuery) Aggregate ¶
func (mcq *MovieCollectionQuery) Aggregate(fns ...AggregateFunc) *MovieCollectionSelect
Aggregate returns a MovieCollectionSelect configured with the given aggregations.
func (*MovieCollectionQuery) All ¶
func (mcq *MovieCollectionQuery) All(ctx context.Context) ([]*MovieCollection, error)
All executes the query and returns a list of MovieCollections.
func (*MovieCollectionQuery) AllX ¶
func (mcq *MovieCollectionQuery) AllX(ctx context.Context) []*MovieCollection
AllX is like All, but panics if an error occurs.
func (*MovieCollectionQuery) Clone ¶
func (mcq *MovieCollectionQuery) Clone() *MovieCollectionQuery
Clone returns a duplicate of the MovieCollectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MovieCollectionQuery) Count ¶
func (mcq *MovieCollectionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MovieCollectionQuery) CountX ¶
func (mcq *MovieCollectionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MovieCollectionQuery) Exist ¶
func (mcq *MovieCollectionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MovieCollectionQuery) ExistX ¶
func (mcq *MovieCollectionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MovieCollectionQuery) First ¶
func (mcq *MovieCollectionQuery) First(ctx context.Context) (*MovieCollection, error)
First returns the first MovieCollection entity from the query. Returns a *NotFoundError when no MovieCollection was found.
func (*MovieCollectionQuery) FirstID ¶
func (mcq *MovieCollectionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MovieCollection ID from the query. Returns a *NotFoundError when no MovieCollection ID was found.
func (*MovieCollectionQuery) FirstIDX ¶
func (mcq *MovieCollectionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MovieCollectionQuery) FirstX ¶
func (mcq *MovieCollectionQuery) FirstX(ctx context.Context) *MovieCollection
FirstX is like First, but panics if an error occurs.
func (*MovieCollectionQuery) GroupBy ¶
func (mcq *MovieCollectionQuery) GroupBy(field string, fields ...string) *MovieCollectionGroupBy
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.MovieCollection.Query(). GroupBy(moviecollection.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MovieCollectionQuery) IDs ¶
func (mcq *MovieCollectionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of MovieCollection IDs.
func (*MovieCollectionQuery) IDsX ¶
func (mcq *MovieCollectionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MovieCollectionQuery) Limit ¶
func (mcq *MovieCollectionQuery) Limit(limit int) *MovieCollectionQuery
Limit the number of records to be returned by this query.
func (*MovieCollectionQuery) Offset ¶
func (mcq *MovieCollectionQuery) Offset(offset int) *MovieCollectionQuery
Offset to start from.
func (*MovieCollectionQuery) Only ¶
func (mcq *MovieCollectionQuery) Only(ctx context.Context) (*MovieCollection, error)
Only returns a single MovieCollection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MovieCollection entity is found. Returns a *NotFoundError when no MovieCollection entities are found.
func (*MovieCollectionQuery) OnlyID ¶
func (mcq *MovieCollectionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MovieCollection ID in the query. Returns a *NotSingularError when more than one MovieCollection ID is found. Returns a *NotFoundError when no entities are found.
func (*MovieCollectionQuery) OnlyIDX ¶
func (mcq *MovieCollectionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MovieCollectionQuery) OnlyX ¶
func (mcq *MovieCollectionQuery) OnlyX(ctx context.Context) *MovieCollection
OnlyX is like Only, but panics if an error occurs.
func (*MovieCollectionQuery) Order ¶
func (mcq *MovieCollectionQuery) Order(o ...moviecollection.OrderOption) *MovieCollectionQuery
Order specifies how the records should be ordered.
func (*MovieCollectionQuery) QueryMovieCollectionShares ¶
func (mcq *MovieCollectionQuery) QueryMovieCollectionShares() *MovieCollectionShareQuery
QueryMovieCollectionShares chains the current query on the "movie_collection_shares" edge.
func (*MovieCollectionQuery) QueryMovies ¶
func (mcq *MovieCollectionQuery) QueryMovies() *MovieQuery
QueryMovies chains the current query on the "movies" edge.
func (*MovieCollectionQuery) QueryOwner ¶
func (mcq *MovieCollectionQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*MovieCollectionQuery) Select ¶
func (mcq *MovieCollectionQuery) Select(fields ...string) *MovieCollectionSelect
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.MovieCollection.Query(). Select(moviecollection.FieldName). Scan(ctx, &v)
func (*MovieCollectionQuery) Unique ¶
func (mcq *MovieCollectionQuery) Unique(unique bool) *MovieCollectionQuery
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 (*MovieCollectionQuery) Where ¶
func (mcq *MovieCollectionQuery) Where(ps ...predicate.MovieCollection) *MovieCollectionQuery
Where adds a new predicate for the MovieCollectionQuery builder.
func (*MovieCollectionQuery) WithMovieCollectionShares ¶
func (mcq *MovieCollectionQuery) WithMovieCollectionShares(opts ...func(*MovieCollectionShareQuery)) *MovieCollectionQuery
WithMovieCollectionShares tells the query-builder to eager-load the nodes that are connected to the "movie_collection_shares" edge. The optional arguments are used to configure the query builder of the edge.
func (*MovieCollectionQuery) WithMovies ¶
func (mcq *MovieCollectionQuery) WithMovies(opts ...func(*MovieQuery)) *MovieCollectionQuery
WithMovies tells the query-builder to eager-load the nodes that are connected to the "movies" edge. The optional arguments are used to configure the query builder of the edge.
func (*MovieCollectionQuery) WithOwner ¶
func (mcq *MovieCollectionQuery) WithOwner(opts ...func(*UserQuery)) *MovieCollectionQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type MovieCollectionSelect ¶
type MovieCollectionSelect struct { *MovieCollectionQuery // contains filtered or unexported fields }
MovieCollectionSelect is the builder for selecting fields of MovieCollection entities.
func (*MovieCollectionSelect) Aggregate ¶
func (mcs *MovieCollectionSelect) Aggregate(fns ...AggregateFunc) *MovieCollectionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MovieCollectionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MovieCollectionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MovieCollectionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MovieCollectionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MovieCollectionSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MovieCollectionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MovieCollectionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MovieCollectionSelect) Scan ¶
func (mcs *MovieCollectionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MovieCollectionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MovieCollectionShare ¶
type MovieCollectionShare struct { int `json:"id,omitempty"` CanEdit bool `json:"can_edit,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` // The values are being populated by the MovieCollectionShareQuery when eager-loading is set. Edges MovieCollectionShareEdges `json:"edges"` // contains filtered or unexported fields }ID
MovieCollectionShare is the model entity for the MovieCollectionShare schema.
func (*MovieCollectionShare) QueryMovieCollection ¶
func (mcs *MovieCollectionShare) QueryMovieCollection() *MovieCollectionQuery
QueryMovieCollection queries the "movie_collection" edge of the MovieCollectionShare entity.
func (*MovieCollectionShare) QueryUser ¶
func (mcs *MovieCollectionShare) QueryUser() *UserQuery
QueryUser queries the "user" edge of the MovieCollectionShare entity.
func (*MovieCollectionShare) String ¶
func (mcs *MovieCollectionShare) String() string
String implements the fmt.Stringer.
func (*MovieCollectionShare) Unwrap ¶
func (mcs *MovieCollectionShare) Unwrap() *MovieCollectionShare
Unwrap unwraps the MovieCollectionShare 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 (*MovieCollectionShare) Update ¶
func (mcs *MovieCollectionShare) Update() *MovieCollectionShareUpdateOne
Update returns a builder for updating this MovieCollectionShare. Note that you need to call MovieCollectionShare.Unwrap() before calling this method if this MovieCollectionShare was returned from a transaction, and the transaction was committed or rolled back.
type MovieCollectionShareClient ¶
type MovieCollectionShareClient struct {
// contains filtered or unexported fields
}
MovieCollectionShareClient is a client for the MovieCollectionShare schema.
func NewMovieCollectionShareClient ¶
func NewMovieCollectionShareClient(c config) *MovieCollectionShareClient
NewMovieCollectionShareClient returns a client for the MovieCollectionShare from the given config.
func (*MovieCollectionShareClient) Create ¶
func (c *MovieCollectionShareClient) Create() *MovieCollectionShareCreate
Create returns a builder for creating a MovieCollectionShare entity.
func (*MovieCollectionShareClient) CreateBulk ¶
func (c *MovieCollectionShareClient) CreateBulk(builders ...*MovieCollectionShareCreate) *MovieCollectionShareCreateBulk
CreateBulk returns a builder for creating a bulk of MovieCollectionShare entities.
func (*MovieCollectionShareClient) Delete ¶
func (c *MovieCollectionShareClient) Delete() *MovieCollectionShareDelete
Delete returns a delete builder for MovieCollectionShare.
func (*MovieCollectionShareClient) DeleteOne ¶
func (c *MovieCollectionShareClient) DeleteOne(mcs *MovieCollectionShare) *MovieCollectionShareDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MovieCollectionShareClient) DeleteOneID ¶
func (c *MovieCollectionShareClient) DeleteOneID(id int) *MovieCollectionShareDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MovieCollectionShareClient) Get ¶
func (c *MovieCollectionShareClient) Get(ctx context.Context, id int) (*MovieCollectionShare, error)
Get returns a MovieCollectionShare entity by its id.
func (*MovieCollectionShareClient) GetX ¶
func (c *MovieCollectionShareClient) GetX(ctx context.Context, id int) *MovieCollectionShare
GetX is like Get, but panics if an error occurs.
func (*MovieCollectionShareClient) Hooks ¶
func (c *MovieCollectionShareClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MovieCollectionShareClient) Intercept ¶
func (c *MovieCollectionShareClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `moviecollectionshare.Intercept(f(g(h())))`.
func (*MovieCollectionShareClient) Interceptors ¶
func (c *MovieCollectionShareClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MovieCollectionShareClient) Query ¶
func (c *MovieCollectionShareClient) Query() *MovieCollectionShareQuery
Query returns a query builder for MovieCollectionShare.
func (*MovieCollectionShareClient) QueryMovieCollection ¶
func (c *MovieCollectionShareClient) QueryMovieCollection(mcs *MovieCollectionShare) *MovieCollectionQuery
QueryMovieCollection queries the movie_collection edge of a MovieCollectionShare.
func (*MovieCollectionShareClient) QueryUser ¶
func (c *MovieCollectionShareClient) QueryUser(mcs *MovieCollectionShare) *UserQuery
QueryUser queries the user edge of a MovieCollectionShare.
func (*MovieCollectionShareClient) Update ¶
func (c *MovieCollectionShareClient) Update() *MovieCollectionShareUpdate
Update returns an update builder for MovieCollectionShare.
func (*MovieCollectionShareClient) UpdateOne ¶
func (c *MovieCollectionShareClient) UpdateOne(mcs *MovieCollectionShare) *MovieCollectionShareUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MovieCollectionShareClient) UpdateOneID ¶
func (c *MovieCollectionShareClient) UpdateOneID(id int) *MovieCollectionShareUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MovieCollectionShareClient) Use ¶
func (c *MovieCollectionShareClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `moviecollectionshare.Hooks(f(g(h())))`.
type MovieCollectionShareCreate ¶
type MovieCollectionShareCreate struct {
// contains filtered or unexported fields
}
MovieCollectionShareCreate is the builder for creating a MovieCollectionShare entity.
func (*MovieCollectionShareCreate) Exec ¶
func (mcsc *MovieCollectionShareCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCollectionShareCreate) ExecX ¶
func (mcsc *MovieCollectionShareCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionShareCreate) Mutation ¶
func (mcsc *MovieCollectionShareCreate) Mutation() *MovieCollectionShareMutation
Mutation returns the MovieCollectionShareMutation object of the builder.
func (*MovieCollectionShareCreate) Save ¶
func (mcsc *MovieCollectionShareCreate) Save(ctx context.Context) (*MovieCollectionShare, error)
Save creates the MovieCollectionShare in the database.
func (*MovieCollectionShareCreate) SaveX ¶
func (mcsc *MovieCollectionShareCreate) SaveX(ctx context.Context) *MovieCollectionShare
SaveX calls Save and panics if Save returns an error.
func (*MovieCollectionShareCreate) SetCanEdit ¶
func (mcsc *MovieCollectionShareCreate) SetCanEdit(b bool) *MovieCollectionShareCreate
SetCanEdit sets the "can_edit" field.
func (*MovieCollectionShareCreate) SetCreatedAt ¶
func (mcsc *MovieCollectionShareCreate) SetCreatedAt(t time.Time) *MovieCollectionShareCreate
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionShareCreate) SetMovieCollection ¶
func (mcsc *MovieCollectionShareCreate) SetMovieCollection(m *MovieCollection) *MovieCollectionShareCreate
SetMovieCollection sets the "movie_collection" edge to the MovieCollection entity.
func (*MovieCollectionShareCreate) SetMovieCollectionID ¶
func (mcsc *MovieCollectionShareCreate) SetMovieCollectionID(id int) *MovieCollectionShareCreate
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID.
func (*MovieCollectionShareCreate) SetNillableCanEdit ¶
func (mcsc *MovieCollectionShareCreate) SetNillableCanEdit(b *bool) *MovieCollectionShareCreate
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*MovieCollectionShareCreate) SetNillableCreatedAt ¶
func (mcsc *MovieCollectionShareCreate) SetNillableCreatedAt(t *time.Time) *MovieCollectionShareCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieCollectionShareCreate) SetNillableMovieCollectionID ¶
func (mcsc *MovieCollectionShareCreate) SetNillableMovieCollectionID(id *int) *MovieCollectionShareCreate
SetNillableMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID if the given value is not nil.
func (*MovieCollectionShareCreate) SetNillableUserID ¶
func (mcsc *MovieCollectionShareCreate) SetNillableUserID(id *int) *MovieCollectionShareCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*MovieCollectionShareCreate) SetUser ¶
func (mcsc *MovieCollectionShareCreate) SetUser(u *User) *MovieCollectionShareCreate
SetUser sets the "user" edge to the User entity.
func (*MovieCollectionShareCreate) SetUserID ¶
func (mcsc *MovieCollectionShareCreate) SetUserID(id int) *MovieCollectionShareCreate
SetUserID sets the "user" edge to the User entity by ID.
type MovieCollectionShareCreateBulk ¶
type MovieCollectionShareCreateBulk struct {
// contains filtered or unexported fields
}
MovieCollectionShareCreateBulk is the builder for creating many MovieCollectionShare entities in bulk.
func (*MovieCollectionShareCreateBulk) Exec ¶
func (mcscb *MovieCollectionShareCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCollectionShareCreateBulk) ExecX ¶
func (mcscb *MovieCollectionShareCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionShareCreateBulk) Save ¶
func (mcscb *MovieCollectionShareCreateBulk) Save(ctx context.Context) ([]*MovieCollectionShare, error)
Save creates the MovieCollectionShare entities in the database.
func (*MovieCollectionShareCreateBulk) SaveX ¶
func (mcscb *MovieCollectionShareCreateBulk) SaveX(ctx context.Context) []*MovieCollectionShare
SaveX is like Save, but panics if an error occurs.
type MovieCollectionShareDelete ¶
type MovieCollectionShareDelete struct {
// contains filtered or unexported fields
}
MovieCollectionShareDelete is the builder for deleting a MovieCollectionShare entity.
func (*MovieCollectionShareDelete) Exec ¶
func (mcsd *MovieCollectionShareDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MovieCollectionShareDelete) ExecX ¶
func (mcsd *MovieCollectionShareDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionShareDelete) Where ¶
func (mcsd *MovieCollectionShareDelete) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareDelete
Where appends a list predicates to the MovieCollectionShareDelete builder.
type MovieCollectionShareDeleteOne ¶
type MovieCollectionShareDeleteOne struct {
// contains filtered or unexported fields
}
MovieCollectionShareDeleteOne is the builder for deleting a single MovieCollectionShare entity.
func (*MovieCollectionShareDeleteOne) Exec ¶
func (mcsdo *MovieCollectionShareDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MovieCollectionShareDeleteOne) ExecX ¶
func (mcsdo *MovieCollectionShareDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionShareDeleteOne) Where ¶
func (mcsdo *MovieCollectionShareDeleteOne) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareDeleteOne
Where appends a list predicates to the MovieCollectionShareDelete builder.
type MovieCollectionShareEdges ¶
type MovieCollectionShareEdges struct { User `json:"user,omitempty"` MovieCollection *MovieCollection `json:"movie_collection,omitempty"` // contains filtered or unexported fields }User *
MovieCollectionShareEdges holds the relations/edges for other nodes in the graph.
func (MovieCollectionShareEdges) MovieCollectionOrErr ¶
func (e MovieCollectionShareEdges) MovieCollectionOrErr() (*MovieCollection, error)
MovieCollectionOrErr returns the MovieCollection value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MovieCollectionShareEdges) UserOrErr ¶
func (e MovieCollectionShareEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MovieCollectionShareGroupBy ¶
type MovieCollectionShareGroupBy struct {
// contains filtered or unexported fields
}
MovieCollectionShareGroupBy is the group-by builder for MovieCollectionShare entities.
func (*MovieCollectionShareGroupBy) Aggregate ¶
func (mcsgb *MovieCollectionShareGroupBy) Aggregate(fns ...AggregateFunc) *MovieCollectionShareGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MovieCollectionShareGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*MovieCollectionShareGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MovieCollectionShareGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareGroupBy) Scan ¶
func (mcsgb *MovieCollectionShareGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MovieCollectionShareGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type MovieCollectionShareMutation ¶
type MovieCollectionShareMutation struct {
// contains filtered or unexported fields
}
MovieCollectionShareMutation represents an operation that mutates the MovieCollectionShare nodes in the graph.
func (*MovieCollectionShareMutation) AddField ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) AddedEdges ¶
func (m *MovieCollectionShareMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MovieCollectionShareMutation) AddedField ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) AddedFields ¶
func (m *MovieCollectionShareMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MovieCollectionShareMutation) AddedIDs ¶
func (m *MovieCollectionShareMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MovieCollectionShareMutation) CanEdit ¶
func (m *MovieCollectionShareMutation) CanEdit() (r bool, exists bool)
CanEdit returns the value of the "can_edit" field in the mutation.
func (*MovieCollectionShareMutation) ClearEdge ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) ClearField ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) ClearMovieCollection ¶
func (m *MovieCollectionShareMutation) ClearMovieCollection()
ClearMovieCollection clears the "movie_collection" edge to the MovieCollection entity.
func (*MovieCollectionShareMutation) ClearUser ¶
func (m *MovieCollectionShareMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*MovieCollectionShareMutation) ClearedEdges ¶
func (m *MovieCollectionShareMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MovieCollectionShareMutation) ClearedFields ¶
func (m *MovieCollectionShareMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MovieCollectionShareMutation) Client ¶
func (m MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) CreatedAt ¶
func (m *MovieCollectionShareMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MovieCollectionShareMutation) EdgeCleared ¶
func (m *MovieCollectionShareMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MovieCollectionShareMutation) Field ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) FieldCleared ¶
func (m *MovieCollectionShareMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MovieCollectionShareMutation) Fields ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) ID ¶
func (m *MovieCollectionShareMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MovieCollectionShareMutation) IDs ¶
func (m *MovieCollectionShareMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MovieCollectionShareMutation) MovieCollectionCleared ¶
func (m *MovieCollectionShareMutation) MovieCollectionCleared() bool
MovieCollectionCleared reports if the "movie_collection" edge to the MovieCollection entity was cleared.
func (*MovieCollectionShareMutation) MovieCollectionID ¶
func (m *MovieCollectionShareMutation) MovieCollectionID() (id int, exists bool)
MovieCollectionID returns the "movie_collection" edge ID in the mutation.
func (*MovieCollectionShareMutation) MovieCollectionIDs ¶
func (m *MovieCollectionShareMutation) MovieCollectionIDs() (ids []int)
MovieCollectionIDs returns the "movie_collection" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MovieCollectionID instead. It exists only for internal usage by the builders.
func (*MovieCollectionShareMutation) OldCanEdit ¶
func (m *MovieCollectionShareMutation) OldCanEdit(ctx context.Context) (v bool, err error)
OldCanEdit returns the old "can_edit" field's value of the MovieCollectionShare entity. If the MovieCollectionShare 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 (*MovieCollectionShareMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the MovieCollectionShare entity. If the MovieCollectionShare 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 (*MovieCollectionShareMutation) OldField ¶
func (m *MovieCollectionShareMutation) OldField(ctx context.Context, name string) (ent.Value, error)
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 (*MovieCollectionShareMutation) Op ¶
func (m *MovieCollectionShareMutation) Op() Op
Op returns the operation name.
func (*MovieCollectionShareMutation) RemovedEdges ¶
func (m *MovieCollectionShareMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MovieCollectionShareMutation) RemovedIDs ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) ResetCanEdit ¶
func (m *MovieCollectionShareMutation) ResetCanEdit()
ResetCanEdit resets all changes to the "can_edit" field.
func (*MovieCollectionShareMutation) ResetCreatedAt ¶
func (m *MovieCollectionShareMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MovieCollectionShareMutation) ResetEdge ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) ResetField ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) ResetMovieCollection ¶
func (m *MovieCollectionShareMutation) ResetMovieCollection()
ResetMovieCollection resets all changes to the "movie_collection" edge.
func (*MovieCollectionShareMutation) ResetUser ¶
func (m *MovieCollectionShareMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*MovieCollectionShareMutation) SetCanEdit ¶
func (m *MovieCollectionShareMutation) SetCanEdit(b bool)
SetCanEdit sets the "can_edit" field.
func (*MovieCollectionShareMutation) SetCreatedAt ¶
func (m *MovieCollectionShareMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionShareMutation) SetField ¶
func (m *MovieCollectionShareMutation) 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 (*MovieCollectionShareMutation) SetMovieCollectionID ¶
func (m *MovieCollectionShareMutation) SetMovieCollectionID(id int)
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by id.
func (*MovieCollectionShareMutation) SetOp ¶
func (m *MovieCollectionShareMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MovieCollectionShareMutation) SetUserID ¶
func (m *MovieCollectionShareMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (MovieCollectionShareMutation) Tx ¶
func (m MovieCollectionShareMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MovieCollectionShareMutation) Type ¶
func (m *MovieCollectionShareMutation) Type() string
Type returns the node type of this mutation (MovieCollectionShare).
func (*MovieCollectionShareMutation) UserCleared ¶
func (m *MovieCollectionShareMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*MovieCollectionShareMutation) UserID ¶
func (m *MovieCollectionShareMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*MovieCollectionShareMutation) UserIDs ¶
func (m *MovieCollectionShareMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*MovieCollectionShareMutation) Where ¶
func (m *MovieCollectionShareMutation) Where(ps ...predicate.MovieCollectionShare)
Where appends a list predicates to the MovieCollectionShareMutation builder.
func (*MovieCollectionShareMutation) WhereP ¶
func (m *MovieCollectionShareMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MovieCollectionShareMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MovieCollectionShareQuery ¶
type MovieCollectionShareQuery struct {
// contains filtered or unexported fields
}
MovieCollectionShareQuery is the builder for querying MovieCollectionShare entities.
func (*MovieCollectionShareQuery) Aggregate ¶
func (mcsq *MovieCollectionShareQuery) Aggregate(fns ...AggregateFunc) *MovieCollectionShareSelect
Aggregate returns a MovieCollectionShareSelect configured with the given aggregations.
func (*MovieCollectionShareQuery) All ¶
func (mcsq *MovieCollectionShareQuery) All(ctx context.Context) ([]*MovieCollectionShare, error)
All executes the query and returns a list of MovieCollectionShares.
func (*MovieCollectionShareQuery) AllX ¶
func (mcsq *MovieCollectionShareQuery) AllX(ctx context.Context) []*MovieCollectionShare
AllX is like All, but panics if an error occurs.
func (*MovieCollectionShareQuery) Clone ¶
func (mcsq *MovieCollectionShareQuery) Clone() *MovieCollectionShareQuery
Clone returns a duplicate of the MovieCollectionShareQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MovieCollectionShareQuery) Count ¶
func (mcsq *MovieCollectionShareQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MovieCollectionShareQuery) CountX ¶
func (mcsq *MovieCollectionShareQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MovieCollectionShareQuery) Exist ¶
func (mcsq *MovieCollectionShareQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MovieCollectionShareQuery) ExistX ¶
func (mcsq *MovieCollectionShareQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MovieCollectionShareQuery) First ¶
func (mcsq *MovieCollectionShareQuery) First(ctx context.Context) (*MovieCollectionShare, error)
First returns the first MovieCollectionShare entity from the query. Returns a *NotFoundError when no MovieCollectionShare was found.
func (*MovieCollectionShareQuery) FirstID ¶
func (mcsq *MovieCollectionShareQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first MovieCollectionShare ID from the query. Returns a *NotFoundError when no MovieCollectionShare ID was found.
func (*MovieCollectionShareQuery) FirstIDX ¶
func (mcsq *MovieCollectionShareQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MovieCollectionShareQuery) FirstX ¶
func (mcsq *MovieCollectionShareQuery) FirstX(ctx context.Context) *MovieCollectionShare
FirstX is like First, but panics if an error occurs.
func (*MovieCollectionShareQuery) GroupBy ¶
func (mcsq *MovieCollectionShareQuery) GroupBy(field string, fields ...string) *MovieCollectionShareGroupBy
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 { CanEdit bool `json:"can_edit,omitempty"` Count int `json:"count,omitempty"` } client.MovieCollectionShare.Query(). GroupBy(moviecollectionshare.FieldCanEdit). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MovieCollectionShareQuery) IDs ¶
func (mcsq *MovieCollectionShareQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of MovieCollectionShare IDs.
func (*MovieCollectionShareQuery) IDsX ¶
func (mcsq *MovieCollectionShareQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MovieCollectionShareQuery) Limit ¶
func (mcsq *MovieCollectionShareQuery) Limit(limit int) *MovieCollectionShareQuery
Limit the number of records to be returned by this query.
func (*MovieCollectionShareQuery) Offset ¶
func (mcsq *MovieCollectionShareQuery) Offset(offset int) *MovieCollectionShareQuery
Offset to start from.
func (*MovieCollectionShareQuery) Only ¶
func (mcsq *MovieCollectionShareQuery) Only(ctx context.Context) (*MovieCollectionShare, error)
Only returns a single MovieCollectionShare entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MovieCollectionShare entity is found. Returns a *NotFoundError when no MovieCollectionShare entities are found.
func (*MovieCollectionShareQuery) OnlyID ¶
func (mcsq *MovieCollectionShareQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only MovieCollectionShare ID in the query. Returns a *NotSingularError when more than one MovieCollectionShare ID is found. Returns a *NotFoundError when no entities are found.
func (*MovieCollectionShareQuery) OnlyIDX ¶
func (mcsq *MovieCollectionShareQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MovieCollectionShareQuery) OnlyX ¶
func (mcsq *MovieCollectionShareQuery) OnlyX(ctx context.Context) *MovieCollectionShare
OnlyX is like Only, but panics if an error occurs.
func (*MovieCollectionShareQuery) Order ¶
func (mcsq *MovieCollectionShareQuery) Order(o ...moviecollectionshare.OrderOption) *MovieCollectionShareQuery
Order specifies how the records should be ordered.
func (*MovieCollectionShareQuery) QueryMovieCollection ¶
func (mcsq *MovieCollectionShareQuery) QueryMovieCollection() *MovieCollectionQuery
QueryMovieCollection chains the current query on the "movie_collection" edge.
func (*MovieCollectionShareQuery) QueryUser ¶
func (mcsq *MovieCollectionShareQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*MovieCollectionShareQuery) Select ¶
func (mcsq *MovieCollectionShareQuery) Select(fields ...string) *MovieCollectionShareSelect
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 { CanEdit bool `json:"can_edit,omitempty"` } client.MovieCollectionShare.Query(). Select(moviecollectionshare.FieldCanEdit). Scan(ctx, &v)
func (*MovieCollectionShareQuery) Unique ¶
func (mcsq *MovieCollectionShareQuery) Unique(unique bool) *MovieCollectionShareQuery
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 (*MovieCollectionShareQuery) Where ¶
func (mcsq *MovieCollectionShareQuery) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareQuery
Where adds a new predicate for the MovieCollectionShareQuery builder.
func (*MovieCollectionShareQuery) WithMovieCollection ¶
func (mcsq *MovieCollectionShareQuery) WithMovieCollection(opts ...func(*MovieCollectionQuery)) *MovieCollectionShareQuery
WithMovieCollection tells the query-builder to eager-load the nodes that are connected to the "movie_collection" edge. The optional arguments are used to configure the query builder of the edge.
func (*MovieCollectionShareQuery) WithUser ¶
func (mcsq *MovieCollectionShareQuery) WithUser(opts ...func(*UserQuery)) *MovieCollectionShareQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type MovieCollectionShareSelect ¶
type MovieCollectionShareSelect struct { // contains filtered or unexported fields }
MovieCollectionShareSelect is the builder for selecting fields of MovieCollectionShare entities.
func (*MovieCollectionShareSelect) Aggregate ¶
func (mcss *MovieCollectionShareSelect) Aggregate(fns ...AggregateFunc) *MovieCollectionShareSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MovieCollectionShareSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*MovieCollectionShareSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MovieCollectionShareSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MovieCollectionShareSelect) Scan ¶
func (mcss *MovieCollectionShareSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MovieCollectionShareSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MovieCollectionShareUpdate ¶
type MovieCollectionShareUpdate struct {
// contains filtered or unexported fields
}
MovieCollectionShareUpdate is the builder for updating MovieCollectionShare entities.
func (*MovieCollectionShareUpdate) ClearMovieCollection ¶
func (mcsu *MovieCollectionShareUpdate) ClearMovieCollection() *MovieCollectionShareUpdate
ClearMovieCollection clears the "movie_collection" edge to the MovieCollection entity.
func (*MovieCollectionShareUpdate) ClearUser ¶
func (mcsu *MovieCollectionShareUpdate) ClearUser() *MovieCollectionShareUpdate
ClearUser clears the "user" edge to the User entity.
func (*MovieCollectionShareUpdate) Exec ¶
func (mcsu *MovieCollectionShareUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCollectionShareUpdate) ExecX ¶
func (mcsu *MovieCollectionShareUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionShareUpdate) Mutation ¶
func (mcsu *MovieCollectionShareUpdate) Mutation() *MovieCollectionShareMutation
Mutation returns the MovieCollectionShareMutation object of the builder.
func (*MovieCollectionShareUpdate) Save ¶
func (mcsu *MovieCollectionShareUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MovieCollectionShareUpdate) SaveX ¶
func (mcsu *MovieCollectionShareUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MovieCollectionShareUpdate) SetCanEdit ¶
func (mcsu *MovieCollectionShareUpdate) SetCanEdit(b bool) *MovieCollectionShareUpdate
SetCanEdit sets the "can_edit" field.
func (*MovieCollectionShareUpdate) SetCreatedAt ¶
func (mcsu *MovieCollectionShareUpdate) SetCreatedAt(t time.Time) *MovieCollectionShareUpdate
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionShareUpdate) SetMovieCollection ¶
func (mcsu *MovieCollectionShareUpdate) SetMovieCollection(m *MovieCollection) *MovieCollectionShareUpdate
SetMovieCollection sets the "movie_collection" edge to the MovieCollection entity.
func (*MovieCollectionShareUpdate) SetMovieCollectionID ¶
func (mcsu *MovieCollectionShareUpdate) SetMovieCollectionID(id int) *MovieCollectionShareUpdate
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID.
func (*MovieCollectionShareUpdate) SetNillableCanEdit ¶
func (mcsu *MovieCollectionShareUpdate) SetNillableCanEdit(b *bool) *MovieCollectionShareUpdate
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*MovieCollectionShareUpdate) SetNillableCreatedAt ¶
func (mcsu *MovieCollectionShareUpdate) SetNillableCreatedAt(t *time.Time) *MovieCollectionShareUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieCollectionShareUpdate) SetNillableMovieCollectionID ¶
func (mcsu *MovieCollectionShareUpdate) SetNillableMovieCollectionID(id *int) *MovieCollectionShareUpdate
SetNillableMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID if the given value is not nil.
func (*MovieCollectionShareUpdate) SetNillableUserID ¶
func (mcsu *MovieCollectionShareUpdate) SetNillableUserID(id *int) *MovieCollectionShareUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*MovieCollectionShareUpdate) SetUser ¶
func (mcsu *MovieCollectionShareUpdate) SetUser(u *User) *MovieCollectionShareUpdate
SetUser sets the "user" edge to the User entity.
func (*MovieCollectionShareUpdate) SetUserID ¶
func (mcsu *MovieCollectionShareUpdate) SetUserID(id int) *MovieCollectionShareUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*MovieCollectionShareUpdate) Where ¶
func (mcsu *MovieCollectionShareUpdate) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareUpdate
Where appends a list predicates to the MovieCollectionShareUpdate builder.
type MovieCollectionShareUpdateOne ¶
type MovieCollectionShareUpdateOne struct {
// contains filtered or unexported fields
}
MovieCollectionShareUpdateOne is the builder for updating a single MovieCollectionShare entity.
func (*MovieCollectionShareUpdateOne) ClearMovieCollection ¶
func (mcsuo *MovieCollectionShareUpdateOne) ClearMovieCollection() *MovieCollectionShareUpdateOne
ClearMovieCollection clears the "movie_collection" edge to the MovieCollection entity.
func (*MovieCollectionShareUpdateOne) ClearUser ¶
func (mcsuo *MovieCollectionShareUpdateOne) ClearUser() *MovieCollectionShareUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*MovieCollectionShareUpdateOne) Exec ¶
func (mcsuo *MovieCollectionShareUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MovieCollectionShareUpdateOne) ExecX ¶
func (mcsuo *MovieCollectionShareUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionShareUpdateOne) Mutation ¶
func (mcsuo *MovieCollectionShareUpdateOne) Mutation() *MovieCollectionShareMutation
Mutation returns the MovieCollectionShareMutation object of the builder.
func (*MovieCollectionShareUpdateOne) Save ¶
func (mcsuo *MovieCollectionShareUpdateOne) Save(ctx context.Context) (*MovieCollectionShare, error)
Save executes the query and returns the updated MovieCollectionShare entity.
func (*MovieCollectionShareUpdateOne) SaveX ¶
func (mcsuo *MovieCollectionShareUpdateOne) SaveX(ctx context.Context) *MovieCollectionShare
SaveX is like Save, but panics if an error occurs.
func (*MovieCollectionShareUpdateOne) Select ¶
func (mcsuo *MovieCollectionShareUpdateOne) Select(field string, fields ...string) *MovieCollectionShareUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MovieCollectionShareUpdateOne) SetCanEdit ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetCanEdit(b bool) *MovieCollectionShareUpdateOne
SetCanEdit sets the "can_edit" field.
func (*MovieCollectionShareUpdateOne) SetCreatedAt ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetCreatedAt(t time.Time) *MovieCollectionShareUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionShareUpdateOne) SetMovieCollection ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetMovieCollection(m *MovieCollection) *MovieCollectionShareUpdateOne
SetMovieCollection sets the "movie_collection" edge to the MovieCollection entity.
func (*MovieCollectionShareUpdateOne) SetMovieCollectionID ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetMovieCollectionID(id int) *MovieCollectionShareUpdateOne
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID.
func (*MovieCollectionShareUpdateOne) SetNillableCanEdit ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetNillableCanEdit(b *bool) *MovieCollectionShareUpdateOne
SetNillableCanEdit sets the "can_edit" field if the given value is not nil.
func (*MovieCollectionShareUpdateOne) SetNillableCreatedAt ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetNillableCreatedAt(t *time.Time) *MovieCollectionShareUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieCollectionShareUpdateOne) SetNillableMovieCollectionID ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetNillableMovieCollectionID(id *int) *MovieCollectionShareUpdateOne
SetNillableMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID if the given value is not nil.
func (*MovieCollectionShareUpdateOne) SetNillableUserID ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetNillableUserID(id *int) *MovieCollectionShareUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*MovieCollectionShareUpdateOne) SetUser ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetUser(u *User) *MovieCollectionShareUpdateOne
SetUser sets the "user" edge to the User entity.
func (*MovieCollectionShareUpdateOne) SetUserID ¶
func (mcsuo *MovieCollectionShareUpdateOne) SetUserID(id int) *MovieCollectionShareUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*MovieCollectionShareUpdateOne) Where ¶
func (mcsuo *MovieCollectionShareUpdateOne) Where(ps ...predicate.MovieCollectionShare) *MovieCollectionShareUpdateOne
Where appends a list predicates to the MovieCollectionShareUpdate builder.
type MovieCollectionShares ¶
type MovieCollectionShares []*MovieCollectionShare
MovieCollectionShares is a parsable slice of MovieCollectionShare.
type MovieCollectionUpdate ¶
type MovieCollectionUpdate struct {
// contains filtered or unexported fields
}
MovieCollectionUpdate is the builder for updating MovieCollection entities.
func (*MovieCollectionUpdate) AddMovieCollectionShareIDs ¶
func (mcu *MovieCollectionUpdate) AddMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdate
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*MovieCollectionUpdate) AddMovieCollectionShares ¶
func (mcu *MovieCollectionUpdate) AddMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdate
AddMovieCollectionShares adds the "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*MovieCollectionUpdate) AddMovieIDs ¶
func (mcu *MovieCollectionUpdate) AddMovieIDs(ids ...int) *MovieCollectionUpdate
AddMovieIDs adds the "movies" edge to the Movie entity by IDs.
func (*MovieCollectionUpdate) AddMovies ¶
func (mcu *MovieCollectionUpdate) AddMovies(m ...*Movie) *MovieCollectionUpdate
AddMovies adds the "movies" edges to the Movie entity.
func (*MovieCollectionUpdate) ClearMovieCollectionShares ¶
func (mcu *MovieCollectionUpdate) ClearMovieCollectionShares() *MovieCollectionUpdate
ClearMovieCollectionShares clears all "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*MovieCollectionUpdate) ClearMovies ¶
func (mcu *MovieCollectionUpdate) ClearMovies() *MovieCollectionUpdate
ClearMovies clears all "movies" edges to the Movie entity.
func (*MovieCollectionUpdate) ClearOwner ¶
func (mcu *MovieCollectionUpdate) ClearOwner() *MovieCollectionUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*MovieCollectionUpdate) Exec ¶
func (mcu *MovieCollectionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCollectionUpdate) ExecX ¶
func (mcu *MovieCollectionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionUpdate) Mutation ¶
func (mcu *MovieCollectionUpdate) Mutation() *MovieCollectionMutation
Mutation returns the MovieCollectionMutation object of the builder.
func (*MovieCollectionUpdate) RemoveMovieCollectionShareIDs ¶
func (mcu *MovieCollectionUpdate) RemoveMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdate
RemoveMovieCollectionShareIDs removes the "movie_collection_shares" edge to MovieCollectionShare entities by IDs.
func (*MovieCollectionUpdate) RemoveMovieCollectionShares ¶
func (mcu *MovieCollectionUpdate) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdate
RemoveMovieCollectionShares removes "movie_collection_shares" edges to MovieCollectionShare entities.
func (*MovieCollectionUpdate) RemoveMovieIDs ¶
func (mcu *MovieCollectionUpdate) RemoveMovieIDs(ids ...int) *MovieCollectionUpdate
RemoveMovieIDs removes the "movies" edge to Movie entities by IDs.
func (*MovieCollectionUpdate) RemoveMovies ¶
func (mcu *MovieCollectionUpdate) RemoveMovies(m ...*Movie) *MovieCollectionUpdate
RemoveMovies removes "movies" edges to Movie entities.
func (*MovieCollectionUpdate) Save ¶
func (mcu *MovieCollectionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MovieCollectionUpdate) SaveX ¶
func (mcu *MovieCollectionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MovieCollectionUpdate) SetCreatedAt ¶
func (mcu *MovieCollectionUpdate) SetCreatedAt(t time.Time) *MovieCollectionUpdate
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionUpdate) SetName ¶
func (mcu *MovieCollectionUpdate) SetName(s string) *MovieCollectionUpdate
SetName sets the "name" field.
func (*MovieCollectionUpdate) SetNillableCreatedAt ¶
func (mcu *MovieCollectionUpdate) SetNillableCreatedAt(t *time.Time) *MovieCollectionUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieCollectionUpdate) SetNillableName ¶
func (mcu *MovieCollectionUpdate) SetNillableName(s *string) *MovieCollectionUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*MovieCollectionUpdate) SetNillableNote ¶
func (mcu *MovieCollectionUpdate) SetNillableNote(s *string) *MovieCollectionUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*MovieCollectionUpdate) SetNillableOwnerID ¶
func (mcu *MovieCollectionUpdate) SetNillableOwnerID(id *int) *MovieCollectionUpdate
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*MovieCollectionUpdate) SetNillableShowWatched ¶
func (mcu *MovieCollectionUpdate) SetNillableShowWatched(b *bool) *MovieCollectionUpdate
SetNillableShowWatched sets the "show_watched" field if the given value is not nil.
func (*MovieCollectionUpdate) SetNote ¶
func (mcu *MovieCollectionUpdate) SetNote(s string) *MovieCollectionUpdate
SetNote sets the "note" field.
func (*MovieCollectionUpdate) SetOwner ¶
func (mcu *MovieCollectionUpdate) SetOwner(u *User) *MovieCollectionUpdate
SetOwner sets the "owner" edge to the User entity.
func (*MovieCollectionUpdate) SetOwnerID ¶
func (mcu *MovieCollectionUpdate) SetOwnerID(id int) *MovieCollectionUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*MovieCollectionUpdate) SetShowWatched ¶
func (mcu *MovieCollectionUpdate) SetShowWatched(b bool) *MovieCollectionUpdate
SetShowWatched sets the "show_watched" field.
func (*MovieCollectionUpdate) Where ¶
func (mcu *MovieCollectionUpdate) Where(ps ...predicate.MovieCollection) *MovieCollectionUpdate
Where appends a list predicates to the MovieCollectionUpdate builder.
type MovieCollectionUpdateOne ¶
type MovieCollectionUpdateOne struct {
// contains filtered or unexported fields
}
MovieCollectionUpdateOne is the builder for updating a single MovieCollection entity.
func (*MovieCollectionUpdateOne) AddMovieCollectionShareIDs ¶
func (mcuo *MovieCollectionUpdateOne) AddMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdateOne
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*MovieCollectionUpdateOne) AddMovieCollectionShares ¶
func (mcuo *MovieCollectionUpdateOne) AddMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdateOne
AddMovieCollectionShares adds the "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*MovieCollectionUpdateOne) AddMovieIDs ¶
func (mcuo *MovieCollectionUpdateOne) AddMovieIDs(ids ...int) *MovieCollectionUpdateOne
AddMovieIDs adds the "movies" edge to the Movie entity by IDs.
func (*MovieCollectionUpdateOne) AddMovies ¶
func (mcuo *MovieCollectionUpdateOne) AddMovies(m ...*Movie) *MovieCollectionUpdateOne
AddMovies adds the "movies" edges to the Movie entity.
func (*MovieCollectionUpdateOne) ClearMovieCollectionShares ¶
func (mcuo *MovieCollectionUpdateOne) ClearMovieCollectionShares() *MovieCollectionUpdateOne
ClearMovieCollectionShares clears all "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*MovieCollectionUpdateOne) ClearMovies ¶
func (mcuo *MovieCollectionUpdateOne) ClearMovies() *MovieCollectionUpdateOne
ClearMovies clears all "movies" edges to the Movie entity.
func (*MovieCollectionUpdateOne) ClearOwner ¶
func (mcuo *MovieCollectionUpdateOne) ClearOwner() *MovieCollectionUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*MovieCollectionUpdateOne) Exec ¶
func (mcuo *MovieCollectionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MovieCollectionUpdateOne) ExecX ¶
func (mcuo *MovieCollectionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCollectionUpdateOne) Mutation ¶
func (mcuo *MovieCollectionUpdateOne) Mutation() *MovieCollectionMutation
Mutation returns the MovieCollectionMutation object of the builder.
func (*MovieCollectionUpdateOne) RemoveMovieCollectionShareIDs ¶
func (mcuo *MovieCollectionUpdateOne) RemoveMovieCollectionShareIDs(ids ...int) *MovieCollectionUpdateOne
RemoveMovieCollectionShareIDs removes the "movie_collection_shares" edge to MovieCollectionShare entities by IDs.
func (*MovieCollectionUpdateOne) RemoveMovieCollectionShares ¶
func (mcuo *MovieCollectionUpdateOne) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *MovieCollectionUpdateOne
RemoveMovieCollectionShares removes "movie_collection_shares" edges to MovieCollectionShare entities.
func (*MovieCollectionUpdateOne) RemoveMovieIDs ¶
func (mcuo *MovieCollectionUpdateOne) RemoveMovieIDs(ids ...int) *MovieCollectionUpdateOne
RemoveMovieIDs removes the "movies" edge to Movie entities by IDs.
func (*MovieCollectionUpdateOne) RemoveMovies ¶
func (mcuo *MovieCollectionUpdateOne) RemoveMovies(m ...*Movie) *MovieCollectionUpdateOne
RemoveMovies removes "movies" edges to Movie entities.
func (*MovieCollectionUpdateOne) Save ¶
func (mcuo *MovieCollectionUpdateOne) Save(ctx context.Context) (*MovieCollection, error)
Save executes the query and returns the updated MovieCollection entity.
func (*MovieCollectionUpdateOne) SaveX ¶
func (mcuo *MovieCollectionUpdateOne) SaveX(ctx context.Context) *MovieCollection
SaveX is like Save, but panics if an error occurs.
func (*MovieCollectionUpdateOne) Select ¶
func (mcuo *MovieCollectionUpdateOne) Select(field string, fields ...string) *MovieCollectionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MovieCollectionUpdateOne) SetCreatedAt ¶
func (mcuo *MovieCollectionUpdateOne) SetCreatedAt(t time.Time) *MovieCollectionUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MovieCollectionUpdateOne) SetName ¶
func (mcuo *MovieCollectionUpdateOne) SetName(s string) *MovieCollectionUpdateOne
SetName sets the "name" field.
func (*MovieCollectionUpdateOne) SetNillableCreatedAt ¶
func (mcuo *MovieCollectionUpdateOne) SetNillableCreatedAt(t *time.Time) *MovieCollectionUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieCollectionUpdateOne) SetNillableName ¶
func (mcuo *MovieCollectionUpdateOne) SetNillableName(s *string) *MovieCollectionUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*MovieCollectionUpdateOne) SetNillableNote ¶
func (mcuo *MovieCollectionUpdateOne) SetNillableNote(s *string) *MovieCollectionUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*MovieCollectionUpdateOne) SetNillableOwnerID ¶
func (mcuo *MovieCollectionUpdateOne) SetNillableOwnerID(id *int) *MovieCollectionUpdateOne
SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.
func (*MovieCollectionUpdateOne) SetNillableShowWatched ¶
func (mcuo *MovieCollectionUpdateOne) SetNillableShowWatched(b *bool) *MovieCollectionUpdateOne
SetNillableShowWatched sets the "show_watched" field if the given value is not nil.
func (*MovieCollectionUpdateOne) SetNote ¶
func (mcuo *MovieCollectionUpdateOne) SetNote(s string) *MovieCollectionUpdateOne
SetNote sets the "note" field.
func (*MovieCollectionUpdateOne) SetOwner ¶
func (mcuo *MovieCollectionUpdateOne) SetOwner(u *User) *MovieCollectionUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*MovieCollectionUpdateOne) SetOwnerID ¶
func (mcuo *MovieCollectionUpdateOne) SetOwnerID(id int) *MovieCollectionUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*MovieCollectionUpdateOne) SetShowWatched ¶
func (mcuo *MovieCollectionUpdateOne) SetShowWatched(b bool) *MovieCollectionUpdateOne
SetShowWatched sets the "show_watched" field.
func (*MovieCollectionUpdateOne) Where ¶
func (mcuo *MovieCollectionUpdateOne) Where(ps ...predicate.MovieCollection) *MovieCollectionUpdateOne
Where appends a list predicates to the MovieCollectionUpdate builder.
type MovieCollections ¶
type MovieCollections []*MovieCollection
MovieCollections is a parsable slice of MovieCollection.
type MovieCreate ¶
type MovieCreate struct {
// contains filtered or unexported fields
}
MovieCreate is the builder for creating a Movie entity.
func (*MovieCreate) Exec ¶
func (mc *MovieCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCreate) ExecX ¶
func (mc *MovieCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieCreate) Mutation ¶
func (mc *MovieCreate) Mutation() *MovieMutation
Mutation returns the MovieMutation object of the builder.
func (*MovieCreate) Save ¶
func (mc *MovieCreate) Save(ctx context.Context) (*Movie, error)
Save creates the Movie in the database.
func (*MovieCreate) SaveX ¶
func (mc *MovieCreate) SaveX(ctx context.Context) *Movie
SaveX calls Save and panics if Save returns an error.
func (*MovieCreate) SetCreatedAt ¶
func (mc *MovieCreate) SetCreatedAt(t time.Time) *MovieCreate
SetCreatedAt sets the "created_at" field.
func (*MovieCreate) SetMovieCollection ¶
func (mc *MovieCreate) SetMovieCollection(m *MovieCollection) *MovieCreate
SetMovieCollection sets the "movie_collection" edge to the MovieCollection entity.
func (*MovieCreate) SetMovieCollectionID ¶
func (mc *MovieCreate) SetMovieCollectionID(id int) *MovieCreate
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID.
func (*MovieCreate) SetName ¶
func (mc *MovieCreate) SetName(s string) *MovieCreate
SetName sets the "name" field.
func (*MovieCreate) SetNillableCreatedAt ¶
func (mc *MovieCreate) SetNillableCreatedAt(t *time.Time) *MovieCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieCreate) SetNillableMovieCollectionID ¶
func (mc *MovieCreate) SetNillableMovieCollectionID(id *int) *MovieCreate
SetNillableMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID if the given value is not nil.
func (*MovieCreate) SetNillableNote ¶
func (mc *MovieCreate) SetNillableNote(s *string) *MovieCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*MovieCreate) SetNillableWatched ¶
func (mc *MovieCreate) SetNillableWatched(b *bool) *MovieCreate
SetNillableWatched sets the "watched" field if the given value is not nil.
func (*MovieCreate) SetNote ¶
func (mc *MovieCreate) SetNote(s string) *MovieCreate
SetNote sets the "note" field.
func (*MovieCreate) SetWatched ¶
func (mc *MovieCreate) SetWatched(b bool) *MovieCreate
SetWatched sets the "watched" field.
type MovieCreateBulk ¶
type MovieCreateBulk struct {
// contains filtered or unexported fields
}
MovieCreateBulk is the builder for creating many Movie entities in bulk.
func (*MovieCreateBulk) Exec ¶
func (mcb *MovieCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieCreateBulk) ExecX ¶
func (mcb *MovieCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MovieDelete ¶
type MovieDelete struct {
// contains filtered or unexported fields
}
MovieDelete is the builder for deleting a Movie entity.
func (*MovieDelete) Exec ¶
func (md *MovieDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MovieDelete) ExecX ¶
func (md *MovieDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MovieDelete) Where ¶
func (md *MovieDelete) Where(ps ...predicate.Movie) *MovieDelete
Where appends a list predicates to the MovieDelete builder.
type MovieDeleteOne ¶
type MovieDeleteOne struct {
// contains filtered or unexported fields
}
MovieDeleteOne is the builder for deleting a single Movie entity.
func (*MovieDeleteOne) Exec ¶
func (mdo *MovieDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MovieDeleteOne) ExecX ¶
func (mdo *MovieDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieDeleteOne) Where ¶
func (mdo *MovieDeleteOne) Where(ps ...predicate.Movie) *MovieDeleteOne
Where appends a list predicates to the MovieDelete builder.
type MovieEdges ¶
type MovieEdges struct { // MovieCollection holds the value of the movie_collection edge. MovieCollection *MovieCollection `json:"movie_collection,omitempty"` // contains filtered or unexported fields }
MovieEdges holds the relations/edges for other nodes in the graph.
func (MovieEdges) MovieCollectionOrErr ¶
func (e MovieEdges) MovieCollectionOrErr() (*MovieCollection, error)
MovieCollectionOrErr returns the MovieCollection value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MovieGroupBy ¶
type MovieGroupBy struct {
// contains filtered or unexported fields
}
MovieGroupBy is the group-by builder for Movie entities.
func (*MovieGroupBy) Aggregate ¶
func (mgb *MovieGroupBy) Aggregate(fns ...AggregateFunc) *MovieGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MovieGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MovieGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MovieGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MovieGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MovieGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MovieGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MovieGroupBy) Scan ¶
func (mgb *MovieGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MovieGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MovieMutation ¶
type MovieMutation struct {
// contains filtered or unexported fields
}
MovieMutation represents an operation that mutates the Movie nodes in the graph.
func (*MovieMutation) AddField ¶
func (m *MovieMutation) 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 (*MovieMutation) AddedEdges ¶
func (m *MovieMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MovieMutation) AddedField ¶
func (m *MovieMutation) 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 (*MovieMutation) AddedFields ¶
func (m *MovieMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MovieMutation) AddedIDs ¶
func (m *MovieMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MovieMutation) ClearEdge ¶
func (m *MovieMutation) 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 (*MovieMutation) ClearField ¶
func (m *MovieMutation) 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 (*MovieMutation) ClearMovieCollection ¶
func (m *MovieMutation) ClearMovieCollection()
ClearMovieCollection clears the "movie_collection" edge to the MovieCollection entity.
func (*MovieMutation) ClearedEdges ¶
func (m *MovieMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MovieMutation) ClearedFields ¶
func (m *MovieMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MovieMutation) Client ¶
func (m MovieMutation) 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 (*MovieMutation) CreatedAt ¶
func (m *MovieMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MovieMutation) EdgeCleared ¶
func (m *MovieMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MovieMutation) Field ¶
func (m *MovieMutation) 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 (*MovieMutation) FieldCleared ¶
func (m *MovieMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MovieMutation) Fields ¶
func (m *MovieMutation) 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 (*MovieMutation) ID ¶
func (m *MovieMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MovieMutation) IDs ¶
func (m *MovieMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MovieMutation) MovieCollectionCleared ¶
func (m *MovieMutation) MovieCollectionCleared() bool
MovieCollectionCleared reports if the "movie_collection" edge to the MovieCollection entity was cleared.
func (*MovieMutation) MovieCollectionID ¶
func (m *MovieMutation) MovieCollectionID() (id int, exists bool)
MovieCollectionID returns the "movie_collection" edge ID in the mutation.
func (*MovieMutation) MovieCollectionIDs ¶
func (m *MovieMutation) MovieCollectionIDs() (ids []int)
MovieCollectionIDs returns the "movie_collection" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MovieCollectionID instead. It exists only for internal usage by the builders.
func (*MovieMutation) Name ¶
func (m *MovieMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*MovieMutation) Note ¶
func (m *MovieMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*MovieMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Movie entity. If the Movie 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 (*MovieMutation) 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 (*MovieMutation) OldName ¶
func (m *MovieMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Movie entity. If the Movie 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 (*MovieMutation) OldNote ¶
func (m *MovieMutation) OldNote(ctx context.Context) (v string, err error)
OldNote returns the old "note" field's value of the Movie entity. If the Movie 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 (*MovieMutation) OldWatched ¶
func (m *MovieMutation) OldWatched(ctx context.Context) (v bool, err error)
OldWatched returns the old "watched" field's value of the Movie entity. If the Movie 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 (*MovieMutation) RemovedEdges ¶
func (m *MovieMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MovieMutation) RemovedIDs ¶
func (m *MovieMutation) 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 (*MovieMutation) ResetCreatedAt ¶
func (m *MovieMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MovieMutation) ResetEdge ¶
func (m *MovieMutation) 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 (*MovieMutation) ResetField ¶
func (m *MovieMutation) 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 (*MovieMutation) ResetMovieCollection ¶
func (m *MovieMutation) ResetMovieCollection()
ResetMovieCollection resets all changes to the "movie_collection" edge.
func (*MovieMutation) ResetName ¶
func (m *MovieMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*MovieMutation) ResetNote ¶
func (m *MovieMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*MovieMutation) ResetWatched ¶
func (m *MovieMutation) ResetWatched()
ResetWatched resets all changes to the "watched" field.
func (*MovieMutation) SetCreatedAt ¶
func (m *MovieMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MovieMutation) SetField ¶
func (m *MovieMutation) 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 (*MovieMutation) SetMovieCollectionID ¶
func (m *MovieMutation) SetMovieCollectionID(id int)
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by id.
func (*MovieMutation) SetName ¶
func (m *MovieMutation) SetName(s string)
SetName sets the "name" field.
func (*MovieMutation) SetNote ¶
func (m *MovieMutation) SetNote(s string)
SetNote sets the "note" field.
func (*MovieMutation) SetOp ¶
func (m *MovieMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MovieMutation) SetWatched ¶
func (m *MovieMutation) SetWatched(b bool)
SetWatched sets the "watched" field.
func (MovieMutation) Tx ¶
func (m MovieMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MovieMutation) Type ¶
func (m *MovieMutation) Type() string
Type returns the node type of this mutation (Movie).
func (*MovieMutation) Watched ¶
func (m *MovieMutation) Watched() (r bool, exists bool)
Watched returns the value of the "watched" field in the mutation.
func (*MovieMutation) Where ¶
func (m *MovieMutation) Where(ps ...predicate.Movie)
Where appends a list predicates to the MovieMutation builder.
func (*MovieMutation) WhereP ¶
func (m *MovieMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MovieMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MovieQuery ¶
type MovieQuery struct {
// contains filtered or unexported fields
}
MovieQuery is the builder for querying Movie entities.
func (*MovieQuery) Aggregate ¶
func (mq *MovieQuery) Aggregate(fns ...AggregateFunc) *MovieSelect
Aggregate returns a MovieSelect configured with the given aggregations.
func (*MovieQuery) All ¶
func (mq *MovieQuery) All(ctx context.Context) ([]*Movie, error)
All executes the query and returns a list of Movies.
func (*MovieQuery) AllX ¶
func (mq *MovieQuery) AllX(ctx context.Context) []*Movie
AllX is like All, but panics if an error occurs.
func (*MovieQuery) Clone ¶
func (mq *MovieQuery) Clone() *MovieQuery
Clone returns a duplicate of the MovieQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MovieQuery) Count ¶
func (mq *MovieQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MovieQuery) CountX ¶
func (mq *MovieQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MovieQuery) Exist ¶
func (mq *MovieQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MovieQuery) ExistX ¶
func (mq *MovieQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MovieQuery) First ¶
func (mq *MovieQuery) First(ctx context.Context) (*Movie, error)
First returns the first Movie entity from the query. Returns a *NotFoundError when no Movie was found.
func (*MovieQuery) FirstID ¶
func (mq *MovieQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Movie ID from the query. Returns a *NotFoundError when no Movie ID was found.
func (*MovieQuery) FirstIDX ¶
func (mq *MovieQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MovieQuery) FirstX ¶
func (mq *MovieQuery) FirstX(ctx context.Context) *Movie
FirstX is like First, but panics if an error occurs.
func (*MovieQuery) GroupBy ¶
func (mq *MovieQuery) GroupBy(field string, fields ...string) *MovieGroupBy
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.Movie.Query(). GroupBy(movie.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MovieQuery) IDs ¶
func (mq *MovieQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Movie IDs.
func (*MovieQuery) IDsX ¶
func (mq *MovieQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MovieQuery) Limit ¶
func (mq *MovieQuery) Limit(limit int) *MovieQuery
Limit the number of records to be returned by this query.
func (*MovieQuery) Offset ¶
func (mq *MovieQuery) Offset(offset int) *MovieQuery
Offset to start from.
func (*MovieQuery) Only ¶
func (mq *MovieQuery) Only(ctx context.Context) (*Movie, error)
Only returns a single Movie entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Movie entity is found. Returns a *NotFoundError when no Movie entities are found.
func (*MovieQuery) OnlyID ¶
func (mq *MovieQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Movie ID in the query. Returns a *NotSingularError when more than one Movie ID is found. Returns a *NotFoundError when no entities are found.
func (*MovieQuery) OnlyIDX ¶
func (mq *MovieQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MovieQuery) OnlyX ¶
func (mq *MovieQuery) OnlyX(ctx context.Context) *Movie
OnlyX is like Only, but panics if an error occurs.
func (*MovieQuery) Order ¶
func (mq *MovieQuery) Order(o ...movie.OrderOption) *MovieQuery
Order specifies how the records should be ordered.
func (*MovieQuery) QueryMovieCollection ¶
func (mq *MovieQuery) QueryMovieCollection() *MovieCollectionQuery
QueryMovieCollection chains the current query on the "movie_collection" edge.
func (*MovieQuery) Select ¶
func (mq *MovieQuery) Select(fields ...string) *MovieSelect
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.Movie.Query(). Select(movie.FieldName). Scan(ctx, &v)
func (*MovieQuery) Unique ¶
func (mq *MovieQuery) Unique(unique bool) *MovieQuery
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 (*MovieQuery) Where ¶
func (mq *MovieQuery) Where(ps ...predicate.Movie) *MovieQuery
Where adds a new predicate for the MovieQuery builder.
func (*MovieQuery) WithMovieCollection ¶
func (mq *MovieQuery) WithMovieCollection(opts ...func(*MovieCollectionQuery)) *MovieQuery
WithMovieCollection tells the query-builder to eager-load the nodes that are connected to the "movie_collection" edge. The optional arguments are used to configure the query builder of the edge.
type MovieSelect ¶
type MovieSelect struct { *MovieQuery // contains filtered or unexported fields }
MovieSelect is the builder for selecting fields of Movie entities.
func (*MovieSelect) Aggregate ¶
func (ms *MovieSelect) Aggregate(fns ...AggregateFunc) *MovieSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MovieSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MovieSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MovieSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MovieSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MovieSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MovieSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MovieSelect) Scan ¶
func (ms *MovieSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MovieSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MovieUpdate ¶
type MovieUpdate struct {
// contains filtered or unexported fields
}
MovieUpdate is the builder for updating Movie entities.
func (*MovieUpdate) ClearMovieCollection ¶
func (mu *MovieUpdate) ClearMovieCollection() *MovieUpdate
ClearMovieCollection clears the "movie_collection" edge to the MovieCollection entity.
func (*MovieUpdate) Exec ¶
func (mu *MovieUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MovieUpdate) ExecX ¶
func (mu *MovieUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieUpdate) Mutation ¶
func (mu *MovieUpdate) Mutation() *MovieMutation
Mutation returns the MovieMutation object of the builder.
func (*MovieUpdate) Save ¶
func (mu *MovieUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MovieUpdate) SaveX ¶
func (mu *MovieUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MovieUpdate) SetCreatedAt ¶
func (mu *MovieUpdate) SetCreatedAt(t time.Time) *MovieUpdate
SetCreatedAt sets the "created_at" field.
func (*MovieUpdate) SetMovieCollection ¶
func (mu *MovieUpdate) SetMovieCollection(m *MovieCollection) *MovieUpdate
SetMovieCollection sets the "movie_collection" edge to the MovieCollection entity.
func (*MovieUpdate) SetMovieCollectionID ¶
func (mu *MovieUpdate) SetMovieCollectionID(id int) *MovieUpdate
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID.
func (*MovieUpdate) SetName ¶
func (mu *MovieUpdate) SetName(s string) *MovieUpdate
SetName sets the "name" field.
func (*MovieUpdate) SetNillableCreatedAt ¶
func (mu *MovieUpdate) SetNillableCreatedAt(t *time.Time) *MovieUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieUpdate) SetNillableMovieCollectionID ¶
func (mu *MovieUpdate) SetNillableMovieCollectionID(id *int) *MovieUpdate
SetNillableMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID if the given value is not nil.
func (*MovieUpdate) SetNillableNote ¶
func (mu *MovieUpdate) SetNillableNote(s *string) *MovieUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*MovieUpdate) SetNillableWatched ¶
func (mu *MovieUpdate) SetNillableWatched(b *bool) *MovieUpdate
SetNillableWatched sets the "watched" field if the given value is not nil.
func (*MovieUpdate) SetNote ¶
func (mu *MovieUpdate) SetNote(s string) *MovieUpdate
SetNote sets the "note" field.
func (*MovieUpdate) SetWatched ¶
func (mu *MovieUpdate) SetWatched(b bool) *MovieUpdate
SetWatched sets the "watched" field.
func (*MovieUpdate) Where ¶
func (mu *MovieUpdate) Where(ps ...predicate.Movie) *MovieUpdate
Where appends a list predicates to the MovieUpdate builder.
type MovieUpdateOne ¶
type MovieUpdateOne struct {
// contains filtered or unexported fields
}
MovieUpdateOne is the builder for updating a single Movie entity.
func (*MovieUpdateOne) ClearMovieCollection ¶
func (muo *MovieUpdateOne) ClearMovieCollection() *MovieUpdateOne
ClearMovieCollection clears the "movie_collection" edge to the MovieCollection entity.
func (*MovieUpdateOne) Exec ¶
func (muo *MovieUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MovieUpdateOne) ExecX ¶
func (muo *MovieUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MovieUpdateOne) Mutation ¶
func (muo *MovieUpdateOne) Mutation() *MovieMutation
Mutation returns the MovieMutation object of the builder.
func (*MovieUpdateOne) Save ¶
func (muo *MovieUpdateOne) Save(ctx context.Context) (*Movie, error)
Save executes the query and returns the updated Movie entity.
func (*MovieUpdateOne) SaveX ¶
func (muo *MovieUpdateOne) SaveX(ctx context.Context) *Movie
SaveX is like Save, but panics if an error occurs.
func (*MovieUpdateOne) Select ¶
func (muo *MovieUpdateOne) Select(field string, fields ...string) *MovieUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MovieUpdateOne) SetCreatedAt ¶
func (muo *MovieUpdateOne) SetCreatedAt(t time.Time) *MovieUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MovieUpdateOne) SetMovieCollection ¶
func (muo *MovieUpdateOne) SetMovieCollection(m *MovieCollection) *MovieUpdateOne
SetMovieCollection sets the "movie_collection" edge to the MovieCollection entity.
func (*MovieUpdateOne) SetMovieCollectionID ¶
func (muo *MovieUpdateOne) SetMovieCollectionID(id int) *MovieUpdateOne
SetMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID.
func (*MovieUpdateOne) SetName ¶
func (muo *MovieUpdateOne) SetName(s string) *MovieUpdateOne
SetName sets the "name" field.
func (*MovieUpdateOne) SetNillableCreatedAt ¶
func (muo *MovieUpdateOne) SetNillableCreatedAt(t *time.Time) *MovieUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MovieUpdateOne) SetNillableMovieCollectionID ¶
func (muo *MovieUpdateOne) SetNillableMovieCollectionID(id *int) *MovieUpdateOne
SetNillableMovieCollectionID sets the "movie_collection" edge to the MovieCollection entity by ID if the given value is not nil.
func (*MovieUpdateOne) SetNillableNote ¶
func (muo *MovieUpdateOne) SetNillableNote(s *string) *MovieUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*MovieUpdateOne) SetNillableWatched ¶
func (muo *MovieUpdateOne) SetNillableWatched(b *bool) *MovieUpdateOne
SetNillableWatched sets the "watched" field if the given value is not nil.
func (*MovieUpdateOne) SetNote ¶
func (muo *MovieUpdateOne) SetNote(s string) *MovieUpdateOne
SetNote sets the "note" field.
func (*MovieUpdateOne) SetWatched ¶
func (muo *MovieUpdateOne) SetWatched(b bool) *MovieUpdateOne
SetWatched sets the "watched" field.
func (*MovieUpdateOne) Where ¶
func (muo *MovieUpdateOne) Where(ps ...predicate.Movie) *MovieUpdateOne
Where appends a list predicates to the MovieUpdate builder.
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 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 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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // AmazonList is the client for interacting with the AmazonList builders. AmazonList *AmazonListClient // AmazonOrder is the client for interacting with the AmazonOrder builders. AmazonOrder *AmazonOrderClient AmazonShare *AmazonShareClient // Drink is the client for interacting with the Drink builders. Drink *DrinkClient // GroceryList is the client for interacting with the GroceryList builders. GroceryList *GroceryListClient // GroceryListItem is the client for interacting with the GroceryListItem builders. GroceryListItem *GroceryListItemClient GroceryListShare *GroceryListShareClient // Movie is the client for interacting with the Movie builders. Movie *MovieClient // MovieCollection is the client for interacting with the MovieCollection builders. MovieCollection *MovieCollectionClient MovieCollectionShare *MovieCollectionShareClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // DisplayName holds the value of the "display_name" field. DisplayName string `json:"display_name,omitempty"` // NameChanges holds the value of the "name_changes" field. NameChanges int8 `json:"name_changes,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Verified holds the value of the "verified" field. Verified bool `json:"verified,omitempty"` // Locked holds the value of the "locked" field. Locked bool `json:"locked,omitempty"` // LastLogin holds the value of the "last_login" field. LastLogin *time.Time `json:"last_login,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryAmazonLists ¶
func (u *User) QueryAmazonLists() *AmazonListQuery
QueryAmazonLists queries the "amazon_lists" edge of the User entity.
func (*User) QueryAmazonShares ¶
func (u *User) QueryAmazonShares() *AmazonShareQuery
QueryAmazonShares queries the "amazon_shares" edge of the User entity.
func (*User) QueryDrinks ¶
func (u *User) QueryDrinks() *DrinkQuery
QueryDrinks queries the "drinks" edge of the User entity.
func (*User) QueryGroceryListShares ¶
func (u *User) QueryGroceryListShares() *GroceryListShareQuery
QueryGroceryListShares queries the "grocery_list_shares" edge of the User entity.
func (*User) QueryGroceryLists ¶
func (u *User) QueryGroceryLists() *GroceryListQuery
QueryGroceryLists queries the "grocery_lists" edge of the User entity.
func (*User) QueryMovieCollectionShares ¶
func (u *User) QueryMovieCollectionShares() *MovieCollectionShareQuery
QueryMovieCollectionShares queries the "movie_collection_shares" edge of the User entity.
func (*User) QueryMovieCollections ¶
func (u *User) QueryMovieCollections() *MovieCollectionQuery
QueryMovieCollections queries the "movie_collections" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) 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) QueryAmazonLists ¶
func (c *UserClient) QueryAmazonLists(u *User) *AmazonListQuery
QueryAmazonLists queries the amazon_lists edge of a User.
func (*UserClient) QueryAmazonShares ¶
func (c *UserClient) QueryAmazonShares(u *User) *AmazonShareQuery
QueryAmazonShares queries the amazon_shares edge of a User.
func (*UserClient) QueryDrinks ¶
func (c *UserClient) QueryDrinks(u *User) *DrinkQuery
QueryDrinks queries the drinks edge of a User.
func (*UserClient) QueryGroceryListShares ¶
func (c *UserClient) QueryGroceryListShares(u *User) *GroceryListShareQuery
QueryGroceryListShares queries the grocery_list_shares edge of a User.
func (*UserClient) QueryGroceryLists ¶
func (c *UserClient) QueryGroceryLists(u *User) *GroceryListQuery
QueryGroceryLists queries the grocery_lists edge of a User.
func (*UserClient) QueryMovieCollectionShares ¶
func (c *UserClient) QueryMovieCollectionShares(u *User) *MovieCollectionShareQuery
QueryMovieCollectionShares queries the movie_collection_shares edge of a User.
func (*UserClient) QueryMovieCollections ¶
func (c *UserClient) QueryMovieCollections(u *User) *MovieCollectionQuery
QueryMovieCollections queries the movie_collections edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddAmazonListIDs ¶
func (uc *UserCreate) AddAmazonListIDs(ids ...int) *UserCreate
AddAmazonListIDs adds the "amazon_lists" edge to the AmazonList entity by IDs.
func (*UserCreate) AddAmazonLists ¶
func (uc *UserCreate) AddAmazonLists(a ...*AmazonList) *UserCreate
AddAmazonLists adds the "amazon_lists" edges to the AmazonList entity.
func (*UserCreate) AddAmazonShareIDs ¶
func (uc *UserCreate) AddAmazonShareIDs(ids ...int) *UserCreate
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*UserCreate) AddAmazonShares ¶
func (uc *UserCreate) AddAmazonShares(a ...*AmazonShare) *UserCreate
AddAmazonShares adds the "amazon_shares" edges to the AmazonShare entity.
func (*UserCreate) AddDrinkIDs ¶
func (uc *UserCreate) AddDrinkIDs(ids ...int) *UserCreate
AddDrinkIDs adds the "drinks" edge to the Drink entity by IDs.
func (*UserCreate) AddDrinks ¶
func (uc *UserCreate) AddDrinks(d ...*Drink) *UserCreate
AddDrinks adds the "drinks" edges to the Drink entity.
func (*UserCreate) AddGroceryListIDs ¶
func (uc *UserCreate) AddGroceryListIDs(ids ...int) *UserCreate
AddGroceryListIDs adds the "grocery_lists" edge to the GroceryList entity by IDs.
func (*UserCreate) AddGroceryListShareIDs ¶
func (uc *UserCreate) AddGroceryListShareIDs(ids ...int) *UserCreate
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*UserCreate) AddGroceryListShares ¶
func (uc *UserCreate) AddGroceryListShares(g ...*GroceryListShare) *UserCreate
AddGroceryListShares adds the "grocery_list_shares" edges to the GroceryListShare entity.
func (*UserCreate) AddGroceryLists ¶
func (uc *UserCreate) AddGroceryLists(g ...*GroceryList) *UserCreate
AddGroceryLists adds the "grocery_lists" edges to the GroceryList entity.
func (*UserCreate) AddMovieCollectionIDs ¶
func (uc *UserCreate) AddMovieCollectionIDs(ids ...int) *UserCreate
AddMovieCollectionIDs adds the "movie_collections" edge to the MovieCollection entity by IDs.
func (*UserCreate) AddMovieCollectionShareIDs ¶
func (uc *UserCreate) AddMovieCollectionShareIDs(ids ...int) *UserCreate
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*UserCreate) AddMovieCollectionShares ¶
func (uc *UserCreate) AddMovieCollectionShares(m ...*MovieCollectionShare) *UserCreate
AddMovieCollectionShares adds the "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*UserCreate) AddMovieCollections ¶
func (uc *UserCreate) AddMovieCollections(m ...*MovieCollection) *UserCreate
AddMovieCollections adds the "movie_collections" edges to the MovieCollection 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) 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) SetDisplayName ¶
func (uc *UserCreate) SetDisplayName(s string) *UserCreate
SetDisplayName sets the "display_name" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetLastLogin ¶
func (uc *UserCreate) SetLastLogin(t time.Time) *UserCreate
SetLastLogin sets the "last_login" field.
func (*UserCreate) SetLocked ¶
func (uc *UserCreate) SetLocked(b bool) *UserCreate
SetLocked sets the "locked" field.
func (*UserCreate) SetNameChanges ¶
func (uc *UserCreate) SetNameChanges(i int8) *UserCreate
SetNameChanges sets the "name_changes" 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) SetNillableLocked ¶
func (uc *UserCreate) SetNillableLocked(b *bool) *UserCreate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserCreate) SetNillableNameChanges ¶
func (uc *UserCreate) SetNillableNameChanges(i *int8) *UserCreate
SetNillableNameChanges sets the "name_changes" field if the given value is not nil.
func (*UserCreate) SetNillableVerified ¶
func (uc *UserCreate) SetNillableVerified(b *bool) *UserCreate
SetNillableVerified sets the "verified" field if the given value is not nil.
func (*UserCreate) SetVerified ¶
func (uc *UserCreate) SetVerified(b bool) *UserCreate
SetVerified sets the "verified" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { AmazonShare `json:"amazon_shares,omitempty"` // AmazonLists holds the value of the amazon_lists edge. AmazonLists []*AmazonList `json:"amazon_lists,omitempty"` // Drinks holds the value of the drinks edge. Drinks []*Drink `json:"drinks,omitempty"` // GroceryLists holds the value of the grocery_lists edge. GroceryLists []*GroceryList `json:"grocery_lists,omitempty"` GroceryListShares []*GroceryListShare `json:"grocery_list_shares,omitempty"` // MovieCollections holds the value of the movie_collections edge. MovieCollections []*MovieCollection `json:"movie_collections,omitempty"` MovieCollectionShares []*MovieCollectionShare `json:"movie_collection_shares,omitempty"` // contains filtered or unexported fields }AmazonShares []*
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) AmazonListsOrErr ¶
func (e UserEdges) AmazonListsOrErr() ([]*AmazonList, error)
AmazonListsOrErr returns the AmazonLists value or an error if the edge was not loaded in eager-loading.
func (UserEdges) AmazonSharesOrErr ¶
func (e UserEdges) AmazonSharesOrErr() ([]*AmazonShare, error)
AmazonSharesOrErr returns the AmazonShares value or an error if the edge was not loaded in eager-loading.
func (UserEdges) DrinksOrErr ¶
DrinksOrErr returns the Drinks value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroceryListSharesOrErr ¶
func (e UserEdges) GroceryListSharesOrErr() ([]*GroceryListShare, error)
GroceryListSharesOrErr returns the GroceryListShares value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroceryListsOrErr ¶
func (e UserEdges) GroceryListsOrErr() ([]*GroceryList, error)
GroceryListsOrErr returns the GroceryLists value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MovieCollectionSharesOrErr ¶
func (e UserEdges) MovieCollectionSharesOrErr() ([]*MovieCollectionShare, error)
MovieCollectionSharesOrErr returns the MovieCollectionShares value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MovieCollectionsOrErr ¶
func (e UserEdges) MovieCollectionsOrErr() ([]*MovieCollection, error)
MovieCollectionsOrErr returns the MovieCollections value or an error if the edge was not loaded in eager-loading.
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) AddAmazonListIDs ¶
func (m *UserMutation) AddAmazonListIDs(ids ...int)
AddAmazonListIDs adds the "amazon_lists" edge to the AmazonList entity by ids.
func (*UserMutation) AddAmazonShareIDs ¶
func (m *UserMutation) AddAmazonShareIDs(ids ...int)
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by ids.
func (*UserMutation) AddDrinkIDs ¶
func (m *UserMutation) AddDrinkIDs(ids ...int)
AddDrinkIDs adds the "drinks" edge to the Drink entity by ids.
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) AddGroceryListIDs ¶
func (m *UserMutation) AddGroceryListIDs(ids ...int)
AddGroceryListIDs adds the "grocery_lists" edge to the GroceryList entity by ids.
func (*UserMutation) AddGroceryListShareIDs ¶
func (m *UserMutation) AddGroceryListShareIDs(ids ...int)
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by ids.
func (*UserMutation) AddMovieCollectionIDs ¶
func (m *UserMutation) AddMovieCollectionIDs(ids ...int)
AddMovieCollectionIDs adds the "movie_collections" edge to the MovieCollection entity by ids.
func (*UserMutation) AddMovieCollectionShareIDs ¶
func (m *UserMutation) AddMovieCollectionShareIDs(ids ...int)
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by ids.
func (*UserMutation) AddNameChanges ¶
func (m *UserMutation) AddNameChanges(i int8)
AddNameChanges adds i to the "name_changes" field.
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) AddedNameChanges ¶
func (m *UserMutation) AddedNameChanges() (r int8, exists bool)
AddedNameChanges returns the value that was added to the "name_changes" field in this mutation.
func (*UserMutation) AmazonListsCleared ¶
func (m *UserMutation) AmazonListsCleared() bool
AmazonListsCleared reports if the "amazon_lists" edge to the AmazonList entity was cleared.
func (*UserMutation) AmazonListsIDs ¶
func (m *UserMutation) AmazonListsIDs() (ids []int)
AmazonListsIDs returns the "amazon_lists" edge IDs in the mutation.
func (*UserMutation) AmazonSharesCleared ¶
func (m *UserMutation) AmazonSharesCleared() bool
AmazonSharesCleared reports if the "amazon_shares" edge to the AmazonShare entity was cleared.
func (*UserMutation) AmazonSharesIDs ¶
func (m *UserMutation) AmazonSharesIDs() (ids []int)
AmazonSharesIDs returns the "amazon_shares" edge IDs in the mutation.
func (*UserMutation) ClearAmazonLists ¶
func (m *UserMutation) ClearAmazonLists()
ClearAmazonLists clears the "amazon_lists" edge to the AmazonList entity.
func (*UserMutation) ClearAmazonShares ¶
func (m *UserMutation) ClearAmazonShares()
ClearAmazonShares clears the "amazon_shares" edge to the AmazonShare entity.
func (*UserMutation) ClearDrinks ¶
func (m *UserMutation) ClearDrinks()
ClearDrinks clears the "drinks" edge to the Drink entity.
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) ClearGroceryListShares ¶
func (m *UserMutation) ClearGroceryListShares()
ClearGroceryListShares clears the "grocery_list_shares" edge to the GroceryListShare entity.
func (*UserMutation) ClearGroceryLists ¶
func (m *UserMutation) ClearGroceryLists()
ClearGroceryLists clears the "grocery_lists" edge to the GroceryList entity.
func (*UserMutation) ClearMovieCollectionShares ¶
func (m *UserMutation) ClearMovieCollectionShares()
ClearMovieCollectionShares clears the "movie_collection_shares" edge to the MovieCollectionShare entity.
func (*UserMutation) ClearMovieCollections ¶
func (m *UserMutation) ClearMovieCollections()
ClearMovieCollections clears the "movie_collections" edge to the MovieCollection entity.
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) DisplayName ¶
func (m *UserMutation) DisplayName() (r string, exists bool)
DisplayName returns the value of the "display_name" field in the mutation.
func (*UserMutation) DrinksCleared ¶
func (m *UserMutation) DrinksCleared() bool
DrinksCleared reports if the "drinks" edge to the Drink entity was cleared.
func (*UserMutation) DrinksIDs ¶
func (m *UserMutation) DrinksIDs() (ids []int)
DrinksIDs returns the "drinks" edge IDs 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) GroceryListSharesCleared ¶
func (m *UserMutation) GroceryListSharesCleared() bool
GroceryListSharesCleared reports if the "grocery_list_shares" edge to the GroceryListShare entity was cleared.
func (*UserMutation) GroceryListSharesIDs ¶
func (m *UserMutation) GroceryListSharesIDs() (ids []int)
GroceryListSharesIDs returns the "grocery_list_shares" edge IDs in the mutation.
func (*UserMutation) GroceryListsCleared ¶
func (m *UserMutation) GroceryListsCleared() bool
GroceryListsCleared reports if the "grocery_lists" edge to the GroceryList entity was cleared.
func (*UserMutation) GroceryListsIDs ¶
func (m *UserMutation) GroceryListsIDs() (ids []int)
GroceryListsIDs returns the "grocery_lists" edge IDs in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) LastLogin ¶
func (m *UserMutation) LastLogin() (r time.Time, exists bool)
LastLogin returns the value of the "last_login" field in the mutation.
func (*UserMutation) Locked ¶
func (m *UserMutation) Locked() (r bool, exists bool)
Locked returns the value of the "locked" field in the mutation.
func (*UserMutation) MovieCollectionSharesCleared ¶
func (m *UserMutation) MovieCollectionSharesCleared() bool
MovieCollectionSharesCleared reports if the "movie_collection_shares" edge to the MovieCollectionShare entity was cleared.
func (*UserMutation) MovieCollectionSharesIDs ¶
func (m *UserMutation) MovieCollectionSharesIDs() (ids []int)
MovieCollectionSharesIDs returns the "movie_collection_shares" edge IDs in the mutation.
func (*UserMutation) MovieCollectionsCleared ¶
func (m *UserMutation) MovieCollectionsCleared() bool
MovieCollectionsCleared reports if the "movie_collections" edge to the MovieCollection entity was cleared.
func (*UserMutation) MovieCollectionsIDs ¶
func (m *UserMutation) MovieCollectionsIDs() (ids []int)
MovieCollectionsIDs returns the "movie_collections" edge IDs in the mutation.
func (*UserMutation) NameChanges ¶
func (m *UserMutation) NameChanges() (r int8, exists bool)
NameChanges returns the value of the "name_changes" field in 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) OldDisplayName ¶
func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)
OldDisplayName returns the old "display_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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) OldLastLogin ¶
OldLastLogin returns the old "last_login" 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) OldLocked ¶
func (m *UserMutation) OldLocked(ctx context.Context) (v bool, err error)
OldLocked returns the old "locked" 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) OldNameChanges ¶
func (m *UserMutation) OldNameChanges(ctx context.Context) (v int8, err error)
OldNameChanges returns the old "name_changes" 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) OldVerified ¶
func (m *UserMutation) OldVerified(ctx context.Context) (v bool, err error)
OldVerified returns the old "verified" 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) RemoveAmazonListIDs ¶
func (m *UserMutation) RemoveAmazonListIDs(ids ...int)
RemoveAmazonListIDs removes the "amazon_lists" edge to the AmazonList entity by IDs.
func (*UserMutation) RemoveAmazonShareIDs ¶
func (m *UserMutation) RemoveAmazonShareIDs(ids ...int)
RemoveAmazonShareIDs removes the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*UserMutation) RemoveDrinkIDs ¶
func (m *UserMutation) RemoveDrinkIDs(ids ...int)
RemoveDrinkIDs removes the "drinks" edge to the Drink entity by IDs.
func (*UserMutation) RemoveGroceryListIDs ¶
func (m *UserMutation) RemoveGroceryListIDs(ids ...int)
RemoveGroceryListIDs removes the "grocery_lists" edge to the GroceryList entity by IDs.
func (*UserMutation) RemoveGroceryListShareIDs ¶
func (m *UserMutation) RemoveGroceryListShareIDs(ids ...int)
RemoveGroceryListShareIDs removes the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*UserMutation) RemoveMovieCollectionIDs ¶
func (m *UserMutation) RemoveMovieCollectionIDs(ids ...int)
RemoveMovieCollectionIDs removes the "movie_collections" edge to the MovieCollection entity by IDs.
func (*UserMutation) RemoveMovieCollectionShareIDs ¶
func (m *UserMutation) RemoveMovieCollectionShareIDs(ids ...int)
RemoveMovieCollectionShareIDs removes the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*UserMutation) RemovedAmazonListsIDs ¶
func (m *UserMutation) RemovedAmazonListsIDs() (ids []int)
RemovedAmazonLists returns the removed IDs of the "amazon_lists" edge to the AmazonList entity.
func (*UserMutation) RemovedAmazonSharesIDs ¶
func (m *UserMutation) RemovedAmazonSharesIDs() (ids []int)
RemovedAmazonShares returns the removed IDs of the "amazon_shares" edge to the AmazonShare entity.
func (*UserMutation) RemovedDrinksIDs ¶
func (m *UserMutation) RemovedDrinksIDs() (ids []int)
RemovedDrinks returns the removed IDs of the "drinks" edge to the Drink entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedGroceryListSharesIDs ¶
func (m *UserMutation) RemovedGroceryListSharesIDs() (ids []int)
RemovedGroceryListShares returns the removed IDs of the "grocery_list_shares" edge to the GroceryListShare entity.
func (*UserMutation) RemovedGroceryListsIDs ¶
func (m *UserMutation) RemovedGroceryListsIDs() (ids []int)
RemovedGroceryLists returns the removed IDs of the "grocery_lists" edge to the GroceryList entity.
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) RemovedMovieCollectionSharesIDs ¶
func (m *UserMutation) RemovedMovieCollectionSharesIDs() (ids []int)
RemovedMovieCollectionShares returns the removed IDs of the "movie_collection_shares" edge to the MovieCollectionShare entity.
func (*UserMutation) RemovedMovieCollectionsIDs ¶
func (m *UserMutation) RemovedMovieCollectionsIDs() (ids []int)
RemovedMovieCollections returns the removed IDs of the "movie_collections" edge to the MovieCollection entity.
func (*UserMutation) ResetAmazonLists ¶
func (m *UserMutation) ResetAmazonLists()
ResetAmazonLists resets all changes to the "amazon_lists" edge.
func (*UserMutation) ResetAmazonShares ¶
func (m *UserMutation) ResetAmazonShares()
ResetAmazonShares resets all changes to the "amazon_shares" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDisplayName ¶
func (m *UserMutation) ResetDisplayName()
ResetDisplayName resets all changes to the "display_name" field.
func (*UserMutation) ResetDrinks ¶
func (m *UserMutation) ResetDrinks()
ResetDrinks resets all changes to the "drinks" edge.
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) ResetGroceryListShares ¶
func (m *UserMutation) ResetGroceryListShares()
ResetGroceryListShares resets all changes to the "grocery_list_shares" edge.
func (*UserMutation) ResetGroceryLists ¶
func (m *UserMutation) ResetGroceryLists()
ResetGroceryLists resets all changes to the "grocery_lists" edge.
func (*UserMutation) ResetLastLogin ¶
func (m *UserMutation) ResetLastLogin()
ResetLastLogin resets all changes to the "last_login" field.
func (*UserMutation) ResetLocked ¶
func (m *UserMutation) ResetLocked()
ResetLocked resets all changes to the "locked" field.
func (*UserMutation) ResetMovieCollectionShares ¶
func (m *UserMutation) ResetMovieCollectionShares()
ResetMovieCollectionShares resets all changes to the "movie_collection_shares" edge.
func (*UserMutation) ResetMovieCollections ¶
func (m *UserMutation) ResetMovieCollections()
ResetMovieCollections resets all changes to the "movie_collections" edge.
func (*UserMutation) ResetNameChanges ¶
func (m *UserMutation) ResetNameChanges()
ResetNameChanges resets all changes to the "name_changes" field.
func (*UserMutation) ResetVerified ¶
func (m *UserMutation) ResetVerified()
ResetVerified resets all changes to the "verified" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDisplayName ¶
func (m *UserMutation) SetDisplayName(s string)
SetDisplayName sets the "display_name" 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) SetLastLogin ¶
func (m *UserMutation) SetLastLogin(t time.Time)
SetLastLogin sets the "last_login" field.
func (*UserMutation) SetLocked ¶
func (m *UserMutation) SetLocked(b bool)
SetLocked sets the "locked" field.
func (*UserMutation) SetNameChanges ¶
func (m *UserMutation) SetNameChanges(i int8)
SetNameChanges sets the "name_changes" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetVerified ¶
func (m *UserMutation) SetVerified(b bool)
SetVerified sets the "verified" 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) Verified ¶
func (m *UserMutation) Verified() (r bool, exists bool)
Verified returns the value of the "verified" 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 { DisplayName string `json:"display_name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldDisplayName). 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) QueryAmazonLists ¶
func (uq *UserQuery) QueryAmazonLists() *AmazonListQuery
QueryAmazonLists chains the current query on the "amazon_lists" edge.
func (*UserQuery) QueryAmazonShares ¶
func (uq *UserQuery) QueryAmazonShares() *AmazonShareQuery
QueryAmazonShares chains the current query on the "amazon_shares" edge.
func (*UserQuery) QueryDrinks ¶
func (uq *UserQuery) QueryDrinks() *DrinkQuery
QueryDrinks chains the current query on the "drinks" edge.
func (*UserQuery) QueryGroceryListShares ¶
func (uq *UserQuery) QueryGroceryListShares() *GroceryListShareQuery
QueryGroceryListShares chains the current query on the "grocery_list_shares" edge.
func (*UserQuery) QueryGroceryLists ¶
func (uq *UserQuery) QueryGroceryLists() *GroceryListQuery
QueryGroceryLists chains the current query on the "grocery_lists" edge.
func (*UserQuery) QueryMovieCollectionShares ¶
func (uq *UserQuery) QueryMovieCollectionShares() *MovieCollectionShareQuery
QueryMovieCollectionShares chains the current query on the "movie_collection_shares" edge.
func (*UserQuery) QueryMovieCollections ¶
func (uq *UserQuery) QueryMovieCollections() *MovieCollectionQuery
QueryMovieCollections chains the current query on the "movie_collections" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { DisplayName string `json:"display_name,omitempty"` } client.User.Query(). Select(user.FieldDisplayName). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithAmazonLists ¶
func (uq *UserQuery) WithAmazonLists(opts ...func(*AmazonListQuery)) *UserQuery
WithAmazonLists tells the query-builder to eager-load the nodes that are connected to the "amazon_lists" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithAmazonShares ¶
func (uq *UserQuery) WithAmazonShares(opts ...func(*AmazonShareQuery)) *UserQuery
WithAmazonShares tells the query-builder to eager-load the nodes that are connected to the "amazon_shares" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithDrinks ¶
func (uq *UserQuery) WithDrinks(opts ...func(*DrinkQuery)) *UserQuery
WithDrinks tells the query-builder to eager-load the nodes that are connected to the "drinks" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroceryListShares ¶
func (uq *UserQuery) WithGroceryListShares(opts ...func(*GroceryListShareQuery)) *UserQuery
WithGroceryListShares tells the query-builder to eager-load the nodes that are connected to the "grocery_list_shares" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroceryLists ¶
func (uq *UserQuery) WithGroceryLists(opts ...func(*GroceryListQuery)) *UserQuery
WithGroceryLists tells the query-builder to eager-load the nodes that are connected to the "grocery_lists" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithMovieCollectionShares ¶
func (uq *UserQuery) WithMovieCollectionShares(opts ...func(*MovieCollectionShareQuery)) *UserQuery
WithMovieCollectionShares tells the query-builder to eager-load the nodes that are connected to the "movie_collection_shares" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithMovieCollections ¶
func (uq *UserQuery) WithMovieCollections(opts ...func(*MovieCollectionQuery)) *UserQuery
WithMovieCollections tells the query-builder to eager-load the nodes that are connected to the "movie_collections" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) 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) AddAmazonListIDs ¶
func (uu *UserUpdate) AddAmazonListIDs(ids ...int) *UserUpdate
AddAmazonListIDs adds the "amazon_lists" edge to the AmazonList entity by IDs.
func (*UserUpdate) AddAmazonLists ¶
func (uu *UserUpdate) AddAmazonLists(a ...*AmazonList) *UserUpdate
AddAmazonLists adds the "amazon_lists" edges to the AmazonList entity.
func (*UserUpdate) AddAmazonShareIDs ¶
func (uu *UserUpdate) AddAmazonShareIDs(ids ...int) *UserUpdate
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*UserUpdate) AddAmazonShares ¶
func (uu *UserUpdate) AddAmazonShares(a ...*AmazonShare) *UserUpdate
AddAmazonShares adds the "amazon_shares" edges to the AmazonShare entity.
func (*UserUpdate) AddDrinkIDs ¶
func (uu *UserUpdate) AddDrinkIDs(ids ...int) *UserUpdate
AddDrinkIDs adds the "drinks" edge to the Drink entity by IDs.
func (*UserUpdate) AddDrinks ¶
func (uu *UserUpdate) AddDrinks(d ...*Drink) *UserUpdate
AddDrinks adds the "drinks" edges to the Drink entity.
func (*UserUpdate) AddGroceryListIDs ¶
func (uu *UserUpdate) AddGroceryListIDs(ids ...int) *UserUpdate
AddGroceryListIDs adds the "grocery_lists" edge to the GroceryList entity by IDs.
func (*UserUpdate) AddGroceryListShareIDs ¶
func (uu *UserUpdate) AddGroceryListShareIDs(ids ...int) *UserUpdate
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*UserUpdate) AddGroceryListShares ¶
func (uu *UserUpdate) AddGroceryListShares(g ...*GroceryListShare) *UserUpdate
AddGroceryListShares adds the "grocery_list_shares" edges to the GroceryListShare entity.
func (*UserUpdate) AddGroceryLists ¶
func (uu *UserUpdate) AddGroceryLists(g ...*GroceryList) *UserUpdate
AddGroceryLists adds the "grocery_lists" edges to the GroceryList entity.
func (*UserUpdate) AddMovieCollectionIDs ¶
func (uu *UserUpdate) AddMovieCollectionIDs(ids ...int) *UserUpdate
AddMovieCollectionIDs adds the "movie_collections" edge to the MovieCollection entity by IDs.
func (*UserUpdate) AddMovieCollectionShareIDs ¶
func (uu *UserUpdate) AddMovieCollectionShareIDs(ids ...int) *UserUpdate
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*UserUpdate) AddMovieCollectionShares ¶
func (uu *UserUpdate) AddMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdate
AddMovieCollectionShares adds the "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*UserUpdate) AddMovieCollections ¶
func (uu *UserUpdate) AddMovieCollections(m ...*MovieCollection) *UserUpdate
AddMovieCollections adds the "movie_collections" edges to the MovieCollection entity.
func (*UserUpdate) AddNameChanges ¶
func (uu *UserUpdate) AddNameChanges(i int8) *UserUpdate
AddNameChanges adds i to the "name_changes" field.
func (*UserUpdate) ClearAmazonLists ¶
func (uu *UserUpdate) ClearAmazonLists() *UserUpdate
ClearAmazonLists clears all "amazon_lists" edges to the AmazonList entity.
func (*UserUpdate) ClearAmazonShares ¶
func (uu *UserUpdate) ClearAmazonShares() *UserUpdate
ClearAmazonShares clears all "amazon_shares" edges to the AmazonShare entity.
func (*UserUpdate) ClearDrinks ¶
func (uu *UserUpdate) ClearDrinks() *UserUpdate
ClearDrinks clears all "drinks" edges to the Drink entity.
func (*UserUpdate) ClearGroceryListShares ¶
func (uu *UserUpdate) ClearGroceryListShares() *UserUpdate
ClearGroceryListShares clears all "grocery_list_shares" edges to the GroceryListShare entity.
func (*UserUpdate) ClearGroceryLists ¶
func (uu *UserUpdate) ClearGroceryLists() *UserUpdate
ClearGroceryLists clears all "grocery_lists" edges to the GroceryList entity.
func (*UserUpdate) ClearMovieCollectionShares ¶
func (uu *UserUpdate) ClearMovieCollectionShares() *UserUpdate
ClearMovieCollectionShares clears all "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*UserUpdate) ClearMovieCollections ¶
func (uu *UserUpdate) ClearMovieCollections() *UserUpdate
ClearMovieCollections clears all "movie_collections" edges to the MovieCollection entity.
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) RemoveAmazonListIDs ¶
func (uu *UserUpdate) RemoveAmazonListIDs(ids ...int) *UserUpdate
RemoveAmazonListIDs removes the "amazon_lists" edge to AmazonList entities by IDs.
func (*UserUpdate) RemoveAmazonLists ¶
func (uu *UserUpdate) RemoveAmazonLists(a ...*AmazonList) *UserUpdate
RemoveAmazonLists removes "amazon_lists" edges to AmazonList entities.
func (*UserUpdate) RemoveAmazonShareIDs ¶
func (uu *UserUpdate) RemoveAmazonShareIDs(ids ...int) *UserUpdate
RemoveAmazonShareIDs removes the "amazon_shares" edge to AmazonShare entities by IDs.
func (*UserUpdate) RemoveAmazonShares ¶
func (uu *UserUpdate) RemoveAmazonShares(a ...*AmazonShare) *UserUpdate
RemoveAmazonShares removes "amazon_shares" edges to AmazonShare entities.
func (*UserUpdate) RemoveDrinkIDs ¶
func (uu *UserUpdate) RemoveDrinkIDs(ids ...int) *UserUpdate
RemoveDrinkIDs removes the "drinks" edge to Drink entities by IDs.
func (*UserUpdate) RemoveDrinks ¶
func (uu *UserUpdate) RemoveDrinks(d ...*Drink) *UserUpdate
RemoveDrinks removes "drinks" edges to Drink entities.
func (*UserUpdate) RemoveGroceryListIDs ¶
func (uu *UserUpdate) RemoveGroceryListIDs(ids ...int) *UserUpdate
RemoveGroceryListIDs removes the "grocery_lists" edge to GroceryList entities by IDs.
func (*UserUpdate) RemoveGroceryListShareIDs ¶
func (uu *UserUpdate) RemoveGroceryListShareIDs(ids ...int) *UserUpdate
RemoveGroceryListShareIDs removes the "grocery_list_shares" edge to GroceryListShare entities by IDs.
func (*UserUpdate) RemoveGroceryListShares ¶
func (uu *UserUpdate) RemoveGroceryListShares(g ...*GroceryListShare) *UserUpdate
RemoveGroceryListShares removes "grocery_list_shares" edges to GroceryListShare entities.
func (*UserUpdate) RemoveGroceryLists ¶
func (uu *UserUpdate) RemoveGroceryLists(g ...*GroceryList) *UserUpdate
RemoveGroceryLists removes "grocery_lists" edges to GroceryList entities.
func (*UserUpdate) RemoveMovieCollectionIDs ¶
func (uu *UserUpdate) RemoveMovieCollectionIDs(ids ...int) *UserUpdate
RemoveMovieCollectionIDs removes the "movie_collections" edge to MovieCollection entities by IDs.
func (*UserUpdate) RemoveMovieCollectionShareIDs ¶
func (uu *UserUpdate) RemoveMovieCollectionShareIDs(ids ...int) *UserUpdate
RemoveMovieCollectionShareIDs removes the "movie_collection_shares" edge to MovieCollectionShare entities by IDs.
func (*UserUpdate) RemoveMovieCollectionShares ¶
func (uu *UserUpdate) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdate
RemoveMovieCollectionShares removes "movie_collection_shares" edges to MovieCollectionShare entities.
func (*UserUpdate) RemoveMovieCollections ¶
func (uu *UserUpdate) RemoveMovieCollections(m ...*MovieCollection) *UserUpdate
RemoveMovieCollections removes "movie_collections" edges to MovieCollection entities.
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) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetDisplayName ¶
func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate
SetDisplayName sets the "display_name" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetLastLogin ¶
func (uu *UserUpdate) SetLastLogin(t time.Time) *UserUpdate
SetLastLogin sets the "last_login" field.
func (*UserUpdate) SetLocked ¶
func (uu *UserUpdate) SetLocked(b bool) *UserUpdate
SetLocked sets the "locked" field.
func (*UserUpdate) SetNameChanges ¶
func (uu *UserUpdate) SetNameChanges(i int8) *UserUpdate
SetNameChanges sets the "name_changes" field.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableLocked ¶
func (uu *UserUpdate) SetNillableLocked(b *bool) *UserUpdate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserUpdate) SetNillableNameChanges ¶
func (uu *UserUpdate) SetNillableNameChanges(i *int8) *UserUpdate
SetNillableNameChanges sets the "name_changes" field if the given value is not nil.
func (*UserUpdate) SetNillableVerified ¶
func (uu *UserUpdate) SetNillableVerified(b *bool) *UserUpdate
SetNillableVerified sets the "verified" field if the given value is not nil.
func (*UserUpdate) SetVerified ¶
func (uu *UserUpdate) SetVerified(b bool) *UserUpdate
SetVerified sets the "verified" 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) AddAmazonListIDs ¶
func (uuo *UserUpdateOne) AddAmazonListIDs(ids ...int) *UserUpdateOne
AddAmazonListIDs adds the "amazon_lists" edge to the AmazonList entity by IDs.
func (*UserUpdateOne) AddAmazonLists ¶
func (uuo *UserUpdateOne) AddAmazonLists(a ...*AmazonList) *UserUpdateOne
AddAmazonLists adds the "amazon_lists" edges to the AmazonList entity.
func (*UserUpdateOne) AddAmazonShareIDs ¶
func (uuo *UserUpdateOne) AddAmazonShareIDs(ids ...int) *UserUpdateOne
AddAmazonShareIDs adds the "amazon_shares" edge to the AmazonShare entity by IDs.
func (*UserUpdateOne) AddAmazonShares ¶
func (uuo *UserUpdateOne) AddAmazonShares(a ...*AmazonShare) *UserUpdateOne
AddAmazonShares adds the "amazon_shares" edges to the AmazonShare entity.
func (*UserUpdateOne) AddDrinkIDs ¶
func (uuo *UserUpdateOne) AddDrinkIDs(ids ...int) *UserUpdateOne
AddDrinkIDs adds the "drinks" edge to the Drink entity by IDs.
func (*UserUpdateOne) AddDrinks ¶
func (uuo *UserUpdateOne) AddDrinks(d ...*Drink) *UserUpdateOne
AddDrinks adds the "drinks" edges to the Drink entity.
func (*UserUpdateOne) AddGroceryListIDs ¶
func (uuo *UserUpdateOne) AddGroceryListIDs(ids ...int) *UserUpdateOne
AddGroceryListIDs adds the "grocery_lists" edge to the GroceryList entity by IDs.
func (*UserUpdateOne) AddGroceryListShareIDs ¶
func (uuo *UserUpdateOne) AddGroceryListShareIDs(ids ...int) *UserUpdateOne
AddGroceryListShareIDs adds the "grocery_list_shares" edge to the GroceryListShare entity by IDs.
func (*UserUpdateOne) AddGroceryListShares ¶
func (uuo *UserUpdateOne) AddGroceryListShares(g ...*GroceryListShare) *UserUpdateOne
AddGroceryListShares adds the "grocery_list_shares" edges to the GroceryListShare entity.
func (*UserUpdateOne) AddGroceryLists ¶
func (uuo *UserUpdateOne) AddGroceryLists(g ...*GroceryList) *UserUpdateOne
AddGroceryLists adds the "grocery_lists" edges to the GroceryList entity.
func (*UserUpdateOne) AddMovieCollectionIDs ¶
func (uuo *UserUpdateOne) AddMovieCollectionIDs(ids ...int) *UserUpdateOne
AddMovieCollectionIDs adds the "movie_collections" edge to the MovieCollection entity by IDs.
func (*UserUpdateOne) AddMovieCollectionShareIDs ¶
func (uuo *UserUpdateOne) AddMovieCollectionShareIDs(ids ...int) *UserUpdateOne
AddMovieCollectionShareIDs adds the "movie_collection_shares" edge to the MovieCollectionShare entity by IDs.
func (*UserUpdateOne) AddMovieCollectionShares ¶
func (uuo *UserUpdateOne) AddMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdateOne
AddMovieCollectionShares adds the "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*UserUpdateOne) AddMovieCollections ¶
func (uuo *UserUpdateOne) AddMovieCollections(m ...*MovieCollection) *UserUpdateOne
AddMovieCollections adds the "movie_collections" edges to the MovieCollection entity.
func (*UserUpdateOne) AddNameChanges ¶
func (uuo *UserUpdateOne) AddNameChanges(i int8) *UserUpdateOne
AddNameChanges adds i to the "name_changes" field.
func (*UserUpdateOne) ClearAmazonLists ¶
func (uuo *UserUpdateOne) ClearAmazonLists() *UserUpdateOne
ClearAmazonLists clears all "amazon_lists" edges to the AmazonList entity.
func (*UserUpdateOne) ClearAmazonShares ¶
func (uuo *UserUpdateOne) ClearAmazonShares() *UserUpdateOne
ClearAmazonShares clears all "amazon_shares" edges to the AmazonShare entity.
func (*UserUpdateOne) ClearDrinks ¶
func (uuo *UserUpdateOne) ClearDrinks() *UserUpdateOne
ClearDrinks clears all "drinks" edges to the Drink entity.
func (*UserUpdateOne) ClearGroceryListShares ¶
func (uuo *UserUpdateOne) ClearGroceryListShares() *UserUpdateOne
ClearGroceryListShares clears all "grocery_list_shares" edges to the GroceryListShare entity.
func (*UserUpdateOne) ClearGroceryLists ¶
func (uuo *UserUpdateOne) ClearGroceryLists() *UserUpdateOne
ClearGroceryLists clears all "grocery_lists" edges to the GroceryList entity.
func (*UserUpdateOne) ClearMovieCollectionShares ¶
func (uuo *UserUpdateOne) ClearMovieCollectionShares() *UserUpdateOne
ClearMovieCollectionShares clears all "movie_collection_shares" edges to the MovieCollectionShare entity.
func (*UserUpdateOne) ClearMovieCollections ¶
func (uuo *UserUpdateOne) ClearMovieCollections() *UserUpdateOne
ClearMovieCollections clears all "movie_collections" edges to the MovieCollection 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) RemoveAmazonListIDs ¶
func (uuo *UserUpdateOne) RemoveAmazonListIDs(ids ...int) *UserUpdateOne
RemoveAmazonListIDs removes the "amazon_lists" edge to AmazonList entities by IDs.
func (*UserUpdateOne) RemoveAmazonLists ¶
func (uuo *UserUpdateOne) RemoveAmazonLists(a ...*AmazonList) *UserUpdateOne
RemoveAmazonLists removes "amazon_lists" edges to AmazonList entities.
func (*UserUpdateOne) RemoveAmazonShareIDs ¶
func (uuo *UserUpdateOne) RemoveAmazonShareIDs(ids ...int) *UserUpdateOne
RemoveAmazonShareIDs removes the "amazon_shares" edge to AmazonShare entities by IDs.
func (*UserUpdateOne) RemoveAmazonShares ¶
func (uuo *UserUpdateOne) RemoveAmazonShares(a ...*AmazonShare) *UserUpdateOne
RemoveAmazonShares removes "amazon_shares" edges to AmazonShare entities.
func (*UserUpdateOne) RemoveDrinkIDs ¶
func (uuo *UserUpdateOne) RemoveDrinkIDs(ids ...int) *UserUpdateOne
RemoveDrinkIDs removes the "drinks" edge to Drink entities by IDs.
func (*UserUpdateOne) RemoveDrinks ¶
func (uuo *UserUpdateOne) RemoveDrinks(d ...*Drink) *UserUpdateOne
RemoveDrinks removes "drinks" edges to Drink entities.
func (*UserUpdateOne) RemoveGroceryListIDs ¶
func (uuo *UserUpdateOne) RemoveGroceryListIDs(ids ...int) *UserUpdateOne
RemoveGroceryListIDs removes the "grocery_lists" edge to GroceryList entities by IDs.
func (*UserUpdateOne) RemoveGroceryListShareIDs ¶
func (uuo *UserUpdateOne) RemoveGroceryListShareIDs(ids ...int) *UserUpdateOne
RemoveGroceryListShareIDs removes the "grocery_list_shares" edge to GroceryListShare entities by IDs.
func (*UserUpdateOne) RemoveGroceryListShares ¶
func (uuo *UserUpdateOne) RemoveGroceryListShares(g ...*GroceryListShare) *UserUpdateOne
RemoveGroceryListShares removes "grocery_list_shares" edges to GroceryListShare entities.
func (*UserUpdateOne) RemoveGroceryLists ¶
func (uuo *UserUpdateOne) RemoveGroceryLists(g ...*GroceryList) *UserUpdateOne
RemoveGroceryLists removes "grocery_lists" edges to GroceryList entities.
func (*UserUpdateOne) RemoveMovieCollectionIDs ¶
func (uuo *UserUpdateOne) RemoveMovieCollectionIDs(ids ...int) *UserUpdateOne
RemoveMovieCollectionIDs removes the "movie_collections" edge to MovieCollection entities by IDs.
func (*UserUpdateOne) RemoveMovieCollectionShareIDs ¶
func (uuo *UserUpdateOne) RemoveMovieCollectionShareIDs(ids ...int) *UserUpdateOne
RemoveMovieCollectionShareIDs removes the "movie_collection_shares" edge to MovieCollectionShare entities by IDs.
func (*UserUpdateOne) RemoveMovieCollectionShares ¶
func (uuo *UserUpdateOne) RemoveMovieCollectionShares(m ...*MovieCollectionShare) *UserUpdateOne
RemoveMovieCollectionShares removes "movie_collection_shares" edges to MovieCollectionShare entities.
func (*UserUpdateOne) RemoveMovieCollections ¶
func (uuo *UserUpdateOne) RemoveMovieCollections(m ...*MovieCollection) *UserUpdateOne
RemoveMovieCollections removes "movie_collections" edges to MovieCollection entities.
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) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetDisplayName ¶
func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne
SetDisplayName sets the "display_name" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetLastLogin ¶
func (uuo *UserUpdateOne) SetLastLogin(t time.Time) *UserUpdateOne
SetLastLogin sets the "last_login" field.
func (*UserUpdateOne) SetLocked ¶
func (uuo *UserUpdateOne) SetLocked(b bool) *UserUpdateOne
SetLocked sets the "locked" field.
func (*UserUpdateOne) SetNameChanges ¶
func (uuo *UserUpdateOne) SetNameChanges(i int8) *UserUpdateOne
SetNameChanges sets the "name_changes" field.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLocked ¶
func (uuo *UserUpdateOne) SetNillableLocked(b *bool) *UserUpdateOne
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserUpdateOne) SetNillableNameChanges ¶
func (uuo *UserUpdateOne) SetNillableNameChanges(i *int8) *UserUpdateOne
SetNillableNameChanges sets the "name_changes" field if the given value is not nil.
func (*UserUpdateOne) SetNillableVerified ¶
func (uuo *UserUpdateOne) SetNillableVerified(b *bool) *UserUpdateOne
SetNillableVerified sets the "verified" field if the given value is not nil.
func (*UserUpdateOne) SetVerified ¶
func (uuo *UserUpdateOne) SetVerified(b bool) *UserUpdateOne
SetVerified sets the "verified" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
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
¶
- amazonlist.go
- amazonlist_create.go
- amazonlist_delete.go
- amazonlist_query.go
- amazonlist_update.go
- amazonorder.go
- amazonorder_create.go
- amazonorder_delete.go
- amazonorder_query.go
- amazonorder_update.go
- amazonshare.go
- amazonshare_create.go
- amazonshare_delete.go
- amazonshare_query.go
- amazonshare_update.go
- client.go
- drink.go
- drink_create.go
- drink_delete.go
- drink_query.go
- drink_update.go
- ent.go
- generate.go
- grocerylist.go
- grocerylist_create.go
- grocerylist_delete.go
- grocerylist_query.go
- grocerylist_update.go
- grocerylistitem.go
- grocerylistitem_create.go
- grocerylistitem_delete.go
- grocerylistitem_query.go
- grocerylistitem_update.go
- grocerylistshare.go
- grocerylistshare_create.go
- grocerylistshare_delete.go
- grocerylistshare_query.go
- grocerylistshare_update.go
- movie.go
- movie_create.go
- movie_delete.go
- movie_query.go
- movie_update.go
- moviecollection.go
- moviecollection_create.go
- moviecollection_delete.go
- moviecollection_query.go
- moviecollection_update.go
- moviecollectionshare.go
- moviecollectionshare_create.go
- moviecollectionshare_delete.go
- moviecollectionshare_query.go
- moviecollectionshare_update.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go