Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Goods
- type GoodsClient
- func (c *GoodsClient) Create() *GoodsCreate
- func (c *GoodsClient) CreateBulk(builders ...*GoodsCreate) *GoodsCreateBulk
- func (c *GoodsClient) Delete() *GoodsDelete
- func (c *GoodsClient) DeleteOne(_go *Goods) *GoodsDeleteOne
- func (c *GoodsClient) DeleteOneID(id int64) *GoodsDeleteOne
- func (c *GoodsClient) Get(ctx context.Context, id int64) (*Goods, error)
- func (c *GoodsClient) GetX(ctx context.Context, id int64) *Goods
- func (c *GoodsClient) Hooks() []Hook
- func (c *GoodsClient) Query() *GoodsQuery
- func (c *GoodsClient) Update() *GoodsUpdate
- func (c *GoodsClient) UpdateOne(_go *Goods) *GoodsUpdateOne
- func (c *GoodsClient) UpdateOneID(id int64) *GoodsUpdateOne
- func (c *GoodsClient) Use(hooks ...Hook)
- type GoodsCreate
- func (gc *GoodsCreate) Mutation() *GoodsMutation
- func (gc *GoodsCreate) Save(ctx context.Context) (*Goods, error)
- func (gc *GoodsCreate) SaveX(ctx context.Context) *Goods
- func (gc *GoodsCreate) SetCreatedAt(t time.Time) *GoodsCreate
- func (gc *GoodsCreate) SetID(i int64) *GoodsCreate
- func (gc *GoodsCreate) SetIntro(s string) *GoodsCreate
- func (gc *GoodsCreate) SetNillableCreatedAt(t *time.Time) *GoodsCreate
- func (gc *GoodsCreate) SetNillableUpdatedAt(t *time.Time) *GoodsCreate
- func (gc *GoodsCreate) SetTitle(s string) *GoodsCreate
- func (gc *GoodsCreate) SetUpdatedAt(t time.Time) *GoodsCreate
- type GoodsCreateBulk
- type GoodsDelete
- type GoodsDeleteOne
- type GoodsGroupBy
- func (ggb *GoodsGroupBy) Aggregate(fns ...AggregateFunc) *GoodsGroupBy
- func (ggb *GoodsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ggb *GoodsGroupBy) BoolX(ctx context.Context) bool
- func (ggb *GoodsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ggb *GoodsGroupBy) BoolsX(ctx context.Context) []bool
- func (ggb *GoodsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ggb *GoodsGroupBy) Float64X(ctx context.Context) float64
- func (ggb *GoodsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ggb *GoodsGroupBy) Float64sX(ctx context.Context) []float64
- func (ggb *GoodsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ggb *GoodsGroupBy) IntX(ctx context.Context) int
- func (ggb *GoodsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ggb *GoodsGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GoodsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ggb *GoodsGroupBy) ScanX(ctx context.Context, v interface{})
- func (ggb *GoodsGroupBy) String(ctx context.Context) (_ string, err error)
- func (ggb *GoodsGroupBy) StringX(ctx context.Context) string
- func (ggb *GoodsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ggb *GoodsGroupBy) StringsX(ctx context.Context) []string
- type GoodsMutation
- func (m *GoodsMutation) AddField(name string, value ent.Value) error
- func (m *GoodsMutation) AddedEdges() []string
- func (m *GoodsMutation) AddedField(name string) (ent.Value, bool)
- func (m *GoodsMutation) AddedFields() []string
- func (m *GoodsMutation) AddedIDs(name string) []ent.Value
- func (m *GoodsMutation) ClearEdge(name string) error
- func (m *GoodsMutation) ClearField(name string) error
- func (m *GoodsMutation) ClearedEdges() []string
- func (m *GoodsMutation) ClearedFields() []string
- func (m GoodsMutation) Client() *Client
- func (m *GoodsMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GoodsMutation) EdgeCleared(name string) bool
- func (m *GoodsMutation) Field(name string) (ent.Value, bool)
- func (m *GoodsMutation) FieldCleared(name string) bool
- func (m *GoodsMutation) Fields() []string
- func (m *GoodsMutation) ID() (id int64, exists bool)
- func (m *GoodsMutation) Intro() (r string, exists bool)
- func (m *GoodsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GoodsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GoodsMutation) OldIntro(ctx context.Context) (v string, err error)
- func (m *GoodsMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *GoodsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GoodsMutation) Op() Op
- func (m *GoodsMutation) RemovedEdges() []string
- func (m *GoodsMutation) RemovedIDs(name string) []ent.Value
- func (m *GoodsMutation) ResetCreatedAt()
- func (m *GoodsMutation) ResetEdge(name string) error
- func (m *GoodsMutation) ResetField(name string) error
- func (m *GoodsMutation) ResetIntro()
- func (m *GoodsMutation) ResetTitle()
- func (m *GoodsMutation) ResetUpdatedAt()
- func (m *GoodsMutation) SetCreatedAt(t time.Time)
- func (m *GoodsMutation) SetField(name string, value ent.Value) error
- func (m *GoodsMutation) SetID(id int64)
- func (m *GoodsMutation) SetIntro(s string)
- func (m *GoodsMutation) SetTitle(s string)
- func (m *GoodsMutation) SetUpdatedAt(t time.Time)
- func (m *GoodsMutation) Title() (r string, exists bool)
- func (m GoodsMutation) Tx() (*Tx, error)
- func (m *GoodsMutation) Type() string
- func (m *GoodsMutation) UpdatedAt() (r time.Time, exists bool)
- type GoodsQuery
- func (gq *GoodsQuery) All(ctx context.Context) ([]*Goods, error)
- func (gq *GoodsQuery) AllX(ctx context.Context) []*Goods
- func (gq *GoodsQuery) Clone() *GoodsQuery
- func (gq *GoodsQuery) Count(ctx context.Context) (int, error)
- func (gq *GoodsQuery) CountX(ctx context.Context) int
- func (gq *GoodsQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GoodsQuery) ExistX(ctx context.Context) bool
- func (gq *GoodsQuery) First(ctx context.Context) (*Goods, error)
- func (gq *GoodsQuery) FirstID(ctx context.Context) (id int64, err error)
- func (gq *GoodsQuery) FirstIDX(ctx context.Context) int64
- func (gq *GoodsQuery) FirstX(ctx context.Context) *Goods
- func (gq *GoodsQuery) GroupBy(field string, fields ...string) *GoodsGroupBy
- func (gq *GoodsQuery) IDs(ctx context.Context) ([]int64, error)
- func (gq *GoodsQuery) IDsX(ctx context.Context) []int64
- func (gq *GoodsQuery) Limit(limit int) *GoodsQuery
- func (gq *GoodsQuery) Offset(offset int) *GoodsQuery
- func (gq *GoodsQuery) Only(ctx context.Context) (*Goods, error)
- func (gq *GoodsQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (gq *GoodsQuery) OnlyIDX(ctx context.Context) int64
- func (gq *GoodsQuery) OnlyX(ctx context.Context) *Goods
- func (gq *GoodsQuery) Order(o ...OrderFunc) *GoodsQuery
- func (gq *GoodsQuery) Select(field string, fields ...string) *GoodsSelect
- func (gq *GoodsQuery) Unique(unique bool) *GoodsQuery
- func (gq *GoodsQuery) Where(ps ...predicate.Goods) *GoodsQuery
- type GoodsSelect
- func (gs *GoodsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (gs *GoodsSelect) BoolX(ctx context.Context) bool
- func (gs *GoodsSelect) Bools(ctx context.Context) ([]bool, error)
- func (gs *GoodsSelect) BoolsX(ctx context.Context) []bool
- func (gs *GoodsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (gs *GoodsSelect) Float64X(ctx context.Context) float64
- func (gs *GoodsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (gs *GoodsSelect) Float64sX(ctx context.Context) []float64
- func (gs *GoodsSelect) Int(ctx context.Context) (_ int, err error)
- func (gs *GoodsSelect) IntX(ctx context.Context) int
- func (gs *GoodsSelect) Ints(ctx context.Context) ([]int, error)
- func (gs *GoodsSelect) IntsX(ctx context.Context) []int
- func (gs *GoodsSelect) Scan(ctx context.Context, v interface{}) error
- func (gs *GoodsSelect) ScanX(ctx context.Context, v interface{})
- func (gs *GoodsSelect) String(ctx context.Context) (_ string, err error)
- func (gs *GoodsSelect) StringX(ctx context.Context) string
- func (gs *GoodsSelect) Strings(ctx context.Context) ([]string, error)
- func (gs *GoodsSelect) StringsX(ctx context.Context) []string
- type GoodsSlice
- type GoodsUpdate
- func (gu *GoodsUpdate) Exec(ctx context.Context) error
- func (gu *GoodsUpdate) ExecX(ctx context.Context)
- func (gu *GoodsUpdate) Mutation() *GoodsMutation
- func (gu *GoodsUpdate) Save(ctx context.Context) (int, error)
- func (gu *GoodsUpdate) SaveX(ctx context.Context) int
- func (gu *GoodsUpdate) SetCreatedAt(t time.Time) *GoodsUpdate
- func (gu *GoodsUpdate) SetIntro(s string) *GoodsUpdate
- func (gu *GoodsUpdate) SetNillableCreatedAt(t *time.Time) *GoodsUpdate
- func (gu *GoodsUpdate) SetNillableUpdatedAt(t *time.Time) *GoodsUpdate
- func (gu *GoodsUpdate) SetTitle(s string) *GoodsUpdate
- func (gu *GoodsUpdate) SetUpdatedAt(t time.Time) *GoodsUpdate
- func (gu *GoodsUpdate) Where(ps ...predicate.Goods) *GoodsUpdate
- type GoodsUpdateOne
- func (guo *GoodsUpdateOne) Exec(ctx context.Context) error
- func (guo *GoodsUpdateOne) ExecX(ctx context.Context)
- func (guo *GoodsUpdateOne) Mutation() *GoodsMutation
- func (guo *GoodsUpdateOne) Save(ctx context.Context) (*Goods, error)
- func (guo *GoodsUpdateOne) SaveX(ctx context.Context) *Goods
- func (guo *GoodsUpdateOne) Select(field string, fields ...string) *GoodsUpdateOne
- func (guo *GoodsUpdateOne) SetCreatedAt(t time.Time) *GoodsUpdateOne
- func (guo *GoodsUpdateOne) SetIntro(s string) *GoodsUpdateOne
- func (guo *GoodsUpdateOne) SetNillableCreatedAt(t *time.Time) *GoodsUpdateOne
- func (guo *GoodsUpdateOne) SetNillableUpdatedAt(t *time.Time) *GoodsUpdateOne
- func (guo *GoodsUpdateOne) SetTitle(s string) *GoodsUpdateOne
- func (guo *GoodsUpdateOne) SetUpdatedAt(t time.Time) *GoodsUpdateOne
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type Order
- type OrderClient
- func (c *OrderClient) Create() *OrderCreate
- func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
- func (c *OrderClient) Delete() *OrderDelete
- func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
- func (c *OrderClient) DeleteOneID(id int64) *OrderDeleteOne
- func (c *OrderClient) Get(ctx context.Context, id int64) (*Order, error)
- func (c *OrderClient) GetX(ctx context.Context, id int64) *Order
- func (c *OrderClient) Hooks() []Hook
- func (c *OrderClient) Query() *OrderQuery
- func (c *OrderClient) Update() *OrderUpdate
- func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
- func (c *OrderClient) UpdateOneID(id int64) *OrderUpdateOne
- func (c *OrderClient) Use(hooks ...Hook)
- type OrderCreate
- func (oc *OrderCreate) Mutation() *OrderMutation
- func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
- func (oc *OrderCreate) SaveX(ctx context.Context) *Order
- func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetGid(i int64) *OrderCreate
- func (oc *OrderCreate) SetID(i int64) *OrderCreate
- func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetSn(s string) *OrderCreate
- func (oc *OrderCreate) SetUID(i int64) *OrderCreate
- func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
- type OrderCreateBulk
- type OrderDelete
- type OrderDeleteOne
- type OrderFunc
- type OrderGoods
- type OrderGoodsClient
- func (c *OrderGoodsClient) Create() *OrderGoodsCreate
- func (c *OrderGoodsClient) CreateBulk(builders ...*OrderGoodsCreate) *OrderGoodsCreateBulk
- func (c *OrderGoodsClient) Delete() *OrderGoodsDelete
- func (c *OrderGoodsClient) DeleteOne(og *OrderGoods) *OrderGoodsDeleteOne
- func (c *OrderGoodsClient) DeleteOneID(id int64) *OrderGoodsDeleteOne
- func (c *OrderGoodsClient) Get(ctx context.Context, id int64) (*OrderGoods, error)
- func (c *OrderGoodsClient) GetX(ctx context.Context, id int64) *OrderGoods
- func (c *OrderGoodsClient) Hooks() []Hook
- func (c *OrderGoodsClient) Query() *OrderGoodsQuery
- func (c *OrderGoodsClient) Update() *OrderGoodsUpdate
- func (c *OrderGoodsClient) UpdateOne(og *OrderGoods) *OrderGoodsUpdateOne
- func (c *OrderGoodsClient) UpdateOneID(id int64) *OrderGoodsUpdateOne
- func (c *OrderGoodsClient) Use(hooks ...Hook)
- type OrderGoodsCreate
- func (ogc *OrderGoodsCreate) Mutation() *OrderGoodsMutation
- func (ogc *OrderGoodsCreate) Save(ctx context.Context) (*OrderGoods, error)
- func (ogc *OrderGoodsCreate) SaveX(ctx context.Context) *OrderGoods
- func (ogc *OrderGoodsCreate) SetCreatedAt(t time.Time) *OrderGoodsCreate
- func (ogc *OrderGoodsCreate) SetGoodsID(i int64) *OrderGoodsCreate
- func (ogc *OrderGoodsCreate) SetGoodsTitle(s string) *OrderGoodsCreate
- func (ogc *OrderGoodsCreate) SetID(i int64) *OrderGoodsCreate
- func (ogc *OrderGoodsCreate) SetNillableCreatedAt(t *time.Time) *OrderGoodsCreate
- func (ogc *OrderGoodsCreate) SetNillableUpdatedAt(t *time.Time) *OrderGoodsCreate
- func (ogc *OrderGoodsCreate) SetOrderID(i int64) *OrderGoodsCreate
- func (ogc *OrderGoodsCreate) SetUpdatedAt(t time.Time) *OrderGoodsCreate
- type OrderGoodsCreateBulk
- type OrderGoodsDelete
- type OrderGoodsDeleteOne
- type OrderGoodsGroupBy
- func (oggb *OrderGoodsGroupBy) Aggregate(fns ...AggregateFunc) *OrderGoodsGroupBy
- func (oggb *OrderGoodsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (oggb *OrderGoodsGroupBy) BoolX(ctx context.Context) bool
- func (oggb *OrderGoodsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (oggb *OrderGoodsGroupBy) BoolsX(ctx context.Context) []bool
- func (oggb *OrderGoodsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (oggb *OrderGoodsGroupBy) Float64X(ctx context.Context) float64
- func (oggb *OrderGoodsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (oggb *OrderGoodsGroupBy) Float64sX(ctx context.Context) []float64
- func (oggb *OrderGoodsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (oggb *OrderGoodsGroupBy) IntX(ctx context.Context) int
- func (oggb *OrderGoodsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (oggb *OrderGoodsGroupBy) IntsX(ctx context.Context) []int
- func (oggb *OrderGoodsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (oggb *OrderGoodsGroupBy) ScanX(ctx context.Context, v interface{})
- func (oggb *OrderGoodsGroupBy) String(ctx context.Context) (_ string, err error)
- func (oggb *OrderGoodsGroupBy) StringX(ctx context.Context) string
- func (oggb *OrderGoodsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (oggb *OrderGoodsGroupBy) StringsX(ctx context.Context) []string
- type OrderGoodsMutation
- func (m *OrderGoodsMutation) AddField(name string, value ent.Value) error
- func (m *OrderGoodsMutation) AddGoodsID(i int64)
- func (m *OrderGoodsMutation) AddOrderID(i int64)
- func (m *OrderGoodsMutation) AddedEdges() []string
- func (m *OrderGoodsMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderGoodsMutation) AddedFields() []string
- func (m *OrderGoodsMutation) AddedGoodsID() (r int64, exists bool)
- func (m *OrderGoodsMutation) AddedIDs(name string) []ent.Value
- func (m *OrderGoodsMutation) AddedOrderID() (r int64, exists bool)
- func (m *OrderGoodsMutation) ClearEdge(name string) error
- func (m *OrderGoodsMutation) ClearField(name string) error
- func (m *OrderGoodsMutation) ClearedEdges() []string
- func (m *OrderGoodsMutation) ClearedFields() []string
- func (m OrderGoodsMutation) Client() *Client
- func (m *OrderGoodsMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderGoodsMutation) EdgeCleared(name string) bool
- func (m *OrderGoodsMutation) Field(name string) (ent.Value, bool)
- func (m *OrderGoodsMutation) FieldCleared(name string) bool
- func (m *OrderGoodsMutation) Fields() []string
- func (m *OrderGoodsMutation) GoodsID() (r int64, exists bool)
- func (m *OrderGoodsMutation) GoodsTitle() (r string, exists bool)
- func (m *OrderGoodsMutation) ID() (id int64, exists bool)
- func (m *OrderGoodsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderGoodsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderGoodsMutation) OldGoodsID(ctx context.Context) (v int64, err error)
- func (m *OrderGoodsMutation) OldGoodsTitle(ctx context.Context) (v string, err error)
- func (m *OrderGoodsMutation) OldOrderID(ctx context.Context) (v int64, err error)
- func (m *OrderGoodsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderGoodsMutation) Op() Op
- func (m *OrderGoodsMutation) OrderID() (r int64, exists bool)
- func (m *OrderGoodsMutation) RemovedEdges() []string
- func (m *OrderGoodsMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderGoodsMutation) ResetCreatedAt()
- func (m *OrderGoodsMutation) ResetEdge(name string) error
- func (m *OrderGoodsMutation) ResetField(name string) error
- func (m *OrderGoodsMutation) ResetGoodsID()
- func (m *OrderGoodsMutation) ResetGoodsTitle()
- func (m *OrderGoodsMutation) ResetOrderID()
- func (m *OrderGoodsMutation) ResetUpdatedAt()
- func (m *OrderGoodsMutation) SetCreatedAt(t time.Time)
- func (m *OrderGoodsMutation) SetField(name string, value ent.Value) error
- func (m *OrderGoodsMutation) SetGoodsID(i int64)
- func (m *OrderGoodsMutation) SetGoodsTitle(s string)
- func (m *OrderGoodsMutation) SetID(id int64)
- func (m *OrderGoodsMutation) SetOrderID(i int64)
- func (m *OrderGoodsMutation) SetUpdatedAt(t time.Time)
- func (m OrderGoodsMutation) Tx() (*Tx, error)
- func (m *OrderGoodsMutation) Type() string
- func (m *OrderGoodsMutation) UpdatedAt() (r time.Time, exists bool)
- type OrderGoodsQuery
- func (ogq *OrderGoodsQuery) All(ctx context.Context) ([]*OrderGoods, error)
- func (ogq *OrderGoodsQuery) AllX(ctx context.Context) []*OrderGoods
- func (ogq *OrderGoodsQuery) Clone() *OrderGoodsQuery
- func (ogq *OrderGoodsQuery) Count(ctx context.Context) (int, error)
- func (ogq *OrderGoodsQuery) CountX(ctx context.Context) int
- func (ogq *OrderGoodsQuery) Exist(ctx context.Context) (bool, error)
- func (ogq *OrderGoodsQuery) ExistX(ctx context.Context) bool
- func (ogq *OrderGoodsQuery) First(ctx context.Context) (*OrderGoods, error)
- func (ogq *OrderGoodsQuery) FirstID(ctx context.Context) (id int64, err error)
- func (ogq *OrderGoodsQuery) FirstIDX(ctx context.Context) int64
- func (ogq *OrderGoodsQuery) FirstX(ctx context.Context) *OrderGoods
- func (ogq *OrderGoodsQuery) GroupBy(field string, fields ...string) *OrderGoodsGroupBy
- func (ogq *OrderGoodsQuery) IDs(ctx context.Context) ([]int64, error)
- func (ogq *OrderGoodsQuery) IDsX(ctx context.Context) []int64
- func (ogq *OrderGoodsQuery) Limit(limit int) *OrderGoodsQuery
- func (ogq *OrderGoodsQuery) Offset(offset int) *OrderGoodsQuery
- func (ogq *OrderGoodsQuery) Only(ctx context.Context) (*OrderGoods, error)
- func (ogq *OrderGoodsQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (ogq *OrderGoodsQuery) OnlyIDX(ctx context.Context) int64
- func (ogq *OrderGoodsQuery) OnlyX(ctx context.Context) *OrderGoods
- func (ogq *OrderGoodsQuery) Order(o ...OrderFunc) *OrderGoodsQuery
- func (ogq *OrderGoodsQuery) Select(field string, fields ...string) *OrderGoodsSelect
- func (ogq *OrderGoodsQuery) Unique(unique bool) *OrderGoodsQuery
- func (ogq *OrderGoodsQuery) Where(ps ...predicate.OrderGoods) *OrderGoodsQuery
- type OrderGoodsSelect
- func (ogs *OrderGoodsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ogs *OrderGoodsSelect) BoolX(ctx context.Context) bool
- func (ogs *OrderGoodsSelect) Bools(ctx context.Context) ([]bool, error)
- func (ogs *OrderGoodsSelect) BoolsX(ctx context.Context) []bool
- func (ogs *OrderGoodsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ogs *OrderGoodsSelect) Float64X(ctx context.Context) float64
- func (ogs *OrderGoodsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ogs *OrderGoodsSelect) Float64sX(ctx context.Context) []float64
- func (ogs *OrderGoodsSelect) Int(ctx context.Context) (_ int, err error)
- func (ogs *OrderGoodsSelect) IntX(ctx context.Context) int
- func (ogs *OrderGoodsSelect) Ints(ctx context.Context) ([]int, error)
- func (ogs *OrderGoodsSelect) IntsX(ctx context.Context) []int
- func (ogs *OrderGoodsSelect) Scan(ctx context.Context, v interface{}) error
- func (ogs *OrderGoodsSelect) ScanX(ctx context.Context, v interface{})
- func (ogs *OrderGoodsSelect) String(ctx context.Context) (_ string, err error)
- func (ogs *OrderGoodsSelect) StringX(ctx context.Context) string
- func (ogs *OrderGoodsSelect) Strings(ctx context.Context) ([]string, error)
- func (ogs *OrderGoodsSelect) StringsX(ctx context.Context) []string
- type OrderGoodsSlice
- type OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) AddGoodsID(i int64) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) AddOrderID(i int64) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) Exec(ctx context.Context) error
- func (ogu *OrderGoodsUpdate) ExecX(ctx context.Context)
- func (ogu *OrderGoodsUpdate) Mutation() *OrderGoodsMutation
- func (ogu *OrderGoodsUpdate) Save(ctx context.Context) (int, error)
- func (ogu *OrderGoodsUpdate) SaveX(ctx context.Context) int
- func (ogu *OrderGoodsUpdate) SetCreatedAt(t time.Time) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) SetGoodsID(i int64) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) SetGoodsTitle(s string) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) SetNillableCreatedAt(t *time.Time) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) SetNillableUpdatedAt(t *time.Time) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) SetOrderID(i int64) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) SetUpdatedAt(t time.Time) *OrderGoodsUpdate
- func (ogu *OrderGoodsUpdate) Where(ps ...predicate.OrderGoods) *OrderGoodsUpdate
- type OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) AddGoodsID(i int64) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) AddOrderID(i int64) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) Exec(ctx context.Context) error
- func (oguo *OrderGoodsUpdateOne) ExecX(ctx context.Context)
- func (oguo *OrderGoodsUpdateOne) Mutation() *OrderGoodsMutation
- func (oguo *OrderGoodsUpdateOne) Save(ctx context.Context) (*OrderGoods, error)
- func (oguo *OrderGoodsUpdateOne) SaveX(ctx context.Context) *OrderGoods
- func (oguo *OrderGoodsUpdateOne) Select(field string, fields ...string) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) SetCreatedAt(t time.Time) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) SetGoodsID(i int64) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) SetGoodsTitle(s string) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) SetNillableCreatedAt(t *time.Time) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) SetOrderID(i int64) *OrderGoodsUpdateOne
- func (oguo *OrderGoodsUpdateOne) SetUpdatedAt(t time.Time) *OrderGoodsUpdateOne
- type OrderGroupBy
- func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
- func (ogb *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ogb *OrderGroupBy) BoolX(ctx context.Context) bool
- func (ogb *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ogb *OrderGroupBy) BoolsX(ctx context.Context) []bool
- func (ogb *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ogb *OrderGroupBy) Float64X(ctx context.Context) float64
- func (ogb *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ogb *OrderGroupBy) Float64sX(ctx context.Context) []float64
- func (ogb *OrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ogb *OrderGroupBy) IntX(ctx context.Context) int
- func (ogb *OrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ogb *OrderGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OrderGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ogb *OrderGroupBy) ScanX(ctx context.Context, v interface{})
- func (ogb *OrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (ogb *OrderGroupBy) StringX(ctx context.Context) string
- func (ogb *OrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ogb *OrderGroupBy) StringsX(ctx context.Context) []string
- type OrderMutation
- func (m *OrderMutation) AddField(name string, value ent.Value) error
- func (m *OrderMutation) AddGid(i int64)
- func (m *OrderMutation) AddUID(i int64)
- func (m *OrderMutation) AddedEdges() []string
- func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderMutation) AddedFields() []string
- func (m *OrderMutation) AddedGid() (r int64, exists bool)
- func (m *OrderMutation) AddedIDs(name string) []ent.Value
- func (m *OrderMutation) AddedUID() (r int64, exists bool)
- func (m *OrderMutation) ClearEdge(name string) error
- func (m *OrderMutation) ClearField(name string) error
- func (m *OrderMutation) ClearedEdges() []string
- func (m *OrderMutation) ClearedFields() []string
- func (m OrderMutation) Client() *Client
- func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) EdgeCleared(name string) bool
- func (m *OrderMutation) Field(name string) (ent.Value, bool)
- func (m *OrderMutation) FieldCleared(name string) bool
- func (m *OrderMutation) Fields() []string
- func (m *OrderMutation) Gid() (r int64, exists bool)
- func (m *OrderMutation) ID() (id int64, exists bool)
- func (m *OrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderMutation) OldGid(ctx context.Context) (v int64, err error)
- func (m *OrderMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldUID(ctx context.Context) (v int64, err error)
- func (m *OrderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) Op() Op
- func (m *OrderMutation) RemovedEdges() []string
- func (m *OrderMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderMutation) ResetCreatedAt()
- func (m *OrderMutation) ResetEdge(name string) error
- func (m *OrderMutation) ResetField(name string) error
- func (m *OrderMutation) ResetGid()
- func (m *OrderMutation) ResetSn()
- func (m *OrderMutation) ResetUID()
- func (m *OrderMutation) ResetUpdatedAt()
- func (m *OrderMutation) SetCreatedAt(t time.Time)
- func (m *OrderMutation) SetField(name string, value ent.Value) error
- func (m *OrderMutation) SetGid(i int64)
- func (m *OrderMutation) SetID(id int64)
- func (m *OrderMutation) SetSn(s string)
- func (m *OrderMutation) SetUID(i int64)
- func (m *OrderMutation) SetUpdatedAt(t time.Time)
- func (m *OrderMutation) Sn() (r string, exists bool)
- func (m OrderMutation) Tx() (*Tx, error)
- func (m *OrderMutation) Type() string
- func (m *OrderMutation) UID() (r int64, exists bool)
- func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
- type OrderQuery
- func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
- func (oq *OrderQuery) AllX(ctx context.Context) []*Order
- func (oq *OrderQuery) Clone() *OrderQuery
- func (oq *OrderQuery) Count(ctx context.Context) (int, error)
- func (oq *OrderQuery) CountX(ctx context.Context) int
- func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OrderQuery) ExistX(ctx context.Context) bool
- func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) FirstID(ctx context.Context) (id int64, err error)
- func (oq *OrderQuery) FirstIDX(ctx context.Context) int64
- func (oq *OrderQuery) FirstX(ctx context.Context) *Order
- func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
- func (oq *OrderQuery) IDs(ctx context.Context) ([]int64, error)
- func (oq *OrderQuery) IDsX(ctx context.Context) []int64
- func (oq *OrderQuery) Limit(limit int) *OrderQuery
- func (oq *OrderQuery) Offset(offset int) *OrderQuery
- func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (oq *OrderQuery) OnlyIDX(ctx context.Context) int64
- func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
- func (oq *OrderQuery) Order(o ...OrderFunc) *OrderQuery
- func (oq *OrderQuery) Select(field string, fields ...string) *OrderSelect
- func (oq *OrderQuery) Unique(unique bool) *OrderQuery
- func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
- type OrderSelect
- func (os *OrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (os *OrderSelect) BoolX(ctx context.Context) bool
- func (os *OrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (os *OrderSelect) BoolsX(ctx context.Context) []bool
- func (os *OrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (os *OrderSelect) Float64X(ctx context.Context) float64
- func (os *OrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (os *OrderSelect) Float64sX(ctx context.Context) []float64
- func (os *OrderSelect) Int(ctx context.Context) (_ int, err error)
- func (os *OrderSelect) IntX(ctx context.Context) int
- func (os *OrderSelect) Ints(ctx context.Context) ([]int, error)
- func (os *OrderSelect) IntsX(ctx context.Context) []int
- func (os *OrderSelect) Scan(ctx context.Context, v interface{}) error
- func (os *OrderSelect) ScanX(ctx context.Context, v interface{})
- func (os *OrderSelect) String(ctx context.Context) (_ string, err error)
- func (os *OrderSelect) StringX(ctx context.Context) string
- func (os *OrderSelect) Strings(ctx context.Context) ([]string, error)
- func (os *OrderSelect) StringsX(ctx context.Context) []string
- type OrderUpdate
- func (ou *OrderUpdate) AddGid(i int64) *OrderUpdate
- func (ou *OrderUpdate) AddUID(i int64) *OrderUpdate
- func (ou *OrderUpdate) Exec(ctx context.Context) error
- func (ou *OrderUpdate) ExecX(ctx context.Context)
- func (ou *OrderUpdate) Mutation() *OrderMutation
- func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrderUpdate) SaveX(ctx context.Context) int
- func (ou *OrderUpdate) SetCreatedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetGid(i int64) *OrderUpdate
- func (ou *OrderUpdate) SetNillableCreatedAt(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetNillableUpdatedAt(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetSn(s string) *OrderUpdate
- func (ou *OrderUpdate) SetUID(i int64) *OrderUpdate
- func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
- type OrderUpdateOne
- func (ouo *OrderUpdateOne) AddGid(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddUID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrderUpdateOne) Mutation() *OrderMutation
- func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
- func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
- func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetCreatedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetGid(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableCreatedAt(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetSn(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetUID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
- type Orders
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeGoods = "Goods" TypeOrder = "Order" TypeOrderGoods = "OrderGoods" )
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 validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Goods is the client for interacting with the Goods builders. Goods *GoodsClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderGoods is the client for interacting with the OrderGoods builders. OrderGoods *OrderGoodsClient // 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(). Goods. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(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 Goods ¶
type Goods struct { // ID of the ent. ID int64 `json:"id,omitempty"` // Title holds the value of the "title" field. // 标题 Title string `json:"title,omitempty"` // Intro holds the value of the "intro" field. // 简介 Intro string `json:"intro,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // contains filtered or unexported fields }
Goods is the model entity for the Goods schema.
func (*Goods) Unwrap ¶
Unwrap unwraps the Goods 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 (*Goods) Update ¶
func (_go *Goods) Update() *GoodsUpdateOne
Update returns a builder for updating this Goods. Note that you need to call Goods.Unwrap() before calling this method if this Goods was returned from a transaction, and the transaction was committed or rolled back.
type GoodsClient ¶
type GoodsClient struct {
// contains filtered or unexported fields
}
GoodsClient is a client for the Goods schema.
func NewGoodsClient ¶
func NewGoodsClient(c config) *GoodsClient
NewGoodsClient returns a client for the Goods from the given config.
func (*GoodsClient) Create ¶
func (c *GoodsClient) Create() *GoodsCreate
Create returns a create builder for Goods.
func (*GoodsClient) CreateBulk ¶
func (c *GoodsClient) CreateBulk(builders ...*GoodsCreate) *GoodsCreateBulk
CreateBulk returns a builder for creating a bulk of Goods entities.
func (*GoodsClient) Delete ¶
func (c *GoodsClient) Delete() *GoodsDelete
Delete returns a delete builder for Goods.
func (*GoodsClient) DeleteOne ¶
func (c *GoodsClient) DeleteOne(_go *Goods) *GoodsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*GoodsClient) DeleteOneID ¶
func (c *GoodsClient) DeleteOneID(id int64) *GoodsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*GoodsClient) GetX ¶
func (c *GoodsClient) GetX(ctx context.Context, id int64) *Goods
GetX is like Get, but panics if an error occurs.
func (*GoodsClient) Query ¶
func (c *GoodsClient) Query() *GoodsQuery
Query returns a query builder for Goods.
func (*GoodsClient) Update ¶
func (c *GoodsClient) Update() *GoodsUpdate
Update returns an update builder for Goods.
func (*GoodsClient) UpdateOne ¶
func (c *GoodsClient) UpdateOne(_go *Goods) *GoodsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GoodsClient) UpdateOneID ¶
func (c *GoodsClient) UpdateOneID(id int64) *GoodsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GoodsClient) Use ¶
func (c *GoodsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `goods.Hooks(f(g(h())))`.
type GoodsCreate ¶
type GoodsCreate struct {
// contains filtered or unexported fields
}
GoodsCreate is the builder for creating a Goods entity.
func (*GoodsCreate) Mutation ¶
func (gc *GoodsCreate) Mutation() *GoodsMutation
Mutation returns the GoodsMutation object of the builder.
func (*GoodsCreate) Save ¶
func (gc *GoodsCreate) Save(ctx context.Context) (*Goods, error)
Save creates the Goods in the database.
func (*GoodsCreate) SaveX ¶
func (gc *GoodsCreate) SaveX(ctx context.Context) *Goods
SaveX calls Save and panics if Save returns an error.
func (*GoodsCreate) SetCreatedAt ¶
func (gc *GoodsCreate) SetCreatedAt(t time.Time) *GoodsCreate
SetCreatedAt sets the "created_at" field.
func (*GoodsCreate) SetID ¶
func (gc *GoodsCreate) SetID(i int64) *GoodsCreate
SetID sets the "id" field.
func (*GoodsCreate) SetIntro ¶
func (gc *GoodsCreate) SetIntro(s string) *GoodsCreate
SetIntro sets the "intro" field.
func (*GoodsCreate) SetNillableCreatedAt ¶
func (gc *GoodsCreate) SetNillableCreatedAt(t *time.Time) *GoodsCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GoodsCreate) SetNillableUpdatedAt ¶
func (gc *GoodsCreate) SetNillableUpdatedAt(t *time.Time) *GoodsCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GoodsCreate) SetTitle ¶
func (gc *GoodsCreate) SetTitle(s string) *GoodsCreate
SetTitle sets the "title" field.
func (*GoodsCreate) SetUpdatedAt ¶
func (gc *GoodsCreate) SetUpdatedAt(t time.Time) *GoodsCreate
SetUpdatedAt sets the "updated_at" field.
type GoodsCreateBulk ¶
type GoodsCreateBulk struct {
// contains filtered or unexported fields
}
GoodsCreateBulk is the builder for creating many Goods entities in bulk.
type GoodsDelete ¶
type GoodsDelete struct {
// contains filtered or unexported fields
}
GoodsDelete is the builder for deleting a Goods entity.
func (*GoodsDelete) Exec ¶
func (gd *GoodsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GoodsDelete) ExecX ¶
func (gd *GoodsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GoodsDelete) Where ¶
func (gd *GoodsDelete) Where(ps ...predicate.Goods) *GoodsDelete
Where adds a new predicate to the GoodsDelete builder.
type GoodsDeleteOne ¶
type GoodsDeleteOne struct {
// contains filtered or unexported fields
}
GoodsDeleteOne is the builder for deleting a single Goods entity.
func (*GoodsDeleteOne) Exec ¶
func (gdo *GoodsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GoodsDeleteOne) ExecX ¶
func (gdo *GoodsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GoodsGroupBy ¶
type GoodsGroupBy struct {
// contains filtered or unexported fields
}
GoodsGroupBy is the group-by builder for Goods entities.
func (*GoodsGroupBy) Aggregate ¶
func (ggb *GoodsGroupBy) Aggregate(fns ...AggregateFunc) *GoodsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GoodsGroupBy) Bool ¶
func (ggb *GoodsGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GoodsGroupBy) BoolX ¶
func (ggb *GoodsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GoodsGroupBy) Bools ¶
func (ggb *GoodsGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*GoodsGroupBy) BoolsX ¶
func (ggb *GoodsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GoodsGroupBy) Float64 ¶
func (ggb *GoodsGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GoodsGroupBy) Float64X ¶
func (ggb *GoodsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GoodsGroupBy) Float64s ¶
func (ggb *GoodsGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*GoodsGroupBy) Float64sX ¶
func (ggb *GoodsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GoodsGroupBy) Int ¶
func (ggb *GoodsGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GoodsGroupBy) IntX ¶
func (ggb *GoodsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GoodsGroupBy) Ints ¶
func (ggb *GoodsGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*GoodsGroupBy) IntsX ¶
func (ggb *GoodsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GoodsGroupBy) Scan ¶
func (ggb *GoodsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*GoodsGroupBy) ScanX ¶
func (ggb *GoodsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GoodsGroupBy) String ¶
func (ggb *GoodsGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GoodsGroupBy) StringX ¶
func (ggb *GoodsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GoodsMutation ¶
type GoodsMutation struct {
// contains filtered or unexported fields
}
GoodsMutation represents an operation that mutates the Goods nodes in the graph.
func (*GoodsMutation) AddField ¶
func (m *GoodsMutation) 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 (*GoodsMutation) AddedEdges ¶
func (m *GoodsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GoodsMutation) AddedField ¶
func (m *GoodsMutation) 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 (*GoodsMutation) AddedFields ¶
func (m *GoodsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GoodsMutation) AddedIDs ¶
func (m *GoodsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GoodsMutation) ClearEdge ¶
func (m *GoodsMutation) 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 (*GoodsMutation) ClearField ¶
func (m *GoodsMutation) 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 (*GoodsMutation) ClearedEdges ¶
func (m *GoodsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GoodsMutation) ClearedFields ¶
func (m *GoodsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GoodsMutation) Client ¶
func (m GoodsMutation) 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 (*GoodsMutation) CreatedAt ¶
func (m *GoodsMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GoodsMutation) EdgeCleared ¶
func (m *GoodsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GoodsMutation) Field ¶
func (m *GoodsMutation) 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 (*GoodsMutation) FieldCleared ¶
func (m *GoodsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GoodsMutation) Fields ¶
func (m *GoodsMutation) 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 (*GoodsMutation) ID ¶
func (m *GoodsMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*GoodsMutation) Intro ¶
func (m *GoodsMutation) Intro() (r string, exists bool)
Intro returns the value of the "intro" field in the mutation.
func (*GoodsMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Goods entity. If the Goods 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 (*GoodsMutation) 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 (*GoodsMutation) OldIntro ¶
func (m *GoodsMutation) OldIntro(ctx context.Context) (v string, err error)
OldIntro returns the old "intro" field's value of the Goods entity. If the Goods 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 (*GoodsMutation) OldTitle ¶
func (m *GoodsMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Goods entity. If the Goods 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 (*GoodsMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Goods entity. If the Goods 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 (*GoodsMutation) RemovedEdges ¶
func (m *GoodsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GoodsMutation) RemovedIDs ¶
func (m *GoodsMutation) 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 (*GoodsMutation) ResetCreatedAt ¶
func (m *GoodsMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GoodsMutation) ResetEdge ¶
func (m *GoodsMutation) 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 (*GoodsMutation) ResetField ¶
func (m *GoodsMutation) 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 (*GoodsMutation) ResetIntro ¶
func (m *GoodsMutation) ResetIntro()
ResetIntro resets all changes to the "intro" field.
func (*GoodsMutation) ResetTitle ¶
func (m *GoodsMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*GoodsMutation) ResetUpdatedAt ¶
func (m *GoodsMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GoodsMutation) SetCreatedAt ¶
func (m *GoodsMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GoodsMutation) SetField ¶
func (m *GoodsMutation) 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 (*GoodsMutation) SetID ¶
func (m *GoodsMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Goods entities.
func (*GoodsMutation) SetIntro ¶
func (m *GoodsMutation) SetIntro(s string)
SetIntro sets the "intro" field.
func (*GoodsMutation) SetTitle ¶
func (m *GoodsMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*GoodsMutation) SetUpdatedAt ¶
func (m *GoodsMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*GoodsMutation) Title ¶
func (m *GoodsMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (GoodsMutation) Tx ¶
func (m GoodsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GoodsMutation) Type ¶
func (m *GoodsMutation) Type() string
Type returns the node type of this mutation (Goods).
type GoodsQuery ¶
type GoodsQuery struct {
// contains filtered or unexported fields
}
GoodsQuery is the builder for querying Goods entities.
func (*GoodsQuery) All ¶
func (gq *GoodsQuery) All(ctx context.Context) ([]*Goods, error)
All executes the query and returns a list of GoodsSlice.
func (*GoodsQuery) AllX ¶
func (gq *GoodsQuery) AllX(ctx context.Context) []*Goods
AllX is like All, but panics if an error occurs.
func (*GoodsQuery) Clone ¶
func (gq *GoodsQuery) Clone() *GoodsQuery
Clone returns a duplicate of the GoodsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GoodsQuery) Count ¶
func (gq *GoodsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GoodsQuery) CountX ¶
func (gq *GoodsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GoodsQuery) Exist ¶
func (gq *GoodsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GoodsQuery) ExistX ¶
func (gq *GoodsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GoodsQuery) First ¶
func (gq *GoodsQuery) First(ctx context.Context) (*Goods, error)
First returns the first Goods entity from the query. Returns a *NotFoundError when no Goods was found.
func (*GoodsQuery) FirstID ¶
func (gq *GoodsQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Goods ID from the query. Returns a *NotFoundError when no Goods ID was found.
func (*GoodsQuery) FirstIDX ¶
func (gq *GoodsQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GoodsQuery) FirstX ¶
func (gq *GoodsQuery) FirstX(ctx context.Context) *Goods
FirstX is like First, but panics if an error occurs.
func (*GoodsQuery) GroupBy ¶
func (gq *GoodsQuery) GroupBy(field string, fields ...string) *GoodsGroupBy
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 { Title string `json:"title,omitempty"` Count int `json:"count,omitempty"` } client.Goods.Query(). GroupBy(goods.FieldTitle). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GoodsQuery) IDs ¶
func (gq *GoodsQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of Goods IDs.
func (*GoodsQuery) IDsX ¶
func (gq *GoodsQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*GoodsQuery) Limit ¶
func (gq *GoodsQuery) Limit(limit int) *GoodsQuery
Limit adds a limit step to the query.
func (*GoodsQuery) Offset ¶
func (gq *GoodsQuery) Offset(offset int) *GoodsQuery
Offset adds an offset step to the query.
func (*GoodsQuery) Only ¶
func (gq *GoodsQuery) Only(ctx context.Context) (*Goods, error)
Only returns a single Goods entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Goods entity is not found. Returns a *NotFoundError when no Goods entities are found.
func (*GoodsQuery) OnlyID ¶
func (gq *GoodsQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Goods ID in the query. Returns a *NotSingularError when exactly one Goods ID is not found. Returns a *NotFoundError when no entities are found.
func (*GoodsQuery) OnlyIDX ¶
func (gq *GoodsQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GoodsQuery) OnlyX ¶
func (gq *GoodsQuery) OnlyX(ctx context.Context) *Goods
OnlyX is like Only, but panics if an error occurs.
func (*GoodsQuery) Order ¶
func (gq *GoodsQuery) Order(o ...OrderFunc) *GoodsQuery
Order adds an order step to the query.
func (*GoodsQuery) Select ¶
func (gq *GoodsQuery) Select(field string, fields ...string) *GoodsSelect
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 { Title string `json:"title,omitempty"` } client.Goods.Query(). Select(goods.FieldTitle). Scan(ctx, &v)
func (*GoodsQuery) Unique ¶
func (gq *GoodsQuery) Unique(unique bool) *GoodsQuery
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 (*GoodsQuery) Where ¶
func (gq *GoodsQuery) Where(ps ...predicate.Goods) *GoodsQuery
Where adds a new predicate for the GoodsQuery builder.
type GoodsSelect ¶
type GoodsSelect struct { *GoodsQuery // contains filtered or unexported fields }
GoodsSelect is the builder for selecting fields of Goods entities.
func (*GoodsSelect) Bool ¶
func (gs *GoodsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GoodsSelect) BoolX ¶
func (gs *GoodsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GoodsSelect) Bools ¶
func (gs *GoodsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GoodsSelect) BoolsX ¶
func (gs *GoodsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GoodsSelect) Float64 ¶
func (gs *GoodsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GoodsSelect) Float64X ¶
func (gs *GoodsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GoodsSelect) Float64s ¶
func (gs *GoodsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GoodsSelect) Float64sX ¶
func (gs *GoodsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GoodsSelect) Int ¶
func (gs *GoodsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GoodsSelect) IntX ¶
func (gs *GoodsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GoodsSelect) Ints ¶
func (gs *GoodsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GoodsSelect) IntsX ¶
func (gs *GoodsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GoodsSelect) Scan ¶
func (gs *GoodsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*GoodsSelect) ScanX ¶
func (gs *GoodsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GoodsSelect) String ¶
func (gs *GoodsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GoodsSelect) StringX ¶
func (gs *GoodsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GoodsUpdate ¶
type GoodsUpdate struct {
// contains filtered or unexported fields
}
GoodsUpdate is the builder for updating Goods entities.
func (*GoodsUpdate) Exec ¶
func (gu *GoodsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GoodsUpdate) ExecX ¶
func (gu *GoodsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GoodsUpdate) Mutation ¶
func (gu *GoodsUpdate) Mutation() *GoodsMutation
Mutation returns the GoodsMutation object of the builder.
func (*GoodsUpdate) Save ¶
func (gu *GoodsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GoodsUpdate) SaveX ¶
func (gu *GoodsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GoodsUpdate) SetCreatedAt ¶
func (gu *GoodsUpdate) SetCreatedAt(t time.Time) *GoodsUpdate
SetCreatedAt sets the "created_at" field.
func (*GoodsUpdate) SetIntro ¶
func (gu *GoodsUpdate) SetIntro(s string) *GoodsUpdate
SetIntro sets the "intro" field.
func (*GoodsUpdate) SetNillableCreatedAt ¶
func (gu *GoodsUpdate) SetNillableCreatedAt(t *time.Time) *GoodsUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GoodsUpdate) SetNillableUpdatedAt ¶
func (gu *GoodsUpdate) SetNillableUpdatedAt(t *time.Time) *GoodsUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GoodsUpdate) SetTitle ¶
func (gu *GoodsUpdate) SetTitle(s string) *GoodsUpdate
SetTitle sets the "title" field.
func (*GoodsUpdate) SetUpdatedAt ¶
func (gu *GoodsUpdate) SetUpdatedAt(t time.Time) *GoodsUpdate
SetUpdatedAt sets the "updated_at" field.
func (*GoodsUpdate) Where ¶
func (gu *GoodsUpdate) Where(ps ...predicate.Goods) *GoodsUpdate
Where adds a new predicate for the GoodsUpdate builder.
type GoodsUpdateOne ¶
type GoodsUpdateOne struct {
// contains filtered or unexported fields
}
GoodsUpdateOne is the builder for updating a single Goods entity.
func (*GoodsUpdateOne) Exec ¶
func (guo *GoodsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GoodsUpdateOne) ExecX ¶
func (guo *GoodsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GoodsUpdateOne) Mutation ¶
func (guo *GoodsUpdateOne) Mutation() *GoodsMutation
Mutation returns the GoodsMutation object of the builder.
func (*GoodsUpdateOne) Save ¶
func (guo *GoodsUpdateOne) Save(ctx context.Context) (*Goods, error)
Save executes the query and returns the updated Goods entity.
func (*GoodsUpdateOne) SaveX ¶
func (guo *GoodsUpdateOne) SaveX(ctx context.Context) *Goods
SaveX is like Save, but panics if an error occurs.
func (*GoodsUpdateOne) Select ¶
func (guo *GoodsUpdateOne) Select(field string, fields ...string) *GoodsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GoodsUpdateOne) SetCreatedAt ¶
func (guo *GoodsUpdateOne) SetCreatedAt(t time.Time) *GoodsUpdateOne
SetCreatedAt sets the "created_at" field.
func (*GoodsUpdateOne) SetIntro ¶
func (guo *GoodsUpdateOne) SetIntro(s string) *GoodsUpdateOne
SetIntro sets the "intro" field.
func (*GoodsUpdateOne) SetNillableCreatedAt ¶
func (guo *GoodsUpdateOne) SetNillableCreatedAt(t *time.Time) *GoodsUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GoodsUpdateOne) SetNillableUpdatedAt ¶
func (guo *GoodsUpdateOne) SetNillableUpdatedAt(t *time.Time) *GoodsUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GoodsUpdateOne) SetTitle ¶
func (guo *GoodsUpdateOne) SetTitle(s string) *GoodsUpdateOne
SetTitle sets the "title" field.
func (*GoodsUpdateOne) SetUpdatedAt ¶
func (guo *GoodsUpdateOne) SetUpdatedAt(t time.Time) *GoodsUpdateOne
SetUpdatedAt sets the "updated_at" field.
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 Order ¶
type Order struct { // ID of the ent. ID int64 `json:"id,omitempty"` // Sn holds the value of the "sn" field. Sn string `json:"sn,omitempty"` // Gid holds the value of the "gid" field. Gid int64 `json:"gid,omitempty"` // UID holds the value of the "uid" field. UID int64 `json:"uid,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // contains filtered or unexported fields }
Order is the model entity for the Order schema.
func (*Order) Unwrap ¶
Unwrap unwraps the Order 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 (*Order) Update ¶
func (o *Order) Update() *OrderUpdateOne
Update returns a builder for updating this Order. Note that you need to call Order.Unwrap() before calling this method if this Order was returned from a transaction, and the transaction was committed or rolled back.
type OrderClient ¶
type OrderClient struct {
// contains filtered or unexported fields
}
OrderClient is a client for the Order schema.
func NewOrderClient ¶
func NewOrderClient(c config) *OrderClient
NewOrderClient returns a client for the Order from the given config.
func (*OrderClient) Create ¶
func (c *OrderClient) Create() *OrderCreate
Create returns a create builder for Order.
func (*OrderClient) CreateBulk ¶
func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
CreateBulk returns a builder for creating a bulk of Order entities.
func (*OrderClient) Delete ¶
func (c *OrderClient) Delete() *OrderDelete
Delete returns a delete builder for Order.
func (*OrderClient) DeleteOne ¶
func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*OrderClient) DeleteOneID ¶
func (c *OrderClient) DeleteOneID(id int64) *OrderDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*OrderClient) GetX ¶
func (c *OrderClient) GetX(ctx context.Context, id int64) *Order
GetX is like Get, but panics if an error occurs.
func (*OrderClient) Query ¶
func (c *OrderClient) Query() *OrderQuery
Query returns a query builder for Order.
func (*OrderClient) Update ¶
func (c *OrderClient) Update() *OrderUpdate
Update returns an update builder for Order.
func (*OrderClient) UpdateOne ¶
func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderClient) UpdateOneID ¶
func (c *OrderClient) UpdateOneID(id int64) *OrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderClient) Use ¶
func (c *OrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `order.Hooks(f(g(h())))`.
type OrderCreate ¶
type OrderCreate struct {
// contains filtered or unexported fields
}
OrderCreate is the builder for creating a Order entity.
func (*OrderCreate) Mutation ¶
func (oc *OrderCreate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderCreate) Save ¶
func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
Save creates the Order in the database.
func (*OrderCreate) SaveX ¶
func (oc *OrderCreate) SaveX(ctx context.Context) *Order
SaveX calls Save and panics if Save returns an error.
func (*OrderCreate) SetCreatedAt ¶
func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
SetCreatedAt sets the "created_at" field.
func (*OrderCreate) SetGid ¶
func (oc *OrderCreate) SetGid(i int64) *OrderCreate
SetGid sets the "gid" field.
func (*OrderCreate) SetID ¶
func (oc *OrderCreate) SetID(i int64) *OrderCreate
SetID sets the "id" field.
func (*OrderCreate) SetNillableCreatedAt ¶
func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderCreate) SetNillableUpdatedAt ¶
func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderCreate) SetSn ¶
func (oc *OrderCreate) SetSn(s string) *OrderCreate
SetSn sets the "sn" field.
func (*OrderCreate) SetUID ¶
func (oc *OrderCreate) SetUID(i int64) *OrderCreate
SetUID sets the "uid" field.
func (*OrderCreate) SetUpdatedAt ¶
func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
SetUpdatedAt sets the "updated_at" field.
type OrderCreateBulk ¶
type OrderCreateBulk struct {
// contains filtered or unexported fields
}
OrderCreateBulk is the builder for creating many Order entities in bulk.
type OrderDelete ¶
type OrderDelete struct {
// contains filtered or unexported fields
}
OrderDelete is the builder for deleting a Order entity.
func (*OrderDelete) Exec ¶
func (od *OrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderDelete) ExecX ¶
func (od *OrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderDelete) Where ¶
func (od *OrderDelete) Where(ps ...predicate.Order) *OrderDelete
Where adds a new predicate to the OrderDelete builder.
type OrderDeleteOne ¶
type OrderDeleteOne struct {
// contains filtered or unexported fields
}
OrderDeleteOne is the builder for deleting a single Order entity.
func (*OrderDeleteOne) Exec ¶
func (odo *OrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderDeleteOne) ExecX ¶
func (odo *OrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OrderGoods ¶
type OrderGoods struct { // ID of the ent. ID int64 `json:"id,omitempty"` // OrderID holds the value of the "order_id" field. OrderID int64 `json:"order_id,omitempty"` // GoodsID holds the value of the "goods_id" field. GoodsID int64 `json:"goods_id,omitempty"` // GoodsTitle holds the value of the "goods_title" field. GoodsTitle string `json:"goods_title,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // contains filtered or unexported fields }
OrderGoods is the model entity for the OrderGoods schema.
func (*OrderGoods) String ¶
func (og *OrderGoods) String() string
String implements the fmt.Stringer.
func (*OrderGoods) Unwrap ¶
func (og *OrderGoods) Unwrap() *OrderGoods
Unwrap unwraps the OrderGoods 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 (*OrderGoods) Update ¶
func (og *OrderGoods) Update() *OrderGoodsUpdateOne
Update returns a builder for updating this OrderGoods. Note that you need to call OrderGoods.Unwrap() before calling this method if this OrderGoods was returned from a transaction, and the transaction was committed or rolled back.
type OrderGoodsClient ¶
type OrderGoodsClient struct {
// contains filtered or unexported fields
}
OrderGoodsClient is a client for the OrderGoods schema.
func NewOrderGoodsClient ¶
func NewOrderGoodsClient(c config) *OrderGoodsClient
NewOrderGoodsClient returns a client for the OrderGoods from the given config.
func (*OrderGoodsClient) Create ¶
func (c *OrderGoodsClient) Create() *OrderGoodsCreate
Create returns a create builder for OrderGoods.
func (*OrderGoodsClient) CreateBulk ¶
func (c *OrderGoodsClient) CreateBulk(builders ...*OrderGoodsCreate) *OrderGoodsCreateBulk
CreateBulk returns a builder for creating a bulk of OrderGoods entities.
func (*OrderGoodsClient) Delete ¶
func (c *OrderGoodsClient) Delete() *OrderGoodsDelete
Delete returns a delete builder for OrderGoods.
func (*OrderGoodsClient) DeleteOne ¶
func (c *OrderGoodsClient) DeleteOne(og *OrderGoods) *OrderGoodsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*OrderGoodsClient) DeleteOneID ¶
func (c *OrderGoodsClient) DeleteOneID(id int64) *OrderGoodsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*OrderGoodsClient) Get ¶
func (c *OrderGoodsClient) Get(ctx context.Context, id int64) (*OrderGoods, error)
Get returns a OrderGoods entity by its id.
func (*OrderGoodsClient) GetX ¶
func (c *OrderGoodsClient) GetX(ctx context.Context, id int64) *OrderGoods
GetX is like Get, but panics if an error occurs.
func (*OrderGoodsClient) Hooks ¶
func (c *OrderGoodsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrderGoodsClient) Query ¶
func (c *OrderGoodsClient) Query() *OrderGoodsQuery
Query returns a query builder for OrderGoods.
func (*OrderGoodsClient) Update ¶
func (c *OrderGoodsClient) Update() *OrderGoodsUpdate
Update returns an update builder for OrderGoods.
func (*OrderGoodsClient) UpdateOne ¶
func (c *OrderGoodsClient) UpdateOne(og *OrderGoods) *OrderGoodsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderGoodsClient) UpdateOneID ¶
func (c *OrderGoodsClient) UpdateOneID(id int64) *OrderGoodsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderGoodsClient) Use ¶
func (c *OrderGoodsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ordergoods.Hooks(f(g(h())))`.
type OrderGoodsCreate ¶
type OrderGoodsCreate struct {
// contains filtered or unexported fields
}
OrderGoodsCreate is the builder for creating a OrderGoods entity.
func (*OrderGoodsCreate) Mutation ¶
func (ogc *OrderGoodsCreate) Mutation() *OrderGoodsMutation
Mutation returns the OrderGoodsMutation object of the builder.
func (*OrderGoodsCreate) Save ¶
func (ogc *OrderGoodsCreate) Save(ctx context.Context) (*OrderGoods, error)
Save creates the OrderGoods in the database.
func (*OrderGoodsCreate) SaveX ¶
func (ogc *OrderGoodsCreate) SaveX(ctx context.Context) *OrderGoods
SaveX calls Save and panics if Save returns an error.
func (*OrderGoodsCreate) SetCreatedAt ¶
func (ogc *OrderGoodsCreate) SetCreatedAt(t time.Time) *OrderGoodsCreate
SetCreatedAt sets the "created_at" field.
func (*OrderGoodsCreate) SetGoodsID ¶
func (ogc *OrderGoodsCreate) SetGoodsID(i int64) *OrderGoodsCreate
SetGoodsID sets the "goods_id" field.
func (*OrderGoodsCreate) SetGoodsTitle ¶
func (ogc *OrderGoodsCreate) SetGoodsTitle(s string) *OrderGoodsCreate
SetGoodsTitle sets the "goods_title" field.
func (*OrderGoodsCreate) SetID ¶
func (ogc *OrderGoodsCreate) SetID(i int64) *OrderGoodsCreate
SetID sets the "id" field.
func (*OrderGoodsCreate) SetNillableCreatedAt ¶
func (ogc *OrderGoodsCreate) SetNillableCreatedAt(t *time.Time) *OrderGoodsCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderGoodsCreate) SetNillableUpdatedAt ¶
func (ogc *OrderGoodsCreate) SetNillableUpdatedAt(t *time.Time) *OrderGoodsCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderGoodsCreate) SetOrderID ¶
func (ogc *OrderGoodsCreate) SetOrderID(i int64) *OrderGoodsCreate
SetOrderID sets the "order_id" field.
func (*OrderGoodsCreate) SetUpdatedAt ¶
func (ogc *OrderGoodsCreate) SetUpdatedAt(t time.Time) *OrderGoodsCreate
SetUpdatedAt sets the "updated_at" field.
type OrderGoodsCreateBulk ¶
type OrderGoodsCreateBulk struct {
// contains filtered or unexported fields
}
OrderGoodsCreateBulk is the builder for creating many OrderGoods entities in bulk.
func (*OrderGoodsCreateBulk) Save ¶
func (ogcb *OrderGoodsCreateBulk) Save(ctx context.Context) ([]*OrderGoods, error)
Save creates the OrderGoods entities in the database.
func (*OrderGoodsCreateBulk) SaveX ¶
func (ogcb *OrderGoodsCreateBulk) SaveX(ctx context.Context) []*OrderGoods
SaveX is like Save, but panics if an error occurs.
type OrderGoodsDelete ¶
type OrderGoodsDelete struct {
// contains filtered or unexported fields
}
OrderGoodsDelete is the builder for deleting a OrderGoods entity.
func (*OrderGoodsDelete) Exec ¶
func (ogd *OrderGoodsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderGoodsDelete) ExecX ¶
func (ogd *OrderGoodsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderGoodsDelete) Where ¶
func (ogd *OrderGoodsDelete) Where(ps ...predicate.OrderGoods) *OrderGoodsDelete
Where adds a new predicate to the OrderGoodsDelete builder.
type OrderGoodsDeleteOne ¶
type OrderGoodsDeleteOne struct {
// contains filtered or unexported fields
}
OrderGoodsDeleteOne is the builder for deleting a single OrderGoods entity.
func (*OrderGoodsDeleteOne) Exec ¶
func (ogdo *OrderGoodsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderGoodsDeleteOne) ExecX ¶
func (ogdo *OrderGoodsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OrderGoodsGroupBy ¶
type OrderGoodsGroupBy struct {
// contains filtered or unexported fields
}
OrderGoodsGroupBy is the group-by builder for OrderGoods entities.
func (*OrderGoodsGroupBy) Aggregate ¶
func (oggb *OrderGoodsGroupBy) Aggregate(fns ...AggregateFunc) *OrderGoodsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderGoodsGroupBy) Bool ¶
func (oggb *OrderGoodsGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGoodsGroupBy) BoolX ¶
func (oggb *OrderGoodsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OrderGoodsGroupBy) Bools ¶
func (oggb *OrderGoodsGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*OrderGoodsGroupBy) BoolsX ¶
func (oggb *OrderGoodsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OrderGoodsGroupBy) Float64 ¶
func (oggb *OrderGoodsGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGoodsGroupBy) Float64X ¶
func (oggb *OrderGoodsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OrderGoodsGroupBy) Float64s ¶
func (oggb *OrderGoodsGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*OrderGoodsGroupBy) Float64sX ¶
func (oggb *OrderGoodsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderGoodsGroupBy) Int ¶
func (oggb *OrderGoodsGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGoodsGroupBy) IntX ¶
func (oggb *OrderGoodsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OrderGoodsGroupBy) Ints ¶
func (oggb *OrderGoodsGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*OrderGoodsGroupBy) IntsX ¶
func (oggb *OrderGoodsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OrderGoodsGroupBy) Scan ¶
func (oggb *OrderGoodsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*OrderGoodsGroupBy) ScanX ¶
func (oggb *OrderGoodsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OrderGoodsGroupBy) String ¶
func (oggb *OrderGoodsGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGoodsGroupBy) StringX ¶
func (oggb *OrderGoodsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OrderGoodsMutation ¶
type OrderGoodsMutation struct {
// contains filtered or unexported fields
}
OrderGoodsMutation represents an operation that mutates the OrderGoods nodes in the graph.
func (*OrderGoodsMutation) AddField ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) AddGoodsID ¶
func (m *OrderGoodsMutation) AddGoodsID(i int64)
AddGoodsID adds i to the "goods_id" field.
func (*OrderGoodsMutation) AddOrderID ¶
func (m *OrderGoodsMutation) AddOrderID(i int64)
AddOrderID adds i to the "order_id" field.
func (*OrderGoodsMutation) AddedEdges ¶
func (m *OrderGoodsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderGoodsMutation) AddedField ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) AddedFields ¶
func (m *OrderGoodsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderGoodsMutation) AddedGoodsID ¶
func (m *OrderGoodsMutation) AddedGoodsID() (r int64, exists bool)
AddedGoodsID returns the value that was added to the "goods_id" field in this mutation.
func (*OrderGoodsMutation) AddedIDs ¶
func (m *OrderGoodsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderGoodsMutation) AddedOrderID ¶
func (m *OrderGoodsMutation) AddedOrderID() (r int64, exists bool)
AddedOrderID returns the value that was added to the "order_id" field in this mutation.
func (*OrderGoodsMutation) ClearEdge ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) ClearField ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) ClearedEdges ¶
func (m *OrderGoodsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderGoodsMutation) ClearedFields ¶
func (m *OrderGoodsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderGoodsMutation) Client ¶
func (m OrderGoodsMutation) 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 (*OrderGoodsMutation) CreatedAt ¶
func (m *OrderGoodsMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderGoodsMutation) EdgeCleared ¶
func (m *OrderGoodsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderGoodsMutation) Field ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) FieldCleared ¶
func (m *OrderGoodsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderGoodsMutation) Fields ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) GoodsID ¶
func (m *OrderGoodsMutation) GoodsID() (r int64, exists bool)
GoodsID returns the value of the "goods_id" field in the mutation.
func (*OrderGoodsMutation) GoodsTitle ¶
func (m *OrderGoodsMutation) GoodsTitle() (r string, exists bool)
GoodsTitle returns the value of the "goods_title" field in the mutation.
func (*OrderGoodsMutation) ID ¶
func (m *OrderGoodsMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*OrderGoodsMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OrderGoods entity. If the OrderGoods 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 (*OrderGoodsMutation) 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 (*OrderGoodsMutation) OldGoodsID ¶
func (m *OrderGoodsMutation) OldGoodsID(ctx context.Context) (v int64, err error)
OldGoodsID returns the old "goods_id" field's value of the OrderGoods entity. If the OrderGoods 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 (*OrderGoodsMutation) OldGoodsTitle ¶
func (m *OrderGoodsMutation) OldGoodsTitle(ctx context.Context) (v string, err error)
OldGoodsTitle returns the old "goods_title" field's value of the OrderGoods entity. If the OrderGoods 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 (*OrderGoodsMutation) OldOrderID ¶
func (m *OrderGoodsMutation) OldOrderID(ctx context.Context) (v int64, err error)
OldOrderID returns the old "order_id" field's value of the OrderGoods entity. If the OrderGoods 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 (*OrderGoodsMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OrderGoods entity. If the OrderGoods 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 (*OrderGoodsMutation) OrderID ¶
func (m *OrderGoodsMutation) OrderID() (r int64, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*OrderGoodsMutation) RemovedEdges ¶
func (m *OrderGoodsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderGoodsMutation) RemovedIDs ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) ResetCreatedAt ¶
func (m *OrderGoodsMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderGoodsMutation) ResetEdge ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) ResetField ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) ResetGoodsID ¶
func (m *OrderGoodsMutation) ResetGoodsID()
ResetGoodsID resets all changes to the "goods_id" field.
func (*OrderGoodsMutation) ResetGoodsTitle ¶
func (m *OrderGoodsMutation) ResetGoodsTitle()
ResetGoodsTitle resets all changes to the "goods_title" field.
func (*OrderGoodsMutation) ResetOrderID ¶
func (m *OrderGoodsMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*OrderGoodsMutation) ResetUpdatedAt ¶
func (m *OrderGoodsMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderGoodsMutation) SetCreatedAt ¶
func (m *OrderGoodsMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderGoodsMutation) SetField ¶
func (m *OrderGoodsMutation) 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 (*OrderGoodsMutation) SetGoodsID ¶
func (m *OrderGoodsMutation) SetGoodsID(i int64)
SetGoodsID sets the "goods_id" field.
func (*OrderGoodsMutation) SetGoodsTitle ¶
func (m *OrderGoodsMutation) SetGoodsTitle(s string)
SetGoodsTitle sets the "goods_title" field.
func (*OrderGoodsMutation) SetID ¶
func (m *OrderGoodsMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OrderGoods entities.
func (*OrderGoodsMutation) SetOrderID ¶
func (m *OrderGoodsMutation) SetOrderID(i int64)
SetOrderID sets the "order_id" field.
func (*OrderGoodsMutation) SetUpdatedAt ¶
func (m *OrderGoodsMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (OrderGoodsMutation) Tx ¶
func (m OrderGoodsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderGoodsMutation) Type ¶
func (m *OrderGoodsMutation) Type() string
Type returns the node type of this mutation (OrderGoods).
type OrderGoodsQuery ¶
type OrderGoodsQuery struct {
// contains filtered or unexported fields
}
OrderGoodsQuery is the builder for querying OrderGoods entities.
func (*OrderGoodsQuery) All ¶
func (ogq *OrderGoodsQuery) All(ctx context.Context) ([]*OrderGoods, error)
All executes the query and returns a list of OrderGoodsSlice.
func (*OrderGoodsQuery) AllX ¶
func (ogq *OrderGoodsQuery) AllX(ctx context.Context) []*OrderGoods
AllX is like All, but panics if an error occurs.
func (*OrderGoodsQuery) Clone ¶
func (ogq *OrderGoodsQuery) Clone() *OrderGoodsQuery
Clone returns a duplicate of the OrderGoodsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderGoodsQuery) Count ¶
func (ogq *OrderGoodsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderGoodsQuery) CountX ¶
func (ogq *OrderGoodsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderGoodsQuery) Exist ¶
func (ogq *OrderGoodsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderGoodsQuery) ExistX ¶
func (ogq *OrderGoodsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderGoodsQuery) First ¶
func (ogq *OrderGoodsQuery) First(ctx context.Context) (*OrderGoods, error)
First returns the first OrderGoods entity from the query. Returns a *NotFoundError when no OrderGoods was found.
func (*OrderGoodsQuery) FirstID ¶
func (ogq *OrderGoodsQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first OrderGoods ID from the query. Returns a *NotFoundError when no OrderGoods ID was found.
func (*OrderGoodsQuery) FirstIDX ¶
func (ogq *OrderGoodsQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderGoodsQuery) FirstX ¶
func (ogq *OrderGoodsQuery) FirstX(ctx context.Context) *OrderGoods
FirstX is like First, but panics if an error occurs.
func (*OrderGoodsQuery) GroupBy ¶
func (ogq *OrderGoodsQuery) GroupBy(field string, fields ...string) *OrderGoodsGroupBy
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 { OrderID int64 `json:"order_id,omitempty"` Count int `json:"count,omitempty"` } client.OrderGoods.Query(). GroupBy(ordergoods.FieldOrderID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderGoodsQuery) IDs ¶
func (ogq *OrderGoodsQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of OrderGoods IDs.
func (*OrderGoodsQuery) IDsX ¶
func (ogq *OrderGoodsQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*OrderGoodsQuery) Limit ¶
func (ogq *OrderGoodsQuery) Limit(limit int) *OrderGoodsQuery
Limit adds a limit step to the query.
func (*OrderGoodsQuery) Offset ¶
func (ogq *OrderGoodsQuery) Offset(offset int) *OrderGoodsQuery
Offset adds an offset step to the query.
func (*OrderGoodsQuery) Only ¶
func (ogq *OrderGoodsQuery) Only(ctx context.Context) (*OrderGoods, error)
Only returns a single OrderGoods entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one OrderGoods entity is not found. Returns a *NotFoundError when no OrderGoods entities are found.
func (*OrderGoodsQuery) OnlyID ¶
func (ogq *OrderGoodsQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only OrderGoods ID in the query. Returns a *NotSingularError when exactly one OrderGoods ID is not found. Returns a *NotFoundError when no entities are found.
func (*OrderGoodsQuery) OnlyIDX ¶
func (ogq *OrderGoodsQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderGoodsQuery) OnlyX ¶
func (ogq *OrderGoodsQuery) OnlyX(ctx context.Context) *OrderGoods
OnlyX is like Only, but panics if an error occurs.
func (*OrderGoodsQuery) Order ¶
func (ogq *OrderGoodsQuery) Order(o ...OrderFunc) *OrderGoodsQuery
Order adds an order step to the query.
func (*OrderGoodsQuery) Select ¶
func (ogq *OrderGoodsQuery) Select(field string, fields ...string) *OrderGoodsSelect
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 { OrderID int64 `json:"order_id,omitempty"` } client.OrderGoods.Query(). Select(ordergoods.FieldOrderID). Scan(ctx, &v)
func (*OrderGoodsQuery) Unique ¶
func (ogq *OrderGoodsQuery) Unique(unique bool) *OrderGoodsQuery
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 (*OrderGoodsQuery) Where ¶
func (ogq *OrderGoodsQuery) Where(ps ...predicate.OrderGoods) *OrderGoodsQuery
Where adds a new predicate for the OrderGoodsQuery builder.
type OrderGoodsSelect ¶
type OrderGoodsSelect struct { *OrderGoodsQuery // contains filtered or unexported fields }
OrderGoodsSelect is the builder for selecting fields of OrderGoods entities.
func (*OrderGoodsSelect) Bool ¶
func (ogs *OrderGoodsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderGoodsSelect) BoolX ¶
func (ogs *OrderGoodsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OrderGoodsSelect) Bools ¶
func (ogs *OrderGoodsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderGoodsSelect) BoolsX ¶
func (ogs *OrderGoodsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OrderGoodsSelect) Float64 ¶
func (ogs *OrderGoodsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderGoodsSelect) Float64X ¶
func (ogs *OrderGoodsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OrderGoodsSelect) Float64s ¶
func (ogs *OrderGoodsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderGoodsSelect) Float64sX ¶
func (ogs *OrderGoodsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderGoodsSelect) Int ¶
func (ogs *OrderGoodsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderGoodsSelect) IntX ¶
func (ogs *OrderGoodsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OrderGoodsSelect) Ints ¶
func (ogs *OrderGoodsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderGoodsSelect) IntsX ¶
func (ogs *OrderGoodsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OrderGoodsSelect) Scan ¶
func (ogs *OrderGoodsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*OrderGoodsSelect) ScanX ¶
func (ogs *OrderGoodsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OrderGoodsSelect) String ¶
func (ogs *OrderGoodsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*OrderGoodsSelect) StringX ¶
func (ogs *OrderGoodsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OrderGoodsSlice ¶
type OrderGoodsSlice []*OrderGoods
OrderGoodsSlice is a parsable slice of OrderGoods.
type OrderGoodsUpdate ¶
type OrderGoodsUpdate struct {
// contains filtered or unexported fields
}
OrderGoodsUpdate is the builder for updating OrderGoods entities.
func (*OrderGoodsUpdate) AddGoodsID ¶
func (ogu *OrderGoodsUpdate) AddGoodsID(i int64) *OrderGoodsUpdate
AddGoodsID adds i to the "goods_id" field.
func (*OrderGoodsUpdate) AddOrderID ¶
func (ogu *OrderGoodsUpdate) AddOrderID(i int64) *OrderGoodsUpdate
AddOrderID adds i to the "order_id" field.
func (*OrderGoodsUpdate) Exec ¶
func (ogu *OrderGoodsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderGoodsUpdate) ExecX ¶
func (ogu *OrderGoodsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderGoodsUpdate) Mutation ¶
func (ogu *OrderGoodsUpdate) Mutation() *OrderGoodsMutation
Mutation returns the OrderGoodsMutation object of the builder.
func (*OrderGoodsUpdate) Save ¶
func (ogu *OrderGoodsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderGoodsUpdate) SaveX ¶
func (ogu *OrderGoodsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderGoodsUpdate) SetCreatedAt ¶
func (ogu *OrderGoodsUpdate) SetCreatedAt(t time.Time) *OrderGoodsUpdate
SetCreatedAt sets the "created_at" field.
func (*OrderGoodsUpdate) SetGoodsID ¶
func (ogu *OrderGoodsUpdate) SetGoodsID(i int64) *OrderGoodsUpdate
SetGoodsID sets the "goods_id" field.
func (*OrderGoodsUpdate) SetGoodsTitle ¶
func (ogu *OrderGoodsUpdate) SetGoodsTitle(s string) *OrderGoodsUpdate
SetGoodsTitle sets the "goods_title" field.
func (*OrderGoodsUpdate) SetNillableCreatedAt ¶
func (ogu *OrderGoodsUpdate) SetNillableCreatedAt(t *time.Time) *OrderGoodsUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderGoodsUpdate) SetNillableUpdatedAt ¶
func (ogu *OrderGoodsUpdate) SetNillableUpdatedAt(t *time.Time) *OrderGoodsUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderGoodsUpdate) SetOrderID ¶
func (ogu *OrderGoodsUpdate) SetOrderID(i int64) *OrderGoodsUpdate
SetOrderID sets the "order_id" field.
func (*OrderGoodsUpdate) SetUpdatedAt ¶
func (ogu *OrderGoodsUpdate) SetUpdatedAt(t time.Time) *OrderGoodsUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderGoodsUpdate) Where ¶
func (ogu *OrderGoodsUpdate) Where(ps ...predicate.OrderGoods) *OrderGoodsUpdate
Where adds a new predicate for the OrderGoodsUpdate builder.
type OrderGoodsUpdateOne ¶
type OrderGoodsUpdateOne struct {
// contains filtered or unexported fields
}
OrderGoodsUpdateOne is the builder for updating a single OrderGoods entity.
func (*OrderGoodsUpdateOne) AddGoodsID ¶
func (oguo *OrderGoodsUpdateOne) AddGoodsID(i int64) *OrderGoodsUpdateOne
AddGoodsID adds i to the "goods_id" field.
func (*OrderGoodsUpdateOne) AddOrderID ¶
func (oguo *OrderGoodsUpdateOne) AddOrderID(i int64) *OrderGoodsUpdateOne
AddOrderID adds i to the "order_id" field.
func (*OrderGoodsUpdateOne) Exec ¶
func (oguo *OrderGoodsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderGoodsUpdateOne) ExecX ¶
func (oguo *OrderGoodsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderGoodsUpdateOne) Mutation ¶
func (oguo *OrderGoodsUpdateOne) Mutation() *OrderGoodsMutation
Mutation returns the OrderGoodsMutation object of the builder.
func (*OrderGoodsUpdateOne) Save ¶
func (oguo *OrderGoodsUpdateOne) Save(ctx context.Context) (*OrderGoods, error)
Save executes the query and returns the updated OrderGoods entity.
func (*OrderGoodsUpdateOne) SaveX ¶
func (oguo *OrderGoodsUpdateOne) SaveX(ctx context.Context) *OrderGoods
SaveX is like Save, but panics if an error occurs.
func (*OrderGoodsUpdateOne) Select ¶
func (oguo *OrderGoodsUpdateOne) Select(field string, fields ...string) *OrderGoodsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderGoodsUpdateOne) SetCreatedAt ¶
func (oguo *OrderGoodsUpdateOne) SetCreatedAt(t time.Time) *OrderGoodsUpdateOne
SetCreatedAt sets the "created_at" field.
func (*OrderGoodsUpdateOne) SetGoodsID ¶
func (oguo *OrderGoodsUpdateOne) SetGoodsID(i int64) *OrderGoodsUpdateOne
SetGoodsID sets the "goods_id" field.
func (*OrderGoodsUpdateOne) SetGoodsTitle ¶
func (oguo *OrderGoodsUpdateOne) SetGoodsTitle(s string) *OrderGoodsUpdateOne
SetGoodsTitle sets the "goods_title" field.
func (*OrderGoodsUpdateOne) SetNillableCreatedAt ¶
func (oguo *OrderGoodsUpdateOne) SetNillableCreatedAt(t *time.Time) *OrderGoodsUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderGoodsUpdateOne) SetNillableUpdatedAt ¶
func (oguo *OrderGoodsUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrderGoodsUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderGoodsUpdateOne) SetOrderID ¶
func (oguo *OrderGoodsUpdateOne) SetOrderID(i int64) *OrderGoodsUpdateOne
SetOrderID sets the "order_id" field.
func (*OrderGoodsUpdateOne) SetUpdatedAt ¶
func (oguo *OrderGoodsUpdateOne) SetUpdatedAt(t time.Time) *OrderGoodsUpdateOne
SetUpdatedAt sets the "updated_at" field.
type OrderGroupBy ¶
type OrderGroupBy struct {
// contains filtered or unexported fields
}
OrderGroupBy is the group-by builder for Order entities.
func (*OrderGroupBy) Aggregate ¶
func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderGroupBy) Bool ¶
func (ogb *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGroupBy) BoolX ¶
func (ogb *OrderGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OrderGroupBy) Bools ¶
func (ogb *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*OrderGroupBy) BoolsX ¶
func (ogb *OrderGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OrderGroupBy) Float64 ¶
func (ogb *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGroupBy) Float64X ¶
func (ogb *OrderGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OrderGroupBy) Float64s ¶
func (ogb *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*OrderGroupBy) Float64sX ¶
func (ogb *OrderGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderGroupBy) Int ¶
func (ogb *OrderGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGroupBy) IntX ¶
func (ogb *OrderGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OrderGroupBy) Ints ¶
func (ogb *OrderGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*OrderGroupBy) IntsX ¶
func (ogb *OrderGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OrderGroupBy) Scan ¶
func (ogb *OrderGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*OrderGroupBy) ScanX ¶
func (ogb *OrderGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OrderGroupBy) String ¶
func (ogb *OrderGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OrderGroupBy) StringX ¶
func (ogb *OrderGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OrderMutation ¶
type OrderMutation struct {
// contains filtered or unexported fields
}
OrderMutation represents an operation that mutates the Order nodes in the graph.
func (*OrderMutation) AddField ¶
func (m *OrderMutation) 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 (*OrderMutation) AddGid ¶
func (m *OrderMutation) AddGid(i int64)
AddGid adds i to the "gid" field.
func (*OrderMutation) AddUID ¶
func (m *OrderMutation) AddUID(i int64)
AddUID adds i to the "uid" field.
func (*OrderMutation) AddedEdges ¶
func (m *OrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderMutation) AddedField ¶
func (m *OrderMutation) 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 (*OrderMutation) AddedFields ¶
func (m *OrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderMutation) AddedGid ¶
func (m *OrderMutation) AddedGid() (r int64, exists bool)
AddedGid returns the value that was added to the "gid" field in this mutation.
func (*OrderMutation) AddedIDs ¶
func (m *OrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderMutation) AddedUID ¶
func (m *OrderMutation) AddedUID() (r int64, exists bool)
AddedUID returns the value that was added to the "uid" field in this mutation.
func (*OrderMutation) ClearEdge ¶
func (m *OrderMutation) 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 (*OrderMutation) ClearField ¶
func (m *OrderMutation) 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 (*OrderMutation) ClearedEdges ¶
func (m *OrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderMutation) ClearedFields ¶
func (m *OrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderMutation) Client ¶
func (m OrderMutation) 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 (*OrderMutation) CreatedAt ¶
func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderMutation) EdgeCleared ¶
func (m *OrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderMutation) Field ¶
func (m *OrderMutation) 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 (*OrderMutation) FieldCleared ¶
func (m *OrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderMutation) Fields ¶
func (m *OrderMutation) 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 (*OrderMutation) Gid ¶
func (m *OrderMutation) Gid() (r int64, exists bool)
Gid returns the value of the "gid" field in the mutation.
func (*OrderMutation) ID ¶
func (m *OrderMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*OrderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Order entity. If the Order 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 (*OrderMutation) 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 (*OrderMutation) OldGid ¶
func (m *OrderMutation) OldGid(ctx context.Context) (v int64, err error)
OldGid returns the old "gid" field's value of the Order entity. If the Order 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 (*OrderMutation) OldSn ¶
func (m *OrderMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" field's value of the Order entity. If the Order 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 (*OrderMutation) OldUID ¶
func (m *OrderMutation) OldUID(ctx context.Context) (v int64, err error)
OldUID returns the old "uid" field's value of the Order entity. If the Order 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 (*OrderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Order entity. If the Order 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 (*OrderMutation) RemovedEdges ¶
func (m *OrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderMutation) RemovedIDs ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetCreatedAt ¶
func (m *OrderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderMutation) ResetEdge ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetField ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetGid ¶
func (m *OrderMutation) ResetGid()
ResetGid resets all changes to the "gid" field.
func (*OrderMutation) ResetSn ¶
func (m *OrderMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*OrderMutation) ResetUID ¶
func (m *OrderMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*OrderMutation) ResetUpdatedAt ¶
func (m *OrderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderMutation) SetCreatedAt ¶
func (m *OrderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderMutation) SetField ¶
func (m *OrderMutation) 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 (*OrderMutation) SetID ¶
func (m *OrderMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Order entities.
func (*OrderMutation) SetUpdatedAt ¶
func (m *OrderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrderMutation) Sn ¶
func (m *OrderMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" field in the mutation.
func (OrderMutation) Tx ¶
func (m OrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderMutation) Type ¶
func (m *OrderMutation) Type() string
Type returns the node type of this mutation (Order).
func (*OrderMutation) UID ¶
func (m *OrderMutation) UID() (r int64, exists bool)
UID returns the value of the "uid" field in the mutation.
type OrderQuery ¶
type OrderQuery struct {
// contains filtered or unexported fields
}
OrderQuery is the builder for querying Order entities.
func (*OrderQuery) All ¶
func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
All executes the query and returns a list of Orders.
func (*OrderQuery) AllX ¶
func (oq *OrderQuery) AllX(ctx context.Context) []*Order
AllX is like All, but panics if an error occurs.
func (*OrderQuery) Clone ¶
func (oq *OrderQuery) Clone() *OrderQuery
Clone returns a duplicate of the OrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderQuery) Count ¶
func (oq *OrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderQuery) CountX ¶
func (oq *OrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderQuery) Exist ¶
func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderQuery) ExistX ¶
func (oq *OrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderQuery) First ¶
func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
First returns the first Order entity from the query. Returns a *NotFoundError when no Order was found.
func (*OrderQuery) FirstID ¶
func (oq *OrderQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Order ID from the query. Returns a *NotFoundError when no Order ID was found.
func (*OrderQuery) FirstIDX ¶
func (oq *OrderQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderQuery) FirstX ¶
func (oq *OrderQuery) FirstX(ctx context.Context) *Order
FirstX is like First, but panics if an error occurs.
func (*OrderQuery) GroupBy ¶
func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
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 { Sn string `json:"sn,omitempty"` Count int `json:"count,omitempty"` } client.Order.Query(). GroupBy(order.FieldSn). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderQuery) IDs ¶
func (oq *OrderQuery) IDs(ctx context.Context) ([]int64, error)
IDs executes the query and returns a list of Order IDs.
func (*OrderQuery) IDsX ¶
func (oq *OrderQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*OrderQuery) Limit ¶
func (oq *OrderQuery) Limit(limit int) *OrderQuery
Limit adds a limit step to the query.
func (*OrderQuery) Offset ¶
func (oq *OrderQuery) Offset(offset int) *OrderQuery
Offset adds an offset step to the query.
func (*OrderQuery) Only ¶
func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
Only returns a single Order entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Order entity is not found. Returns a *NotFoundError when no Order entities are found.
func (*OrderQuery) OnlyID ¶
func (oq *OrderQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Order ID in the query. Returns a *NotSingularError when exactly one Order ID is not found. Returns a *NotFoundError when no entities are found.
func (*OrderQuery) OnlyIDX ¶
func (oq *OrderQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderQuery) OnlyX ¶
func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
OnlyX is like Only, but panics if an error occurs.
func (*OrderQuery) Order ¶
func (oq *OrderQuery) Order(o ...OrderFunc) *OrderQuery
Order adds an order step to the query.
func (*OrderQuery) Select ¶
func (oq *OrderQuery) Select(field string, fields ...string) *OrderSelect
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 { Sn string `json:"sn,omitempty"` } client.Order.Query(). Select(order.FieldSn). Scan(ctx, &v)
func (*OrderQuery) Unique ¶
func (oq *OrderQuery) Unique(unique bool) *OrderQuery
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 (*OrderQuery) Where ¶
func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
Where adds a new predicate for the OrderQuery builder.
type OrderSelect ¶
type OrderSelect struct { *OrderQuery // contains filtered or unexported fields }
OrderSelect is the builder for selecting fields of Order entities.
func (*OrderSelect) Bool ¶
func (os *OrderSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderSelect) BoolX ¶
func (os *OrderSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OrderSelect) Bools ¶
func (os *OrderSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderSelect) BoolsX ¶
func (os *OrderSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OrderSelect) Float64 ¶
func (os *OrderSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64X ¶
func (os *OrderSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OrderSelect) Float64s ¶
func (os *OrderSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64sX ¶
func (os *OrderSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderSelect) Int ¶
func (os *OrderSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderSelect) IntX ¶
func (os *OrderSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OrderSelect) Ints ¶
func (os *OrderSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderSelect) IntsX ¶
func (os *OrderSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OrderSelect) Scan ¶
func (os *OrderSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*OrderSelect) ScanX ¶
func (os *OrderSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OrderSelect) String ¶
func (os *OrderSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*OrderSelect) StringX ¶
func (os *OrderSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OrderUpdate ¶
type OrderUpdate struct {
// contains filtered or unexported fields
}
OrderUpdate is the builder for updating Order entities.
func (*OrderUpdate) AddGid ¶
func (ou *OrderUpdate) AddGid(i int64) *OrderUpdate
AddGid adds i to the "gid" field.
func (*OrderUpdate) AddUID ¶
func (ou *OrderUpdate) AddUID(i int64) *OrderUpdate
AddUID adds i to the "uid" field.
func (*OrderUpdate) Exec ¶
func (ou *OrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpdate) ExecX ¶
func (ou *OrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdate) Mutation ¶
func (ou *OrderUpdate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdate) Save ¶
func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderUpdate) SaveX ¶
func (ou *OrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdate) SetCreatedAt ¶
func (ou *OrderUpdate) SetCreatedAt(t time.Time) *OrderUpdate
SetCreatedAt sets the "created_at" field.
func (*OrderUpdate) SetGid ¶
func (ou *OrderUpdate) SetGid(i int64) *OrderUpdate
SetGid sets the "gid" field.
func (*OrderUpdate) SetNillableCreatedAt ¶
func (ou *OrderUpdate) SetNillableCreatedAt(t *time.Time) *OrderUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderUpdate) SetNillableUpdatedAt ¶
func (ou *OrderUpdate) SetNillableUpdatedAt(t *time.Time) *OrderUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderUpdate) SetSn ¶
func (ou *OrderUpdate) SetSn(s string) *OrderUpdate
SetSn sets the "sn" field.
func (*OrderUpdate) SetUID ¶
func (ou *OrderUpdate) SetUID(i int64) *OrderUpdate
SetUID sets the "uid" field.
func (*OrderUpdate) SetUpdatedAt ¶
func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdate) Where ¶
func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
Where adds a new predicate for the OrderUpdate builder.
type OrderUpdateOne ¶
type OrderUpdateOne struct {
// contains filtered or unexported fields
}
OrderUpdateOne is the builder for updating a single Order entity.
func (*OrderUpdateOne) AddGid ¶
func (ouo *OrderUpdateOne) AddGid(i int64) *OrderUpdateOne
AddGid adds i to the "gid" field.
func (*OrderUpdateOne) AddUID ¶
func (ouo *OrderUpdateOne) AddUID(i int64) *OrderUpdateOne
AddUID adds i to the "uid" field.
func (*OrderUpdateOne) Exec ¶
func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderUpdateOne) ExecX ¶
func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdateOne) Mutation ¶
func (ouo *OrderUpdateOne) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdateOne) Save ¶
func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
Save executes the query and returns the updated Order entity.
func (*OrderUpdateOne) SaveX ¶
func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdateOne) Select ¶
func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderUpdateOne) SetCreatedAt ¶
func (ouo *OrderUpdateOne) SetCreatedAt(t time.Time) *OrderUpdateOne
SetCreatedAt sets the "created_at" field.
func (*OrderUpdateOne) SetGid ¶
func (ouo *OrderUpdateOne) SetGid(i int64) *OrderUpdateOne
SetGid sets the "gid" field.
func (*OrderUpdateOne) SetNillableCreatedAt ¶
func (ouo *OrderUpdateOne) SetNillableCreatedAt(t *time.Time) *OrderUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableUpdatedAt ¶
func (ouo *OrderUpdateOne) SetNillableUpdatedAt(t *time.Time) *OrderUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderUpdateOne) SetSn ¶
func (ouo *OrderUpdateOne) SetSn(s string) *OrderUpdateOne
SetSn sets the "sn" field.
func (*OrderUpdateOne) SetUID ¶
func (ouo *OrderUpdateOne) SetUID(i int64) *OrderUpdateOne
SetUID sets the "uid" field.
func (*OrderUpdateOne) SetUpdatedAt ¶
func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
SetUpdatedAt sets the "updated_at" field.
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(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 Rollbacker method.
type Tx ¶
type Tx struct { // Goods is the client for interacting with the Goods builders. Goods *GoodsClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderGoods is the client for interacting with the OrderGoods builders. OrderGoods *OrderGoodsClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- goods.go
- goods_create.go
- goods_delete.go
- goods_query.go
- goods_update.go
- mutation.go
- order.go
- order_create.go
- order_delete.go
- order_query.go
- order_update.go
- ordergoods.go
- ordergoods_create.go
- ordergoods_delete.go
- ordergoods_query.go
- ordergoods_update.go
- runtime.go
- tx.go