Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- 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) Intercept(interceptors ...Interceptor)
- func (c *OrderClient) Interceptors() []Interceptor
- func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
- func (c *OrderClient) Query() *OrderQuery
- func (c *OrderClient) QueryTransaction(o *Order) *TransactionQuery
- func (c *OrderClient) QueryTxItems(o *Order) *TxItemQuery
- 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) AddTransaction(t ...*Transaction) *OrderCreate
- func (oc *OrderCreate) AddTransactionIDs(ids ...int64) *OrderCreate
- func (oc *OrderCreate) AddTxItemIDs(ids ...int64) *OrderCreate
- func (oc *OrderCreate) AddTxItems(t ...*TxItem) *OrderCreate
- func (oc *OrderCreate) Exec(ctx context.Context) error
- func (oc *OrderCreate) ExecX(ctx context.Context)
- 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) SetDeliveredAddress(s string) *OrderCreate
- func (oc *OrderCreate) SetID(i int64) *OrderCreate
- func (oc *OrderCreate) SetNillableDeliveredAddress(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableOrderNo(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillablePaymentID(i *int64) *OrderCreate
- func (oc *OrderCreate) SetNillablePlacedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableShippedAddress(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableShippedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableShippingCost(f *float64) *OrderCreate
- func (oc *OrderCreate) SetNillableTotalAmount(f *float64) *OrderCreate
- func (oc *OrderCreate) SetOrderNo(s string) *OrderCreate
- func (oc *OrderCreate) SetOrderStatus(os order.OrderStatus) *OrderCreate
- func (oc *OrderCreate) SetPaymentID(i int64) *OrderCreate
- func (oc *OrderCreate) SetPlacedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetPlacedUserID(i int64) *OrderCreate
- func (oc *OrderCreate) SetShippedAddress(s string) *OrderCreate
- func (oc *OrderCreate) SetShippedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetShippingCost(f float64) *OrderCreate
- func (oc *OrderCreate) SetTotalAmount(f float64) *OrderCreate
- func (oc *OrderCreate) SetTxID(i int64) *OrderCreate
- type OrderCreateBulk
- type OrderDelete
- type OrderDeleteOne
- type OrderEdges
- type OrderFunc
- type OrderGroupBy
- func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
- func (s *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderGroupBy) IntX(ctx context.Context) int
- func (s *OrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderGroupBy) StringX(ctx context.Context) string
- func (s *OrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderGroupBy) StringsX(ctx context.Context) []string
- type OrderMutation
- func (m *OrderMutation) AddField(name string, value ent.Value) error
- func (m *OrderMutation) AddPaymentID(i int64)
- func (m *OrderMutation) AddPlacedUserID(i int64)
- func (m *OrderMutation) AddShippingCost(f float64)
- func (m *OrderMutation) AddTotalAmount(f float64)
- func (m *OrderMutation) AddTransactionIDs(ids ...int64)
- func (m *OrderMutation) AddTxID(i int64)
- func (m *OrderMutation) AddTxItemIDs(ids ...int64)
- func (m *OrderMutation) AddedEdges() []string
- func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderMutation) AddedFields() []string
- func (m *OrderMutation) AddedIDs(name string) []ent.Value
- func (m *OrderMutation) AddedPaymentID() (r int64, exists bool)
- func (m *OrderMutation) AddedPlacedUserID() (r int64, exists bool)
- func (m *OrderMutation) AddedShippingCost() (r float64, exists bool)
- func (m *OrderMutation) AddedTotalAmount() (r float64, exists bool)
- func (m *OrderMutation) AddedTxID() (r int64, exists bool)
- func (m *OrderMutation) ClearDeliveredAddress()
- func (m *OrderMutation) ClearEdge(name string) error
- func (m *OrderMutation) ClearField(name string) error
- func (m *OrderMutation) ClearOrderNo()
- func (m *OrderMutation) ClearPaymentID()
- func (m *OrderMutation) ClearPlacedAt()
- func (m *OrderMutation) ClearShippedAddress()
- func (m *OrderMutation) ClearShippedAt()
- func (m *OrderMutation) ClearShippingCost()
- func (m *OrderMutation) ClearTotalAmount()
- func (m *OrderMutation) ClearTransaction()
- func (m *OrderMutation) ClearTxItems()
- func (m *OrderMutation) ClearedEdges() []string
- func (m *OrderMutation) ClearedFields() []string
- func (m OrderMutation) Client() *Client
- func (m *OrderMutation) DeliveredAddress() (r string, exists bool)
- func (m *OrderMutation) DeliveredAddressCleared() 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) ID() (id int64, exists bool)
- func (m *OrderMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *OrderMutation) OldDeliveredAddress(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderMutation) OldOrderNo(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldOrderStatus(ctx context.Context) (v order.OrderStatus, err error)
- func (m *OrderMutation) OldPaymentID(ctx context.Context) (v int64, err error)
- func (m *OrderMutation) OldPlacedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldPlacedUserID(ctx context.Context) (v int64, err error)
- func (m *OrderMutation) OldShippedAddress(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldShippedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldShippingCost(ctx context.Context) (v float64, err error)
- func (m *OrderMutation) OldTotalAmount(ctx context.Context) (v float64, err error)
- func (m *OrderMutation) OldTxID(ctx context.Context) (v int64, err error)
- func (m *OrderMutation) Op() Op
- func (m *OrderMutation) OrderNo() (r string, exists bool)
- func (m *OrderMutation) OrderNoCleared() bool
- func (m *OrderMutation) OrderStatus() (r order.OrderStatus, exists bool)
- func (m *OrderMutation) PaymentID() (r int64, exists bool)
- func (m *OrderMutation) PaymentIDCleared() bool
- func (m *OrderMutation) PlacedAt() (r time.Time, exists bool)
- func (m *OrderMutation) PlacedAtCleared() bool
- func (m *OrderMutation) PlacedUserID() (r int64, exists bool)
- func (m *OrderMutation) RemoveTransactionIDs(ids ...int64)
- func (m *OrderMutation) RemoveTxItemIDs(ids ...int64)
- func (m *OrderMutation) RemovedEdges() []string
- func (m *OrderMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderMutation) RemovedTransactionIDs() (ids []int64)
- func (m *OrderMutation) RemovedTxItemsIDs() (ids []int64)
- func (m *OrderMutation) ResetDeliveredAddress()
- func (m *OrderMutation) ResetEdge(name string) error
- func (m *OrderMutation) ResetField(name string) error
- func (m *OrderMutation) ResetOrderNo()
- func (m *OrderMutation) ResetOrderStatus()
- func (m *OrderMutation) ResetPaymentID()
- func (m *OrderMutation) ResetPlacedAt()
- func (m *OrderMutation) ResetPlacedUserID()
- func (m *OrderMutation) ResetShippedAddress()
- func (m *OrderMutation) ResetShippedAt()
- func (m *OrderMutation) ResetShippingCost()
- func (m *OrderMutation) ResetTotalAmount()
- func (m *OrderMutation) ResetTransaction()
- func (m *OrderMutation) ResetTxID()
- func (m *OrderMutation) ResetTxItems()
- func (m *OrderMutation) SetDeliveredAddress(s string)
- func (m *OrderMutation) SetField(name string, value ent.Value) error
- func (m *OrderMutation) SetID(id int64)
- func (m *OrderMutation) SetOp(op Op)
- func (m *OrderMutation) SetOrderNo(s string)
- func (m *OrderMutation) SetOrderStatus(os order.OrderStatus)
- func (m *OrderMutation) SetPaymentID(i int64)
- func (m *OrderMutation) SetPlacedAt(t time.Time)
- func (m *OrderMutation) SetPlacedUserID(i int64)
- func (m *OrderMutation) SetShippedAddress(s string)
- func (m *OrderMutation) SetShippedAt(t time.Time)
- func (m *OrderMutation) SetShippingCost(f float64)
- func (m *OrderMutation) SetTotalAmount(f float64)
- func (m *OrderMutation) SetTxID(i int64)
- func (m *OrderMutation) ShippedAddress() (r string, exists bool)
- func (m *OrderMutation) ShippedAddressCleared() bool
- func (m *OrderMutation) ShippedAt() (r time.Time, exists bool)
- func (m *OrderMutation) ShippedAtCleared() bool
- func (m *OrderMutation) ShippingCost() (r float64, exists bool)
- func (m *OrderMutation) ShippingCostCleared() bool
- func (m *OrderMutation) TotalAmount() (r float64, exists bool)
- func (m *OrderMutation) TotalAmountCleared() bool
- func (m *OrderMutation) TransactionCleared() bool
- func (m *OrderMutation) TransactionIDs() (ids []int64)
- func (m OrderMutation) Tx() (*Tx, error)
- func (m *OrderMutation) TxID() (r int64, exists bool)
- func (m *OrderMutation) TxItemsCleared() bool
- func (m *OrderMutation) TxItemsIDs() (ids []int64)
- func (m *OrderMutation) Type() string
- func (m *OrderMutation) Where(ps ...predicate.Order)
- func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
- type OrderQuery
- func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
- 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) (ids []int64, err 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 ...order.OrderOption) *OrderQuery
- func (oq *OrderQuery) QueryTransaction() *TransactionQuery
- func (oq *OrderQuery) QueryTxItems() *TxItemQuery
- func (oq *OrderQuery) Select(fields ...string) *OrderSelect
- func (oq *OrderQuery) Unique(unique bool) *OrderQuery
- func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
- func (oq *OrderQuery) WithTransaction(opts ...func(*TransactionQuery)) *OrderQuery
- func (oq *OrderQuery) WithTxItems(opts ...func(*TxItemQuery)) *OrderQuery
- type OrderSelect
- func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (s *OrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderSelect) BoolX(ctx context.Context) bool
- func (s *OrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderSelect) Float64X(ctx context.Context) float64
- func (s *OrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderSelect) IntX(ctx context.Context) int
- func (s *OrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderSelect) IntsX(ctx context.Context) []int
- func (os *OrderSelect) Scan(ctx context.Context, v any) error
- func (s *OrderSelect) ScanX(ctx context.Context, v any)
- func (s *OrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderSelect) StringX(ctx context.Context) string
- func (s *OrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderSelect) StringsX(ctx context.Context) []string
- type OrderUpdate
- func (ou *OrderUpdate) AddPaymentID(i int64) *OrderUpdate
- func (ou *OrderUpdate) AddPlacedUserID(i int64) *OrderUpdate
- func (ou *OrderUpdate) AddShippingCost(f float64) *OrderUpdate
- func (ou *OrderUpdate) AddTotalAmount(f float64) *OrderUpdate
- func (ou *OrderUpdate) AddTransaction(t ...*Transaction) *OrderUpdate
- func (ou *OrderUpdate) AddTransactionIDs(ids ...int64) *OrderUpdate
- func (ou *OrderUpdate) AddTxID(i int64) *OrderUpdate
- func (ou *OrderUpdate) AddTxItemIDs(ids ...int64) *OrderUpdate
- func (ou *OrderUpdate) AddTxItems(t ...*TxItem) *OrderUpdate
- func (ou *OrderUpdate) ClearDeliveredAddress() *OrderUpdate
- func (ou *OrderUpdate) ClearOrderNo() *OrderUpdate
- func (ou *OrderUpdate) ClearPaymentID() *OrderUpdate
- func (ou *OrderUpdate) ClearPlacedAt() *OrderUpdate
- func (ou *OrderUpdate) ClearShippedAddress() *OrderUpdate
- func (ou *OrderUpdate) ClearShippedAt() *OrderUpdate
- func (ou *OrderUpdate) ClearShippingCost() *OrderUpdate
- func (ou *OrderUpdate) ClearTotalAmount() *OrderUpdate
- func (ou *OrderUpdate) ClearTransaction() *OrderUpdate
- func (ou *OrderUpdate) ClearTxItems() *OrderUpdate
- func (ou *OrderUpdate) Exec(ctx context.Context) error
- func (ou *OrderUpdate) ExecX(ctx context.Context)
- func (ou *OrderUpdate) Mutation() *OrderMutation
- func (ou *OrderUpdate) RemoveTransaction(t ...*Transaction) *OrderUpdate
- func (ou *OrderUpdate) RemoveTransactionIDs(ids ...int64) *OrderUpdate
- func (ou *OrderUpdate) RemoveTxItemIDs(ids ...int64) *OrderUpdate
- func (ou *OrderUpdate) RemoveTxItems(t ...*TxItem) *OrderUpdate
- func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrderUpdate) SaveX(ctx context.Context) int
- func (ou *OrderUpdate) SetDeliveredAddress(s string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableDeliveredAddress(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableOrderNo(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableOrderStatus(os *order.OrderStatus) *OrderUpdate
- func (ou *OrderUpdate) SetNillablePaymentID(i *int64) *OrderUpdate
- func (ou *OrderUpdate) SetNillablePlacedAt(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetNillablePlacedUserID(i *int64) *OrderUpdate
- func (ou *OrderUpdate) SetNillableShippedAddress(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableShippedAt(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetNillableShippingCost(f *float64) *OrderUpdate
- func (ou *OrderUpdate) SetNillableTotalAmount(f *float64) *OrderUpdate
- func (ou *OrderUpdate) SetNillableTxID(i *int64) *OrderUpdate
- func (ou *OrderUpdate) SetOrderNo(s string) *OrderUpdate
- func (ou *OrderUpdate) SetOrderStatus(os order.OrderStatus) *OrderUpdate
- func (ou *OrderUpdate) SetPaymentID(i int64) *OrderUpdate
- func (ou *OrderUpdate) SetPlacedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetPlacedUserID(i int64) *OrderUpdate
- func (ou *OrderUpdate) SetShippedAddress(s string) *OrderUpdate
- func (ou *OrderUpdate) SetShippedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetShippingCost(f float64) *OrderUpdate
- func (ou *OrderUpdate) SetTotalAmount(f float64) *OrderUpdate
- func (ou *OrderUpdate) SetTxID(i int64) *OrderUpdate
- func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
- type OrderUpdateOne
- func (ouo *OrderUpdateOne) AddPaymentID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddPlacedUserID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddShippingCost(f float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddTotalAmount(f float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddTransaction(t ...*Transaction) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddTransactionIDs(ids ...int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddTxID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddTxItemIDs(ids ...int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddTxItems(t ...*TxItem) *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearDeliveredAddress() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearOrderNo() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearPaymentID() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearPlacedAt() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearShippedAddress() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearShippedAt() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearShippingCost() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearTotalAmount() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearTransaction() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearTxItems() *OrderUpdateOne
- func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrderUpdateOne) Mutation() *OrderMutation
- func (ouo *OrderUpdateOne) RemoveTransaction(t ...*Transaction) *OrderUpdateOne
- func (ouo *OrderUpdateOne) RemoveTransactionIDs(ids ...int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) RemoveTxItemIDs(ids ...int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) RemoveTxItems(t ...*TxItem) *OrderUpdateOne
- 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) SetDeliveredAddress(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableDeliveredAddress(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableOrderNo(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableOrderStatus(os *order.OrderStatus) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillablePaymentID(i *int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillablePlacedAt(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillablePlacedUserID(i *int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableShippedAddress(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableShippedAt(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableShippingCost(f *float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableTotalAmount(f *float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableTxID(i *int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderNo(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderStatus(os order.OrderStatus) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetPaymentID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetPlacedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetPlacedUserID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetShippedAddress(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetShippedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetShippingCost(f float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetTotalAmount(f float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetTxID(i int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
- type Orders
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Transaction
- type TransactionClient
- func (c *TransactionClient) Create() *TransactionCreate
- func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk
- func (c *TransactionClient) Delete() *TransactionDelete
- func (c *TransactionClient) DeleteOne(t *Transaction) *TransactionDeleteOne
- func (c *TransactionClient) DeleteOneID(id int64) *TransactionDeleteOne
- func (c *TransactionClient) Get(ctx context.Context, id int64) (*Transaction, error)
- func (c *TransactionClient) GetX(ctx context.Context, id int64) *Transaction
- func (c *TransactionClient) Hooks() []Hook
- func (c *TransactionClient) Intercept(interceptors ...Interceptor)
- func (c *TransactionClient) Interceptors() []Interceptor
- func (c *TransactionClient) MapCreateBulk(slice any, setFunc func(*TransactionCreate, int)) *TransactionCreateBulk
- func (c *TransactionClient) Query() *TransactionQuery
- func (c *TransactionClient) QueryTxItems(t *Transaction) *TxItemQuery
- func (c *TransactionClient) QueryTxOrder(t *Transaction) *OrderQuery
- func (c *TransactionClient) Update() *TransactionUpdate
- func (c *TransactionClient) UpdateOne(t *Transaction) *TransactionUpdateOne
- func (c *TransactionClient) UpdateOneID(id int64) *TransactionUpdateOne
- func (c *TransactionClient) Use(hooks ...Hook)
- type TransactionCreate
- func (tc *TransactionCreate) AddTxItemIDs(ids ...int64) *TransactionCreate
- func (tc *TransactionCreate) AddTxItems(t ...*TxItem) *TransactionCreate
- func (tc *TransactionCreate) AddTxOrder(o ...*Order) *TransactionCreate
- func (tc *TransactionCreate) AddTxOrderIDs(ids ...int64) *TransactionCreate
- func (tc *TransactionCreate) Exec(ctx context.Context) error
- func (tc *TransactionCreate) ExecX(ctx context.Context)
- func (tc *TransactionCreate) Mutation() *TransactionMutation
- func (tc *TransactionCreate) Save(ctx context.Context) (*Transaction, error)
- func (tc *TransactionCreate) SaveX(ctx context.Context) *Transaction
- func (tc *TransactionCreate) SetID(i int64) *TransactionCreate
- func (tc *TransactionCreate) SetNillablePaymentID(i *int64) *TransactionCreate
- func (tc *TransactionCreate) SetNillableTxAmount(f *float64) *TransactionCreate
- func (tc *TransactionCreate) SetNillableTxDate(t *time.Time) *TransactionCreate
- func (tc *TransactionCreate) SetPaymentID(i int64) *TransactionCreate
- func (tc *TransactionCreate) SetQuantity(i int) *TransactionCreate
- func (tc *TransactionCreate) SetTxAmount(f float64) *TransactionCreate
- func (tc *TransactionCreate) SetTxDate(t time.Time) *TransactionCreate
- func (tc *TransactionCreate) SetTxNo(s string) *TransactionCreate
- func (tc *TransactionCreate) SetTxStatus(ts transaction.TxStatus) *TransactionCreate
- func (tc *TransactionCreate) SetTxType(tt transaction.TxType) *TransactionCreate
- func (tc *TransactionCreate) SetUserID(i int64) *TransactionCreate
- type TransactionCreateBulk
- type TransactionDelete
- type TransactionDeleteOne
- type TransactionEdges
- type TransactionGroupBy
- func (tgb *TransactionGroupBy) Aggregate(fns ...AggregateFunc) *TransactionGroupBy
- func (s *TransactionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TransactionGroupBy) BoolX(ctx context.Context) bool
- func (s *TransactionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TransactionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TransactionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TransactionGroupBy) Float64X(ctx context.Context) float64
- func (s *TransactionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TransactionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TransactionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TransactionGroupBy) IntX(ctx context.Context) int
- func (s *TransactionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TransactionGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TransactionGroupBy) Scan(ctx context.Context, v any) error
- func (s *TransactionGroupBy) ScanX(ctx context.Context, v any)
- func (s *TransactionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TransactionGroupBy) StringX(ctx context.Context) string
- func (s *TransactionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TransactionGroupBy) StringsX(ctx context.Context) []string
- type TransactionMutation
- func (m *TransactionMutation) AddField(name string, value ent.Value) error
- func (m *TransactionMutation) AddPaymentID(i int64)
- func (m *TransactionMutation) AddQuantity(i int)
- func (m *TransactionMutation) AddTxAmount(f float64)
- func (m *TransactionMutation) AddTxItemIDs(ids ...int64)
- func (m *TransactionMutation) AddTxOrderIDs(ids ...int64)
- func (m *TransactionMutation) AddUserID(i int64)
- func (m *TransactionMutation) AddedEdges() []string
- func (m *TransactionMutation) AddedField(name string) (ent.Value, bool)
- func (m *TransactionMutation) AddedFields() []string
- func (m *TransactionMutation) AddedIDs(name string) []ent.Value
- func (m *TransactionMutation) AddedPaymentID() (r int64, exists bool)
- func (m *TransactionMutation) AddedQuantity() (r int, exists bool)
- func (m *TransactionMutation) AddedTxAmount() (r float64, exists bool)
- func (m *TransactionMutation) AddedUserID() (r int64, exists bool)
- func (m *TransactionMutation) ClearEdge(name string) error
- func (m *TransactionMutation) ClearField(name string) error
- func (m *TransactionMutation) ClearPaymentID()
- func (m *TransactionMutation) ClearTxAmount()
- func (m *TransactionMutation) ClearTxDate()
- func (m *TransactionMutation) ClearTxItems()
- func (m *TransactionMutation) ClearTxOrder()
- func (m *TransactionMutation) ClearedEdges() []string
- func (m *TransactionMutation) ClearedFields() []string
- func (m TransactionMutation) Client() *Client
- func (m *TransactionMutation) EdgeCleared(name string) bool
- func (m *TransactionMutation) Field(name string) (ent.Value, bool)
- func (m *TransactionMutation) FieldCleared(name string) bool
- func (m *TransactionMutation) Fields() []string
- func (m *TransactionMutation) ID() (id int64, exists bool)
- func (m *TransactionMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *TransactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TransactionMutation) OldPaymentID(ctx context.Context) (v int64, err error)
- func (m *TransactionMutation) OldQuantity(ctx context.Context) (v int, err error)
- func (m *TransactionMutation) OldTxAmount(ctx context.Context) (v float64, err error)
- func (m *TransactionMutation) OldTxDate(ctx context.Context) (v time.Time, err error)
- func (m *TransactionMutation) OldTxNo(ctx context.Context) (v string, err error)
- func (m *TransactionMutation) OldTxStatus(ctx context.Context) (v transaction.TxStatus, err error)
- func (m *TransactionMutation) OldTxType(ctx context.Context) (v transaction.TxType, err error)
- func (m *TransactionMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *TransactionMutation) Op() Op
- func (m *TransactionMutation) PaymentID() (r int64, exists bool)
- func (m *TransactionMutation) PaymentIDCleared() bool
- func (m *TransactionMutation) Quantity() (r int, exists bool)
- func (m *TransactionMutation) RemoveTxItemIDs(ids ...int64)
- func (m *TransactionMutation) RemoveTxOrderIDs(ids ...int64)
- func (m *TransactionMutation) RemovedEdges() []string
- func (m *TransactionMutation) RemovedIDs(name string) []ent.Value
- func (m *TransactionMutation) RemovedTxItemsIDs() (ids []int64)
- func (m *TransactionMutation) RemovedTxOrderIDs() (ids []int64)
- func (m *TransactionMutation) ResetEdge(name string) error
- func (m *TransactionMutation) ResetField(name string) error
- func (m *TransactionMutation) ResetPaymentID()
- func (m *TransactionMutation) ResetQuantity()
- func (m *TransactionMutation) ResetTxAmount()
- func (m *TransactionMutation) ResetTxDate()
- func (m *TransactionMutation) ResetTxItems()
- func (m *TransactionMutation) ResetTxNo()
- func (m *TransactionMutation) ResetTxOrder()
- func (m *TransactionMutation) ResetTxStatus()
- func (m *TransactionMutation) ResetTxType()
- func (m *TransactionMutation) ResetUserID()
- func (m *TransactionMutation) SetField(name string, value ent.Value) error
- func (m *TransactionMutation) SetID(id int64)
- func (m *TransactionMutation) SetOp(op Op)
- func (m *TransactionMutation) SetPaymentID(i int64)
- func (m *TransactionMutation) SetQuantity(i int)
- func (m *TransactionMutation) SetTxAmount(f float64)
- func (m *TransactionMutation) SetTxDate(t time.Time)
- func (m *TransactionMutation) SetTxNo(s string)
- func (m *TransactionMutation) SetTxStatus(ts transaction.TxStatus)
- func (m *TransactionMutation) SetTxType(tt transaction.TxType)
- func (m *TransactionMutation) SetUserID(i int64)
- func (m TransactionMutation) Tx() (*Tx, error)
- func (m *TransactionMutation) TxAmount() (r float64, exists bool)
- func (m *TransactionMutation) TxAmountCleared() bool
- func (m *TransactionMutation) TxDate() (r time.Time, exists bool)
- func (m *TransactionMutation) TxDateCleared() bool
- func (m *TransactionMutation) TxItemsCleared() bool
- func (m *TransactionMutation) TxItemsIDs() (ids []int64)
- func (m *TransactionMutation) TxNo() (r string, exists bool)
- func (m *TransactionMutation) TxOrderCleared() bool
- func (m *TransactionMutation) TxOrderIDs() (ids []int64)
- func (m *TransactionMutation) TxStatus() (r transaction.TxStatus, exists bool)
- func (m *TransactionMutation) TxType() (r transaction.TxType, exists bool)
- func (m *TransactionMutation) Type() string
- func (m *TransactionMutation) UserID() (r int64, exists bool)
- func (m *TransactionMutation) Where(ps ...predicate.Transaction)
- func (m *TransactionMutation) WhereP(ps ...func(*sql.Selector))
- type TransactionQuery
- func (tq *TransactionQuery) Aggregate(fns ...AggregateFunc) *TransactionSelect
- func (tq *TransactionQuery) All(ctx context.Context) ([]*Transaction, error)
- func (tq *TransactionQuery) AllX(ctx context.Context) []*Transaction
- func (tq *TransactionQuery) Clone() *TransactionQuery
- func (tq *TransactionQuery) Count(ctx context.Context) (int, error)
- func (tq *TransactionQuery) CountX(ctx context.Context) int
- func (tq *TransactionQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TransactionQuery) ExistX(ctx context.Context) bool
- func (tq *TransactionQuery) First(ctx context.Context) (*Transaction, error)
- func (tq *TransactionQuery) FirstID(ctx context.Context) (id int64, err error)
- func (tq *TransactionQuery) FirstIDX(ctx context.Context) int64
- func (tq *TransactionQuery) FirstX(ctx context.Context) *Transaction
- func (tq *TransactionQuery) GroupBy(field string, fields ...string) *TransactionGroupBy
- func (tq *TransactionQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (tq *TransactionQuery) IDsX(ctx context.Context) []int64
- func (tq *TransactionQuery) Limit(limit int) *TransactionQuery
- func (tq *TransactionQuery) Offset(offset int) *TransactionQuery
- func (tq *TransactionQuery) Only(ctx context.Context) (*Transaction, error)
- func (tq *TransactionQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (tq *TransactionQuery) OnlyIDX(ctx context.Context) int64
- func (tq *TransactionQuery) OnlyX(ctx context.Context) *Transaction
- func (tq *TransactionQuery) Order(o ...transaction.OrderOption) *TransactionQuery
- func (tq *TransactionQuery) QueryTxItems() *TxItemQuery
- func (tq *TransactionQuery) QueryTxOrder() *OrderQuery
- func (tq *TransactionQuery) Select(fields ...string) *TransactionSelect
- func (tq *TransactionQuery) Unique(unique bool) *TransactionQuery
- func (tq *TransactionQuery) Where(ps ...predicate.Transaction) *TransactionQuery
- func (tq *TransactionQuery) WithTxItems(opts ...func(*TxItemQuery)) *TransactionQuery
- func (tq *TransactionQuery) WithTxOrder(opts ...func(*OrderQuery)) *TransactionQuery
- type TransactionSelect
- func (ts *TransactionSelect) Aggregate(fns ...AggregateFunc) *TransactionSelect
- func (s *TransactionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TransactionSelect) BoolX(ctx context.Context) bool
- func (s *TransactionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TransactionSelect) BoolsX(ctx context.Context) []bool
- func (s *TransactionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TransactionSelect) Float64X(ctx context.Context) float64
- func (s *TransactionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TransactionSelect) Float64sX(ctx context.Context) []float64
- func (s *TransactionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TransactionSelect) IntX(ctx context.Context) int
- func (s *TransactionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TransactionSelect) IntsX(ctx context.Context) []int
- func (ts *TransactionSelect) Scan(ctx context.Context, v any) error
- func (s *TransactionSelect) ScanX(ctx context.Context, v any)
- func (s *TransactionSelect) String(ctx context.Context) (_ string, err error)
- func (s *TransactionSelect) StringX(ctx context.Context) string
- func (s *TransactionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TransactionSelect) StringsX(ctx context.Context) []string
- type TransactionUpdate
- func (tu *TransactionUpdate) AddPaymentID(i int64) *TransactionUpdate
- func (tu *TransactionUpdate) AddQuantity(i int) *TransactionUpdate
- func (tu *TransactionUpdate) AddTxAmount(f float64) *TransactionUpdate
- func (tu *TransactionUpdate) AddTxItemIDs(ids ...int64) *TransactionUpdate
- func (tu *TransactionUpdate) AddTxItems(t ...*TxItem) *TransactionUpdate
- func (tu *TransactionUpdate) AddTxOrder(o ...*Order) *TransactionUpdate
- func (tu *TransactionUpdate) AddTxOrderIDs(ids ...int64) *TransactionUpdate
- func (tu *TransactionUpdate) AddUserID(i int64) *TransactionUpdate
- func (tu *TransactionUpdate) ClearPaymentID() *TransactionUpdate
- func (tu *TransactionUpdate) ClearTxAmount() *TransactionUpdate
- func (tu *TransactionUpdate) ClearTxDate() *TransactionUpdate
- func (tu *TransactionUpdate) ClearTxItems() *TransactionUpdate
- func (tu *TransactionUpdate) ClearTxOrder() *TransactionUpdate
- func (tu *TransactionUpdate) Exec(ctx context.Context) error
- func (tu *TransactionUpdate) ExecX(ctx context.Context)
- func (tu *TransactionUpdate) Mutation() *TransactionMutation
- func (tu *TransactionUpdate) RemoveTxItemIDs(ids ...int64) *TransactionUpdate
- func (tu *TransactionUpdate) RemoveTxItems(t ...*TxItem) *TransactionUpdate
- func (tu *TransactionUpdate) RemoveTxOrder(o ...*Order) *TransactionUpdate
- func (tu *TransactionUpdate) RemoveTxOrderIDs(ids ...int64) *TransactionUpdate
- func (tu *TransactionUpdate) Save(ctx context.Context) (int, error)
- func (tu *TransactionUpdate) SaveX(ctx context.Context) int
- func (tu *TransactionUpdate) SetNillablePaymentID(i *int64) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableQuantity(i *int) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableTxAmount(f *float64) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableTxDate(t *time.Time) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableTxNo(s *string) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableTxStatus(ts *transaction.TxStatus) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableTxType(tt *transaction.TxType) *TransactionUpdate
- func (tu *TransactionUpdate) SetNillableUserID(i *int64) *TransactionUpdate
- func (tu *TransactionUpdate) SetPaymentID(i int64) *TransactionUpdate
- func (tu *TransactionUpdate) SetQuantity(i int) *TransactionUpdate
- func (tu *TransactionUpdate) SetTxAmount(f float64) *TransactionUpdate
- func (tu *TransactionUpdate) SetTxDate(t time.Time) *TransactionUpdate
- func (tu *TransactionUpdate) SetTxNo(s string) *TransactionUpdate
- func (tu *TransactionUpdate) SetTxStatus(ts transaction.TxStatus) *TransactionUpdate
- func (tu *TransactionUpdate) SetTxType(tt transaction.TxType) *TransactionUpdate
- func (tu *TransactionUpdate) SetUserID(i int64) *TransactionUpdate
- func (tu *TransactionUpdate) Where(ps ...predicate.Transaction) *TransactionUpdate
- type TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddPaymentID(i int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddQuantity(i int) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddTxAmount(f float64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddTxItemIDs(ids ...int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddTxItems(t ...*TxItem) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddTxOrder(o ...*Order) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddTxOrderIDs(ids ...int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) AddUserID(i int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearPaymentID() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearTxAmount() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearTxDate() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearTxItems() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) ClearTxOrder() *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) Exec(ctx context.Context) error
- func (tuo *TransactionUpdateOne) ExecX(ctx context.Context)
- func (tuo *TransactionUpdateOne) Mutation() *TransactionMutation
- func (tuo *TransactionUpdateOne) RemoveTxItemIDs(ids ...int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) RemoveTxItems(t ...*TxItem) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) RemoveTxOrder(o ...*Order) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) RemoveTxOrderIDs(ids ...int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) Save(ctx context.Context) (*Transaction, error)
- func (tuo *TransactionUpdateOne) SaveX(ctx context.Context) *Transaction
- func (tuo *TransactionUpdateOne) Select(field string, fields ...string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillablePaymentID(i *int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableQuantity(i *int) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableTxAmount(f *float64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableTxDate(t *time.Time) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableTxNo(s *string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableTxStatus(ts *transaction.TxStatus) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableTxType(tt *transaction.TxType) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetNillableUserID(i *int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetPaymentID(i int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetQuantity(i int) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetTxAmount(f float64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetTxDate(t time.Time) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetTxNo(s string) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetTxStatus(ts transaction.TxStatus) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetTxType(tt transaction.TxType) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) SetUserID(i int64) *TransactionUpdateOne
- func (tuo *TransactionUpdateOne) Where(ps ...predicate.Transaction) *TransactionUpdateOne
- type Transactions
- type TraverseFunc
- type Traverser
- type Tx
- type TxItem
- type TxItemClient
- func (c *TxItemClient) Create() *TxItemCreate
- func (c *TxItemClient) CreateBulk(builders ...*TxItemCreate) *TxItemCreateBulk
- func (c *TxItemClient) Delete() *TxItemDelete
- func (c *TxItemClient) DeleteOne(ti *TxItem) *TxItemDeleteOne
- func (c *TxItemClient) DeleteOneID(id int64) *TxItemDeleteOne
- func (c *TxItemClient) Get(ctx context.Context, id int64) (*TxItem, error)
- func (c *TxItemClient) GetX(ctx context.Context, id int64) *TxItem
- func (c *TxItemClient) Hooks() []Hook
- func (c *TxItemClient) Intercept(interceptors ...Interceptor)
- func (c *TxItemClient) Interceptors() []Interceptor
- func (c *TxItemClient) MapCreateBulk(slice any, setFunc func(*TxItemCreate, int)) *TxItemCreateBulk
- func (c *TxItemClient) Query() *TxItemQuery
- func (c *TxItemClient) Update() *TxItemUpdate
- func (c *TxItemClient) UpdateOne(ti *TxItem) *TxItemUpdateOne
- func (c *TxItemClient) UpdateOneID(id int64) *TxItemUpdateOne
- func (c *TxItemClient) Use(hooks ...Hook)
- type TxItemCreate
- func (tic *TxItemCreate) Exec(ctx context.Context) error
- func (tic *TxItemCreate) ExecX(ctx context.Context)
- func (tic *TxItemCreate) Mutation() *TxItemMutation
- func (tic *TxItemCreate) Save(ctx context.Context) (*TxItem, error)
- func (tic *TxItemCreate) SaveX(ctx context.Context) *TxItem
- func (tic *TxItemCreate) SetAuthor(s string) *TxItemCreate
- func (tic *TxItemCreate) SetBookID(i int64) *TxItemCreate
- func (tic *TxItemCreate) SetID(i int64) *TxItemCreate
- func (tic *TxItemCreate) SetImageURL(s string) *TxItemCreate
- func (tic *TxItemCreate) SetIsbn(s string) *TxItemCreate
- func (tic *TxItemCreate) SetNillableImageURL(s *string) *TxItemCreate
- func (tic *TxItemCreate) SetNillablePublisherID(i *int64) *TxItemCreate
- func (tic *TxItemCreate) SetPrice(f float64) *TxItemCreate
- func (tic *TxItemCreate) SetPublisherID(i int64) *TxItemCreate
- func (tic *TxItemCreate) SetQuantity(i int) *TxItemCreate
- func (tic *TxItemCreate) SetTitle(s string) *TxItemCreate
- func (tic *TxItemCreate) SetTxID(i int64) *TxItemCreate
- func (tic *TxItemCreate) SetTxType(tt txitem.TxType) *TxItemCreate
- type TxItemCreateBulk
- type TxItemDelete
- type TxItemDeleteOne
- type TxItemGroupBy
- func (tigb *TxItemGroupBy) Aggregate(fns ...AggregateFunc) *TxItemGroupBy
- func (s *TxItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TxItemGroupBy) BoolX(ctx context.Context) bool
- func (s *TxItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TxItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TxItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TxItemGroupBy) Float64X(ctx context.Context) float64
- func (s *TxItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TxItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TxItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TxItemGroupBy) IntX(ctx context.Context) int
- func (s *TxItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TxItemGroupBy) IntsX(ctx context.Context) []int
- func (tigb *TxItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *TxItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *TxItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TxItemGroupBy) StringX(ctx context.Context) string
- func (s *TxItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TxItemGroupBy) StringsX(ctx context.Context) []string
- type TxItemMutation
- func (m *TxItemMutation) AddBookID(i int64)
- func (m *TxItemMutation) AddField(name string, value ent.Value) error
- func (m *TxItemMutation) AddPrice(f float64)
- func (m *TxItemMutation) AddPublisherID(i int64)
- func (m *TxItemMutation) AddQuantity(i int)
- func (m *TxItemMutation) AddTxID(i int64)
- func (m *TxItemMutation) AddedBookID() (r int64, exists bool)
- func (m *TxItemMutation) AddedEdges() []string
- func (m *TxItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *TxItemMutation) AddedFields() []string
- func (m *TxItemMutation) AddedIDs(name string) []ent.Value
- func (m *TxItemMutation) AddedPrice() (r float64, exists bool)
- func (m *TxItemMutation) AddedPublisherID() (r int64, exists bool)
- func (m *TxItemMutation) AddedQuantity() (r int, exists bool)
- func (m *TxItemMutation) AddedTxID() (r int64, exists bool)
- func (m *TxItemMutation) Author() (r string, exists bool)
- func (m *TxItemMutation) BookID() (r int64, exists bool)
- func (m *TxItemMutation) ClearEdge(name string) error
- func (m *TxItemMutation) ClearField(name string) error
- func (m *TxItemMutation) ClearImageURL()
- func (m *TxItemMutation) ClearPublisherID()
- func (m *TxItemMutation) ClearedEdges() []string
- func (m *TxItemMutation) ClearedFields() []string
- func (m TxItemMutation) Client() *Client
- func (m *TxItemMutation) EdgeCleared(name string) bool
- func (m *TxItemMutation) Field(name string) (ent.Value, bool)
- func (m *TxItemMutation) FieldCleared(name string) bool
- func (m *TxItemMutation) Fields() []string
- func (m *TxItemMutation) ID() (id int64, exists bool)
- func (m *TxItemMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *TxItemMutation) ImageURL() (r string, exists bool)
- func (m *TxItemMutation) ImageURLCleared() bool
- func (m *TxItemMutation) Isbn() (r string, exists bool)
- func (m *TxItemMutation) OldAuthor(ctx context.Context) (v string, err error)
- func (m *TxItemMutation) OldBookID(ctx context.Context) (v int64, err error)
- func (m *TxItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TxItemMutation) OldImageURL(ctx context.Context) (v string, err error)
- func (m *TxItemMutation) OldIsbn(ctx context.Context) (v string, err error)
- func (m *TxItemMutation) OldPrice(ctx context.Context) (v float64, err error)
- func (m *TxItemMutation) OldPublisherID(ctx context.Context) (v int64, err error)
- func (m *TxItemMutation) OldQuantity(ctx context.Context) (v int, err error)
- func (m *TxItemMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TxItemMutation) OldTxID(ctx context.Context) (v int64, err error)
- func (m *TxItemMutation) OldTxType(ctx context.Context) (v txitem.TxType, err error)
- func (m *TxItemMutation) Op() Op
- func (m *TxItemMutation) Price() (r float64, exists bool)
- func (m *TxItemMutation) PublisherID() (r int64, exists bool)
- func (m *TxItemMutation) PublisherIDCleared() bool
- func (m *TxItemMutation) Quantity() (r int, exists bool)
- func (m *TxItemMutation) RemovedEdges() []string
- func (m *TxItemMutation) RemovedIDs(name string) []ent.Value
- func (m *TxItemMutation) ResetAuthor()
- func (m *TxItemMutation) ResetBookID()
- func (m *TxItemMutation) ResetEdge(name string) error
- func (m *TxItemMutation) ResetField(name string) error
- func (m *TxItemMutation) ResetImageURL()
- func (m *TxItemMutation) ResetIsbn()
- func (m *TxItemMutation) ResetPrice()
- func (m *TxItemMutation) ResetPublisherID()
- func (m *TxItemMutation) ResetQuantity()
- func (m *TxItemMutation) ResetTitle()
- func (m *TxItemMutation) ResetTxID()
- func (m *TxItemMutation) ResetTxType()
- func (m *TxItemMutation) SetAuthor(s string)
- func (m *TxItemMutation) SetBookID(i int64)
- func (m *TxItemMutation) SetField(name string, value ent.Value) error
- func (m *TxItemMutation) SetID(id int64)
- func (m *TxItemMutation) SetImageURL(s string)
- func (m *TxItemMutation) SetIsbn(s string)
- func (m *TxItemMutation) SetOp(op Op)
- func (m *TxItemMutation) SetPrice(f float64)
- func (m *TxItemMutation) SetPublisherID(i int64)
- func (m *TxItemMutation) SetQuantity(i int)
- func (m *TxItemMutation) SetTitle(s string)
- func (m *TxItemMutation) SetTxID(i int64)
- func (m *TxItemMutation) SetTxType(tt txitem.TxType)
- func (m *TxItemMutation) Title() (r string, exists bool)
- func (m TxItemMutation) Tx() (*Tx, error)
- func (m *TxItemMutation) TxID() (r int64, exists bool)
- func (m *TxItemMutation) TxType() (r txitem.TxType, exists bool)
- func (m *TxItemMutation) Type() string
- func (m *TxItemMutation) Where(ps ...predicate.TxItem)
- func (m *TxItemMutation) WhereP(ps ...func(*sql.Selector))
- type TxItemQuery
- func (tiq *TxItemQuery) Aggregate(fns ...AggregateFunc) *TxItemSelect
- func (tiq *TxItemQuery) All(ctx context.Context) ([]*TxItem, error)
- func (tiq *TxItemQuery) AllX(ctx context.Context) []*TxItem
- func (tiq *TxItemQuery) Clone() *TxItemQuery
- func (tiq *TxItemQuery) Count(ctx context.Context) (int, error)
- func (tiq *TxItemQuery) CountX(ctx context.Context) int
- func (tiq *TxItemQuery) Exist(ctx context.Context) (bool, error)
- func (tiq *TxItemQuery) ExistX(ctx context.Context) bool
- func (tiq *TxItemQuery) First(ctx context.Context) (*TxItem, error)
- func (tiq *TxItemQuery) FirstID(ctx context.Context) (id int64, err error)
- func (tiq *TxItemQuery) FirstIDX(ctx context.Context) int64
- func (tiq *TxItemQuery) FirstX(ctx context.Context) *TxItem
- func (tiq *TxItemQuery) GroupBy(field string, fields ...string) *TxItemGroupBy
- func (tiq *TxItemQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (tiq *TxItemQuery) IDsX(ctx context.Context) []int64
- func (tiq *TxItemQuery) Limit(limit int) *TxItemQuery
- func (tiq *TxItemQuery) Offset(offset int) *TxItemQuery
- func (tiq *TxItemQuery) Only(ctx context.Context) (*TxItem, error)
- func (tiq *TxItemQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (tiq *TxItemQuery) OnlyIDX(ctx context.Context) int64
- func (tiq *TxItemQuery) OnlyX(ctx context.Context) *TxItem
- func (tiq *TxItemQuery) Order(o ...txitem.OrderOption) *TxItemQuery
- func (tiq *TxItemQuery) Select(fields ...string) *TxItemSelect
- func (tiq *TxItemQuery) Unique(unique bool) *TxItemQuery
- func (tiq *TxItemQuery) Where(ps ...predicate.TxItem) *TxItemQuery
- type TxItemSelect
- func (tis *TxItemSelect) Aggregate(fns ...AggregateFunc) *TxItemSelect
- func (s *TxItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TxItemSelect) BoolX(ctx context.Context) bool
- func (s *TxItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TxItemSelect) BoolsX(ctx context.Context) []bool
- func (s *TxItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TxItemSelect) Float64X(ctx context.Context) float64
- func (s *TxItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TxItemSelect) Float64sX(ctx context.Context) []float64
- func (s *TxItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TxItemSelect) IntX(ctx context.Context) int
- func (s *TxItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TxItemSelect) IntsX(ctx context.Context) []int
- func (tis *TxItemSelect) Scan(ctx context.Context, v any) error
- func (s *TxItemSelect) ScanX(ctx context.Context, v any)
- func (s *TxItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *TxItemSelect) StringX(ctx context.Context) string
- func (s *TxItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TxItemSelect) StringsX(ctx context.Context) []string
- type TxItemUpdate
- func (tiu *TxItemUpdate) AddBookID(i int64) *TxItemUpdate
- func (tiu *TxItemUpdate) AddPrice(f float64) *TxItemUpdate
- func (tiu *TxItemUpdate) AddPublisherID(i int64) *TxItemUpdate
- func (tiu *TxItemUpdate) AddQuantity(i int) *TxItemUpdate
- func (tiu *TxItemUpdate) AddTxID(i int64) *TxItemUpdate
- func (tiu *TxItemUpdate) ClearImageURL() *TxItemUpdate
- func (tiu *TxItemUpdate) ClearPublisherID() *TxItemUpdate
- func (tiu *TxItemUpdate) Exec(ctx context.Context) error
- func (tiu *TxItemUpdate) ExecX(ctx context.Context)
- func (tiu *TxItemUpdate) Mutation() *TxItemMutation
- func (tiu *TxItemUpdate) Save(ctx context.Context) (int, error)
- func (tiu *TxItemUpdate) SaveX(ctx context.Context) int
- func (tiu *TxItemUpdate) SetAuthor(s string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetBookID(i int64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetImageURL(s string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetIsbn(s string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableAuthor(s *string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableBookID(i *int64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableImageURL(s *string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableIsbn(s *string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillablePrice(f *float64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillablePublisherID(i *int64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableQuantity(i *int) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableTitle(s *string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableTxID(i *int64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetNillableTxType(tt *txitem.TxType) *TxItemUpdate
- func (tiu *TxItemUpdate) SetPrice(f float64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetPublisherID(i int64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetQuantity(i int) *TxItemUpdate
- func (tiu *TxItemUpdate) SetTitle(s string) *TxItemUpdate
- func (tiu *TxItemUpdate) SetTxID(i int64) *TxItemUpdate
- func (tiu *TxItemUpdate) SetTxType(tt txitem.TxType) *TxItemUpdate
- func (tiu *TxItemUpdate) Where(ps ...predicate.TxItem) *TxItemUpdate
- type TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) AddBookID(i int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) AddPrice(f float64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) AddPublisherID(i int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) AddQuantity(i int) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) AddTxID(i int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) ClearImageURL() *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) ClearPublisherID() *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) Exec(ctx context.Context) error
- func (tiuo *TxItemUpdateOne) ExecX(ctx context.Context)
- func (tiuo *TxItemUpdateOne) Mutation() *TxItemMutation
- func (tiuo *TxItemUpdateOne) Save(ctx context.Context) (*TxItem, error)
- func (tiuo *TxItemUpdateOne) SaveX(ctx context.Context) *TxItem
- func (tiuo *TxItemUpdateOne) Select(field string, fields ...string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetAuthor(s string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetBookID(i int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetImageURL(s string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetIsbn(s string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableAuthor(s *string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableBookID(i *int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableImageURL(s *string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableIsbn(s *string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillablePrice(f *float64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillablePublisherID(i *int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableQuantity(i *int) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableTitle(s *string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableTxID(i *int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetNillableTxType(tt *txitem.TxType) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetPrice(f float64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetPublisherID(i int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetQuantity(i int) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetTitle(s string) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetTxID(i int64) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) SetTxType(tt txitem.TxType) *TxItemUpdateOne
- func (tiuo *TxItemUpdateOne) Where(ps ...predicate.TxItem) *TxItemUpdateOne
- type TxItems
- 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. TypeOrder = "Order" TypeTransaction = "Transaction" TypeTxItem = "TxItem" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Order is the client for interacting with the Order builders. Order *OrderClient // Transaction is the client for interacting with the Transaction builders. Transaction *TransactionClient // TxItem is the client for interacting with the TxItem builders. TxItem *TxItemClient // 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(). Order. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Order ¶
type Order struct { // ID of the ent. // 订单ID,主键 ID int64 `json:"id,omitempty"` // 订单编号 OrderNo string `json:"order_no,omitempty"` // 交易ID TxID int64 `json:"tx_id,omitempty"` // 订单状态 OrderStatus order.OrderStatus `json:"order_status,omitempty"` // 配送地址 DeliveredAddress string `json:"delivered_address,omitempty"` // 运费 ShippingCost float64 `json:"shipping_cost,omitempty"` // 总金额 TotalAmount float64 `json:"total_amount,omitempty"` // 下单用户ID PlacedUserID int64 `json:"placed_user_id,omitempty"` // 下单时间 PlacedAt time.Time `json:"placed_at,omitempty"` // 发货地址 ShippedAddress string `json:"shipped_address,omitempty"` // 发货时间 ShippedAt time.Time `json:"shipped_at,omitempty"` // 支付ID PaymentID int64 `json:"payment_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrderQuery when eager-loading is set. Edges OrderEdges `json:"edges"` // contains filtered or unexported fields }
Order is the model entity for the Order schema.
func (*Order) QueryTransaction ¶
func (o *Order) QueryTransaction() *TransactionQuery
QueryTransaction queries the "transaction" edge of the Order entity.
func (*Order) QueryTxItems ¶
func (o *Order) QueryTxItems() *TxItemQuery
QueryTxItems queries the "txItems" edge of the Order entity.
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 builder for creating a Order entity.
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 builder for deleting the given entity.
func (*OrderClient) DeleteOneID ¶
func (c *OrderClient) DeleteOneID(id int64) *OrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its 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) Intercept ¶
func (c *OrderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `order.Intercept(f(g(h())))`.
func (*OrderClient) Interceptors ¶
func (c *OrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderClient) MapCreateBulk ¶
func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*OrderClient) Query ¶
func (c *OrderClient) Query() *OrderQuery
Query returns a query builder for Order.
func (*OrderClient) QueryTransaction ¶
func (c *OrderClient) QueryTransaction(o *Order) *TransactionQuery
QueryTransaction queries the transaction edge of a Order.
func (*OrderClient) QueryTxItems ¶
func (c *OrderClient) QueryTxItems(o *Order) *TxItemQuery
QueryTxItems queries the txItems edge of a 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) AddTransaction ¶
func (oc *OrderCreate) AddTransaction(t ...*Transaction) *OrderCreate
AddTransaction adds the "transaction" edges to the Transaction entity.
func (*OrderCreate) AddTransactionIDs ¶
func (oc *OrderCreate) AddTransactionIDs(ids ...int64) *OrderCreate
AddTransactionIDs adds the "transaction" edge to the Transaction entity by IDs.
func (*OrderCreate) AddTxItemIDs ¶
func (oc *OrderCreate) AddTxItemIDs(ids ...int64) *OrderCreate
AddTxItemIDs adds the "txItems" edge to the TxItem entity by IDs.
func (*OrderCreate) AddTxItems ¶
func (oc *OrderCreate) AddTxItems(t ...*TxItem) *OrderCreate
AddTxItems adds the "txItems" edges to the TxItem entity.
func (*OrderCreate) Exec ¶
func (oc *OrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreate) ExecX ¶
func (oc *OrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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) SetDeliveredAddress ¶
func (oc *OrderCreate) SetDeliveredAddress(s string) *OrderCreate
SetDeliveredAddress sets the "delivered_address" field.
func (*OrderCreate) SetID ¶
func (oc *OrderCreate) SetID(i int64) *OrderCreate
SetID sets the "id" field.
func (*OrderCreate) SetNillableDeliveredAddress ¶
func (oc *OrderCreate) SetNillableDeliveredAddress(s *string) *OrderCreate
SetNillableDeliveredAddress sets the "delivered_address" field if the given value is not nil.
func (*OrderCreate) SetNillableOrderNo ¶
func (oc *OrderCreate) SetNillableOrderNo(s *string) *OrderCreate
SetNillableOrderNo sets the "order_no" field if the given value is not nil.
func (*OrderCreate) SetNillablePaymentID ¶
func (oc *OrderCreate) SetNillablePaymentID(i *int64) *OrderCreate
SetNillablePaymentID sets the "payment_id" field if the given value is not nil.
func (*OrderCreate) SetNillablePlacedAt ¶
func (oc *OrderCreate) SetNillablePlacedAt(t *time.Time) *OrderCreate
SetNillablePlacedAt sets the "placed_at" field if the given value is not nil.
func (*OrderCreate) SetNillableShippedAddress ¶
func (oc *OrderCreate) SetNillableShippedAddress(s *string) *OrderCreate
SetNillableShippedAddress sets the "shipped_address" field if the given value is not nil.
func (*OrderCreate) SetNillableShippedAt ¶
func (oc *OrderCreate) SetNillableShippedAt(t *time.Time) *OrderCreate
SetNillableShippedAt sets the "shipped_at" field if the given value is not nil.
func (*OrderCreate) SetNillableShippingCost ¶
func (oc *OrderCreate) SetNillableShippingCost(f *float64) *OrderCreate
SetNillableShippingCost sets the "shipping_cost" field if the given value is not nil.
func (*OrderCreate) SetNillableTotalAmount ¶
func (oc *OrderCreate) SetNillableTotalAmount(f *float64) *OrderCreate
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*OrderCreate) SetOrderNo ¶
func (oc *OrderCreate) SetOrderNo(s string) *OrderCreate
SetOrderNo sets the "order_no" field.
func (*OrderCreate) SetOrderStatus ¶
func (oc *OrderCreate) SetOrderStatus(os order.OrderStatus) *OrderCreate
SetOrderStatus sets the "order_status" field.
func (*OrderCreate) SetPaymentID ¶
func (oc *OrderCreate) SetPaymentID(i int64) *OrderCreate
SetPaymentID sets the "payment_id" field.
func (*OrderCreate) SetPlacedAt ¶
func (oc *OrderCreate) SetPlacedAt(t time.Time) *OrderCreate
SetPlacedAt sets the "placed_at" field.
func (*OrderCreate) SetPlacedUserID ¶
func (oc *OrderCreate) SetPlacedUserID(i int64) *OrderCreate
SetPlacedUserID sets the "placed_user_id" field.
func (*OrderCreate) SetShippedAddress ¶
func (oc *OrderCreate) SetShippedAddress(s string) *OrderCreate
SetShippedAddress sets the "shipped_address" field.
func (*OrderCreate) SetShippedAt ¶
func (oc *OrderCreate) SetShippedAt(t time.Time) *OrderCreate
SetShippedAt sets the "shipped_at" field.
func (*OrderCreate) SetShippingCost ¶
func (oc *OrderCreate) SetShippingCost(f float64) *OrderCreate
SetShippingCost sets the "shipping_cost" field.
func (*OrderCreate) SetTotalAmount ¶
func (oc *OrderCreate) SetTotalAmount(f float64) *OrderCreate
SetTotalAmount sets the "total_amount" field.
func (*OrderCreate) SetTxID ¶
func (oc *OrderCreate) SetTxID(i int64) *OrderCreate
SetTxID sets the "tx_id" field.
type OrderCreateBulk ¶
type OrderCreateBulk struct {
// contains filtered or unexported fields
}
OrderCreateBulk is the builder for creating many Order entities in bulk.
func (*OrderCreateBulk) Exec ¶
func (ocb *OrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreateBulk) ExecX ¶
func (ocb *OrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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 appends a list predicates 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.
func (*OrderDeleteOne) Where ¶
func (odo *OrderDeleteOne) Where(ps ...predicate.Order) *OrderDeleteOne
Where appends a list predicates to the OrderDelete builder.
type OrderEdges ¶
type OrderEdges struct { // Transaction holds the value of the transaction edge. Transaction []*Transaction `json:"transaction,omitempty"` // TxItems holds the value of the txItems edge. TxItems []*TxItem `json:"txItems,omitempty"` // contains filtered or unexported fields }
OrderEdges holds the relations/edges for other nodes in the graph.
func (OrderEdges) TransactionOrErr ¶
func (e OrderEdges) TransactionOrErr() ([]*Transaction, error)
TransactionOrErr returns the Transaction value or an error if the edge was not loaded in eager-loading.
func (OrderEdges) TxItemsOrErr ¶
func (e OrderEdges) TxItemsOrErr() ([]*TxItem, error)
TxItemsOrErr returns the TxItems value or an error if the edge was not loaded in eager-loading.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Scan ¶
func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
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) AddPaymentID ¶
func (m *OrderMutation) AddPaymentID(i int64)
AddPaymentID adds i to the "payment_id" field.
func (*OrderMutation) AddPlacedUserID ¶
func (m *OrderMutation) AddPlacedUserID(i int64)
AddPlacedUserID adds i to the "placed_user_id" field.
func (*OrderMutation) AddShippingCost ¶
func (m *OrderMutation) AddShippingCost(f float64)
AddShippingCost adds f to the "shipping_cost" field.
func (*OrderMutation) AddTotalAmount ¶
func (m *OrderMutation) AddTotalAmount(f float64)
AddTotalAmount adds f to the "total_amount" field.
func (*OrderMutation) AddTransactionIDs ¶
func (m *OrderMutation) AddTransactionIDs(ids ...int64)
AddTransactionIDs adds the "transaction" edge to the Transaction entity by ids.
func (*OrderMutation) AddTxID ¶
func (m *OrderMutation) AddTxID(i int64)
AddTxID adds i to the "tx_id" field.
func (*OrderMutation) AddTxItemIDs ¶
func (m *OrderMutation) AddTxItemIDs(ids ...int64)
AddTxItemIDs adds the "txItems" edge to the TxItem entity by ids.
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) 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) AddedPaymentID ¶
func (m *OrderMutation) AddedPaymentID() (r int64, exists bool)
AddedPaymentID returns the value that was added to the "payment_id" field in this mutation.
func (*OrderMutation) AddedPlacedUserID ¶
func (m *OrderMutation) AddedPlacedUserID() (r int64, exists bool)
AddedPlacedUserID returns the value that was added to the "placed_user_id" field in this mutation.
func (*OrderMutation) AddedShippingCost ¶
func (m *OrderMutation) AddedShippingCost() (r float64, exists bool)
AddedShippingCost returns the value that was added to the "shipping_cost" field in this mutation.
func (*OrderMutation) AddedTotalAmount ¶
func (m *OrderMutation) AddedTotalAmount() (r float64, exists bool)
AddedTotalAmount returns the value that was added to the "total_amount" field in this mutation.
func (*OrderMutation) AddedTxID ¶
func (m *OrderMutation) AddedTxID() (r int64, exists bool)
AddedTxID returns the value that was added to the "tx_id" field in this mutation.
func (*OrderMutation) ClearDeliveredAddress ¶
func (m *OrderMutation) ClearDeliveredAddress()
ClearDeliveredAddress clears the value of the "delivered_address" field.
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) ClearOrderNo ¶
func (m *OrderMutation) ClearOrderNo()
ClearOrderNo clears the value of the "order_no" field.
func (*OrderMutation) ClearPaymentID ¶
func (m *OrderMutation) ClearPaymentID()
ClearPaymentID clears the value of the "payment_id" field.
func (*OrderMutation) ClearPlacedAt ¶
func (m *OrderMutation) ClearPlacedAt()
ClearPlacedAt clears the value of the "placed_at" field.
func (*OrderMutation) ClearShippedAddress ¶
func (m *OrderMutation) ClearShippedAddress()
ClearShippedAddress clears the value of the "shipped_address" field.
func (*OrderMutation) ClearShippedAt ¶
func (m *OrderMutation) ClearShippedAt()
ClearShippedAt clears the value of the "shipped_at" field.
func (*OrderMutation) ClearShippingCost ¶
func (m *OrderMutation) ClearShippingCost()
ClearShippingCost clears the value of the "shipping_cost" field.
func (*OrderMutation) ClearTotalAmount ¶
func (m *OrderMutation) ClearTotalAmount()
ClearTotalAmount clears the value of the "total_amount" field.
func (*OrderMutation) ClearTransaction ¶
func (m *OrderMutation) ClearTransaction()
ClearTransaction clears the "transaction" edge to the Transaction entity.
func (*OrderMutation) ClearTxItems ¶
func (m *OrderMutation) ClearTxItems()
ClearTxItems clears the "txItems" edge to the TxItem entity.
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) DeliveredAddress ¶
func (m *OrderMutation) DeliveredAddress() (r string, exists bool)
DeliveredAddress returns the value of the "delivered_address" field in the mutation.
func (*OrderMutation) DeliveredAddressCleared ¶
func (m *OrderMutation) DeliveredAddressCleared() bool
DeliveredAddressCleared returns if the "delivered_address" field was cleared in this 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) 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 or after it was returned from the database.
func (*OrderMutation) IDs ¶
func (m *OrderMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrderMutation) OldDeliveredAddress ¶
func (m *OrderMutation) OldDeliveredAddress(ctx context.Context) (v string, err error)
OldDeliveredAddress returns the old "delivered_address" 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) OldOrderNo ¶
func (m *OrderMutation) OldOrderNo(ctx context.Context) (v string, err error)
OldOrderNo returns the old "order_no" 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) OldOrderStatus ¶
func (m *OrderMutation) OldOrderStatus(ctx context.Context) (v order.OrderStatus, err error)
OldOrderStatus returns the old "order_status" 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) OldPaymentID ¶
func (m *OrderMutation) OldPaymentID(ctx context.Context) (v int64, err error)
OldPaymentID returns the old "payment_id" 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) OldPlacedAt ¶
OldPlacedAt returns the old "placed_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) OldPlacedUserID ¶
func (m *OrderMutation) OldPlacedUserID(ctx context.Context) (v int64, err error)
OldPlacedUserID returns the old "placed_user_id" 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) OldShippedAddress ¶
func (m *OrderMutation) OldShippedAddress(ctx context.Context) (v string, err error)
OldShippedAddress returns the old "shipped_address" 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) OldShippedAt ¶
OldShippedAt returns the old "shipped_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) OldShippingCost ¶
func (m *OrderMutation) OldShippingCost(ctx context.Context) (v float64, err error)
OldShippingCost returns the old "shipping_cost" 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) OldTotalAmount ¶
func (m *OrderMutation) OldTotalAmount(ctx context.Context) (v float64, err error)
OldTotalAmount returns the old "total_amount" 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) OldTxID ¶
func (m *OrderMutation) OldTxID(ctx context.Context) (v int64, err error)
OldTxID returns the old "tx_id" 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) OrderNo ¶
func (m *OrderMutation) OrderNo() (r string, exists bool)
OrderNo returns the value of the "order_no" field in the mutation.
func (*OrderMutation) OrderNoCleared ¶
func (m *OrderMutation) OrderNoCleared() bool
OrderNoCleared returns if the "order_no" field was cleared in this mutation.
func (*OrderMutation) OrderStatus ¶
func (m *OrderMutation) OrderStatus() (r order.OrderStatus, exists bool)
OrderStatus returns the value of the "order_status" field in the mutation.
func (*OrderMutation) PaymentID ¶
func (m *OrderMutation) PaymentID() (r int64, exists bool)
PaymentID returns the value of the "payment_id" field in the mutation.
func (*OrderMutation) PaymentIDCleared ¶
func (m *OrderMutation) PaymentIDCleared() bool
PaymentIDCleared returns if the "payment_id" field was cleared in this mutation.
func (*OrderMutation) PlacedAt ¶
func (m *OrderMutation) PlacedAt() (r time.Time, exists bool)
PlacedAt returns the value of the "placed_at" field in the mutation.
func (*OrderMutation) PlacedAtCleared ¶
func (m *OrderMutation) PlacedAtCleared() bool
PlacedAtCleared returns if the "placed_at" field was cleared in this mutation.
func (*OrderMutation) PlacedUserID ¶
func (m *OrderMutation) PlacedUserID() (r int64, exists bool)
PlacedUserID returns the value of the "placed_user_id" field in the mutation.
func (*OrderMutation) RemoveTransactionIDs ¶
func (m *OrderMutation) RemoveTransactionIDs(ids ...int64)
RemoveTransactionIDs removes the "transaction" edge to the Transaction entity by IDs.
func (*OrderMutation) RemoveTxItemIDs ¶
func (m *OrderMutation) RemoveTxItemIDs(ids ...int64)
RemoveTxItemIDs removes the "txItems" edge to the TxItem entity by IDs.
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) RemovedTransactionIDs ¶
func (m *OrderMutation) RemovedTransactionIDs() (ids []int64)
RemovedTransaction returns the removed IDs of the "transaction" edge to the Transaction entity.
func (*OrderMutation) RemovedTxItemsIDs ¶
func (m *OrderMutation) RemovedTxItemsIDs() (ids []int64)
RemovedTxItems returns the removed IDs of the "txItems" edge to the TxItem entity.
func (*OrderMutation) ResetDeliveredAddress ¶
func (m *OrderMutation) ResetDeliveredAddress()
ResetDeliveredAddress resets all changes to the "delivered_address" 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) ResetOrderNo ¶
func (m *OrderMutation) ResetOrderNo()
ResetOrderNo resets all changes to the "order_no" field.
func (*OrderMutation) ResetOrderStatus ¶
func (m *OrderMutation) ResetOrderStatus()
ResetOrderStatus resets all changes to the "order_status" field.
func (*OrderMutation) ResetPaymentID ¶
func (m *OrderMutation) ResetPaymentID()
ResetPaymentID resets all changes to the "payment_id" field.
func (*OrderMutation) ResetPlacedAt ¶
func (m *OrderMutation) ResetPlacedAt()
ResetPlacedAt resets all changes to the "placed_at" field.
func (*OrderMutation) ResetPlacedUserID ¶
func (m *OrderMutation) ResetPlacedUserID()
ResetPlacedUserID resets all changes to the "placed_user_id" field.
func (*OrderMutation) ResetShippedAddress ¶
func (m *OrderMutation) ResetShippedAddress()
ResetShippedAddress resets all changes to the "shipped_address" field.
func (*OrderMutation) ResetShippedAt ¶
func (m *OrderMutation) ResetShippedAt()
ResetShippedAt resets all changes to the "shipped_at" field.
func (*OrderMutation) ResetShippingCost ¶
func (m *OrderMutation) ResetShippingCost()
ResetShippingCost resets all changes to the "shipping_cost" field.
func (*OrderMutation) ResetTotalAmount ¶
func (m *OrderMutation) ResetTotalAmount()
ResetTotalAmount resets all changes to the "total_amount" field.
func (*OrderMutation) ResetTransaction ¶
func (m *OrderMutation) ResetTransaction()
ResetTransaction resets all changes to the "transaction" edge.
func (*OrderMutation) ResetTxID ¶
func (m *OrderMutation) ResetTxID()
ResetTxID resets all changes to the "tx_id" field.
func (*OrderMutation) ResetTxItems ¶
func (m *OrderMutation) ResetTxItems()
ResetTxItems resets all changes to the "txItems" edge.
func (*OrderMutation) SetDeliveredAddress ¶
func (m *OrderMutation) SetDeliveredAddress(s string)
SetDeliveredAddress sets the "delivered_address" 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) SetOp ¶
func (m *OrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderMutation) SetOrderNo ¶
func (m *OrderMutation) SetOrderNo(s string)
SetOrderNo sets the "order_no" field.
func (*OrderMutation) SetOrderStatus ¶
func (m *OrderMutation) SetOrderStatus(os order.OrderStatus)
SetOrderStatus sets the "order_status" field.
func (*OrderMutation) SetPaymentID ¶
func (m *OrderMutation) SetPaymentID(i int64)
SetPaymentID sets the "payment_id" field.
func (*OrderMutation) SetPlacedAt ¶
func (m *OrderMutation) SetPlacedAt(t time.Time)
SetPlacedAt sets the "placed_at" field.
func (*OrderMutation) SetPlacedUserID ¶
func (m *OrderMutation) SetPlacedUserID(i int64)
SetPlacedUserID sets the "placed_user_id" field.
func (*OrderMutation) SetShippedAddress ¶
func (m *OrderMutation) SetShippedAddress(s string)
SetShippedAddress sets the "shipped_address" field.
func (*OrderMutation) SetShippedAt ¶
func (m *OrderMutation) SetShippedAt(t time.Time)
SetShippedAt sets the "shipped_at" field.
func (*OrderMutation) SetShippingCost ¶
func (m *OrderMutation) SetShippingCost(f float64)
SetShippingCost sets the "shipping_cost" field.
func (*OrderMutation) SetTotalAmount ¶
func (m *OrderMutation) SetTotalAmount(f float64)
SetTotalAmount sets the "total_amount" field.
func (*OrderMutation) SetTxID ¶
func (m *OrderMutation) SetTxID(i int64)
SetTxID sets the "tx_id" field.
func (*OrderMutation) ShippedAddress ¶
func (m *OrderMutation) ShippedAddress() (r string, exists bool)
ShippedAddress returns the value of the "shipped_address" field in the mutation.
func (*OrderMutation) ShippedAddressCleared ¶
func (m *OrderMutation) ShippedAddressCleared() bool
ShippedAddressCleared returns if the "shipped_address" field was cleared in this mutation.
func (*OrderMutation) ShippedAt ¶
func (m *OrderMutation) ShippedAt() (r time.Time, exists bool)
ShippedAt returns the value of the "shipped_at" field in the mutation.
func (*OrderMutation) ShippedAtCleared ¶
func (m *OrderMutation) ShippedAtCleared() bool
ShippedAtCleared returns if the "shipped_at" field was cleared in this mutation.
func (*OrderMutation) ShippingCost ¶
func (m *OrderMutation) ShippingCost() (r float64, exists bool)
ShippingCost returns the value of the "shipping_cost" field in the mutation.
func (*OrderMutation) ShippingCostCleared ¶
func (m *OrderMutation) ShippingCostCleared() bool
ShippingCostCleared returns if the "shipping_cost" field was cleared in this mutation.
func (*OrderMutation) TotalAmount ¶
func (m *OrderMutation) TotalAmount() (r float64, exists bool)
TotalAmount returns the value of the "total_amount" field in the mutation.
func (*OrderMutation) TotalAmountCleared ¶
func (m *OrderMutation) TotalAmountCleared() bool
TotalAmountCleared returns if the "total_amount" field was cleared in this mutation.
func (*OrderMutation) TransactionCleared ¶
func (m *OrderMutation) TransactionCleared() bool
TransactionCleared reports if the "transaction" edge to the Transaction entity was cleared.
func (*OrderMutation) TransactionIDs ¶
func (m *OrderMutation) TransactionIDs() (ids []int64)
TransactionIDs returns the "transaction" edge IDs 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) TxID ¶
func (m *OrderMutation) TxID() (r int64, exists bool)
TxID returns the value of the "tx_id" field in the mutation.
func (*OrderMutation) TxItemsCleared ¶
func (m *OrderMutation) TxItemsCleared() bool
TxItemsCleared reports if the "txItems" edge to the TxItem entity was cleared.
func (*OrderMutation) TxItemsIDs ¶
func (m *OrderMutation) TxItemsIDs() (ids []int64)
TxItemsIDs returns the "txItems" edge IDs in the mutation.
func (*OrderMutation) Type ¶
func (m *OrderMutation) Type() string
Type returns the node type of this mutation (Order).
func (*OrderMutation) Where ¶
func (m *OrderMutation) Where(ps ...predicate.Order)
Where appends a list predicates to the OrderMutation builder.
func (*OrderMutation) WhereP ¶
func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderQuery ¶
type OrderQuery struct {
// contains filtered or unexported fields
}
OrderQuery is the builder for querying Order entities.
func (*OrderQuery) Aggregate ¶
func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate returns a OrderSelect configured with the given aggregations.
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 { OrderNo string `json:"order_no,omitempty"` Count int `json:"count,omitempty"` } client.Order.Query(). GroupBy(order.FieldOrderNo). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderQuery) IDs ¶
func (oq *OrderQuery) IDs(ctx context.Context) (ids []int64, err 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 the number of records to be returned by this query.
func (*OrderQuery) Offset ¶
func (oq *OrderQuery) Offset(offset int) *OrderQuery
Offset to start from.
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 more than one Order entity is 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 more than one Order ID is 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 ...order.OrderOption) *OrderQuery
Order specifies how the records should be ordered.
func (*OrderQuery) QueryTransaction ¶
func (oq *OrderQuery) QueryTransaction() *TransactionQuery
QueryTransaction chains the current query on the "transaction" edge.
func (*OrderQuery) QueryTxItems ¶
func (oq *OrderQuery) QueryTxItems() *TxItemQuery
QueryTxItems chains the current query on the "txItems" edge.
func (*OrderQuery) Select ¶
func (oq *OrderQuery) Select(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 { OrderNo string `json:"order_no,omitempty"` } client.Order.Query(). Select(order.FieldOrderNo). 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.
func (*OrderQuery) WithTransaction ¶
func (oq *OrderQuery) WithTransaction(opts ...func(*TransactionQuery)) *OrderQuery
WithTransaction tells the query-builder to eager-load the nodes that are connected to the "transaction" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithTxItems ¶
func (oq *OrderQuery) WithTxItems(opts ...func(*TxItemQuery)) *OrderQuery
WithTxItems tells the query-builder to eager-load the nodes that are connected to the "txItems" edge. The optional arguments are used to configure the query builder of the edge.
type OrderSelect ¶
type OrderSelect struct { *OrderQuery // contains filtered or unexported fields }
OrderSelect is the builder for selecting fields of Order entities.
func (*OrderSelect) Aggregate ¶
func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Scan ¶
func (os *OrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderUpdate ¶
type OrderUpdate struct {
// contains filtered or unexported fields
}
OrderUpdate is the builder for updating Order entities.
func (*OrderUpdate) AddPaymentID ¶
func (ou *OrderUpdate) AddPaymentID(i int64) *OrderUpdate
AddPaymentID adds i to the "payment_id" field.
func (*OrderUpdate) AddPlacedUserID ¶
func (ou *OrderUpdate) AddPlacedUserID(i int64) *OrderUpdate
AddPlacedUserID adds i to the "placed_user_id" field.
func (*OrderUpdate) AddShippingCost ¶
func (ou *OrderUpdate) AddShippingCost(f float64) *OrderUpdate
AddShippingCost adds f to the "shipping_cost" field.
func (*OrderUpdate) AddTotalAmount ¶
func (ou *OrderUpdate) AddTotalAmount(f float64) *OrderUpdate
AddTotalAmount adds f to the "total_amount" field.
func (*OrderUpdate) AddTransaction ¶
func (ou *OrderUpdate) AddTransaction(t ...*Transaction) *OrderUpdate
AddTransaction adds the "transaction" edges to the Transaction entity.
func (*OrderUpdate) AddTransactionIDs ¶
func (ou *OrderUpdate) AddTransactionIDs(ids ...int64) *OrderUpdate
AddTransactionIDs adds the "transaction" edge to the Transaction entity by IDs.
func (*OrderUpdate) AddTxID ¶
func (ou *OrderUpdate) AddTxID(i int64) *OrderUpdate
AddTxID adds i to the "tx_id" field.
func (*OrderUpdate) AddTxItemIDs ¶
func (ou *OrderUpdate) AddTxItemIDs(ids ...int64) *OrderUpdate
AddTxItemIDs adds the "txItems" edge to the TxItem entity by IDs.
func (*OrderUpdate) AddTxItems ¶
func (ou *OrderUpdate) AddTxItems(t ...*TxItem) *OrderUpdate
AddTxItems adds the "txItems" edges to the TxItem entity.
func (*OrderUpdate) ClearDeliveredAddress ¶
func (ou *OrderUpdate) ClearDeliveredAddress() *OrderUpdate
ClearDeliveredAddress clears the value of the "delivered_address" field.
func (*OrderUpdate) ClearOrderNo ¶
func (ou *OrderUpdate) ClearOrderNo() *OrderUpdate
ClearOrderNo clears the value of the "order_no" field.
func (*OrderUpdate) ClearPaymentID ¶
func (ou *OrderUpdate) ClearPaymentID() *OrderUpdate
ClearPaymentID clears the value of the "payment_id" field.
func (*OrderUpdate) ClearPlacedAt ¶
func (ou *OrderUpdate) ClearPlacedAt() *OrderUpdate
ClearPlacedAt clears the value of the "placed_at" field.
func (*OrderUpdate) ClearShippedAddress ¶
func (ou *OrderUpdate) ClearShippedAddress() *OrderUpdate
ClearShippedAddress clears the value of the "shipped_address" field.
func (*OrderUpdate) ClearShippedAt ¶
func (ou *OrderUpdate) ClearShippedAt() *OrderUpdate
ClearShippedAt clears the value of the "shipped_at" field.
func (*OrderUpdate) ClearShippingCost ¶
func (ou *OrderUpdate) ClearShippingCost() *OrderUpdate
ClearShippingCost clears the value of the "shipping_cost" field.
func (*OrderUpdate) ClearTotalAmount ¶
func (ou *OrderUpdate) ClearTotalAmount() *OrderUpdate
ClearTotalAmount clears the value of the "total_amount" field.
func (*OrderUpdate) ClearTransaction ¶
func (ou *OrderUpdate) ClearTransaction() *OrderUpdate
ClearTransaction clears all "transaction" edges to the Transaction entity.
func (*OrderUpdate) ClearTxItems ¶
func (ou *OrderUpdate) ClearTxItems() *OrderUpdate
ClearTxItems clears all "txItems" edges to the TxItem entity.
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) RemoveTransaction ¶
func (ou *OrderUpdate) RemoveTransaction(t ...*Transaction) *OrderUpdate
RemoveTransaction removes "transaction" edges to Transaction entities.
func (*OrderUpdate) RemoveTransactionIDs ¶
func (ou *OrderUpdate) RemoveTransactionIDs(ids ...int64) *OrderUpdate
RemoveTransactionIDs removes the "transaction" edge to Transaction entities by IDs.
func (*OrderUpdate) RemoveTxItemIDs ¶
func (ou *OrderUpdate) RemoveTxItemIDs(ids ...int64) *OrderUpdate
RemoveTxItemIDs removes the "txItems" edge to TxItem entities by IDs.
func (*OrderUpdate) RemoveTxItems ¶
func (ou *OrderUpdate) RemoveTxItems(t ...*TxItem) *OrderUpdate
RemoveTxItems removes "txItems" edges to TxItem entities.
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) SetDeliveredAddress ¶
func (ou *OrderUpdate) SetDeliveredAddress(s string) *OrderUpdate
SetDeliveredAddress sets the "delivered_address" field.
func (*OrderUpdate) SetNillableDeliveredAddress ¶
func (ou *OrderUpdate) SetNillableDeliveredAddress(s *string) *OrderUpdate
SetNillableDeliveredAddress sets the "delivered_address" field if the given value is not nil.
func (*OrderUpdate) SetNillableOrderNo ¶
func (ou *OrderUpdate) SetNillableOrderNo(s *string) *OrderUpdate
SetNillableOrderNo sets the "order_no" field if the given value is not nil.
func (*OrderUpdate) SetNillableOrderStatus ¶
func (ou *OrderUpdate) SetNillableOrderStatus(os *order.OrderStatus) *OrderUpdate
SetNillableOrderStatus sets the "order_status" field if the given value is not nil.
func (*OrderUpdate) SetNillablePaymentID ¶
func (ou *OrderUpdate) SetNillablePaymentID(i *int64) *OrderUpdate
SetNillablePaymentID sets the "payment_id" field if the given value is not nil.
func (*OrderUpdate) SetNillablePlacedAt ¶
func (ou *OrderUpdate) SetNillablePlacedAt(t *time.Time) *OrderUpdate
SetNillablePlacedAt sets the "placed_at" field if the given value is not nil.
func (*OrderUpdate) SetNillablePlacedUserID ¶
func (ou *OrderUpdate) SetNillablePlacedUserID(i *int64) *OrderUpdate
SetNillablePlacedUserID sets the "placed_user_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableShippedAddress ¶
func (ou *OrderUpdate) SetNillableShippedAddress(s *string) *OrderUpdate
SetNillableShippedAddress sets the "shipped_address" field if the given value is not nil.
func (*OrderUpdate) SetNillableShippedAt ¶
func (ou *OrderUpdate) SetNillableShippedAt(t *time.Time) *OrderUpdate
SetNillableShippedAt sets the "shipped_at" field if the given value is not nil.
func (*OrderUpdate) SetNillableShippingCost ¶
func (ou *OrderUpdate) SetNillableShippingCost(f *float64) *OrderUpdate
SetNillableShippingCost sets the "shipping_cost" field if the given value is not nil.
func (*OrderUpdate) SetNillableTotalAmount ¶
func (ou *OrderUpdate) SetNillableTotalAmount(f *float64) *OrderUpdate
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*OrderUpdate) SetNillableTxID ¶
func (ou *OrderUpdate) SetNillableTxID(i *int64) *OrderUpdate
SetNillableTxID sets the "tx_id" field if the given value is not nil.
func (*OrderUpdate) SetOrderNo ¶
func (ou *OrderUpdate) SetOrderNo(s string) *OrderUpdate
SetOrderNo sets the "order_no" field.
func (*OrderUpdate) SetOrderStatus ¶
func (ou *OrderUpdate) SetOrderStatus(os order.OrderStatus) *OrderUpdate
SetOrderStatus sets the "order_status" field.
func (*OrderUpdate) SetPaymentID ¶
func (ou *OrderUpdate) SetPaymentID(i int64) *OrderUpdate
SetPaymentID sets the "payment_id" field.
func (*OrderUpdate) SetPlacedAt ¶
func (ou *OrderUpdate) SetPlacedAt(t time.Time) *OrderUpdate
SetPlacedAt sets the "placed_at" field.
func (*OrderUpdate) SetPlacedUserID ¶
func (ou *OrderUpdate) SetPlacedUserID(i int64) *OrderUpdate
SetPlacedUserID sets the "placed_user_id" field.
func (*OrderUpdate) SetShippedAddress ¶
func (ou *OrderUpdate) SetShippedAddress(s string) *OrderUpdate
SetShippedAddress sets the "shipped_address" field.
func (*OrderUpdate) SetShippedAt ¶
func (ou *OrderUpdate) SetShippedAt(t time.Time) *OrderUpdate
SetShippedAt sets the "shipped_at" field.
func (*OrderUpdate) SetShippingCost ¶
func (ou *OrderUpdate) SetShippingCost(f float64) *OrderUpdate
SetShippingCost sets the "shipping_cost" field.
func (*OrderUpdate) SetTotalAmount ¶
func (ou *OrderUpdate) SetTotalAmount(f float64) *OrderUpdate
SetTotalAmount sets the "total_amount" field.
func (*OrderUpdate) SetTxID ¶
func (ou *OrderUpdate) SetTxID(i int64) *OrderUpdate
SetTxID sets the "tx_id" field.
func (*OrderUpdate) Where ¶
func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
Where appends a list predicates to 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) AddPaymentID ¶
func (ouo *OrderUpdateOne) AddPaymentID(i int64) *OrderUpdateOne
AddPaymentID adds i to the "payment_id" field.
func (*OrderUpdateOne) AddPlacedUserID ¶
func (ouo *OrderUpdateOne) AddPlacedUserID(i int64) *OrderUpdateOne
AddPlacedUserID adds i to the "placed_user_id" field.
func (*OrderUpdateOne) AddShippingCost ¶
func (ouo *OrderUpdateOne) AddShippingCost(f float64) *OrderUpdateOne
AddShippingCost adds f to the "shipping_cost" field.
func (*OrderUpdateOne) AddTotalAmount ¶
func (ouo *OrderUpdateOne) AddTotalAmount(f float64) *OrderUpdateOne
AddTotalAmount adds f to the "total_amount" field.
func (*OrderUpdateOne) AddTransaction ¶
func (ouo *OrderUpdateOne) AddTransaction(t ...*Transaction) *OrderUpdateOne
AddTransaction adds the "transaction" edges to the Transaction entity.
func (*OrderUpdateOne) AddTransactionIDs ¶
func (ouo *OrderUpdateOne) AddTransactionIDs(ids ...int64) *OrderUpdateOne
AddTransactionIDs adds the "transaction" edge to the Transaction entity by IDs.
func (*OrderUpdateOne) AddTxID ¶
func (ouo *OrderUpdateOne) AddTxID(i int64) *OrderUpdateOne
AddTxID adds i to the "tx_id" field.
func (*OrderUpdateOne) AddTxItemIDs ¶
func (ouo *OrderUpdateOne) AddTxItemIDs(ids ...int64) *OrderUpdateOne
AddTxItemIDs adds the "txItems" edge to the TxItem entity by IDs.
func (*OrderUpdateOne) AddTxItems ¶
func (ouo *OrderUpdateOne) AddTxItems(t ...*TxItem) *OrderUpdateOne
AddTxItems adds the "txItems" edges to the TxItem entity.
func (*OrderUpdateOne) ClearDeliveredAddress ¶
func (ouo *OrderUpdateOne) ClearDeliveredAddress() *OrderUpdateOne
ClearDeliveredAddress clears the value of the "delivered_address" field.
func (*OrderUpdateOne) ClearOrderNo ¶
func (ouo *OrderUpdateOne) ClearOrderNo() *OrderUpdateOne
ClearOrderNo clears the value of the "order_no" field.
func (*OrderUpdateOne) ClearPaymentID ¶
func (ouo *OrderUpdateOne) ClearPaymentID() *OrderUpdateOne
ClearPaymentID clears the value of the "payment_id" field.
func (*OrderUpdateOne) ClearPlacedAt ¶
func (ouo *OrderUpdateOne) ClearPlacedAt() *OrderUpdateOne
ClearPlacedAt clears the value of the "placed_at" field.
func (*OrderUpdateOne) ClearShippedAddress ¶
func (ouo *OrderUpdateOne) ClearShippedAddress() *OrderUpdateOne
ClearShippedAddress clears the value of the "shipped_address" field.
func (*OrderUpdateOne) ClearShippedAt ¶
func (ouo *OrderUpdateOne) ClearShippedAt() *OrderUpdateOne
ClearShippedAt clears the value of the "shipped_at" field.
func (*OrderUpdateOne) ClearShippingCost ¶
func (ouo *OrderUpdateOne) ClearShippingCost() *OrderUpdateOne
ClearShippingCost clears the value of the "shipping_cost" field.
func (*OrderUpdateOne) ClearTotalAmount ¶
func (ouo *OrderUpdateOne) ClearTotalAmount() *OrderUpdateOne
ClearTotalAmount clears the value of the "total_amount" field.
func (*OrderUpdateOne) ClearTransaction ¶
func (ouo *OrderUpdateOne) ClearTransaction() *OrderUpdateOne
ClearTransaction clears all "transaction" edges to the Transaction entity.
func (*OrderUpdateOne) ClearTxItems ¶
func (ouo *OrderUpdateOne) ClearTxItems() *OrderUpdateOne
ClearTxItems clears all "txItems" edges to the TxItem entity.
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) RemoveTransaction ¶
func (ouo *OrderUpdateOne) RemoveTransaction(t ...*Transaction) *OrderUpdateOne
RemoveTransaction removes "transaction" edges to Transaction entities.
func (*OrderUpdateOne) RemoveTransactionIDs ¶
func (ouo *OrderUpdateOne) RemoveTransactionIDs(ids ...int64) *OrderUpdateOne
RemoveTransactionIDs removes the "transaction" edge to Transaction entities by IDs.
func (*OrderUpdateOne) RemoveTxItemIDs ¶
func (ouo *OrderUpdateOne) RemoveTxItemIDs(ids ...int64) *OrderUpdateOne
RemoveTxItemIDs removes the "txItems" edge to TxItem entities by IDs.
func (*OrderUpdateOne) RemoveTxItems ¶
func (ouo *OrderUpdateOne) RemoveTxItems(t ...*TxItem) *OrderUpdateOne
RemoveTxItems removes "txItems" edges to TxItem entities.
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) SetDeliveredAddress ¶
func (ouo *OrderUpdateOne) SetDeliveredAddress(s string) *OrderUpdateOne
SetDeliveredAddress sets the "delivered_address" field.
func (*OrderUpdateOne) SetNillableDeliveredAddress ¶
func (ouo *OrderUpdateOne) SetNillableDeliveredAddress(s *string) *OrderUpdateOne
SetNillableDeliveredAddress sets the "delivered_address" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableOrderNo ¶
func (ouo *OrderUpdateOne) SetNillableOrderNo(s *string) *OrderUpdateOne
SetNillableOrderNo sets the "order_no" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableOrderStatus ¶
func (ouo *OrderUpdateOne) SetNillableOrderStatus(os *order.OrderStatus) *OrderUpdateOne
SetNillableOrderStatus sets the "order_status" field if the given value is not nil.
func (*OrderUpdateOne) SetNillablePaymentID ¶
func (ouo *OrderUpdateOne) SetNillablePaymentID(i *int64) *OrderUpdateOne
SetNillablePaymentID sets the "payment_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillablePlacedAt ¶
func (ouo *OrderUpdateOne) SetNillablePlacedAt(t *time.Time) *OrderUpdateOne
SetNillablePlacedAt sets the "placed_at" field if the given value is not nil.
func (*OrderUpdateOne) SetNillablePlacedUserID ¶
func (ouo *OrderUpdateOne) SetNillablePlacedUserID(i *int64) *OrderUpdateOne
SetNillablePlacedUserID sets the "placed_user_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableShippedAddress ¶
func (ouo *OrderUpdateOne) SetNillableShippedAddress(s *string) *OrderUpdateOne
SetNillableShippedAddress sets the "shipped_address" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableShippedAt ¶
func (ouo *OrderUpdateOne) SetNillableShippedAt(t *time.Time) *OrderUpdateOne
SetNillableShippedAt sets the "shipped_at" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableShippingCost ¶
func (ouo *OrderUpdateOne) SetNillableShippingCost(f *float64) *OrderUpdateOne
SetNillableShippingCost sets the "shipping_cost" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableTotalAmount ¶
func (ouo *OrderUpdateOne) SetNillableTotalAmount(f *float64) *OrderUpdateOne
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableTxID ¶
func (ouo *OrderUpdateOne) SetNillableTxID(i *int64) *OrderUpdateOne
SetNillableTxID sets the "tx_id" field if the given value is not nil.
func (*OrderUpdateOne) SetOrderNo ¶
func (ouo *OrderUpdateOne) SetOrderNo(s string) *OrderUpdateOne
SetOrderNo sets the "order_no" field.
func (*OrderUpdateOne) SetOrderStatus ¶
func (ouo *OrderUpdateOne) SetOrderStatus(os order.OrderStatus) *OrderUpdateOne
SetOrderStatus sets the "order_status" field.
func (*OrderUpdateOne) SetPaymentID ¶
func (ouo *OrderUpdateOne) SetPaymentID(i int64) *OrderUpdateOne
SetPaymentID sets the "payment_id" field.
func (*OrderUpdateOne) SetPlacedAt ¶
func (ouo *OrderUpdateOne) SetPlacedAt(t time.Time) *OrderUpdateOne
SetPlacedAt sets the "placed_at" field.
func (*OrderUpdateOne) SetPlacedUserID ¶
func (ouo *OrderUpdateOne) SetPlacedUserID(i int64) *OrderUpdateOne
SetPlacedUserID sets the "placed_user_id" field.
func (*OrderUpdateOne) SetShippedAddress ¶
func (ouo *OrderUpdateOne) SetShippedAddress(s string) *OrderUpdateOne
SetShippedAddress sets the "shipped_address" field.
func (*OrderUpdateOne) SetShippedAt ¶
func (ouo *OrderUpdateOne) SetShippedAt(t time.Time) *OrderUpdateOne
SetShippedAt sets the "shipped_at" field.
func (*OrderUpdateOne) SetShippingCost ¶
func (ouo *OrderUpdateOne) SetShippingCost(f float64) *OrderUpdateOne
SetShippingCost sets the "shipping_cost" field.
func (*OrderUpdateOne) SetTotalAmount ¶
func (ouo *OrderUpdateOne) SetTotalAmount(f float64) *OrderUpdateOne
SetTotalAmount sets the "total_amount" field.
func (*OrderUpdateOne) SetTxID ¶
func (ouo *OrderUpdateOne) SetTxID(i int64) *OrderUpdateOne
SetTxID sets the "tx_id" field.
func (*OrderUpdateOne) Where ¶
func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
Where appends a list predicates to the OrderUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Transaction ¶
type Transaction struct { // ID of the ent. // 交易ID,主键 ID int64 `json:"id,omitempty"` // 交易编号 TxNo string `json:"tx_no,omitempty"` // 交易类型(买或卖) TxType transaction.TxType `json:"tx_type,omitempty"` // 用户ID UserID int64 `json:"user_id,omitempty"` // 交易数量 Quantity int `json:"quantity,omitempty"` // 交易状态 TxStatus transaction.TxStatus `json:"tx_status,omitempty"` // 交易日期 TxDate time.Time `json:"tx_date,omitempty"` // 交易金额 TxAmount float64 `json:"tx_amount,omitempty"` // 支付ID PaymentID int64 `json:"payment_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TransactionQuery when eager-loading is set. Edges TransactionEdges `json:"edges"` // contains filtered or unexported fields }
Transaction is the model entity for the Transaction schema.
func (*Transaction) QueryTxItems ¶
func (t *Transaction) QueryTxItems() *TxItemQuery
QueryTxItems queries the "txItems" edge of the Transaction entity.
func (*Transaction) QueryTxOrder ¶
func (t *Transaction) QueryTxOrder() *OrderQuery
QueryTxOrder queries the "txOrder" edge of the Transaction entity.
func (*Transaction) String ¶
func (t *Transaction) String() string
String implements the fmt.Stringer.
func (*Transaction) Unwrap ¶
func (t *Transaction) Unwrap() *Transaction
Unwrap unwraps the Transaction 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 (*Transaction) Update ¶
func (t *Transaction) Update() *TransactionUpdateOne
Update returns a builder for updating this Transaction. Note that you need to call Transaction.Unwrap() before calling this method if this Transaction was returned from a transaction, and the transaction was committed or rolled back.
type TransactionClient ¶
type TransactionClient struct {
// contains filtered or unexported fields
}
TransactionClient is a client for the Transaction schema.
func NewTransactionClient ¶
func NewTransactionClient(c config) *TransactionClient
NewTransactionClient returns a client for the Transaction from the given config.
func (*TransactionClient) Create ¶
func (c *TransactionClient) Create() *TransactionCreate
Create returns a builder for creating a Transaction entity.
func (*TransactionClient) CreateBulk ¶
func (c *TransactionClient) CreateBulk(builders ...*TransactionCreate) *TransactionCreateBulk
CreateBulk returns a builder for creating a bulk of Transaction entities.
func (*TransactionClient) Delete ¶
func (c *TransactionClient) Delete() *TransactionDelete
Delete returns a delete builder for Transaction.
func (*TransactionClient) DeleteOne ¶
func (c *TransactionClient) DeleteOne(t *Transaction) *TransactionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TransactionClient) DeleteOneID ¶
func (c *TransactionClient) DeleteOneID(id int64) *TransactionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TransactionClient) Get ¶
func (c *TransactionClient) Get(ctx context.Context, id int64) (*Transaction, error)
Get returns a Transaction entity by its id.
func (*TransactionClient) GetX ¶
func (c *TransactionClient) GetX(ctx context.Context, id int64) *Transaction
GetX is like Get, but panics if an error occurs.
func (*TransactionClient) Hooks ¶
func (c *TransactionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TransactionClient) Intercept ¶
func (c *TransactionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `transaction.Intercept(f(g(h())))`.
func (*TransactionClient) Interceptors ¶
func (c *TransactionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TransactionClient) MapCreateBulk ¶
func (c *TransactionClient) MapCreateBulk(slice any, setFunc func(*TransactionCreate, int)) *TransactionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TransactionClient) Query ¶
func (c *TransactionClient) Query() *TransactionQuery
Query returns a query builder for Transaction.
func (*TransactionClient) QueryTxItems ¶
func (c *TransactionClient) QueryTxItems(t *Transaction) *TxItemQuery
QueryTxItems queries the txItems edge of a Transaction.
func (*TransactionClient) QueryTxOrder ¶
func (c *TransactionClient) QueryTxOrder(t *Transaction) *OrderQuery
QueryTxOrder queries the txOrder edge of a Transaction.
func (*TransactionClient) Update ¶
func (c *TransactionClient) Update() *TransactionUpdate
Update returns an update builder for Transaction.
func (*TransactionClient) UpdateOne ¶
func (c *TransactionClient) UpdateOne(t *Transaction) *TransactionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TransactionClient) UpdateOneID ¶
func (c *TransactionClient) UpdateOneID(id int64) *TransactionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TransactionClient) Use ¶
func (c *TransactionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `transaction.Hooks(f(g(h())))`.
type TransactionCreate ¶
type TransactionCreate struct {
// contains filtered or unexported fields
}
TransactionCreate is the builder for creating a Transaction entity.
func (*TransactionCreate) AddTxItemIDs ¶
func (tc *TransactionCreate) AddTxItemIDs(ids ...int64) *TransactionCreate
AddTxItemIDs adds the "txItems" edge to the TxItem entity by IDs.
func (*TransactionCreate) AddTxItems ¶
func (tc *TransactionCreate) AddTxItems(t ...*TxItem) *TransactionCreate
AddTxItems adds the "txItems" edges to the TxItem entity.
func (*TransactionCreate) AddTxOrder ¶
func (tc *TransactionCreate) AddTxOrder(o ...*Order) *TransactionCreate
AddTxOrder adds the "txOrder" edges to the Order entity.
func (*TransactionCreate) AddTxOrderIDs ¶
func (tc *TransactionCreate) AddTxOrderIDs(ids ...int64) *TransactionCreate
AddTxOrderIDs adds the "txOrder" edge to the Order entity by IDs.
func (*TransactionCreate) Exec ¶
func (tc *TransactionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionCreate) ExecX ¶
func (tc *TransactionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionCreate) Mutation ¶
func (tc *TransactionCreate) Mutation() *TransactionMutation
Mutation returns the TransactionMutation object of the builder.
func (*TransactionCreate) Save ¶
func (tc *TransactionCreate) Save(ctx context.Context) (*Transaction, error)
Save creates the Transaction in the database.
func (*TransactionCreate) SaveX ¶
func (tc *TransactionCreate) SaveX(ctx context.Context) *Transaction
SaveX calls Save and panics if Save returns an error.
func (*TransactionCreate) SetID ¶
func (tc *TransactionCreate) SetID(i int64) *TransactionCreate
SetID sets the "id" field.
func (*TransactionCreate) SetNillablePaymentID ¶
func (tc *TransactionCreate) SetNillablePaymentID(i *int64) *TransactionCreate
SetNillablePaymentID sets the "payment_id" field if the given value is not nil.
func (*TransactionCreate) SetNillableTxAmount ¶
func (tc *TransactionCreate) SetNillableTxAmount(f *float64) *TransactionCreate
SetNillableTxAmount sets the "tx_amount" field if the given value is not nil.
func (*TransactionCreate) SetNillableTxDate ¶
func (tc *TransactionCreate) SetNillableTxDate(t *time.Time) *TransactionCreate
SetNillableTxDate sets the "tx_date" field if the given value is not nil.
func (*TransactionCreate) SetPaymentID ¶
func (tc *TransactionCreate) SetPaymentID(i int64) *TransactionCreate
SetPaymentID sets the "payment_id" field.
func (*TransactionCreate) SetQuantity ¶
func (tc *TransactionCreate) SetQuantity(i int) *TransactionCreate
SetQuantity sets the "quantity" field.
func (*TransactionCreate) SetTxAmount ¶
func (tc *TransactionCreate) SetTxAmount(f float64) *TransactionCreate
SetTxAmount sets the "tx_amount" field.
func (*TransactionCreate) SetTxDate ¶
func (tc *TransactionCreate) SetTxDate(t time.Time) *TransactionCreate
SetTxDate sets the "tx_date" field.
func (*TransactionCreate) SetTxNo ¶
func (tc *TransactionCreate) SetTxNo(s string) *TransactionCreate
SetTxNo sets the "tx_no" field.
func (*TransactionCreate) SetTxStatus ¶
func (tc *TransactionCreate) SetTxStatus(ts transaction.TxStatus) *TransactionCreate
SetTxStatus sets the "tx_status" field.
func (*TransactionCreate) SetTxType ¶
func (tc *TransactionCreate) SetTxType(tt transaction.TxType) *TransactionCreate
SetTxType sets the "tx_type" field.
func (*TransactionCreate) SetUserID ¶
func (tc *TransactionCreate) SetUserID(i int64) *TransactionCreate
SetUserID sets the "user_id" field.
type TransactionCreateBulk ¶
type TransactionCreateBulk struct {
// contains filtered or unexported fields
}
TransactionCreateBulk is the builder for creating many Transaction entities in bulk.
func (*TransactionCreateBulk) Exec ¶
func (tcb *TransactionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionCreateBulk) ExecX ¶
func (tcb *TransactionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionCreateBulk) Save ¶
func (tcb *TransactionCreateBulk) Save(ctx context.Context) ([]*Transaction, error)
Save creates the Transaction entities in the database.
func (*TransactionCreateBulk) SaveX ¶
func (tcb *TransactionCreateBulk) SaveX(ctx context.Context) []*Transaction
SaveX is like Save, but panics if an error occurs.
type TransactionDelete ¶
type TransactionDelete struct {
// contains filtered or unexported fields
}
TransactionDelete is the builder for deleting a Transaction entity.
func (*TransactionDelete) Exec ¶
func (td *TransactionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TransactionDelete) ExecX ¶
func (td *TransactionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TransactionDelete) Where ¶
func (td *TransactionDelete) Where(ps ...predicate.Transaction) *TransactionDelete
Where appends a list predicates to the TransactionDelete builder.
type TransactionDeleteOne ¶
type TransactionDeleteOne struct {
// contains filtered or unexported fields
}
TransactionDeleteOne is the builder for deleting a single Transaction entity.
func (*TransactionDeleteOne) Exec ¶
func (tdo *TransactionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TransactionDeleteOne) ExecX ¶
func (tdo *TransactionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionDeleteOne) Where ¶
func (tdo *TransactionDeleteOne) Where(ps ...predicate.Transaction) *TransactionDeleteOne
Where appends a list predicates to the TransactionDelete builder.
type TransactionEdges ¶
type TransactionEdges struct { // TxItems holds the value of the txItems edge. TxItems []*TxItem `json:"txItems,omitempty"` // TxOrder holds the value of the txOrder edge. TxOrder []*Order `json:"txOrder,omitempty"` // contains filtered or unexported fields }
TransactionEdges holds the relations/edges for other nodes in the graph.
func (TransactionEdges) TxItemsOrErr ¶
func (e TransactionEdges) TxItemsOrErr() ([]*TxItem, error)
TxItemsOrErr returns the TxItems value or an error if the edge was not loaded in eager-loading.
func (TransactionEdges) TxOrderOrErr ¶
func (e TransactionEdges) TxOrderOrErr() ([]*Order, error)
TxOrderOrErr returns the TxOrder value or an error if the edge was not loaded in eager-loading.
type TransactionGroupBy ¶
type TransactionGroupBy struct {
// contains filtered or unexported fields
}
TransactionGroupBy is the group-by builder for Transaction entities.
func (*TransactionGroupBy) Aggregate ¶
func (tgb *TransactionGroupBy) Aggregate(fns ...AggregateFunc) *TransactionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TransactionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TransactionGroupBy) Scan ¶
func (tgb *TransactionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TransactionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TransactionMutation ¶
type TransactionMutation struct {
// contains filtered or unexported fields
}
TransactionMutation represents an operation that mutates the Transaction nodes in the graph.
func (*TransactionMutation) AddField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) AddPaymentID ¶
func (m *TransactionMutation) AddPaymentID(i int64)
AddPaymentID adds i to the "payment_id" field.
func (*TransactionMutation) AddQuantity ¶
func (m *TransactionMutation) AddQuantity(i int)
AddQuantity adds i to the "quantity" field.
func (*TransactionMutation) AddTxAmount ¶
func (m *TransactionMutation) AddTxAmount(f float64)
AddTxAmount adds f to the "tx_amount" field.
func (*TransactionMutation) AddTxItemIDs ¶
func (m *TransactionMutation) AddTxItemIDs(ids ...int64)
AddTxItemIDs adds the "txItems" edge to the TxItem entity by ids.
func (*TransactionMutation) AddTxOrderIDs ¶
func (m *TransactionMutation) AddTxOrderIDs(ids ...int64)
AddTxOrderIDs adds the "txOrder" edge to the Order entity by ids.
func (*TransactionMutation) AddUserID ¶
func (m *TransactionMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*TransactionMutation) AddedEdges ¶
func (m *TransactionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TransactionMutation) AddedField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) AddedFields ¶
func (m *TransactionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TransactionMutation) AddedIDs ¶
func (m *TransactionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TransactionMutation) AddedPaymentID ¶
func (m *TransactionMutation) AddedPaymentID() (r int64, exists bool)
AddedPaymentID returns the value that was added to the "payment_id" field in this mutation.
func (*TransactionMutation) AddedQuantity ¶
func (m *TransactionMutation) AddedQuantity() (r int, exists bool)
AddedQuantity returns the value that was added to the "quantity" field in this mutation.
func (*TransactionMutation) AddedTxAmount ¶
func (m *TransactionMutation) AddedTxAmount() (r float64, exists bool)
AddedTxAmount returns the value that was added to the "tx_amount" field in this mutation.
func (*TransactionMutation) AddedUserID ¶
func (m *TransactionMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*TransactionMutation) ClearEdge ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ClearField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ClearPaymentID ¶
func (m *TransactionMutation) ClearPaymentID()
ClearPaymentID clears the value of the "payment_id" field.
func (*TransactionMutation) ClearTxAmount ¶
func (m *TransactionMutation) ClearTxAmount()
ClearTxAmount clears the value of the "tx_amount" field.
func (*TransactionMutation) ClearTxDate ¶
func (m *TransactionMutation) ClearTxDate()
ClearTxDate clears the value of the "tx_date" field.
func (*TransactionMutation) ClearTxItems ¶
func (m *TransactionMutation) ClearTxItems()
ClearTxItems clears the "txItems" edge to the TxItem entity.
func (*TransactionMutation) ClearTxOrder ¶
func (m *TransactionMutation) ClearTxOrder()
ClearTxOrder clears the "txOrder" edge to the Order entity.
func (*TransactionMutation) ClearedEdges ¶
func (m *TransactionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TransactionMutation) ClearedFields ¶
func (m *TransactionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TransactionMutation) Client ¶
func (m TransactionMutation) 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 (*TransactionMutation) EdgeCleared ¶
func (m *TransactionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TransactionMutation) Field ¶
func (m *TransactionMutation) 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 (*TransactionMutation) FieldCleared ¶
func (m *TransactionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TransactionMutation) Fields ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ID ¶
func (m *TransactionMutation) 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 or after it was returned from the database.
func (*TransactionMutation) IDs ¶
func (m *TransactionMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TransactionMutation) 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 (*TransactionMutation) OldPaymentID ¶
func (m *TransactionMutation) OldPaymentID(ctx context.Context) (v int64, err error)
OldPaymentID returns the old "payment_id" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldQuantity ¶
func (m *TransactionMutation) OldQuantity(ctx context.Context) (v int, err error)
OldQuantity returns the old "quantity" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldTxAmount ¶
func (m *TransactionMutation) OldTxAmount(ctx context.Context) (v float64, err error)
OldTxAmount returns the old "tx_amount" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldTxDate ¶
OldTxDate returns the old "tx_date" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldTxNo ¶
func (m *TransactionMutation) OldTxNo(ctx context.Context) (v string, err error)
OldTxNo returns the old "tx_no" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldTxStatus ¶
func (m *TransactionMutation) OldTxStatus(ctx context.Context) (v transaction.TxStatus, err error)
OldTxStatus returns the old "tx_status" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldTxType ¶
func (m *TransactionMutation) OldTxType(ctx context.Context) (v transaction.TxType, err error)
OldTxType returns the old "tx_type" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) OldUserID ¶
func (m *TransactionMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the Transaction entity. If the Transaction 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 (*TransactionMutation) Op ¶
func (m *TransactionMutation) Op() Op
Op returns the operation name.
func (*TransactionMutation) PaymentID ¶
func (m *TransactionMutation) PaymentID() (r int64, exists bool)
PaymentID returns the value of the "payment_id" field in the mutation.
func (*TransactionMutation) PaymentIDCleared ¶
func (m *TransactionMutation) PaymentIDCleared() bool
PaymentIDCleared returns if the "payment_id" field was cleared in this mutation.
func (*TransactionMutation) Quantity ¶
func (m *TransactionMutation) Quantity() (r int, exists bool)
Quantity returns the value of the "quantity" field in the mutation.
func (*TransactionMutation) RemoveTxItemIDs ¶
func (m *TransactionMutation) RemoveTxItemIDs(ids ...int64)
RemoveTxItemIDs removes the "txItems" edge to the TxItem entity by IDs.
func (*TransactionMutation) RemoveTxOrderIDs ¶
func (m *TransactionMutation) RemoveTxOrderIDs(ids ...int64)
RemoveTxOrderIDs removes the "txOrder" edge to the Order entity by IDs.
func (*TransactionMutation) RemovedEdges ¶
func (m *TransactionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TransactionMutation) RemovedIDs ¶
func (m *TransactionMutation) 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 (*TransactionMutation) RemovedTxItemsIDs ¶
func (m *TransactionMutation) RemovedTxItemsIDs() (ids []int64)
RemovedTxItems returns the removed IDs of the "txItems" edge to the TxItem entity.
func (*TransactionMutation) RemovedTxOrderIDs ¶
func (m *TransactionMutation) RemovedTxOrderIDs() (ids []int64)
RemovedTxOrder returns the removed IDs of the "txOrder" edge to the Order entity.
func (*TransactionMutation) ResetEdge ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ResetField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) ResetPaymentID ¶
func (m *TransactionMutation) ResetPaymentID()
ResetPaymentID resets all changes to the "payment_id" field.
func (*TransactionMutation) ResetQuantity ¶
func (m *TransactionMutation) ResetQuantity()
ResetQuantity resets all changes to the "quantity" field.
func (*TransactionMutation) ResetTxAmount ¶
func (m *TransactionMutation) ResetTxAmount()
ResetTxAmount resets all changes to the "tx_amount" field.
func (*TransactionMutation) ResetTxDate ¶
func (m *TransactionMutation) ResetTxDate()
ResetTxDate resets all changes to the "tx_date" field.
func (*TransactionMutation) ResetTxItems ¶
func (m *TransactionMutation) ResetTxItems()
ResetTxItems resets all changes to the "txItems" edge.
func (*TransactionMutation) ResetTxNo ¶
func (m *TransactionMutation) ResetTxNo()
ResetTxNo resets all changes to the "tx_no" field.
func (*TransactionMutation) ResetTxOrder ¶
func (m *TransactionMutation) ResetTxOrder()
ResetTxOrder resets all changes to the "txOrder" edge.
func (*TransactionMutation) ResetTxStatus ¶
func (m *TransactionMutation) ResetTxStatus()
ResetTxStatus resets all changes to the "tx_status" field.
func (*TransactionMutation) ResetTxType ¶
func (m *TransactionMutation) ResetTxType()
ResetTxType resets all changes to the "tx_type" field.
func (*TransactionMutation) ResetUserID ¶
func (m *TransactionMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*TransactionMutation) SetField ¶
func (m *TransactionMutation) 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 (*TransactionMutation) SetID ¶
func (m *TransactionMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Transaction entities.
func (*TransactionMutation) SetOp ¶
func (m *TransactionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TransactionMutation) SetPaymentID ¶
func (m *TransactionMutation) SetPaymentID(i int64)
SetPaymentID sets the "payment_id" field.
func (*TransactionMutation) SetQuantity ¶
func (m *TransactionMutation) SetQuantity(i int)
SetQuantity sets the "quantity" field.
func (*TransactionMutation) SetTxAmount ¶
func (m *TransactionMutation) SetTxAmount(f float64)
SetTxAmount sets the "tx_amount" field.
func (*TransactionMutation) SetTxDate ¶
func (m *TransactionMutation) SetTxDate(t time.Time)
SetTxDate sets the "tx_date" field.
func (*TransactionMutation) SetTxNo ¶
func (m *TransactionMutation) SetTxNo(s string)
SetTxNo sets the "tx_no" field.
func (*TransactionMutation) SetTxStatus ¶
func (m *TransactionMutation) SetTxStatus(ts transaction.TxStatus)
SetTxStatus sets the "tx_status" field.
func (*TransactionMutation) SetTxType ¶
func (m *TransactionMutation) SetTxType(tt transaction.TxType)
SetTxType sets the "tx_type" field.
func (*TransactionMutation) SetUserID ¶
func (m *TransactionMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (TransactionMutation) Tx ¶
func (m TransactionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TransactionMutation) TxAmount ¶
func (m *TransactionMutation) TxAmount() (r float64, exists bool)
TxAmount returns the value of the "tx_amount" field in the mutation.
func (*TransactionMutation) TxAmountCleared ¶
func (m *TransactionMutation) TxAmountCleared() bool
TxAmountCleared returns if the "tx_amount" field was cleared in this mutation.
func (*TransactionMutation) TxDate ¶
func (m *TransactionMutation) TxDate() (r time.Time, exists bool)
TxDate returns the value of the "tx_date" field in the mutation.
func (*TransactionMutation) TxDateCleared ¶
func (m *TransactionMutation) TxDateCleared() bool
TxDateCleared returns if the "tx_date" field was cleared in this mutation.
func (*TransactionMutation) TxItemsCleared ¶
func (m *TransactionMutation) TxItemsCleared() bool
TxItemsCleared reports if the "txItems" edge to the TxItem entity was cleared.
func (*TransactionMutation) TxItemsIDs ¶
func (m *TransactionMutation) TxItemsIDs() (ids []int64)
TxItemsIDs returns the "txItems" edge IDs in the mutation.
func (*TransactionMutation) TxNo ¶
func (m *TransactionMutation) TxNo() (r string, exists bool)
TxNo returns the value of the "tx_no" field in the mutation.
func (*TransactionMutation) TxOrderCleared ¶
func (m *TransactionMutation) TxOrderCleared() bool
TxOrderCleared reports if the "txOrder" edge to the Order entity was cleared.
func (*TransactionMutation) TxOrderIDs ¶
func (m *TransactionMutation) TxOrderIDs() (ids []int64)
TxOrderIDs returns the "txOrder" edge IDs in the mutation.
func (*TransactionMutation) TxStatus ¶
func (m *TransactionMutation) TxStatus() (r transaction.TxStatus, exists bool)
TxStatus returns the value of the "tx_status" field in the mutation.
func (*TransactionMutation) TxType ¶
func (m *TransactionMutation) TxType() (r transaction.TxType, exists bool)
TxType returns the value of the "tx_type" field in the mutation.
func (*TransactionMutation) Type ¶
func (m *TransactionMutation) Type() string
Type returns the node type of this mutation (Transaction).
func (*TransactionMutation) UserID ¶
func (m *TransactionMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*TransactionMutation) Where ¶
func (m *TransactionMutation) Where(ps ...predicate.Transaction)
Where appends a list predicates to the TransactionMutation builder.
func (*TransactionMutation) WhereP ¶
func (m *TransactionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TransactionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TransactionQuery ¶
type TransactionQuery struct {
// contains filtered or unexported fields
}
TransactionQuery is the builder for querying Transaction entities.
func (*TransactionQuery) Aggregate ¶
func (tq *TransactionQuery) Aggregate(fns ...AggregateFunc) *TransactionSelect
Aggregate returns a TransactionSelect configured with the given aggregations.
func (*TransactionQuery) All ¶
func (tq *TransactionQuery) All(ctx context.Context) ([]*Transaction, error)
All executes the query and returns a list of Transactions.
func (*TransactionQuery) AllX ¶
func (tq *TransactionQuery) AllX(ctx context.Context) []*Transaction
AllX is like All, but panics if an error occurs.
func (*TransactionQuery) Clone ¶
func (tq *TransactionQuery) Clone() *TransactionQuery
Clone returns a duplicate of the TransactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TransactionQuery) Count ¶
func (tq *TransactionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TransactionQuery) CountX ¶
func (tq *TransactionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TransactionQuery) Exist ¶
func (tq *TransactionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TransactionQuery) ExistX ¶
func (tq *TransactionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TransactionQuery) First ¶
func (tq *TransactionQuery) First(ctx context.Context) (*Transaction, error)
First returns the first Transaction entity from the query. Returns a *NotFoundError when no Transaction was found.
func (*TransactionQuery) FirstID ¶
func (tq *TransactionQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Transaction ID from the query. Returns a *NotFoundError when no Transaction ID was found.
func (*TransactionQuery) FirstIDX ¶
func (tq *TransactionQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*TransactionQuery) FirstX ¶
func (tq *TransactionQuery) FirstX(ctx context.Context) *Transaction
FirstX is like First, but panics if an error occurs.
func (*TransactionQuery) GroupBy ¶
func (tq *TransactionQuery) GroupBy(field string, fields ...string) *TransactionGroupBy
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 { TxNo string `json:"tx_no,omitempty"` Count int `json:"count,omitempty"` } client.Transaction.Query(). GroupBy(transaction.FieldTxNo). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TransactionQuery) IDs ¶
func (tq *TransactionQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Transaction IDs.
func (*TransactionQuery) IDsX ¶
func (tq *TransactionQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*TransactionQuery) Limit ¶
func (tq *TransactionQuery) Limit(limit int) *TransactionQuery
Limit the number of records to be returned by this query.
func (*TransactionQuery) Offset ¶
func (tq *TransactionQuery) Offset(offset int) *TransactionQuery
Offset to start from.
func (*TransactionQuery) Only ¶
func (tq *TransactionQuery) Only(ctx context.Context) (*Transaction, error)
Only returns a single Transaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Transaction entity is found. Returns a *NotFoundError when no Transaction entities are found.
func (*TransactionQuery) OnlyID ¶
func (tq *TransactionQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Transaction ID in the query. Returns a *NotSingularError when more than one Transaction ID is found. Returns a *NotFoundError when no entities are found.
func (*TransactionQuery) OnlyIDX ¶
func (tq *TransactionQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TransactionQuery) OnlyX ¶
func (tq *TransactionQuery) OnlyX(ctx context.Context) *Transaction
OnlyX is like Only, but panics if an error occurs.
func (*TransactionQuery) Order ¶
func (tq *TransactionQuery) Order(o ...transaction.OrderOption) *TransactionQuery
Order specifies how the records should be ordered.
func (*TransactionQuery) QueryTxItems ¶
func (tq *TransactionQuery) QueryTxItems() *TxItemQuery
QueryTxItems chains the current query on the "txItems" edge.
func (*TransactionQuery) QueryTxOrder ¶
func (tq *TransactionQuery) QueryTxOrder() *OrderQuery
QueryTxOrder chains the current query on the "txOrder" edge.
func (*TransactionQuery) Select ¶
func (tq *TransactionQuery) Select(fields ...string) *TransactionSelect
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 { TxNo string `json:"tx_no,omitempty"` } client.Transaction.Query(). Select(transaction.FieldTxNo). Scan(ctx, &v)
func (*TransactionQuery) Unique ¶
func (tq *TransactionQuery) Unique(unique bool) *TransactionQuery
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 (*TransactionQuery) Where ¶
func (tq *TransactionQuery) Where(ps ...predicate.Transaction) *TransactionQuery
Where adds a new predicate for the TransactionQuery builder.
func (*TransactionQuery) WithTxItems ¶
func (tq *TransactionQuery) WithTxItems(opts ...func(*TxItemQuery)) *TransactionQuery
WithTxItems tells the query-builder to eager-load the nodes that are connected to the "txItems" edge. The optional arguments are used to configure the query builder of the edge.
func (*TransactionQuery) WithTxOrder ¶
func (tq *TransactionQuery) WithTxOrder(opts ...func(*OrderQuery)) *TransactionQuery
WithTxOrder tells the query-builder to eager-load the nodes that are connected to the "txOrder" edge. The optional arguments are used to configure the query builder of the edge.
type TransactionSelect ¶
type TransactionSelect struct { *TransactionQuery // contains filtered or unexported fields }
TransactionSelect is the builder for selecting fields of Transaction entities.
func (*TransactionSelect) Aggregate ¶
func (ts *TransactionSelect) Aggregate(fns ...AggregateFunc) *TransactionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TransactionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TransactionSelect) Scan ¶
func (ts *TransactionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TransactionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TransactionUpdate ¶
type TransactionUpdate struct {
// contains filtered or unexported fields
}
TransactionUpdate is the builder for updating Transaction entities.
func (*TransactionUpdate) AddPaymentID ¶
func (tu *TransactionUpdate) AddPaymentID(i int64) *TransactionUpdate
AddPaymentID adds i to the "payment_id" field.
func (*TransactionUpdate) AddQuantity ¶
func (tu *TransactionUpdate) AddQuantity(i int) *TransactionUpdate
AddQuantity adds i to the "quantity" field.
func (*TransactionUpdate) AddTxAmount ¶
func (tu *TransactionUpdate) AddTxAmount(f float64) *TransactionUpdate
AddTxAmount adds f to the "tx_amount" field.
func (*TransactionUpdate) AddTxItemIDs ¶
func (tu *TransactionUpdate) AddTxItemIDs(ids ...int64) *TransactionUpdate
AddTxItemIDs adds the "txItems" edge to the TxItem entity by IDs.
func (*TransactionUpdate) AddTxItems ¶
func (tu *TransactionUpdate) AddTxItems(t ...*TxItem) *TransactionUpdate
AddTxItems adds the "txItems" edges to the TxItem entity.
func (*TransactionUpdate) AddTxOrder ¶
func (tu *TransactionUpdate) AddTxOrder(o ...*Order) *TransactionUpdate
AddTxOrder adds the "txOrder" edges to the Order entity.
func (*TransactionUpdate) AddTxOrderIDs ¶
func (tu *TransactionUpdate) AddTxOrderIDs(ids ...int64) *TransactionUpdate
AddTxOrderIDs adds the "txOrder" edge to the Order entity by IDs.
func (*TransactionUpdate) AddUserID ¶
func (tu *TransactionUpdate) AddUserID(i int64) *TransactionUpdate
AddUserID adds i to the "user_id" field.
func (*TransactionUpdate) ClearPaymentID ¶
func (tu *TransactionUpdate) ClearPaymentID() *TransactionUpdate
ClearPaymentID clears the value of the "payment_id" field.
func (*TransactionUpdate) ClearTxAmount ¶
func (tu *TransactionUpdate) ClearTxAmount() *TransactionUpdate
ClearTxAmount clears the value of the "tx_amount" field.
func (*TransactionUpdate) ClearTxDate ¶
func (tu *TransactionUpdate) ClearTxDate() *TransactionUpdate
ClearTxDate clears the value of the "tx_date" field.
func (*TransactionUpdate) ClearTxItems ¶
func (tu *TransactionUpdate) ClearTxItems() *TransactionUpdate
ClearTxItems clears all "txItems" edges to the TxItem entity.
func (*TransactionUpdate) ClearTxOrder ¶
func (tu *TransactionUpdate) ClearTxOrder() *TransactionUpdate
ClearTxOrder clears all "txOrder" edges to the Order entity.
func (*TransactionUpdate) Exec ¶
func (tu *TransactionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TransactionUpdate) ExecX ¶
func (tu *TransactionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionUpdate) Mutation ¶
func (tu *TransactionUpdate) Mutation() *TransactionMutation
Mutation returns the TransactionMutation object of the builder.
func (*TransactionUpdate) RemoveTxItemIDs ¶
func (tu *TransactionUpdate) RemoveTxItemIDs(ids ...int64) *TransactionUpdate
RemoveTxItemIDs removes the "txItems" edge to TxItem entities by IDs.
func (*TransactionUpdate) RemoveTxItems ¶
func (tu *TransactionUpdate) RemoveTxItems(t ...*TxItem) *TransactionUpdate
RemoveTxItems removes "txItems" edges to TxItem entities.
func (*TransactionUpdate) RemoveTxOrder ¶
func (tu *TransactionUpdate) RemoveTxOrder(o ...*Order) *TransactionUpdate
RemoveTxOrder removes "txOrder" edges to Order entities.
func (*TransactionUpdate) RemoveTxOrderIDs ¶
func (tu *TransactionUpdate) RemoveTxOrderIDs(ids ...int64) *TransactionUpdate
RemoveTxOrderIDs removes the "txOrder" edge to Order entities by IDs.
func (*TransactionUpdate) Save ¶
func (tu *TransactionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TransactionUpdate) SaveX ¶
func (tu *TransactionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TransactionUpdate) SetNillablePaymentID ¶
func (tu *TransactionUpdate) SetNillablePaymentID(i *int64) *TransactionUpdate
SetNillablePaymentID sets the "payment_id" field if the given value is not nil.
func (*TransactionUpdate) SetNillableQuantity ¶
func (tu *TransactionUpdate) SetNillableQuantity(i *int) *TransactionUpdate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*TransactionUpdate) SetNillableTxAmount ¶
func (tu *TransactionUpdate) SetNillableTxAmount(f *float64) *TransactionUpdate
SetNillableTxAmount sets the "tx_amount" field if the given value is not nil.
func (*TransactionUpdate) SetNillableTxDate ¶
func (tu *TransactionUpdate) SetNillableTxDate(t *time.Time) *TransactionUpdate
SetNillableTxDate sets the "tx_date" field if the given value is not nil.
func (*TransactionUpdate) SetNillableTxNo ¶
func (tu *TransactionUpdate) SetNillableTxNo(s *string) *TransactionUpdate
SetNillableTxNo sets the "tx_no" field if the given value is not nil.
func (*TransactionUpdate) SetNillableTxStatus ¶
func (tu *TransactionUpdate) SetNillableTxStatus(ts *transaction.TxStatus) *TransactionUpdate
SetNillableTxStatus sets the "tx_status" field if the given value is not nil.
func (*TransactionUpdate) SetNillableTxType ¶
func (tu *TransactionUpdate) SetNillableTxType(tt *transaction.TxType) *TransactionUpdate
SetNillableTxType sets the "tx_type" field if the given value is not nil.
func (*TransactionUpdate) SetNillableUserID ¶
func (tu *TransactionUpdate) SetNillableUserID(i *int64) *TransactionUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*TransactionUpdate) SetPaymentID ¶
func (tu *TransactionUpdate) SetPaymentID(i int64) *TransactionUpdate
SetPaymentID sets the "payment_id" field.
func (*TransactionUpdate) SetQuantity ¶
func (tu *TransactionUpdate) SetQuantity(i int) *TransactionUpdate
SetQuantity sets the "quantity" field.
func (*TransactionUpdate) SetTxAmount ¶
func (tu *TransactionUpdate) SetTxAmount(f float64) *TransactionUpdate
SetTxAmount sets the "tx_amount" field.
func (*TransactionUpdate) SetTxDate ¶
func (tu *TransactionUpdate) SetTxDate(t time.Time) *TransactionUpdate
SetTxDate sets the "tx_date" field.
func (*TransactionUpdate) SetTxNo ¶
func (tu *TransactionUpdate) SetTxNo(s string) *TransactionUpdate
SetTxNo sets the "tx_no" field.
func (*TransactionUpdate) SetTxStatus ¶
func (tu *TransactionUpdate) SetTxStatus(ts transaction.TxStatus) *TransactionUpdate
SetTxStatus sets the "tx_status" field.
func (*TransactionUpdate) SetTxType ¶
func (tu *TransactionUpdate) SetTxType(tt transaction.TxType) *TransactionUpdate
SetTxType sets the "tx_type" field.
func (*TransactionUpdate) SetUserID ¶
func (tu *TransactionUpdate) SetUserID(i int64) *TransactionUpdate
SetUserID sets the "user_id" field.
func (*TransactionUpdate) Where ¶
func (tu *TransactionUpdate) Where(ps ...predicate.Transaction) *TransactionUpdate
Where appends a list predicates to the TransactionUpdate builder.
type TransactionUpdateOne ¶
type TransactionUpdateOne struct {
// contains filtered or unexported fields
}
TransactionUpdateOne is the builder for updating a single Transaction entity.
func (*TransactionUpdateOne) AddPaymentID ¶
func (tuo *TransactionUpdateOne) AddPaymentID(i int64) *TransactionUpdateOne
AddPaymentID adds i to the "payment_id" field.
func (*TransactionUpdateOne) AddQuantity ¶
func (tuo *TransactionUpdateOne) AddQuantity(i int) *TransactionUpdateOne
AddQuantity adds i to the "quantity" field.
func (*TransactionUpdateOne) AddTxAmount ¶
func (tuo *TransactionUpdateOne) AddTxAmount(f float64) *TransactionUpdateOne
AddTxAmount adds f to the "tx_amount" field.
func (*TransactionUpdateOne) AddTxItemIDs ¶
func (tuo *TransactionUpdateOne) AddTxItemIDs(ids ...int64) *TransactionUpdateOne
AddTxItemIDs adds the "txItems" edge to the TxItem entity by IDs.
func (*TransactionUpdateOne) AddTxItems ¶
func (tuo *TransactionUpdateOne) AddTxItems(t ...*TxItem) *TransactionUpdateOne
AddTxItems adds the "txItems" edges to the TxItem entity.
func (*TransactionUpdateOne) AddTxOrder ¶
func (tuo *TransactionUpdateOne) AddTxOrder(o ...*Order) *TransactionUpdateOne
AddTxOrder adds the "txOrder" edges to the Order entity.
func (*TransactionUpdateOne) AddTxOrderIDs ¶
func (tuo *TransactionUpdateOne) AddTxOrderIDs(ids ...int64) *TransactionUpdateOne
AddTxOrderIDs adds the "txOrder" edge to the Order entity by IDs.
func (*TransactionUpdateOne) AddUserID ¶
func (tuo *TransactionUpdateOne) AddUserID(i int64) *TransactionUpdateOne
AddUserID adds i to the "user_id" field.
func (*TransactionUpdateOne) ClearPaymentID ¶
func (tuo *TransactionUpdateOne) ClearPaymentID() *TransactionUpdateOne
ClearPaymentID clears the value of the "payment_id" field.
func (*TransactionUpdateOne) ClearTxAmount ¶
func (tuo *TransactionUpdateOne) ClearTxAmount() *TransactionUpdateOne
ClearTxAmount clears the value of the "tx_amount" field.
func (*TransactionUpdateOne) ClearTxDate ¶
func (tuo *TransactionUpdateOne) ClearTxDate() *TransactionUpdateOne
ClearTxDate clears the value of the "tx_date" field.
func (*TransactionUpdateOne) ClearTxItems ¶
func (tuo *TransactionUpdateOne) ClearTxItems() *TransactionUpdateOne
ClearTxItems clears all "txItems" edges to the TxItem entity.
func (*TransactionUpdateOne) ClearTxOrder ¶
func (tuo *TransactionUpdateOne) ClearTxOrder() *TransactionUpdateOne
ClearTxOrder clears all "txOrder" edges to the Order entity.
func (*TransactionUpdateOne) Exec ¶
func (tuo *TransactionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TransactionUpdateOne) ExecX ¶
func (tuo *TransactionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TransactionUpdateOne) Mutation ¶
func (tuo *TransactionUpdateOne) Mutation() *TransactionMutation
Mutation returns the TransactionMutation object of the builder.
func (*TransactionUpdateOne) RemoveTxItemIDs ¶
func (tuo *TransactionUpdateOne) RemoveTxItemIDs(ids ...int64) *TransactionUpdateOne
RemoveTxItemIDs removes the "txItems" edge to TxItem entities by IDs.
func (*TransactionUpdateOne) RemoveTxItems ¶
func (tuo *TransactionUpdateOne) RemoveTxItems(t ...*TxItem) *TransactionUpdateOne
RemoveTxItems removes "txItems" edges to TxItem entities.
func (*TransactionUpdateOne) RemoveTxOrder ¶
func (tuo *TransactionUpdateOne) RemoveTxOrder(o ...*Order) *TransactionUpdateOne
RemoveTxOrder removes "txOrder" edges to Order entities.
func (*TransactionUpdateOne) RemoveTxOrderIDs ¶
func (tuo *TransactionUpdateOne) RemoveTxOrderIDs(ids ...int64) *TransactionUpdateOne
RemoveTxOrderIDs removes the "txOrder" edge to Order entities by IDs.
func (*TransactionUpdateOne) Save ¶
func (tuo *TransactionUpdateOne) Save(ctx context.Context) (*Transaction, error)
Save executes the query and returns the updated Transaction entity.
func (*TransactionUpdateOne) SaveX ¶
func (tuo *TransactionUpdateOne) SaveX(ctx context.Context) *Transaction
SaveX is like Save, but panics if an error occurs.
func (*TransactionUpdateOne) Select ¶
func (tuo *TransactionUpdateOne) Select(field string, fields ...string) *TransactionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TransactionUpdateOne) SetNillablePaymentID ¶
func (tuo *TransactionUpdateOne) SetNillablePaymentID(i *int64) *TransactionUpdateOne
SetNillablePaymentID sets the "payment_id" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableQuantity ¶
func (tuo *TransactionUpdateOne) SetNillableQuantity(i *int) *TransactionUpdateOne
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableTxAmount ¶
func (tuo *TransactionUpdateOne) SetNillableTxAmount(f *float64) *TransactionUpdateOne
SetNillableTxAmount sets the "tx_amount" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableTxDate ¶
func (tuo *TransactionUpdateOne) SetNillableTxDate(t *time.Time) *TransactionUpdateOne
SetNillableTxDate sets the "tx_date" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableTxNo ¶
func (tuo *TransactionUpdateOne) SetNillableTxNo(s *string) *TransactionUpdateOne
SetNillableTxNo sets the "tx_no" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableTxStatus ¶
func (tuo *TransactionUpdateOne) SetNillableTxStatus(ts *transaction.TxStatus) *TransactionUpdateOne
SetNillableTxStatus sets the "tx_status" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableTxType ¶
func (tuo *TransactionUpdateOne) SetNillableTxType(tt *transaction.TxType) *TransactionUpdateOne
SetNillableTxType sets the "tx_type" field if the given value is not nil.
func (*TransactionUpdateOne) SetNillableUserID ¶
func (tuo *TransactionUpdateOne) SetNillableUserID(i *int64) *TransactionUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*TransactionUpdateOne) SetPaymentID ¶
func (tuo *TransactionUpdateOne) SetPaymentID(i int64) *TransactionUpdateOne
SetPaymentID sets the "payment_id" field.
func (*TransactionUpdateOne) SetQuantity ¶
func (tuo *TransactionUpdateOne) SetQuantity(i int) *TransactionUpdateOne
SetQuantity sets the "quantity" field.
func (*TransactionUpdateOne) SetTxAmount ¶
func (tuo *TransactionUpdateOne) SetTxAmount(f float64) *TransactionUpdateOne
SetTxAmount sets the "tx_amount" field.
func (*TransactionUpdateOne) SetTxDate ¶
func (tuo *TransactionUpdateOne) SetTxDate(t time.Time) *TransactionUpdateOne
SetTxDate sets the "tx_date" field.
func (*TransactionUpdateOne) SetTxNo ¶
func (tuo *TransactionUpdateOne) SetTxNo(s string) *TransactionUpdateOne
SetTxNo sets the "tx_no" field.
func (*TransactionUpdateOne) SetTxStatus ¶
func (tuo *TransactionUpdateOne) SetTxStatus(ts transaction.TxStatus) *TransactionUpdateOne
SetTxStatus sets the "tx_status" field.
func (*TransactionUpdateOne) SetTxType ¶
func (tuo *TransactionUpdateOne) SetTxType(tt transaction.TxType) *TransactionUpdateOne
SetTxType sets the "tx_type" field.
func (*TransactionUpdateOne) SetUserID ¶
func (tuo *TransactionUpdateOne) SetUserID(i int64) *TransactionUpdateOne
SetUserID sets the "user_id" field.
func (*TransactionUpdateOne) Where ¶
func (tuo *TransactionUpdateOne) Where(ps ...predicate.Transaction) *TransactionUpdateOne
Where appends a list predicates to the TransactionUpdate builder.
type Transactions ¶
type Transactions []*Transaction
Transactions is a parsable slice of Transaction.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Order is the client for interacting with the Order builders. Order *OrderClient // Transaction is the client for interacting with the Transaction builders. Transaction *TransactionClient // TxItem is the client for interacting with the TxItem builders. TxItem *TxItemClient // 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 TxItem ¶
type TxItem struct { // ID of the ent. // 交易明细ID,主键 ID int64 `json:"id,omitempty"` // 交易类型(买或卖) TxType txitem.TxType `json:"tx_type,omitempty"` // 交易ID TxID int64 `json:"tx_id,omitempty"` // 书籍ID BookID int64 `json:"book_id,omitempty"` // 交易数量 Quantity int `json:"quantity,omitempty"` // 交易价格 Price float64 `json:"price,omitempty"` // ISBN Isbn string `json:"isbn,omitempty"` // 书名 Title string `json:"title,omitempty"` // 主编 Author string `json:"author,omitempty"` // 出版社ID PublisherID int64 `json:"publisher_id,omitempty"` // 图片URL ImageURL string `json:"image_url,omitempty"` // contains filtered or unexported fields }
TxItem is the model entity for the TxItem schema.
func (*TxItem) Unwrap ¶
Unwrap unwraps the TxItem 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 (*TxItem) Update ¶
func (ti *TxItem) Update() *TxItemUpdateOne
Update returns a builder for updating this TxItem. Note that you need to call TxItem.Unwrap() before calling this method if this TxItem was returned from a transaction, and the transaction was committed or rolled back.
type TxItemClient ¶
type TxItemClient struct {
// contains filtered or unexported fields
}
TxItemClient is a client for the TxItem schema.
func NewTxItemClient ¶
func NewTxItemClient(c config) *TxItemClient
NewTxItemClient returns a client for the TxItem from the given config.
func (*TxItemClient) Create ¶
func (c *TxItemClient) Create() *TxItemCreate
Create returns a builder for creating a TxItem entity.
func (*TxItemClient) CreateBulk ¶
func (c *TxItemClient) CreateBulk(builders ...*TxItemCreate) *TxItemCreateBulk
CreateBulk returns a builder for creating a bulk of TxItem entities.
func (*TxItemClient) Delete ¶
func (c *TxItemClient) Delete() *TxItemDelete
Delete returns a delete builder for TxItem.
func (*TxItemClient) DeleteOne ¶
func (c *TxItemClient) DeleteOne(ti *TxItem) *TxItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TxItemClient) DeleteOneID ¶
func (c *TxItemClient) DeleteOneID(id int64) *TxItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TxItemClient) GetX ¶
func (c *TxItemClient) GetX(ctx context.Context, id int64) *TxItem
GetX is like Get, but panics if an error occurs.
func (*TxItemClient) Intercept ¶
func (c *TxItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `txitem.Intercept(f(g(h())))`.
func (*TxItemClient) Interceptors ¶
func (c *TxItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TxItemClient) MapCreateBulk ¶
func (c *TxItemClient) MapCreateBulk(slice any, setFunc func(*TxItemCreate, int)) *TxItemCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TxItemClient) Query ¶
func (c *TxItemClient) Query() *TxItemQuery
Query returns a query builder for TxItem.
func (*TxItemClient) Update ¶
func (c *TxItemClient) Update() *TxItemUpdate
Update returns an update builder for TxItem.
func (*TxItemClient) UpdateOne ¶
func (c *TxItemClient) UpdateOne(ti *TxItem) *TxItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TxItemClient) UpdateOneID ¶
func (c *TxItemClient) UpdateOneID(id int64) *TxItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TxItemClient) Use ¶
func (c *TxItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `txitem.Hooks(f(g(h())))`.
type TxItemCreate ¶
type TxItemCreate struct {
// contains filtered or unexported fields
}
TxItemCreate is the builder for creating a TxItem entity.
func (*TxItemCreate) Exec ¶
func (tic *TxItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TxItemCreate) ExecX ¶
func (tic *TxItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TxItemCreate) Mutation ¶
func (tic *TxItemCreate) Mutation() *TxItemMutation
Mutation returns the TxItemMutation object of the builder.
func (*TxItemCreate) Save ¶
func (tic *TxItemCreate) Save(ctx context.Context) (*TxItem, error)
Save creates the TxItem in the database.
func (*TxItemCreate) SaveX ¶
func (tic *TxItemCreate) SaveX(ctx context.Context) *TxItem
SaveX calls Save and panics if Save returns an error.
func (*TxItemCreate) SetAuthor ¶
func (tic *TxItemCreate) SetAuthor(s string) *TxItemCreate
SetAuthor sets the "author" field.
func (*TxItemCreate) SetBookID ¶
func (tic *TxItemCreate) SetBookID(i int64) *TxItemCreate
SetBookID sets the "book_id" field.
func (*TxItemCreate) SetID ¶
func (tic *TxItemCreate) SetID(i int64) *TxItemCreate
SetID sets the "id" field.
func (*TxItemCreate) SetImageURL ¶
func (tic *TxItemCreate) SetImageURL(s string) *TxItemCreate
SetImageURL sets the "image_url" field.
func (*TxItemCreate) SetIsbn ¶
func (tic *TxItemCreate) SetIsbn(s string) *TxItemCreate
SetIsbn sets the "isbn" field.
func (*TxItemCreate) SetNillableImageURL ¶
func (tic *TxItemCreate) SetNillableImageURL(s *string) *TxItemCreate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*TxItemCreate) SetNillablePublisherID ¶
func (tic *TxItemCreate) SetNillablePublisherID(i *int64) *TxItemCreate
SetNillablePublisherID sets the "publisher_id" field if the given value is not nil.
func (*TxItemCreate) SetPrice ¶
func (tic *TxItemCreate) SetPrice(f float64) *TxItemCreate
SetPrice sets the "price" field.
func (*TxItemCreate) SetPublisherID ¶
func (tic *TxItemCreate) SetPublisherID(i int64) *TxItemCreate
SetPublisherID sets the "publisher_id" field.
func (*TxItemCreate) SetQuantity ¶
func (tic *TxItemCreate) SetQuantity(i int) *TxItemCreate
SetQuantity sets the "quantity" field.
func (*TxItemCreate) SetTitle ¶
func (tic *TxItemCreate) SetTitle(s string) *TxItemCreate
SetTitle sets the "title" field.
func (*TxItemCreate) SetTxID ¶
func (tic *TxItemCreate) SetTxID(i int64) *TxItemCreate
SetTxID sets the "tx_id" field.
func (*TxItemCreate) SetTxType ¶
func (tic *TxItemCreate) SetTxType(tt txitem.TxType) *TxItemCreate
SetTxType sets the "tx_type" field.
type TxItemCreateBulk ¶
type TxItemCreateBulk struct {
// contains filtered or unexported fields
}
TxItemCreateBulk is the builder for creating many TxItem entities in bulk.
func (*TxItemCreateBulk) Exec ¶
func (ticb *TxItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TxItemCreateBulk) ExecX ¶
func (ticb *TxItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TxItemDelete ¶
type TxItemDelete struct {
// contains filtered or unexported fields
}
TxItemDelete is the builder for deleting a TxItem entity.
func (*TxItemDelete) Exec ¶
func (tid *TxItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TxItemDelete) ExecX ¶
func (tid *TxItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TxItemDelete) Where ¶
func (tid *TxItemDelete) Where(ps ...predicate.TxItem) *TxItemDelete
Where appends a list predicates to the TxItemDelete builder.
type TxItemDeleteOne ¶
type TxItemDeleteOne struct {
// contains filtered or unexported fields
}
TxItemDeleteOne is the builder for deleting a single TxItem entity.
func (*TxItemDeleteOne) Exec ¶
func (tido *TxItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TxItemDeleteOne) ExecX ¶
func (tido *TxItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TxItemDeleteOne) Where ¶
func (tido *TxItemDeleteOne) Where(ps ...predicate.TxItem) *TxItemDeleteOne
Where appends a list predicates to the TxItemDelete builder.
type TxItemGroupBy ¶
type TxItemGroupBy struct {
// contains filtered or unexported fields
}
TxItemGroupBy is the group-by builder for TxItem entities.
func (*TxItemGroupBy) Aggregate ¶
func (tigb *TxItemGroupBy) Aggregate(fns ...AggregateFunc) *TxItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TxItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TxItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TxItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TxItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TxItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TxItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TxItemGroupBy) Scan ¶
func (tigb *TxItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TxItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TxItemMutation ¶
type TxItemMutation struct {
// contains filtered or unexported fields
}
TxItemMutation represents an operation that mutates the TxItem nodes in the graph.
func (*TxItemMutation) AddBookID ¶
func (m *TxItemMutation) AddBookID(i int64)
AddBookID adds i to the "book_id" field.
func (*TxItemMutation) AddField ¶
func (m *TxItemMutation) 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 (*TxItemMutation) AddPrice ¶
func (m *TxItemMutation) AddPrice(f float64)
AddPrice adds f to the "price" field.
func (*TxItemMutation) AddPublisherID ¶
func (m *TxItemMutation) AddPublisherID(i int64)
AddPublisherID adds i to the "publisher_id" field.
func (*TxItemMutation) AddQuantity ¶
func (m *TxItemMutation) AddQuantity(i int)
AddQuantity adds i to the "quantity" field.
func (*TxItemMutation) AddTxID ¶
func (m *TxItemMutation) AddTxID(i int64)
AddTxID adds i to the "tx_id" field.
func (*TxItemMutation) AddedBookID ¶
func (m *TxItemMutation) AddedBookID() (r int64, exists bool)
AddedBookID returns the value that was added to the "book_id" field in this mutation.
func (*TxItemMutation) AddedEdges ¶
func (m *TxItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TxItemMutation) AddedField ¶
func (m *TxItemMutation) 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 (*TxItemMutation) AddedFields ¶
func (m *TxItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TxItemMutation) AddedIDs ¶
func (m *TxItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TxItemMutation) AddedPrice ¶
func (m *TxItemMutation) AddedPrice() (r float64, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*TxItemMutation) AddedPublisherID ¶
func (m *TxItemMutation) AddedPublisherID() (r int64, exists bool)
AddedPublisherID returns the value that was added to the "publisher_id" field in this mutation.
func (*TxItemMutation) AddedQuantity ¶
func (m *TxItemMutation) AddedQuantity() (r int, exists bool)
AddedQuantity returns the value that was added to the "quantity" field in this mutation.
func (*TxItemMutation) AddedTxID ¶
func (m *TxItemMutation) AddedTxID() (r int64, exists bool)
AddedTxID returns the value that was added to the "tx_id" field in this mutation.
func (*TxItemMutation) Author ¶
func (m *TxItemMutation) Author() (r string, exists bool)
Author returns the value of the "author" field in the mutation.
func (*TxItemMutation) BookID ¶
func (m *TxItemMutation) BookID() (r int64, exists bool)
BookID returns the value of the "book_id" field in the mutation.
func (*TxItemMutation) ClearEdge ¶
func (m *TxItemMutation) 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 (*TxItemMutation) ClearField ¶
func (m *TxItemMutation) 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 (*TxItemMutation) ClearImageURL ¶
func (m *TxItemMutation) ClearImageURL()
ClearImageURL clears the value of the "image_url" field.
func (*TxItemMutation) ClearPublisherID ¶
func (m *TxItemMutation) ClearPublisherID()
ClearPublisherID clears the value of the "publisher_id" field.
func (*TxItemMutation) ClearedEdges ¶
func (m *TxItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TxItemMutation) ClearedFields ¶
func (m *TxItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TxItemMutation) Client ¶
func (m TxItemMutation) 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 (*TxItemMutation) EdgeCleared ¶
func (m *TxItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TxItemMutation) Field ¶
func (m *TxItemMutation) 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 (*TxItemMutation) FieldCleared ¶
func (m *TxItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TxItemMutation) Fields ¶
func (m *TxItemMutation) 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 (*TxItemMutation) ID ¶
func (m *TxItemMutation) 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 or after it was returned from the database.
func (*TxItemMutation) IDs ¶
func (m *TxItemMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TxItemMutation) ImageURL ¶
func (m *TxItemMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (*TxItemMutation) ImageURLCleared ¶
func (m *TxItemMutation) ImageURLCleared() bool
ImageURLCleared returns if the "image_url" field was cleared in this mutation.
func (*TxItemMutation) Isbn ¶
func (m *TxItemMutation) Isbn() (r string, exists bool)
Isbn returns the value of the "isbn" field in the mutation.
func (*TxItemMutation) OldAuthor ¶
func (m *TxItemMutation) OldAuthor(ctx context.Context) (v string, err error)
OldAuthor returns the old "author" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldBookID ¶
func (m *TxItemMutation) OldBookID(ctx context.Context) (v int64, err error)
OldBookID returns the old "book_id" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) 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 (*TxItemMutation) OldImageURL ¶
func (m *TxItemMutation) OldImageURL(ctx context.Context) (v string, err error)
OldImageURL returns the old "image_url" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldIsbn ¶
func (m *TxItemMutation) OldIsbn(ctx context.Context) (v string, err error)
OldIsbn returns the old "isbn" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldPrice ¶
func (m *TxItemMutation) OldPrice(ctx context.Context) (v float64, err error)
OldPrice returns the old "price" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldPublisherID ¶
func (m *TxItemMutation) OldPublisherID(ctx context.Context) (v int64, err error)
OldPublisherID returns the old "publisher_id" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldQuantity ¶
func (m *TxItemMutation) OldQuantity(ctx context.Context) (v int, err error)
OldQuantity returns the old "quantity" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldTitle ¶
func (m *TxItemMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldTxID ¶
func (m *TxItemMutation) OldTxID(ctx context.Context) (v int64, err error)
OldTxID returns the old "tx_id" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) OldTxType ¶
OldTxType returns the old "tx_type" field's value of the TxItem entity. If the TxItem 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 (*TxItemMutation) Price ¶
func (m *TxItemMutation) Price() (r float64, exists bool)
Price returns the value of the "price" field in the mutation.
func (*TxItemMutation) PublisherID ¶
func (m *TxItemMutation) PublisherID() (r int64, exists bool)
PublisherID returns the value of the "publisher_id" field in the mutation.
func (*TxItemMutation) PublisherIDCleared ¶
func (m *TxItemMutation) PublisherIDCleared() bool
PublisherIDCleared returns if the "publisher_id" field was cleared in this mutation.
func (*TxItemMutation) Quantity ¶
func (m *TxItemMutation) Quantity() (r int, exists bool)
Quantity returns the value of the "quantity" field in the mutation.
func (*TxItemMutation) RemovedEdges ¶
func (m *TxItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TxItemMutation) RemovedIDs ¶
func (m *TxItemMutation) 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 (*TxItemMutation) ResetAuthor ¶
func (m *TxItemMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" field.
func (*TxItemMutation) ResetBookID ¶
func (m *TxItemMutation) ResetBookID()
ResetBookID resets all changes to the "book_id" field.
func (*TxItemMutation) ResetEdge ¶
func (m *TxItemMutation) 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 (*TxItemMutation) ResetField ¶
func (m *TxItemMutation) 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 (*TxItemMutation) ResetImageURL ¶
func (m *TxItemMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (*TxItemMutation) ResetIsbn ¶
func (m *TxItemMutation) ResetIsbn()
ResetIsbn resets all changes to the "isbn" field.
func (*TxItemMutation) ResetPrice ¶
func (m *TxItemMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*TxItemMutation) ResetPublisherID ¶
func (m *TxItemMutation) ResetPublisherID()
ResetPublisherID resets all changes to the "publisher_id" field.
func (*TxItemMutation) ResetQuantity ¶
func (m *TxItemMutation) ResetQuantity()
ResetQuantity resets all changes to the "quantity" field.
func (*TxItemMutation) ResetTitle ¶
func (m *TxItemMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TxItemMutation) ResetTxID ¶
func (m *TxItemMutation) ResetTxID()
ResetTxID resets all changes to the "tx_id" field.
func (*TxItemMutation) ResetTxType ¶
func (m *TxItemMutation) ResetTxType()
ResetTxType resets all changes to the "tx_type" field.
func (*TxItemMutation) SetAuthor ¶
func (m *TxItemMutation) SetAuthor(s string)
SetAuthor sets the "author" field.
func (*TxItemMutation) SetBookID ¶
func (m *TxItemMutation) SetBookID(i int64)
SetBookID sets the "book_id" field.
func (*TxItemMutation) SetField ¶
func (m *TxItemMutation) 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 (*TxItemMutation) SetID ¶
func (m *TxItemMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TxItem entities.
func (*TxItemMutation) SetImageURL ¶
func (m *TxItemMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (*TxItemMutation) SetIsbn ¶
func (m *TxItemMutation) SetIsbn(s string)
SetIsbn sets the "isbn" field.
func (*TxItemMutation) SetOp ¶
func (m *TxItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TxItemMutation) SetPrice ¶
func (m *TxItemMutation) SetPrice(f float64)
SetPrice sets the "price" field.
func (*TxItemMutation) SetPublisherID ¶
func (m *TxItemMutation) SetPublisherID(i int64)
SetPublisherID sets the "publisher_id" field.
func (*TxItemMutation) SetQuantity ¶
func (m *TxItemMutation) SetQuantity(i int)
SetQuantity sets the "quantity" field.
func (*TxItemMutation) SetTitle ¶
func (m *TxItemMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TxItemMutation) SetTxID ¶
func (m *TxItemMutation) SetTxID(i int64)
SetTxID sets the "tx_id" field.
func (*TxItemMutation) SetTxType ¶
func (m *TxItemMutation) SetTxType(tt txitem.TxType)
SetTxType sets the "tx_type" field.
func (*TxItemMutation) Title ¶
func (m *TxItemMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TxItemMutation) Tx ¶
func (m TxItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TxItemMutation) TxID ¶
func (m *TxItemMutation) TxID() (r int64, exists bool)
TxID returns the value of the "tx_id" field in the mutation.
func (*TxItemMutation) TxType ¶
func (m *TxItemMutation) TxType() (r txitem.TxType, exists bool)
TxType returns the value of the "tx_type" field in the mutation.
func (*TxItemMutation) Type ¶
func (m *TxItemMutation) Type() string
Type returns the node type of this mutation (TxItem).
func (*TxItemMutation) Where ¶
func (m *TxItemMutation) Where(ps ...predicate.TxItem)
Where appends a list predicates to the TxItemMutation builder.
func (*TxItemMutation) WhereP ¶
func (m *TxItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TxItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TxItemQuery ¶
type TxItemQuery struct {
// contains filtered or unexported fields
}
TxItemQuery is the builder for querying TxItem entities.
func (*TxItemQuery) Aggregate ¶
func (tiq *TxItemQuery) Aggregate(fns ...AggregateFunc) *TxItemSelect
Aggregate returns a TxItemSelect configured with the given aggregations.
func (*TxItemQuery) All ¶
func (tiq *TxItemQuery) All(ctx context.Context) ([]*TxItem, error)
All executes the query and returns a list of TxItems.
func (*TxItemQuery) AllX ¶
func (tiq *TxItemQuery) AllX(ctx context.Context) []*TxItem
AllX is like All, but panics if an error occurs.
func (*TxItemQuery) Clone ¶
func (tiq *TxItemQuery) Clone() *TxItemQuery
Clone returns a duplicate of the TxItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TxItemQuery) Count ¶
func (tiq *TxItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TxItemQuery) CountX ¶
func (tiq *TxItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TxItemQuery) Exist ¶
func (tiq *TxItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TxItemQuery) ExistX ¶
func (tiq *TxItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TxItemQuery) First ¶
func (tiq *TxItemQuery) First(ctx context.Context) (*TxItem, error)
First returns the first TxItem entity from the query. Returns a *NotFoundError when no TxItem was found.
func (*TxItemQuery) FirstID ¶
func (tiq *TxItemQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first TxItem ID from the query. Returns a *NotFoundError when no TxItem ID was found.
func (*TxItemQuery) FirstIDX ¶
func (tiq *TxItemQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*TxItemQuery) FirstX ¶
func (tiq *TxItemQuery) FirstX(ctx context.Context) *TxItem
FirstX is like First, but panics if an error occurs.
func (*TxItemQuery) GroupBy ¶
func (tiq *TxItemQuery) GroupBy(field string, fields ...string) *TxItemGroupBy
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 { TxType txitem.TxType `json:"tx_type,omitempty"` Count int `json:"count,omitempty"` } client.TxItem.Query(). GroupBy(txitem.FieldTxType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TxItemQuery) IDs ¶
func (tiq *TxItemQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of TxItem IDs.
func (*TxItemQuery) IDsX ¶
func (tiq *TxItemQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*TxItemQuery) Limit ¶
func (tiq *TxItemQuery) Limit(limit int) *TxItemQuery
Limit the number of records to be returned by this query.
func (*TxItemQuery) Offset ¶
func (tiq *TxItemQuery) Offset(offset int) *TxItemQuery
Offset to start from.
func (*TxItemQuery) Only ¶
func (tiq *TxItemQuery) Only(ctx context.Context) (*TxItem, error)
Only returns a single TxItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TxItem entity is found. Returns a *NotFoundError when no TxItem entities are found.
func (*TxItemQuery) OnlyID ¶
func (tiq *TxItemQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only TxItem ID in the query. Returns a *NotSingularError when more than one TxItem ID is found. Returns a *NotFoundError when no entities are found.
func (*TxItemQuery) OnlyIDX ¶
func (tiq *TxItemQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TxItemQuery) OnlyX ¶
func (tiq *TxItemQuery) OnlyX(ctx context.Context) *TxItem
OnlyX is like Only, but panics if an error occurs.
func (*TxItemQuery) Order ¶
func (tiq *TxItemQuery) Order(o ...txitem.OrderOption) *TxItemQuery
Order specifies how the records should be ordered.
func (*TxItemQuery) Select ¶
func (tiq *TxItemQuery) Select(fields ...string) *TxItemSelect
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 { TxType txitem.TxType `json:"tx_type,omitempty"` } client.TxItem.Query(). Select(txitem.FieldTxType). Scan(ctx, &v)
func (*TxItemQuery) Unique ¶
func (tiq *TxItemQuery) Unique(unique bool) *TxItemQuery
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 (*TxItemQuery) Where ¶
func (tiq *TxItemQuery) Where(ps ...predicate.TxItem) *TxItemQuery
Where adds a new predicate for the TxItemQuery builder.
type TxItemSelect ¶
type TxItemSelect struct { *TxItemQuery // contains filtered or unexported fields }
TxItemSelect is the builder for selecting fields of TxItem entities.
func (*TxItemSelect) Aggregate ¶
func (tis *TxItemSelect) Aggregate(fns ...AggregateFunc) *TxItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TxItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TxItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TxItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TxItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TxItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TxItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TxItemSelect) Scan ¶
func (tis *TxItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TxItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TxItemUpdate ¶
type TxItemUpdate struct {
// contains filtered or unexported fields
}
TxItemUpdate is the builder for updating TxItem entities.
func (*TxItemUpdate) AddBookID ¶
func (tiu *TxItemUpdate) AddBookID(i int64) *TxItemUpdate
AddBookID adds i to the "book_id" field.
func (*TxItemUpdate) AddPrice ¶
func (tiu *TxItemUpdate) AddPrice(f float64) *TxItemUpdate
AddPrice adds f to the "price" field.
func (*TxItemUpdate) AddPublisherID ¶
func (tiu *TxItemUpdate) AddPublisherID(i int64) *TxItemUpdate
AddPublisherID adds i to the "publisher_id" field.
func (*TxItemUpdate) AddQuantity ¶
func (tiu *TxItemUpdate) AddQuantity(i int) *TxItemUpdate
AddQuantity adds i to the "quantity" field.
func (*TxItemUpdate) AddTxID ¶
func (tiu *TxItemUpdate) AddTxID(i int64) *TxItemUpdate
AddTxID adds i to the "tx_id" field.
func (*TxItemUpdate) ClearImageURL ¶
func (tiu *TxItemUpdate) ClearImageURL() *TxItemUpdate
ClearImageURL clears the value of the "image_url" field.
func (*TxItemUpdate) ClearPublisherID ¶
func (tiu *TxItemUpdate) ClearPublisherID() *TxItemUpdate
ClearPublisherID clears the value of the "publisher_id" field.
func (*TxItemUpdate) Exec ¶
func (tiu *TxItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TxItemUpdate) ExecX ¶
func (tiu *TxItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TxItemUpdate) Mutation ¶
func (tiu *TxItemUpdate) Mutation() *TxItemMutation
Mutation returns the TxItemMutation object of the builder.
func (*TxItemUpdate) Save ¶
func (tiu *TxItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TxItemUpdate) SaveX ¶
func (tiu *TxItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TxItemUpdate) SetAuthor ¶
func (tiu *TxItemUpdate) SetAuthor(s string) *TxItemUpdate
SetAuthor sets the "author" field.
func (*TxItemUpdate) SetBookID ¶
func (tiu *TxItemUpdate) SetBookID(i int64) *TxItemUpdate
SetBookID sets the "book_id" field.
func (*TxItemUpdate) SetImageURL ¶
func (tiu *TxItemUpdate) SetImageURL(s string) *TxItemUpdate
SetImageURL sets the "image_url" field.
func (*TxItemUpdate) SetIsbn ¶
func (tiu *TxItemUpdate) SetIsbn(s string) *TxItemUpdate
SetIsbn sets the "isbn" field.
func (*TxItemUpdate) SetNillableAuthor ¶
func (tiu *TxItemUpdate) SetNillableAuthor(s *string) *TxItemUpdate
SetNillableAuthor sets the "author" field if the given value is not nil.
func (*TxItemUpdate) SetNillableBookID ¶
func (tiu *TxItemUpdate) SetNillableBookID(i *int64) *TxItemUpdate
SetNillableBookID sets the "book_id" field if the given value is not nil.
func (*TxItemUpdate) SetNillableImageURL ¶
func (tiu *TxItemUpdate) SetNillableImageURL(s *string) *TxItemUpdate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*TxItemUpdate) SetNillableIsbn ¶
func (tiu *TxItemUpdate) SetNillableIsbn(s *string) *TxItemUpdate
SetNillableIsbn sets the "isbn" field if the given value is not nil.
func (*TxItemUpdate) SetNillablePrice ¶
func (tiu *TxItemUpdate) SetNillablePrice(f *float64) *TxItemUpdate
SetNillablePrice sets the "price" field if the given value is not nil.
func (*TxItemUpdate) SetNillablePublisherID ¶
func (tiu *TxItemUpdate) SetNillablePublisherID(i *int64) *TxItemUpdate
SetNillablePublisherID sets the "publisher_id" field if the given value is not nil.
func (*TxItemUpdate) SetNillableQuantity ¶
func (tiu *TxItemUpdate) SetNillableQuantity(i *int) *TxItemUpdate
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*TxItemUpdate) SetNillableTitle ¶
func (tiu *TxItemUpdate) SetNillableTitle(s *string) *TxItemUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*TxItemUpdate) SetNillableTxID ¶
func (tiu *TxItemUpdate) SetNillableTxID(i *int64) *TxItemUpdate
SetNillableTxID sets the "tx_id" field if the given value is not nil.
func (*TxItemUpdate) SetNillableTxType ¶
func (tiu *TxItemUpdate) SetNillableTxType(tt *txitem.TxType) *TxItemUpdate
SetNillableTxType sets the "tx_type" field if the given value is not nil.
func (*TxItemUpdate) SetPrice ¶
func (tiu *TxItemUpdate) SetPrice(f float64) *TxItemUpdate
SetPrice sets the "price" field.
func (*TxItemUpdate) SetPublisherID ¶
func (tiu *TxItemUpdate) SetPublisherID(i int64) *TxItemUpdate
SetPublisherID sets the "publisher_id" field.
func (*TxItemUpdate) SetQuantity ¶
func (tiu *TxItemUpdate) SetQuantity(i int) *TxItemUpdate
SetQuantity sets the "quantity" field.
func (*TxItemUpdate) SetTitle ¶
func (tiu *TxItemUpdate) SetTitle(s string) *TxItemUpdate
SetTitle sets the "title" field.
func (*TxItemUpdate) SetTxID ¶
func (tiu *TxItemUpdate) SetTxID(i int64) *TxItemUpdate
SetTxID sets the "tx_id" field.
func (*TxItemUpdate) SetTxType ¶
func (tiu *TxItemUpdate) SetTxType(tt txitem.TxType) *TxItemUpdate
SetTxType sets the "tx_type" field.
func (*TxItemUpdate) Where ¶
func (tiu *TxItemUpdate) Where(ps ...predicate.TxItem) *TxItemUpdate
Where appends a list predicates to the TxItemUpdate builder.
type TxItemUpdateOne ¶
type TxItemUpdateOne struct {
// contains filtered or unexported fields
}
TxItemUpdateOne is the builder for updating a single TxItem entity.
func (*TxItemUpdateOne) AddBookID ¶
func (tiuo *TxItemUpdateOne) AddBookID(i int64) *TxItemUpdateOne
AddBookID adds i to the "book_id" field.
func (*TxItemUpdateOne) AddPrice ¶
func (tiuo *TxItemUpdateOne) AddPrice(f float64) *TxItemUpdateOne
AddPrice adds f to the "price" field.
func (*TxItemUpdateOne) AddPublisherID ¶
func (tiuo *TxItemUpdateOne) AddPublisherID(i int64) *TxItemUpdateOne
AddPublisherID adds i to the "publisher_id" field.
func (*TxItemUpdateOne) AddQuantity ¶
func (tiuo *TxItemUpdateOne) AddQuantity(i int) *TxItemUpdateOne
AddQuantity adds i to the "quantity" field.
func (*TxItemUpdateOne) AddTxID ¶
func (tiuo *TxItemUpdateOne) AddTxID(i int64) *TxItemUpdateOne
AddTxID adds i to the "tx_id" field.
func (*TxItemUpdateOne) ClearImageURL ¶
func (tiuo *TxItemUpdateOne) ClearImageURL() *TxItemUpdateOne
ClearImageURL clears the value of the "image_url" field.
func (*TxItemUpdateOne) ClearPublisherID ¶
func (tiuo *TxItemUpdateOne) ClearPublisherID() *TxItemUpdateOne
ClearPublisherID clears the value of the "publisher_id" field.
func (*TxItemUpdateOne) Exec ¶
func (tiuo *TxItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TxItemUpdateOne) ExecX ¶
func (tiuo *TxItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TxItemUpdateOne) Mutation ¶
func (tiuo *TxItemUpdateOne) Mutation() *TxItemMutation
Mutation returns the TxItemMutation object of the builder.
func (*TxItemUpdateOne) Save ¶
func (tiuo *TxItemUpdateOne) Save(ctx context.Context) (*TxItem, error)
Save executes the query and returns the updated TxItem entity.
func (*TxItemUpdateOne) SaveX ¶
func (tiuo *TxItemUpdateOne) SaveX(ctx context.Context) *TxItem
SaveX is like Save, but panics if an error occurs.
func (*TxItemUpdateOne) Select ¶
func (tiuo *TxItemUpdateOne) Select(field string, fields ...string) *TxItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TxItemUpdateOne) SetAuthor ¶
func (tiuo *TxItemUpdateOne) SetAuthor(s string) *TxItemUpdateOne
SetAuthor sets the "author" field.
func (*TxItemUpdateOne) SetBookID ¶
func (tiuo *TxItemUpdateOne) SetBookID(i int64) *TxItemUpdateOne
SetBookID sets the "book_id" field.
func (*TxItemUpdateOne) SetImageURL ¶
func (tiuo *TxItemUpdateOne) SetImageURL(s string) *TxItemUpdateOne
SetImageURL sets the "image_url" field.
func (*TxItemUpdateOne) SetIsbn ¶
func (tiuo *TxItemUpdateOne) SetIsbn(s string) *TxItemUpdateOne
SetIsbn sets the "isbn" field.
func (*TxItemUpdateOne) SetNillableAuthor ¶
func (tiuo *TxItemUpdateOne) SetNillableAuthor(s *string) *TxItemUpdateOne
SetNillableAuthor sets the "author" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillableBookID ¶
func (tiuo *TxItemUpdateOne) SetNillableBookID(i *int64) *TxItemUpdateOne
SetNillableBookID sets the "book_id" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillableImageURL ¶
func (tiuo *TxItemUpdateOne) SetNillableImageURL(s *string) *TxItemUpdateOne
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillableIsbn ¶
func (tiuo *TxItemUpdateOne) SetNillableIsbn(s *string) *TxItemUpdateOne
SetNillableIsbn sets the "isbn" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillablePrice ¶
func (tiuo *TxItemUpdateOne) SetNillablePrice(f *float64) *TxItemUpdateOne
SetNillablePrice sets the "price" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillablePublisherID ¶
func (tiuo *TxItemUpdateOne) SetNillablePublisherID(i *int64) *TxItemUpdateOne
SetNillablePublisherID sets the "publisher_id" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillableQuantity ¶
func (tiuo *TxItemUpdateOne) SetNillableQuantity(i *int) *TxItemUpdateOne
SetNillableQuantity sets the "quantity" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillableTitle ¶
func (tiuo *TxItemUpdateOne) SetNillableTitle(s *string) *TxItemUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillableTxID ¶
func (tiuo *TxItemUpdateOne) SetNillableTxID(i *int64) *TxItemUpdateOne
SetNillableTxID sets the "tx_id" field if the given value is not nil.
func (*TxItemUpdateOne) SetNillableTxType ¶
func (tiuo *TxItemUpdateOne) SetNillableTxType(tt *txitem.TxType) *TxItemUpdateOne
SetNillableTxType sets the "tx_type" field if the given value is not nil.
func (*TxItemUpdateOne) SetPrice ¶
func (tiuo *TxItemUpdateOne) SetPrice(f float64) *TxItemUpdateOne
SetPrice sets the "price" field.
func (*TxItemUpdateOne) SetPublisherID ¶
func (tiuo *TxItemUpdateOne) SetPublisherID(i int64) *TxItemUpdateOne
SetPublisherID sets the "publisher_id" field.
func (*TxItemUpdateOne) SetQuantity ¶
func (tiuo *TxItemUpdateOne) SetQuantity(i int) *TxItemUpdateOne
SetQuantity sets the "quantity" field.
func (*TxItemUpdateOne) SetTitle ¶
func (tiuo *TxItemUpdateOne) SetTitle(s string) *TxItemUpdateOne
SetTitle sets the "title" field.
func (*TxItemUpdateOne) SetTxID ¶
func (tiuo *TxItemUpdateOne) SetTxID(i int64) *TxItemUpdateOne
SetTxID sets the "tx_id" field.
func (*TxItemUpdateOne) SetTxType ¶
func (tiuo *TxItemUpdateOne) SetTxType(tt txitem.TxType) *TxItemUpdateOne
SetTxType sets the "tx_type" field.
func (*TxItemUpdateOne) Where ¶
func (tiuo *TxItemUpdateOne) Where(ps ...predicate.TxItem) *TxItemUpdateOne
Where appends a list predicates to the TxItemUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- ent.go
- generate.go
- mutation.go
- order.go
- order_create.go
- order_delete.go
- order_query.go
- order_update.go
- runtime.go
- transaction.go
- transaction_create.go
- transaction_delete.go
- transaction_query.go
- transaction_update.go
- tx.go
- txitem.go
- txitem_create.go
- txitem_delete.go
- txitem_query.go
- txitem_update.go