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 Conversation
- func (c *Conversation) QueryPersonOne() *PersonQuery
- func (c *Conversation) QueryPersonTwo() *PersonQuery
- func (c *Conversation) String() string
- func (c *Conversation) Unwrap() *Conversation
- func (c *Conversation) Update() *ConversationUpdateOne
- func (c *Conversation) Value(name string) (ent.Value, error)
- type ConversationClient
- func (c *ConversationClient) Create() *ConversationCreate
- func (c *ConversationClient) CreateBulk(builders ...*ConversationCreate) *ConversationCreateBulk
- func (c *ConversationClient) Delete() *ConversationDelete
- func (c *ConversationClient) DeleteOne(co *Conversation) *ConversationDeleteOne
- func (c *ConversationClient) DeleteOneID(id uuid.UUID) *ConversationDeleteOne
- func (c *ConversationClient) Get(ctx context.Context, id uuid.UUID) (*Conversation, error)
- func (c *ConversationClient) GetX(ctx context.Context, id uuid.UUID) *Conversation
- func (c *ConversationClient) Hooks() []Hook
- func (c *ConversationClient) Intercept(interceptors ...Interceptor)
- func (c *ConversationClient) Interceptors() []Interceptor
- func (c *ConversationClient) MapCreateBulk(slice any, setFunc func(*ConversationCreate, int)) *ConversationCreateBulk
- func (c *ConversationClient) Query() *ConversationQuery
- func (c *ConversationClient) QueryPersonOne(co *Conversation) *PersonQuery
- func (c *ConversationClient) QueryPersonTwo(co *Conversation) *PersonQuery
- func (c *ConversationClient) Update() *ConversationUpdate
- func (c *ConversationClient) UpdateOne(co *Conversation) *ConversationUpdateOne
- func (c *ConversationClient) UpdateOneID(id uuid.UUID) *ConversationUpdateOne
- func (c *ConversationClient) Use(hooks ...Hook)
- type ConversationCreate
- func (cc *ConversationCreate) Exec(ctx context.Context) error
- func (cc *ConversationCreate) ExecX(ctx context.Context)
- func (cc *ConversationCreate) Mutation() *ConversationMutation
- func (cc *ConversationCreate) Save(ctx context.Context) (*Conversation, error)
- func (cc *ConversationCreate) SaveX(ctx context.Context) *Conversation
- func (cc *ConversationCreate) SetCreatedAt(t time.Time) *ConversationCreate
- func (cc *ConversationCreate) SetID(u uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetNillableCreatedAt(t *time.Time) *ConversationCreate
- func (cc *ConversationCreate) SetNillableID(u *uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetNillableTitle(s *string) *ConversationCreate
- func (cc *ConversationCreate) SetNillableUpdatedAt(t *time.Time) *ConversationCreate
- func (cc *ConversationCreate) SetPersonOne(p *Person) *ConversationCreate
- func (cc *ConversationCreate) SetPersonOneID(u uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetPersonTwo(p *Person) *ConversationCreate
- func (cc *ConversationCreate) SetPersonTwoID(u uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetTitle(s string) *ConversationCreate
- func (cc *ConversationCreate) SetUpdatedAt(t time.Time) *ConversationCreate
- type ConversationCreateBulk
- type ConversationDelete
- type ConversationDeleteOne
- type ConversationEdges
- type ConversationGroupBy
- func (cgb *ConversationGroupBy) Aggregate(fns ...AggregateFunc) *ConversationGroupBy
- func (s *ConversationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConversationGroupBy) BoolX(ctx context.Context) bool
- func (s *ConversationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ConversationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ConversationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConversationGroupBy) Float64X(ctx context.Context) float64
- func (s *ConversationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConversationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ConversationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ConversationGroupBy) IntX(ctx context.Context) int
- func (s *ConversationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ConversationGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ConversationGroupBy) Scan(ctx context.Context, v any) error
- func (s *ConversationGroupBy) ScanX(ctx context.Context, v any)
- func (s *ConversationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ConversationGroupBy) StringX(ctx context.Context) string
- func (s *ConversationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ConversationGroupBy) StringsX(ctx context.Context) []string
- type ConversationMutation
- func (m *ConversationMutation) AddField(name string, value ent.Value) error
- func (m *ConversationMutation) AddedEdges() []string
- func (m *ConversationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ConversationMutation) AddedFields() []string
- func (m *ConversationMutation) AddedIDs(name string) []ent.Value
- func (m *ConversationMutation) ClearEdge(name string) error
- func (m *ConversationMutation) ClearField(name string) error
- func (m *ConversationMutation) ClearPersonOne()
- func (m *ConversationMutation) ClearPersonTwo()
- func (m *ConversationMutation) ClearTitle()
- func (m *ConversationMutation) ClearedEdges() []string
- func (m *ConversationMutation) ClearedFields() []string
- func (m ConversationMutation) Client() *Client
- func (m *ConversationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ConversationMutation) EdgeCleared(name string) bool
- func (m *ConversationMutation) Field(name string) (ent.Value, bool)
- func (m *ConversationMutation) FieldCleared(name string) bool
- func (m *ConversationMutation) Fields() []string
- func (m *ConversationMutation) ID() (id uuid.UUID, exists bool)
- func (m *ConversationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ConversationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ConversationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ConversationMutation) OldPersonOneID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ConversationMutation) OldPersonTwoID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ConversationMutation) OldTitle(ctx context.Context) (v *string, err error)
- func (m *ConversationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ConversationMutation) Op() Op
- func (m *ConversationMutation) PersonOneCleared() bool
- func (m *ConversationMutation) PersonOneID() (r uuid.UUID, exists bool)
- func (m *ConversationMutation) PersonOneIDs() (ids []uuid.UUID)
- func (m *ConversationMutation) PersonTwoCleared() bool
- func (m *ConversationMutation) PersonTwoID() (r uuid.UUID, exists bool)
- func (m *ConversationMutation) PersonTwoIDs() (ids []uuid.UUID)
- func (m *ConversationMutation) RemovedEdges() []string
- func (m *ConversationMutation) RemovedIDs(name string) []ent.Value
- func (m *ConversationMutation) ResetCreatedAt()
- func (m *ConversationMutation) ResetEdge(name string) error
- func (m *ConversationMutation) ResetField(name string) error
- func (m *ConversationMutation) ResetPersonOne()
- func (m *ConversationMutation) ResetPersonOneID()
- func (m *ConversationMutation) ResetPersonTwo()
- func (m *ConversationMutation) ResetPersonTwoID()
- func (m *ConversationMutation) ResetTitle()
- func (m *ConversationMutation) ResetUpdatedAt()
- func (m *ConversationMutation) SetCreatedAt(t time.Time)
- func (m *ConversationMutation) SetField(name string, value ent.Value) error
- func (m *ConversationMutation) SetID(id uuid.UUID)
- func (m *ConversationMutation) SetOp(op Op)
- func (m *ConversationMutation) SetPersonOneID(u uuid.UUID)
- func (m *ConversationMutation) SetPersonTwoID(u uuid.UUID)
- func (m *ConversationMutation) SetTitle(s string)
- func (m *ConversationMutation) SetUpdatedAt(t time.Time)
- func (m *ConversationMutation) Title() (r string, exists bool)
- func (m *ConversationMutation) TitleCleared() bool
- func (m ConversationMutation) Tx() (*Tx, error)
- func (m *ConversationMutation) Type() string
- func (m *ConversationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ConversationMutation) Where(ps ...predicate.Conversation)
- func (m *ConversationMutation) WhereP(ps ...func(*sql.Selector))
- type ConversationQuery
- func (cq *ConversationQuery) Aggregate(fns ...AggregateFunc) *ConversationSelect
- func (cq *ConversationQuery) All(ctx context.Context) ([]*Conversation, error)
- func (cq *ConversationQuery) AllX(ctx context.Context) []*Conversation
- func (cq *ConversationQuery) Clone() *ConversationQuery
- func (cq *ConversationQuery) Count(ctx context.Context) (int, error)
- func (cq *ConversationQuery) CountX(ctx context.Context) int
- func (cq *ConversationQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ConversationQuery) ExistX(ctx context.Context) bool
- func (cq *ConversationQuery) First(ctx context.Context) (*Conversation, error)
- func (cq *ConversationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ConversationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *ConversationQuery) FirstX(ctx context.Context) *Conversation
- func (cq *ConversationQuery) GroupBy(field string, fields ...string) *ConversationGroupBy
- func (cq *ConversationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *ConversationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *ConversationQuery) Limit(limit int) *ConversationQuery
- func (cq *ConversationQuery) Offset(offset int) *ConversationQuery
- func (cq *ConversationQuery) Only(ctx context.Context) (*Conversation, error)
- func (cq *ConversationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ConversationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *ConversationQuery) OnlyX(ctx context.Context) *Conversation
- func (cq *ConversationQuery) Order(o ...conversation.OrderOption) *ConversationQuery
- func (cq *ConversationQuery) QueryPersonOne() *PersonQuery
- func (cq *ConversationQuery) QueryPersonTwo() *PersonQuery
- func (cq *ConversationQuery) Select(fields ...string) *ConversationSelect
- func (cq *ConversationQuery) Unique(unique bool) *ConversationQuery
- func (cq *ConversationQuery) Where(ps ...predicate.Conversation) *ConversationQuery
- func (cq *ConversationQuery) WithPersonOne(opts ...func(*PersonQuery)) *ConversationQuery
- func (cq *ConversationQuery) WithPersonTwo(opts ...func(*PersonQuery)) *ConversationQuery
- type ConversationSelect
- func (cs *ConversationSelect) Aggregate(fns ...AggregateFunc) *ConversationSelect
- func (s *ConversationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConversationSelect) BoolX(ctx context.Context) bool
- func (s *ConversationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ConversationSelect) BoolsX(ctx context.Context) []bool
- func (s *ConversationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConversationSelect) Float64X(ctx context.Context) float64
- func (s *ConversationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConversationSelect) Float64sX(ctx context.Context) []float64
- func (s *ConversationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ConversationSelect) IntX(ctx context.Context) int
- func (s *ConversationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ConversationSelect) IntsX(ctx context.Context) []int
- func (cs *ConversationSelect) Scan(ctx context.Context, v any) error
- func (s *ConversationSelect) ScanX(ctx context.Context, v any)
- func (s *ConversationSelect) String(ctx context.Context) (_ string, err error)
- func (s *ConversationSelect) StringX(ctx context.Context) string
- func (s *ConversationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ConversationSelect) StringsX(ctx context.Context) []string
- type ConversationUpdate
- func (cu *ConversationUpdate) ClearTitle() *ConversationUpdate
- func (cu *ConversationUpdate) Exec(ctx context.Context) error
- func (cu *ConversationUpdate) ExecX(ctx context.Context)
- func (cu *ConversationUpdate) Mutation() *ConversationMutation
- func (cu *ConversationUpdate) Save(ctx context.Context) (int, error)
- func (cu *ConversationUpdate) SaveX(ctx context.Context) int
- func (cu *ConversationUpdate) SetNillableTitle(s *string) *ConversationUpdate
- func (cu *ConversationUpdate) SetTitle(s string) *ConversationUpdate
- func (cu *ConversationUpdate) SetUpdatedAt(t time.Time) *ConversationUpdate
- func (cu *ConversationUpdate) Where(ps ...predicate.Conversation) *ConversationUpdate
- type ConversationUpdateOne
- func (cuo *ConversationUpdateOne) ClearTitle() *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) Exec(ctx context.Context) error
- func (cuo *ConversationUpdateOne) ExecX(ctx context.Context)
- func (cuo *ConversationUpdateOne) Mutation() *ConversationMutation
- func (cuo *ConversationUpdateOne) Save(ctx context.Context) (*Conversation, error)
- func (cuo *ConversationUpdateOne) SaveX(ctx context.Context) *Conversation
- func (cuo *ConversationUpdateOne) Select(field string, fields ...string) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) SetNillableTitle(s *string) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) SetTitle(s string) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) SetUpdatedAt(t time.Time) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) Where(ps ...predicate.Conversation) *ConversationUpdateOne
- type Conversations
- type FinancialTransaction
- func (ft *FinancialTransaction) QueryInvoice() *InvoiceQuery
- func (ft *FinancialTransaction) String() string
- func (ft *FinancialTransaction) Unwrap() *FinancialTransaction
- func (ft *FinancialTransaction) Update() *FinancialTransactionUpdateOne
- func (ft *FinancialTransaction) Value(name string) (ent.Value, error)
- type FinancialTransactionClient
- func (c *FinancialTransactionClient) Create() *FinancialTransactionCreate
- func (c *FinancialTransactionClient) CreateBulk(builders ...*FinancialTransactionCreate) *FinancialTransactionCreateBulk
- func (c *FinancialTransactionClient) Delete() *FinancialTransactionDelete
- func (c *FinancialTransactionClient) DeleteOne(ft *FinancialTransaction) *FinancialTransactionDeleteOne
- func (c *FinancialTransactionClient) DeleteOneID(id uuid.UUID) *FinancialTransactionDeleteOne
- func (c *FinancialTransactionClient) Get(ctx context.Context, id uuid.UUID) (*FinancialTransaction, error)
- func (c *FinancialTransactionClient) GetX(ctx context.Context, id uuid.UUID) *FinancialTransaction
- func (c *FinancialTransactionClient) Hooks() []Hook
- func (c *FinancialTransactionClient) Intercept(interceptors ...Interceptor)
- func (c *FinancialTransactionClient) Interceptors() []Interceptor
- func (c *FinancialTransactionClient) MapCreateBulk(slice any, setFunc func(*FinancialTransactionCreate, int)) *FinancialTransactionCreateBulk
- func (c *FinancialTransactionClient) Query() *FinancialTransactionQuery
- func (c *FinancialTransactionClient) QueryInvoice(ft *FinancialTransaction) *InvoiceQuery
- func (c *FinancialTransactionClient) Update() *FinancialTransactionUpdate
- func (c *FinancialTransactionClient) UpdateOne(ft *FinancialTransaction) *FinancialTransactionUpdateOne
- func (c *FinancialTransactionClient) UpdateOneID(id uuid.UUID) *FinancialTransactionUpdateOne
- func (c *FinancialTransactionClient) Use(hooks ...Hook)
- type FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) Exec(ctx context.Context) error
- func (ftc *FinancialTransactionCreate) ExecX(ctx context.Context)
- func (ftc *FinancialTransactionCreate) Mutation() *FinancialTransactionMutation
- func (ftc *FinancialTransactionCreate) Save(ctx context.Context) (*FinancialTransaction, error)
- func (ftc *FinancialTransactionCreate) SaveX(ctx context.Context) *FinancialTransaction
- func (ftc *FinancialTransactionCreate) SetAmount(d decimal.Decimal) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetComment(s string) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetCreatedAt(t time.Time) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetID(u uuid.UUID) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetInvoice(i *Invoice) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetInvoiceID(u uuid.UUID) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetIsInternal(b bool) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetNillableComment(s *string) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetNillableCreatedAt(t *time.Time) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetNillableID(u *uuid.UUID) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetNillableIsInternal(b *bool) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetNillablePaymentMethod(fm *financialtransaction.PaymentMethod) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetNillableUpdatedAt(t *time.Time) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetPaymentMethod(fm financialtransaction.PaymentMethod) *FinancialTransactionCreate
- func (ftc *FinancialTransactionCreate) SetUpdatedAt(t time.Time) *FinancialTransactionCreate
- type FinancialTransactionCreateBulk
- func (ftcb *FinancialTransactionCreateBulk) Exec(ctx context.Context) error
- func (ftcb *FinancialTransactionCreateBulk) ExecX(ctx context.Context)
- func (ftcb *FinancialTransactionCreateBulk) Save(ctx context.Context) ([]*FinancialTransaction, error)
- func (ftcb *FinancialTransactionCreateBulk) SaveX(ctx context.Context) []*FinancialTransaction
- type FinancialTransactionDelete
- type FinancialTransactionDeleteOne
- type FinancialTransactionEdges
- type FinancialTransactionGroupBy
- func (ftgb *FinancialTransactionGroupBy) Aggregate(fns ...AggregateFunc) *FinancialTransactionGroupBy
- func (s *FinancialTransactionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FinancialTransactionGroupBy) BoolX(ctx context.Context) bool
- func (s *FinancialTransactionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FinancialTransactionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FinancialTransactionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FinancialTransactionGroupBy) Float64X(ctx context.Context) float64
- func (s *FinancialTransactionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FinancialTransactionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FinancialTransactionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FinancialTransactionGroupBy) IntX(ctx context.Context) int
- func (s *FinancialTransactionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FinancialTransactionGroupBy) IntsX(ctx context.Context) []int
- func (ftgb *FinancialTransactionGroupBy) Scan(ctx context.Context, v any) error
- func (s *FinancialTransactionGroupBy) ScanX(ctx context.Context, v any)
- func (s *FinancialTransactionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FinancialTransactionGroupBy) StringX(ctx context.Context) string
- func (s *FinancialTransactionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FinancialTransactionGroupBy) StringsX(ctx context.Context) []string
- type FinancialTransactionMutation
- func (m *FinancialTransactionMutation) AddAmount(d decimal.Decimal)
- func (m *FinancialTransactionMutation) AddField(name string, value ent.Value) error
- func (m *FinancialTransactionMutation) AddedAmount() (r decimal.Decimal, exists bool)
- func (m *FinancialTransactionMutation) AddedEdges() []string
- func (m *FinancialTransactionMutation) AddedField(name string) (ent.Value, bool)
- func (m *FinancialTransactionMutation) AddedFields() []string
- func (m *FinancialTransactionMutation) AddedIDs(name string) []ent.Value
- func (m *FinancialTransactionMutation) Amount() (r decimal.Decimal, exists bool)
- func (m *FinancialTransactionMutation) ClearComment()
- func (m *FinancialTransactionMutation) ClearEdge(name string) error
- func (m *FinancialTransactionMutation) ClearField(name string) error
- func (m *FinancialTransactionMutation) ClearInvoice()
- func (m *FinancialTransactionMutation) ClearedEdges() []string
- func (m *FinancialTransactionMutation) ClearedFields() []string
- func (m FinancialTransactionMutation) Client() *Client
- func (m *FinancialTransactionMutation) Comment() (r string, exists bool)
- func (m *FinancialTransactionMutation) CommentCleared() bool
- func (m *FinancialTransactionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FinancialTransactionMutation) EdgeCleared(name string) bool
- func (m *FinancialTransactionMutation) Field(name string) (ent.Value, bool)
- func (m *FinancialTransactionMutation) FieldCleared(name string) bool
- func (m *FinancialTransactionMutation) Fields() []string
- func (m *FinancialTransactionMutation) ID() (id uuid.UUID, exists bool)
- func (m *FinancialTransactionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *FinancialTransactionMutation) InvoiceCleared() bool
- func (m *FinancialTransactionMutation) InvoiceID() (r uuid.UUID, exists bool)
- func (m *FinancialTransactionMutation) InvoiceIDs() (ids []uuid.UUID)
- func (m *FinancialTransactionMutation) IsInternal() (r bool, exists bool)
- func (m *FinancialTransactionMutation) OldAmount(ctx context.Context) (v decimal.Decimal, err error)
- func (m *FinancialTransactionMutation) OldComment(ctx context.Context) (v *string, err error)
- func (m *FinancialTransactionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FinancialTransactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FinancialTransactionMutation) OldInvoiceID(ctx context.Context) (v uuid.UUID, err error)
- func (m *FinancialTransactionMutation) OldIsInternal(ctx context.Context) (v bool, err error)
- func (m *FinancialTransactionMutation) OldPaymentMethod(ctx context.Context) (v financialtransaction.PaymentMethod, err error)
- func (m *FinancialTransactionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FinancialTransactionMutation) Op() Op
- func (m *FinancialTransactionMutation) PaymentMethod() (r financialtransaction.PaymentMethod, exists bool)
- func (m *FinancialTransactionMutation) RemovedEdges() []string
- func (m *FinancialTransactionMutation) RemovedIDs(name string) []ent.Value
- func (m *FinancialTransactionMutation) ResetAmount()
- func (m *FinancialTransactionMutation) ResetComment()
- func (m *FinancialTransactionMutation) ResetCreatedAt()
- func (m *FinancialTransactionMutation) ResetEdge(name string) error
- func (m *FinancialTransactionMutation) ResetField(name string) error
- func (m *FinancialTransactionMutation) ResetInvoice()
- func (m *FinancialTransactionMutation) ResetInvoiceID()
- func (m *FinancialTransactionMutation) ResetIsInternal()
- func (m *FinancialTransactionMutation) ResetPaymentMethod()
- func (m *FinancialTransactionMutation) ResetUpdatedAt()
- func (m *FinancialTransactionMutation) SetAmount(d decimal.Decimal)
- func (m *FinancialTransactionMutation) SetComment(s string)
- func (m *FinancialTransactionMutation) SetCreatedAt(t time.Time)
- func (m *FinancialTransactionMutation) SetField(name string, value ent.Value) error
- func (m *FinancialTransactionMutation) SetID(id uuid.UUID)
- func (m *FinancialTransactionMutation) SetInvoiceID(u uuid.UUID)
- func (m *FinancialTransactionMutation) SetIsInternal(b bool)
- func (m *FinancialTransactionMutation) SetOp(op Op)
- func (m *FinancialTransactionMutation) SetPaymentMethod(fm financialtransaction.PaymentMethod)
- func (m *FinancialTransactionMutation) SetUpdatedAt(t time.Time)
- func (m FinancialTransactionMutation) Tx() (*Tx, error)
- func (m *FinancialTransactionMutation) Type() string
- func (m *FinancialTransactionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FinancialTransactionMutation) Where(ps ...predicate.FinancialTransaction)
- func (m *FinancialTransactionMutation) WhereP(ps ...func(*sql.Selector))
- type FinancialTransactionQuery
- func (ftq *FinancialTransactionQuery) Aggregate(fns ...AggregateFunc) *FinancialTransactionSelect
- func (ftq *FinancialTransactionQuery) All(ctx context.Context) ([]*FinancialTransaction, error)
- func (ftq *FinancialTransactionQuery) AllX(ctx context.Context) []*FinancialTransaction
- func (ftq *FinancialTransactionQuery) Clone() *FinancialTransactionQuery
- func (ftq *FinancialTransactionQuery) Count(ctx context.Context) (int, error)
- func (ftq *FinancialTransactionQuery) CountX(ctx context.Context) int
- func (ftq *FinancialTransactionQuery) Exist(ctx context.Context) (bool, error)
- func (ftq *FinancialTransactionQuery) ExistX(ctx context.Context) bool
- func (ftq *FinancialTransactionQuery) First(ctx context.Context) (*FinancialTransaction, error)
- func (ftq *FinancialTransactionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ftq *FinancialTransactionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ftq *FinancialTransactionQuery) FirstX(ctx context.Context) *FinancialTransaction
- func (ftq *FinancialTransactionQuery) GroupBy(field string, fields ...string) *FinancialTransactionGroupBy
- func (ftq *FinancialTransactionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (ftq *FinancialTransactionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ftq *FinancialTransactionQuery) Limit(limit int) *FinancialTransactionQuery
- func (ftq *FinancialTransactionQuery) Offset(offset int) *FinancialTransactionQuery
- func (ftq *FinancialTransactionQuery) Only(ctx context.Context) (*FinancialTransaction, error)
- func (ftq *FinancialTransactionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ftq *FinancialTransactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ftq *FinancialTransactionQuery) OnlyX(ctx context.Context) *FinancialTransaction
- func (ftq *FinancialTransactionQuery) Order(o ...financialtransaction.OrderOption) *FinancialTransactionQuery
- func (ftq *FinancialTransactionQuery) QueryInvoice() *InvoiceQuery
- func (ftq *FinancialTransactionQuery) Select(fields ...string) *FinancialTransactionSelect
- func (ftq *FinancialTransactionQuery) Unique(unique bool) *FinancialTransactionQuery
- func (ftq *FinancialTransactionQuery) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionQuery
- func (ftq *FinancialTransactionQuery) WithInvoice(opts ...func(*InvoiceQuery)) *FinancialTransactionQuery
- type FinancialTransactionSelect
- func (fts *FinancialTransactionSelect) Aggregate(fns ...AggregateFunc) *FinancialTransactionSelect
- func (s *FinancialTransactionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FinancialTransactionSelect) BoolX(ctx context.Context) bool
- func (s *FinancialTransactionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FinancialTransactionSelect) BoolsX(ctx context.Context) []bool
- func (s *FinancialTransactionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FinancialTransactionSelect) Float64X(ctx context.Context) float64
- func (s *FinancialTransactionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FinancialTransactionSelect) Float64sX(ctx context.Context) []float64
- func (s *FinancialTransactionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FinancialTransactionSelect) IntX(ctx context.Context) int
- func (s *FinancialTransactionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FinancialTransactionSelect) IntsX(ctx context.Context) []int
- func (fts *FinancialTransactionSelect) Scan(ctx context.Context, v any) error
- func (s *FinancialTransactionSelect) ScanX(ctx context.Context, v any)
- func (s *FinancialTransactionSelect) String(ctx context.Context) (_ string, err error)
- func (s *FinancialTransactionSelect) StringX(ctx context.Context) string
- func (s *FinancialTransactionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FinancialTransactionSelect) StringsX(ctx context.Context) []string
- type FinancialTransactionUpdate
- func (ftu *FinancialTransactionUpdate) ClearComment() *FinancialTransactionUpdate
- func (ftu *FinancialTransactionUpdate) Exec(ctx context.Context) error
- func (ftu *FinancialTransactionUpdate) ExecX(ctx context.Context)
- func (ftu *FinancialTransactionUpdate) Mutation() *FinancialTransactionMutation
- func (ftu *FinancialTransactionUpdate) Save(ctx context.Context) (int, error)
- func (ftu *FinancialTransactionUpdate) SaveX(ctx context.Context) int
- func (ftu *FinancialTransactionUpdate) SetComment(s string) *FinancialTransactionUpdate
- func (ftu *FinancialTransactionUpdate) SetNillableComment(s *string) *FinancialTransactionUpdate
- func (ftu *FinancialTransactionUpdate) SetUpdatedAt(t time.Time) *FinancialTransactionUpdate
- func (ftu *FinancialTransactionUpdate) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionUpdate
- type FinancialTransactionUpdateOne
- func (ftuo *FinancialTransactionUpdateOne) ClearComment() *FinancialTransactionUpdateOne
- func (ftuo *FinancialTransactionUpdateOne) Exec(ctx context.Context) error
- func (ftuo *FinancialTransactionUpdateOne) ExecX(ctx context.Context)
- func (ftuo *FinancialTransactionUpdateOne) Mutation() *FinancialTransactionMutation
- func (ftuo *FinancialTransactionUpdateOne) Save(ctx context.Context) (*FinancialTransaction, error)
- func (ftuo *FinancialTransactionUpdateOne) SaveX(ctx context.Context) *FinancialTransaction
- func (ftuo *FinancialTransactionUpdateOne) Select(field string, fields ...string) *FinancialTransactionUpdateOne
- func (ftuo *FinancialTransactionUpdateOne) SetComment(s string) *FinancialTransactionUpdateOne
- func (ftuo *FinancialTransactionUpdateOne) SetNillableComment(s *string) *FinancialTransactionUpdateOne
- func (ftuo *FinancialTransactionUpdateOne) SetUpdatedAt(t time.Time) *FinancialTransactionUpdateOne
- func (ftuo *FinancialTransactionUpdateOne) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionUpdateOne
- type FinancialTransactions
- type Hook
- type InterceptFunc
- type Interceptor
- type Invoice
- type InvoiceClient
- func (c *InvoiceClient) Create() *InvoiceCreate
- func (c *InvoiceClient) CreateBulk(builders ...*InvoiceCreate) *InvoiceCreateBulk
- func (c *InvoiceClient) Delete() *InvoiceDelete
- func (c *InvoiceClient) DeleteOne(i *Invoice) *InvoiceDeleteOne
- func (c *InvoiceClient) DeleteOneID(id uuid.UUID) *InvoiceDeleteOne
- func (c *InvoiceClient) Get(ctx context.Context, id uuid.UUID) (*Invoice, error)
- func (c *InvoiceClient) GetX(ctx context.Context, id uuid.UUID) *Invoice
- func (c *InvoiceClient) Hooks() []Hook
- func (c *InvoiceClient) Intercept(interceptors ...Interceptor)
- func (c *InvoiceClient) Interceptors() []Interceptor
- func (c *InvoiceClient) MapCreateBulk(slice any, setFunc func(*InvoiceCreate, int)) *InvoiceCreateBulk
- func (c *InvoiceClient) Query() *InvoiceQuery
- func (c *InvoiceClient) QueryOrder(i *Invoice) *OrderQuery
- func (c *InvoiceClient) Update() *InvoiceUpdate
- func (c *InvoiceClient) UpdateOne(i *Invoice) *InvoiceUpdateOne
- func (c *InvoiceClient) UpdateOneID(id uuid.UUID) *InvoiceUpdateOne
- func (c *InvoiceClient) Use(hooks ...Hook)
- type InvoiceCreate
- func (ic *InvoiceCreate) Exec(ctx context.Context) error
- func (ic *InvoiceCreate) ExecX(ctx context.Context)
- func (ic *InvoiceCreate) Mutation() *InvoiceMutation
- func (ic *InvoiceCreate) Save(ctx context.Context) (*Invoice, error)
- func (ic *InvoiceCreate) SaveX(ctx context.Context) *Invoice
- func (ic *InvoiceCreate) SetComment(s string) *InvoiceCreate
- func (ic *InvoiceCreate) SetCreatedAt(t time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetID(u uuid.UUID) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableComment(s *string) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableCreatedAt(t *time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableID(u *uuid.UUID) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableNote(s *string) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableStatus(i *invoice.Status) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableType(i *invoice.Type) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableUpdatedAt(t *time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetNote(s string) *InvoiceCreate
- func (ic *InvoiceCreate) SetOrder(o *Order) *InvoiceCreate
- func (ic *InvoiceCreate) SetOrderID(u uuid.UUID) *InvoiceCreate
- func (ic *InvoiceCreate) SetStatus(i invoice.Status) *InvoiceCreate
- func (ic *InvoiceCreate) SetTotal(d decimal.Decimal) *InvoiceCreate
- func (ic *InvoiceCreate) SetType(i invoice.Type) *InvoiceCreate
- func (ic *InvoiceCreate) SetUpdatedAt(t time.Time) *InvoiceCreate
- type InvoiceCreateBulk
- type InvoiceDelete
- type InvoiceDeleteOne
- type InvoiceEdges
- type InvoiceGroupBy
- func (igb *InvoiceGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceGroupBy
- func (s *InvoiceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceGroupBy) BoolX(ctx context.Context) bool
- func (s *InvoiceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InvoiceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceGroupBy) Float64X(ctx context.Context) float64
- func (s *InvoiceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InvoiceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceGroupBy) IntX(ctx context.Context) int
- func (s *InvoiceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceGroupBy) IntsX(ctx context.Context) []int
- func (igb *InvoiceGroupBy) Scan(ctx context.Context, v any) error
- func (s *InvoiceGroupBy) ScanX(ctx context.Context, v any)
- func (s *InvoiceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceGroupBy) StringX(ctx context.Context) string
- func (s *InvoiceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceGroupBy) StringsX(ctx context.Context) []string
- type InvoiceLineItem
- func (ili *InvoiceLineItem) QueryInvoice() *InvoiceQuery
- func (ili *InvoiceLineItem) QueryOrderLineItem() *OrderLineItemQuery
- func (ili *InvoiceLineItem) String() string
- func (ili *InvoiceLineItem) Unwrap() *InvoiceLineItem
- func (ili *InvoiceLineItem) Update() *InvoiceLineItemUpdateOne
- func (ili *InvoiceLineItem) Value(name string) (ent.Value, error)
- type InvoiceLineItemClient
- func (c *InvoiceLineItemClient) Create() *InvoiceLineItemCreate
- func (c *InvoiceLineItemClient) CreateBulk(builders ...*InvoiceLineItemCreate) *InvoiceLineItemCreateBulk
- func (c *InvoiceLineItemClient) Delete() *InvoiceLineItemDelete
- func (c *InvoiceLineItemClient) DeleteOne(ili *InvoiceLineItem) *InvoiceLineItemDeleteOne
- func (c *InvoiceLineItemClient) DeleteOneID(id uuid.UUID) *InvoiceLineItemDeleteOne
- func (c *InvoiceLineItemClient) Get(ctx context.Context, id uuid.UUID) (*InvoiceLineItem, error)
- func (c *InvoiceLineItemClient) GetX(ctx context.Context, id uuid.UUID) *InvoiceLineItem
- func (c *InvoiceLineItemClient) Hooks() []Hook
- func (c *InvoiceLineItemClient) Intercept(interceptors ...Interceptor)
- func (c *InvoiceLineItemClient) Interceptors() []Interceptor
- func (c *InvoiceLineItemClient) MapCreateBulk(slice any, setFunc func(*InvoiceLineItemCreate, int)) *InvoiceLineItemCreateBulk
- func (c *InvoiceLineItemClient) Query() *InvoiceLineItemQuery
- func (c *InvoiceLineItemClient) QueryInvoice(ili *InvoiceLineItem) *InvoiceQuery
- func (c *InvoiceLineItemClient) QueryOrderLineItem(ili *InvoiceLineItem) *OrderLineItemQuery
- func (c *InvoiceLineItemClient) Update() *InvoiceLineItemUpdate
- func (c *InvoiceLineItemClient) UpdateOne(ili *InvoiceLineItem) *InvoiceLineItemUpdateOne
- func (c *InvoiceLineItemClient) UpdateOneID(id uuid.UUID) *InvoiceLineItemUpdateOne
- func (c *InvoiceLineItemClient) Use(hooks ...Hook)
- type InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) Exec(ctx context.Context) error
- func (ilic *InvoiceLineItemCreate) ExecX(ctx context.Context)
- func (ilic *InvoiceLineItemCreate) Mutation() *InvoiceLineItemMutation
- func (ilic *InvoiceLineItemCreate) Save(ctx context.Context) (*InvoiceLineItem, error)
- func (ilic *InvoiceLineItemCreate) SaveX(ctx context.Context) *InvoiceLineItem
- func (ilic *InvoiceLineItemCreate) SetCreatedAt(t time.Time) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetID(u uuid.UUID) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetInvoice(i *Invoice) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetInvoiceID(u uuid.UUID) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetNillableCreatedAt(t *time.Time) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetNillableID(u *uuid.UUID) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetOrderLineItem(o *OrderLineItem) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetOrderLineItemID(u uuid.UUID) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetQty(d decimal.Decimal) *InvoiceLineItemCreate
- func (ilic *InvoiceLineItemCreate) SetTotal(d decimal.Decimal) *InvoiceLineItemCreate
- type InvoiceLineItemCreateBulk
- func (ilicb *InvoiceLineItemCreateBulk) Exec(ctx context.Context) error
- func (ilicb *InvoiceLineItemCreateBulk) ExecX(ctx context.Context)
- func (ilicb *InvoiceLineItemCreateBulk) Save(ctx context.Context) ([]*InvoiceLineItem, error)
- func (ilicb *InvoiceLineItemCreateBulk) SaveX(ctx context.Context) []*InvoiceLineItem
- type InvoiceLineItemDelete
- type InvoiceLineItemDeleteOne
- type InvoiceLineItemEdges
- type InvoiceLineItemGroupBy
- func (iligb *InvoiceLineItemGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceLineItemGroupBy
- func (s *InvoiceLineItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceLineItemGroupBy) BoolX(ctx context.Context) bool
- func (s *InvoiceLineItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceLineItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InvoiceLineItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceLineItemGroupBy) Float64X(ctx context.Context) float64
- func (s *InvoiceLineItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceLineItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InvoiceLineItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceLineItemGroupBy) IntX(ctx context.Context) int
- func (s *InvoiceLineItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceLineItemGroupBy) IntsX(ctx context.Context) []int
- func (iligb *InvoiceLineItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *InvoiceLineItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *InvoiceLineItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceLineItemGroupBy) StringX(ctx context.Context) string
- func (s *InvoiceLineItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceLineItemGroupBy) StringsX(ctx context.Context) []string
- type InvoiceLineItemMutation
- func (m *InvoiceLineItemMutation) AddField(name string, value ent.Value) error
- func (m *InvoiceLineItemMutation) AddQty(d decimal.Decimal)
- func (m *InvoiceLineItemMutation) AddTotal(d decimal.Decimal)
- func (m *InvoiceLineItemMutation) AddedEdges() []string
- func (m *InvoiceLineItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *InvoiceLineItemMutation) AddedFields() []string
- func (m *InvoiceLineItemMutation) AddedIDs(name string) []ent.Value
- func (m *InvoiceLineItemMutation) AddedQty() (r decimal.Decimal, exists bool)
- func (m *InvoiceLineItemMutation) AddedTotal() (r decimal.Decimal, exists bool)
- func (m *InvoiceLineItemMutation) ClearEdge(name string) error
- func (m *InvoiceLineItemMutation) ClearField(name string) error
- func (m *InvoiceLineItemMutation) ClearInvoice()
- func (m *InvoiceLineItemMutation) ClearOrderLineItem()
- func (m *InvoiceLineItemMutation) ClearedEdges() []string
- func (m *InvoiceLineItemMutation) ClearedFields() []string
- func (m InvoiceLineItemMutation) Client() *Client
- func (m *InvoiceLineItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *InvoiceLineItemMutation) EdgeCleared(name string) bool
- func (m *InvoiceLineItemMutation) Field(name string) (ent.Value, bool)
- func (m *InvoiceLineItemMutation) FieldCleared(name string) bool
- func (m *InvoiceLineItemMutation) Fields() []string
- func (m *InvoiceLineItemMutation) ID() (id uuid.UUID, exists bool)
- func (m *InvoiceLineItemMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InvoiceLineItemMutation) InvoiceCleared() bool
- func (m *InvoiceLineItemMutation) InvoiceID() (r uuid.UUID, exists bool)
- func (m *InvoiceLineItemMutation) InvoiceIDs() (ids []uuid.UUID)
- func (m *InvoiceLineItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *InvoiceLineItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InvoiceLineItemMutation) OldInvoiceID(ctx context.Context) (v uuid.UUID, err error)
- func (m *InvoiceLineItemMutation) OldOrderLineItemID(ctx context.Context) (v uuid.UUID, err error)
- func (m *InvoiceLineItemMutation) OldQty(ctx context.Context) (v decimal.Decimal, err error)
- func (m *InvoiceLineItemMutation) OldTotal(ctx context.Context) (v decimal.Decimal, err error)
- func (m *InvoiceLineItemMutation) Op() Op
- func (m *InvoiceLineItemMutation) OrderLineItemCleared() bool
- func (m *InvoiceLineItemMutation) OrderLineItemID() (r uuid.UUID, exists bool)
- func (m *InvoiceLineItemMutation) OrderLineItemIDs() (ids []uuid.UUID)
- func (m *InvoiceLineItemMutation) Qty() (r decimal.Decimal, exists bool)
- func (m *InvoiceLineItemMutation) RemovedEdges() []string
- func (m *InvoiceLineItemMutation) RemovedIDs(name string) []ent.Value
- func (m *InvoiceLineItemMutation) ResetCreatedAt()
- func (m *InvoiceLineItemMutation) ResetEdge(name string) error
- func (m *InvoiceLineItemMutation) ResetField(name string) error
- func (m *InvoiceLineItemMutation) ResetInvoice()
- func (m *InvoiceLineItemMutation) ResetInvoiceID()
- func (m *InvoiceLineItemMutation) ResetOrderLineItem()
- func (m *InvoiceLineItemMutation) ResetOrderLineItemID()
- func (m *InvoiceLineItemMutation) ResetQty()
- func (m *InvoiceLineItemMutation) ResetTotal()
- func (m *InvoiceLineItemMutation) SetCreatedAt(t time.Time)
- func (m *InvoiceLineItemMutation) SetField(name string, value ent.Value) error
- func (m *InvoiceLineItemMutation) SetID(id uuid.UUID)
- func (m *InvoiceLineItemMutation) SetInvoiceID(u uuid.UUID)
- func (m *InvoiceLineItemMutation) SetOp(op Op)
- func (m *InvoiceLineItemMutation) SetOrderLineItemID(u uuid.UUID)
- func (m *InvoiceLineItemMutation) SetQty(d decimal.Decimal)
- func (m *InvoiceLineItemMutation) SetTotal(d decimal.Decimal)
- func (m *InvoiceLineItemMutation) Total() (r decimal.Decimal, exists bool)
- func (m InvoiceLineItemMutation) Tx() (*Tx, error)
- func (m *InvoiceLineItemMutation) Type() string
- func (m *InvoiceLineItemMutation) Where(ps ...predicate.InvoiceLineItem)
- func (m *InvoiceLineItemMutation) WhereP(ps ...func(*sql.Selector))
- type InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) Aggregate(fns ...AggregateFunc) *InvoiceLineItemSelect
- func (iliq *InvoiceLineItemQuery) All(ctx context.Context) ([]*InvoiceLineItem, error)
- func (iliq *InvoiceLineItemQuery) AllX(ctx context.Context) []*InvoiceLineItem
- func (iliq *InvoiceLineItemQuery) Clone() *InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) Count(ctx context.Context) (int, error)
- func (iliq *InvoiceLineItemQuery) CountX(ctx context.Context) int
- func (iliq *InvoiceLineItemQuery) Exist(ctx context.Context) (bool, error)
- func (iliq *InvoiceLineItemQuery) ExistX(ctx context.Context) bool
- func (iliq *InvoiceLineItemQuery) First(ctx context.Context) (*InvoiceLineItem, error)
- func (iliq *InvoiceLineItemQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iliq *InvoiceLineItemQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iliq *InvoiceLineItemQuery) FirstX(ctx context.Context) *InvoiceLineItem
- func (iliq *InvoiceLineItemQuery) GroupBy(field string, fields ...string) *InvoiceLineItemGroupBy
- func (iliq *InvoiceLineItemQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iliq *InvoiceLineItemQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iliq *InvoiceLineItemQuery) Limit(limit int) *InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) Offset(offset int) *InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) Only(ctx context.Context) (*InvoiceLineItem, error)
- func (iliq *InvoiceLineItemQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iliq *InvoiceLineItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iliq *InvoiceLineItemQuery) OnlyX(ctx context.Context) *InvoiceLineItem
- func (iliq *InvoiceLineItemQuery) Order(o ...invoicelineitem.OrderOption) *InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) QueryInvoice() *InvoiceQuery
- func (iliq *InvoiceLineItemQuery) QueryOrderLineItem() *OrderLineItemQuery
- func (iliq *InvoiceLineItemQuery) Select(fields ...string) *InvoiceLineItemSelect
- func (iliq *InvoiceLineItemQuery) Unique(unique bool) *InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) WithInvoice(opts ...func(*InvoiceQuery)) *InvoiceLineItemQuery
- func (iliq *InvoiceLineItemQuery) WithOrderLineItem(opts ...func(*OrderLineItemQuery)) *InvoiceLineItemQuery
- type InvoiceLineItemSelect
- func (ilis *InvoiceLineItemSelect) Aggregate(fns ...AggregateFunc) *InvoiceLineItemSelect
- func (s *InvoiceLineItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceLineItemSelect) BoolX(ctx context.Context) bool
- func (s *InvoiceLineItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceLineItemSelect) BoolsX(ctx context.Context) []bool
- func (s *InvoiceLineItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceLineItemSelect) Float64X(ctx context.Context) float64
- func (s *InvoiceLineItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceLineItemSelect) Float64sX(ctx context.Context) []float64
- func (s *InvoiceLineItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceLineItemSelect) IntX(ctx context.Context) int
- func (s *InvoiceLineItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceLineItemSelect) IntsX(ctx context.Context) []int
- func (ilis *InvoiceLineItemSelect) Scan(ctx context.Context, v any) error
- func (s *InvoiceLineItemSelect) ScanX(ctx context.Context, v any)
- func (s *InvoiceLineItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceLineItemSelect) StringX(ctx context.Context) string
- func (s *InvoiceLineItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceLineItemSelect) StringsX(ctx context.Context) []string
- type InvoiceLineItemUpdate
- func (iliu *InvoiceLineItemUpdate) Exec(ctx context.Context) error
- func (iliu *InvoiceLineItemUpdate) ExecX(ctx context.Context)
- func (iliu *InvoiceLineItemUpdate) Mutation() *InvoiceLineItemMutation
- func (iliu *InvoiceLineItemUpdate) Save(ctx context.Context) (int, error)
- func (iliu *InvoiceLineItemUpdate) SaveX(ctx context.Context) int
- func (iliu *InvoiceLineItemUpdate) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemUpdate
- type InvoiceLineItemUpdateOne
- func (iliuo *InvoiceLineItemUpdateOne) Exec(ctx context.Context) error
- func (iliuo *InvoiceLineItemUpdateOne) ExecX(ctx context.Context)
- func (iliuo *InvoiceLineItemUpdateOne) Mutation() *InvoiceLineItemMutation
- func (iliuo *InvoiceLineItemUpdateOne) Save(ctx context.Context) (*InvoiceLineItem, error)
- func (iliuo *InvoiceLineItemUpdateOne) SaveX(ctx context.Context) *InvoiceLineItem
- func (iliuo *InvoiceLineItemUpdateOne) Select(field string, fields ...string) *InvoiceLineItemUpdateOne
- func (iliuo *InvoiceLineItemUpdateOne) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemUpdateOne
- type InvoiceLineItems
- type InvoiceMutation
- func (m *InvoiceMutation) AddField(name string, value ent.Value) error
- func (m *InvoiceMutation) AddTotal(d decimal.Decimal)
- func (m *InvoiceMutation) AddedEdges() []string
- func (m *InvoiceMutation) AddedField(name string) (ent.Value, bool)
- func (m *InvoiceMutation) AddedFields() []string
- func (m *InvoiceMutation) AddedIDs(name string) []ent.Value
- func (m *InvoiceMutation) AddedTotal() (r decimal.Decimal, exists bool)
- func (m *InvoiceMutation) ClearComment()
- func (m *InvoiceMutation) ClearEdge(name string) error
- func (m *InvoiceMutation) ClearField(name string) error
- func (m *InvoiceMutation) ClearNote()
- func (m *InvoiceMutation) ClearOrder()
- func (m *InvoiceMutation) ClearedEdges() []string
- func (m *InvoiceMutation) ClearedFields() []string
- func (m InvoiceMutation) Client() *Client
- func (m *InvoiceMutation) Comment() (r string, exists bool)
- func (m *InvoiceMutation) CommentCleared() bool
- func (m *InvoiceMutation) CreatedAt() (r time.Time, exists bool)
- func (m *InvoiceMutation) EdgeCleared(name string) bool
- func (m *InvoiceMutation) Field(name string) (ent.Value, bool)
- func (m *InvoiceMutation) FieldCleared(name string) bool
- func (m *InvoiceMutation) Fields() []string
- func (m *InvoiceMutation) GetType() (r invoice.Type, exists bool)
- func (m *InvoiceMutation) ID() (id uuid.UUID, exists bool)
- func (m *InvoiceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InvoiceMutation) Note() (r string, exists bool)
- func (m *InvoiceMutation) NoteCleared() bool
- func (m *InvoiceMutation) OldComment(ctx context.Context) (v *string, err error)
- func (m *InvoiceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *InvoiceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InvoiceMutation) OldNote(ctx context.Context) (v *string, err error)
- func (m *InvoiceMutation) OldOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *InvoiceMutation) OldStatus(ctx context.Context) (v invoice.Status, err error)
- func (m *InvoiceMutation) OldTotal(ctx context.Context) (v decimal.Decimal, err error)
- func (m *InvoiceMutation) OldType(ctx context.Context) (v invoice.Type, err error)
- func (m *InvoiceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *InvoiceMutation) Op() Op
- func (m *InvoiceMutation) OrderCleared() bool
- func (m *InvoiceMutation) OrderID() (r uuid.UUID, exists bool)
- func (m *InvoiceMutation) OrderIDs() (ids []uuid.UUID)
- func (m *InvoiceMutation) RemovedEdges() []string
- func (m *InvoiceMutation) RemovedIDs(name string) []ent.Value
- func (m *InvoiceMutation) ResetComment()
- func (m *InvoiceMutation) ResetCreatedAt()
- func (m *InvoiceMutation) ResetEdge(name string) error
- func (m *InvoiceMutation) ResetField(name string) error
- func (m *InvoiceMutation) ResetNote()
- func (m *InvoiceMutation) ResetOrder()
- func (m *InvoiceMutation) ResetOrderID()
- func (m *InvoiceMutation) ResetStatus()
- func (m *InvoiceMutation) ResetTotal()
- func (m *InvoiceMutation) ResetType()
- func (m *InvoiceMutation) ResetUpdatedAt()
- func (m *InvoiceMutation) SetComment(s string)
- func (m *InvoiceMutation) SetCreatedAt(t time.Time)
- func (m *InvoiceMutation) SetField(name string, value ent.Value) error
- func (m *InvoiceMutation) SetID(id uuid.UUID)
- func (m *InvoiceMutation) SetNote(s string)
- func (m *InvoiceMutation) SetOp(op Op)
- func (m *InvoiceMutation) SetOrderID(u uuid.UUID)
- func (m *InvoiceMutation) SetStatus(i invoice.Status)
- func (m *InvoiceMutation) SetTotal(d decimal.Decimal)
- func (m *InvoiceMutation) SetType(i invoice.Type)
- func (m *InvoiceMutation) SetUpdatedAt(t time.Time)
- func (m *InvoiceMutation) Status() (r invoice.Status, exists bool)
- func (m *InvoiceMutation) Total() (r decimal.Decimal, exists bool)
- func (m InvoiceMutation) Tx() (*Tx, error)
- func (m *InvoiceMutation) Type() string
- func (m *InvoiceMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *InvoiceMutation) Where(ps ...predicate.Invoice)
- func (m *InvoiceMutation) WhereP(ps ...func(*sql.Selector))
- type InvoiceQuery
- func (iq *InvoiceQuery) Aggregate(fns ...AggregateFunc) *InvoiceSelect
- func (iq *InvoiceQuery) All(ctx context.Context) ([]*Invoice, error)
- func (iq *InvoiceQuery) AllX(ctx context.Context) []*Invoice
- func (iq *InvoiceQuery) Clone() *InvoiceQuery
- func (iq *InvoiceQuery) Count(ctx context.Context) (int, error)
- func (iq *InvoiceQuery) CountX(ctx context.Context) int
- func (iq *InvoiceQuery) Exist(ctx context.Context) (bool, error)
- func (iq *InvoiceQuery) ExistX(ctx context.Context) bool
- func (iq *InvoiceQuery) First(ctx context.Context) (*Invoice, error)
- func (iq *InvoiceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InvoiceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *InvoiceQuery) FirstX(ctx context.Context) *Invoice
- func (iq *InvoiceQuery) GroupBy(field string, fields ...string) *InvoiceGroupBy
- func (iq *InvoiceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iq *InvoiceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *InvoiceQuery) Limit(limit int) *InvoiceQuery
- func (iq *InvoiceQuery) Offset(offset int) *InvoiceQuery
- func (iq *InvoiceQuery) Only(ctx context.Context) (*Invoice, error)
- func (iq *InvoiceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InvoiceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *InvoiceQuery) OnlyX(ctx context.Context) *Invoice
- func (iq *InvoiceQuery) Order(o ...invoice.OrderOption) *InvoiceQuery
- func (iq *InvoiceQuery) QueryOrder() *OrderQuery
- func (iq *InvoiceQuery) Select(fields ...string) *InvoiceSelect
- func (iq *InvoiceQuery) Unique(unique bool) *InvoiceQuery
- func (iq *InvoiceQuery) Where(ps ...predicate.Invoice) *InvoiceQuery
- func (iq *InvoiceQuery) WithOrder(opts ...func(*OrderQuery)) *InvoiceQuery
- type InvoiceSelect
- func (is *InvoiceSelect) Aggregate(fns ...AggregateFunc) *InvoiceSelect
- func (s *InvoiceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceSelect) BoolX(ctx context.Context) bool
- func (s *InvoiceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceSelect) BoolsX(ctx context.Context) []bool
- func (s *InvoiceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceSelect) Float64X(ctx context.Context) float64
- func (s *InvoiceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceSelect) Float64sX(ctx context.Context) []float64
- func (s *InvoiceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceSelect) IntX(ctx context.Context) int
- func (s *InvoiceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceSelect) IntsX(ctx context.Context) []int
- func (is *InvoiceSelect) Scan(ctx context.Context, v any) error
- func (s *InvoiceSelect) ScanX(ctx context.Context, v any)
- func (s *InvoiceSelect) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceSelect) StringX(ctx context.Context) string
- func (s *InvoiceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceSelect) StringsX(ctx context.Context) []string
- type InvoiceUpdate
- func (iu *InvoiceUpdate) ClearComment() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearNote() *InvoiceUpdate
- func (iu *InvoiceUpdate) Exec(ctx context.Context) error
- func (iu *InvoiceUpdate) ExecX(ctx context.Context)
- func (iu *InvoiceUpdate) Mutation() *InvoiceMutation
- func (iu *InvoiceUpdate) Save(ctx context.Context) (int, error)
- func (iu *InvoiceUpdate) SaveX(ctx context.Context) int
- func (iu *InvoiceUpdate) SetComment(s string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableComment(s *string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableNote(s *string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableStatus(i *invoice.Status) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNote(s string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetStatus(i invoice.Status) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetUpdatedAt(t time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) Where(ps ...predicate.Invoice) *InvoiceUpdate
- type InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearComment() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearNote() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) Exec(ctx context.Context) error
- func (iuo *InvoiceUpdateOne) ExecX(ctx context.Context)
- func (iuo *InvoiceUpdateOne) Mutation() *InvoiceMutation
- func (iuo *InvoiceUpdateOne) Save(ctx context.Context) (*Invoice, error)
- func (iuo *InvoiceUpdateOne) SaveX(ctx context.Context) *Invoice
- func (iuo *InvoiceUpdateOne) Select(field string, fields ...string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetComment(s string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableComment(s *string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableNote(s *string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableStatus(i *invoice.Status) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNote(s string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetStatus(i invoice.Status) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetUpdatedAt(t time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) Where(ps ...predicate.Invoice) *InvoiceUpdateOne
- type Invoices
- type Message
- type MessageClient
- func (c *MessageClient) Create() *MessageCreate
- func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
- func (c *MessageClient) Delete() *MessageDelete
- func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
- func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
- func (c *MessageClient) Get(ctx context.Context, id uuid.UUID) (*Message, error)
- func (c *MessageClient) GetX(ctx context.Context, id uuid.UUID) *Message
- func (c *MessageClient) Hooks() []Hook
- func (c *MessageClient) Intercept(interceptors ...Interceptor)
- func (c *MessageClient) Interceptors() []Interceptor
- func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
- func (c *MessageClient) Query() *MessageQuery
- func (c *MessageClient) QueryConversation(m *Message) *ConversationQuery
- func (c *MessageClient) QuerySender(m *Message) *PersonQuery
- func (c *MessageClient) Update() *MessageUpdate
- func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
- func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
- func (c *MessageClient) Use(hooks ...Hook)
- type MessageCreate
- func (mc *MessageCreate) Exec(ctx context.Context) error
- func (mc *MessageCreate) ExecX(ctx context.Context)
- func (mc *MessageCreate) Mutation() *MessageMutation
- func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
- func (mc *MessageCreate) SaveX(ctx context.Context) *Message
- func (mc *MessageCreate) SetContent(s string) *MessageCreate
- func (mc *MessageCreate) SetConversation(c *Conversation) *MessageCreate
- func (mc *MessageCreate) SetConversationID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetCreatedAt(t time.Time) *MessageCreate
- func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetIsRead(b bool) *MessageCreate
- func (mc *MessageCreate) SetNillableCreatedAt(t *time.Time) *MessageCreate
- func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetNillableIsRead(b *bool) *MessageCreate
- func (mc *MessageCreate) SetNillableType(m *message.Type) *MessageCreate
- func (mc *MessageCreate) SetNillableUpdatedAt(t *time.Time) *MessageCreate
- func (mc *MessageCreate) SetSender(p *Person) *MessageCreate
- func (mc *MessageCreate) SetSenderID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetType(m message.Type) *MessageCreate
- func (mc *MessageCreate) SetUpdatedAt(t time.Time) *MessageCreate
- type MessageCreateBulk
- type MessageDelete
- type MessageDeleteOne
- type MessageEdges
- type MessageGroupBy
- func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
- func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageGroupBy) BoolX(ctx context.Context) bool
- func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageGroupBy) Float64X(ctx context.Context) float64
- func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MessageGroupBy) IntX(ctx context.Context) int
- func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MessageGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *MessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MessageGroupBy) StringX(ctx context.Context) string
- func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MessageGroupBy) StringsX(ctx context.Context) []string
- type MessageMutation
- func (m *MessageMutation) AddField(name string, value ent.Value) error
- func (m *MessageMutation) AddedEdges() []string
- func (m *MessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *MessageMutation) AddedFields() []string
- func (m *MessageMutation) AddedIDs(name string) []ent.Value
- func (m *MessageMutation) ClearConversation()
- func (m *MessageMutation) ClearEdge(name string) error
- func (m *MessageMutation) ClearField(name string) error
- func (m *MessageMutation) ClearSender()
- func (m *MessageMutation) ClearedEdges() []string
- func (m *MessageMutation) ClearedFields() []string
- func (m MessageMutation) Client() *Client
- func (m *MessageMutation) Content() (r string, exists bool)
- func (m *MessageMutation) ConversationCleared() bool
- func (m *MessageMutation) ConversationID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) ConversationIDs() (ids []uuid.UUID)
- func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MessageMutation) EdgeCleared(name string) bool
- func (m *MessageMutation) Field(name string) (ent.Value, bool)
- func (m *MessageMutation) FieldCleared(name string) bool
- func (m *MessageMutation) Fields() []string
- func (m *MessageMutation) GetType() (r message.Type, exists bool)
- func (m *MessageMutation) ID() (id uuid.UUID, exists bool)
- func (m *MessageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *MessageMutation) IsRead() (r bool, exists bool)
- func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldConversationID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MessageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MessageMutation) OldIsRead(ctx context.Context) (v bool, err error)
- func (m *MessageMutation) OldSenderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MessageMutation) OldType(ctx context.Context) (v message.Type, err error)
- func (m *MessageMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MessageMutation) Op() Op
- func (m *MessageMutation) RemovedEdges() []string
- func (m *MessageMutation) RemovedIDs(name string) []ent.Value
- func (m *MessageMutation) ResetContent()
- func (m *MessageMutation) ResetConversation()
- func (m *MessageMutation) ResetConversationID()
- func (m *MessageMutation) ResetCreatedAt()
- func (m *MessageMutation) ResetEdge(name string) error
- func (m *MessageMutation) ResetField(name string) error
- func (m *MessageMutation) ResetIsRead()
- func (m *MessageMutation) ResetSender()
- func (m *MessageMutation) ResetSenderID()
- func (m *MessageMutation) ResetType()
- func (m *MessageMutation) ResetUpdatedAt()
- func (m *MessageMutation) SenderCleared() bool
- func (m *MessageMutation) SenderID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) SenderIDs() (ids []uuid.UUID)
- func (m *MessageMutation) SetContent(s string)
- func (m *MessageMutation) SetConversationID(u uuid.UUID)
- func (m *MessageMutation) SetCreatedAt(t time.Time)
- func (m *MessageMutation) SetField(name string, value ent.Value) error
- func (m *MessageMutation) SetID(id uuid.UUID)
- func (m *MessageMutation) SetIsRead(b bool)
- func (m *MessageMutation) SetOp(op Op)
- func (m *MessageMutation) SetSenderID(u uuid.UUID)
- func (m *MessageMutation) SetType(value message.Type)
- func (m *MessageMutation) SetUpdatedAt(t time.Time)
- func (m MessageMutation) Tx() (*Tx, error)
- func (m *MessageMutation) Type() string
- func (m *MessageMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MessageMutation) Where(ps ...predicate.Message)
- func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
- type MessageQuery
- func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
- func (mq *MessageQuery) AllX(ctx context.Context) []*Message
- func (mq *MessageQuery) Clone() *MessageQuery
- func (mq *MessageQuery) Count(ctx context.Context) (int, error)
- func (mq *MessageQuery) CountX(ctx context.Context) int
- func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MessageQuery) ExistX(ctx context.Context) bool
- func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) FirstX(ctx context.Context) *Message
- func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
- func (mq *MessageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (mq *MessageQuery) Limit(limit int) *MessageQuery
- func (mq *MessageQuery) Offset(offset int) *MessageQuery
- func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
- func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
- func (mq *MessageQuery) QueryConversation() *ConversationQuery
- func (mq *MessageQuery) QuerySender() *PersonQuery
- func (mq *MessageQuery) Select(fields ...string) *MessageSelect
- func (mq *MessageQuery) Unique(unique bool) *MessageQuery
- func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
- func (mq *MessageQuery) WithConversation(opts ...func(*ConversationQuery)) *MessageQuery
- func (mq *MessageQuery) WithSender(opts ...func(*PersonQuery)) *MessageQuery
- type MessageSelect
- func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageSelect) BoolX(ctx context.Context) bool
- func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageSelect) BoolsX(ctx context.Context) []bool
- func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageSelect) Float64X(ctx context.Context) float64
- func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageSelect) Float64sX(ctx context.Context) []float64
- func (s *MessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MessageSelect) IntX(ctx context.Context) int
- func (s *MessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MessageSelect) IntsX(ctx context.Context) []int
- func (ms *MessageSelect) Scan(ctx context.Context, v any) error
- func (s *MessageSelect) ScanX(ctx context.Context, v any)
- func (s *MessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *MessageSelect) StringX(ctx context.Context) string
- func (s *MessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MessageSelect) StringsX(ctx context.Context) []string
- type MessageUpdate
- func (mu *MessageUpdate) Exec(ctx context.Context) error
- func (mu *MessageUpdate) ExecX(ctx context.Context)
- func (mu *MessageUpdate) Mutation() *MessageMutation
- func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
- func (mu *MessageUpdate) SaveX(ctx context.Context) int
- func (mu *MessageUpdate) SetContent(s string) *MessageUpdate
- func (mu *MessageUpdate) SetIsRead(b bool) *MessageUpdate
- func (mu *MessageUpdate) SetNillableContent(s *string) *MessageUpdate
- func (mu *MessageUpdate) SetNillableIsRead(b *bool) *MessageUpdate
- func (mu *MessageUpdate) SetUpdatedAt(t time.Time) *MessageUpdate
- func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
- type MessageUpdateOne
- func (muo *MessageUpdateOne) Exec(ctx context.Context) error
- func (muo *MessageUpdateOne) ExecX(ctx context.Context)
- func (muo *MessageUpdateOne) Mutation() *MessageMutation
- func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
- func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
- func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetContent(s string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetIsRead(b bool) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableContent(s *string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableIsRead(b *bool) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetUpdatedAt(t time.Time) *MessageUpdateOne
- func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
- type Messages
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type Order
- func (o *Order) QueryCreator() *PersonQuery
- func (o *Order) QueryCustomer() *PersonQuery
- func (o *Order) QueryDeliveryStaff() *PersonQuery
- func (o *Order) QueryManagementStaff() *PersonQuery
- func (o *Order) QueryOrderStatus() *OrderStatusCodeQuery
- func (o *Order) QueryParentOrder() *OrderQuery
- func (o *Order) QueryWarehouseStaff() *PersonQuery
- func (o *Order) String() string
- func (o *Order) Unwrap() *Order
- func (o *Order) Update() *OrderUpdateOne
- func (o *Order) Value(name string) (ent.Value, error)
- 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 uuid.UUID) *OrderDeleteOne
- func (c *OrderClient) Get(ctx context.Context, id uuid.UUID) (*Order, error)
- func (c *OrderClient) GetX(ctx context.Context, id uuid.UUID) *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) QueryCreator(o *Order) *PersonQuery
- func (c *OrderClient) QueryCustomer(o *Order) *PersonQuery
- func (c *OrderClient) QueryDeliveryStaff(o *Order) *PersonQuery
- func (c *OrderClient) QueryManagementStaff(o *Order) *PersonQuery
- func (c *OrderClient) QueryOrderStatus(o *Order) *OrderStatusCodeQuery
- func (c *OrderClient) QueryParentOrder(o *Order) *OrderQuery
- func (c *OrderClient) QueryWarehouseStaff(o *Order) *PersonQuery
- func (c *OrderClient) Update() *OrderUpdate
- func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
- func (c *OrderClient) UpdateOneID(id uuid.UUID) *OrderUpdateOne
- func (c *OrderClient) Use(hooks ...Hook)
- type 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) SetCreatedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetCreatedBy(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetCreator(p *Person) *OrderCreate
- func (oc *OrderCreate) SetCreatorID(id uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetCustomer(p *Person) *OrderCreate
- func (oc *OrderCreate) SetCustomerID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetDeliveryStaff(p *Person) *OrderCreate
- func (oc *OrderCreate) SetDeliveryStaffID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetInternalNote(s string) *OrderCreate
- func (oc *OrderCreate) SetManagementStaff(p *Person) *OrderCreate
- func (oc *OrderCreate) SetManagementStaffID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableDeliveryStaffID(u *uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNillableID(u *uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNillableInternalNote(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableNote(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableParentOrderID(u *uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNillablePriority(i *int) *OrderCreate
- func (oc *OrderCreate) SetNillableStatusCode(i *int) *OrderCreate
- func (oc *OrderCreate) SetNillableType(o *order.Type) *OrderCreate
- func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableWarehouseStaffID(u *uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNote(s string) *OrderCreate
- func (oc *OrderCreate) SetOrderStatus(o *OrderStatusCode) *OrderCreate
- func (oc *OrderCreate) SetOrderStatusID(id int) *OrderCreate
- func (oc *OrderCreate) SetParentOrder(o *Order) *OrderCreate
- func (oc *OrderCreate) SetParentOrderID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetPriority(i int) *OrderCreate
- func (oc *OrderCreate) SetStatusCode(i int) *OrderCreate
- func (oc *OrderCreate) SetType(o order.Type) *OrderCreate
- func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetWarehouseStaff(p *Person) *OrderCreate
- func (oc *OrderCreate) SetWarehouseStaffID(u uuid.UUID) *OrderCreate
- type OrderCreateBulk
- type OrderDelete
- type OrderDeleteOne
- type OrderEdges
- func (e OrderEdges) CreatorOrErr() (*Person, error)
- func (e OrderEdges) CustomerOrErr() (*Person, error)
- func (e OrderEdges) DeliveryStaffOrErr() (*Person, error)
- func (e OrderEdges) ManagementStaffOrErr() (*Person, error)
- func (e OrderEdges) OrderStatusOrErr() (*OrderStatusCode, error)
- func (e OrderEdges) ParentOrderOrErr() (*Order, error)
- func (e OrderEdges) WarehouseStaffOrErr() (*Person, error)
- 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 OrderLineItem
- func (oli *OrderLineItem) QueryOrder() *OrderQuery
- func (oli *OrderLineItem) QueryProduct() *ProductQuery
- func (oli *OrderLineItem) String() string
- func (oli *OrderLineItem) Unwrap() *OrderLineItem
- func (oli *OrderLineItem) Update() *OrderLineItemUpdateOne
- func (oli *OrderLineItem) Value(name string) (ent.Value, error)
- type OrderLineItemClient
- func (c *OrderLineItemClient) Create() *OrderLineItemCreate
- func (c *OrderLineItemClient) CreateBulk(builders ...*OrderLineItemCreate) *OrderLineItemCreateBulk
- func (c *OrderLineItemClient) Delete() *OrderLineItemDelete
- func (c *OrderLineItemClient) DeleteOne(oli *OrderLineItem) *OrderLineItemDeleteOne
- func (c *OrderLineItemClient) DeleteOneID(id uuid.UUID) *OrderLineItemDeleteOne
- func (c *OrderLineItemClient) Get(ctx context.Context, id uuid.UUID) (*OrderLineItem, error)
- func (c *OrderLineItemClient) GetX(ctx context.Context, id uuid.UUID) *OrderLineItem
- func (c *OrderLineItemClient) Hooks() []Hook
- func (c *OrderLineItemClient) Intercept(interceptors ...Interceptor)
- func (c *OrderLineItemClient) Interceptors() []Interceptor
- func (c *OrderLineItemClient) MapCreateBulk(slice any, setFunc func(*OrderLineItemCreate, int)) *OrderLineItemCreateBulk
- func (c *OrderLineItemClient) Query() *OrderLineItemQuery
- func (c *OrderLineItemClient) QueryOrder(oli *OrderLineItem) *OrderQuery
- func (c *OrderLineItemClient) QueryProduct(oli *OrderLineItem) *ProductQuery
- func (c *OrderLineItemClient) Update() *OrderLineItemUpdate
- func (c *OrderLineItemClient) UpdateOne(oli *OrderLineItem) *OrderLineItemUpdateOne
- func (c *OrderLineItemClient) UpdateOneID(id uuid.UUID) *OrderLineItemUpdateOne
- func (c *OrderLineItemClient) Use(hooks ...Hook)
- type OrderLineItemCreate
- func (olic *OrderLineItemCreate) Exec(ctx context.Context) error
- func (olic *OrderLineItemCreate) ExecX(ctx context.Context)
- func (olic *OrderLineItemCreate) Mutation() *OrderLineItemMutation
- func (olic *OrderLineItemCreate) Save(ctx context.Context) (*OrderLineItem, error)
- func (olic *OrderLineItemCreate) SaveX(ctx context.Context) *OrderLineItem
- func (olic *OrderLineItemCreate) SetCreatedAt(t time.Time) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetID(u uuid.UUID) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetNillableCreatedAt(t *time.Time) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetNillableID(u *uuid.UUID) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetNillableUpdatedAt(t *time.Time) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetOrder(o *Order) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetOrderID(u uuid.UUID) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetProduct(p *Product) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetProductID(s string) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetQty(d decimal.Decimal) *OrderLineItemCreate
- func (olic *OrderLineItemCreate) SetUpdatedAt(t time.Time) *OrderLineItemCreate
- type OrderLineItemCreateBulk
- func (olicb *OrderLineItemCreateBulk) Exec(ctx context.Context) error
- func (olicb *OrderLineItemCreateBulk) ExecX(ctx context.Context)
- func (olicb *OrderLineItemCreateBulk) Save(ctx context.Context) ([]*OrderLineItem, error)
- func (olicb *OrderLineItemCreateBulk) SaveX(ctx context.Context) []*OrderLineItem
- type OrderLineItemDelete
- type OrderLineItemDeleteOne
- type OrderLineItemEdges
- type OrderLineItemGroupBy
- func (oligb *OrderLineItemGroupBy) Aggregate(fns ...AggregateFunc) *OrderLineItemGroupBy
- func (s *OrderLineItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderLineItemGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderLineItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderLineItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderLineItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderLineItemGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderLineItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderLineItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderLineItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderLineItemGroupBy) IntX(ctx context.Context) int
- func (s *OrderLineItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderLineItemGroupBy) IntsX(ctx context.Context) []int
- func (oligb *OrderLineItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderLineItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderLineItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderLineItemGroupBy) StringX(ctx context.Context) string
- func (s *OrderLineItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderLineItemGroupBy) StringsX(ctx context.Context) []string
- type OrderLineItemMutation
- func (m *OrderLineItemMutation) AddField(name string, value ent.Value) error
- func (m *OrderLineItemMutation) AddQty(d decimal.Decimal)
- func (m *OrderLineItemMutation) AddedEdges() []string
- func (m *OrderLineItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderLineItemMutation) AddedFields() []string
- func (m *OrderLineItemMutation) AddedIDs(name string) []ent.Value
- func (m *OrderLineItemMutation) AddedQty() (r decimal.Decimal, exists bool)
- func (m *OrderLineItemMutation) ClearEdge(name string) error
- func (m *OrderLineItemMutation) ClearField(name string) error
- func (m *OrderLineItemMutation) ClearOrder()
- func (m *OrderLineItemMutation) ClearProduct()
- func (m *OrderLineItemMutation) ClearedEdges() []string
- func (m *OrderLineItemMutation) ClearedFields() []string
- func (m OrderLineItemMutation) Client() *Client
- func (m *OrderLineItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderLineItemMutation) EdgeCleared(name string) bool
- func (m *OrderLineItemMutation) Field(name string) (ent.Value, bool)
- func (m *OrderLineItemMutation) FieldCleared(name string) bool
- func (m *OrderLineItemMutation) Fields() []string
- func (m *OrderLineItemMutation) ID() (id uuid.UUID, exists bool)
- func (m *OrderLineItemMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OrderLineItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderLineItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderLineItemMutation) OldOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderLineItemMutation) OldProductID(ctx context.Context) (v string, err error)
- func (m *OrderLineItemMutation) OldQty(ctx context.Context) (v decimal.Decimal, err error)
- func (m *OrderLineItemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderLineItemMutation) Op() Op
- func (m *OrderLineItemMutation) OrderCleared() bool
- func (m *OrderLineItemMutation) OrderID() (r uuid.UUID, exists bool)
- func (m *OrderLineItemMutation) OrderIDs() (ids []uuid.UUID)
- func (m *OrderLineItemMutation) ProductCleared() bool
- func (m *OrderLineItemMutation) ProductID() (r string, exists bool)
- func (m *OrderLineItemMutation) ProductIDs() (ids []string)
- func (m *OrderLineItemMutation) Qty() (r decimal.Decimal, exists bool)
- func (m *OrderLineItemMutation) RemovedEdges() []string
- func (m *OrderLineItemMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderLineItemMutation) ResetCreatedAt()
- func (m *OrderLineItemMutation) ResetEdge(name string) error
- func (m *OrderLineItemMutation) ResetField(name string) error
- func (m *OrderLineItemMutation) ResetOrder()
- func (m *OrderLineItemMutation) ResetOrderID()
- func (m *OrderLineItemMutation) ResetProduct()
- func (m *OrderLineItemMutation) ResetProductID()
- func (m *OrderLineItemMutation) ResetQty()
- func (m *OrderLineItemMutation) ResetUpdatedAt()
- func (m *OrderLineItemMutation) SetCreatedAt(t time.Time)
- func (m *OrderLineItemMutation) SetField(name string, value ent.Value) error
- func (m *OrderLineItemMutation) SetID(id uuid.UUID)
- func (m *OrderLineItemMutation) SetOp(op Op)
- func (m *OrderLineItemMutation) SetOrderID(u uuid.UUID)
- func (m *OrderLineItemMutation) SetProductID(s string)
- func (m *OrderLineItemMutation) SetQty(d decimal.Decimal)
- func (m *OrderLineItemMutation) SetUpdatedAt(t time.Time)
- func (m OrderLineItemMutation) Tx() (*Tx, error)
- func (m *OrderLineItemMutation) Type() string
- func (m *OrderLineItemMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderLineItemMutation) Where(ps ...predicate.OrderLineItem)
- func (m *OrderLineItemMutation) WhereP(ps ...func(*sql.Selector))
- type OrderLineItemQuery
- func (oliq *OrderLineItemQuery) Aggregate(fns ...AggregateFunc) *OrderLineItemSelect
- func (oliq *OrderLineItemQuery) All(ctx context.Context) ([]*OrderLineItem, error)
- func (oliq *OrderLineItemQuery) AllX(ctx context.Context) []*OrderLineItem
- func (oliq *OrderLineItemQuery) Clone() *OrderLineItemQuery
- func (oliq *OrderLineItemQuery) Count(ctx context.Context) (int, error)
- func (oliq *OrderLineItemQuery) CountX(ctx context.Context) int
- func (oliq *OrderLineItemQuery) Exist(ctx context.Context) (bool, error)
- func (oliq *OrderLineItemQuery) ExistX(ctx context.Context) bool
- func (oliq *OrderLineItemQuery) First(ctx context.Context) (*OrderLineItem, error)
- func (oliq *OrderLineItemQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (oliq *OrderLineItemQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (oliq *OrderLineItemQuery) FirstX(ctx context.Context) *OrderLineItem
- func (oliq *OrderLineItemQuery) GroupBy(field string, fields ...string) *OrderLineItemGroupBy
- func (oliq *OrderLineItemQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (oliq *OrderLineItemQuery) IDsX(ctx context.Context) []uuid.UUID
- func (oliq *OrderLineItemQuery) Limit(limit int) *OrderLineItemQuery
- func (oliq *OrderLineItemQuery) Offset(offset int) *OrderLineItemQuery
- func (oliq *OrderLineItemQuery) Only(ctx context.Context) (*OrderLineItem, error)
- func (oliq *OrderLineItemQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (oliq *OrderLineItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (oliq *OrderLineItemQuery) OnlyX(ctx context.Context) *OrderLineItem
- func (oliq *OrderLineItemQuery) Order(o ...orderlineitem.OrderOption) *OrderLineItemQuery
- func (oliq *OrderLineItemQuery) QueryOrder() *OrderQuery
- func (oliq *OrderLineItemQuery) QueryProduct() *ProductQuery
- func (oliq *OrderLineItemQuery) Select(fields ...string) *OrderLineItemSelect
- func (oliq *OrderLineItemQuery) Unique(unique bool) *OrderLineItemQuery
- func (oliq *OrderLineItemQuery) Where(ps ...predicate.OrderLineItem) *OrderLineItemQuery
- func (oliq *OrderLineItemQuery) WithOrder(opts ...func(*OrderQuery)) *OrderLineItemQuery
- func (oliq *OrderLineItemQuery) WithProduct(opts ...func(*ProductQuery)) *OrderLineItemQuery
- type OrderLineItemSelect
- func (olis *OrderLineItemSelect) Aggregate(fns ...AggregateFunc) *OrderLineItemSelect
- func (s *OrderLineItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderLineItemSelect) BoolX(ctx context.Context) bool
- func (s *OrderLineItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderLineItemSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderLineItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderLineItemSelect) Float64X(ctx context.Context) float64
- func (s *OrderLineItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderLineItemSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderLineItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderLineItemSelect) IntX(ctx context.Context) int
- func (s *OrderLineItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderLineItemSelect) IntsX(ctx context.Context) []int
- func (olis *OrderLineItemSelect) Scan(ctx context.Context, v any) error
- func (s *OrderLineItemSelect) ScanX(ctx context.Context, v any)
- func (s *OrderLineItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderLineItemSelect) StringX(ctx context.Context) string
- func (s *OrderLineItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderLineItemSelect) StringsX(ctx context.Context) []string
- type OrderLineItemUpdate
- func (oliu *OrderLineItemUpdate) AddQty(d decimal.Decimal) *OrderLineItemUpdate
- func (oliu *OrderLineItemUpdate) Exec(ctx context.Context) error
- func (oliu *OrderLineItemUpdate) ExecX(ctx context.Context)
- func (oliu *OrderLineItemUpdate) Mutation() *OrderLineItemMutation
- func (oliu *OrderLineItemUpdate) Save(ctx context.Context) (int, error)
- func (oliu *OrderLineItemUpdate) SaveX(ctx context.Context) int
- func (oliu *OrderLineItemUpdate) SetNillableQty(d *decimal.Decimal) *OrderLineItemUpdate
- func (oliu *OrderLineItemUpdate) SetQty(d decimal.Decimal) *OrderLineItemUpdate
- func (oliu *OrderLineItemUpdate) SetUpdatedAt(t time.Time) *OrderLineItemUpdate
- func (oliu *OrderLineItemUpdate) Where(ps ...predicate.OrderLineItem) *OrderLineItemUpdate
- type OrderLineItemUpdateOne
- func (oliuo *OrderLineItemUpdateOne) AddQty(d decimal.Decimal) *OrderLineItemUpdateOne
- func (oliuo *OrderLineItemUpdateOne) Exec(ctx context.Context) error
- func (oliuo *OrderLineItemUpdateOne) ExecX(ctx context.Context)
- func (oliuo *OrderLineItemUpdateOne) Mutation() *OrderLineItemMutation
- func (oliuo *OrderLineItemUpdateOne) Save(ctx context.Context) (*OrderLineItem, error)
- func (oliuo *OrderLineItemUpdateOne) SaveX(ctx context.Context) *OrderLineItem
- func (oliuo *OrderLineItemUpdateOne) Select(field string, fields ...string) *OrderLineItemUpdateOne
- func (oliuo *OrderLineItemUpdateOne) SetNillableQty(d *decimal.Decimal) *OrderLineItemUpdateOne
- func (oliuo *OrderLineItemUpdateOne) SetQty(d decimal.Decimal) *OrderLineItemUpdateOne
- func (oliuo *OrderLineItemUpdateOne) SetUpdatedAt(t time.Time) *OrderLineItemUpdateOne
- func (oliuo *OrderLineItemUpdateOne) Where(ps ...predicate.OrderLineItem) *OrderLineItemUpdateOne
- type OrderLineItems
- type OrderMutation
- func (m *OrderMutation) AddField(name string, value ent.Value) error
- func (m *OrderMutation) AddPriority(i int)
- 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) AddedPriority() (r int, exists bool)
- func (m *OrderMutation) ClearCreator()
- func (m *OrderMutation) ClearCustomer()
- func (m *OrderMutation) ClearDeliveryStaff()
- func (m *OrderMutation) ClearDeliveryStaffID()
- func (m *OrderMutation) ClearEdge(name string) error
- func (m *OrderMutation) ClearField(name string) error
- func (m *OrderMutation) ClearInternalNote()
- func (m *OrderMutation) ClearManagementStaff()
- func (m *OrderMutation) ClearNote()
- func (m *OrderMutation) ClearOrderStatus()
- func (m *OrderMutation) ClearParentOrder()
- func (m *OrderMutation) ClearParentOrderID()
- func (m *OrderMutation) ClearWarehouseStaff()
- func (m *OrderMutation) ClearWarehouseStaffID()
- func (m *OrderMutation) ClearedEdges() []string
- func (m *OrderMutation) ClearedFields() []string
- func (m OrderMutation) Client() *Client
- func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) CreatedBy() (r uuid.UUID, exists bool)
- func (m *OrderMutation) CreatorCleared() bool
- func (m *OrderMutation) CreatorID() (id uuid.UUID, exists bool)
- func (m *OrderMutation) CreatorIDs() (ids []uuid.UUID)
- func (m *OrderMutation) CustomerCleared() bool
- func (m *OrderMutation) CustomerID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) CustomerIDs() (ids []uuid.UUID)
- func (m *OrderMutation) DeliveryStaffCleared() bool
- func (m *OrderMutation) DeliveryStaffID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) DeliveryStaffIDCleared() bool
- func (m *OrderMutation) DeliveryStaffIDs() (ids []uuid.UUID)
- 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) GetType() (r order.Type, exists bool)
- func (m *OrderMutation) ID() (id uuid.UUID, exists bool)
- func (m *OrderMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OrderMutation) InternalNote() (r string, exists bool)
- func (m *OrderMutation) InternalNoteCleared() bool
- func (m *OrderMutation) ManagementStaffCleared() bool
- func (m *OrderMutation) ManagementStaffID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) ManagementStaffIDs() (ids []uuid.UUID)
- func (m *OrderMutation) Note() (r string, exists bool)
- func (m *OrderMutation) NoteCleared() bool
- func (m *OrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldCreatedBy(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderMutation) OldCustomerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderMutation) OldDeliveryStaffID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderMutation) OldInternalNote(ctx context.Context) (v *string, err error)
- func (m *OrderMutation) OldManagementStaffID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderMutation) OldNote(ctx context.Context) (v *string, err error)
- func (m *OrderMutation) OldParentOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderMutation) OldPriority(ctx context.Context) (v int, err error)
- func (m *OrderMutation) OldStatusCode(ctx context.Context) (v int, err error)
- func (m *OrderMutation) OldType(ctx context.Context) (v order.Type, err error)
- func (m *OrderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldWarehouseStaffID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *OrderMutation) Op() Op
- func (m *OrderMutation) OrderStatusCleared() bool
- func (m *OrderMutation) OrderStatusID() (id int, exists bool)
- func (m *OrderMutation) OrderStatusIDs() (ids []int)
- func (m *OrderMutation) ParentOrderCleared() bool
- func (m *OrderMutation) ParentOrderID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) ParentOrderIDCleared() bool
- func (m *OrderMutation) ParentOrderIDs() (ids []uuid.UUID)
- func (m *OrderMutation) Priority() (r int, exists bool)
- func (m *OrderMutation) RemovedEdges() []string
- func (m *OrderMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderMutation) ResetCreatedAt()
- func (m *OrderMutation) ResetCreatedBy()
- func (m *OrderMutation) ResetCreator()
- func (m *OrderMutation) ResetCustomer()
- func (m *OrderMutation) ResetCustomerID()
- func (m *OrderMutation) ResetDeliveryStaff()
- func (m *OrderMutation) ResetDeliveryStaffID()
- func (m *OrderMutation) ResetEdge(name string) error
- func (m *OrderMutation) ResetField(name string) error
- func (m *OrderMutation) ResetInternalNote()
- func (m *OrderMutation) ResetManagementStaff()
- func (m *OrderMutation) ResetManagementStaffID()
- func (m *OrderMutation) ResetNote()
- func (m *OrderMutation) ResetOrderStatus()
- func (m *OrderMutation) ResetParentOrder()
- func (m *OrderMutation) ResetParentOrderID()
- func (m *OrderMutation) ResetPriority()
- func (m *OrderMutation) ResetStatusCode()
- func (m *OrderMutation) ResetType()
- func (m *OrderMutation) ResetUpdatedAt()
- func (m *OrderMutation) ResetWarehouseStaff()
- func (m *OrderMutation) ResetWarehouseStaffID()
- func (m *OrderMutation) SetCreatedAt(t time.Time)
- func (m *OrderMutation) SetCreatedBy(u uuid.UUID)
- func (m *OrderMutation) SetCreatorID(id uuid.UUID)
- func (m *OrderMutation) SetCustomerID(u uuid.UUID)
- func (m *OrderMutation) SetDeliveryStaffID(u uuid.UUID)
- func (m *OrderMutation) SetField(name string, value ent.Value) error
- func (m *OrderMutation) SetID(id uuid.UUID)
- func (m *OrderMutation) SetInternalNote(s string)
- func (m *OrderMutation) SetManagementStaffID(u uuid.UUID)
- func (m *OrderMutation) SetNote(s string)
- func (m *OrderMutation) SetOp(op Op)
- func (m *OrderMutation) SetOrderStatusID(id int)
- func (m *OrderMutation) SetParentOrderID(u uuid.UUID)
- func (m *OrderMutation) SetPriority(i int)
- func (m *OrderMutation) SetStatusCode(i int)
- func (m *OrderMutation) SetType(o order.Type)
- func (m *OrderMutation) SetUpdatedAt(t time.Time)
- func (m *OrderMutation) SetWarehouseStaffID(u uuid.UUID)
- func (m *OrderMutation) StatusCode() (r int, exists bool)
- func (m OrderMutation) Tx() (*Tx, error)
- func (m *OrderMutation) Type() string
- func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) WarehouseStaffCleared() bool
- func (m *OrderMutation) WarehouseStaffID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) WarehouseStaffIDCleared() bool
- func (m *OrderMutation) WarehouseStaffIDs() (ids []uuid.UUID)
- 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 uuid.UUID, err error)
- func (oq *OrderQuery) FirstIDX(ctx context.Context) uuid.UUID
- 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 []uuid.UUID, err error)
- func (oq *OrderQuery) IDsX(ctx context.Context) []uuid.UUID
- 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 uuid.UUID, err error)
- func (oq *OrderQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
- func (oq *OrderQuery) Order(o ...order.OrderOption) *OrderQuery
- func (oq *OrderQuery) QueryCreator() *PersonQuery
- func (oq *OrderQuery) QueryCustomer() *PersonQuery
- func (oq *OrderQuery) QueryDeliveryStaff() *PersonQuery
- func (oq *OrderQuery) QueryManagementStaff() *PersonQuery
- func (oq *OrderQuery) QueryOrderStatus() *OrderStatusCodeQuery
- func (oq *OrderQuery) QueryParentOrder() *OrderQuery
- func (oq *OrderQuery) QueryWarehouseStaff() *PersonQuery
- 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) WithCreator(opts ...func(*PersonQuery)) *OrderQuery
- func (oq *OrderQuery) WithCustomer(opts ...func(*PersonQuery)) *OrderQuery
- func (oq *OrderQuery) WithDeliveryStaff(opts ...func(*PersonQuery)) *OrderQuery
- func (oq *OrderQuery) WithManagementStaff(opts ...func(*PersonQuery)) *OrderQuery
- func (oq *OrderQuery) WithOrderStatus(opts ...func(*OrderStatusCodeQuery)) *OrderQuery
- func (oq *OrderQuery) WithParentOrder(opts ...func(*OrderQuery)) *OrderQuery
- func (oq *OrderQuery) WithWarehouseStaff(opts ...func(*PersonQuery)) *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 OrderStatusCode
- type OrderStatusCodeClient
- func (c *OrderStatusCodeClient) Create() *OrderStatusCodeCreate
- func (c *OrderStatusCodeClient) CreateBulk(builders ...*OrderStatusCodeCreate) *OrderStatusCodeCreateBulk
- func (c *OrderStatusCodeClient) Delete() *OrderStatusCodeDelete
- func (c *OrderStatusCodeClient) DeleteOne(osc *OrderStatusCode) *OrderStatusCodeDeleteOne
- func (c *OrderStatusCodeClient) DeleteOneID(id int) *OrderStatusCodeDeleteOne
- func (c *OrderStatusCodeClient) Get(ctx context.Context, id int) (*OrderStatusCode, error)
- func (c *OrderStatusCodeClient) GetX(ctx context.Context, id int) *OrderStatusCode
- func (c *OrderStatusCodeClient) Hooks() []Hook
- func (c *OrderStatusCodeClient) Intercept(interceptors ...Interceptor)
- func (c *OrderStatusCodeClient) Interceptors() []Interceptor
- func (c *OrderStatusCodeClient) MapCreateBulk(slice any, setFunc func(*OrderStatusCodeCreate, int)) *OrderStatusCodeCreateBulk
- func (c *OrderStatusCodeClient) Query() *OrderStatusCodeQuery
- func (c *OrderStatusCodeClient) Update() *OrderStatusCodeUpdate
- func (c *OrderStatusCodeClient) UpdateOne(osc *OrderStatusCode) *OrderStatusCodeUpdateOne
- func (c *OrderStatusCodeClient) UpdateOneID(id int) *OrderStatusCodeUpdateOne
- func (c *OrderStatusCodeClient) Use(hooks ...Hook)
- type OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) Exec(ctx context.Context) error
- func (oscc *OrderStatusCodeCreate) ExecX(ctx context.Context)
- func (oscc *OrderStatusCodeCreate) Mutation() *OrderStatusCodeMutation
- func (oscc *OrderStatusCodeCreate) Save(ctx context.Context) (*OrderStatusCode, error)
- func (oscc *OrderStatusCodeCreate) SaveX(ctx context.Context) *OrderStatusCode
- func (oscc *OrderStatusCodeCreate) SetCreatedAt(t time.Time) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetID(i int) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetOrderStatus(s string) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetUpdatedAt(t time.Time) *OrderStatusCodeCreate
- type OrderStatusCodeCreateBulk
- func (osccb *OrderStatusCodeCreateBulk) Exec(ctx context.Context) error
- func (osccb *OrderStatusCodeCreateBulk) ExecX(ctx context.Context)
- func (osccb *OrderStatusCodeCreateBulk) Save(ctx context.Context) ([]*OrderStatusCode, error)
- func (osccb *OrderStatusCodeCreateBulk) SaveX(ctx context.Context) []*OrderStatusCode
- type OrderStatusCodeDelete
- type OrderStatusCodeDeleteOne
- type OrderStatusCodeGroupBy
- func (oscgb *OrderStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *OrderStatusCodeGroupBy
- func (s *OrderStatusCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderStatusCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderStatusCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderStatusCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderStatusCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderStatusCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderStatusCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderStatusCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderStatusCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderStatusCodeGroupBy) IntX(ctx context.Context) int
- func (s *OrderStatusCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderStatusCodeGroupBy) IntsX(ctx context.Context) []int
- func (oscgb *OrderStatusCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderStatusCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderStatusCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderStatusCodeGroupBy) StringX(ctx context.Context) string
- func (s *OrderStatusCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderStatusCodeGroupBy) StringsX(ctx context.Context) []string
- type OrderStatusCodeMutation
- func (m *OrderStatusCodeMutation) AddField(name string, value ent.Value) error
- func (m *OrderStatusCodeMutation) AddedEdges() []string
- func (m *OrderStatusCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderStatusCodeMutation) AddedFields() []string
- func (m *OrderStatusCodeMutation) AddedIDs(name string) []ent.Value
- func (m *OrderStatusCodeMutation) ClearEdge(name string) error
- func (m *OrderStatusCodeMutation) ClearField(name string) error
- func (m *OrderStatusCodeMutation) ClearedEdges() []string
- func (m *OrderStatusCodeMutation) ClearedFields() []string
- func (m OrderStatusCodeMutation) Client() *Client
- func (m *OrderStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderStatusCodeMutation) EdgeCleared(name string) bool
- func (m *OrderStatusCodeMutation) Field(name string) (ent.Value, bool)
- func (m *OrderStatusCodeMutation) FieldCleared(name string) bool
- func (m *OrderStatusCodeMutation) Fields() []string
- func (m *OrderStatusCodeMutation) ID() (id int, exists bool)
- func (m *OrderStatusCodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OrderStatusCodeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderStatusCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderStatusCodeMutation) OldOrderStatus(ctx context.Context) (v string, err error)
- func (m *OrderStatusCodeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderStatusCodeMutation) Op() Op
- func (m *OrderStatusCodeMutation) OrderStatus() (r string, exists bool)
- func (m *OrderStatusCodeMutation) RemovedEdges() []string
- func (m *OrderStatusCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderStatusCodeMutation) ResetCreatedAt()
- func (m *OrderStatusCodeMutation) ResetEdge(name string) error
- func (m *OrderStatusCodeMutation) ResetField(name string) error
- func (m *OrderStatusCodeMutation) ResetOrderStatus()
- func (m *OrderStatusCodeMutation) ResetUpdatedAt()
- func (m *OrderStatusCodeMutation) SetCreatedAt(t time.Time)
- func (m *OrderStatusCodeMutation) SetField(name string, value ent.Value) error
- func (m *OrderStatusCodeMutation) SetID(id int)
- func (m *OrderStatusCodeMutation) SetOp(op Op)
- func (m *OrderStatusCodeMutation) SetOrderStatus(s string)
- func (m *OrderStatusCodeMutation) SetUpdatedAt(t time.Time)
- func (m OrderStatusCodeMutation) Tx() (*Tx, error)
- func (m *OrderStatusCodeMutation) Type() string
- func (m *OrderStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderStatusCodeMutation) Where(ps ...predicate.OrderStatusCode)
- func (m *OrderStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
- type OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
- func (oscq *OrderStatusCodeQuery) All(ctx context.Context) ([]*OrderStatusCode, error)
- func (oscq *OrderStatusCodeQuery) AllX(ctx context.Context) []*OrderStatusCode
- func (oscq *OrderStatusCodeQuery) Clone() *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Count(ctx context.Context) (int, error)
- func (oscq *OrderStatusCodeQuery) CountX(ctx context.Context) int
- func (oscq *OrderStatusCodeQuery) Exist(ctx context.Context) (bool, error)
- func (oscq *OrderStatusCodeQuery) ExistX(ctx context.Context) bool
- func (oscq *OrderStatusCodeQuery) First(ctx context.Context) (*OrderStatusCode, error)
- func (oscq *OrderStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (oscq *OrderStatusCodeQuery) FirstIDX(ctx context.Context) int
- func (oscq *OrderStatusCodeQuery) FirstX(ctx context.Context) *OrderStatusCode
- func (oscq *OrderStatusCodeQuery) GroupBy(field string, fields ...string) *OrderStatusCodeGroupBy
- func (oscq *OrderStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (oscq *OrderStatusCodeQuery) IDsX(ctx context.Context) []int
- func (oscq *OrderStatusCodeQuery) Limit(limit int) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Offset(offset int) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Only(ctx context.Context) (*OrderStatusCode, error)
- func (oscq *OrderStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (oscq *OrderStatusCodeQuery) OnlyIDX(ctx context.Context) int
- func (oscq *OrderStatusCodeQuery) OnlyX(ctx context.Context) *OrderStatusCode
- func (oscq *OrderStatusCodeQuery) Order(o ...orderstatuscode.OrderOption) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Select(fields ...string) *OrderStatusCodeSelect
- func (oscq *OrderStatusCodeQuery) Unique(unique bool) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeQuery
- type OrderStatusCodeSelect
- func (oscs *OrderStatusCodeSelect) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
- func (s *OrderStatusCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderStatusCodeSelect) BoolX(ctx context.Context) bool
- func (s *OrderStatusCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderStatusCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderStatusCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderStatusCodeSelect) Float64X(ctx context.Context) float64
- func (s *OrderStatusCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderStatusCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderStatusCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderStatusCodeSelect) IntX(ctx context.Context) int
- func (s *OrderStatusCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderStatusCodeSelect) IntsX(ctx context.Context) []int
- func (oscs *OrderStatusCodeSelect) Scan(ctx context.Context, v any) error
- func (s *OrderStatusCodeSelect) ScanX(ctx context.Context, v any)
- func (s *OrderStatusCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderStatusCodeSelect) StringX(ctx context.Context) string
- func (s *OrderStatusCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderStatusCodeSelect) StringsX(ctx context.Context) []string
- type OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) Exec(ctx context.Context) error
- func (oscu *OrderStatusCodeUpdate) ExecX(ctx context.Context)
- func (oscu *OrderStatusCodeUpdate) Mutation() *OrderStatusCodeMutation
- func (oscu *OrderStatusCodeUpdate) Save(ctx context.Context) (int, error)
- func (oscu *OrderStatusCodeUpdate) SaveX(ctx context.Context) int
- func (oscu *OrderStatusCodeUpdate) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) SetOrderStatus(s string) *OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdate
- type OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) Exec(ctx context.Context) error
- func (oscuo *OrderStatusCodeUpdateOne) ExecX(ctx context.Context)
- func (oscuo *OrderStatusCodeUpdateOne) Mutation() *OrderStatusCodeMutation
- func (oscuo *OrderStatusCodeUpdateOne) Save(ctx context.Context) (*OrderStatusCode, error)
- func (oscuo *OrderStatusCodeUpdateOne) SaveX(ctx context.Context) *OrderStatusCode
- func (oscuo *OrderStatusCodeUpdateOne) Select(field string, fields ...string) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) SetOrderStatus(s string) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdateOne
- type OrderStatusCodes
- type OrderUpdate
- func (ou *OrderUpdate) AddPriority(i int) *OrderUpdate
- func (ou *OrderUpdate) ClearDeliveryStaff() *OrderUpdate
- func (ou *OrderUpdate) ClearDeliveryStaffID() *OrderUpdate
- func (ou *OrderUpdate) ClearInternalNote() *OrderUpdate
- func (ou *OrderUpdate) ClearManagementStaff() *OrderUpdate
- func (ou *OrderUpdate) ClearNote() *OrderUpdate
- func (ou *OrderUpdate) ClearOrderStatus() *OrderUpdate
- func (ou *OrderUpdate) ClearParentOrder() *OrderUpdate
- func (ou *OrderUpdate) ClearParentOrderID() *OrderUpdate
- func (ou *OrderUpdate) ClearWarehouseStaff() *OrderUpdate
- func (ou *OrderUpdate) ClearWarehouseStaffID() *OrderUpdate
- func (ou *OrderUpdate) Exec(ctx context.Context) error
- func (ou *OrderUpdate) ExecX(ctx context.Context)
- func (ou *OrderUpdate) Mutation() *OrderMutation
- func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrderUpdate) SaveX(ctx context.Context) int
- func (ou *OrderUpdate) SetDeliveryStaff(p *Person) *OrderUpdate
- func (ou *OrderUpdate) SetDeliveryStaffID(u uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetInternalNote(s string) *OrderUpdate
- func (ou *OrderUpdate) SetManagementStaff(p *Person) *OrderUpdate
- func (ou *OrderUpdate) SetManagementStaffID(u uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetNillableDeliveryStaffID(u *uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetNillableInternalNote(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableManagementStaffID(u *uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetNillableNote(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableParentOrderID(u *uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetNillablePriority(i *int) *OrderUpdate
- func (ou *OrderUpdate) SetNillableStatusCode(i *int) *OrderUpdate
- func (ou *OrderUpdate) SetNillableWarehouseStaffID(u *uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetNote(s string) *OrderUpdate
- func (ou *OrderUpdate) SetOrderStatus(o *OrderStatusCode) *OrderUpdate
- func (ou *OrderUpdate) SetOrderStatusID(id int) *OrderUpdate
- func (ou *OrderUpdate) SetParentOrder(o *Order) *OrderUpdate
- func (ou *OrderUpdate) SetParentOrderID(u uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetPriority(i int) *OrderUpdate
- func (ou *OrderUpdate) SetStatusCode(i int) *OrderUpdate
- func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetWarehouseStaff(p *Person) *OrderUpdate
- func (ou *OrderUpdate) SetWarehouseStaffID(u uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
- type OrderUpdateOne
- func (ouo *OrderUpdateOne) AddPriority(i int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearDeliveryStaff() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearDeliveryStaffID() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearInternalNote() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearManagementStaff() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearNote() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearOrderStatus() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearParentOrder() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearParentOrderID() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearWarehouseStaff() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearWarehouseStaffID() *OrderUpdateOne
- func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrderUpdateOne) Mutation() *OrderMutation
- func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
- func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
- func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetDeliveryStaff(p *Person) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetDeliveryStaffID(u uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetInternalNote(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetManagementStaff(p *Person) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetManagementStaffID(u uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableDeliveryStaffID(u *uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableInternalNote(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableManagementStaffID(u *uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableNote(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableParentOrderID(u *uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillablePriority(i *int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableStatusCode(i *int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableWarehouseStaffID(u *uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNote(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderStatus(o *OrderStatusCode) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderStatusID(id int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetParentOrder(o *Order) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetParentOrderID(u uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetPriority(i int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetStatusCode(i int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetWarehouseStaff(p *Person) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetWarehouseStaffID(u uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
- type Orders
- type Person
- type PersonClient
- func (c *PersonClient) Create() *PersonCreate
- func (c *PersonClient) CreateBulk(builders ...*PersonCreate) *PersonCreateBulk
- func (c *PersonClient) Delete() *PersonDelete
- func (c *PersonClient) DeleteOne(pe *Person) *PersonDeleteOne
- func (c *PersonClient) DeleteOneID(id uuid.UUID) *PersonDeleteOne
- func (c *PersonClient) Get(ctx context.Context, id uuid.UUID) (*Person, error)
- func (c *PersonClient) GetX(ctx context.Context, id uuid.UUID) *Person
- func (c *PersonClient) Hooks() []Hook
- func (c *PersonClient) Intercept(interceptors ...Interceptor)
- func (c *PersonClient) Interceptors() []Interceptor
- func (c *PersonClient) MapCreateBulk(slice any, setFunc func(*PersonCreate, int)) *PersonCreateBulk
- func (c *PersonClient) Query() *PersonQuery
- func (c *PersonClient) Update() *PersonUpdate
- func (c *PersonClient) UpdateOne(pe *Person) *PersonUpdateOne
- func (c *PersonClient) UpdateOneID(id uuid.UUID) *PersonUpdateOne
- func (c *PersonClient) Use(hooks ...Hook)
- type PersonCreate
- func (pc *PersonCreate) Exec(ctx context.Context) error
- func (pc *PersonCreate) ExecX(ctx context.Context)
- func (pc *PersonCreate) Mutation() *PersonMutation
- func (pc *PersonCreate) Save(ctx context.Context) (*Person, error)
- func (pc *PersonCreate) SaveX(ctx context.Context) *Person
- func (pc *PersonCreate) SetAvatarURL(s string) *PersonCreate
- func (pc *PersonCreate) SetCreatedAt(t time.Time) *PersonCreate
- func (pc *PersonCreate) SetEmail(s string) *PersonCreate
- func (pc *PersonCreate) SetID(u uuid.UUID) *PersonCreate
- func (pc *PersonCreate) SetIsEmailVerified(b bool) *PersonCreate
- func (pc *PersonCreate) SetIsPhoneVerified(b bool) *PersonCreate
- func (pc *PersonCreate) SetName(s string) *PersonCreate
- func (pc *PersonCreate) SetNillableAvatarURL(s *string) *PersonCreate
- func (pc *PersonCreate) SetNillableCreatedAt(t *time.Time) *PersonCreate
- func (pc *PersonCreate) SetNillableEmail(s *string) *PersonCreate
- func (pc *PersonCreate) SetNillableID(u *uuid.UUID) *PersonCreate
- func (pc *PersonCreate) SetNillableIsEmailVerified(b *bool) *PersonCreate
- func (pc *PersonCreate) SetNillableIsPhoneVerified(b *bool) *PersonCreate
- func (pc *PersonCreate) SetNillableRole(pe *person.Role) *PersonCreate
- func (pc *PersonCreate) SetNillableUpdatedAt(t *time.Time) *PersonCreate
- func (pc *PersonCreate) SetPasswordHash(b []byte) *PersonCreate
- func (pc *PersonCreate) SetPhone(s string) *PersonCreate
- func (pc *PersonCreate) SetRole(pe person.Role) *PersonCreate
- func (pc *PersonCreate) SetUpdatedAt(t time.Time) *PersonCreate
- type PersonCreateBulk
- type PersonDelete
- type PersonDeleteOne
- type PersonGroupBy
- func (pgb *PersonGroupBy) Aggregate(fns ...AggregateFunc) *PersonGroupBy
- func (s *PersonGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonGroupBy) BoolX(ctx context.Context) bool
- func (s *PersonGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PersonGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonGroupBy) Float64X(ctx context.Context) float64
- func (s *PersonGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PersonGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PersonGroupBy) IntX(ctx context.Context) int
- func (s *PersonGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PersonGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PersonGroupBy) Scan(ctx context.Context, v any) error
- func (s *PersonGroupBy) ScanX(ctx context.Context, v any)
- func (s *PersonGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PersonGroupBy) StringX(ctx context.Context) string
- func (s *PersonGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PersonGroupBy) StringsX(ctx context.Context) []string
- type PersonMutation
- func (m *PersonMutation) AddField(name string, value ent.Value) error
- func (m *PersonMutation) AddedEdges() []string
- func (m *PersonMutation) AddedField(name string) (ent.Value, bool)
- func (m *PersonMutation) AddedFields() []string
- func (m *PersonMutation) AddedIDs(name string) []ent.Value
- func (m *PersonMutation) AvatarURL() (r string, exists bool)
- func (m *PersonMutation) AvatarURLCleared() bool
- func (m *PersonMutation) ClearAvatarURL()
- func (m *PersonMutation) ClearEdge(name string) error
- func (m *PersonMutation) ClearEmail()
- func (m *PersonMutation) ClearField(name string) error
- func (m *PersonMutation) ClearPasswordHash()
- func (m *PersonMutation) ClearedEdges() []string
- func (m *PersonMutation) ClearedFields() []string
- func (m PersonMutation) Client() *Client
- func (m *PersonMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PersonMutation) EdgeCleared(name string) bool
- func (m *PersonMutation) Email() (r string, exists bool)
- func (m *PersonMutation) EmailCleared() bool
- func (m *PersonMutation) Field(name string) (ent.Value, bool)
- func (m *PersonMutation) FieldCleared(name string) bool
- func (m *PersonMutation) Fields() []string
- func (m *PersonMutation) ID() (id uuid.UUID, exists bool)
- func (m *PersonMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PersonMutation) IsEmailVerified() (r bool, exists bool)
- func (m *PersonMutation) IsPhoneVerified() (r bool, exists bool)
- func (m *PersonMutation) Name() (r string, exists bool)
- func (m *PersonMutation) OldAvatarURL(ctx context.Context) (v string, err error)
- func (m *PersonMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PersonMutation) OldEmail(ctx context.Context) (v *string, err error)
- func (m *PersonMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PersonMutation) OldIsEmailVerified(ctx context.Context) (v bool, err error)
- func (m *PersonMutation) OldIsPhoneVerified(ctx context.Context) (v bool, err error)
- func (m *PersonMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PersonMutation) OldPasswordHash(ctx context.Context) (v *[]byte, err error)
- func (m *PersonMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *PersonMutation) OldRole(ctx context.Context) (v person.Role, err error)
- func (m *PersonMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PersonMutation) Op() Op
- func (m *PersonMutation) PasswordHash() (r []byte, exists bool)
- func (m *PersonMutation) PasswordHashCleared() bool
- func (m *PersonMutation) Phone() (r string, exists bool)
- func (m *PersonMutation) RemovedEdges() []string
- func (m *PersonMutation) RemovedIDs(name string) []ent.Value
- func (m *PersonMutation) ResetAvatarURL()
- func (m *PersonMutation) ResetCreatedAt()
- func (m *PersonMutation) ResetEdge(name string) error
- func (m *PersonMutation) ResetEmail()
- func (m *PersonMutation) ResetField(name string) error
- func (m *PersonMutation) ResetIsEmailVerified()
- func (m *PersonMutation) ResetIsPhoneVerified()
- func (m *PersonMutation) ResetName()
- func (m *PersonMutation) ResetPasswordHash()
- func (m *PersonMutation) ResetPhone()
- func (m *PersonMutation) ResetRole()
- func (m *PersonMutation) ResetUpdatedAt()
- func (m *PersonMutation) Role() (r person.Role, exists bool)
- func (m *PersonMutation) SetAvatarURL(s string)
- func (m *PersonMutation) SetCreatedAt(t time.Time)
- func (m *PersonMutation) SetEmail(s string)
- func (m *PersonMutation) SetField(name string, value ent.Value) error
- func (m *PersonMutation) SetID(id uuid.UUID)
- func (m *PersonMutation) SetIsEmailVerified(b bool)
- func (m *PersonMutation) SetIsPhoneVerified(b bool)
- func (m *PersonMutation) SetName(s string)
- func (m *PersonMutation) SetOp(op Op)
- func (m *PersonMutation) SetPasswordHash(b []byte)
- func (m *PersonMutation) SetPhone(s string)
- func (m *PersonMutation) SetRole(pe person.Role)
- func (m *PersonMutation) SetUpdatedAt(t time.Time)
- func (m PersonMutation) Tx() (*Tx, error)
- func (m *PersonMutation) Type() string
- func (m *PersonMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PersonMutation) Where(ps ...predicate.Person)
- func (m *PersonMutation) WhereP(ps ...func(*sql.Selector))
- type PersonQuery
- func (pq *PersonQuery) Aggregate(fns ...AggregateFunc) *PersonSelect
- func (pq *PersonQuery) All(ctx context.Context) ([]*Person, error)
- func (pq *PersonQuery) AllX(ctx context.Context) []*Person
- func (pq *PersonQuery) Clone() *PersonQuery
- func (pq *PersonQuery) Count(ctx context.Context) (int, error)
- func (pq *PersonQuery) CountX(ctx context.Context) int
- func (pq *PersonQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PersonQuery) ExistX(ctx context.Context) bool
- func (pq *PersonQuery) First(ctx context.Context) (*Person, error)
- func (pq *PersonQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PersonQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *PersonQuery) FirstX(ctx context.Context) *Person
- func (pq *PersonQuery) GroupBy(field string, fields ...string) *PersonGroupBy
- func (pq *PersonQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pq *PersonQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *PersonQuery) Limit(limit int) *PersonQuery
- func (pq *PersonQuery) Offset(offset int) *PersonQuery
- func (pq *PersonQuery) Only(ctx context.Context) (*Person, error)
- func (pq *PersonQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PersonQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *PersonQuery) OnlyX(ctx context.Context) *Person
- func (pq *PersonQuery) Order(o ...person.OrderOption) *PersonQuery
- func (pq *PersonQuery) Select(fields ...string) *PersonSelect
- func (pq *PersonQuery) Unique(unique bool) *PersonQuery
- func (pq *PersonQuery) Where(ps ...predicate.Person) *PersonQuery
- type PersonSelect
- func (ps *PersonSelect) Aggregate(fns ...AggregateFunc) *PersonSelect
- func (s *PersonSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonSelect) BoolX(ctx context.Context) bool
- func (s *PersonSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonSelect) BoolsX(ctx context.Context) []bool
- func (s *PersonSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonSelect) Float64X(ctx context.Context) float64
- func (s *PersonSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonSelect) Float64sX(ctx context.Context) []float64
- func (s *PersonSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PersonSelect) IntX(ctx context.Context) int
- func (s *PersonSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PersonSelect) IntsX(ctx context.Context) []int
- func (ps *PersonSelect) Scan(ctx context.Context, v any) error
- func (s *PersonSelect) ScanX(ctx context.Context, v any)
- func (s *PersonSelect) String(ctx context.Context) (_ string, err error)
- func (s *PersonSelect) StringX(ctx context.Context) string
- func (s *PersonSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PersonSelect) StringsX(ctx context.Context) []string
- type PersonUpdate
- func (pu *PersonUpdate) ClearAvatarURL() *PersonUpdate
- func (pu *PersonUpdate) ClearEmail() *PersonUpdate
- func (pu *PersonUpdate) ClearPasswordHash() *PersonUpdate
- func (pu *PersonUpdate) Exec(ctx context.Context) error
- func (pu *PersonUpdate) ExecX(ctx context.Context)
- func (pu *PersonUpdate) Mutation() *PersonMutation
- func (pu *PersonUpdate) Save(ctx context.Context) (int, error)
- func (pu *PersonUpdate) SaveX(ctx context.Context) int
- func (pu *PersonUpdate) SetAvatarURL(s string) *PersonUpdate
- func (pu *PersonUpdate) SetEmail(s string) *PersonUpdate
- func (pu *PersonUpdate) SetIsEmailVerified(b bool) *PersonUpdate
- func (pu *PersonUpdate) SetIsPhoneVerified(b bool) *PersonUpdate
- func (pu *PersonUpdate) SetName(s string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableAvatarURL(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableEmail(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableIsEmailVerified(b *bool) *PersonUpdate
- func (pu *PersonUpdate) SetNillableIsPhoneVerified(b *bool) *PersonUpdate
- func (pu *PersonUpdate) SetNillableName(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillablePhone(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableRole(pe *person.Role) *PersonUpdate
- func (pu *PersonUpdate) SetPasswordHash(b []byte) *PersonUpdate
- func (pu *PersonUpdate) SetPhone(s string) *PersonUpdate
- func (pu *PersonUpdate) SetRole(pe person.Role) *PersonUpdate
- func (pu *PersonUpdate) SetUpdatedAt(t time.Time) *PersonUpdate
- func (pu *PersonUpdate) Where(ps ...predicate.Person) *PersonUpdate
- type PersonUpdateOne
- func (puo *PersonUpdateOne) ClearAvatarURL() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearEmail() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearPasswordHash() *PersonUpdateOne
- func (puo *PersonUpdateOne) Exec(ctx context.Context) error
- func (puo *PersonUpdateOne) ExecX(ctx context.Context)
- func (puo *PersonUpdateOne) Mutation() *PersonMutation
- func (puo *PersonUpdateOne) Save(ctx context.Context) (*Person, error)
- func (puo *PersonUpdateOne) SaveX(ctx context.Context) *Person
- func (puo *PersonUpdateOne) Select(field string, fields ...string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetAvatarURL(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetEmail(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetIsEmailVerified(b bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetIsPhoneVerified(b bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetName(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableAvatarURL(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableEmail(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableIsEmailVerified(b *bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableIsPhoneVerified(b *bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableName(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillablePhone(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableRole(pe *person.Role) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetPasswordHash(b []byte) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetPhone(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetRole(pe person.Role) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetUpdatedAt(t time.Time) *PersonUpdateOne
- func (puo *PersonUpdateOne) Where(ps ...predicate.Person) *PersonUpdateOne
- type Persons
- type Policy
- type Product
- type ProductClient
- func (c *ProductClient) Create() *ProductCreate
- func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk
- func (c *ProductClient) Delete() *ProductDelete
- func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne
- func (c *ProductClient) DeleteOneID(id string) *ProductDeleteOne
- func (c *ProductClient) Get(ctx context.Context, id string) (*Product, error)
- func (c *ProductClient) GetX(ctx context.Context, id string) *Product
- func (c *ProductClient) Hooks() []Hook
- func (c *ProductClient) Intercept(interceptors ...Interceptor)
- func (c *ProductClient) Interceptors() []Interceptor
- func (c *ProductClient) MapCreateBulk(slice any, setFunc func(*ProductCreate, int)) *ProductCreateBulk
- func (c *ProductClient) Query() *ProductQuery
- func (c *ProductClient) QueryProductTags(pr *Product) *ProductTagQuery
- func (c *ProductClient) QueryTags(pr *Product) *TagQuery
- func (c *ProductClient) Update() *ProductUpdate
- func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne
- func (c *ProductClient) UpdateOneID(id string) *ProductUpdateOne
- func (c *ProductClient) Use(hooks ...Hook)
- type ProductCreate
- func (pc *ProductCreate) AddTagIDs(ids ...string) *ProductCreate
- func (pc *ProductCreate) AddTags(t ...*Tag) *ProductCreate
- func (pc *ProductCreate) Exec(ctx context.Context) error
- func (pc *ProductCreate) ExecX(ctx context.Context)
- func (pc *ProductCreate) Mutation() *ProductMutation
- func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)
- func (pc *ProductCreate) SaveX(ctx context.Context) *Product
- func (pc *ProductCreate) SetColors(s []string) *ProductCreate
- func (pc *ProductCreate) SetCreatedAt(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetDescription(s string) *ProductCreate
- func (pc *ProductCreate) SetID(s string) *ProductCreate
- func (pc *ProductCreate) SetName(s string) *ProductCreate
- func (pc *ProductCreate) SetNillableCreatedAt(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableDescription(s *string) *ProductCreate
- func (pc *ProductCreate) SetNillableProvider(s *string) *ProductCreate
- func (pc *ProductCreate) SetNillableUpdatedAt(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableYear(i *int) *ProductCreate
- func (pc *ProductCreate) SetPrice(d decimal.Decimal) *ProductCreate
- func (pc *ProductCreate) SetProvider(s string) *ProductCreate
- func (pc *ProductCreate) SetQty(d decimal.Decimal) *ProductCreate
- func (pc *ProductCreate) SetUpdatedAt(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetYear(i int) *ProductCreate
- type ProductCreateBulk
- type ProductDelete
- type ProductDeleteOne
- type ProductEdges
- type ProductGroupBy
- func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy
- func (s *ProductGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductGroupBy) IntX(ctx context.Context) int
- func (s *ProductGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProductGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductGroupBy) StringX(ctx context.Context) string
- func (s *ProductGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductGroupBy) StringsX(ctx context.Context) []string
- type ProductImage
- type ProductImageClient
- func (c *ProductImageClient) Create() *ProductImageCreate
- func (c *ProductImageClient) CreateBulk(builders ...*ProductImageCreate) *ProductImageCreateBulk
- func (c *ProductImageClient) Delete() *ProductImageDelete
- func (c *ProductImageClient) DeleteOne(pi *ProductImage) *ProductImageDeleteOne
- func (c *ProductImageClient) DeleteOneID(id uuid.UUID) *ProductImageDeleteOne
- func (c *ProductImageClient) Get(ctx context.Context, id uuid.UUID) (*ProductImage, error)
- func (c *ProductImageClient) GetX(ctx context.Context, id uuid.UUID) *ProductImage
- func (c *ProductImageClient) Hooks() []Hook
- func (c *ProductImageClient) Intercept(interceptors ...Interceptor)
- func (c *ProductImageClient) Interceptors() []Interceptor
- func (c *ProductImageClient) MapCreateBulk(slice any, setFunc func(*ProductImageCreate, int)) *ProductImageCreateBulk
- func (c *ProductImageClient) Query() *ProductImageQuery
- func (c *ProductImageClient) QueryProduct(pi *ProductImage) *ProductQuery
- func (c *ProductImageClient) Update() *ProductImageUpdate
- func (c *ProductImageClient) UpdateOne(pi *ProductImage) *ProductImageUpdateOne
- func (c *ProductImageClient) UpdateOneID(id uuid.UUID) *ProductImageUpdateOne
- func (c *ProductImageClient) Use(hooks ...Hook)
- type ProductImageCreate
- func (pic *ProductImageCreate) Exec(ctx context.Context) error
- func (pic *ProductImageCreate) ExecX(ctx context.Context)
- func (pic *ProductImageCreate) Mutation() *ProductImageMutation
- func (pic *ProductImageCreate) Save(ctx context.Context) (*ProductImage, error)
- func (pic *ProductImageCreate) SaveX(ctx context.Context) *ProductImage
- func (pic *ProductImageCreate) SetCreatedAt(t time.Time) *ProductImageCreate
- func (pic *ProductImageCreate) SetID(u uuid.UUID) *ProductImageCreate
- func (pic *ProductImageCreate) SetImageURL(s string) *ProductImageCreate
- func (pic *ProductImageCreate) SetNillableCreatedAt(t *time.Time) *ProductImageCreate
- func (pic *ProductImageCreate) SetNillableID(u *uuid.UUID) *ProductImageCreate
- func (pic *ProductImageCreate) SetNillableUpdatedAt(t *time.Time) *ProductImageCreate
- func (pic *ProductImageCreate) SetProduct(p *Product) *ProductImageCreate
- func (pic *ProductImageCreate) SetProductID(s string) *ProductImageCreate
- func (pic *ProductImageCreate) SetUpdatedAt(t time.Time) *ProductImageCreate
- type ProductImageCreateBulk
- type ProductImageDelete
- type ProductImageDeleteOne
- type ProductImageEdges
- type ProductImageGroupBy
- func (pigb *ProductImageGroupBy) Aggregate(fns ...AggregateFunc) *ProductImageGroupBy
- func (s *ProductImageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductImageGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductImageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductImageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductImageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductImageGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductImageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductImageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductImageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductImageGroupBy) IntX(ctx context.Context) int
- func (s *ProductImageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductImageGroupBy) IntsX(ctx context.Context) []int
- func (pigb *ProductImageGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductImageGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductImageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductImageGroupBy) StringX(ctx context.Context) string
- func (s *ProductImageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductImageGroupBy) StringsX(ctx context.Context) []string
- type ProductImageMutation
- func (m *ProductImageMutation) AddField(name string, value ent.Value) error
- func (m *ProductImageMutation) AddedEdges() []string
- func (m *ProductImageMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductImageMutation) AddedFields() []string
- func (m *ProductImageMutation) AddedIDs(name string) []ent.Value
- func (m *ProductImageMutation) ClearEdge(name string) error
- func (m *ProductImageMutation) ClearField(name string) error
- func (m *ProductImageMutation) ClearProduct()
- func (m *ProductImageMutation) ClearedEdges() []string
- func (m *ProductImageMutation) ClearedFields() []string
- func (m ProductImageMutation) Client() *Client
- func (m *ProductImageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductImageMutation) EdgeCleared(name string) bool
- func (m *ProductImageMutation) Field(name string) (ent.Value, bool)
- func (m *ProductImageMutation) FieldCleared(name string) bool
- func (m *ProductImageMutation) Fields() []string
- func (m *ProductImageMutation) ID() (id uuid.UUID, exists bool)
- func (m *ProductImageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ProductImageMutation) ImageURL() (r string, exists bool)
- func (m *ProductImageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductImageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductImageMutation) OldImageURL(ctx context.Context) (v string, err error)
- func (m *ProductImageMutation) OldProductID(ctx context.Context) (v string, err error)
- func (m *ProductImageMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductImageMutation) Op() Op
- func (m *ProductImageMutation) ProductCleared() bool
- func (m *ProductImageMutation) ProductID() (r string, exists bool)
- func (m *ProductImageMutation) ProductIDs() (ids []string)
- func (m *ProductImageMutation) RemovedEdges() []string
- func (m *ProductImageMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductImageMutation) ResetCreatedAt()
- func (m *ProductImageMutation) ResetEdge(name string) error
- func (m *ProductImageMutation) ResetField(name string) error
- func (m *ProductImageMutation) ResetImageURL()
- func (m *ProductImageMutation) ResetProduct()
- func (m *ProductImageMutation) ResetProductID()
- func (m *ProductImageMutation) ResetUpdatedAt()
- func (m *ProductImageMutation) SetCreatedAt(t time.Time)
- func (m *ProductImageMutation) SetField(name string, value ent.Value) error
- func (m *ProductImageMutation) SetID(id uuid.UUID)
- func (m *ProductImageMutation) SetImageURL(s string)
- func (m *ProductImageMutation) SetOp(op Op)
- func (m *ProductImageMutation) SetProductID(s string)
- func (m *ProductImageMutation) SetUpdatedAt(t time.Time)
- func (m ProductImageMutation) Tx() (*Tx, error)
- func (m *ProductImageMutation) Type() string
- func (m *ProductImageMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductImageMutation) Where(ps ...predicate.ProductImage)
- func (m *ProductImageMutation) WhereP(ps ...func(*sql.Selector))
- type ProductImageQuery
- func (piq *ProductImageQuery) Aggregate(fns ...AggregateFunc) *ProductImageSelect
- func (piq *ProductImageQuery) All(ctx context.Context) ([]*ProductImage, error)
- func (piq *ProductImageQuery) AllX(ctx context.Context) []*ProductImage
- func (piq *ProductImageQuery) Clone() *ProductImageQuery
- func (piq *ProductImageQuery) Count(ctx context.Context) (int, error)
- func (piq *ProductImageQuery) CountX(ctx context.Context) int
- func (piq *ProductImageQuery) Exist(ctx context.Context) (bool, error)
- func (piq *ProductImageQuery) ExistX(ctx context.Context) bool
- func (piq *ProductImageQuery) First(ctx context.Context) (*ProductImage, error)
- func (piq *ProductImageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (piq *ProductImageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (piq *ProductImageQuery) FirstX(ctx context.Context) *ProductImage
- func (piq *ProductImageQuery) GroupBy(field string, fields ...string) *ProductImageGroupBy
- func (piq *ProductImageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (piq *ProductImageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (piq *ProductImageQuery) Limit(limit int) *ProductImageQuery
- func (piq *ProductImageQuery) Offset(offset int) *ProductImageQuery
- func (piq *ProductImageQuery) Only(ctx context.Context) (*ProductImage, error)
- func (piq *ProductImageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (piq *ProductImageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (piq *ProductImageQuery) OnlyX(ctx context.Context) *ProductImage
- func (piq *ProductImageQuery) Order(o ...productimage.OrderOption) *ProductImageQuery
- func (piq *ProductImageQuery) QueryProduct() *ProductQuery
- func (piq *ProductImageQuery) Select(fields ...string) *ProductImageSelect
- func (piq *ProductImageQuery) Unique(unique bool) *ProductImageQuery
- func (piq *ProductImageQuery) Where(ps ...predicate.ProductImage) *ProductImageQuery
- func (piq *ProductImageQuery) WithProduct(opts ...func(*ProductQuery)) *ProductImageQuery
- type ProductImageSelect
- func (pis *ProductImageSelect) Aggregate(fns ...AggregateFunc) *ProductImageSelect
- func (s *ProductImageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductImageSelect) BoolX(ctx context.Context) bool
- func (s *ProductImageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductImageSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductImageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductImageSelect) Float64X(ctx context.Context) float64
- func (s *ProductImageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductImageSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductImageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductImageSelect) IntX(ctx context.Context) int
- func (s *ProductImageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductImageSelect) IntsX(ctx context.Context) []int
- func (pis *ProductImageSelect) Scan(ctx context.Context, v any) error
- func (s *ProductImageSelect) ScanX(ctx context.Context, v any)
- func (s *ProductImageSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductImageSelect) StringX(ctx context.Context) string
- func (s *ProductImageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductImageSelect) StringsX(ctx context.Context) []string
- type ProductImageUpdate
- func (piu *ProductImageUpdate) Exec(ctx context.Context) error
- func (piu *ProductImageUpdate) ExecX(ctx context.Context)
- func (piu *ProductImageUpdate) Mutation() *ProductImageMutation
- func (piu *ProductImageUpdate) Save(ctx context.Context) (int, error)
- func (piu *ProductImageUpdate) SaveX(ctx context.Context) int
- func (piu *ProductImageUpdate) SetUpdatedAt(t time.Time) *ProductImageUpdate
- func (piu *ProductImageUpdate) Where(ps ...predicate.ProductImage) *ProductImageUpdate
- type ProductImageUpdateOne
- func (piuo *ProductImageUpdateOne) Exec(ctx context.Context) error
- func (piuo *ProductImageUpdateOne) ExecX(ctx context.Context)
- func (piuo *ProductImageUpdateOne) Mutation() *ProductImageMutation
- func (piuo *ProductImageUpdateOne) Save(ctx context.Context) (*ProductImage, error)
- func (piuo *ProductImageUpdateOne) SaveX(ctx context.Context) *ProductImage
- func (piuo *ProductImageUpdateOne) Select(field string, fields ...string) *ProductImageUpdateOne
- func (piuo *ProductImageUpdateOne) SetUpdatedAt(t time.Time) *ProductImageUpdateOne
- func (piuo *ProductImageUpdateOne) Where(ps ...predicate.ProductImage) *ProductImageUpdateOne
- type ProductImages
- type ProductMutation
- func (m *ProductMutation) AddField(name string, value ent.Value) error
- func (m *ProductMutation) AddPrice(d decimal.Decimal)
- func (m *ProductMutation) AddQty(d decimal.Decimal)
- func (m *ProductMutation) AddTagIDs(ids ...string)
- func (m *ProductMutation) AddYear(i int)
- func (m *ProductMutation) AddedEdges() []string
- func (m *ProductMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductMutation) AddedFields() []string
- func (m *ProductMutation) AddedIDs(name string) []ent.Value
- func (m *ProductMutation) AddedPrice() (r decimal.Decimal, exists bool)
- func (m *ProductMutation) AddedQty() (r decimal.Decimal, exists bool)
- func (m *ProductMutation) AddedYear() (r int, exists bool)
- func (m *ProductMutation) AppendColors(s []string)
- func (m *ProductMutation) AppendedColors() ([]string, bool)
- func (m *ProductMutation) ClearColors()
- func (m *ProductMutation) ClearDescription()
- func (m *ProductMutation) ClearEdge(name string) error
- func (m *ProductMutation) ClearField(name string) error
- func (m *ProductMutation) ClearProvider()
- func (m *ProductMutation) ClearTags()
- func (m *ProductMutation) ClearYear()
- func (m *ProductMutation) ClearedEdges() []string
- func (m *ProductMutation) ClearedFields() []string
- func (m ProductMutation) Client() *Client
- func (m *ProductMutation) Colors() (r []string, exists bool)
- func (m *ProductMutation) ColorsCleared() bool
- func (m *ProductMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductMutation) Description() (r string, exists bool)
- func (m *ProductMutation) DescriptionCleared() bool
- func (m *ProductMutation) EdgeCleared(name string) bool
- func (m *ProductMutation) Field(name string) (ent.Value, bool)
- func (m *ProductMutation) FieldCleared(name string) bool
- func (m *ProductMutation) Fields() []string
- func (m *ProductMutation) ID() (id string, exists bool)
- func (m *ProductMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ProductMutation) Name() (r string, exists bool)
- func (m *ProductMutation) OldColors(ctx context.Context) (v []string, err error)
- func (m *ProductMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *ProductMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldPrice(ctx context.Context) (v decimal.Decimal, err error)
- func (m *ProductMutation) OldProvider(ctx context.Context) (v *string, err error)
- func (m *ProductMutation) OldQty(ctx context.Context) (v decimal.Decimal, err error)
- func (m *ProductMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) OldYear(ctx context.Context) (v *int, err error)
- func (m *ProductMutation) Op() Op
- func (m *ProductMutation) Price() (r decimal.Decimal, exists bool)
- func (m *ProductMutation) Provider() (r string, exists bool)
- func (m *ProductMutation) ProviderCleared() bool
- func (m *ProductMutation) Qty() (r decimal.Decimal, exists bool)
- func (m *ProductMutation) RemoveTagIDs(ids ...string)
- func (m *ProductMutation) RemovedEdges() []string
- func (m *ProductMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductMutation) RemovedTagsIDs() (ids []string)
- func (m *ProductMutation) ResetColors()
- func (m *ProductMutation) ResetCreatedAt()
- func (m *ProductMutation) ResetDescription()
- func (m *ProductMutation) ResetEdge(name string) error
- func (m *ProductMutation) ResetField(name string) error
- func (m *ProductMutation) ResetName()
- func (m *ProductMutation) ResetPrice()
- func (m *ProductMutation) ResetProvider()
- func (m *ProductMutation) ResetQty()
- func (m *ProductMutation) ResetTags()
- func (m *ProductMutation) ResetUpdatedAt()
- func (m *ProductMutation) ResetYear()
- func (m *ProductMutation) SetColors(s []string)
- func (m *ProductMutation) SetCreatedAt(t time.Time)
- func (m *ProductMutation) SetDescription(s string)
- func (m *ProductMutation) SetField(name string, value ent.Value) error
- func (m *ProductMutation) SetID(id string)
- func (m *ProductMutation) SetName(s string)
- func (m *ProductMutation) SetOp(op Op)
- func (m *ProductMutation) SetPrice(d decimal.Decimal)
- func (m *ProductMutation) SetProvider(s string)
- func (m *ProductMutation) SetQty(d decimal.Decimal)
- func (m *ProductMutation) SetUpdatedAt(t time.Time)
- func (m *ProductMutation) SetYear(i int)
- func (m *ProductMutation) TagsCleared() bool
- func (m *ProductMutation) TagsIDs() (ids []string)
- func (m ProductMutation) Tx() (*Tx, error)
- func (m *ProductMutation) Type() string
- func (m *ProductMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductMutation) Where(ps ...predicate.Product)
- func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))
- func (m *ProductMutation) Year() (r int, exists bool)
- func (m *ProductMutation) YearCleared() bool
- type ProductQuery
- func (pq *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect
- func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)
- func (pq *ProductQuery) AllX(ctx context.Context) []*Product
- func (pq *ProductQuery) Clone() *ProductQuery
- func (pq *ProductQuery) Count(ctx context.Context) (int, error)
- func (pq *ProductQuery) CountX(ctx context.Context) int
- func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProductQuery) ExistX(ctx context.Context) bool
- func (pq *ProductQuery) First(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) FirstID(ctx context.Context) (id string, err error)
- func (pq *ProductQuery) FirstIDX(ctx context.Context) string
- func (pq *ProductQuery) FirstX(ctx context.Context) *Product
- func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy
- func (pq *ProductQuery) IDs(ctx context.Context) (ids []string, err error)
- func (pq *ProductQuery) IDsX(ctx context.Context) []string
- func (pq *ProductQuery) Limit(limit int) *ProductQuery
- func (pq *ProductQuery) Offset(offset int) *ProductQuery
- func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) OnlyID(ctx context.Context) (id string, err error)
- func (pq *ProductQuery) OnlyIDX(ctx context.Context) string
- func (pq *ProductQuery) OnlyX(ctx context.Context) *Product
- func (pq *ProductQuery) Order(o ...product.OrderOption) *ProductQuery
- func (pq *ProductQuery) QueryProductTags() *ProductTagQuery
- func (pq *ProductQuery) QueryTags() *TagQuery
- func (pq *ProductQuery) Select(fields ...string) *ProductSelect
- func (pq *ProductQuery) Unique(unique bool) *ProductQuery
- func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery
- func (pq *ProductQuery) WithProductTags(opts ...func(*ProductTagQuery)) *ProductQuery
- func (pq *ProductQuery) WithTags(opts ...func(*TagQuery)) *ProductQuery
- type ProductSelect
- func (ps *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect
- func (s *ProductSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductSelect) BoolX(ctx context.Context) bool
- func (s *ProductSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductSelect) Float64X(ctx context.Context) float64
- func (s *ProductSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductSelect) IntX(ctx context.Context) int
- func (s *ProductSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductSelect) IntsX(ctx context.Context) []int
- func (ps *ProductSelect) Scan(ctx context.Context, v any) error
- func (s *ProductSelect) ScanX(ctx context.Context, v any)
- func (s *ProductSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductSelect) StringX(ctx context.Context) string
- func (s *ProductSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductSelect) StringsX(ctx context.Context) []string
- type ProductTag
- type ProductTagClient
- func (c *ProductTagClient) Create() *ProductTagCreate
- func (c *ProductTagClient) CreateBulk(builders ...*ProductTagCreate) *ProductTagCreateBulk
- func (c *ProductTagClient) Delete() *ProductTagDelete
- func (c *ProductTagClient) Hooks() []Hook
- func (c *ProductTagClient) Intercept(interceptors ...Interceptor)
- func (c *ProductTagClient) Interceptors() []Interceptor
- func (c *ProductTagClient) MapCreateBulk(slice any, setFunc func(*ProductTagCreate, int)) *ProductTagCreateBulk
- func (c *ProductTagClient) Query() *ProductTagQuery
- func (c *ProductTagClient) QueryProducts(pt *ProductTag) *ProductQuery
- func (c *ProductTagClient) QueryTags(pt *ProductTag) *TagQuery
- func (c *ProductTagClient) Update() *ProductTagUpdate
- func (c *ProductTagClient) UpdateOne(pt *ProductTag) *ProductTagUpdateOne
- func (c *ProductTagClient) Use(hooks ...Hook)
- type ProductTagCreate
- func (ptc *ProductTagCreate) Exec(ctx context.Context) error
- func (ptc *ProductTagCreate) ExecX(ctx context.Context)
- func (ptc *ProductTagCreate) Mutation() *ProductTagMutation
- func (ptc *ProductTagCreate) Save(ctx context.Context) (*ProductTag, error)
- func (ptc *ProductTagCreate) SaveX(ctx context.Context) *ProductTag
- func (ptc *ProductTagCreate) SetProductID(s string) *ProductTagCreate
- func (ptc *ProductTagCreate) SetProducts(p *Product) *ProductTagCreate
- func (ptc *ProductTagCreate) SetProductsID(id string) *ProductTagCreate
- func (ptc *ProductTagCreate) SetTagID(s string) *ProductTagCreate
- func (ptc *ProductTagCreate) SetTags(t *Tag) *ProductTagCreate
- func (ptc *ProductTagCreate) SetTagsID(id string) *ProductTagCreate
- type ProductTagCreateBulk
- type ProductTagDelete
- type ProductTagDeleteOne
- type ProductTagEdges
- type ProductTagGroupBy
- func (ptgb *ProductTagGroupBy) Aggregate(fns ...AggregateFunc) *ProductTagGroupBy
- func (s *ProductTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductTagGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductTagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductTagGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductTagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductTagGroupBy) IntX(ctx context.Context) int
- func (s *ProductTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductTagGroupBy) IntsX(ctx context.Context) []int
- func (ptgb *ProductTagGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductTagGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductTagGroupBy) StringX(ctx context.Context) string
- func (s *ProductTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductTagGroupBy) StringsX(ctx context.Context) []string
- type ProductTagMutation
- func (m *ProductTagMutation) AddField(name string, value ent.Value) error
- func (m *ProductTagMutation) AddedEdges() []string
- func (m *ProductTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductTagMutation) AddedFields() []string
- func (m *ProductTagMutation) AddedIDs(name string) []ent.Value
- func (m *ProductTagMutation) ClearEdge(name string) error
- func (m *ProductTagMutation) ClearField(name string) error
- func (m *ProductTagMutation) ClearProducts()
- func (m *ProductTagMutation) ClearTags()
- func (m *ProductTagMutation) ClearedEdges() []string
- func (m *ProductTagMutation) ClearedFields() []string
- func (m ProductTagMutation) Client() *Client
- func (m *ProductTagMutation) EdgeCleared(name string) bool
- func (m *ProductTagMutation) Field(name string) (ent.Value, bool)
- func (m *ProductTagMutation) FieldCleared(name string) bool
- func (m *ProductTagMutation) Fields() []string
- func (m *ProductTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductTagMutation) Op() Op
- func (m *ProductTagMutation) ProductID() (r string, exists bool)
- func (m *ProductTagMutation) ProductsCleared() bool
- func (m *ProductTagMutation) ProductsID() (id string, exists bool)
- func (m *ProductTagMutation) ProductsIDs() (ids []string)
- func (m *ProductTagMutation) RemovedEdges() []string
- func (m *ProductTagMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductTagMutation) ResetEdge(name string) error
- func (m *ProductTagMutation) ResetField(name string) error
- func (m *ProductTagMutation) ResetProductID()
- func (m *ProductTagMutation) ResetProducts()
- func (m *ProductTagMutation) ResetTagID()
- func (m *ProductTagMutation) ResetTags()
- func (m *ProductTagMutation) SetField(name string, value ent.Value) error
- func (m *ProductTagMutation) SetOp(op Op)
- func (m *ProductTagMutation) SetProductID(s string)
- func (m *ProductTagMutation) SetProductsID(id string)
- func (m *ProductTagMutation) SetTagID(s string)
- func (m *ProductTagMutation) SetTagsID(id string)
- func (m *ProductTagMutation) TagID() (r string, exists bool)
- func (m *ProductTagMutation) TagsCleared() bool
- func (m *ProductTagMutation) TagsID() (id string, exists bool)
- func (m *ProductTagMutation) TagsIDs() (ids []string)
- func (m ProductTagMutation) Tx() (*Tx, error)
- func (m *ProductTagMutation) Type() string
- func (m *ProductTagMutation) Where(ps ...predicate.ProductTag)
- func (m *ProductTagMutation) WhereP(ps ...func(*sql.Selector))
- type ProductTagQuery
- func (ptq *ProductTagQuery) Aggregate(fns ...AggregateFunc) *ProductTagSelect
- func (ptq *ProductTagQuery) All(ctx context.Context) ([]*ProductTag, error)
- func (ptq *ProductTagQuery) AllX(ctx context.Context) []*ProductTag
- func (ptq *ProductTagQuery) Clone() *ProductTagQuery
- func (ptq *ProductTagQuery) Count(ctx context.Context) (int, error)
- func (ptq *ProductTagQuery) CountX(ctx context.Context) int
- func (ptq *ProductTagQuery) Exist(ctx context.Context) (bool, error)
- func (ptq *ProductTagQuery) ExistX(ctx context.Context) bool
- func (ptq *ProductTagQuery) First(ctx context.Context) (*ProductTag, error)
- func (ptq *ProductTagQuery) FirstX(ctx context.Context) *ProductTag
- func (ptq *ProductTagQuery) GroupBy(field string, fields ...string) *ProductTagGroupBy
- func (ptq *ProductTagQuery) Limit(limit int) *ProductTagQuery
- func (ptq *ProductTagQuery) Offset(offset int) *ProductTagQuery
- func (ptq *ProductTagQuery) Only(ctx context.Context) (*ProductTag, error)
- func (ptq *ProductTagQuery) OnlyX(ctx context.Context) *ProductTag
- func (ptq *ProductTagQuery) Order(o ...producttag.OrderOption) *ProductTagQuery
- func (ptq *ProductTagQuery) QueryProducts() *ProductQuery
- func (ptq *ProductTagQuery) QueryTags() *TagQuery
- func (ptq *ProductTagQuery) Select(fields ...string) *ProductTagSelect
- func (ptq *ProductTagQuery) Unique(unique bool) *ProductTagQuery
- func (ptq *ProductTagQuery) Where(ps ...predicate.ProductTag) *ProductTagQuery
- func (ptq *ProductTagQuery) WithProducts(opts ...func(*ProductQuery)) *ProductTagQuery
- func (ptq *ProductTagQuery) WithTags(opts ...func(*TagQuery)) *ProductTagQuery
- type ProductTagSelect
- func (pts *ProductTagSelect) Aggregate(fns ...AggregateFunc) *ProductTagSelect
- func (s *ProductTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductTagSelect) BoolX(ctx context.Context) bool
- func (s *ProductTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductTagSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductTagSelect) Float64X(ctx context.Context) float64
- func (s *ProductTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductTagSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductTagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductTagSelect) IntX(ctx context.Context) int
- func (s *ProductTagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductTagSelect) IntsX(ctx context.Context) []int
- func (pts *ProductTagSelect) Scan(ctx context.Context, v any) error
- func (s *ProductTagSelect) ScanX(ctx context.Context, v any)
- func (s *ProductTagSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductTagSelect) StringX(ctx context.Context) string
- func (s *ProductTagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductTagSelect) StringsX(ctx context.Context) []string
- type ProductTagUpdate
- func (ptu *ProductTagUpdate) Exec(ctx context.Context) error
- func (ptu *ProductTagUpdate) ExecX(ctx context.Context)
- func (ptu *ProductTagUpdate) Mutation() *ProductTagMutation
- func (ptu *ProductTagUpdate) Save(ctx context.Context) (int, error)
- func (ptu *ProductTagUpdate) SaveX(ctx context.Context) int
- func (ptu *ProductTagUpdate) Where(ps ...predicate.ProductTag) *ProductTagUpdate
- type ProductTagUpdateOne
- func (ptuo *ProductTagUpdateOne) Exec(ctx context.Context) error
- func (ptuo *ProductTagUpdateOne) ExecX(ctx context.Context)
- func (ptuo *ProductTagUpdateOne) Mutation() *ProductTagMutation
- func (ptuo *ProductTagUpdateOne) Save(ctx context.Context) (*ProductTag, error)
- func (ptuo *ProductTagUpdateOne) SaveX(ctx context.Context) *ProductTag
- func (ptuo *ProductTagUpdateOne) Select(field string, fields ...string) *ProductTagUpdateOne
- func (ptuo *ProductTagUpdateOne) Where(ps ...predicate.ProductTag) *ProductTagUpdateOne
- type ProductTags
- type ProductUpdate
- func (pu *ProductUpdate) AddPrice(d decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) AddQty(d decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) AddTagIDs(ids ...string) *ProductUpdate
- func (pu *ProductUpdate) AddTags(t ...*Tag) *ProductUpdate
- func (pu *ProductUpdate) AddYear(i int) *ProductUpdate
- func (pu *ProductUpdate) AppendColors(s []string) *ProductUpdate
- func (pu *ProductUpdate) ClearColors() *ProductUpdate
- func (pu *ProductUpdate) ClearDescription() *ProductUpdate
- func (pu *ProductUpdate) ClearProvider() *ProductUpdate
- func (pu *ProductUpdate) ClearTags() *ProductUpdate
- func (pu *ProductUpdate) ClearYear() *ProductUpdate
- func (pu *ProductUpdate) Exec(ctx context.Context) error
- func (pu *ProductUpdate) ExecX(ctx context.Context)
- func (pu *ProductUpdate) Mutation() *ProductMutation
- func (pu *ProductUpdate) RemoveTagIDs(ids ...string) *ProductUpdate
- func (pu *ProductUpdate) RemoveTags(t ...*Tag) *ProductUpdate
- func (pu *ProductUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProductUpdate) SaveX(ctx context.Context) int
- func (pu *ProductUpdate) SetColors(s []string) *ProductUpdate
- func (pu *ProductUpdate) SetDescription(s string) *ProductUpdate
- func (pu *ProductUpdate) SetName(s string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableDescription(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableName(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillablePrice(d *decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) SetNillableProvider(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableQty(d *decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) SetNillableYear(i *int) *ProductUpdate
- func (pu *ProductUpdate) SetPrice(d decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) SetProvider(s string) *ProductUpdate
- func (pu *ProductUpdate) SetQty(d decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) SetUpdatedAt(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetYear(i int) *ProductUpdate
- func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate
- type ProductUpdateOne
- func (puo *ProductUpdateOne) AddPrice(d decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddQty(d decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddTagIDs(ids ...string) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddTags(t ...*Tag) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddYear(i int) *ProductUpdateOne
- func (puo *ProductUpdateOne) AppendColors(s []string) *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearColors() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearDescription() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearProvider() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearTags() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearYear() *ProductUpdateOne
- func (puo *ProductUpdateOne) Exec(ctx context.Context) error
- func (puo *ProductUpdateOne) ExecX(ctx context.Context)
- func (puo *ProductUpdateOne) Mutation() *ProductMutation
- func (puo *ProductUpdateOne) RemoveTagIDs(ids ...string) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveTags(t ...*Tag) *ProductUpdateOne
- func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)
- func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product
- func (puo *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetColors(s []string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetDescription(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableDescription(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableName(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillablePrice(d *decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableProvider(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableQty(d *decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableYear(i *int) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetPrice(d decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetProvider(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetQty(d decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetUpdatedAt(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetYear(i int) *ProductUpdateOne
- func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
- type Products
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tag
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id string) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id string) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id string) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryProductTags(t *Tag) *ProductTagQuery
- func (c *TagClient) QueryProducts(t *Tag) *ProductQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id string) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddProductIDs(ids ...string) *TagCreate
- func (tc *TagCreate) AddProducts(p ...*Product) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetCreatedAt(t time.Time) *TagCreate
- func (tc *TagCreate) SetID(s string) *TagCreate
- func (tc *TagCreate) SetNillableCreatedAt(t *time.Time) *TagCreate
- func (tc *TagCreate) SetNillableUpdatedAt(t *time.Time) *TagCreate
- func (tc *TagCreate) SetTitle(s string) *TagCreate
- func (tc *TagCreate) SetUpdatedAt(t time.Time) *TagCreate
- type TagCreateBulk
- type TagDelete
- type TagDeleteOne
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddProductIDs(ids ...string)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearProducts()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) ID() (id string, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]string, error)
- func (m *TagMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) ProductsCleared() bool
- func (m *TagMutation) ProductsIDs() (ids []string)
- func (m *TagMutation) RemoveProductIDs(ids ...string)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedProductsIDs() (ids []string)
- func (m *TagMutation) ResetCreatedAt()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetProducts()
- func (m *TagMutation) ResetTitle()
- func (m *TagMutation) ResetUpdatedAt()
- func (m *TagMutation) SetCreatedAt(t time.Time)
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetID(id string)
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetTitle(s string)
- func (m *TagMutation) SetUpdatedAt(t time.Time)
- func (m *TagMutation) Title() (r string, exists bool)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id string, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) string
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []string, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []string
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id string, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) string
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (tq *TagQuery) QueryProductTags() *ProductTagQuery
- func (tq *TagQuery) QueryProducts() *ProductQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithProductTags(opts ...func(*ProductTagQuery)) *TagQuery
- func (tq *TagQuery) WithProducts(opts ...func(*ProductQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddProductIDs(ids ...string) *TagUpdate
- func (tu *TagUpdate) AddProducts(p ...*Product) *TagUpdate
- func (tu *TagUpdate) ClearProducts() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveProductIDs(ids ...string) *TagUpdate
- func (tu *TagUpdate) RemoveProducts(p ...*Product) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetNillableTitle(s *string) *TagUpdate
- func (tu *TagUpdate) SetTitle(s string) *TagUpdate
- func (tu *TagUpdate) SetUpdatedAt(t time.Time) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddProductIDs(ids ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) AddProducts(p ...*Product) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearProducts() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveProductIDs(ids ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveProducts(p ...*Product) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableTitle(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetTitle(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetUpdatedAt(t time.Time) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeConversation = "Conversation" TypeFinancialTransaction = "FinancialTransaction" TypeInvoice = "Invoice" TypeInvoiceLineItem = "InvoiceLineItem" TypeMessage = "Message" TypeOrder = "Order" TypeOrderLineItem = "OrderLineItem" TypeOrderStatusCode = "OrderStatusCode" TypePerson = "Person" TypeProduct = "Product" TypeProductImage = "ProductImage" TypeProductTag = "ProductTag" TypeTag = "Tag" )
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 // Conversation is the client for interacting with the Conversation builders. Conversation *ConversationClient // FinancialTransaction is the client for interacting with the FinancialTransaction builders. FinancialTransaction *FinancialTransactionClient // Invoice is the client for interacting with the Invoice builders. Invoice *InvoiceClient // InvoiceLineItem is the client for interacting with the InvoiceLineItem builders. InvoiceLineItem *InvoiceLineItemClient // Message is the client for interacting with the Message builders. Message *MessageClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderLineItem is the client for interacting with the OrderLineItem builders. OrderLineItem *OrderLineItemClient // OrderStatusCode is the client for interacting with the OrderStatusCode builders. OrderStatusCode *OrderStatusCodeClient // Person is the client for interacting with the Person builders. Person *PersonClient // Product is the client for interacting with the Product builders. Product *ProductClient // ProductImage is the client for interacting with the ProductImage builders. ProductImage *ProductImageClient // ProductTag is the client for interacting with the ProductTag builders. ProductTag *ProductTagClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // 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(). Conversation. 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 Conversation ¶
type Conversation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Title holds the value of the "title" field. Title *string `json:"title,omitempty"` // PersonOneID holds the value of the "person_one_id" field. PersonOneID uuid.UUID `json:"person_one_id,omitempty"` // PersonTwoID holds the value of the "person_two_id" field. PersonTwoID uuid.UUID `json:"person_two_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ConversationQuery when eager-loading is set. Edges ConversationEdges `json:"edges"` // contains filtered or unexported fields }
Conversation is the model entity for the Conversation schema.
func (*Conversation) QueryPersonOne ¶
func (c *Conversation) QueryPersonOne() *PersonQuery
QueryPersonOne queries the "person_one" edge of the Conversation entity.
func (*Conversation) QueryPersonTwo ¶
func (c *Conversation) QueryPersonTwo() *PersonQuery
QueryPersonTwo queries the "person_two" edge of the Conversation entity.
func (*Conversation) String ¶
func (c *Conversation) String() string
String implements the fmt.Stringer.
func (*Conversation) Unwrap ¶
func (c *Conversation) Unwrap() *Conversation
Unwrap unwraps the Conversation 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 (*Conversation) Update ¶
func (c *Conversation) Update() *ConversationUpdateOne
Update returns a builder for updating this Conversation. Note that you need to call Conversation.Unwrap() before calling this method if this Conversation was returned from a transaction, and the transaction was committed or rolled back.
type ConversationClient ¶
type ConversationClient struct {
// contains filtered or unexported fields
}
ConversationClient is a client for the Conversation schema.
func NewConversationClient ¶
func NewConversationClient(c config) *ConversationClient
NewConversationClient returns a client for the Conversation from the given config.
func (*ConversationClient) Create ¶
func (c *ConversationClient) Create() *ConversationCreate
Create returns a builder for creating a Conversation entity.
func (*ConversationClient) CreateBulk ¶
func (c *ConversationClient) CreateBulk(builders ...*ConversationCreate) *ConversationCreateBulk
CreateBulk returns a builder for creating a bulk of Conversation entities.
func (*ConversationClient) Delete ¶
func (c *ConversationClient) Delete() *ConversationDelete
Delete returns a delete builder for Conversation.
func (*ConversationClient) DeleteOne ¶
func (c *ConversationClient) DeleteOne(co *Conversation) *ConversationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ConversationClient) DeleteOneID ¶
func (c *ConversationClient) DeleteOneID(id uuid.UUID) *ConversationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ConversationClient) Get ¶
func (c *ConversationClient) Get(ctx context.Context, id uuid.UUID) (*Conversation, error)
Get returns a Conversation entity by its id.
func (*ConversationClient) GetX ¶
func (c *ConversationClient) GetX(ctx context.Context, id uuid.UUID) *Conversation
GetX is like Get, but panics if an error occurs.
func (*ConversationClient) Hooks ¶
func (c *ConversationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ConversationClient) Intercept ¶
func (c *ConversationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `conversation.Intercept(f(g(h())))`.
func (*ConversationClient) Interceptors ¶
func (c *ConversationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ConversationClient) MapCreateBulk ¶
func (c *ConversationClient) MapCreateBulk(slice any, setFunc func(*ConversationCreate, int)) *ConversationCreateBulk
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 (*ConversationClient) Query ¶
func (c *ConversationClient) Query() *ConversationQuery
Query returns a query builder for Conversation.
func (*ConversationClient) QueryPersonOne ¶
func (c *ConversationClient) QueryPersonOne(co *Conversation) *PersonQuery
QueryPersonOne queries the person_one edge of a Conversation.
func (*ConversationClient) QueryPersonTwo ¶
func (c *ConversationClient) QueryPersonTwo(co *Conversation) *PersonQuery
QueryPersonTwo queries the person_two edge of a Conversation.
func (*ConversationClient) Update ¶
func (c *ConversationClient) Update() *ConversationUpdate
Update returns an update builder for Conversation.
func (*ConversationClient) UpdateOne ¶
func (c *ConversationClient) UpdateOne(co *Conversation) *ConversationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ConversationClient) UpdateOneID ¶
func (c *ConversationClient) UpdateOneID(id uuid.UUID) *ConversationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ConversationClient) Use ¶
func (c *ConversationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `conversation.Hooks(f(g(h())))`.
type ConversationCreate ¶
type ConversationCreate struct {
// contains filtered or unexported fields
}
ConversationCreate is the builder for creating a Conversation entity.
func (*ConversationCreate) Exec ¶
func (cc *ConversationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConversationCreate) ExecX ¶
func (cc *ConversationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationCreate) Mutation ¶
func (cc *ConversationCreate) Mutation() *ConversationMutation
Mutation returns the ConversationMutation object of the builder.
func (*ConversationCreate) Save ¶
func (cc *ConversationCreate) Save(ctx context.Context) (*Conversation, error)
Save creates the Conversation in the database.
func (*ConversationCreate) SaveX ¶
func (cc *ConversationCreate) SaveX(ctx context.Context) *Conversation
SaveX calls Save and panics if Save returns an error.
func (*ConversationCreate) SetCreatedAt ¶
func (cc *ConversationCreate) SetCreatedAt(t time.Time) *ConversationCreate
SetCreatedAt sets the "created_at" field.
func (*ConversationCreate) SetID ¶
func (cc *ConversationCreate) SetID(u uuid.UUID) *ConversationCreate
SetID sets the "id" field.
func (*ConversationCreate) SetNillableCreatedAt ¶
func (cc *ConversationCreate) SetNillableCreatedAt(t *time.Time) *ConversationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ConversationCreate) SetNillableID ¶
func (cc *ConversationCreate) SetNillableID(u *uuid.UUID) *ConversationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ConversationCreate) SetNillableTitle ¶
func (cc *ConversationCreate) SetNillableTitle(s *string) *ConversationCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ConversationCreate) SetNillableUpdatedAt ¶
func (cc *ConversationCreate) SetNillableUpdatedAt(t *time.Time) *ConversationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ConversationCreate) SetPersonOne ¶
func (cc *ConversationCreate) SetPersonOne(p *Person) *ConversationCreate
SetPersonOne sets the "person_one" edge to the Person entity.
func (*ConversationCreate) SetPersonOneID ¶
func (cc *ConversationCreate) SetPersonOneID(u uuid.UUID) *ConversationCreate
SetPersonOneID sets the "person_one_id" field.
func (*ConversationCreate) SetPersonTwo ¶
func (cc *ConversationCreate) SetPersonTwo(p *Person) *ConversationCreate
SetPersonTwo sets the "person_two" edge to the Person entity.
func (*ConversationCreate) SetPersonTwoID ¶
func (cc *ConversationCreate) SetPersonTwoID(u uuid.UUID) *ConversationCreate
SetPersonTwoID sets the "person_two_id" field.
func (*ConversationCreate) SetTitle ¶
func (cc *ConversationCreate) SetTitle(s string) *ConversationCreate
SetTitle sets the "title" field.
func (*ConversationCreate) SetUpdatedAt ¶
func (cc *ConversationCreate) SetUpdatedAt(t time.Time) *ConversationCreate
SetUpdatedAt sets the "updated_at" field.
type ConversationCreateBulk ¶
type ConversationCreateBulk struct {
// contains filtered or unexported fields
}
ConversationCreateBulk is the builder for creating many Conversation entities in bulk.
func (*ConversationCreateBulk) Exec ¶
func (ccb *ConversationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ConversationCreateBulk) ExecX ¶
func (ccb *ConversationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationCreateBulk) Save ¶
func (ccb *ConversationCreateBulk) Save(ctx context.Context) ([]*Conversation, error)
Save creates the Conversation entities in the database.
func (*ConversationCreateBulk) SaveX ¶
func (ccb *ConversationCreateBulk) SaveX(ctx context.Context) []*Conversation
SaveX is like Save, but panics if an error occurs.
type ConversationDelete ¶
type ConversationDelete struct {
// contains filtered or unexported fields
}
ConversationDelete is the builder for deleting a Conversation entity.
func (*ConversationDelete) Exec ¶
func (cd *ConversationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ConversationDelete) ExecX ¶
func (cd *ConversationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ConversationDelete) Where ¶
func (cd *ConversationDelete) Where(ps ...predicate.Conversation) *ConversationDelete
Where appends a list predicates to the ConversationDelete builder.
type ConversationDeleteOne ¶
type ConversationDeleteOne struct {
// contains filtered or unexported fields
}
ConversationDeleteOne is the builder for deleting a single Conversation entity.
func (*ConversationDeleteOne) Exec ¶
func (cdo *ConversationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ConversationDeleteOne) ExecX ¶
func (cdo *ConversationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationDeleteOne) Where ¶
func (cdo *ConversationDeleteOne) Where(ps ...predicate.Conversation) *ConversationDeleteOne
Where appends a list predicates to the ConversationDelete builder.
type ConversationEdges ¶
type ConversationEdges struct { // PersonOne holds the value of the person_one edge. PersonOne *Person `json:"person_one,omitempty"` // PersonTwo holds the value of the person_two edge. PersonTwo *Person `json:"person_two,omitempty"` // contains filtered or unexported fields }
ConversationEdges holds the relations/edges for other nodes in the graph.
func (ConversationEdges) PersonOneOrErr ¶
func (e ConversationEdges) PersonOneOrErr() (*Person, error)
PersonOneOrErr returns the PersonOne value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ConversationEdges) PersonTwoOrErr ¶
func (e ConversationEdges) PersonTwoOrErr() (*Person, error)
PersonTwoOrErr returns the PersonTwo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ConversationGroupBy ¶
type ConversationGroupBy struct {
// contains filtered or unexported fields
}
ConversationGroupBy is the group-by builder for Conversation entities.
func (*ConversationGroupBy) Aggregate ¶
func (cgb *ConversationGroupBy) Aggregate(fns ...AggregateFunc) *ConversationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ConversationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Scan ¶
func (cgb *ConversationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConversationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConversationMutation ¶
type ConversationMutation struct {
// contains filtered or unexported fields
}
ConversationMutation represents an operation that mutates the Conversation nodes in the graph.
func (*ConversationMutation) AddField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) AddedEdges ¶
func (m *ConversationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ConversationMutation) AddedField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) AddedFields ¶
func (m *ConversationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ConversationMutation) AddedIDs ¶
func (m *ConversationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ConversationMutation) ClearEdge ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ClearField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ClearPersonOne ¶
func (m *ConversationMutation) ClearPersonOne()
ClearPersonOne clears the "person_one" edge to the Person entity.
func (*ConversationMutation) ClearPersonTwo ¶
func (m *ConversationMutation) ClearPersonTwo()
ClearPersonTwo clears the "person_two" edge to the Person entity.
func (*ConversationMutation) ClearTitle ¶
func (m *ConversationMutation) ClearTitle()
ClearTitle clears the value of the "title" field.
func (*ConversationMutation) ClearedEdges ¶
func (m *ConversationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ConversationMutation) ClearedFields ¶
func (m *ConversationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ConversationMutation) Client ¶
func (m ConversationMutation) 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 (*ConversationMutation) CreatedAt ¶
func (m *ConversationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ConversationMutation) EdgeCleared ¶
func (m *ConversationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ConversationMutation) Field ¶
func (m *ConversationMutation) 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 (*ConversationMutation) FieldCleared ¶
func (m *ConversationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ConversationMutation) Fields ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ID ¶
func (m *ConversationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ConversationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ConversationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) 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 (*ConversationMutation) OldPersonOneID ¶
OldPersonOneID returns the old "person_one_id" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) OldPersonTwoID ¶
OldPersonTwoID returns the old "person_two_id" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) OldTitle ¶
func (m *ConversationMutation) OldTitle(ctx context.Context) (v *string, err error)
OldTitle returns the old "title" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) Op ¶
func (m *ConversationMutation) Op() Op
Op returns the operation name.
func (*ConversationMutation) PersonOneCleared ¶
func (m *ConversationMutation) PersonOneCleared() bool
PersonOneCleared reports if the "person_one" edge to the Person entity was cleared.
func (*ConversationMutation) PersonOneID ¶
func (m *ConversationMutation) PersonOneID() (r uuid.UUID, exists bool)
PersonOneID returns the value of the "person_one_id" field in the mutation.
func (*ConversationMutation) PersonOneIDs ¶
func (m *ConversationMutation) PersonOneIDs() (ids []uuid.UUID)
PersonOneIDs returns the "person_one" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonOneID instead. It exists only for internal usage by the builders.
func (*ConversationMutation) PersonTwoCleared ¶
func (m *ConversationMutation) PersonTwoCleared() bool
PersonTwoCleared reports if the "person_two" edge to the Person entity was cleared.
func (*ConversationMutation) PersonTwoID ¶
func (m *ConversationMutation) PersonTwoID() (r uuid.UUID, exists bool)
PersonTwoID returns the value of the "person_two_id" field in the mutation.
func (*ConversationMutation) PersonTwoIDs ¶
func (m *ConversationMutation) PersonTwoIDs() (ids []uuid.UUID)
PersonTwoIDs returns the "person_two" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonTwoID instead. It exists only for internal usage by the builders.
func (*ConversationMutation) RemovedEdges ¶
func (m *ConversationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ConversationMutation) RemovedIDs ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ResetCreatedAt ¶
func (m *ConversationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ConversationMutation) ResetEdge ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ResetField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ResetPersonOne ¶
func (m *ConversationMutation) ResetPersonOne()
ResetPersonOne resets all changes to the "person_one" edge.
func (*ConversationMutation) ResetPersonOneID ¶
func (m *ConversationMutation) ResetPersonOneID()
ResetPersonOneID resets all changes to the "person_one_id" field.
func (*ConversationMutation) ResetPersonTwo ¶
func (m *ConversationMutation) ResetPersonTwo()
ResetPersonTwo resets all changes to the "person_two" edge.
func (*ConversationMutation) ResetPersonTwoID ¶
func (m *ConversationMutation) ResetPersonTwoID()
ResetPersonTwoID resets all changes to the "person_two_id" field.
func (*ConversationMutation) ResetTitle ¶
func (m *ConversationMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ConversationMutation) ResetUpdatedAt ¶
func (m *ConversationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ConversationMutation) SetCreatedAt ¶
func (m *ConversationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ConversationMutation) SetField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) SetID ¶
func (m *ConversationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Conversation entities.
func (*ConversationMutation) SetOp ¶
func (m *ConversationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ConversationMutation) SetPersonOneID ¶
func (m *ConversationMutation) SetPersonOneID(u uuid.UUID)
SetPersonOneID sets the "person_one_id" field.
func (*ConversationMutation) SetPersonTwoID ¶
func (m *ConversationMutation) SetPersonTwoID(u uuid.UUID)
SetPersonTwoID sets the "person_two_id" field.
func (*ConversationMutation) SetTitle ¶
func (m *ConversationMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ConversationMutation) SetUpdatedAt ¶
func (m *ConversationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ConversationMutation) Title ¶
func (m *ConversationMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*ConversationMutation) TitleCleared ¶
func (m *ConversationMutation) TitleCleared() bool
TitleCleared returns if the "title" field was cleared in this mutation.
func (ConversationMutation) Tx ¶
func (m ConversationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ConversationMutation) Type ¶
func (m *ConversationMutation) Type() string
Type returns the node type of this mutation (Conversation).
func (*ConversationMutation) UpdatedAt ¶
func (m *ConversationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ConversationMutation) Where ¶
func (m *ConversationMutation) Where(ps ...predicate.Conversation)
Where appends a list predicates to the ConversationMutation builder.
func (*ConversationMutation) WhereP ¶
func (m *ConversationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ConversationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ConversationQuery ¶
type ConversationQuery struct {
// contains filtered or unexported fields
}
ConversationQuery is the builder for querying Conversation entities.
func (*ConversationQuery) Aggregate ¶
func (cq *ConversationQuery) Aggregate(fns ...AggregateFunc) *ConversationSelect
Aggregate returns a ConversationSelect configured with the given aggregations.
func (*ConversationQuery) All ¶
func (cq *ConversationQuery) All(ctx context.Context) ([]*Conversation, error)
All executes the query and returns a list of Conversations.
func (*ConversationQuery) AllX ¶
func (cq *ConversationQuery) AllX(ctx context.Context) []*Conversation
AllX is like All, but panics if an error occurs.
func (*ConversationQuery) Clone ¶
func (cq *ConversationQuery) Clone() *ConversationQuery
Clone returns a duplicate of the ConversationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ConversationQuery) Count ¶
func (cq *ConversationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ConversationQuery) CountX ¶
func (cq *ConversationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ConversationQuery) Exist ¶
func (cq *ConversationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ConversationQuery) ExistX ¶
func (cq *ConversationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ConversationQuery) First ¶
func (cq *ConversationQuery) First(ctx context.Context) (*Conversation, error)
First returns the first Conversation entity from the query. Returns a *NotFoundError when no Conversation was found.
func (*ConversationQuery) FirstID ¶
FirstID returns the first Conversation ID from the query. Returns a *NotFoundError when no Conversation ID was found.
func (*ConversationQuery) FirstIDX ¶
func (cq *ConversationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ConversationQuery) FirstX ¶
func (cq *ConversationQuery) FirstX(ctx context.Context) *Conversation
FirstX is like First, but panics if an error occurs.
func (*ConversationQuery) GroupBy ¶
func (cq *ConversationQuery) GroupBy(field string, fields ...string) *ConversationGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Conversation.Query(). GroupBy(conversation.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ConversationQuery) IDsX ¶
func (cq *ConversationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ConversationQuery) Limit ¶
func (cq *ConversationQuery) Limit(limit int) *ConversationQuery
Limit the number of records to be returned by this query.
func (*ConversationQuery) Offset ¶
func (cq *ConversationQuery) Offset(offset int) *ConversationQuery
Offset to start from.
func (*ConversationQuery) Only ¶
func (cq *ConversationQuery) Only(ctx context.Context) (*Conversation, error)
Only returns a single Conversation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Conversation entity is found. Returns a *NotFoundError when no Conversation entities are found.
func (*ConversationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Conversation ID in the query. Returns a *NotSingularError when more than one Conversation ID is found. Returns a *NotFoundError when no entities are found.
func (*ConversationQuery) OnlyIDX ¶
func (cq *ConversationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ConversationQuery) OnlyX ¶
func (cq *ConversationQuery) OnlyX(ctx context.Context) *Conversation
OnlyX is like Only, but panics if an error occurs.
func (*ConversationQuery) Order ¶
func (cq *ConversationQuery) Order(o ...conversation.OrderOption) *ConversationQuery
Order specifies how the records should be ordered.
func (*ConversationQuery) QueryPersonOne ¶
func (cq *ConversationQuery) QueryPersonOne() *PersonQuery
QueryPersonOne chains the current query on the "person_one" edge.
func (*ConversationQuery) QueryPersonTwo ¶
func (cq *ConversationQuery) QueryPersonTwo() *PersonQuery
QueryPersonTwo chains the current query on the "person_two" edge.
func (*ConversationQuery) Select ¶
func (cq *ConversationQuery) Select(fields ...string) *ConversationSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Conversation.Query(). Select(conversation.FieldCreatedAt). Scan(ctx, &v)
func (*ConversationQuery) Unique ¶
func (cq *ConversationQuery) Unique(unique bool) *ConversationQuery
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 (*ConversationQuery) Where ¶
func (cq *ConversationQuery) Where(ps ...predicate.Conversation) *ConversationQuery
Where adds a new predicate for the ConversationQuery builder.
func (*ConversationQuery) WithPersonOne ¶
func (cq *ConversationQuery) WithPersonOne(opts ...func(*PersonQuery)) *ConversationQuery
WithPersonOne tells the query-builder to eager-load the nodes that are connected to the "person_one" edge. The optional arguments are used to configure the query builder of the edge.
func (*ConversationQuery) WithPersonTwo ¶
func (cq *ConversationQuery) WithPersonTwo(opts ...func(*PersonQuery)) *ConversationQuery
WithPersonTwo tells the query-builder to eager-load the nodes that are connected to the "person_two" edge. The optional arguments are used to configure the query builder of the edge.
type ConversationSelect ¶
type ConversationSelect struct { *ConversationQuery // contains filtered or unexported fields }
ConversationSelect is the builder for selecting fields of Conversation entities.
func (*ConversationSelect) Aggregate ¶
func (cs *ConversationSelect) Aggregate(fns ...AggregateFunc) *ConversationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ConversationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Scan ¶
func (cs *ConversationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConversationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConversationUpdate ¶
type ConversationUpdate struct {
// contains filtered or unexported fields
}
ConversationUpdate is the builder for updating Conversation entities.
func (*ConversationUpdate) ClearTitle ¶
func (cu *ConversationUpdate) ClearTitle() *ConversationUpdate
ClearTitle clears the value of the "title" field.
func (*ConversationUpdate) Exec ¶
func (cu *ConversationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConversationUpdate) ExecX ¶
func (cu *ConversationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationUpdate) Mutation ¶
func (cu *ConversationUpdate) Mutation() *ConversationMutation
Mutation returns the ConversationMutation object of the builder.
func (*ConversationUpdate) Save ¶
func (cu *ConversationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ConversationUpdate) SaveX ¶
func (cu *ConversationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ConversationUpdate) SetNillableTitle ¶
func (cu *ConversationUpdate) SetNillableTitle(s *string) *ConversationUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ConversationUpdate) SetTitle ¶
func (cu *ConversationUpdate) SetTitle(s string) *ConversationUpdate
SetTitle sets the "title" field.
func (*ConversationUpdate) SetUpdatedAt ¶
func (cu *ConversationUpdate) SetUpdatedAt(t time.Time) *ConversationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ConversationUpdate) Where ¶
func (cu *ConversationUpdate) Where(ps ...predicate.Conversation) *ConversationUpdate
Where appends a list predicates to the ConversationUpdate builder.
type ConversationUpdateOne ¶
type ConversationUpdateOne struct {
// contains filtered or unexported fields
}
ConversationUpdateOne is the builder for updating a single Conversation entity.
func (*ConversationUpdateOne) ClearTitle ¶
func (cuo *ConversationUpdateOne) ClearTitle() *ConversationUpdateOne
ClearTitle clears the value of the "title" field.
func (*ConversationUpdateOne) Exec ¶
func (cuo *ConversationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ConversationUpdateOne) ExecX ¶
func (cuo *ConversationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationUpdateOne) Mutation ¶
func (cuo *ConversationUpdateOne) Mutation() *ConversationMutation
Mutation returns the ConversationMutation object of the builder.
func (*ConversationUpdateOne) Save ¶
func (cuo *ConversationUpdateOne) Save(ctx context.Context) (*Conversation, error)
Save executes the query and returns the updated Conversation entity.
func (*ConversationUpdateOne) SaveX ¶
func (cuo *ConversationUpdateOne) SaveX(ctx context.Context) *Conversation
SaveX is like Save, but panics if an error occurs.
func (*ConversationUpdateOne) Select ¶
func (cuo *ConversationUpdateOne) Select(field string, fields ...string) *ConversationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ConversationUpdateOne) SetNillableTitle ¶
func (cuo *ConversationUpdateOne) SetNillableTitle(s *string) *ConversationUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ConversationUpdateOne) SetTitle ¶
func (cuo *ConversationUpdateOne) SetTitle(s string) *ConversationUpdateOne
SetTitle sets the "title" field.
func (*ConversationUpdateOne) SetUpdatedAt ¶
func (cuo *ConversationUpdateOne) SetUpdatedAt(t time.Time) *ConversationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ConversationUpdateOne) Where ¶
func (cuo *ConversationUpdateOne) Where(ps ...predicate.Conversation) *ConversationUpdateOne
Where appends a list predicates to the ConversationUpdate builder.
type Conversations ¶
type Conversations []*Conversation
Conversations is a parsable slice of Conversation.
type FinancialTransaction ¶
type FinancialTransaction struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // InvoiceID holds the value of the "invoice_id" field. InvoiceID uuid.UUID `json:"invoice_id,omitempty"` // Amount holds the value of the "amount" field. Amount decimal.Decimal `json:"amount,omitempty"` // Comment holds the value of the "comment" field. Comment *string `json:"comment,omitempty"` // IsInternal holds the value of the "is_internal" field. IsInternal bool `json:"is_internal,omitempty"` // PaymentMethod holds the value of the "payment_method" field. PaymentMethod financialtransaction.PaymentMethod `json:"payment_method,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FinancialTransactionQuery when eager-loading is set. Edges FinancialTransactionEdges `json:"edges"` // contains filtered or unexported fields }
FinancialTransaction is the model entity for the FinancialTransaction schema.
func (*FinancialTransaction) QueryInvoice ¶
func (ft *FinancialTransaction) QueryInvoice() *InvoiceQuery
QueryInvoice queries the "invoice" edge of the FinancialTransaction entity.
func (*FinancialTransaction) String ¶
func (ft *FinancialTransaction) String() string
String implements the fmt.Stringer.
func (*FinancialTransaction) Unwrap ¶
func (ft *FinancialTransaction) Unwrap() *FinancialTransaction
Unwrap unwraps the FinancialTransaction 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 (*FinancialTransaction) Update ¶
func (ft *FinancialTransaction) Update() *FinancialTransactionUpdateOne
Update returns a builder for updating this FinancialTransaction. Note that you need to call FinancialTransaction.Unwrap() before calling this method if this FinancialTransaction was returned from a transaction, and the transaction was committed or rolled back.
type FinancialTransactionClient ¶
type FinancialTransactionClient struct {
// contains filtered or unexported fields
}
FinancialTransactionClient is a client for the FinancialTransaction schema.
func NewFinancialTransactionClient ¶
func NewFinancialTransactionClient(c config) *FinancialTransactionClient
NewFinancialTransactionClient returns a client for the FinancialTransaction from the given config.
func (*FinancialTransactionClient) Create ¶
func (c *FinancialTransactionClient) Create() *FinancialTransactionCreate
Create returns a builder for creating a FinancialTransaction entity.
func (*FinancialTransactionClient) CreateBulk ¶
func (c *FinancialTransactionClient) CreateBulk(builders ...*FinancialTransactionCreate) *FinancialTransactionCreateBulk
CreateBulk returns a builder for creating a bulk of FinancialTransaction entities.
func (*FinancialTransactionClient) Delete ¶
func (c *FinancialTransactionClient) Delete() *FinancialTransactionDelete
Delete returns a delete builder for FinancialTransaction.
func (*FinancialTransactionClient) DeleteOne ¶
func (c *FinancialTransactionClient) DeleteOne(ft *FinancialTransaction) *FinancialTransactionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FinancialTransactionClient) DeleteOneID ¶
func (c *FinancialTransactionClient) DeleteOneID(id uuid.UUID) *FinancialTransactionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FinancialTransactionClient) Get ¶
func (c *FinancialTransactionClient) Get(ctx context.Context, id uuid.UUID) (*FinancialTransaction, error)
Get returns a FinancialTransaction entity by its id.
func (*FinancialTransactionClient) GetX ¶
func (c *FinancialTransactionClient) GetX(ctx context.Context, id uuid.UUID) *FinancialTransaction
GetX is like Get, but panics if an error occurs.
func (*FinancialTransactionClient) Hooks ¶
func (c *FinancialTransactionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FinancialTransactionClient) Intercept ¶
func (c *FinancialTransactionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `financialtransaction.Intercept(f(g(h())))`.
func (*FinancialTransactionClient) Interceptors ¶
func (c *FinancialTransactionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FinancialTransactionClient) MapCreateBulk ¶
func (c *FinancialTransactionClient) MapCreateBulk(slice any, setFunc func(*FinancialTransactionCreate, int)) *FinancialTransactionCreateBulk
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 (*FinancialTransactionClient) Query ¶
func (c *FinancialTransactionClient) Query() *FinancialTransactionQuery
Query returns a query builder for FinancialTransaction.
func (*FinancialTransactionClient) QueryInvoice ¶
func (c *FinancialTransactionClient) QueryInvoice(ft *FinancialTransaction) *InvoiceQuery
QueryInvoice queries the invoice edge of a FinancialTransaction.
func (*FinancialTransactionClient) Update ¶
func (c *FinancialTransactionClient) Update() *FinancialTransactionUpdate
Update returns an update builder for FinancialTransaction.
func (*FinancialTransactionClient) UpdateOne ¶
func (c *FinancialTransactionClient) UpdateOne(ft *FinancialTransaction) *FinancialTransactionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FinancialTransactionClient) UpdateOneID ¶
func (c *FinancialTransactionClient) UpdateOneID(id uuid.UUID) *FinancialTransactionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FinancialTransactionClient) Use ¶
func (c *FinancialTransactionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `financialtransaction.Hooks(f(g(h())))`.
type FinancialTransactionCreate ¶
type FinancialTransactionCreate struct {
// contains filtered or unexported fields
}
FinancialTransactionCreate is the builder for creating a FinancialTransaction entity.
func (*FinancialTransactionCreate) Exec ¶
func (ftc *FinancialTransactionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialTransactionCreate) ExecX ¶
func (ftc *FinancialTransactionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialTransactionCreate) Mutation ¶
func (ftc *FinancialTransactionCreate) Mutation() *FinancialTransactionMutation
Mutation returns the FinancialTransactionMutation object of the builder.
func (*FinancialTransactionCreate) Save ¶
func (ftc *FinancialTransactionCreate) Save(ctx context.Context) (*FinancialTransaction, error)
Save creates the FinancialTransaction in the database.
func (*FinancialTransactionCreate) SaveX ¶
func (ftc *FinancialTransactionCreate) SaveX(ctx context.Context) *FinancialTransaction
SaveX calls Save and panics if Save returns an error.
func (*FinancialTransactionCreate) SetAmount ¶
func (ftc *FinancialTransactionCreate) SetAmount(d decimal.Decimal) *FinancialTransactionCreate
SetAmount sets the "amount" field.
func (*FinancialTransactionCreate) SetComment ¶
func (ftc *FinancialTransactionCreate) SetComment(s string) *FinancialTransactionCreate
SetComment sets the "comment" field.
func (*FinancialTransactionCreate) SetCreatedAt ¶
func (ftc *FinancialTransactionCreate) SetCreatedAt(t time.Time) *FinancialTransactionCreate
SetCreatedAt sets the "created_at" field.
func (*FinancialTransactionCreate) SetID ¶
func (ftc *FinancialTransactionCreate) SetID(u uuid.UUID) *FinancialTransactionCreate
SetID sets the "id" field.
func (*FinancialTransactionCreate) SetInvoice ¶
func (ftc *FinancialTransactionCreate) SetInvoice(i *Invoice) *FinancialTransactionCreate
SetInvoice sets the "invoice" edge to the Invoice entity.
func (*FinancialTransactionCreate) SetInvoiceID ¶
func (ftc *FinancialTransactionCreate) SetInvoiceID(u uuid.UUID) *FinancialTransactionCreate
SetInvoiceID sets the "invoice_id" field.
func (*FinancialTransactionCreate) SetIsInternal ¶
func (ftc *FinancialTransactionCreate) SetIsInternal(b bool) *FinancialTransactionCreate
SetIsInternal sets the "is_internal" field.
func (*FinancialTransactionCreate) SetNillableComment ¶
func (ftc *FinancialTransactionCreate) SetNillableComment(s *string) *FinancialTransactionCreate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*FinancialTransactionCreate) SetNillableCreatedAt ¶
func (ftc *FinancialTransactionCreate) SetNillableCreatedAt(t *time.Time) *FinancialTransactionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FinancialTransactionCreate) SetNillableID ¶
func (ftc *FinancialTransactionCreate) SetNillableID(u *uuid.UUID) *FinancialTransactionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*FinancialTransactionCreate) SetNillableIsInternal ¶
func (ftc *FinancialTransactionCreate) SetNillableIsInternal(b *bool) *FinancialTransactionCreate
SetNillableIsInternal sets the "is_internal" field if the given value is not nil.
func (*FinancialTransactionCreate) SetNillablePaymentMethod ¶
func (ftc *FinancialTransactionCreate) SetNillablePaymentMethod(fm *financialtransaction.PaymentMethod) *FinancialTransactionCreate
SetNillablePaymentMethod sets the "payment_method" field if the given value is not nil.
func (*FinancialTransactionCreate) SetNillableUpdatedAt ¶
func (ftc *FinancialTransactionCreate) SetNillableUpdatedAt(t *time.Time) *FinancialTransactionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FinancialTransactionCreate) SetPaymentMethod ¶
func (ftc *FinancialTransactionCreate) SetPaymentMethod(fm financialtransaction.PaymentMethod) *FinancialTransactionCreate
SetPaymentMethod sets the "payment_method" field.
func (*FinancialTransactionCreate) SetUpdatedAt ¶
func (ftc *FinancialTransactionCreate) SetUpdatedAt(t time.Time) *FinancialTransactionCreate
SetUpdatedAt sets the "updated_at" field.
type FinancialTransactionCreateBulk ¶
type FinancialTransactionCreateBulk struct {
// contains filtered or unexported fields
}
FinancialTransactionCreateBulk is the builder for creating many FinancialTransaction entities in bulk.
func (*FinancialTransactionCreateBulk) Exec ¶
func (ftcb *FinancialTransactionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialTransactionCreateBulk) ExecX ¶
func (ftcb *FinancialTransactionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialTransactionCreateBulk) Save ¶
func (ftcb *FinancialTransactionCreateBulk) Save(ctx context.Context) ([]*FinancialTransaction, error)
Save creates the FinancialTransaction entities in the database.
func (*FinancialTransactionCreateBulk) SaveX ¶
func (ftcb *FinancialTransactionCreateBulk) SaveX(ctx context.Context) []*FinancialTransaction
SaveX is like Save, but panics if an error occurs.
type FinancialTransactionDelete ¶
type FinancialTransactionDelete struct {
// contains filtered or unexported fields
}
FinancialTransactionDelete is the builder for deleting a FinancialTransaction entity.
func (*FinancialTransactionDelete) Exec ¶
func (ftd *FinancialTransactionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FinancialTransactionDelete) ExecX ¶
func (ftd *FinancialTransactionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FinancialTransactionDelete) Where ¶
func (ftd *FinancialTransactionDelete) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionDelete
Where appends a list predicates to the FinancialTransactionDelete builder.
type FinancialTransactionDeleteOne ¶
type FinancialTransactionDeleteOne struct {
// contains filtered or unexported fields
}
FinancialTransactionDeleteOne is the builder for deleting a single FinancialTransaction entity.
func (*FinancialTransactionDeleteOne) Exec ¶
func (ftdo *FinancialTransactionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FinancialTransactionDeleteOne) ExecX ¶
func (ftdo *FinancialTransactionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialTransactionDeleteOne) Where ¶
func (ftdo *FinancialTransactionDeleteOne) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionDeleteOne
Where appends a list predicates to the FinancialTransactionDelete builder.
type FinancialTransactionEdges ¶
type FinancialTransactionEdges struct { // Invoice holds the value of the invoice edge. Invoice *Invoice `json:"invoice,omitempty"` // contains filtered or unexported fields }
FinancialTransactionEdges holds the relations/edges for other nodes in the graph.
func (FinancialTransactionEdges) InvoiceOrErr ¶
func (e FinancialTransactionEdges) InvoiceOrErr() (*Invoice, error)
InvoiceOrErr returns the Invoice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FinancialTransactionGroupBy ¶
type FinancialTransactionGroupBy struct {
// contains filtered or unexported fields
}
FinancialTransactionGroupBy is the group-by builder for FinancialTransaction entities.
func (*FinancialTransactionGroupBy) Aggregate ¶
func (ftgb *FinancialTransactionGroupBy) Aggregate(fns ...AggregateFunc) *FinancialTransactionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FinancialTransactionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*FinancialTransactionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*FinancialTransactionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionGroupBy) Scan ¶
func (ftgb *FinancialTransactionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FinancialTransactionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type FinancialTransactionMutation ¶
type FinancialTransactionMutation struct {
// contains filtered or unexported fields
}
FinancialTransactionMutation represents an operation that mutates the FinancialTransaction nodes in the graph.
func (*FinancialTransactionMutation) AddAmount ¶
func (m *FinancialTransactionMutation) AddAmount(d decimal.Decimal)
AddAmount adds d to the "amount" field.
func (*FinancialTransactionMutation) AddField ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) AddedAmount ¶
func (m *FinancialTransactionMutation) AddedAmount() (r decimal.Decimal, exists bool)
AddedAmount returns the value that was added to the "amount" field in this mutation.
func (*FinancialTransactionMutation) AddedEdges ¶
func (m *FinancialTransactionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FinancialTransactionMutation) AddedField ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) AddedFields ¶
func (m *FinancialTransactionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FinancialTransactionMutation) AddedIDs ¶
func (m *FinancialTransactionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FinancialTransactionMutation) Amount ¶
func (m *FinancialTransactionMutation) Amount() (r decimal.Decimal, exists bool)
Amount returns the value of the "amount" field in the mutation.
func (*FinancialTransactionMutation) ClearComment ¶
func (m *FinancialTransactionMutation) ClearComment()
ClearComment clears the value of the "comment" field.
func (*FinancialTransactionMutation) ClearEdge ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) ClearField ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) ClearInvoice ¶
func (m *FinancialTransactionMutation) ClearInvoice()
ClearInvoice clears the "invoice" edge to the Invoice entity.
func (*FinancialTransactionMutation) ClearedEdges ¶
func (m *FinancialTransactionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FinancialTransactionMutation) ClearedFields ¶
func (m *FinancialTransactionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FinancialTransactionMutation) Client ¶
func (m FinancialTransactionMutation) 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 (*FinancialTransactionMutation) Comment ¶
func (m *FinancialTransactionMutation) Comment() (r string, exists bool)
Comment returns the value of the "comment" field in the mutation.
func (*FinancialTransactionMutation) CommentCleared ¶
func (m *FinancialTransactionMutation) CommentCleared() bool
CommentCleared returns if the "comment" field was cleared in this mutation.
func (*FinancialTransactionMutation) CreatedAt ¶
func (m *FinancialTransactionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FinancialTransactionMutation) EdgeCleared ¶
func (m *FinancialTransactionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FinancialTransactionMutation) Field ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) FieldCleared ¶
func (m *FinancialTransactionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FinancialTransactionMutation) Fields ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) ID ¶
func (m *FinancialTransactionMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FinancialTransactionMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FinancialTransactionMutation) InvoiceCleared ¶
func (m *FinancialTransactionMutation) InvoiceCleared() bool
InvoiceCleared reports if the "invoice" edge to the Invoice entity was cleared.
func (*FinancialTransactionMutation) InvoiceID ¶
func (m *FinancialTransactionMutation) InvoiceID() (r uuid.UUID, exists bool)
InvoiceID returns the value of the "invoice_id" field in the mutation.
func (*FinancialTransactionMutation) InvoiceIDs ¶
func (m *FinancialTransactionMutation) InvoiceIDs() (ids []uuid.UUID)
InvoiceIDs returns the "invoice" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InvoiceID instead. It exists only for internal usage by the builders.
func (*FinancialTransactionMutation) IsInternal ¶
func (m *FinancialTransactionMutation) IsInternal() (r bool, exists bool)
IsInternal returns the value of the "is_internal" field in the mutation.
func (*FinancialTransactionMutation) OldAmount ¶
func (m *FinancialTransactionMutation) OldAmount(ctx context.Context) (v decimal.Decimal, err error)
OldAmount returns the old "amount" field's value of the FinancialTransaction entity. If the FinancialTransaction 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 (*FinancialTransactionMutation) OldComment ¶
func (m *FinancialTransactionMutation) OldComment(ctx context.Context) (v *string, err error)
OldComment returns the old "comment" field's value of the FinancialTransaction entity. If the FinancialTransaction 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 (*FinancialTransactionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the FinancialTransaction entity. If the FinancialTransaction 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 (*FinancialTransactionMutation) OldField ¶
func (m *FinancialTransactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*FinancialTransactionMutation) OldInvoiceID ¶
OldInvoiceID returns the old "invoice_id" field's value of the FinancialTransaction entity. If the FinancialTransaction 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 (*FinancialTransactionMutation) OldIsInternal ¶
func (m *FinancialTransactionMutation) OldIsInternal(ctx context.Context) (v bool, err error)
OldIsInternal returns the old "is_internal" field's value of the FinancialTransaction entity. If the FinancialTransaction 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 (*FinancialTransactionMutation) OldPaymentMethod ¶
func (m *FinancialTransactionMutation) OldPaymentMethod(ctx context.Context) (v financialtransaction.PaymentMethod, err error)
OldPaymentMethod returns the old "payment_method" field's value of the FinancialTransaction entity. If the FinancialTransaction 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 (*FinancialTransactionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the FinancialTransaction entity. If the FinancialTransaction 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 (*FinancialTransactionMutation) Op ¶
func (m *FinancialTransactionMutation) Op() Op
Op returns the operation name.
func (*FinancialTransactionMutation) PaymentMethod ¶
func (m *FinancialTransactionMutation) PaymentMethod() (r financialtransaction.PaymentMethod, exists bool)
PaymentMethod returns the value of the "payment_method" field in the mutation.
func (*FinancialTransactionMutation) RemovedEdges ¶
func (m *FinancialTransactionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FinancialTransactionMutation) RemovedIDs ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) ResetAmount ¶
func (m *FinancialTransactionMutation) ResetAmount()
ResetAmount resets all changes to the "amount" field.
func (*FinancialTransactionMutation) ResetComment ¶
func (m *FinancialTransactionMutation) ResetComment()
ResetComment resets all changes to the "comment" field.
func (*FinancialTransactionMutation) ResetCreatedAt ¶
func (m *FinancialTransactionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FinancialTransactionMutation) ResetEdge ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) ResetField ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) ResetInvoice ¶
func (m *FinancialTransactionMutation) ResetInvoice()
ResetInvoice resets all changes to the "invoice" edge.
func (*FinancialTransactionMutation) ResetInvoiceID ¶
func (m *FinancialTransactionMutation) ResetInvoiceID()
ResetInvoiceID resets all changes to the "invoice_id" field.
func (*FinancialTransactionMutation) ResetIsInternal ¶
func (m *FinancialTransactionMutation) ResetIsInternal()
ResetIsInternal resets all changes to the "is_internal" field.
func (*FinancialTransactionMutation) ResetPaymentMethod ¶
func (m *FinancialTransactionMutation) ResetPaymentMethod()
ResetPaymentMethod resets all changes to the "payment_method" field.
func (*FinancialTransactionMutation) ResetUpdatedAt ¶
func (m *FinancialTransactionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FinancialTransactionMutation) SetAmount ¶
func (m *FinancialTransactionMutation) SetAmount(d decimal.Decimal)
SetAmount sets the "amount" field.
func (*FinancialTransactionMutation) SetComment ¶
func (m *FinancialTransactionMutation) SetComment(s string)
SetComment sets the "comment" field.
func (*FinancialTransactionMutation) SetCreatedAt ¶
func (m *FinancialTransactionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FinancialTransactionMutation) SetField ¶
func (m *FinancialTransactionMutation) 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 (*FinancialTransactionMutation) SetID ¶
func (m *FinancialTransactionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of FinancialTransaction entities.
func (*FinancialTransactionMutation) SetInvoiceID ¶
func (m *FinancialTransactionMutation) SetInvoiceID(u uuid.UUID)
SetInvoiceID sets the "invoice_id" field.
func (*FinancialTransactionMutation) SetIsInternal ¶
func (m *FinancialTransactionMutation) SetIsInternal(b bool)
SetIsInternal sets the "is_internal" field.
func (*FinancialTransactionMutation) SetOp ¶
func (m *FinancialTransactionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FinancialTransactionMutation) SetPaymentMethod ¶
func (m *FinancialTransactionMutation) SetPaymentMethod(fm financialtransaction.PaymentMethod)
SetPaymentMethod sets the "payment_method" field.
func (*FinancialTransactionMutation) SetUpdatedAt ¶
func (m *FinancialTransactionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (FinancialTransactionMutation) Tx ¶
func (m FinancialTransactionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FinancialTransactionMutation) Type ¶
func (m *FinancialTransactionMutation) Type() string
Type returns the node type of this mutation (FinancialTransaction).
func (*FinancialTransactionMutation) UpdatedAt ¶
func (m *FinancialTransactionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FinancialTransactionMutation) Where ¶
func (m *FinancialTransactionMutation) Where(ps ...predicate.FinancialTransaction)
Where appends a list predicates to the FinancialTransactionMutation builder.
func (*FinancialTransactionMutation) WhereP ¶
func (m *FinancialTransactionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FinancialTransactionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FinancialTransactionQuery ¶
type FinancialTransactionQuery struct {
// contains filtered or unexported fields
}
FinancialTransactionQuery is the builder for querying FinancialTransaction entities.
func (*FinancialTransactionQuery) Aggregate ¶
func (ftq *FinancialTransactionQuery) Aggregate(fns ...AggregateFunc) *FinancialTransactionSelect
Aggregate returns a FinancialTransactionSelect configured with the given aggregations.
func (*FinancialTransactionQuery) All ¶
func (ftq *FinancialTransactionQuery) All(ctx context.Context) ([]*FinancialTransaction, error)
All executes the query and returns a list of FinancialTransactions.
func (*FinancialTransactionQuery) AllX ¶
func (ftq *FinancialTransactionQuery) AllX(ctx context.Context) []*FinancialTransaction
AllX is like All, but panics if an error occurs.
func (*FinancialTransactionQuery) Clone ¶
func (ftq *FinancialTransactionQuery) Clone() *FinancialTransactionQuery
Clone returns a duplicate of the FinancialTransactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FinancialTransactionQuery) Count ¶
func (ftq *FinancialTransactionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FinancialTransactionQuery) CountX ¶
func (ftq *FinancialTransactionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FinancialTransactionQuery) Exist ¶
func (ftq *FinancialTransactionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FinancialTransactionQuery) ExistX ¶
func (ftq *FinancialTransactionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FinancialTransactionQuery) First ¶
func (ftq *FinancialTransactionQuery) First(ctx context.Context) (*FinancialTransaction, error)
First returns the first FinancialTransaction entity from the query. Returns a *NotFoundError when no FinancialTransaction was found.
func (*FinancialTransactionQuery) FirstID ¶
FirstID returns the first FinancialTransaction ID from the query. Returns a *NotFoundError when no FinancialTransaction ID was found.
func (*FinancialTransactionQuery) FirstIDX ¶
func (ftq *FinancialTransactionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*FinancialTransactionQuery) FirstX ¶
func (ftq *FinancialTransactionQuery) FirstX(ctx context.Context) *FinancialTransaction
FirstX is like First, but panics if an error occurs.
func (*FinancialTransactionQuery) GroupBy ¶
func (ftq *FinancialTransactionQuery) GroupBy(field string, fields ...string) *FinancialTransactionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.FinancialTransaction.Query(). GroupBy(financialtransaction.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FinancialTransactionQuery) IDs ¶
IDs executes the query and returns a list of FinancialTransaction IDs.
func (*FinancialTransactionQuery) IDsX ¶
func (ftq *FinancialTransactionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*FinancialTransactionQuery) Limit ¶
func (ftq *FinancialTransactionQuery) Limit(limit int) *FinancialTransactionQuery
Limit the number of records to be returned by this query.
func (*FinancialTransactionQuery) Offset ¶
func (ftq *FinancialTransactionQuery) Offset(offset int) *FinancialTransactionQuery
Offset to start from.
func (*FinancialTransactionQuery) Only ¶
func (ftq *FinancialTransactionQuery) Only(ctx context.Context) (*FinancialTransaction, error)
Only returns a single FinancialTransaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one FinancialTransaction entity is found. Returns a *NotFoundError when no FinancialTransaction entities are found.
func (*FinancialTransactionQuery) OnlyID ¶
OnlyID is like Only, but returns the only FinancialTransaction ID in the query. Returns a *NotSingularError when more than one FinancialTransaction ID is found. Returns a *NotFoundError when no entities are found.
func (*FinancialTransactionQuery) OnlyIDX ¶
func (ftq *FinancialTransactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FinancialTransactionQuery) OnlyX ¶
func (ftq *FinancialTransactionQuery) OnlyX(ctx context.Context) *FinancialTransaction
OnlyX is like Only, but panics if an error occurs.
func (*FinancialTransactionQuery) Order ¶
func (ftq *FinancialTransactionQuery) Order(o ...financialtransaction.OrderOption) *FinancialTransactionQuery
Order specifies how the records should be ordered.
func (*FinancialTransactionQuery) QueryInvoice ¶
func (ftq *FinancialTransactionQuery) QueryInvoice() *InvoiceQuery
QueryInvoice chains the current query on the "invoice" edge.
func (*FinancialTransactionQuery) Select ¶
func (ftq *FinancialTransactionQuery) Select(fields ...string) *FinancialTransactionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.FinancialTransaction.Query(). Select(financialtransaction.FieldCreatedAt). Scan(ctx, &v)
func (*FinancialTransactionQuery) Unique ¶
func (ftq *FinancialTransactionQuery) Unique(unique bool) *FinancialTransactionQuery
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 (*FinancialTransactionQuery) Where ¶
func (ftq *FinancialTransactionQuery) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionQuery
Where adds a new predicate for the FinancialTransactionQuery builder.
func (*FinancialTransactionQuery) WithInvoice ¶
func (ftq *FinancialTransactionQuery) WithInvoice(opts ...func(*InvoiceQuery)) *FinancialTransactionQuery
WithInvoice tells the query-builder to eager-load the nodes that are connected to the "invoice" edge. The optional arguments are used to configure the query builder of the edge.
type FinancialTransactionSelect ¶
type FinancialTransactionSelect struct { *FinancialTransactionQuery // contains filtered or unexported fields }
FinancialTransactionSelect is the builder for selecting fields of FinancialTransaction entities.
func (*FinancialTransactionSelect) Aggregate ¶
func (fts *FinancialTransactionSelect) Aggregate(fns ...AggregateFunc) *FinancialTransactionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FinancialTransactionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*FinancialTransactionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*FinancialTransactionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FinancialTransactionSelect) Scan ¶
func (fts *FinancialTransactionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FinancialTransactionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FinancialTransactionUpdate ¶
type FinancialTransactionUpdate struct {
// contains filtered or unexported fields
}
FinancialTransactionUpdate is the builder for updating FinancialTransaction entities.
func (*FinancialTransactionUpdate) ClearComment ¶
func (ftu *FinancialTransactionUpdate) ClearComment() *FinancialTransactionUpdate
ClearComment clears the value of the "comment" field.
func (*FinancialTransactionUpdate) Exec ¶
func (ftu *FinancialTransactionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FinancialTransactionUpdate) ExecX ¶
func (ftu *FinancialTransactionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialTransactionUpdate) Mutation ¶
func (ftu *FinancialTransactionUpdate) Mutation() *FinancialTransactionMutation
Mutation returns the FinancialTransactionMutation object of the builder.
func (*FinancialTransactionUpdate) Save ¶
func (ftu *FinancialTransactionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FinancialTransactionUpdate) SaveX ¶
func (ftu *FinancialTransactionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FinancialTransactionUpdate) SetComment ¶
func (ftu *FinancialTransactionUpdate) SetComment(s string) *FinancialTransactionUpdate
SetComment sets the "comment" field.
func (*FinancialTransactionUpdate) SetNillableComment ¶
func (ftu *FinancialTransactionUpdate) SetNillableComment(s *string) *FinancialTransactionUpdate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*FinancialTransactionUpdate) SetUpdatedAt ¶
func (ftu *FinancialTransactionUpdate) SetUpdatedAt(t time.Time) *FinancialTransactionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FinancialTransactionUpdate) Where ¶
func (ftu *FinancialTransactionUpdate) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionUpdate
Where appends a list predicates to the FinancialTransactionUpdate builder.
type FinancialTransactionUpdateOne ¶
type FinancialTransactionUpdateOne struct {
// contains filtered or unexported fields
}
FinancialTransactionUpdateOne is the builder for updating a single FinancialTransaction entity.
func (*FinancialTransactionUpdateOne) ClearComment ¶
func (ftuo *FinancialTransactionUpdateOne) ClearComment() *FinancialTransactionUpdateOne
ClearComment clears the value of the "comment" field.
func (*FinancialTransactionUpdateOne) Exec ¶
func (ftuo *FinancialTransactionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FinancialTransactionUpdateOne) ExecX ¶
func (ftuo *FinancialTransactionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FinancialTransactionUpdateOne) Mutation ¶
func (ftuo *FinancialTransactionUpdateOne) Mutation() *FinancialTransactionMutation
Mutation returns the FinancialTransactionMutation object of the builder.
func (*FinancialTransactionUpdateOne) Save ¶
func (ftuo *FinancialTransactionUpdateOne) Save(ctx context.Context) (*FinancialTransaction, error)
Save executes the query and returns the updated FinancialTransaction entity.
func (*FinancialTransactionUpdateOne) SaveX ¶
func (ftuo *FinancialTransactionUpdateOne) SaveX(ctx context.Context) *FinancialTransaction
SaveX is like Save, but panics if an error occurs.
func (*FinancialTransactionUpdateOne) Select ¶
func (ftuo *FinancialTransactionUpdateOne) Select(field string, fields ...string) *FinancialTransactionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FinancialTransactionUpdateOne) SetComment ¶
func (ftuo *FinancialTransactionUpdateOne) SetComment(s string) *FinancialTransactionUpdateOne
SetComment sets the "comment" field.
func (*FinancialTransactionUpdateOne) SetNillableComment ¶
func (ftuo *FinancialTransactionUpdateOne) SetNillableComment(s *string) *FinancialTransactionUpdateOne
SetNillableComment sets the "comment" field if the given value is not nil.
func (*FinancialTransactionUpdateOne) SetUpdatedAt ¶
func (ftuo *FinancialTransactionUpdateOne) SetUpdatedAt(t time.Time) *FinancialTransactionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FinancialTransactionUpdateOne) Where ¶
func (ftuo *FinancialTransactionUpdateOne) Where(ps ...predicate.FinancialTransaction) *FinancialTransactionUpdateOne
Where appends a list predicates to the FinancialTransactionUpdate builder.
type FinancialTransactions ¶
type FinancialTransactions []*FinancialTransaction
FinancialTransactions is a parsable slice of FinancialTransaction.
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 Invoice ¶
type Invoice struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // OrderID holds the value of the "order_id" field. OrderID uuid.UUID `json:"order_id,omitempty"` // Total holds the value of the "total" field. Total decimal.Decimal `json:"total,omitempty"` // Comment holds the value of the "comment" field. Comment *string `json:"comment,omitempty"` // Note holds the value of the "note" field. Note *string `json:"note,omitempty"` // Type holds the value of the "type" field. Type invoice.Type `json:"type,omitempty"` // Status holds the value of the "status" field. Status invoice.Status `json:"status,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InvoiceQuery when eager-loading is set. Edges InvoiceEdges `json:"edges"` // contains filtered or unexported fields }
Invoice is the model entity for the Invoice schema.
func (*Invoice) QueryOrder ¶
func (i *Invoice) QueryOrder() *OrderQuery
QueryOrder queries the "order" edge of the Invoice entity.
func (*Invoice) Unwrap ¶
Unwrap unwraps the Invoice 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 (*Invoice) Update ¶
func (i *Invoice) Update() *InvoiceUpdateOne
Update returns a builder for updating this Invoice. Note that you need to call Invoice.Unwrap() before calling this method if this Invoice was returned from a transaction, and the transaction was committed or rolled back.
type InvoiceClient ¶
type InvoiceClient struct {
// contains filtered or unexported fields
}
InvoiceClient is a client for the Invoice schema.
func NewInvoiceClient ¶
func NewInvoiceClient(c config) *InvoiceClient
NewInvoiceClient returns a client for the Invoice from the given config.
func (*InvoiceClient) Create ¶
func (c *InvoiceClient) Create() *InvoiceCreate
Create returns a builder for creating a Invoice entity.
func (*InvoiceClient) CreateBulk ¶
func (c *InvoiceClient) CreateBulk(builders ...*InvoiceCreate) *InvoiceCreateBulk
CreateBulk returns a builder for creating a bulk of Invoice entities.
func (*InvoiceClient) Delete ¶
func (c *InvoiceClient) Delete() *InvoiceDelete
Delete returns a delete builder for Invoice.
func (*InvoiceClient) DeleteOne ¶
func (c *InvoiceClient) DeleteOne(i *Invoice) *InvoiceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InvoiceClient) DeleteOneID ¶
func (c *InvoiceClient) DeleteOneID(id uuid.UUID) *InvoiceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InvoiceClient) Hooks ¶
func (c *InvoiceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InvoiceClient) Intercept ¶
func (c *InvoiceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invoice.Intercept(f(g(h())))`.
func (*InvoiceClient) Interceptors ¶
func (c *InvoiceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InvoiceClient) MapCreateBulk ¶
func (c *InvoiceClient) MapCreateBulk(slice any, setFunc func(*InvoiceCreate, int)) *InvoiceCreateBulk
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 (*InvoiceClient) Query ¶
func (c *InvoiceClient) Query() *InvoiceQuery
Query returns a query builder for Invoice.
func (*InvoiceClient) QueryOrder ¶
func (c *InvoiceClient) QueryOrder(i *Invoice) *OrderQuery
QueryOrder queries the order edge of a Invoice.
func (*InvoiceClient) Update ¶
func (c *InvoiceClient) Update() *InvoiceUpdate
Update returns an update builder for Invoice.
func (*InvoiceClient) UpdateOne ¶
func (c *InvoiceClient) UpdateOne(i *Invoice) *InvoiceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InvoiceClient) UpdateOneID ¶
func (c *InvoiceClient) UpdateOneID(id uuid.UUID) *InvoiceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InvoiceClient) Use ¶
func (c *InvoiceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invoice.Hooks(f(g(h())))`.
type InvoiceCreate ¶
type InvoiceCreate struct {
// contains filtered or unexported fields
}
InvoiceCreate is the builder for creating a Invoice entity.
func (*InvoiceCreate) Exec ¶
func (ic *InvoiceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceCreate) ExecX ¶
func (ic *InvoiceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceCreate) Mutation ¶
func (ic *InvoiceCreate) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceCreate) Save ¶
func (ic *InvoiceCreate) Save(ctx context.Context) (*Invoice, error)
Save creates the Invoice in the database.
func (*InvoiceCreate) SaveX ¶
func (ic *InvoiceCreate) SaveX(ctx context.Context) *Invoice
SaveX calls Save and panics if Save returns an error.
func (*InvoiceCreate) SetComment ¶
func (ic *InvoiceCreate) SetComment(s string) *InvoiceCreate
SetComment sets the "comment" field.
func (*InvoiceCreate) SetCreatedAt ¶
func (ic *InvoiceCreate) SetCreatedAt(t time.Time) *InvoiceCreate
SetCreatedAt sets the "created_at" field.
func (*InvoiceCreate) SetID ¶
func (ic *InvoiceCreate) SetID(u uuid.UUID) *InvoiceCreate
SetID sets the "id" field.
func (*InvoiceCreate) SetNillableComment ¶
func (ic *InvoiceCreate) SetNillableComment(s *string) *InvoiceCreate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*InvoiceCreate) SetNillableCreatedAt ¶
func (ic *InvoiceCreate) SetNillableCreatedAt(t *time.Time) *InvoiceCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*InvoiceCreate) SetNillableID ¶
func (ic *InvoiceCreate) SetNillableID(u *uuid.UUID) *InvoiceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InvoiceCreate) SetNillableNote ¶
func (ic *InvoiceCreate) SetNillableNote(s *string) *InvoiceCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*InvoiceCreate) SetNillableStatus ¶
func (ic *InvoiceCreate) SetNillableStatus(i *invoice.Status) *InvoiceCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InvoiceCreate) SetNillableType ¶
func (ic *InvoiceCreate) SetNillableType(i *invoice.Type) *InvoiceCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*InvoiceCreate) SetNillableUpdatedAt ¶
func (ic *InvoiceCreate) SetNillableUpdatedAt(t *time.Time) *InvoiceCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*InvoiceCreate) SetNote ¶
func (ic *InvoiceCreate) SetNote(s string) *InvoiceCreate
SetNote sets the "note" field.
func (*InvoiceCreate) SetOrder ¶
func (ic *InvoiceCreate) SetOrder(o *Order) *InvoiceCreate
SetOrder sets the "order" edge to the Order entity.
func (*InvoiceCreate) SetOrderID ¶
func (ic *InvoiceCreate) SetOrderID(u uuid.UUID) *InvoiceCreate
SetOrderID sets the "order_id" field.
func (*InvoiceCreate) SetStatus ¶
func (ic *InvoiceCreate) SetStatus(i invoice.Status) *InvoiceCreate
SetStatus sets the "status" field.
func (*InvoiceCreate) SetTotal ¶
func (ic *InvoiceCreate) SetTotal(d decimal.Decimal) *InvoiceCreate
SetTotal sets the "total" field.
func (*InvoiceCreate) SetType ¶
func (ic *InvoiceCreate) SetType(i invoice.Type) *InvoiceCreate
SetType sets the "type" field.
func (*InvoiceCreate) SetUpdatedAt ¶
func (ic *InvoiceCreate) SetUpdatedAt(t time.Time) *InvoiceCreate
SetUpdatedAt sets the "updated_at" field.
type InvoiceCreateBulk ¶
type InvoiceCreateBulk struct {
// contains filtered or unexported fields
}
InvoiceCreateBulk is the builder for creating many Invoice entities in bulk.
func (*InvoiceCreateBulk) Exec ¶
func (icb *InvoiceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceCreateBulk) ExecX ¶
func (icb *InvoiceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type InvoiceDelete ¶
type InvoiceDelete struct {
// contains filtered or unexported fields
}
InvoiceDelete is the builder for deleting a Invoice entity.
func (*InvoiceDelete) Exec ¶
func (id *InvoiceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InvoiceDelete) ExecX ¶
func (id *InvoiceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceDelete) Where ¶
func (id *InvoiceDelete) Where(ps ...predicate.Invoice) *InvoiceDelete
Where appends a list predicates to the InvoiceDelete builder.
type InvoiceDeleteOne ¶
type InvoiceDeleteOne struct {
// contains filtered or unexported fields
}
InvoiceDeleteOne is the builder for deleting a single Invoice entity.
func (*InvoiceDeleteOne) Exec ¶
func (ido *InvoiceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InvoiceDeleteOne) ExecX ¶
func (ido *InvoiceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceDeleteOne) Where ¶
func (ido *InvoiceDeleteOne) Where(ps ...predicate.Invoice) *InvoiceDeleteOne
Where appends a list predicates to the InvoiceDelete builder.
type InvoiceEdges ¶
type InvoiceEdges struct { // Order holds the value of the order edge. Order *Order `json:"order,omitempty"` // contains filtered or unexported fields }
InvoiceEdges holds the relations/edges for other nodes in the graph.
func (InvoiceEdges) OrderOrErr ¶
func (e InvoiceEdges) OrderOrErr() (*Order, error)
OrderOrErr returns the Order value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InvoiceGroupBy ¶
type InvoiceGroupBy struct {
// contains filtered or unexported fields
}
InvoiceGroupBy is the group-by builder for Invoice entities.
func (*InvoiceGroupBy) Aggregate ¶
func (igb *InvoiceGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InvoiceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Scan ¶
func (igb *InvoiceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceLineItem ¶
type InvoiceLineItem struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // InvoiceID holds the value of the "invoice_id" field. InvoiceID uuid.UUID `json:"invoice_id,omitempty"` // OrderLineItemID holds the value of the "order_line_item_id" field. OrderLineItemID uuid.UUID `json:"order_line_item_id,omitempty"` // Qty holds the value of the "qty" field. Qty decimal.Decimal `json:"qty,omitempty"` // Total holds the value of the "total" field. Total decimal.Decimal `json:"total,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InvoiceLineItemQuery when eager-loading is set. Edges InvoiceLineItemEdges `json:"edges"` // contains filtered or unexported fields }
InvoiceLineItem is the model entity for the InvoiceLineItem schema.
func (*InvoiceLineItem) QueryInvoice ¶
func (ili *InvoiceLineItem) QueryInvoice() *InvoiceQuery
QueryInvoice queries the "invoice" edge of the InvoiceLineItem entity.
func (*InvoiceLineItem) QueryOrderLineItem ¶
func (ili *InvoiceLineItem) QueryOrderLineItem() *OrderLineItemQuery
QueryOrderLineItem queries the "order_line_item" edge of the InvoiceLineItem entity.
func (*InvoiceLineItem) String ¶
func (ili *InvoiceLineItem) String() string
String implements the fmt.Stringer.
func (*InvoiceLineItem) Unwrap ¶
func (ili *InvoiceLineItem) Unwrap() *InvoiceLineItem
Unwrap unwraps the InvoiceLineItem 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 (*InvoiceLineItem) Update ¶
func (ili *InvoiceLineItem) Update() *InvoiceLineItemUpdateOne
Update returns a builder for updating this InvoiceLineItem. Note that you need to call InvoiceLineItem.Unwrap() before calling this method if this InvoiceLineItem was returned from a transaction, and the transaction was committed or rolled back.
type InvoiceLineItemClient ¶
type InvoiceLineItemClient struct {
// contains filtered or unexported fields
}
InvoiceLineItemClient is a client for the InvoiceLineItem schema.
func NewInvoiceLineItemClient ¶
func NewInvoiceLineItemClient(c config) *InvoiceLineItemClient
NewInvoiceLineItemClient returns a client for the InvoiceLineItem from the given config.
func (*InvoiceLineItemClient) Create ¶
func (c *InvoiceLineItemClient) Create() *InvoiceLineItemCreate
Create returns a builder for creating a InvoiceLineItem entity.
func (*InvoiceLineItemClient) CreateBulk ¶
func (c *InvoiceLineItemClient) CreateBulk(builders ...*InvoiceLineItemCreate) *InvoiceLineItemCreateBulk
CreateBulk returns a builder for creating a bulk of InvoiceLineItem entities.
func (*InvoiceLineItemClient) Delete ¶
func (c *InvoiceLineItemClient) Delete() *InvoiceLineItemDelete
Delete returns a delete builder for InvoiceLineItem.
func (*InvoiceLineItemClient) DeleteOne ¶
func (c *InvoiceLineItemClient) DeleteOne(ili *InvoiceLineItem) *InvoiceLineItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InvoiceLineItemClient) DeleteOneID ¶
func (c *InvoiceLineItemClient) DeleteOneID(id uuid.UUID) *InvoiceLineItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InvoiceLineItemClient) Get ¶
func (c *InvoiceLineItemClient) Get(ctx context.Context, id uuid.UUID) (*InvoiceLineItem, error)
Get returns a InvoiceLineItem entity by its id.
func (*InvoiceLineItemClient) GetX ¶
func (c *InvoiceLineItemClient) GetX(ctx context.Context, id uuid.UUID) *InvoiceLineItem
GetX is like Get, but panics if an error occurs.
func (*InvoiceLineItemClient) Hooks ¶
func (c *InvoiceLineItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InvoiceLineItemClient) Intercept ¶
func (c *InvoiceLineItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invoicelineitem.Intercept(f(g(h())))`.
func (*InvoiceLineItemClient) Interceptors ¶
func (c *InvoiceLineItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InvoiceLineItemClient) MapCreateBulk ¶
func (c *InvoiceLineItemClient) MapCreateBulk(slice any, setFunc func(*InvoiceLineItemCreate, int)) *InvoiceLineItemCreateBulk
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 (*InvoiceLineItemClient) Query ¶
func (c *InvoiceLineItemClient) Query() *InvoiceLineItemQuery
Query returns a query builder for InvoiceLineItem.
func (*InvoiceLineItemClient) QueryInvoice ¶
func (c *InvoiceLineItemClient) QueryInvoice(ili *InvoiceLineItem) *InvoiceQuery
QueryInvoice queries the invoice edge of a InvoiceLineItem.
func (*InvoiceLineItemClient) QueryOrderLineItem ¶
func (c *InvoiceLineItemClient) QueryOrderLineItem(ili *InvoiceLineItem) *OrderLineItemQuery
QueryOrderLineItem queries the order_line_item edge of a InvoiceLineItem.
func (*InvoiceLineItemClient) Update ¶
func (c *InvoiceLineItemClient) Update() *InvoiceLineItemUpdate
Update returns an update builder for InvoiceLineItem.
func (*InvoiceLineItemClient) UpdateOne ¶
func (c *InvoiceLineItemClient) UpdateOne(ili *InvoiceLineItem) *InvoiceLineItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InvoiceLineItemClient) UpdateOneID ¶
func (c *InvoiceLineItemClient) UpdateOneID(id uuid.UUID) *InvoiceLineItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InvoiceLineItemClient) Use ¶
func (c *InvoiceLineItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invoicelineitem.Hooks(f(g(h())))`.
type InvoiceLineItemCreate ¶
type InvoiceLineItemCreate struct {
// contains filtered or unexported fields
}
InvoiceLineItemCreate is the builder for creating a InvoiceLineItem entity.
func (*InvoiceLineItemCreate) Exec ¶
func (ilic *InvoiceLineItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceLineItemCreate) ExecX ¶
func (ilic *InvoiceLineItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceLineItemCreate) Mutation ¶
func (ilic *InvoiceLineItemCreate) Mutation() *InvoiceLineItemMutation
Mutation returns the InvoiceLineItemMutation object of the builder.
func (*InvoiceLineItemCreate) Save ¶
func (ilic *InvoiceLineItemCreate) Save(ctx context.Context) (*InvoiceLineItem, error)
Save creates the InvoiceLineItem in the database.
func (*InvoiceLineItemCreate) SaveX ¶
func (ilic *InvoiceLineItemCreate) SaveX(ctx context.Context) *InvoiceLineItem
SaveX calls Save and panics if Save returns an error.
func (*InvoiceLineItemCreate) SetCreatedAt ¶
func (ilic *InvoiceLineItemCreate) SetCreatedAt(t time.Time) *InvoiceLineItemCreate
SetCreatedAt sets the "created_at" field.
func (*InvoiceLineItemCreate) SetID ¶
func (ilic *InvoiceLineItemCreate) SetID(u uuid.UUID) *InvoiceLineItemCreate
SetID sets the "id" field.
func (*InvoiceLineItemCreate) SetInvoice ¶
func (ilic *InvoiceLineItemCreate) SetInvoice(i *Invoice) *InvoiceLineItemCreate
SetInvoice sets the "invoice" edge to the Invoice entity.
func (*InvoiceLineItemCreate) SetInvoiceID ¶
func (ilic *InvoiceLineItemCreate) SetInvoiceID(u uuid.UUID) *InvoiceLineItemCreate
SetInvoiceID sets the "invoice_id" field.
func (*InvoiceLineItemCreate) SetNillableCreatedAt ¶
func (ilic *InvoiceLineItemCreate) SetNillableCreatedAt(t *time.Time) *InvoiceLineItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*InvoiceLineItemCreate) SetNillableID ¶
func (ilic *InvoiceLineItemCreate) SetNillableID(u *uuid.UUID) *InvoiceLineItemCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InvoiceLineItemCreate) SetOrderLineItem ¶
func (ilic *InvoiceLineItemCreate) SetOrderLineItem(o *OrderLineItem) *InvoiceLineItemCreate
SetOrderLineItem sets the "order_line_item" edge to the OrderLineItem entity.
func (*InvoiceLineItemCreate) SetOrderLineItemID ¶
func (ilic *InvoiceLineItemCreate) SetOrderLineItemID(u uuid.UUID) *InvoiceLineItemCreate
SetOrderLineItemID sets the "order_line_item_id" field.
func (*InvoiceLineItemCreate) SetQty ¶
func (ilic *InvoiceLineItemCreate) SetQty(d decimal.Decimal) *InvoiceLineItemCreate
SetQty sets the "qty" field.
func (*InvoiceLineItemCreate) SetTotal ¶
func (ilic *InvoiceLineItemCreate) SetTotal(d decimal.Decimal) *InvoiceLineItemCreate
SetTotal sets the "total" field.
type InvoiceLineItemCreateBulk ¶
type InvoiceLineItemCreateBulk struct {
// contains filtered or unexported fields
}
InvoiceLineItemCreateBulk is the builder for creating many InvoiceLineItem entities in bulk.
func (*InvoiceLineItemCreateBulk) Exec ¶
func (ilicb *InvoiceLineItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceLineItemCreateBulk) ExecX ¶
func (ilicb *InvoiceLineItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceLineItemCreateBulk) Save ¶
func (ilicb *InvoiceLineItemCreateBulk) Save(ctx context.Context) ([]*InvoiceLineItem, error)
Save creates the InvoiceLineItem entities in the database.
func (*InvoiceLineItemCreateBulk) SaveX ¶
func (ilicb *InvoiceLineItemCreateBulk) SaveX(ctx context.Context) []*InvoiceLineItem
SaveX is like Save, but panics if an error occurs.
type InvoiceLineItemDelete ¶
type InvoiceLineItemDelete struct {
// contains filtered or unexported fields
}
InvoiceLineItemDelete is the builder for deleting a InvoiceLineItem entity.
func (*InvoiceLineItemDelete) Exec ¶
func (ilid *InvoiceLineItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InvoiceLineItemDelete) ExecX ¶
func (ilid *InvoiceLineItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceLineItemDelete) Where ¶
func (ilid *InvoiceLineItemDelete) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemDelete
Where appends a list predicates to the InvoiceLineItemDelete builder.
type InvoiceLineItemDeleteOne ¶
type InvoiceLineItemDeleteOne struct {
// contains filtered or unexported fields
}
InvoiceLineItemDeleteOne is the builder for deleting a single InvoiceLineItem entity.
func (*InvoiceLineItemDeleteOne) Exec ¶
func (ilido *InvoiceLineItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InvoiceLineItemDeleteOne) ExecX ¶
func (ilido *InvoiceLineItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceLineItemDeleteOne) Where ¶
func (ilido *InvoiceLineItemDeleteOne) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemDeleteOne
Where appends a list predicates to the InvoiceLineItemDelete builder.
type InvoiceLineItemEdges ¶
type InvoiceLineItemEdges struct { // Invoice holds the value of the invoice edge. Invoice *Invoice `json:"invoice,omitempty"` // OrderLineItem holds the value of the order_line_item edge. OrderLineItem *OrderLineItem `json:"order_line_item,omitempty"` // contains filtered or unexported fields }
InvoiceLineItemEdges holds the relations/edges for other nodes in the graph.
func (InvoiceLineItemEdges) InvoiceOrErr ¶
func (e InvoiceLineItemEdges) InvoiceOrErr() (*Invoice, error)
InvoiceOrErr returns the Invoice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InvoiceLineItemEdges) OrderLineItemOrErr ¶
func (e InvoiceLineItemEdges) OrderLineItemOrErr() (*OrderLineItem, error)
OrderLineItemOrErr returns the OrderLineItem value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InvoiceLineItemGroupBy ¶
type InvoiceLineItemGroupBy struct {
// contains filtered or unexported fields
}
InvoiceLineItemGroupBy is the group-by builder for InvoiceLineItem entities.
func (*InvoiceLineItemGroupBy) Aggregate ¶
func (iligb *InvoiceLineItemGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceLineItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InvoiceLineItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InvoiceLineItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemGroupBy) Scan ¶
func (iligb *InvoiceLineItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceLineItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceLineItemMutation ¶
type InvoiceLineItemMutation struct {
// contains filtered or unexported fields
}
InvoiceLineItemMutation represents an operation that mutates the InvoiceLineItem nodes in the graph.
func (*InvoiceLineItemMutation) AddField ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) AddQty ¶
func (m *InvoiceLineItemMutation) AddQty(d decimal.Decimal)
AddQty adds d to the "qty" field.
func (*InvoiceLineItemMutation) AddTotal ¶
func (m *InvoiceLineItemMutation) AddTotal(d decimal.Decimal)
AddTotal adds d to the "total" field.
func (*InvoiceLineItemMutation) AddedEdges ¶
func (m *InvoiceLineItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InvoiceLineItemMutation) AddedField ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) AddedFields ¶
func (m *InvoiceLineItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InvoiceLineItemMutation) AddedIDs ¶
func (m *InvoiceLineItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InvoiceLineItemMutation) AddedQty ¶
func (m *InvoiceLineItemMutation) AddedQty() (r decimal.Decimal, exists bool)
AddedQty returns the value that was added to the "qty" field in this mutation.
func (*InvoiceLineItemMutation) AddedTotal ¶
func (m *InvoiceLineItemMutation) AddedTotal() (r decimal.Decimal, exists bool)
AddedTotal returns the value that was added to the "total" field in this mutation.
func (*InvoiceLineItemMutation) ClearEdge ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) ClearField ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) ClearInvoice ¶
func (m *InvoiceLineItemMutation) ClearInvoice()
ClearInvoice clears the "invoice" edge to the Invoice entity.
func (*InvoiceLineItemMutation) ClearOrderLineItem ¶
func (m *InvoiceLineItemMutation) ClearOrderLineItem()
ClearOrderLineItem clears the "order_line_item" edge to the OrderLineItem entity.
func (*InvoiceLineItemMutation) ClearedEdges ¶
func (m *InvoiceLineItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InvoiceLineItemMutation) ClearedFields ¶
func (m *InvoiceLineItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InvoiceLineItemMutation) Client ¶
func (m InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) CreatedAt ¶
func (m *InvoiceLineItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*InvoiceLineItemMutation) EdgeCleared ¶
func (m *InvoiceLineItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InvoiceLineItemMutation) Field ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) FieldCleared ¶
func (m *InvoiceLineItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InvoiceLineItemMutation) Fields ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) ID ¶
func (m *InvoiceLineItemMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*InvoiceLineItemMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InvoiceLineItemMutation) InvoiceCleared ¶
func (m *InvoiceLineItemMutation) InvoiceCleared() bool
InvoiceCleared reports if the "invoice" edge to the Invoice entity was cleared.
func (*InvoiceLineItemMutation) InvoiceID ¶
func (m *InvoiceLineItemMutation) InvoiceID() (r uuid.UUID, exists bool)
InvoiceID returns the value of the "invoice_id" field in the mutation.
func (*InvoiceLineItemMutation) InvoiceIDs ¶
func (m *InvoiceLineItemMutation) InvoiceIDs() (ids []uuid.UUID)
InvoiceIDs returns the "invoice" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InvoiceID instead. It exists only for internal usage by the builders.
func (*InvoiceLineItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the InvoiceLineItem entity. If the InvoiceLineItem 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 (*InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) OldInvoiceID ¶
OldInvoiceID returns the old "invoice_id" field's value of the InvoiceLineItem entity. If the InvoiceLineItem 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 (*InvoiceLineItemMutation) OldOrderLineItemID ¶
OldOrderLineItemID returns the old "order_line_item_id" field's value of the InvoiceLineItem entity. If the InvoiceLineItem 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 (*InvoiceLineItemMutation) OldQty ¶
OldQty returns the old "qty" field's value of the InvoiceLineItem entity. If the InvoiceLineItem 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 (*InvoiceLineItemMutation) OldTotal ¶
OldTotal returns the old "total" field's value of the InvoiceLineItem entity. If the InvoiceLineItem 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 (*InvoiceLineItemMutation) Op ¶
func (m *InvoiceLineItemMutation) Op() Op
Op returns the operation name.
func (*InvoiceLineItemMutation) OrderLineItemCleared ¶
func (m *InvoiceLineItemMutation) OrderLineItemCleared() bool
OrderLineItemCleared reports if the "order_line_item" edge to the OrderLineItem entity was cleared.
func (*InvoiceLineItemMutation) OrderLineItemID ¶
func (m *InvoiceLineItemMutation) OrderLineItemID() (r uuid.UUID, exists bool)
OrderLineItemID returns the value of the "order_line_item_id" field in the mutation.
func (*InvoiceLineItemMutation) OrderLineItemIDs ¶
func (m *InvoiceLineItemMutation) OrderLineItemIDs() (ids []uuid.UUID)
OrderLineItemIDs returns the "order_line_item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderLineItemID instead. It exists only for internal usage by the builders.
func (*InvoiceLineItemMutation) Qty ¶
func (m *InvoiceLineItemMutation) Qty() (r decimal.Decimal, exists bool)
Qty returns the value of the "qty" field in the mutation.
func (*InvoiceLineItemMutation) RemovedEdges ¶
func (m *InvoiceLineItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InvoiceLineItemMutation) RemovedIDs ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) ResetCreatedAt ¶
func (m *InvoiceLineItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*InvoiceLineItemMutation) ResetEdge ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) ResetField ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) ResetInvoice ¶
func (m *InvoiceLineItemMutation) ResetInvoice()
ResetInvoice resets all changes to the "invoice" edge.
func (*InvoiceLineItemMutation) ResetInvoiceID ¶
func (m *InvoiceLineItemMutation) ResetInvoiceID()
ResetInvoiceID resets all changes to the "invoice_id" field.
func (*InvoiceLineItemMutation) ResetOrderLineItem ¶
func (m *InvoiceLineItemMutation) ResetOrderLineItem()
ResetOrderLineItem resets all changes to the "order_line_item" edge.
func (*InvoiceLineItemMutation) ResetOrderLineItemID ¶
func (m *InvoiceLineItemMutation) ResetOrderLineItemID()
ResetOrderLineItemID resets all changes to the "order_line_item_id" field.
func (*InvoiceLineItemMutation) ResetQty ¶
func (m *InvoiceLineItemMutation) ResetQty()
ResetQty resets all changes to the "qty" field.
func (*InvoiceLineItemMutation) ResetTotal ¶
func (m *InvoiceLineItemMutation) ResetTotal()
ResetTotal resets all changes to the "total" field.
func (*InvoiceLineItemMutation) SetCreatedAt ¶
func (m *InvoiceLineItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*InvoiceLineItemMutation) SetField ¶
func (m *InvoiceLineItemMutation) 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 (*InvoiceLineItemMutation) SetID ¶
func (m *InvoiceLineItemMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of InvoiceLineItem entities.
func (*InvoiceLineItemMutation) SetInvoiceID ¶
func (m *InvoiceLineItemMutation) SetInvoiceID(u uuid.UUID)
SetInvoiceID sets the "invoice_id" field.
func (*InvoiceLineItemMutation) SetOp ¶
func (m *InvoiceLineItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InvoiceLineItemMutation) SetOrderLineItemID ¶
func (m *InvoiceLineItemMutation) SetOrderLineItemID(u uuid.UUID)
SetOrderLineItemID sets the "order_line_item_id" field.
func (*InvoiceLineItemMutation) SetQty ¶
func (m *InvoiceLineItemMutation) SetQty(d decimal.Decimal)
SetQty sets the "qty" field.
func (*InvoiceLineItemMutation) SetTotal ¶
func (m *InvoiceLineItemMutation) SetTotal(d decimal.Decimal)
SetTotal sets the "total" field.
func (*InvoiceLineItemMutation) Total ¶
func (m *InvoiceLineItemMutation) Total() (r decimal.Decimal, exists bool)
Total returns the value of the "total" field in the mutation.
func (InvoiceLineItemMutation) Tx ¶
func (m InvoiceLineItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InvoiceLineItemMutation) Type ¶
func (m *InvoiceLineItemMutation) Type() string
Type returns the node type of this mutation (InvoiceLineItem).
func (*InvoiceLineItemMutation) Where ¶
func (m *InvoiceLineItemMutation) Where(ps ...predicate.InvoiceLineItem)
Where appends a list predicates to the InvoiceLineItemMutation builder.
func (*InvoiceLineItemMutation) WhereP ¶
func (m *InvoiceLineItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InvoiceLineItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InvoiceLineItemQuery ¶
type InvoiceLineItemQuery struct {
// contains filtered or unexported fields
}
InvoiceLineItemQuery is the builder for querying InvoiceLineItem entities.
func (*InvoiceLineItemQuery) Aggregate ¶
func (iliq *InvoiceLineItemQuery) Aggregate(fns ...AggregateFunc) *InvoiceLineItemSelect
Aggregate returns a InvoiceLineItemSelect configured with the given aggregations.
func (*InvoiceLineItemQuery) All ¶
func (iliq *InvoiceLineItemQuery) All(ctx context.Context) ([]*InvoiceLineItem, error)
All executes the query and returns a list of InvoiceLineItems.
func (*InvoiceLineItemQuery) AllX ¶
func (iliq *InvoiceLineItemQuery) AllX(ctx context.Context) []*InvoiceLineItem
AllX is like All, but panics if an error occurs.
func (*InvoiceLineItemQuery) Clone ¶
func (iliq *InvoiceLineItemQuery) Clone() *InvoiceLineItemQuery
Clone returns a duplicate of the InvoiceLineItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InvoiceLineItemQuery) Count ¶
func (iliq *InvoiceLineItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InvoiceLineItemQuery) CountX ¶
func (iliq *InvoiceLineItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InvoiceLineItemQuery) Exist ¶
func (iliq *InvoiceLineItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InvoiceLineItemQuery) ExistX ¶
func (iliq *InvoiceLineItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InvoiceLineItemQuery) First ¶
func (iliq *InvoiceLineItemQuery) First(ctx context.Context) (*InvoiceLineItem, error)
First returns the first InvoiceLineItem entity from the query. Returns a *NotFoundError when no InvoiceLineItem was found.
func (*InvoiceLineItemQuery) FirstID ¶
FirstID returns the first InvoiceLineItem ID from the query. Returns a *NotFoundError when no InvoiceLineItem ID was found.
func (*InvoiceLineItemQuery) FirstIDX ¶
func (iliq *InvoiceLineItemQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InvoiceLineItemQuery) FirstX ¶
func (iliq *InvoiceLineItemQuery) FirstX(ctx context.Context) *InvoiceLineItem
FirstX is like First, but panics if an error occurs.
func (*InvoiceLineItemQuery) GroupBy ¶
func (iliq *InvoiceLineItemQuery) GroupBy(field string, fields ...string) *InvoiceLineItemGroupBy
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 { InvoiceID uuid.UUID `json:"invoice_id,omitempty"` Count int `json:"count,omitempty"` } client.InvoiceLineItem.Query(). GroupBy(invoicelineitem.FieldInvoiceID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InvoiceLineItemQuery) IDs ¶
IDs executes the query and returns a list of InvoiceLineItem IDs.
func (*InvoiceLineItemQuery) IDsX ¶
func (iliq *InvoiceLineItemQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InvoiceLineItemQuery) Limit ¶
func (iliq *InvoiceLineItemQuery) Limit(limit int) *InvoiceLineItemQuery
Limit the number of records to be returned by this query.
func (*InvoiceLineItemQuery) Offset ¶
func (iliq *InvoiceLineItemQuery) Offset(offset int) *InvoiceLineItemQuery
Offset to start from.
func (*InvoiceLineItemQuery) Only ¶
func (iliq *InvoiceLineItemQuery) Only(ctx context.Context) (*InvoiceLineItem, error)
Only returns a single InvoiceLineItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one InvoiceLineItem entity is found. Returns a *NotFoundError when no InvoiceLineItem entities are found.
func (*InvoiceLineItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only InvoiceLineItem ID in the query. Returns a *NotSingularError when more than one InvoiceLineItem ID is found. Returns a *NotFoundError when no entities are found.
func (*InvoiceLineItemQuery) OnlyIDX ¶
func (iliq *InvoiceLineItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InvoiceLineItemQuery) OnlyX ¶
func (iliq *InvoiceLineItemQuery) OnlyX(ctx context.Context) *InvoiceLineItem
OnlyX is like Only, but panics if an error occurs.
func (*InvoiceLineItemQuery) Order ¶
func (iliq *InvoiceLineItemQuery) Order(o ...invoicelineitem.OrderOption) *InvoiceLineItemQuery
Order specifies how the records should be ordered.
func (*InvoiceLineItemQuery) QueryInvoice ¶
func (iliq *InvoiceLineItemQuery) QueryInvoice() *InvoiceQuery
QueryInvoice chains the current query on the "invoice" edge.
func (*InvoiceLineItemQuery) QueryOrderLineItem ¶
func (iliq *InvoiceLineItemQuery) QueryOrderLineItem() *OrderLineItemQuery
QueryOrderLineItem chains the current query on the "order_line_item" edge.
func (*InvoiceLineItemQuery) Select ¶
func (iliq *InvoiceLineItemQuery) Select(fields ...string) *InvoiceLineItemSelect
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 { InvoiceID uuid.UUID `json:"invoice_id,omitempty"` } client.InvoiceLineItem.Query(). Select(invoicelineitem.FieldInvoiceID). Scan(ctx, &v)
func (*InvoiceLineItemQuery) Unique ¶
func (iliq *InvoiceLineItemQuery) Unique(unique bool) *InvoiceLineItemQuery
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 (*InvoiceLineItemQuery) Where ¶
func (iliq *InvoiceLineItemQuery) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemQuery
Where adds a new predicate for the InvoiceLineItemQuery builder.
func (*InvoiceLineItemQuery) WithInvoice ¶
func (iliq *InvoiceLineItemQuery) WithInvoice(opts ...func(*InvoiceQuery)) *InvoiceLineItemQuery
WithInvoice tells the query-builder to eager-load the nodes that are connected to the "invoice" edge. The optional arguments are used to configure the query builder of the edge.
func (*InvoiceLineItemQuery) WithOrderLineItem ¶
func (iliq *InvoiceLineItemQuery) WithOrderLineItem(opts ...func(*OrderLineItemQuery)) *InvoiceLineItemQuery
WithOrderLineItem tells the query-builder to eager-load the nodes that are connected to the "order_line_item" edge. The optional arguments are used to configure the query builder of the edge.
type InvoiceLineItemSelect ¶
type InvoiceLineItemSelect struct { *InvoiceLineItemQuery // contains filtered or unexported fields }
InvoiceLineItemSelect is the builder for selecting fields of InvoiceLineItem entities.
func (*InvoiceLineItemSelect) Aggregate ¶
func (ilis *InvoiceLineItemSelect) Aggregate(fns ...AggregateFunc) *InvoiceLineItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InvoiceLineItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InvoiceLineItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceLineItemSelect) Scan ¶
func (ilis *InvoiceLineItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceLineItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceLineItemUpdate ¶
type InvoiceLineItemUpdate struct {
// contains filtered or unexported fields
}
InvoiceLineItemUpdate is the builder for updating InvoiceLineItem entities.
func (*InvoiceLineItemUpdate) Exec ¶
func (iliu *InvoiceLineItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceLineItemUpdate) ExecX ¶
func (iliu *InvoiceLineItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceLineItemUpdate) Mutation ¶
func (iliu *InvoiceLineItemUpdate) Mutation() *InvoiceLineItemMutation
Mutation returns the InvoiceLineItemMutation object of the builder.
func (*InvoiceLineItemUpdate) Save ¶
func (iliu *InvoiceLineItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InvoiceLineItemUpdate) SaveX ¶
func (iliu *InvoiceLineItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InvoiceLineItemUpdate) Where ¶
func (iliu *InvoiceLineItemUpdate) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemUpdate
Where appends a list predicates to the InvoiceLineItemUpdate builder.
type InvoiceLineItemUpdateOne ¶
type InvoiceLineItemUpdateOne struct {
// contains filtered or unexported fields
}
InvoiceLineItemUpdateOne is the builder for updating a single InvoiceLineItem entity.
func (*InvoiceLineItemUpdateOne) Exec ¶
func (iliuo *InvoiceLineItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InvoiceLineItemUpdateOne) ExecX ¶
func (iliuo *InvoiceLineItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceLineItemUpdateOne) Mutation ¶
func (iliuo *InvoiceLineItemUpdateOne) Mutation() *InvoiceLineItemMutation
Mutation returns the InvoiceLineItemMutation object of the builder.
func (*InvoiceLineItemUpdateOne) Save ¶
func (iliuo *InvoiceLineItemUpdateOne) Save(ctx context.Context) (*InvoiceLineItem, error)
Save executes the query and returns the updated InvoiceLineItem entity.
func (*InvoiceLineItemUpdateOne) SaveX ¶
func (iliuo *InvoiceLineItemUpdateOne) SaveX(ctx context.Context) *InvoiceLineItem
SaveX is like Save, but panics if an error occurs.
func (*InvoiceLineItemUpdateOne) Select ¶
func (iliuo *InvoiceLineItemUpdateOne) Select(field string, fields ...string) *InvoiceLineItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InvoiceLineItemUpdateOne) Where ¶
func (iliuo *InvoiceLineItemUpdateOne) Where(ps ...predicate.InvoiceLineItem) *InvoiceLineItemUpdateOne
Where appends a list predicates to the InvoiceLineItemUpdate builder.
type InvoiceLineItems ¶
type InvoiceLineItems []*InvoiceLineItem
InvoiceLineItems is a parsable slice of InvoiceLineItem.
type InvoiceMutation ¶
type InvoiceMutation struct {
// contains filtered or unexported fields
}
InvoiceMutation represents an operation that mutates the Invoice nodes in the graph.
func (*InvoiceMutation) AddField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) AddTotal ¶
func (m *InvoiceMutation) AddTotal(d decimal.Decimal)
AddTotal adds d to the "total" field.
func (*InvoiceMutation) AddedEdges ¶
func (m *InvoiceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InvoiceMutation) AddedField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) AddedFields ¶
func (m *InvoiceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InvoiceMutation) AddedIDs ¶
func (m *InvoiceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InvoiceMutation) AddedTotal ¶
func (m *InvoiceMutation) AddedTotal() (r decimal.Decimal, exists bool)
AddedTotal returns the value that was added to the "total" field in this mutation.
func (*InvoiceMutation) ClearComment ¶
func (m *InvoiceMutation) ClearComment()
ClearComment clears the value of the "comment" field.
func (*InvoiceMutation) ClearEdge ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ClearField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ClearNote ¶
func (m *InvoiceMutation) ClearNote()
ClearNote clears the value of the "note" field.
func (*InvoiceMutation) ClearOrder ¶
func (m *InvoiceMutation) ClearOrder()
ClearOrder clears the "order" edge to the Order entity.
func (*InvoiceMutation) ClearedEdges ¶
func (m *InvoiceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InvoiceMutation) ClearedFields ¶
func (m *InvoiceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InvoiceMutation) Client ¶
func (m InvoiceMutation) 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 (*InvoiceMutation) Comment ¶
func (m *InvoiceMutation) Comment() (r string, exists bool)
Comment returns the value of the "comment" field in the mutation.
func (*InvoiceMutation) CommentCleared ¶
func (m *InvoiceMutation) CommentCleared() bool
CommentCleared returns if the "comment" field was cleared in this mutation.
func (*InvoiceMutation) CreatedAt ¶
func (m *InvoiceMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*InvoiceMutation) EdgeCleared ¶
func (m *InvoiceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InvoiceMutation) Field ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) FieldCleared ¶
func (m *InvoiceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InvoiceMutation) Fields ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) GetType ¶
func (m *InvoiceMutation) GetType() (r invoice.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*InvoiceMutation) ID ¶
func (m *InvoiceMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*InvoiceMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InvoiceMutation) Note ¶
func (m *InvoiceMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*InvoiceMutation) NoteCleared ¶
func (m *InvoiceMutation) NoteCleared() bool
NoteCleared returns if the "note" field was cleared in this mutation.
func (*InvoiceMutation) OldComment ¶
func (m *InvoiceMutation) OldComment(ctx context.Context) (v *string, err error)
OldComment returns the old "comment" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) 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 (*InvoiceMutation) OldNote ¶
func (m *InvoiceMutation) OldNote(ctx context.Context) (v *string, err error)
OldNote returns the old "note" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldOrderID ¶
OldOrderID returns the old "order_id" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldTotal ¶
OldTotal returns the old "total" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldType ¶
OldType returns the old "type" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OrderCleared ¶
func (m *InvoiceMutation) OrderCleared() bool
OrderCleared reports if the "order" edge to the Order entity was cleared.
func (*InvoiceMutation) OrderID ¶
func (m *InvoiceMutation) OrderID() (r uuid.UUID, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*InvoiceMutation) OrderIDs ¶
func (m *InvoiceMutation) OrderIDs() (ids []uuid.UUID)
OrderIDs returns the "order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderID instead. It exists only for internal usage by the builders.
func (*InvoiceMutation) RemovedEdges ¶
func (m *InvoiceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InvoiceMutation) RemovedIDs ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ResetComment ¶
func (m *InvoiceMutation) ResetComment()
ResetComment resets all changes to the "comment" field.
func (*InvoiceMutation) ResetCreatedAt ¶
func (m *InvoiceMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*InvoiceMutation) ResetEdge ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ResetField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ResetNote ¶
func (m *InvoiceMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*InvoiceMutation) ResetOrder ¶
func (m *InvoiceMutation) ResetOrder()
ResetOrder resets all changes to the "order" edge.
func (*InvoiceMutation) ResetOrderID ¶
func (m *InvoiceMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*InvoiceMutation) ResetStatus ¶
func (m *InvoiceMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*InvoiceMutation) ResetTotal ¶
func (m *InvoiceMutation) ResetTotal()
ResetTotal resets all changes to the "total" field.
func (*InvoiceMutation) ResetType ¶
func (m *InvoiceMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*InvoiceMutation) ResetUpdatedAt ¶
func (m *InvoiceMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*InvoiceMutation) SetComment ¶
func (m *InvoiceMutation) SetComment(s string)
SetComment sets the "comment" field.
func (*InvoiceMutation) SetCreatedAt ¶
func (m *InvoiceMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*InvoiceMutation) SetField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) SetID ¶
func (m *InvoiceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Invoice entities.
func (*InvoiceMutation) SetNote ¶
func (m *InvoiceMutation) SetNote(s string)
SetNote sets the "note" field.
func (*InvoiceMutation) SetOp ¶
func (m *InvoiceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InvoiceMutation) SetOrderID ¶
func (m *InvoiceMutation) SetOrderID(u uuid.UUID)
SetOrderID sets the "order_id" field.
func (*InvoiceMutation) SetStatus ¶
func (m *InvoiceMutation) SetStatus(i invoice.Status)
SetStatus sets the "status" field.
func (*InvoiceMutation) SetTotal ¶
func (m *InvoiceMutation) SetTotal(d decimal.Decimal)
SetTotal sets the "total" field.
func (*InvoiceMutation) SetType ¶
func (m *InvoiceMutation) SetType(i invoice.Type)
SetType sets the "type" field.
func (*InvoiceMutation) SetUpdatedAt ¶
func (m *InvoiceMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceMutation) Status ¶
func (m *InvoiceMutation) Status() (r invoice.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*InvoiceMutation) Total ¶
func (m *InvoiceMutation) Total() (r decimal.Decimal, exists bool)
Total returns the value of the "total" field in the mutation.
func (InvoiceMutation) Tx ¶
func (m InvoiceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InvoiceMutation) Type ¶
func (m *InvoiceMutation) Type() string
Type returns the node type of this mutation (Invoice).
func (*InvoiceMutation) UpdatedAt ¶
func (m *InvoiceMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*InvoiceMutation) Where ¶
func (m *InvoiceMutation) Where(ps ...predicate.Invoice)
Where appends a list predicates to the InvoiceMutation builder.
func (*InvoiceMutation) WhereP ¶
func (m *InvoiceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InvoiceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InvoiceQuery ¶
type InvoiceQuery struct {
// contains filtered or unexported fields
}
InvoiceQuery is the builder for querying Invoice entities.
func (*InvoiceQuery) Aggregate ¶
func (iq *InvoiceQuery) Aggregate(fns ...AggregateFunc) *InvoiceSelect
Aggregate returns a InvoiceSelect configured with the given aggregations.
func (*InvoiceQuery) All ¶
func (iq *InvoiceQuery) All(ctx context.Context) ([]*Invoice, error)
All executes the query and returns a list of Invoices.
func (*InvoiceQuery) AllX ¶
func (iq *InvoiceQuery) AllX(ctx context.Context) []*Invoice
AllX is like All, but panics if an error occurs.
func (*InvoiceQuery) Clone ¶
func (iq *InvoiceQuery) Clone() *InvoiceQuery
Clone returns a duplicate of the InvoiceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InvoiceQuery) Count ¶
func (iq *InvoiceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InvoiceQuery) CountX ¶
func (iq *InvoiceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InvoiceQuery) Exist ¶
func (iq *InvoiceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InvoiceQuery) ExistX ¶
func (iq *InvoiceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InvoiceQuery) First ¶
func (iq *InvoiceQuery) First(ctx context.Context) (*Invoice, error)
First returns the first Invoice entity from the query. Returns a *NotFoundError when no Invoice was found.
func (*InvoiceQuery) FirstID ¶
FirstID returns the first Invoice ID from the query. Returns a *NotFoundError when no Invoice ID was found.
func (*InvoiceQuery) FirstIDX ¶
func (iq *InvoiceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InvoiceQuery) FirstX ¶
func (iq *InvoiceQuery) FirstX(ctx context.Context) *Invoice
FirstX is like First, but panics if an error occurs.
func (*InvoiceQuery) GroupBy ¶
func (iq *InvoiceQuery) GroupBy(field string, fields ...string) *InvoiceGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Invoice.Query(). GroupBy(invoice.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InvoiceQuery) IDsX ¶
func (iq *InvoiceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InvoiceQuery) Limit ¶
func (iq *InvoiceQuery) Limit(limit int) *InvoiceQuery
Limit the number of records to be returned by this query.
func (*InvoiceQuery) Offset ¶
func (iq *InvoiceQuery) Offset(offset int) *InvoiceQuery
Offset to start from.
func (*InvoiceQuery) Only ¶
func (iq *InvoiceQuery) Only(ctx context.Context) (*Invoice, error)
Only returns a single Invoice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Invoice entity is found. Returns a *NotFoundError when no Invoice entities are found.
func (*InvoiceQuery) OnlyID ¶
OnlyID is like Only, but returns the only Invoice ID in the query. Returns a *NotSingularError when more than one Invoice ID is found. Returns a *NotFoundError when no entities are found.
func (*InvoiceQuery) OnlyIDX ¶
func (iq *InvoiceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InvoiceQuery) OnlyX ¶
func (iq *InvoiceQuery) OnlyX(ctx context.Context) *Invoice
OnlyX is like Only, but panics if an error occurs.
func (*InvoiceQuery) Order ¶
func (iq *InvoiceQuery) Order(o ...invoice.OrderOption) *InvoiceQuery
Order specifies how the records should be ordered.
func (*InvoiceQuery) QueryOrder ¶
func (iq *InvoiceQuery) QueryOrder() *OrderQuery
QueryOrder chains the current query on the "order" edge.
func (*InvoiceQuery) Select ¶
func (iq *InvoiceQuery) Select(fields ...string) *InvoiceSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Invoice.Query(). Select(invoice.FieldCreatedAt). Scan(ctx, &v)
func (*InvoiceQuery) Unique ¶
func (iq *InvoiceQuery) Unique(unique bool) *InvoiceQuery
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 (*InvoiceQuery) Where ¶
func (iq *InvoiceQuery) Where(ps ...predicate.Invoice) *InvoiceQuery
Where adds a new predicate for the InvoiceQuery builder.
func (*InvoiceQuery) WithOrder ¶
func (iq *InvoiceQuery) WithOrder(opts ...func(*OrderQuery)) *InvoiceQuery
WithOrder tells the query-builder to eager-load the nodes that are connected to the "order" edge. The optional arguments are used to configure the query builder of the edge.
type InvoiceSelect ¶
type InvoiceSelect struct { *InvoiceQuery // contains filtered or unexported fields }
InvoiceSelect is the builder for selecting fields of Invoice entities.
func (*InvoiceSelect) Aggregate ¶
func (is *InvoiceSelect) Aggregate(fns ...AggregateFunc) *InvoiceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InvoiceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Scan ¶
func (is *InvoiceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceUpdate ¶
type InvoiceUpdate struct {
// contains filtered or unexported fields
}
InvoiceUpdate is the builder for updating Invoice entities.
func (*InvoiceUpdate) ClearComment ¶
func (iu *InvoiceUpdate) ClearComment() *InvoiceUpdate
ClearComment clears the value of the "comment" field.
func (*InvoiceUpdate) ClearNote ¶
func (iu *InvoiceUpdate) ClearNote() *InvoiceUpdate
ClearNote clears the value of the "note" field.
func (*InvoiceUpdate) Exec ¶
func (iu *InvoiceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceUpdate) ExecX ¶
func (iu *InvoiceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceUpdate) Mutation ¶
func (iu *InvoiceUpdate) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceUpdate) Save ¶
func (iu *InvoiceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InvoiceUpdate) SaveX ¶
func (iu *InvoiceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InvoiceUpdate) SetComment ¶
func (iu *InvoiceUpdate) SetComment(s string) *InvoiceUpdate
SetComment sets the "comment" field.
func (*InvoiceUpdate) SetNillableComment ¶
func (iu *InvoiceUpdate) SetNillableComment(s *string) *InvoiceUpdate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableNote ¶
func (iu *InvoiceUpdate) SetNillableNote(s *string) *InvoiceUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableStatus ¶
func (iu *InvoiceUpdate) SetNillableStatus(i *invoice.Status) *InvoiceUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InvoiceUpdate) SetNote ¶
func (iu *InvoiceUpdate) SetNote(s string) *InvoiceUpdate
SetNote sets the "note" field.
func (*InvoiceUpdate) SetStatus ¶
func (iu *InvoiceUpdate) SetStatus(i invoice.Status) *InvoiceUpdate
SetStatus sets the "status" field.
func (*InvoiceUpdate) SetUpdatedAt ¶
func (iu *InvoiceUpdate) SetUpdatedAt(t time.Time) *InvoiceUpdate
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceUpdate) Where ¶
func (iu *InvoiceUpdate) Where(ps ...predicate.Invoice) *InvoiceUpdate
Where appends a list predicates to the InvoiceUpdate builder.
type InvoiceUpdateOne ¶
type InvoiceUpdateOne struct {
// contains filtered or unexported fields
}
InvoiceUpdateOne is the builder for updating a single Invoice entity.
func (*InvoiceUpdateOne) ClearComment ¶
func (iuo *InvoiceUpdateOne) ClearComment() *InvoiceUpdateOne
ClearComment clears the value of the "comment" field.
func (*InvoiceUpdateOne) ClearNote ¶
func (iuo *InvoiceUpdateOne) ClearNote() *InvoiceUpdateOne
ClearNote clears the value of the "note" field.
func (*InvoiceUpdateOne) Exec ¶
func (iuo *InvoiceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InvoiceUpdateOne) ExecX ¶
func (iuo *InvoiceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceUpdateOne) Mutation ¶
func (iuo *InvoiceUpdateOne) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceUpdateOne) Save ¶
func (iuo *InvoiceUpdateOne) Save(ctx context.Context) (*Invoice, error)
Save executes the query and returns the updated Invoice entity.
func (*InvoiceUpdateOne) SaveX ¶
func (iuo *InvoiceUpdateOne) SaveX(ctx context.Context) *Invoice
SaveX is like Save, but panics if an error occurs.
func (*InvoiceUpdateOne) Select ¶
func (iuo *InvoiceUpdateOne) Select(field string, fields ...string) *InvoiceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InvoiceUpdateOne) SetComment ¶
func (iuo *InvoiceUpdateOne) SetComment(s string) *InvoiceUpdateOne
SetComment sets the "comment" field.
func (*InvoiceUpdateOne) SetNillableComment ¶
func (iuo *InvoiceUpdateOne) SetNillableComment(s *string) *InvoiceUpdateOne
SetNillableComment sets the "comment" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableNote ¶
func (iuo *InvoiceUpdateOne) SetNillableNote(s *string) *InvoiceUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableStatus ¶
func (iuo *InvoiceUpdateOne) SetNillableStatus(i *invoice.Status) *InvoiceUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNote ¶
func (iuo *InvoiceUpdateOne) SetNote(s string) *InvoiceUpdateOne
SetNote sets the "note" field.
func (*InvoiceUpdateOne) SetStatus ¶
func (iuo *InvoiceUpdateOne) SetStatus(i invoice.Status) *InvoiceUpdateOne
SetStatus sets the "status" field.
func (*InvoiceUpdateOne) SetUpdatedAt ¶
func (iuo *InvoiceUpdateOne) SetUpdatedAt(t time.Time) *InvoiceUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceUpdateOne) Where ¶
func (iuo *InvoiceUpdateOne) Where(ps ...predicate.Invoice) *InvoiceUpdateOne
Where appends a list predicates to the InvoiceUpdate builder.
type Message ¶
type Message struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // ConversationID holds the value of the "conversation_id" field. ConversationID uuid.UUID `json:"conversation_id,omitempty"` // SenderID holds the value of the "sender_id" field. SenderID uuid.UUID `json:"sender_id,omitempty"` // Type holds the value of the "type" field. Type message.Type `json:"type,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // IsRead holds the value of the "is_read" field. IsRead bool `json:"is_read,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MessageQuery when eager-loading is set. Edges MessageEdges `json:"edges"` // contains filtered or unexported fields }
Message is the model entity for the Message schema.
func (*Message) QueryConversation ¶
func (m *Message) QueryConversation() *ConversationQuery
QueryConversation queries the "conversation" edge of the Message entity.
func (*Message) QuerySender ¶
func (m *Message) QuerySender() *PersonQuery
QuerySender queries the "sender" edge of the Message entity.
func (*Message) Unwrap ¶
Unwrap unwraps the Message 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 (*Message) Update ¶
func (m *Message) Update() *MessageUpdateOne
Update returns a builder for updating this Message. Note that you need to call Message.Unwrap() before calling this method if this Message was returned from a transaction, and the transaction was committed or rolled back.
type MessageClient ¶
type MessageClient struct {
// contains filtered or unexported fields
}
MessageClient is a client for the Message schema.
func NewMessageClient ¶
func NewMessageClient(c config) *MessageClient
NewMessageClient returns a client for the Message from the given config.
func (*MessageClient) Create ¶
func (c *MessageClient) Create() *MessageCreate
Create returns a builder for creating a Message entity.
func (*MessageClient) CreateBulk ¶
func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
CreateBulk returns a builder for creating a bulk of Message entities.
func (*MessageClient) Delete ¶
func (c *MessageClient) Delete() *MessageDelete
Delete returns a delete builder for Message.
func (*MessageClient) DeleteOne ¶
func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MessageClient) DeleteOneID ¶
func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MessageClient) Hooks ¶
func (c *MessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MessageClient) Intercept ¶
func (c *MessageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `message.Intercept(f(g(h())))`.
func (*MessageClient) Interceptors ¶
func (c *MessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MessageClient) MapCreateBulk ¶
func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
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 (*MessageClient) Query ¶
func (c *MessageClient) Query() *MessageQuery
Query returns a query builder for Message.
func (*MessageClient) QueryConversation ¶
func (c *MessageClient) QueryConversation(m *Message) *ConversationQuery
QueryConversation queries the conversation edge of a Message.
func (*MessageClient) QuerySender ¶
func (c *MessageClient) QuerySender(m *Message) *PersonQuery
QuerySender queries the sender edge of a Message.
func (*MessageClient) Update ¶
func (c *MessageClient) Update() *MessageUpdate
Update returns an update builder for Message.
func (*MessageClient) UpdateOne ¶
func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MessageClient) UpdateOneID ¶
func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MessageClient) Use ¶
func (c *MessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `message.Hooks(f(g(h())))`.
type MessageCreate ¶
type MessageCreate struct {
// contains filtered or unexported fields
}
MessageCreate is the builder for creating a Message entity.
func (*MessageCreate) Exec ¶
func (mc *MessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreate) ExecX ¶
func (mc *MessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreate) Mutation ¶
func (mc *MessageCreate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageCreate) Save ¶
func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
Save creates the Message in the database.
func (*MessageCreate) SaveX ¶
func (mc *MessageCreate) SaveX(ctx context.Context) *Message
SaveX calls Save and panics if Save returns an error.
func (*MessageCreate) SetContent ¶
func (mc *MessageCreate) SetContent(s string) *MessageCreate
SetContent sets the "content" field.
func (*MessageCreate) SetConversation ¶
func (mc *MessageCreate) SetConversation(c *Conversation) *MessageCreate
SetConversation sets the "conversation" edge to the Conversation entity.
func (*MessageCreate) SetConversationID ¶
func (mc *MessageCreate) SetConversationID(u uuid.UUID) *MessageCreate
SetConversationID sets the "conversation_id" field.
func (*MessageCreate) SetCreatedAt ¶
func (mc *MessageCreate) SetCreatedAt(t time.Time) *MessageCreate
SetCreatedAt sets the "created_at" field.
func (*MessageCreate) SetID ¶
func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
SetID sets the "id" field.
func (*MessageCreate) SetIsRead ¶
func (mc *MessageCreate) SetIsRead(b bool) *MessageCreate
SetIsRead sets the "is_read" field.
func (*MessageCreate) SetNillableCreatedAt ¶
func (mc *MessageCreate) SetNillableCreatedAt(t *time.Time) *MessageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MessageCreate) SetNillableID ¶
func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MessageCreate) SetNillableIsRead ¶
func (mc *MessageCreate) SetNillableIsRead(b *bool) *MessageCreate
SetNillableIsRead sets the "is_read" field if the given value is not nil.
func (*MessageCreate) SetNillableType ¶
func (mc *MessageCreate) SetNillableType(m *message.Type) *MessageCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*MessageCreate) SetNillableUpdatedAt ¶
func (mc *MessageCreate) SetNillableUpdatedAt(t *time.Time) *MessageCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MessageCreate) SetSender ¶
func (mc *MessageCreate) SetSender(p *Person) *MessageCreate
SetSender sets the "sender" edge to the Person entity.
func (*MessageCreate) SetSenderID ¶
func (mc *MessageCreate) SetSenderID(u uuid.UUID) *MessageCreate
SetSenderID sets the "sender_id" field.
func (*MessageCreate) SetType ¶
func (mc *MessageCreate) SetType(m message.Type) *MessageCreate
SetType sets the "type" field.
func (*MessageCreate) SetUpdatedAt ¶
func (mc *MessageCreate) SetUpdatedAt(t time.Time) *MessageCreate
SetUpdatedAt sets the "updated_at" field.
type MessageCreateBulk ¶
type MessageCreateBulk struct {
// contains filtered or unexported fields
}
MessageCreateBulk is the builder for creating many Message entities in bulk.
func (*MessageCreateBulk) Exec ¶
func (mcb *MessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreateBulk) ExecX ¶
func (mcb *MessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MessageDelete ¶
type MessageDelete struct {
// contains filtered or unexported fields
}
MessageDelete is the builder for deleting a Message entity.
func (*MessageDelete) Exec ¶
func (md *MessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MessageDelete) ExecX ¶
func (md *MessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MessageDelete) Where ¶
func (md *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
Where appends a list predicates to the MessageDelete builder.
type MessageDeleteOne ¶
type MessageDeleteOne struct {
// contains filtered or unexported fields
}
MessageDeleteOne is the builder for deleting a single Message entity.
func (*MessageDeleteOne) Exec ¶
func (mdo *MessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MessageDeleteOne) ExecX ¶
func (mdo *MessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageDeleteOne) Where ¶
func (mdo *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne
Where appends a list predicates to the MessageDelete builder.
type MessageEdges ¶
type MessageEdges struct { // Conversation holds the value of the conversation edge. Conversation *Conversation `json:"conversation,omitempty"` // Sender holds the value of the sender edge. Sender *Person `json:"sender,omitempty"` // contains filtered or unexported fields }
MessageEdges holds the relations/edges for other nodes in the graph.
func (MessageEdges) ConversationOrErr ¶
func (e MessageEdges) ConversationOrErr() (*Conversation, error)
ConversationOrErr returns the Conversation value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MessageEdges) SenderOrErr ¶
func (e MessageEdges) SenderOrErr() (*Person, error)
SenderOrErr returns the Sender value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MessageGroupBy ¶
type MessageGroupBy struct {
// contains filtered or unexported fields
}
MessageGroupBy is the group-by builder for Message entities.
func (*MessageGroupBy) Aggregate ¶
func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Scan ¶
func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageMutation ¶
type MessageMutation struct {
// contains filtered or unexported fields
}
MessageMutation represents an operation that mutates the Message nodes in the graph.
func (*MessageMutation) AddField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedEdges ¶
func (m *MessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MessageMutation) AddedField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedFields ¶
func (m *MessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MessageMutation) AddedIDs ¶
func (m *MessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MessageMutation) ClearConversation ¶
func (m *MessageMutation) ClearConversation()
ClearConversation clears the "conversation" edge to the Conversation entity.
func (*MessageMutation) ClearEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearField ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearSender ¶
func (m *MessageMutation) ClearSender()
ClearSender clears the "sender" edge to the Person entity.
func (*MessageMutation) ClearedEdges ¶
func (m *MessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MessageMutation) ClearedFields ¶
func (m *MessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MessageMutation) Client ¶
func (m MessageMutation) 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 (*MessageMutation) Content ¶
func (m *MessageMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*MessageMutation) ConversationCleared ¶
func (m *MessageMutation) ConversationCleared() bool
ConversationCleared reports if the "conversation" edge to the Conversation entity was cleared.
func (*MessageMutation) ConversationID ¶
func (m *MessageMutation) ConversationID() (r uuid.UUID, exists bool)
ConversationID returns the value of the "conversation_id" field in the mutation.
func (*MessageMutation) ConversationIDs ¶
func (m *MessageMutation) ConversationIDs() (ids []uuid.UUID)
ConversationIDs returns the "conversation" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ConversationID instead. It exists only for internal usage by the builders.
func (*MessageMutation) CreatedAt ¶
func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MessageMutation) EdgeCleared ¶
func (m *MessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MessageMutation) Field ¶
func (m *MessageMutation) 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 (*MessageMutation) FieldCleared ¶
func (m *MessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MessageMutation) Fields ¶
func (m *MessageMutation) 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 (*MessageMutation) GetType ¶
func (m *MessageMutation) GetType() (r message.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*MessageMutation) ID ¶
func (m *MessageMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MessageMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MessageMutation) IsRead ¶
func (m *MessageMutation) IsRead() (r bool, exists bool)
IsRead returns the value of the "is_read" field in the mutation.
func (*MessageMutation) OldContent ¶
func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Message entity. If the Message 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 (*MessageMutation) OldConversationID ¶
OldConversationID returns the old "conversation_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Message entity. If the Message 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 (*MessageMutation) 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 (*MessageMutation) OldIsRead ¶
func (m *MessageMutation) OldIsRead(ctx context.Context) (v bool, err error)
OldIsRead returns the old "is_read" field's value of the Message entity. If the Message 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 (*MessageMutation) OldSenderID ¶
OldSenderID returns the old "sender_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldType ¶
OldType returns the old "type" field's value of the Message entity. If the Message 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 (*MessageMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Message entity. If the Message 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 (*MessageMutation) RemovedEdges ¶
func (m *MessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MessageMutation) RemovedIDs ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetContent ¶
func (m *MessageMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*MessageMutation) ResetConversation ¶
func (m *MessageMutation) ResetConversation()
ResetConversation resets all changes to the "conversation" edge.
func (*MessageMutation) ResetConversationID ¶
func (m *MessageMutation) ResetConversationID()
ResetConversationID resets all changes to the "conversation_id" field.
func (*MessageMutation) ResetCreatedAt ¶
func (m *MessageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MessageMutation) ResetEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetField ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetIsRead ¶
func (m *MessageMutation) ResetIsRead()
ResetIsRead resets all changes to the "is_read" field.
func (*MessageMutation) ResetSender ¶
func (m *MessageMutation) ResetSender()
ResetSender resets all changes to the "sender" edge.
func (*MessageMutation) ResetSenderID ¶
func (m *MessageMutation) ResetSenderID()
ResetSenderID resets all changes to the "sender_id" field.
func (*MessageMutation) ResetType ¶
func (m *MessageMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*MessageMutation) ResetUpdatedAt ¶
func (m *MessageMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MessageMutation) SenderCleared ¶
func (m *MessageMutation) SenderCleared() bool
SenderCleared reports if the "sender" edge to the Person entity was cleared.
func (*MessageMutation) SenderID ¶
func (m *MessageMutation) SenderID() (r uuid.UUID, exists bool)
SenderID returns the value of the "sender_id" field in the mutation.
func (*MessageMutation) SenderIDs ¶
func (m *MessageMutation) SenderIDs() (ids []uuid.UUID)
SenderIDs returns the "sender" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SenderID instead. It exists only for internal usage by the builders.
func (*MessageMutation) SetContent ¶
func (m *MessageMutation) SetContent(s string)
SetContent sets the "content" field.
func (*MessageMutation) SetConversationID ¶
func (m *MessageMutation) SetConversationID(u uuid.UUID)
SetConversationID sets the "conversation_id" field.
func (*MessageMutation) SetCreatedAt ¶
func (m *MessageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MessageMutation) SetField ¶
func (m *MessageMutation) 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 (*MessageMutation) SetID ¶
func (m *MessageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Message entities.
func (*MessageMutation) SetIsRead ¶
func (m *MessageMutation) SetIsRead(b bool)
SetIsRead sets the "is_read" field.
func (*MessageMutation) SetOp ¶
func (m *MessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MessageMutation) SetSenderID ¶
func (m *MessageMutation) SetSenderID(u uuid.UUID)
SetSenderID sets the "sender_id" field.
func (*MessageMutation) SetType ¶
func (m *MessageMutation) SetType(value message.Type)
SetType sets the "type" field.
func (*MessageMutation) SetUpdatedAt ¶
func (m *MessageMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (MessageMutation) Tx ¶
func (m MessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MessageMutation) Type ¶
func (m *MessageMutation) Type() string
Type returns the node type of this mutation (Message).
func (*MessageMutation) UpdatedAt ¶
func (m *MessageMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MessageMutation) Where ¶
func (m *MessageMutation) Where(ps ...predicate.Message)
Where appends a list predicates to the MessageMutation builder.
func (*MessageMutation) WhereP ¶
func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
MessageQuery is the builder for querying Message entities.
func (*MessageQuery) Aggregate ¶
func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate returns a MessageSelect configured with the given aggregations.
func (*MessageQuery) All ¶
func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
All executes the query and returns a list of Messages.
func (*MessageQuery) AllX ¶
func (mq *MessageQuery) AllX(ctx context.Context) []*Message
AllX is like All, but panics if an error occurs.
func (*MessageQuery) Clone ¶
func (mq *MessageQuery) Clone() *MessageQuery
Clone returns a duplicate of the MessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MessageQuery) Count ¶
func (mq *MessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MessageQuery) CountX ¶
func (mq *MessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MessageQuery) Exist ¶
func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MessageQuery) ExistX ¶
func (mq *MessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MessageQuery) First ¶
func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
First returns the first Message entity from the query. Returns a *NotFoundError when no Message was found.
func (*MessageQuery) FirstID ¶
FirstID returns the first Message ID from the query. Returns a *NotFoundError when no Message ID was found.
func (*MessageQuery) FirstIDX ¶
func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*MessageQuery) FirstX ¶
func (mq *MessageQuery) FirstX(ctx context.Context) *Message
FirstX is like First, but panics if an error occurs.
func (*MessageQuery) GroupBy ¶
func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Message.Query(). GroupBy(message.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MessageQuery) IDsX ¶
func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*MessageQuery) Limit ¶
func (mq *MessageQuery) Limit(limit int) *MessageQuery
Limit the number of records to be returned by this query.
func (*MessageQuery) Offset ¶
func (mq *MessageQuery) Offset(offset int) *MessageQuery
Offset to start from.
func (*MessageQuery) Only ¶
func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
Only returns a single Message entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Message entity is found. Returns a *NotFoundError when no Message entities are found.
func (*MessageQuery) OnlyID ¶
OnlyID is like Only, but returns the only Message ID in the query. Returns a *NotSingularError when more than one Message ID is found. Returns a *NotFoundError when no entities are found.
func (*MessageQuery) OnlyIDX ¶
func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MessageQuery) OnlyX ¶
func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
OnlyX is like Only, but panics if an error occurs.
func (*MessageQuery) Order ¶
func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
Order specifies how the records should be ordered.
func (*MessageQuery) QueryConversation ¶
func (mq *MessageQuery) QueryConversation() *ConversationQuery
QueryConversation chains the current query on the "conversation" edge.
func (*MessageQuery) QuerySender ¶
func (mq *MessageQuery) QuerySender() *PersonQuery
QuerySender chains the current query on the "sender" edge.
func (*MessageQuery) Select ¶
func (mq *MessageQuery) Select(fields ...string) *MessageSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Message.Query(). Select(message.FieldCreatedAt). Scan(ctx, &v)
func (*MessageQuery) Unique ¶
func (mq *MessageQuery) Unique(unique bool) *MessageQuery
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 (*MessageQuery) Where ¶
func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
Where adds a new predicate for the MessageQuery builder.
func (*MessageQuery) WithConversation ¶
func (mq *MessageQuery) WithConversation(opts ...func(*ConversationQuery)) *MessageQuery
WithConversation tells the query-builder to eager-load the nodes that are connected to the "conversation" edge. The optional arguments are used to configure the query builder of the edge.
func (*MessageQuery) WithSender ¶
func (mq *MessageQuery) WithSender(opts ...func(*PersonQuery)) *MessageQuery
WithSender tells the query-builder to eager-load the nodes that are connected to the "sender" edge. The optional arguments are used to configure the query builder of the edge.
type MessageSelect ¶
type MessageSelect struct { *MessageQuery // contains filtered or unexported fields }
MessageSelect is the builder for selecting fields of Message entities.
func (*MessageSelect) Aggregate ¶
func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Scan ¶
func (ms *MessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageUpdate ¶
type MessageUpdate struct {
// contains filtered or unexported fields
}
MessageUpdate is the builder for updating Message entities.
func (*MessageUpdate) Exec ¶
func (mu *MessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpdate) ExecX ¶
func (mu *MessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdate) Mutation ¶
func (mu *MessageUpdate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdate) Save ¶
func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MessageUpdate) SaveX ¶
func (mu *MessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdate) SetContent ¶
func (mu *MessageUpdate) SetContent(s string) *MessageUpdate
SetContent sets the "content" field.
func (*MessageUpdate) SetIsRead ¶
func (mu *MessageUpdate) SetIsRead(b bool) *MessageUpdate
SetIsRead sets the "is_read" field.
func (*MessageUpdate) SetNillableContent ¶
func (mu *MessageUpdate) SetNillableContent(s *string) *MessageUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdate) SetNillableIsRead ¶
func (mu *MessageUpdate) SetNillableIsRead(b *bool) *MessageUpdate
SetNillableIsRead sets the "is_read" field if the given value is not nil.
func (*MessageUpdate) SetUpdatedAt ¶
func (mu *MessageUpdate) SetUpdatedAt(t time.Time) *MessageUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MessageUpdate) Where ¶
func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
Where appends a list predicates to the MessageUpdate builder.
type MessageUpdateOne ¶
type MessageUpdateOne struct {
// contains filtered or unexported fields
}
MessageUpdateOne is the builder for updating a single Message entity.
func (*MessageUpdateOne) Exec ¶
func (muo *MessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MessageUpdateOne) ExecX ¶
func (muo *MessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdateOne) Mutation ¶
func (muo *MessageUpdateOne) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdateOne) Save ¶
func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
Save executes the query and returns the updated Message entity.
func (*MessageUpdateOne) SaveX ¶
func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdateOne) Select ¶
func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MessageUpdateOne) SetContent ¶
func (muo *MessageUpdateOne) SetContent(s string) *MessageUpdateOne
SetContent sets the "content" field.
func (*MessageUpdateOne) SetIsRead ¶
func (muo *MessageUpdateOne) SetIsRead(b bool) *MessageUpdateOne
SetIsRead sets the "is_read" field.
func (*MessageUpdateOne) SetNillableContent ¶
func (muo *MessageUpdateOne) SetNillableContent(s *string) *MessageUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableIsRead ¶
func (muo *MessageUpdateOne) SetNillableIsRead(b *bool) *MessageUpdateOne
SetNillableIsRead sets the "is_read" field if the given value is not nil.
func (*MessageUpdateOne) SetUpdatedAt ¶
func (muo *MessageUpdateOne) SetUpdatedAt(t time.Time) *MessageUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MessageUpdateOne) Where ¶
func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
Where appends a list predicates to the MessageUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Order ¶
type Order struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // CustomerID holds the value of the "customer_id" field. CustomerID uuid.UUID `json:"customer_id,omitempty"` // Note holds the value of the "note" field. Note *string `json:"note,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy uuid.UUID `json:"created_by,omitempty"` // ParentOrderID holds the value of the "parent_order_id" field. ParentOrderID uuid.UUID `json:"parent_order_id,omitempty"` // Priority holds the value of the "priority" field. Priority int `json:"priority,omitempty"` // Type holds the value of the "type" field. Type order.Type `json:"type,omitempty"` // StatusCode holds the value of the "status_code" field. StatusCode int `json:"status_code,omitempty"` // ManagementStaffID holds the value of the "management_staff_id" field. ManagementStaffID uuid.UUID `json:"management_staff_id,omitempty"` // WarehouseStaffID holds the value of the "warehouse_staff_id" field. WarehouseStaffID *uuid.UUID `json:"warehouse_staff_id,omitempty"` // DeliveryStaffID holds the value of the "delivery_staff_id" field. DeliveryStaffID *uuid.UUID `json:"delivery_staff_id,omitempty"` // InternalNote holds the value of the "internal_note" field. InternalNote *string `json:"internal_note,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) QueryCreator ¶
func (o *Order) QueryCreator() *PersonQuery
QueryCreator queries the "creator" edge of the Order entity.
func (*Order) QueryCustomer ¶
func (o *Order) QueryCustomer() *PersonQuery
QueryCustomer queries the "customer" edge of the Order entity.
func (*Order) QueryDeliveryStaff ¶
func (o *Order) QueryDeliveryStaff() *PersonQuery
QueryDeliveryStaff queries the "delivery_staff" edge of the Order entity.
func (*Order) QueryManagementStaff ¶
func (o *Order) QueryManagementStaff() *PersonQuery
QueryManagementStaff queries the "management_staff" edge of the Order entity.
func (*Order) QueryOrderStatus ¶
func (o *Order) QueryOrderStatus() *OrderStatusCodeQuery
QueryOrderStatus queries the "order_status" edge of the Order entity.
func (*Order) QueryParentOrder ¶
func (o *Order) QueryParentOrder() *OrderQuery
QueryParentOrder queries the "parent_order" edge of the Order entity.
func (*Order) QueryWarehouseStaff ¶
func (o *Order) QueryWarehouseStaff() *PersonQuery
QueryWarehouseStaff queries the "warehouse_staff" 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 uuid.UUID) *OrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
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) QueryCreator ¶
func (c *OrderClient) QueryCreator(o *Order) *PersonQuery
QueryCreator queries the creator edge of a Order.
func (*OrderClient) QueryCustomer ¶
func (c *OrderClient) QueryCustomer(o *Order) *PersonQuery
QueryCustomer queries the customer edge of a Order.
func (*OrderClient) QueryDeliveryStaff ¶
func (c *OrderClient) QueryDeliveryStaff(o *Order) *PersonQuery
QueryDeliveryStaff queries the delivery_staff edge of a Order.
func (*OrderClient) QueryManagementStaff ¶
func (c *OrderClient) QueryManagementStaff(o *Order) *PersonQuery
QueryManagementStaff queries the management_staff edge of a Order.
func (*OrderClient) QueryOrderStatus ¶
func (c *OrderClient) QueryOrderStatus(o *Order) *OrderStatusCodeQuery
QueryOrderStatus queries the order_status edge of a Order.
func (*OrderClient) QueryParentOrder ¶
func (c *OrderClient) QueryParentOrder(o *Order) *OrderQuery
QueryParentOrder queries the parent_order edge of a Order.
func (*OrderClient) QueryWarehouseStaff ¶
func (c *OrderClient) QueryWarehouseStaff(o *Order) *PersonQuery
QueryWarehouseStaff queries the warehouse_staff 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 uuid.UUID) *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) 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) SetCreatedAt ¶
func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
SetCreatedAt sets the "created_at" field.
func (*OrderCreate) SetCreatedBy ¶
func (oc *OrderCreate) SetCreatedBy(u uuid.UUID) *OrderCreate
SetCreatedBy sets the "created_by" field.
func (*OrderCreate) SetCreator ¶
func (oc *OrderCreate) SetCreator(p *Person) *OrderCreate
SetCreator sets the "creator" edge to the Person entity.
func (*OrderCreate) SetCreatorID ¶
func (oc *OrderCreate) SetCreatorID(id uuid.UUID) *OrderCreate
SetCreatorID sets the "creator" edge to the Person entity by ID.
func (*OrderCreate) SetCustomer ¶
func (oc *OrderCreate) SetCustomer(p *Person) *OrderCreate
SetCustomer sets the "customer" edge to the Person entity.
func (*OrderCreate) SetCustomerID ¶
func (oc *OrderCreate) SetCustomerID(u uuid.UUID) *OrderCreate
SetCustomerID sets the "customer_id" field.
func (*OrderCreate) SetDeliveryStaff ¶
func (oc *OrderCreate) SetDeliveryStaff(p *Person) *OrderCreate
SetDeliveryStaff sets the "delivery_staff" edge to the Person entity.
func (*OrderCreate) SetDeliveryStaffID ¶
func (oc *OrderCreate) SetDeliveryStaffID(u uuid.UUID) *OrderCreate
SetDeliveryStaffID sets the "delivery_staff_id" field.
func (*OrderCreate) SetID ¶
func (oc *OrderCreate) SetID(u uuid.UUID) *OrderCreate
SetID sets the "id" field.
func (*OrderCreate) SetInternalNote ¶
func (oc *OrderCreate) SetInternalNote(s string) *OrderCreate
SetInternalNote sets the "internal_note" field.
func (*OrderCreate) SetManagementStaff ¶
func (oc *OrderCreate) SetManagementStaff(p *Person) *OrderCreate
SetManagementStaff sets the "management_staff" edge to the Person entity.
func (*OrderCreate) SetManagementStaffID ¶
func (oc *OrderCreate) SetManagementStaffID(u uuid.UUID) *OrderCreate
SetManagementStaffID sets the "management_staff_id" field.
func (*OrderCreate) SetNillableCreatedAt ¶
func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderCreate) SetNillableDeliveryStaffID ¶
func (oc *OrderCreate) SetNillableDeliveryStaffID(u *uuid.UUID) *OrderCreate
SetNillableDeliveryStaffID sets the "delivery_staff_id" field if the given value is not nil.
func (*OrderCreate) SetNillableID ¶
func (oc *OrderCreate) SetNillableID(u *uuid.UUID) *OrderCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OrderCreate) SetNillableInternalNote ¶
func (oc *OrderCreate) SetNillableInternalNote(s *string) *OrderCreate
SetNillableInternalNote sets the "internal_note" field if the given value is not nil.
func (*OrderCreate) SetNillableNote ¶
func (oc *OrderCreate) SetNillableNote(s *string) *OrderCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*OrderCreate) SetNillableParentOrderID ¶
func (oc *OrderCreate) SetNillableParentOrderID(u *uuid.UUID) *OrderCreate
SetNillableParentOrderID sets the "parent_order_id" field if the given value is not nil.
func (*OrderCreate) SetNillablePriority ¶
func (oc *OrderCreate) SetNillablePriority(i *int) *OrderCreate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*OrderCreate) SetNillableStatusCode ¶
func (oc *OrderCreate) SetNillableStatusCode(i *int) *OrderCreate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*OrderCreate) SetNillableType ¶
func (oc *OrderCreate) SetNillableType(o *order.Type) *OrderCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*OrderCreate) SetNillableUpdatedAt ¶
func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderCreate) SetNillableWarehouseStaffID ¶
func (oc *OrderCreate) SetNillableWarehouseStaffID(u *uuid.UUID) *OrderCreate
SetNillableWarehouseStaffID sets the "warehouse_staff_id" field if the given value is not nil.
func (*OrderCreate) SetNote ¶
func (oc *OrderCreate) SetNote(s string) *OrderCreate
SetNote sets the "note" field.
func (*OrderCreate) SetOrderStatus ¶
func (oc *OrderCreate) SetOrderStatus(o *OrderStatusCode) *OrderCreate
SetOrderStatus sets the "order_status" edge to the OrderStatusCode entity.
func (*OrderCreate) SetOrderStatusID ¶
func (oc *OrderCreate) SetOrderStatusID(id int) *OrderCreate
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by ID.
func (*OrderCreate) SetParentOrder ¶
func (oc *OrderCreate) SetParentOrder(o *Order) *OrderCreate
SetParentOrder sets the "parent_order" edge to the Order entity.
func (*OrderCreate) SetParentOrderID ¶
func (oc *OrderCreate) SetParentOrderID(u uuid.UUID) *OrderCreate
SetParentOrderID sets the "parent_order_id" field.
func (*OrderCreate) SetPriority ¶
func (oc *OrderCreate) SetPriority(i int) *OrderCreate
SetPriority sets the "priority" field.
func (*OrderCreate) SetStatusCode ¶
func (oc *OrderCreate) SetStatusCode(i int) *OrderCreate
SetStatusCode sets the "status_code" field.
func (*OrderCreate) SetType ¶
func (oc *OrderCreate) SetType(o order.Type) *OrderCreate
SetType sets the "type" field.
func (*OrderCreate) SetUpdatedAt ¶
func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
SetUpdatedAt sets the "updated_at" field.
func (*OrderCreate) SetWarehouseStaff ¶
func (oc *OrderCreate) SetWarehouseStaff(p *Person) *OrderCreate
SetWarehouseStaff sets the "warehouse_staff" edge to the Person entity.
func (*OrderCreate) SetWarehouseStaffID ¶
func (oc *OrderCreate) SetWarehouseStaffID(u uuid.UUID) *OrderCreate
SetWarehouseStaffID sets the "warehouse_staff_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 { // Customer holds the value of the customer edge. Customer *Person `json:"customer,omitempty"` // Creator holds the value of the creator edge. Creator *Person `json:"creator,omitempty"` // ParentOrder holds the value of the parent_order edge. ParentOrder *Order `json:"parent_order,omitempty"` // OrderStatus holds the value of the order_status edge. OrderStatus *OrderStatusCode `json:"order_status,omitempty"` // ManagementStaff holds the value of the management_staff edge. ManagementStaff *Person `json:"management_staff,omitempty"` // WarehouseStaff holds the value of the warehouse_staff edge. WarehouseStaff *Person `json:"warehouse_staff,omitempty"` // DeliveryStaff holds the value of the delivery_staff edge. DeliveryStaff *Person `json:"delivery_staff,omitempty"` // contains filtered or unexported fields }
OrderEdges holds the relations/edges for other nodes in the graph.
func (OrderEdges) CreatorOrErr ¶
func (e OrderEdges) CreatorOrErr() (*Person, error)
CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) CustomerOrErr ¶
func (e OrderEdges) CustomerOrErr() (*Person, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) DeliveryStaffOrErr ¶
func (e OrderEdges) DeliveryStaffOrErr() (*Person, error)
DeliveryStaffOrErr returns the DeliveryStaff value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) ManagementStaffOrErr ¶
func (e OrderEdges) ManagementStaffOrErr() (*Person, error)
ManagementStaffOrErr returns the ManagementStaff value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) OrderStatusOrErr ¶
func (e OrderEdges) OrderStatusOrErr() (*OrderStatusCode, error)
OrderStatusOrErr returns the OrderStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) ParentOrderOrErr ¶
func (e OrderEdges) ParentOrderOrErr() (*Order, error)
ParentOrderOrErr returns the ParentOrder value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) WarehouseStaffOrErr ¶
func (e OrderEdges) WarehouseStaffOrErr() (*Person, error)
WarehouseStaffOrErr returns the WarehouseStaff value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
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 OrderLineItem ¶
type OrderLineItem struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // OrderID holds the value of the "order_id" field. OrderID uuid.UUID `json:"order_id,omitempty"` // ProductID holds the value of the "product_id" field. ProductID string `json:"product_id,omitempty"` // Qty holds the value of the "qty" field. Qty decimal.Decimal `json:"qty,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrderLineItemQuery when eager-loading is set. Edges OrderLineItemEdges `json:"edges"` // contains filtered or unexported fields }
OrderLineItem is the model entity for the OrderLineItem schema.
func (*OrderLineItem) QueryOrder ¶
func (oli *OrderLineItem) QueryOrder() *OrderQuery
QueryOrder queries the "order" edge of the OrderLineItem entity.
func (*OrderLineItem) QueryProduct ¶
func (oli *OrderLineItem) QueryProduct() *ProductQuery
QueryProduct queries the "product" edge of the OrderLineItem entity.
func (*OrderLineItem) String ¶
func (oli *OrderLineItem) String() string
String implements the fmt.Stringer.
func (*OrderLineItem) Unwrap ¶
func (oli *OrderLineItem) Unwrap() *OrderLineItem
Unwrap unwraps the OrderLineItem 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 (*OrderLineItem) Update ¶
func (oli *OrderLineItem) Update() *OrderLineItemUpdateOne
Update returns a builder for updating this OrderLineItem. Note that you need to call OrderLineItem.Unwrap() before calling this method if this OrderLineItem was returned from a transaction, and the transaction was committed or rolled back.
type OrderLineItemClient ¶
type OrderLineItemClient struct {
// contains filtered or unexported fields
}
OrderLineItemClient is a client for the OrderLineItem schema.
func NewOrderLineItemClient ¶
func NewOrderLineItemClient(c config) *OrderLineItemClient
NewOrderLineItemClient returns a client for the OrderLineItem from the given config.
func (*OrderLineItemClient) Create ¶
func (c *OrderLineItemClient) Create() *OrderLineItemCreate
Create returns a builder for creating a OrderLineItem entity.
func (*OrderLineItemClient) CreateBulk ¶
func (c *OrderLineItemClient) CreateBulk(builders ...*OrderLineItemCreate) *OrderLineItemCreateBulk
CreateBulk returns a builder for creating a bulk of OrderLineItem entities.
func (*OrderLineItemClient) Delete ¶
func (c *OrderLineItemClient) Delete() *OrderLineItemDelete
Delete returns a delete builder for OrderLineItem.
func (*OrderLineItemClient) DeleteOne ¶
func (c *OrderLineItemClient) DeleteOne(oli *OrderLineItem) *OrderLineItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderLineItemClient) DeleteOneID ¶
func (c *OrderLineItemClient) DeleteOneID(id uuid.UUID) *OrderLineItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderLineItemClient) Get ¶
func (c *OrderLineItemClient) Get(ctx context.Context, id uuid.UUID) (*OrderLineItem, error)
Get returns a OrderLineItem entity by its id.
func (*OrderLineItemClient) GetX ¶
func (c *OrderLineItemClient) GetX(ctx context.Context, id uuid.UUID) *OrderLineItem
GetX is like Get, but panics if an error occurs.
func (*OrderLineItemClient) Hooks ¶
func (c *OrderLineItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrderLineItemClient) Intercept ¶
func (c *OrderLineItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orderlineitem.Intercept(f(g(h())))`.
func (*OrderLineItemClient) Interceptors ¶
func (c *OrderLineItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderLineItemClient) MapCreateBulk ¶
func (c *OrderLineItemClient) MapCreateBulk(slice any, setFunc func(*OrderLineItemCreate, int)) *OrderLineItemCreateBulk
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 (*OrderLineItemClient) Query ¶
func (c *OrderLineItemClient) Query() *OrderLineItemQuery
Query returns a query builder for OrderLineItem.
func (*OrderLineItemClient) QueryOrder ¶
func (c *OrderLineItemClient) QueryOrder(oli *OrderLineItem) *OrderQuery
QueryOrder queries the order edge of a OrderLineItem.
func (*OrderLineItemClient) QueryProduct ¶
func (c *OrderLineItemClient) QueryProduct(oli *OrderLineItem) *ProductQuery
QueryProduct queries the product edge of a OrderLineItem.
func (*OrderLineItemClient) Update ¶
func (c *OrderLineItemClient) Update() *OrderLineItemUpdate
Update returns an update builder for OrderLineItem.
func (*OrderLineItemClient) UpdateOne ¶
func (c *OrderLineItemClient) UpdateOne(oli *OrderLineItem) *OrderLineItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderLineItemClient) UpdateOneID ¶
func (c *OrderLineItemClient) UpdateOneID(id uuid.UUID) *OrderLineItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderLineItemClient) Use ¶
func (c *OrderLineItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orderlineitem.Hooks(f(g(h())))`.
type OrderLineItemCreate ¶
type OrderLineItemCreate struct {
// contains filtered or unexported fields
}
OrderLineItemCreate is the builder for creating a OrderLineItem entity.
func (*OrderLineItemCreate) Exec ¶
func (olic *OrderLineItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderLineItemCreate) ExecX ¶
func (olic *OrderLineItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderLineItemCreate) Mutation ¶
func (olic *OrderLineItemCreate) Mutation() *OrderLineItemMutation
Mutation returns the OrderLineItemMutation object of the builder.
func (*OrderLineItemCreate) Save ¶
func (olic *OrderLineItemCreate) Save(ctx context.Context) (*OrderLineItem, error)
Save creates the OrderLineItem in the database.
func (*OrderLineItemCreate) SaveX ¶
func (olic *OrderLineItemCreate) SaveX(ctx context.Context) *OrderLineItem
SaveX calls Save and panics if Save returns an error.
func (*OrderLineItemCreate) SetCreatedAt ¶
func (olic *OrderLineItemCreate) SetCreatedAt(t time.Time) *OrderLineItemCreate
SetCreatedAt sets the "created_at" field.
func (*OrderLineItemCreate) SetID ¶
func (olic *OrderLineItemCreate) SetID(u uuid.UUID) *OrderLineItemCreate
SetID sets the "id" field.
func (*OrderLineItemCreate) SetNillableCreatedAt ¶
func (olic *OrderLineItemCreate) SetNillableCreatedAt(t *time.Time) *OrderLineItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderLineItemCreate) SetNillableID ¶
func (olic *OrderLineItemCreate) SetNillableID(u *uuid.UUID) *OrderLineItemCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OrderLineItemCreate) SetNillableUpdatedAt ¶
func (olic *OrderLineItemCreate) SetNillableUpdatedAt(t *time.Time) *OrderLineItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderLineItemCreate) SetOrder ¶
func (olic *OrderLineItemCreate) SetOrder(o *Order) *OrderLineItemCreate
SetOrder sets the "order" edge to the Order entity.
func (*OrderLineItemCreate) SetOrderID ¶
func (olic *OrderLineItemCreate) SetOrderID(u uuid.UUID) *OrderLineItemCreate
SetOrderID sets the "order_id" field.
func (*OrderLineItemCreate) SetProduct ¶
func (olic *OrderLineItemCreate) SetProduct(p *Product) *OrderLineItemCreate
SetProduct sets the "product" edge to the Product entity.
func (*OrderLineItemCreate) SetProductID ¶
func (olic *OrderLineItemCreate) SetProductID(s string) *OrderLineItemCreate
SetProductID sets the "product_id" field.
func (*OrderLineItemCreate) SetQty ¶
func (olic *OrderLineItemCreate) SetQty(d decimal.Decimal) *OrderLineItemCreate
SetQty sets the "qty" field.
func (*OrderLineItemCreate) SetUpdatedAt ¶
func (olic *OrderLineItemCreate) SetUpdatedAt(t time.Time) *OrderLineItemCreate
SetUpdatedAt sets the "updated_at" field.
type OrderLineItemCreateBulk ¶
type OrderLineItemCreateBulk struct {
// contains filtered or unexported fields
}
OrderLineItemCreateBulk is the builder for creating many OrderLineItem entities in bulk.
func (*OrderLineItemCreateBulk) Exec ¶
func (olicb *OrderLineItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderLineItemCreateBulk) ExecX ¶
func (olicb *OrderLineItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderLineItemCreateBulk) Save ¶
func (olicb *OrderLineItemCreateBulk) Save(ctx context.Context) ([]*OrderLineItem, error)
Save creates the OrderLineItem entities in the database.
func (*OrderLineItemCreateBulk) SaveX ¶
func (olicb *OrderLineItemCreateBulk) SaveX(ctx context.Context) []*OrderLineItem
SaveX is like Save, but panics if an error occurs.
type OrderLineItemDelete ¶
type OrderLineItemDelete struct {
// contains filtered or unexported fields
}
OrderLineItemDelete is the builder for deleting a OrderLineItem entity.
func (*OrderLineItemDelete) Exec ¶
func (olid *OrderLineItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderLineItemDelete) ExecX ¶
func (olid *OrderLineItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderLineItemDelete) Where ¶
func (olid *OrderLineItemDelete) Where(ps ...predicate.OrderLineItem) *OrderLineItemDelete
Where appends a list predicates to the OrderLineItemDelete builder.
type OrderLineItemDeleteOne ¶
type OrderLineItemDeleteOne struct {
// contains filtered or unexported fields
}
OrderLineItemDeleteOne is the builder for deleting a single OrderLineItem entity.
func (*OrderLineItemDeleteOne) Exec ¶
func (olido *OrderLineItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderLineItemDeleteOne) ExecX ¶
func (olido *OrderLineItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderLineItemDeleteOne) Where ¶
func (olido *OrderLineItemDeleteOne) Where(ps ...predicate.OrderLineItem) *OrderLineItemDeleteOne
Where appends a list predicates to the OrderLineItemDelete builder.
type OrderLineItemEdges ¶
type OrderLineItemEdges struct { // Order holds the value of the order edge. Order *Order `json:"order,omitempty"` // Product holds the value of the product edge. Product *Product `json:"product,omitempty"` // contains filtered or unexported fields }
OrderLineItemEdges holds the relations/edges for other nodes in the graph.
func (OrderLineItemEdges) OrderOrErr ¶
func (e OrderLineItemEdges) OrderOrErr() (*Order, error)
OrderOrErr returns the Order value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderLineItemEdges) ProductOrErr ¶
func (e OrderLineItemEdges) ProductOrErr() (*Product, error)
ProductOrErr returns the Product value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type OrderLineItemGroupBy ¶
type OrderLineItemGroupBy struct {
// contains filtered or unexported fields
}
OrderLineItemGroupBy is the group-by builder for OrderLineItem entities.
func (*OrderLineItemGroupBy) Aggregate ¶
func (oligb *OrderLineItemGroupBy) Aggregate(fns ...AggregateFunc) *OrderLineItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderLineItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderLineItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderLineItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderLineItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderLineItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderLineItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderLineItemGroupBy) Scan ¶
func (oligb *OrderLineItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderLineItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderLineItemMutation ¶
type OrderLineItemMutation struct {
// contains filtered or unexported fields
}
OrderLineItemMutation represents an operation that mutates the OrderLineItem nodes in the graph.
func (*OrderLineItemMutation) AddField ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) AddQty ¶
func (m *OrderLineItemMutation) AddQty(d decimal.Decimal)
AddQty adds d to the "qty" field.
func (*OrderLineItemMutation) AddedEdges ¶
func (m *OrderLineItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderLineItemMutation) AddedField ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) AddedFields ¶
func (m *OrderLineItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderLineItemMutation) AddedIDs ¶
func (m *OrderLineItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderLineItemMutation) AddedQty ¶
func (m *OrderLineItemMutation) AddedQty() (r decimal.Decimal, exists bool)
AddedQty returns the value that was added to the "qty" field in this mutation.
func (*OrderLineItemMutation) ClearEdge ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) ClearField ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) ClearOrder ¶
func (m *OrderLineItemMutation) ClearOrder()
ClearOrder clears the "order" edge to the Order entity.
func (*OrderLineItemMutation) ClearProduct ¶
func (m *OrderLineItemMutation) ClearProduct()
ClearProduct clears the "product" edge to the Product entity.
func (*OrderLineItemMutation) ClearedEdges ¶
func (m *OrderLineItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderLineItemMutation) ClearedFields ¶
func (m *OrderLineItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderLineItemMutation) Client ¶
func (m OrderLineItemMutation) 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 (*OrderLineItemMutation) CreatedAt ¶
func (m *OrderLineItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderLineItemMutation) EdgeCleared ¶
func (m *OrderLineItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderLineItemMutation) Field ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) FieldCleared ¶
func (m *OrderLineItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderLineItemMutation) Fields ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) ID ¶
func (m *OrderLineItemMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OrderLineItemMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrderLineItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OrderLineItem entity. If the OrderLineItem 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 (*OrderLineItemMutation) 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 (*OrderLineItemMutation) OldOrderID ¶
OldOrderID returns the old "order_id" field's value of the OrderLineItem entity. If the OrderLineItem 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 (*OrderLineItemMutation) OldProductID ¶
func (m *OrderLineItemMutation) OldProductID(ctx context.Context) (v string, err error)
OldProductID returns the old "product_id" field's value of the OrderLineItem entity. If the OrderLineItem 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 (*OrderLineItemMutation) OldQty ¶
OldQty returns the old "qty" field's value of the OrderLineItem entity. If the OrderLineItem 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 (*OrderLineItemMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OrderLineItem entity. If the OrderLineItem 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 (*OrderLineItemMutation) Op ¶
func (m *OrderLineItemMutation) Op() Op
Op returns the operation name.
func (*OrderLineItemMutation) OrderCleared ¶
func (m *OrderLineItemMutation) OrderCleared() bool
OrderCleared reports if the "order" edge to the Order entity was cleared.
func (*OrderLineItemMutation) OrderID ¶
func (m *OrderLineItemMutation) OrderID() (r uuid.UUID, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*OrderLineItemMutation) OrderIDs ¶
func (m *OrderLineItemMutation) OrderIDs() (ids []uuid.UUID)
OrderIDs returns the "order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderID instead. It exists only for internal usage by the builders.
func (*OrderLineItemMutation) ProductCleared ¶
func (m *OrderLineItemMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the Product entity was cleared.
func (*OrderLineItemMutation) ProductID ¶
func (m *OrderLineItemMutation) ProductID() (r string, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*OrderLineItemMutation) ProductIDs ¶
func (m *OrderLineItemMutation) ProductIDs() (ids []string)
ProductIDs returns the "product" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductID instead. It exists only for internal usage by the builders.
func (*OrderLineItemMutation) Qty ¶
func (m *OrderLineItemMutation) Qty() (r decimal.Decimal, exists bool)
Qty returns the value of the "qty" field in the mutation.
func (*OrderLineItemMutation) RemovedEdges ¶
func (m *OrderLineItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderLineItemMutation) RemovedIDs ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) ResetCreatedAt ¶
func (m *OrderLineItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderLineItemMutation) ResetEdge ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) ResetField ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) ResetOrder ¶
func (m *OrderLineItemMutation) ResetOrder()
ResetOrder resets all changes to the "order" edge.
func (*OrderLineItemMutation) ResetOrderID ¶
func (m *OrderLineItemMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*OrderLineItemMutation) ResetProduct ¶
func (m *OrderLineItemMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*OrderLineItemMutation) ResetProductID ¶
func (m *OrderLineItemMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*OrderLineItemMutation) ResetQty ¶
func (m *OrderLineItemMutation) ResetQty()
ResetQty resets all changes to the "qty" field.
func (*OrderLineItemMutation) ResetUpdatedAt ¶
func (m *OrderLineItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderLineItemMutation) SetCreatedAt ¶
func (m *OrderLineItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderLineItemMutation) SetField ¶
func (m *OrderLineItemMutation) 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 (*OrderLineItemMutation) SetID ¶
func (m *OrderLineItemMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OrderLineItem entities.
func (*OrderLineItemMutation) SetOp ¶
func (m *OrderLineItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderLineItemMutation) SetOrderID ¶
func (m *OrderLineItemMutation) SetOrderID(u uuid.UUID)
SetOrderID sets the "order_id" field.
func (*OrderLineItemMutation) SetProductID ¶
func (m *OrderLineItemMutation) SetProductID(s string)
SetProductID sets the "product_id" field.
func (*OrderLineItemMutation) SetQty ¶
func (m *OrderLineItemMutation) SetQty(d decimal.Decimal)
SetQty sets the "qty" field.
func (*OrderLineItemMutation) SetUpdatedAt ¶
func (m *OrderLineItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (OrderLineItemMutation) Tx ¶
func (m OrderLineItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderLineItemMutation) Type ¶
func (m *OrderLineItemMutation) Type() string
Type returns the node type of this mutation (OrderLineItem).
func (*OrderLineItemMutation) UpdatedAt ¶
func (m *OrderLineItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderLineItemMutation) Where ¶
func (m *OrderLineItemMutation) Where(ps ...predicate.OrderLineItem)
Where appends a list predicates to the OrderLineItemMutation builder.
func (*OrderLineItemMutation) WhereP ¶
func (m *OrderLineItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderLineItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderLineItemQuery ¶
type OrderLineItemQuery struct {
// contains filtered or unexported fields
}
OrderLineItemQuery is the builder for querying OrderLineItem entities.
func (*OrderLineItemQuery) Aggregate ¶
func (oliq *OrderLineItemQuery) Aggregate(fns ...AggregateFunc) *OrderLineItemSelect
Aggregate returns a OrderLineItemSelect configured with the given aggregations.
func (*OrderLineItemQuery) All ¶
func (oliq *OrderLineItemQuery) All(ctx context.Context) ([]*OrderLineItem, error)
All executes the query and returns a list of OrderLineItems.
func (*OrderLineItemQuery) AllX ¶
func (oliq *OrderLineItemQuery) AllX(ctx context.Context) []*OrderLineItem
AllX is like All, but panics if an error occurs.
func (*OrderLineItemQuery) Clone ¶
func (oliq *OrderLineItemQuery) Clone() *OrderLineItemQuery
Clone returns a duplicate of the OrderLineItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderLineItemQuery) Count ¶
func (oliq *OrderLineItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderLineItemQuery) CountX ¶
func (oliq *OrderLineItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderLineItemQuery) Exist ¶
func (oliq *OrderLineItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderLineItemQuery) ExistX ¶
func (oliq *OrderLineItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderLineItemQuery) First ¶
func (oliq *OrderLineItemQuery) First(ctx context.Context) (*OrderLineItem, error)
First returns the first OrderLineItem entity from the query. Returns a *NotFoundError when no OrderLineItem was found.
func (*OrderLineItemQuery) FirstID ¶
FirstID returns the first OrderLineItem ID from the query. Returns a *NotFoundError when no OrderLineItem ID was found.
func (*OrderLineItemQuery) FirstIDX ¶
func (oliq *OrderLineItemQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderLineItemQuery) FirstX ¶
func (oliq *OrderLineItemQuery) FirstX(ctx context.Context) *OrderLineItem
FirstX is like First, but panics if an error occurs.
func (*OrderLineItemQuery) GroupBy ¶
func (oliq *OrderLineItemQuery) GroupBy(field string, fields ...string) *OrderLineItemGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.OrderLineItem.Query(). GroupBy(orderlineitem.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderLineItemQuery) IDsX ¶
func (oliq *OrderLineItemQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*OrderLineItemQuery) Limit ¶
func (oliq *OrderLineItemQuery) Limit(limit int) *OrderLineItemQuery
Limit the number of records to be returned by this query.
func (*OrderLineItemQuery) Offset ¶
func (oliq *OrderLineItemQuery) Offset(offset int) *OrderLineItemQuery
Offset to start from.
func (*OrderLineItemQuery) Only ¶
func (oliq *OrderLineItemQuery) Only(ctx context.Context) (*OrderLineItem, error)
Only returns a single OrderLineItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrderLineItem entity is found. Returns a *NotFoundError when no OrderLineItem entities are found.
func (*OrderLineItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only OrderLineItem ID in the query. Returns a *NotSingularError when more than one OrderLineItem ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderLineItemQuery) OnlyIDX ¶
func (oliq *OrderLineItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderLineItemQuery) OnlyX ¶
func (oliq *OrderLineItemQuery) OnlyX(ctx context.Context) *OrderLineItem
OnlyX is like Only, but panics if an error occurs.
func (*OrderLineItemQuery) Order ¶
func (oliq *OrderLineItemQuery) Order(o ...orderlineitem.OrderOption) *OrderLineItemQuery
Order specifies how the records should be ordered.
func (*OrderLineItemQuery) QueryOrder ¶
func (oliq *OrderLineItemQuery) QueryOrder() *OrderQuery
QueryOrder chains the current query on the "order" edge.
func (*OrderLineItemQuery) QueryProduct ¶
func (oliq *OrderLineItemQuery) QueryProduct() *ProductQuery
QueryProduct chains the current query on the "product" edge.
func (*OrderLineItemQuery) Select ¶
func (oliq *OrderLineItemQuery) Select(fields ...string) *OrderLineItemSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.OrderLineItem.Query(). Select(orderlineitem.FieldCreatedAt). Scan(ctx, &v)
func (*OrderLineItemQuery) Unique ¶
func (oliq *OrderLineItemQuery) Unique(unique bool) *OrderLineItemQuery
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 (*OrderLineItemQuery) Where ¶
func (oliq *OrderLineItemQuery) Where(ps ...predicate.OrderLineItem) *OrderLineItemQuery
Where adds a new predicate for the OrderLineItemQuery builder.
func (*OrderLineItemQuery) WithOrder ¶
func (oliq *OrderLineItemQuery) WithOrder(opts ...func(*OrderQuery)) *OrderLineItemQuery
WithOrder tells the query-builder to eager-load the nodes that are connected to the "order" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderLineItemQuery) WithProduct ¶
func (oliq *OrderLineItemQuery) WithProduct(opts ...func(*ProductQuery)) *OrderLineItemQuery
WithProduct tells the query-builder to eager-load the nodes that are connected to the "product" edge. The optional arguments are used to configure the query builder of the edge.
type OrderLineItemSelect ¶
type OrderLineItemSelect struct { *OrderLineItemQuery // contains filtered or unexported fields }
OrderLineItemSelect is the builder for selecting fields of OrderLineItem entities.
func (*OrderLineItemSelect) Aggregate ¶
func (olis *OrderLineItemSelect) Aggregate(fns ...AggregateFunc) *OrderLineItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderLineItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderLineItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderLineItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderLineItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderLineItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderLineItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderLineItemSelect) Scan ¶
func (olis *OrderLineItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderLineItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderLineItemUpdate ¶
type OrderLineItemUpdate struct {
// contains filtered or unexported fields
}
OrderLineItemUpdate is the builder for updating OrderLineItem entities.
func (*OrderLineItemUpdate) AddQty ¶
func (oliu *OrderLineItemUpdate) AddQty(d decimal.Decimal) *OrderLineItemUpdate
AddQty adds d to the "qty" field.
func (*OrderLineItemUpdate) Exec ¶
func (oliu *OrderLineItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderLineItemUpdate) ExecX ¶
func (oliu *OrderLineItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderLineItemUpdate) Mutation ¶
func (oliu *OrderLineItemUpdate) Mutation() *OrderLineItemMutation
Mutation returns the OrderLineItemMutation object of the builder.
func (*OrderLineItemUpdate) Save ¶
func (oliu *OrderLineItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderLineItemUpdate) SaveX ¶
func (oliu *OrderLineItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderLineItemUpdate) SetNillableQty ¶
func (oliu *OrderLineItemUpdate) SetNillableQty(d *decimal.Decimal) *OrderLineItemUpdate
SetNillableQty sets the "qty" field if the given value is not nil.
func (*OrderLineItemUpdate) SetQty ¶
func (oliu *OrderLineItemUpdate) SetQty(d decimal.Decimal) *OrderLineItemUpdate
SetQty sets the "qty" field.
func (*OrderLineItemUpdate) SetUpdatedAt ¶
func (oliu *OrderLineItemUpdate) SetUpdatedAt(t time.Time) *OrderLineItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderLineItemUpdate) Where ¶
func (oliu *OrderLineItemUpdate) Where(ps ...predicate.OrderLineItem) *OrderLineItemUpdate
Where appends a list predicates to the OrderLineItemUpdate builder.
type OrderLineItemUpdateOne ¶
type OrderLineItemUpdateOne struct {
// contains filtered or unexported fields
}
OrderLineItemUpdateOne is the builder for updating a single OrderLineItem entity.
func (*OrderLineItemUpdateOne) AddQty ¶
func (oliuo *OrderLineItemUpdateOne) AddQty(d decimal.Decimal) *OrderLineItemUpdateOne
AddQty adds d to the "qty" field.
func (*OrderLineItemUpdateOne) Exec ¶
func (oliuo *OrderLineItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderLineItemUpdateOne) ExecX ¶
func (oliuo *OrderLineItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderLineItemUpdateOne) Mutation ¶
func (oliuo *OrderLineItemUpdateOne) Mutation() *OrderLineItemMutation
Mutation returns the OrderLineItemMutation object of the builder.
func (*OrderLineItemUpdateOne) Save ¶
func (oliuo *OrderLineItemUpdateOne) Save(ctx context.Context) (*OrderLineItem, error)
Save executes the query and returns the updated OrderLineItem entity.
func (*OrderLineItemUpdateOne) SaveX ¶
func (oliuo *OrderLineItemUpdateOne) SaveX(ctx context.Context) *OrderLineItem
SaveX is like Save, but panics if an error occurs.
func (*OrderLineItemUpdateOne) Select ¶
func (oliuo *OrderLineItemUpdateOne) Select(field string, fields ...string) *OrderLineItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderLineItemUpdateOne) SetNillableQty ¶
func (oliuo *OrderLineItemUpdateOne) SetNillableQty(d *decimal.Decimal) *OrderLineItemUpdateOne
SetNillableQty sets the "qty" field if the given value is not nil.
func (*OrderLineItemUpdateOne) SetQty ¶
func (oliuo *OrderLineItemUpdateOne) SetQty(d decimal.Decimal) *OrderLineItemUpdateOne
SetQty sets the "qty" field.
func (*OrderLineItemUpdateOne) SetUpdatedAt ¶
func (oliuo *OrderLineItemUpdateOne) SetUpdatedAt(t time.Time) *OrderLineItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderLineItemUpdateOne) Where ¶
func (oliuo *OrderLineItemUpdateOne) Where(ps ...predicate.OrderLineItem) *OrderLineItemUpdateOne
Where appends a list predicates to the OrderLineItemUpdate builder.
type OrderLineItems ¶
type OrderLineItems []*OrderLineItem
OrderLineItems is a parsable slice of OrderLineItem.
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) AddPriority ¶
func (m *OrderMutation) AddPriority(i int)
AddPriority adds i to the "priority" field.
func (*OrderMutation) AddedEdges ¶
func (m *OrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderMutation) AddedField ¶
func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*OrderMutation) AddedFields ¶
func (m *OrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderMutation) 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) AddedPriority ¶
func (m *OrderMutation) AddedPriority() (r int, exists bool)
AddedPriority returns the value that was added to the "priority" field in this mutation.
func (*OrderMutation) ClearCreator ¶
func (m *OrderMutation) ClearCreator()
ClearCreator clears the "creator" edge to the Person entity.
func (*OrderMutation) ClearCustomer ¶
func (m *OrderMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Person entity.
func (*OrderMutation) ClearDeliveryStaff ¶
func (m *OrderMutation) ClearDeliveryStaff()
ClearDeliveryStaff clears the "delivery_staff" edge to the Person entity.
func (*OrderMutation) ClearDeliveryStaffID ¶
func (m *OrderMutation) ClearDeliveryStaffID()
ClearDeliveryStaffID clears the value of the "delivery_staff_id" 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) ClearInternalNote ¶
func (m *OrderMutation) ClearInternalNote()
ClearInternalNote clears the value of the "internal_note" field.
func (*OrderMutation) ClearManagementStaff ¶
func (m *OrderMutation) ClearManagementStaff()
ClearManagementStaff clears the "management_staff" edge to the Person entity.
func (*OrderMutation) ClearNote ¶
func (m *OrderMutation) ClearNote()
ClearNote clears the value of the "note" field.
func (*OrderMutation) ClearOrderStatus ¶
func (m *OrderMutation) ClearOrderStatus()
ClearOrderStatus clears the "order_status" edge to the OrderStatusCode entity.
func (*OrderMutation) ClearParentOrder ¶
func (m *OrderMutation) ClearParentOrder()
ClearParentOrder clears the "parent_order" edge to the Order entity.
func (*OrderMutation) ClearParentOrderID ¶
func (m *OrderMutation) ClearParentOrderID()
ClearParentOrderID clears the value of the "parent_order_id" field.
func (*OrderMutation) ClearWarehouseStaff ¶
func (m *OrderMutation) ClearWarehouseStaff()
ClearWarehouseStaff clears the "warehouse_staff" edge to the Person entity.
func (*OrderMutation) ClearWarehouseStaffID ¶
func (m *OrderMutation) ClearWarehouseStaffID()
ClearWarehouseStaffID clears the value of the "warehouse_staff_id" field.
func (*OrderMutation) ClearedEdges ¶
func (m *OrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderMutation) ClearedFields ¶
func (m *OrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderMutation) Client ¶
func (m OrderMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*OrderMutation) CreatedAt ¶
func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderMutation) CreatedBy ¶
func (m *OrderMutation) CreatedBy() (r uuid.UUID, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*OrderMutation) CreatorCleared ¶
func (m *OrderMutation) CreatorCleared() bool
CreatorCleared reports if the "creator" edge to the Person entity was cleared.
func (*OrderMutation) CreatorID ¶
func (m *OrderMutation) CreatorID() (id uuid.UUID, exists bool)
CreatorID returns the "creator" edge ID in the mutation.
func (*OrderMutation) CreatorIDs ¶
func (m *OrderMutation) CreatorIDs() (ids []uuid.UUID)
CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.
func (*OrderMutation) CustomerCleared ¶
func (m *OrderMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Person entity was cleared.
func (*OrderMutation) CustomerID ¶
func (m *OrderMutation) CustomerID() (r uuid.UUID, exists bool)
CustomerID returns the value of the "customer_id" field in the mutation.
func (*OrderMutation) CustomerIDs ¶
func (m *OrderMutation) CustomerIDs() (ids []uuid.UUID)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*OrderMutation) DeliveryStaffCleared ¶
func (m *OrderMutation) DeliveryStaffCleared() bool
DeliveryStaffCleared reports if the "delivery_staff" edge to the Person entity was cleared.
func (*OrderMutation) DeliveryStaffID ¶
func (m *OrderMutation) DeliveryStaffID() (r uuid.UUID, exists bool)
DeliveryStaffID returns the value of the "delivery_staff_id" field in the mutation.
func (*OrderMutation) DeliveryStaffIDCleared ¶
func (m *OrderMutation) DeliveryStaffIDCleared() bool
DeliveryStaffIDCleared returns if the "delivery_staff_id" field was cleared in this mutation.
func (*OrderMutation) DeliveryStaffIDs ¶
func (m *OrderMutation) DeliveryStaffIDs() (ids []uuid.UUID)
DeliveryStaffIDs returns the "delivery_staff" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeliveryStaffID instead. It exists only for internal usage by the builders.
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) GetType ¶
func (m *OrderMutation) GetType() (r order.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*OrderMutation) ID ¶
func (m *OrderMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OrderMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrderMutation) InternalNote ¶
func (m *OrderMutation) InternalNote() (r string, exists bool)
InternalNote returns the value of the "internal_note" field in the mutation.
func (*OrderMutation) InternalNoteCleared ¶
func (m *OrderMutation) InternalNoteCleared() bool
InternalNoteCleared returns if the "internal_note" field was cleared in this mutation.
func (*OrderMutation) ManagementStaffCleared ¶
func (m *OrderMutation) ManagementStaffCleared() bool
ManagementStaffCleared reports if the "management_staff" edge to the Person entity was cleared.
func (*OrderMutation) ManagementStaffID ¶
func (m *OrderMutation) ManagementStaffID() (r uuid.UUID, exists bool)
ManagementStaffID returns the value of the "management_staff_id" field in the mutation.
func (*OrderMutation) ManagementStaffIDs ¶
func (m *OrderMutation) ManagementStaffIDs() (ids []uuid.UUID)
ManagementStaffIDs returns the "management_staff" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ManagementStaffID instead. It exists only for internal usage by the builders.
func (*OrderMutation) Note ¶
func (m *OrderMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*OrderMutation) NoteCleared ¶
func (m *OrderMutation) NoteCleared() bool
NoteCleared returns if the "note" field was cleared in this mutation.
func (*OrderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldCreatedBy ¶
OldCreatedBy returns the old "created_by" 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) OldCustomerID ¶
OldCustomerID returns the old "customer_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) OldDeliveryStaffID ¶
OldDeliveryStaffID returns the old "delivery_staff_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) 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) OldInternalNote ¶
func (m *OrderMutation) OldInternalNote(ctx context.Context) (v *string, err error)
OldInternalNote returns the old "internal_note" 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) OldManagementStaffID ¶
OldManagementStaffID returns the old "management_staff_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) OldNote ¶
func (m *OrderMutation) OldNote(ctx context.Context) (v *string, err error)
OldNote returns the old "note" 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) OldParentOrderID ¶
OldParentOrderID returns the old "parent_order_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) OldPriority ¶
func (m *OrderMutation) OldPriority(ctx context.Context) (v int, err error)
OldPriority returns the old "priority" 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) OldStatusCode ¶
func (m *OrderMutation) OldStatusCode(ctx context.Context) (v int, err error)
OldStatusCode returns the old "status_code" 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) OldType ¶
OldType returns the old "type" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldWarehouseStaffID ¶
OldWarehouseStaffID returns the old "warehouse_staff_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) OrderStatusCleared ¶
func (m *OrderMutation) OrderStatusCleared() bool
OrderStatusCleared reports if the "order_status" edge to the OrderStatusCode entity was cleared.
func (*OrderMutation) OrderStatusID ¶
func (m *OrderMutation) OrderStatusID() (id int, exists bool)
OrderStatusID returns the "order_status" edge ID in the mutation.
func (*OrderMutation) OrderStatusIDs ¶
func (m *OrderMutation) OrderStatusIDs() (ids []int)
OrderStatusIDs returns the "order_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderStatusID instead. It exists only for internal usage by the builders.
func (*OrderMutation) ParentOrderCleared ¶
func (m *OrderMutation) ParentOrderCleared() bool
ParentOrderCleared reports if the "parent_order" edge to the Order entity was cleared.
func (*OrderMutation) ParentOrderID ¶
func (m *OrderMutation) ParentOrderID() (r uuid.UUID, exists bool)
ParentOrderID returns the value of the "parent_order_id" field in the mutation.
func (*OrderMutation) ParentOrderIDCleared ¶
func (m *OrderMutation) ParentOrderIDCleared() bool
ParentOrderIDCleared returns if the "parent_order_id" field was cleared in this mutation.
func (*OrderMutation) ParentOrderIDs ¶
func (m *OrderMutation) ParentOrderIDs() (ids []uuid.UUID)
ParentOrderIDs returns the "parent_order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentOrderID instead. It exists only for internal usage by the builders.
func (*OrderMutation) Priority ¶
func (m *OrderMutation) Priority() (r int, exists bool)
Priority returns the value of the "priority" field in the mutation.
func (*OrderMutation) RemovedEdges ¶
func (m *OrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderMutation) RemovedIDs ¶
func (m *OrderMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*OrderMutation) ResetCreatedAt ¶
func (m *OrderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderMutation) ResetCreatedBy ¶
func (m *OrderMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*OrderMutation) ResetCreator ¶
func (m *OrderMutation) ResetCreator()
ResetCreator resets all changes to the "creator" edge.
func (*OrderMutation) ResetCustomer ¶
func (m *OrderMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*OrderMutation) ResetCustomerID ¶
func (m *OrderMutation) ResetCustomerID()
ResetCustomerID resets all changes to the "customer_id" field.
func (*OrderMutation) ResetDeliveryStaff ¶
func (m *OrderMutation) ResetDeliveryStaff()
ResetDeliveryStaff resets all changes to the "delivery_staff" edge.
func (*OrderMutation) ResetDeliveryStaffID ¶
func (m *OrderMutation) ResetDeliveryStaffID()
ResetDeliveryStaffID resets all changes to the "delivery_staff_id" 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) ResetInternalNote ¶
func (m *OrderMutation) ResetInternalNote()
ResetInternalNote resets all changes to the "internal_note" field.
func (*OrderMutation) ResetManagementStaff ¶
func (m *OrderMutation) ResetManagementStaff()
ResetManagementStaff resets all changes to the "management_staff" edge.
func (*OrderMutation) ResetManagementStaffID ¶
func (m *OrderMutation) ResetManagementStaffID()
ResetManagementStaffID resets all changes to the "management_staff_id" field.
func (*OrderMutation) ResetNote ¶
func (m *OrderMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*OrderMutation) ResetOrderStatus ¶
func (m *OrderMutation) ResetOrderStatus()
ResetOrderStatus resets all changes to the "order_status" edge.
func (*OrderMutation) ResetParentOrder ¶
func (m *OrderMutation) ResetParentOrder()
ResetParentOrder resets all changes to the "parent_order" edge.
func (*OrderMutation) ResetParentOrderID ¶
func (m *OrderMutation) ResetParentOrderID()
ResetParentOrderID resets all changes to the "parent_order_id" field.
func (*OrderMutation) ResetPriority ¶
func (m *OrderMutation) ResetPriority()
ResetPriority resets all changes to the "priority" field.
func (*OrderMutation) ResetStatusCode ¶
func (m *OrderMutation) ResetStatusCode()
ResetStatusCode resets all changes to the "status_code" field.
func (*OrderMutation) ResetType ¶
func (m *OrderMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*OrderMutation) ResetUpdatedAt ¶
func (m *OrderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderMutation) ResetWarehouseStaff ¶
func (m *OrderMutation) ResetWarehouseStaff()
ResetWarehouseStaff resets all changes to the "warehouse_staff" edge.
func (*OrderMutation) ResetWarehouseStaffID ¶
func (m *OrderMutation) ResetWarehouseStaffID()
ResetWarehouseStaffID resets all changes to the "warehouse_staff_id" field.
func (*OrderMutation) SetCreatedAt ¶
func (m *OrderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderMutation) SetCreatedBy ¶
func (m *OrderMutation) SetCreatedBy(u uuid.UUID)
SetCreatedBy sets the "created_by" field.
func (*OrderMutation) SetCreatorID ¶
func (m *OrderMutation) SetCreatorID(id uuid.UUID)
SetCreatorID sets the "creator" edge to the Person entity by id.
func (*OrderMutation) SetCustomerID ¶
func (m *OrderMutation) SetCustomerID(u uuid.UUID)
SetCustomerID sets the "customer_id" field.
func (*OrderMutation) SetDeliveryStaffID ¶
func (m *OrderMutation) SetDeliveryStaffID(u uuid.UUID)
SetDeliveryStaffID sets the "delivery_staff_id" 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 uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Order entities.
func (*OrderMutation) SetInternalNote ¶
func (m *OrderMutation) SetInternalNote(s string)
SetInternalNote sets the "internal_note" field.
func (*OrderMutation) SetManagementStaffID ¶
func (m *OrderMutation) SetManagementStaffID(u uuid.UUID)
SetManagementStaffID sets the "management_staff_id" field.
func (*OrderMutation) SetNote ¶
func (m *OrderMutation) SetNote(s string)
SetNote sets the "note" field.
func (*OrderMutation) SetOp ¶
func (m *OrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderMutation) SetOrderStatusID ¶
func (m *OrderMutation) SetOrderStatusID(id int)
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by id.
func (*OrderMutation) SetParentOrderID ¶
func (m *OrderMutation) SetParentOrderID(u uuid.UUID)
SetParentOrderID sets the "parent_order_id" field.
func (*OrderMutation) SetPriority ¶
func (m *OrderMutation) SetPriority(i int)
SetPriority sets the "priority" field.
func (*OrderMutation) SetStatusCode ¶
func (m *OrderMutation) SetStatusCode(i int)
SetStatusCode sets the "status_code" field.
func (*OrderMutation) SetType ¶
func (m *OrderMutation) SetType(o order.Type)
SetType sets the "type" field.
func (*OrderMutation) SetUpdatedAt ¶
func (m *OrderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrderMutation) SetWarehouseStaffID ¶
func (m *OrderMutation) SetWarehouseStaffID(u uuid.UUID)
SetWarehouseStaffID sets the "warehouse_staff_id" field.
func (*OrderMutation) StatusCode ¶
func (m *OrderMutation) StatusCode() (r int, exists bool)
StatusCode returns the value of the "status_code" field in the mutation.
func (OrderMutation) Tx ¶
func (m OrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderMutation) Type ¶
func (m *OrderMutation) Type() string
Type returns the node type of this mutation (Order).
func (*OrderMutation) UpdatedAt ¶
func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderMutation) WarehouseStaffCleared ¶
func (m *OrderMutation) WarehouseStaffCleared() bool
WarehouseStaffCleared reports if the "warehouse_staff" edge to the Person entity was cleared.
func (*OrderMutation) WarehouseStaffID ¶
func (m *OrderMutation) WarehouseStaffID() (r uuid.UUID, exists bool)
WarehouseStaffID returns the value of the "warehouse_staff_id" field in the mutation.
func (*OrderMutation) WarehouseStaffIDCleared ¶
func (m *OrderMutation) WarehouseStaffIDCleared() bool
WarehouseStaffIDCleared returns if the "warehouse_staff_id" field was cleared in this mutation.
func (*OrderMutation) WarehouseStaffIDs ¶
func (m *OrderMutation) WarehouseStaffIDs() (ids []uuid.UUID)
WarehouseStaffIDs returns the "warehouse_staff" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WarehouseStaffID instead. It exists only for internal usage by the builders.
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 ¶
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) uuid.UUID
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Order.Query(). GroupBy(order.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderQuery) IDsX ¶
func (oq *OrderQuery) IDsX(ctx context.Context) []uuid.UUID
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 ¶
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) uuid.UUID
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) QueryCreator ¶
func (oq *OrderQuery) QueryCreator() *PersonQuery
QueryCreator chains the current query on the "creator" edge.
func (*OrderQuery) QueryCustomer ¶
func (oq *OrderQuery) QueryCustomer() *PersonQuery
QueryCustomer chains the current query on the "customer" edge.
func (*OrderQuery) QueryDeliveryStaff ¶
func (oq *OrderQuery) QueryDeliveryStaff() *PersonQuery
QueryDeliveryStaff chains the current query on the "delivery_staff" edge.
func (*OrderQuery) QueryManagementStaff ¶
func (oq *OrderQuery) QueryManagementStaff() *PersonQuery
QueryManagementStaff chains the current query on the "management_staff" edge.
func (*OrderQuery) QueryOrderStatus ¶
func (oq *OrderQuery) QueryOrderStatus() *OrderStatusCodeQuery
QueryOrderStatus chains the current query on the "order_status" edge.
func (*OrderQuery) QueryParentOrder ¶
func (oq *OrderQuery) QueryParentOrder() *OrderQuery
QueryParentOrder chains the current query on the "parent_order" edge.
func (*OrderQuery) QueryWarehouseStaff ¶
func (oq *OrderQuery) QueryWarehouseStaff() *PersonQuery
QueryWarehouseStaff chains the current query on the "warehouse_staff" 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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Order.Query(). Select(order.FieldCreatedAt). 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) WithCreator ¶
func (oq *OrderQuery) WithCreator(opts ...func(*PersonQuery)) *OrderQuery
WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithCustomer ¶
func (oq *OrderQuery) WithCustomer(opts ...func(*PersonQuery)) *OrderQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithDeliveryStaff ¶
func (oq *OrderQuery) WithDeliveryStaff(opts ...func(*PersonQuery)) *OrderQuery
WithDeliveryStaff tells the query-builder to eager-load the nodes that are connected to the "delivery_staff" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithManagementStaff ¶
func (oq *OrderQuery) WithManagementStaff(opts ...func(*PersonQuery)) *OrderQuery
WithManagementStaff tells the query-builder to eager-load the nodes that are connected to the "management_staff" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithOrderStatus ¶
func (oq *OrderQuery) WithOrderStatus(opts ...func(*OrderStatusCodeQuery)) *OrderQuery
WithOrderStatus tells the query-builder to eager-load the nodes that are connected to the "order_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithParentOrder ¶
func (oq *OrderQuery) WithParentOrder(opts ...func(*OrderQuery)) *OrderQuery
WithParentOrder tells the query-builder to eager-load the nodes that are connected to the "parent_order" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithWarehouseStaff ¶
func (oq *OrderQuery) WithWarehouseStaff(opts ...func(*PersonQuery)) *OrderQuery
WithWarehouseStaff tells the query-builder to eager-load the nodes that are connected to the "warehouse_staff" 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 OrderStatusCode ¶
type OrderStatusCode struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // OrderStatus holds the value of the "order_status" field. OrderStatus string `json:"order_status,omitempty"` // contains filtered or unexported fields }
OrderStatusCode is the model entity for the OrderStatusCode schema.
func (*OrderStatusCode) String ¶
func (osc *OrderStatusCode) String() string
String implements the fmt.Stringer.
func (*OrderStatusCode) Unwrap ¶
func (osc *OrderStatusCode) Unwrap() *OrderStatusCode
Unwrap unwraps the OrderStatusCode 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 (*OrderStatusCode) Update ¶
func (osc *OrderStatusCode) Update() *OrderStatusCodeUpdateOne
Update returns a builder for updating this OrderStatusCode. Note that you need to call OrderStatusCode.Unwrap() before calling this method if this OrderStatusCode was returned from a transaction, and the transaction was committed or rolled back.
type OrderStatusCodeClient ¶
type OrderStatusCodeClient struct {
// contains filtered or unexported fields
}
OrderStatusCodeClient is a client for the OrderStatusCode schema.
func NewOrderStatusCodeClient ¶
func NewOrderStatusCodeClient(c config) *OrderStatusCodeClient
NewOrderStatusCodeClient returns a client for the OrderStatusCode from the given config.
func (*OrderStatusCodeClient) Create ¶
func (c *OrderStatusCodeClient) Create() *OrderStatusCodeCreate
Create returns a builder for creating a OrderStatusCode entity.
func (*OrderStatusCodeClient) CreateBulk ¶
func (c *OrderStatusCodeClient) CreateBulk(builders ...*OrderStatusCodeCreate) *OrderStatusCodeCreateBulk
CreateBulk returns a builder for creating a bulk of OrderStatusCode entities.
func (*OrderStatusCodeClient) Delete ¶
func (c *OrderStatusCodeClient) Delete() *OrderStatusCodeDelete
Delete returns a delete builder for OrderStatusCode.
func (*OrderStatusCodeClient) DeleteOne ¶
func (c *OrderStatusCodeClient) DeleteOne(osc *OrderStatusCode) *OrderStatusCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderStatusCodeClient) DeleteOneID ¶
func (c *OrderStatusCodeClient) DeleteOneID(id int) *OrderStatusCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderStatusCodeClient) Get ¶
func (c *OrderStatusCodeClient) Get(ctx context.Context, id int) (*OrderStatusCode, error)
Get returns a OrderStatusCode entity by its id.
func (*OrderStatusCodeClient) GetX ¶
func (c *OrderStatusCodeClient) GetX(ctx context.Context, id int) *OrderStatusCode
GetX is like Get, but panics if an error occurs.
func (*OrderStatusCodeClient) Hooks ¶
func (c *OrderStatusCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrderStatusCodeClient) Intercept ¶
func (c *OrderStatusCodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orderstatuscode.Intercept(f(g(h())))`.
func (*OrderStatusCodeClient) Interceptors ¶
func (c *OrderStatusCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderStatusCodeClient) MapCreateBulk ¶
func (c *OrderStatusCodeClient) MapCreateBulk(slice any, setFunc func(*OrderStatusCodeCreate, int)) *OrderStatusCodeCreateBulk
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 (*OrderStatusCodeClient) Query ¶
func (c *OrderStatusCodeClient) Query() *OrderStatusCodeQuery
Query returns a query builder for OrderStatusCode.
func (*OrderStatusCodeClient) Update ¶
func (c *OrderStatusCodeClient) Update() *OrderStatusCodeUpdate
Update returns an update builder for OrderStatusCode.
func (*OrderStatusCodeClient) UpdateOne ¶
func (c *OrderStatusCodeClient) UpdateOne(osc *OrderStatusCode) *OrderStatusCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderStatusCodeClient) UpdateOneID ¶
func (c *OrderStatusCodeClient) UpdateOneID(id int) *OrderStatusCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderStatusCodeClient) Use ¶
func (c *OrderStatusCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orderstatuscode.Hooks(f(g(h())))`.
type OrderStatusCodeCreate ¶
type OrderStatusCodeCreate struct {
// contains filtered or unexported fields
}
OrderStatusCodeCreate is the builder for creating a OrderStatusCode entity.
func (*OrderStatusCodeCreate) Exec ¶
func (oscc *OrderStatusCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderStatusCodeCreate) ExecX ¶
func (oscc *OrderStatusCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeCreate) Mutation ¶
func (oscc *OrderStatusCodeCreate) Mutation() *OrderStatusCodeMutation
Mutation returns the OrderStatusCodeMutation object of the builder.
func (*OrderStatusCodeCreate) Save ¶
func (oscc *OrderStatusCodeCreate) Save(ctx context.Context) (*OrderStatusCode, error)
Save creates the OrderStatusCode in the database.
func (*OrderStatusCodeCreate) SaveX ¶
func (oscc *OrderStatusCodeCreate) SaveX(ctx context.Context) *OrderStatusCode
SaveX calls Save and panics if Save returns an error.
func (*OrderStatusCodeCreate) SetCreatedAt ¶
func (oscc *OrderStatusCodeCreate) SetCreatedAt(t time.Time) *OrderStatusCodeCreate
SetCreatedAt sets the "created_at" field.
func (*OrderStatusCodeCreate) SetID ¶
func (oscc *OrderStatusCodeCreate) SetID(i int) *OrderStatusCodeCreate
SetID sets the "id" field.
func (*OrderStatusCodeCreate) SetNillableCreatedAt ¶
func (oscc *OrderStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *OrderStatusCodeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderStatusCodeCreate) SetNillableUpdatedAt ¶
func (oscc *OrderStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *OrderStatusCodeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderStatusCodeCreate) SetOrderStatus ¶
func (oscc *OrderStatusCodeCreate) SetOrderStatus(s string) *OrderStatusCodeCreate
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeCreate) SetUpdatedAt ¶
func (oscc *OrderStatusCodeCreate) SetUpdatedAt(t time.Time) *OrderStatusCodeCreate
SetUpdatedAt sets the "updated_at" field.
type OrderStatusCodeCreateBulk ¶
type OrderStatusCodeCreateBulk struct {
// contains filtered or unexported fields
}
OrderStatusCodeCreateBulk is the builder for creating many OrderStatusCode entities in bulk.
func (*OrderStatusCodeCreateBulk) Exec ¶
func (osccb *OrderStatusCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderStatusCodeCreateBulk) ExecX ¶
func (osccb *OrderStatusCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeCreateBulk) Save ¶
func (osccb *OrderStatusCodeCreateBulk) Save(ctx context.Context) ([]*OrderStatusCode, error)
Save creates the OrderStatusCode entities in the database.
func (*OrderStatusCodeCreateBulk) SaveX ¶
func (osccb *OrderStatusCodeCreateBulk) SaveX(ctx context.Context) []*OrderStatusCode
SaveX is like Save, but panics if an error occurs.
type OrderStatusCodeDelete ¶
type OrderStatusCodeDelete struct {
// contains filtered or unexported fields
}
OrderStatusCodeDelete is the builder for deleting a OrderStatusCode entity.
func (*OrderStatusCodeDelete) Exec ¶
func (oscd *OrderStatusCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderStatusCodeDelete) ExecX ¶
func (oscd *OrderStatusCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeDelete) Where ¶
func (oscd *OrderStatusCodeDelete) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeDelete
Where appends a list predicates to the OrderStatusCodeDelete builder.
type OrderStatusCodeDeleteOne ¶
type OrderStatusCodeDeleteOne struct {
// contains filtered or unexported fields
}
OrderStatusCodeDeleteOne is the builder for deleting a single OrderStatusCode entity.
func (*OrderStatusCodeDeleteOne) Exec ¶
func (oscdo *OrderStatusCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderStatusCodeDeleteOne) ExecX ¶
func (oscdo *OrderStatusCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeDeleteOne) Where ¶
func (oscdo *OrderStatusCodeDeleteOne) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeDeleteOne
Where appends a list predicates to the OrderStatusCodeDelete builder.
type OrderStatusCodeGroupBy ¶
type OrderStatusCodeGroupBy struct {
// contains filtered or unexported fields
}
OrderStatusCodeGroupBy is the group-by builder for OrderStatusCode entities.
func (*OrderStatusCodeGroupBy) Aggregate ¶
func (oscgb *OrderStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *OrderStatusCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderStatusCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderStatusCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Scan ¶
func (oscgb *OrderStatusCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderStatusCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderStatusCodeMutation ¶
type OrderStatusCodeMutation struct {
// contains filtered or unexported fields
}
OrderStatusCodeMutation represents an operation that mutates the OrderStatusCode nodes in the graph.
func (*OrderStatusCodeMutation) AddField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) AddedEdges ¶
func (m *OrderStatusCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderStatusCodeMutation) AddedField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) AddedFields ¶
func (m *OrderStatusCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderStatusCodeMutation) AddedIDs ¶
func (m *OrderStatusCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderStatusCodeMutation) ClearEdge ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ClearField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ClearedEdges ¶
func (m *OrderStatusCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderStatusCodeMutation) ClearedFields ¶
func (m *OrderStatusCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderStatusCodeMutation) Client ¶
func (m OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) CreatedAt ¶
func (m *OrderStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderStatusCodeMutation) EdgeCleared ¶
func (m *OrderStatusCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderStatusCodeMutation) Field ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) FieldCleared ¶
func (m *OrderStatusCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderStatusCodeMutation) Fields ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ID ¶
func (m *OrderStatusCodeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OrderStatusCodeMutation) IDs ¶
func (m *OrderStatusCodeMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrderStatusCodeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OrderStatusCode entity. If the OrderStatusCode 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 (*OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) OldOrderStatus ¶
func (m *OrderStatusCodeMutation) OldOrderStatus(ctx context.Context) (v string, err error)
OldOrderStatus returns the old "order_status" field's value of the OrderStatusCode entity. If the OrderStatusCode 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 (*OrderStatusCodeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OrderStatusCode entity. If the OrderStatusCode 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 (*OrderStatusCodeMutation) Op ¶
func (m *OrderStatusCodeMutation) Op() Op
Op returns the operation name.
func (*OrderStatusCodeMutation) OrderStatus ¶
func (m *OrderStatusCodeMutation) OrderStatus() (r string, exists bool)
OrderStatus returns the value of the "order_status" field in the mutation.
func (*OrderStatusCodeMutation) RemovedEdges ¶
func (m *OrderStatusCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderStatusCodeMutation) RemovedIDs ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ResetCreatedAt ¶
func (m *OrderStatusCodeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderStatusCodeMutation) ResetEdge ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ResetField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ResetOrderStatus ¶
func (m *OrderStatusCodeMutation) ResetOrderStatus()
ResetOrderStatus resets all changes to the "order_status" field.
func (*OrderStatusCodeMutation) ResetUpdatedAt ¶
func (m *OrderStatusCodeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderStatusCodeMutation) SetCreatedAt ¶
func (m *OrderStatusCodeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderStatusCodeMutation) SetField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) SetID ¶
func (m *OrderStatusCodeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OrderStatusCode entities.
func (*OrderStatusCodeMutation) SetOp ¶
func (m *OrderStatusCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderStatusCodeMutation) SetOrderStatus ¶
func (m *OrderStatusCodeMutation) SetOrderStatus(s string)
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeMutation) SetUpdatedAt ¶
func (m *OrderStatusCodeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (OrderStatusCodeMutation) Tx ¶
func (m OrderStatusCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderStatusCodeMutation) Type ¶
func (m *OrderStatusCodeMutation) Type() string
Type returns the node type of this mutation (OrderStatusCode).
func (*OrderStatusCodeMutation) UpdatedAt ¶
func (m *OrderStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderStatusCodeMutation) Where ¶
func (m *OrderStatusCodeMutation) Where(ps ...predicate.OrderStatusCode)
Where appends a list predicates to the OrderStatusCodeMutation builder.
func (*OrderStatusCodeMutation) WhereP ¶
func (m *OrderStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderStatusCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderStatusCodeQuery ¶
type OrderStatusCodeQuery struct {
// contains filtered or unexported fields
}
OrderStatusCodeQuery is the builder for querying OrderStatusCode entities.
func (*OrderStatusCodeQuery) Aggregate ¶
func (oscq *OrderStatusCodeQuery) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
Aggregate returns a OrderStatusCodeSelect configured with the given aggregations.
func (*OrderStatusCodeQuery) All ¶
func (oscq *OrderStatusCodeQuery) All(ctx context.Context) ([]*OrderStatusCode, error)
All executes the query and returns a list of OrderStatusCodes.
func (*OrderStatusCodeQuery) AllX ¶
func (oscq *OrderStatusCodeQuery) AllX(ctx context.Context) []*OrderStatusCode
AllX is like All, but panics if an error occurs.
func (*OrderStatusCodeQuery) Clone ¶
func (oscq *OrderStatusCodeQuery) Clone() *OrderStatusCodeQuery
Clone returns a duplicate of the OrderStatusCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderStatusCodeQuery) Count ¶
func (oscq *OrderStatusCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderStatusCodeQuery) CountX ¶
func (oscq *OrderStatusCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderStatusCodeQuery) Exist ¶
func (oscq *OrderStatusCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderStatusCodeQuery) ExistX ¶
func (oscq *OrderStatusCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderStatusCodeQuery) First ¶
func (oscq *OrderStatusCodeQuery) First(ctx context.Context) (*OrderStatusCode, error)
First returns the first OrderStatusCode entity from the query. Returns a *NotFoundError when no OrderStatusCode was found.
func (*OrderStatusCodeQuery) FirstID ¶
func (oscq *OrderStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OrderStatusCode ID from the query. Returns a *NotFoundError when no OrderStatusCode ID was found.
func (*OrderStatusCodeQuery) FirstIDX ¶
func (oscq *OrderStatusCodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderStatusCodeQuery) FirstX ¶
func (oscq *OrderStatusCodeQuery) FirstX(ctx context.Context) *OrderStatusCode
FirstX is like First, but panics if an error occurs.
func (*OrderStatusCodeQuery) GroupBy ¶
func (oscq *OrderStatusCodeQuery) GroupBy(field string, fields ...string) *OrderStatusCodeGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.OrderStatusCode.Query(). GroupBy(orderstatuscode.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderStatusCodeQuery) IDs ¶
func (oscq *OrderStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OrderStatusCode IDs.
func (*OrderStatusCodeQuery) IDsX ¶
func (oscq *OrderStatusCodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OrderStatusCodeQuery) Limit ¶
func (oscq *OrderStatusCodeQuery) Limit(limit int) *OrderStatusCodeQuery
Limit the number of records to be returned by this query.
func (*OrderStatusCodeQuery) Offset ¶
func (oscq *OrderStatusCodeQuery) Offset(offset int) *OrderStatusCodeQuery
Offset to start from.
func (*OrderStatusCodeQuery) Only ¶
func (oscq *OrderStatusCodeQuery) Only(ctx context.Context) (*OrderStatusCode, error)
Only returns a single OrderStatusCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrderStatusCode entity is found. Returns a *NotFoundError when no OrderStatusCode entities are found.
func (*OrderStatusCodeQuery) OnlyID ¶
func (oscq *OrderStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OrderStatusCode ID in the query. Returns a *NotSingularError when more than one OrderStatusCode ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderStatusCodeQuery) OnlyIDX ¶
func (oscq *OrderStatusCodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderStatusCodeQuery) OnlyX ¶
func (oscq *OrderStatusCodeQuery) OnlyX(ctx context.Context) *OrderStatusCode
OnlyX is like Only, but panics if an error occurs.
func (*OrderStatusCodeQuery) Order ¶
func (oscq *OrderStatusCodeQuery) Order(o ...orderstatuscode.OrderOption) *OrderStatusCodeQuery
Order specifies how the records should be ordered.
func (*OrderStatusCodeQuery) Select ¶
func (oscq *OrderStatusCodeQuery) Select(fields ...string) *OrderStatusCodeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.OrderStatusCode.Query(). Select(orderstatuscode.FieldCreatedAt). Scan(ctx, &v)
func (*OrderStatusCodeQuery) Unique ¶
func (oscq *OrderStatusCodeQuery) Unique(unique bool) *OrderStatusCodeQuery
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 (*OrderStatusCodeQuery) Where ¶
func (oscq *OrderStatusCodeQuery) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeQuery
Where adds a new predicate for the OrderStatusCodeQuery builder.
type OrderStatusCodeSelect ¶
type OrderStatusCodeSelect struct { *OrderStatusCodeQuery // contains filtered or unexported fields }
OrderStatusCodeSelect is the builder for selecting fields of OrderStatusCode entities.
func (*OrderStatusCodeSelect) Aggregate ¶
func (oscs *OrderStatusCodeSelect) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderStatusCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderStatusCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Scan ¶
func (oscs *OrderStatusCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderStatusCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderStatusCodeUpdate ¶
type OrderStatusCodeUpdate struct {
// contains filtered or unexported fields
}
OrderStatusCodeUpdate is the builder for updating OrderStatusCode entities.
func (*OrderStatusCodeUpdate) Exec ¶
func (oscu *OrderStatusCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderStatusCodeUpdate) ExecX ¶
func (oscu *OrderStatusCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeUpdate) Mutation ¶
func (oscu *OrderStatusCodeUpdate) Mutation() *OrderStatusCodeMutation
Mutation returns the OrderStatusCodeMutation object of the builder.
func (*OrderStatusCodeUpdate) Save ¶
func (oscu *OrderStatusCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderStatusCodeUpdate) SaveX ¶
func (oscu *OrderStatusCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderStatusCodeUpdate) SetNillableOrderStatus ¶
func (oscu *OrderStatusCodeUpdate) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdate
SetNillableOrderStatus sets the "order_status" field if the given value is not nil.
func (*OrderStatusCodeUpdate) SetOrderStatus ¶
func (oscu *OrderStatusCodeUpdate) SetOrderStatus(s string) *OrderStatusCodeUpdate
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeUpdate) SetUpdatedAt ¶
func (oscu *OrderStatusCodeUpdate) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderStatusCodeUpdate) Where ¶
func (oscu *OrderStatusCodeUpdate) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdate
Where appends a list predicates to the OrderStatusCodeUpdate builder.
type OrderStatusCodeUpdateOne ¶
type OrderStatusCodeUpdateOne struct {
// contains filtered or unexported fields
}
OrderStatusCodeUpdateOne is the builder for updating a single OrderStatusCode entity.
func (*OrderStatusCodeUpdateOne) Exec ¶
func (oscuo *OrderStatusCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderStatusCodeUpdateOne) ExecX ¶
func (oscuo *OrderStatusCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeUpdateOne) Mutation ¶
func (oscuo *OrderStatusCodeUpdateOne) Mutation() *OrderStatusCodeMutation
Mutation returns the OrderStatusCodeMutation object of the builder.
func (*OrderStatusCodeUpdateOne) Save ¶
func (oscuo *OrderStatusCodeUpdateOne) Save(ctx context.Context) (*OrderStatusCode, error)
Save executes the query and returns the updated OrderStatusCode entity.
func (*OrderStatusCodeUpdateOne) SaveX ¶
func (oscuo *OrderStatusCodeUpdateOne) SaveX(ctx context.Context) *OrderStatusCode
SaveX is like Save, but panics if an error occurs.
func (*OrderStatusCodeUpdateOne) Select ¶
func (oscuo *OrderStatusCodeUpdateOne) Select(field string, fields ...string) *OrderStatusCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderStatusCodeUpdateOne) SetNillableOrderStatus ¶
func (oscuo *OrderStatusCodeUpdateOne) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdateOne
SetNillableOrderStatus sets the "order_status" field if the given value is not nil.
func (*OrderStatusCodeUpdateOne) SetOrderStatus ¶
func (oscuo *OrderStatusCodeUpdateOne) SetOrderStatus(s string) *OrderStatusCodeUpdateOne
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeUpdateOne) SetUpdatedAt ¶
func (oscuo *OrderStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderStatusCodeUpdateOne) Where ¶
func (oscuo *OrderStatusCodeUpdateOne) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdateOne
Where appends a list predicates to the OrderStatusCodeUpdate builder.
type OrderStatusCodes ¶
type OrderStatusCodes []*OrderStatusCode
OrderStatusCodes is a parsable slice of OrderStatusCode.
type OrderUpdate ¶
type OrderUpdate struct {
// contains filtered or unexported fields
}
OrderUpdate is the builder for updating Order entities.
func (*OrderUpdate) AddPriority ¶
func (ou *OrderUpdate) AddPriority(i int) *OrderUpdate
AddPriority adds i to the "priority" field.
func (*OrderUpdate) ClearDeliveryStaff ¶
func (ou *OrderUpdate) ClearDeliveryStaff() *OrderUpdate
ClearDeliveryStaff clears the "delivery_staff" edge to the Person entity.
func (*OrderUpdate) ClearDeliveryStaffID ¶
func (ou *OrderUpdate) ClearDeliveryStaffID() *OrderUpdate
ClearDeliveryStaffID clears the value of the "delivery_staff_id" field.
func (*OrderUpdate) ClearInternalNote ¶
func (ou *OrderUpdate) ClearInternalNote() *OrderUpdate
ClearInternalNote clears the value of the "internal_note" field.
func (*OrderUpdate) ClearManagementStaff ¶
func (ou *OrderUpdate) ClearManagementStaff() *OrderUpdate
ClearManagementStaff clears the "management_staff" edge to the Person entity.
func (*OrderUpdate) ClearNote ¶
func (ou *OrderUpdate) ClearNote() *OrderUpdate
ClearNote clears the value of the "note" field.
func (*OrderUpdate) ClearOrderStatus ¶
func (ou *OrderUpdate) ClearOrderStatus() *OrderUpdate
ClearOrderStatus clears the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdate) ClearParentOrder ¶
func (ou *OrderUpdate) ClearParentOrder() *OrderUpdate
ClearParentOrder clears the "parent_order" edge to the Order entity.
func (*OrderUpdate) ClearParentOrderID ¶
func (ou *OrderUpdate) ClearParentOrderID() *OrderUpdate
ClearParentOrderID clears the value of the "parent_order_id" field.
func (*OrderUpdate) ClearWarehouseStaff ¶
func (ou *OrderUpdate) ClearWarehouseStaff() *OrderUpdate
ClearWarehouseStaff clears the "warehouse_staff" edge to the Person entity.
func (*OrderUpdate) ClearWarehouseStaffID ¶
func (ou *OrderUpdate) ClearWarehouseStaffID() *OrderUpdate
ClearWarehouseStaffID clears the value of the "warehouse_staff_id" field.
func (*OrderUpdate) Exec ¶
func (ou *OrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpdate) ExecX ¶
func (ou *OrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdate) Mutation ¶
func (ou *OrderUpdate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdate) Save ¶
func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderUpdate) SaveX ¶
func (ou *OrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdate) SetDeliveryStaff ¶
func (ou *OrderUpdate) SetDeliveryStaff(p *Person) *OrderUpdate
SetDeliveryStaff sets the "delivery_staff" edge to the Person entity.
func (*OrderUpdate) SetDeliveryStaffID ¶
func (ou *OrderUpdate) SetDeliveryStaffID(u uuid.UUID) *OrderUpdate
SetDeliveryStaffID sets the "delivery_staff_id" field.
func (*OrderUpdate) SetInternalNote ¶
func (ou *OrderUpdate) SetInternalNote(s string) *OrderUpdate
SetInternalNote sets the "internal_note" field.
func (*OrderUpdate) SetManagementStaff ¶
func (ou *OrderUpdate) SetManagementStaff(p *Person) *OrderUpdate
SetManagementStaff sets the "management_staff" edge to the Person entity.
func (*OrderUpdate) SetManagementStaffID ¶
func (ou *OrderUpdate) SetManagementStaffID(u uuid.UUID) *OrderUpdate
SetManagementStaffID sets the "management_staff_id" field.
func (*OrderUpdate) SetNillableDeliveryStaffID ¶
func (ou *OrderUpdate) SetNillableDeliveryStaffID(u *uuid.UUID) *OrderUpdate
SetNillableDeliveryStaffID sets the "delivery_staff_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableInternalNote ¶
func (ou *OrderUpdate) SetNillableInternalNote(s *string) *OrderUpdate
SetNillableInternalNote sets the "internal_note" field if the given value is not nil.
func (*OrderUpdate) SetNillableManagementStaffID ¶
func (ou *OrderUpdate) SetNillableManagementStaffID(u *uuid.UUID) *OrderUpdate
SetNillableManagementStaffID sets the "management_staff_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableNote ¶
func (ou *OrderUpdate) SetNillableNote(s *string) *OrderUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*OrderUpdate) SetNillableParentOrderID ¶
func (ou *OrderUpdate) SetNillableParentOrderID(u *uuid.UUID) *OrderUpdate
SetNillableParentOrderID sets the "parent_order_id" field if the given value is not nil.
func (*OrderUpdate) SetNillablePriority ¶
func (ou *OrderUpdate) SetNillablePriority(i *int) *OrderUpdate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*OrderUpdate) SetNillableStatusCode ¶
func (ou *OrderUpdate) SetNillableStatusCode(i *int) *OrderUpdate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*OrderUpdate) SetNillableWarehouseStaffID ¶
func (ou *OrderUpdate) SetNillableWarehouseStaffID(u *uuid.UUID) *OrderUpdate
SetNillableWarehouseStaffID sets the "warehouse_staff_id" field if the given value is not nil.
func (*OrderUpdate) SetNote ¶
func (ou *OrderUpdate) SetNote(s string) *OrderUpdate
SetNote sets the "note" field.
func (*OrderUpdate) SetOrderStatus ¶
func (ou *OrderUpdate) SetOrderStatus(o *OrderStatusCode) *OrderUpdate
SetOrderStatus sets the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdate) SetOrderStatusID ¶
func (ou *OrderUpdate) SetOrderStatusID(id int) *OrderUpdate
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by ID.
func (*OrderUpdate) SetParentOrder ¶
func (ou *OrderUpdate) SetParentOrder(o *Order) *OrderUpdate
SetParentOrder sets the "parent_order" edge to the Order entity.
func (*OrderUpdate) SetParentOrderID ¶
func (ou *OrderUpdate) SetParentOrderID(u uuid.UUID) *OrderUpdate
SetParentOrderID sets the "parent_order_id" field.
func (*OrderUpdate) SetPriority ¶
func (ou *OrderUpdate) SetPriority(i int) *OrderUpdate
SetPriority sets the "priority" field.
func (*OrderUpdate) SetStatusCode ¶
func (ou *OrderUpdate) SetStatusCode(i int) *OrderUpdate
SetStatusCode sets the "status_code" field.
func (*OrderUpdate) SetUpdatedAt ¶
func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdate) SetWarehouseStaff ¶
func (ou *OrderUpdate) SetWarehouseStaff(p *Person) *OrderUpdate
SetWarehouseStaff sets the "warehouse_staff" edge to the Person entity.
func (*OrderUpdate) SetWarehouseStaffID ¶
func (ou *OrderUpdate) SetWarehouseStaffID(u uuid.UUID) *OrderUpdate
SetWarehouseStaffID sets the "warehouse_staff_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) AddPriority ¶
func (ouo *OrderUpdateOne) AddPriority(i int) *OrderUpdateOne
AddPriority adds i to the "priority" field.
func (*OrderUpdateOne) ClearDeliveryStaff ¶
func (ouo *OrderUpdateOne) ClearDeliveryStaff() *OrderUpdateOne
ClearDeliveryStaff clears the "delivery_staff" edge to the Person entity.
func (*OrderUpdateOne) ClearDeliveryStaffID ¶
func (ouo *OrderUpdateOne) ClearDeliveryStaffID() *OrderUpdateOne
ClearDeliveryStaffID clears the value of the "delivery_staff_id" field.
func (*OrderUpdateOne) ClearInternalNote ¶
func (ouo *OrderUpdateOne) ClearInternalNote() *OrderUpdateOne
ClearInternalNote clears the value of the "internal_note" field.
func (*OrderUpdateOne) ClearManagementStaff ¶
func (ouo *OrderUpdateOne) ClearManagementStaff() *OrderUpdateOne
ClearManagementStaff clears the "management_staff" edge to the Person entity.
func (*OrderUpdateOne) ClearNote ¶
func (ouo *OrderUpdateOne) ClearNote() *OrderUpdateOne
ClearNote clears the value of the "note" field.
func (*OrderUpdateOne) ClearOrderStatus ¶
func (ouo *OrderUpdateOne) ClearOrderStatus() *OrderUpdateOne
ClearOrderStatus clears the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdateOne) ClearParentOrder ¶
func (ouo *OrderUpdateOne) ClearParentOrder() *OrderUpdateOne
ClearParentOrder clears the "parent_order" edge to the Order entity.
func (*OrderUpdateOne) ClearParentOrderID ¶
func (ouo *OrderUpdateOne) ClearParentOrderID() *OrderUpdateOne
ClearParentOrderID clears the value of the "parent_order_id" field.
func (*OrderUpdateOne) ClearWarehouseStaff ¶
func (ouo *OrderUpdateOne) ClearWarehouseStaff() *OrderUpdateOne
ClearWarehouseStaff clears the "warehouse_staff" edge to the Person entity.
func (*OrderUpdateOne) ClearWarehouseStaffID ¶
func (ouo *OrderUpdateOne) ClearWarehouseStaffID() *OrderUpdateOne
ClearWarehouseStaffID clears the value of the "warehouse_staff_id" field.
func (*OrderUpdateOne) Exec ¶
func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderUpdateOne) ExecX ¶
func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdateOne) Mutation ¶
func (ouo *OrderUpdateOne) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdateOne) Save ¶
func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
Save executes the query and returns the updated Order entity.
func (*OrderUpdateOne) SaveX ¶
func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdateOne) Select ¶
func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderUpdateOne) SetDeliveryStaff ¶
func (ouo *OrderUpdateOne) SetDeliveryStaff(p *Person) *OrderUpdateOne
SetDeliveryStaff sets the "delivery_staff" edge to the Person entity.
func (*OrderUpdateOne) SetDeliveryStaffID ¶
func (ouo *OrderUpdateOne) SetDeliveryStaffID(u uuid.UUID) *OrderUpdateOne
SetDeliveryStaffID sets the "delivery_staff_id" field.
func (*OrderUpdateOne) SetInternalNote ¶
func (ouo *OrderUpdateOne) SetInternalNote(s string) *OrderUpdateOne
SetInternalNote sets the "internal_note" field.
func (*OrderUpdateOne) SetManagementStaff ¶
func (ouo *OrderUpdateOne) SetManagementStaff(p *Person) *OrderUpdateOne
SetManagementStaff sets the "management_staff" edge to the Person entity.
func (*OrderUpdateOne) SetManagementStaffID ¶
func (ouo *OrderUpdateOne) SetManagementStaffID(u uuid.UUID) *OrderUpdateOne
SetManagementStaffID sets the "management_staff_id" field.
func (*OrderUpdateOne) SetNillableDeliveryStaffID ¶
func (ouo *OrderUpdateOne) SetNillableDeliveryStaffID(u *uuid.UUID) *OrderUpdateOne
SetNillableDeliveryStaffID sets the "delivery_staff_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableInternalNote ¶
func (ouo *OrderUpdateOne) SetNillableInternalNote(s *string) *OrderUpdateOne
SetNillableInternalNote sets the "internal_note" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableManagementStaffID ¶
func (ouo *OrderUpdateOne) SetNillableManagementStaffID(u *uuid.UUID) *OrderUpdateOne
SetNillableManagementStaffID sets the "management_staff_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableNote ¶
func (ouo *OrderUpdateOne) SetNillableNote(s *string) *OrderUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableParentOrderID ¶
func (ouo *OrderUpdateOne) SetNillableParentOrderID(u *uuid.UUID) *OrderUpdateOne
SetNillableParentOrderID sets the "parent_order_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillablePriority ¶
func (ouo *OrderUpdateOne) SetNillablePriority(i *int) *OrderUpdateOne
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableStatusCode ¶
func (ouo *OrderUpdateOne) SetNillableStatusCode(i *int) *OrderUpdateOne
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableWarehouseStaffID ¶
func (ouo *OrderUpdateOne) SetNillableWarehouseStaffID(u *uuid.UUID) *OrderUpdateOne
SetNillableWarehouseStaffID sets the "warehouse_staff_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNote ¶
func (ouo *OrderUpdateOne) SetNote(s string) *OrderUpdateOne
SetNote sets the "note" field.
func (*OrderUpdateOne) SetOrderStatus ¶
func (ouo *OrderUpdateOne) SetOrderStatus(o *OrderStatusCode) *OrderUpdateOne
SetOrderStatus sets the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdateOne) SetOrderStatusID ¶
func (ouo *OrderUpdateOne) SetOrderStatusID(id int) *OrderUpdateOne
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by ID.
func (*OrderUpdateOne) SetParentOrder ¶
func (ouo *OrderUpdateOne) SetParentOrder(o *Order) *OrderUpdateOne
SetParentOrder sets the "parent_order" edge to the Order entity.
func (*OrderUpdateOne) SetParentOrderID ¶
func (ouo *OrderUpdateOne) SetParentOrderID(u uuid.UUID) *OrderUpdateOne
SetParentOrderID sets the "parent_order_id" field.
func (*OrderUpdateOne) SetPriority ¶
func (ouo *OrderUpdateOne) SetPriority(i int) *OrderUpdateOne
SetPriority sets the "priority" field.
func (*OrderUpdateOne) SetStatusCode ¶
func (ouo *OrderUpdateOne) SetStatusCode(i int) *OrderUpdateOne
SetStatusCode sets the "status_code" field.
func (*OrderUpdateOne) SetUpdatedAt ¶
func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdateOne) SetWarehouseStaff ¶
func (ouo *OrderUpdateOne) SetWarehouseStaff(p *Person) *OrderUpdateOne
SetWarehouseStaff sets the "warehouse_staff" edge to the Person entity.
func (*OrderUpdateOne) SetWarehouseStaffID ¶
func (ouo *OrderUpdateOne) SetWarehouseStaffID(u uuid.UUID) *OrderUpdateOne
SetWarehouseStaffID sets the "warehouse_staff_id" field.
func (*OrderUpdateOne) Where ¶
func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
Where appends a list predicates to the OrderUpdate builder.
type Person ¶
type Person struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // AvatarURL holds the value of the "avatar_url" field. AvatarURL string `json:"avatar_url,omitempty"` // Email holds the value of the "email" field. Email *string `json:"email,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Phone holds the value of the "phone" field. Phone string `json:"phone,omitempty"` // Role holds the value of the "role" field. Role person.Role `json:"role,omitempty"` // PasswordHash holds the value of the "password_hash" field. PasswordHash *[]byte `json:"-"` // IsEmailVerified holds the value of the "is_email_verified" field. IsEmailVerified bool `json:"is_email_verified,omitempty"` // IsPhoneVerified holds the value of the "is_phone_verified" field. IsPhoneVerified bool `json:"is_phone_verified,omitempty"` // contains filtered or unexported fields }
Person is the model entity for the Person schema.
func (*Person) Unwrap ¶
Unwrap unwraps the Person 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 (*Person) Update ¶
func (pe *Person) Update() *PersonUpdateOne
Update returns a builder for updating this Person. Note that you need to call Person.Unwrap() before calling this method if this Person was returned from a transaction, and the transaction was committed or rolled back.
type PersonClient ¶
type PersonClient struct {
// contains filtered or unexported fields
}
PersonClient is a client for the Person schema.
func NewPersonClient ¶
func NewPersonClient(c config) *PersonClient
NewPersonClient returns a client for the Person from the given config.
func (*PersonClient) Create ¶
func (c *PersonClient) Create() *PersonCreate
Create returns a builder for creating a Person entity.
func (*PersonClient) CreateBulk ¶
func (c *PersonClient) CreateBulk(builders ...*PersonCreate) *PersonCreateBulk
CreateBulk returns a builder for creating a bulk of Person entities.
func (*PersonClient) Delete ¶
func (c *PersonClient) Delete() *PersonDelete
Delete returns a delete builder for Person.
func (*PersonClient) DeleteOne ¶
func (c *PersonClient) DeleteOne(pe *Person) *PersonDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PersonClient) DeleteOneID ¶
func (c *PersonClient) DeleteOneID(id uuid.UUID) *PersonDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PersonClient) Intercept ¶
func (c *PersonClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `person.Intercept(f(g(h())))`.
func (*PersonClient) Interceptors ¶
func (c *PersonClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PersonClient) MapCreateBulk ¶
func (c *PersonClient) MapCreateBulk(slice any, setFunc func(*PersonCreate, int)) *PersonCreateBulk
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 (*PersonClient) Query ¶
func (c *PersonClient) Query() *PersonQuery
Query returns a query builder for Person.
func (*PersonClient) Update ¶
func (c *PersonClient) Update() *PersonUpdate
Update returns an update builder for Person.
func (*PersonClient) UpdateOne ¶
func (c *PersonClient) UpdateOne(pe *Person) *PersonUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PersonClient) UpdateOneID ¶
func (c *PersonClient) UpdateOneID(id uuid.UUID) *PersonUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PersonClient) Use ¶
func (c *PersonClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `person.Hooks(f(g(h())))`.
type PersonCreate ¶
type PersonCreate struct {
// contains filtered or unexported fields
}
PersonCreate is the builder for creating a Person entity.
func (*PersonCreate) Exec ¶
func (pc *PersonCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonCreate) ExecX ¶
func (pc *PersonCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonCreate) Mutation ¶
func (pc *PersonCreate) Mutation() *PersonMutation
Mutation returns the PersonMutation object of the builder.
func (*PersonCreate) Save ¶
func (pc *PersonCreate) Save(ctx context.Context) (*Person, error)
Save creates the Person in the database.
func (*PersonCreate) SaveX ¶
func (pc *PersonCreate) SaveX(ctx context.Context) *Person
SaveX calls Save and panics if Save returns an error.
func (*PersonCreate) SetAvatarURL ¶
func (pc *PersonCreate) SetAvatarURL(s string) *PersonCreate
SetAvatarURL sets the "avatar_url" field.
func (*PersonCreate) SetCreatedAt ¶
func (pc *PersonCreate) SetCreatedAt(t time.Time) *PersonCreate
SetCreatedAt sets the "created_at" field.
func (*PersonCreate) SetEmail ¶
func (pc *PersonCreate) SetEmail(s string) *PersonCreate
SetEmail sets the "email" field.
func (*PersonCreate) SetID ¶
func (pc *PersonCreate) SetID(u uuid.UUID) *PersonCreate
SetID sets the "id" field.
func (*PersonCreate) SetIsEmailVerified ¶
func (pc *PersonCreate) SetIsEmailVerified(b bool) *PersonCreate
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonCreate) SetIsPhoneVerified ¶
func (pc *PersonCreate) SetIsPhoneVerified(b bool) *PersonCreate
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonCreate) SetName ¶
func (pc *PersonCreate) SetName(s string) *PersonCreate
SetName sets the "name" field.
func (*PersonCreate) SetNillableAvatarURL ¶
func (pc *PersonCreate) SetNillableAvatarURL(s *string) *PersonCreate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*PersonCreate) SetNillableCreatedAt ¶
func (pc *PersonCreate) SetNillableCreatedAt(t *time.Time) *PersonCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PersonCreate) SetNillableEmail ¶
func (pc *PersonCreate) SetNillableEmail(s *string) *PersonCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PersonCreate) SetNillableID ¶
func (pc *PersonCreate) SetNillableID(u *uuid.UUID) *PersonCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PersonCreate) SetNillableIsEmailVerified ¶
func (pc *PersonCreate) SetNillableIsEmailVerified(b *bool) *PersonCreate
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*PersonCreate) SetNillableIsPhoneVerified ¶
func (pc *PersonCreate) SetNillableIsPhoneVerified(b *bool) *PersonCreate
SetNillableIsPhoneVerified sets the "is_phone_verified" field if the given value is not nil.
func (*PersonCreate) SetNillableRole ¶
func (pc *PersonCreate) SetNillableRole(pe *person.Role) *PersonCreate
SetNillableRole sets the "role" field if the given value is not nil.
func (*PersonCreate) SetNillableUpdatedAt ¶
func (pc *PersonCreate) SetNillableUpdatedAt(t *time.Time) *PersonCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PersonCreate) SetPasswordHash ¶
func (pc *PersonCreate) SetPasswordHash(b []byte) *PersonCreate
SetPasswordHash sets the "password_hash" field.
func (*PersonCreate) SetPhone ¶
func (pc *PersonCreate) SetPhone(s string) *PersonCreate
SetPhone sets the "phone" field.
func (*PersonCreate) SetRole ¶
func (pc *PersonCreate) SetRole(pe person.Role) *PersonCreate
SetRole sets the "role" field.
func (*PersonCreate) SetUpdatedAt ¶
func (pc *PersonCreate) SetUpdatedAt(t time.Time) *PersonCreate
SetUpdatedAt sets the "updated_at" field.
type PersonCreateBulk ¶
type PersonCreateBulk struct {
// contains filtered or unexported fields
}
PersonCreateBulk is the builder for creating many Person entities in bulk.
func (*PersonCreateBulk) Exec ¶
func (pcb *PersonCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonCreateBulk) ExecX ¶
func (pcb *PersonCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PersonDelete ¶
type PersonDelete struct {
// contains filtered or unexported fields
}
PersonDelete is the builder for deleting a Person entity.
func (*PersonDelete) Exec ¶
func (pd *PersonDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PersonDelete) ExecX ¶
func (pd *PersonDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PersonDelete) Where ¶
func (pd *PersonDelete) Where(ps ...predicate.Person) *PersonDelete
Where appends a list predicates to the PersonDelete builder.
type PersonDeleteOne ¶
type PersonDeleteOne struct {
// contains filtered or unexported fields
}
PersonDeleteOne is the builder for deleting a single Person entity.
func (*PersonDeleteOne) Exec ¶
func (pdo *PersonDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PersonDeleteOne) ExecX ¶
func (pdo *PersonDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonDeleteOne) Where ¶
func (pdo *PersonDeleteOne) Where(ps ...predicate.Person) *PersonDeleteOne
Where appends a list predicates to the PersonDelete builder.
type PersonGroupBy ¶
type PersonGroupBy struct {
// contains filtered or unexported fields
}
PersonGroupBy is the group-by builder for Person entities.
func (*PersonGroupBy) Aggregate ¶
func (pgb *PersonGroupBy) Aggregate(fns ...AggregateFunc) *PersonGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PersonGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Scan ¶
func (pgb *PersonGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonMutation ¶
type PersonMutation struct {
// contains filtered or unexported fields
}
PersonMutation represents an operation that mutates the Person nodes in the graph.
func (*PersonMutation) AddField ¶
func (m *PersonMutation) 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 (*PersonMutation) AddedEdges ¶
func (m *PersonMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PersonMutation) AddedField ¶
func (m *PersonMutation) 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 (*PersonMutation) AddedFields ¶
func (m *PersonMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PersonMutation) AddedIDs ¶
func (m *PersonMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PersonMutation) AvatarURL ¶
func (m *PersonMutation) AvatarURL() (r string, exists bool)
AvatarURL returns the value of the "avatar_url" field in the mutation.
func (*PersonMutation) AvatarURLCleared ¶
func (m *PersonMutation) AvatarURLCleared() bool
AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.
func (*PersonMutation) ClearAvatarURL ¶
func (m *PersonMutation) ClearAvatarURL()
ClearAvatarURL clears the value of the "avatar_url" field.
func (*PersonMutation) ClearEdge ¶
func (m *PersonMutation) 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 (*PersonMutation) ClearEmail ¶
func (m *PersonMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*PersonMutation) ClearField ¶
func (m *PersonMutation) 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 (*PersonMutation) ClearPasswordHash ¶
func (m *PersonMutation) ClearPasswordHash()
ClearPasswordHash clears the value of the "password_hash" field.
func (*PersonMutation) ClearedEdges ¶
func (m *PersonMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PersonMutation) ClearedFields ¶
func (m *PersonMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PersonMutation) Client ¶
func (m PersonMutation) 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 (*PersonMutation) CreatedAt ¶
func (m *PersonMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PersonMutation) EdgeCleared ¶
func (m *PersonMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PersonMutation) Email ¶
func (m *PersonMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*PersonMutation) EmailCleared ¶
func (m *PersonMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*PersonMutation) Field ¶
func (m *PersonMutation) 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 (*PersonMutation) FieldCleared ¶
func (m *PersonMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PersonMutation) Fields ¶
func (m *PersonMutation) 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 (*PersonMutation) ID ¶
func (m *PersonMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PersonMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PersonMutation) IsEmailVerified ¶
func (m *PersonMutation) IsEmailVerified() (r bool, exists bool)
IsEmailVerified returns the value of the "is_email_verified" field in the mutation.
func (*PersonMutation) IsPhoneVerified ¶
func (m *PersonMutation) IsPhoneVerified() (r bool, exists bool)
IsPhoneVerified returns the value of the "is_phone_verified" field in the mutation.
func (*PersonMutation) Name ¶
func (m *PersonMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PersonMutation) OldAvatarURL ¶
func (m *PersonMutation) OldAvatarURL(ctx context.Context) (v string, err error)
OldAvatarURL returns the old "avatar_url" field's value of the Person entity. If the Person 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 (*PersonMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Person entity. If the Person 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 (*PersonMutation) OldEmail ¶
func (m *PersonMutation) OldEmail(ctx context.Context) (v *string, err error)
OldEmail returns the old "email" field's value of the Person entity. If the Person 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 (*PersonMutation) 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 (*PersonMutation) OldIsEmailVerified ¶
func (m *PersonMutation) OldIsEmailVerified(ctx context.Context) (v bool, err error)
OldIsEmailVerified returns the old "is_email_verified" field's value of the Person entity. If the Person 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 (*PersonMutation) OldIsPhoneVerified ¶
func (m *PersonMutation) OldIsPhoneVerified(ctx context.Context) (v bool, err error)
OldIsPhoneVerified returns the old "is_phone_verified" field's value of the Person entity. If the Person 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 (*PersonMutation) OldName ¶
func (m *PersonMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Person entity. If the Person 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 (*PersonMutation) OldPasswordHash ¶
func (m *PersonMutation) OldPasswordHash(ctx context.Context) (v *[]byte, err error)
OldPasswordHash returns the old "password_hash" field's value of the Person entity. If the Person 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 (*PersonMutation) OldPhone ¶
func (m *PersonMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the Person entity. If the Person 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 (*PersonMutation) OldRole ¶
OldRole returns the old "role" field's value of the Person entity. If the Person 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 (*PersonMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Person entity. If the Person 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 (*PersonMutation) PasswordHash ¶
func (m *PersonMutation) PasswordHash() (r []byte, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*PersonMutation) PasswordHashCleared ¶
func (m *PersonMutation) PasswordHashCleared() bool
PasswordHashCleared returns if the "password_hash" field was cleared in this mutation.
func (*PersonMutation) Phone ¶
func (m *PersonMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*PersonMutation) RemovedEdges ¶
func (m *PersonMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PersonMutation) RemovedIDs ¶
func (m *PersonMutation) 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 (*PersonMutation) ResetAvatarURL ¶
func (m *PersonMutation) ResetAvatarURL()
ResetAvatarURL resets all changes to the "avatar_url" field.
func (*PersonMutation) ResetCreatedAt ¶
func (m *PersonMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PersonMutation) ResetEdge ¶
func (m *PersonMutation) 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 (*PersonMutation) ResetEmail ¶
func (m *PersonMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*PersonMutation) ResetField ¶
func (m *PersonMutation) 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 (*PersonMutation) ResetIsEmailVerified ¶
func (m *PersonMutation) ResetIsEmailVerified()
ResetIsEmailVerified resets all changes to the "is_email_verified" field.
func (*PersonMutation) ResetIsPhoneVerified ¶
func (m *PersonMutation) ResetIsPhoneVerified()
ResetIsPhoneVerified resets all changes to the "is_phone_verified" field.
func (*PersonMutation) ResetName ¶
func (m *PersonMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PersonMutation) ResetPasswordHash ¶
func (m *PersonMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*PersonMutation) ResetPhone ¶
func (m *PersonMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*PersonMutation) ResetRole ¶
func (m *PersonMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*PersonMutation) ResetUpdatedAt ¶
func (m *PersonMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PersonMutation) Role ¶
func (m *PersonMutation) Role() (r person.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*PersonMutation) SetAvatarURL ¶
func (m *PersonMutation) SetAvatarURL(s string)
SetAvatarURL sets the "avatar_url" field.
func (*PersonMutation) SetCreatedAt ¶
func (m *PersonMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PersonMutation) SetEmail ¶
func (m *PersonMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*PersonMutation) SetField ¶
func (m *PersonMutation) 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 (*PersonMutation) SetID ¶
func (m *PersonMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Person entities.
func (*PersonMutation) SetIsEmailVerified ¶
func (m *PersonMutation) SetIsEmailVerified(b bool)
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonMutation) SetIsPhoneVerified ¶
func (m *PersonMutation) SetIsPhoneVerified(b bool)
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonMutation) SetName ¶
func (m *PersonMutation) SetName(s string)
SetName sets the "name" field.
func (*PersonMutation) SetOp ¶
func (m *PersonMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PersonMutation) SetPasswordHash ¶
func (m *PersonMutation) SetPasswordHash(b []byte)
SetPasswordHash sets the "password_hash" field.
func (*PersonMutation) SetPhone ¶
func (m *PersonMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*PersonMutation) SetRole ¶
func (m *PersonMutation) SetRole(pe person.Role)
SetRole sets the "role" field.
func (*PersonMutation) SetUpdatedAt ¶
func (m *PersonMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (PersonMutation) Tx ¶
func (m PersonMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PersonMutation) Type ¶
func (m *PersonMutation) Type() string
Type returns the node type of this mutation (Person).
func (*PersonMutation) UpdatedAt ¶
func (m *PersonMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PersonMutation) Where ¶
func (m *PersonMutation) Where(ps ...predicate.Person)
Where appends a list predicates to the PersonMutation builder.
func (*PersonMutation) WhereP ¶
func (m *PersonMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PersonMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PersonQuery ¶
type PersonQuery struct {
// contains filtered or unexported fields
}
PersonQuery is the builder for querying Person entities.
func (*PersonQuery) Aggregate ¶
func (pq *PersonQuery) Aggregate(fns ...AggregateFunc) *PersonSelect
Aggregate returns a PersonSelect configured with the given aggregations.
func (*PersonQuery) All ¶
func (pq *PersonQuery) All(ctx context.Context) ([]*Person, error)
All executes the query and returns a list of Persons.
func (*PersonQuery) AllX ¶
func (pq *PersonQuery) AllX(ctx context.Context) []*Person
AllX is like All, but panics if an error occurs.
func (*PersonQuery) Clone ¶
func (pq *PersonQuery) Clone() *PersonQuery
Clone returns a duplicate of the PersonQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PersonQuery) Count ¶
func (pq *PersonQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PersonQuery) CountX ¶
func (pq *PersonQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PersonQuery) Exist ¶
func (pq *PersonQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PersonQuery) ExistX ¶
func (pq *PersonQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PersonQuery) First ¶
func (pq *PersonQuery) First(ctx context.Context) (*Person, error)
First returns the first Person entity from the query. Returns a *NotFoundError when no Person was found.
func (*PersonQuery) FirstID ¶
FirstID returns the first Person ID from the query. Returns a *NotFoundError when no Person ID was found.
func (*PersonQuery) FirstIDX ¶
func (pq *PersonQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PersonQuery) FirstX ¶
func (pq *PersonQuery) FirstX(ctx context.Context) *Person
FirstX is like First, but panics if an error occurs.
func (*PersonQuery) GroupBy ¶
func (pq *PersonQuery) GroupBy(field string, fields ...string) *PersonGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Person.Query(). GroupBy(person.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PersonQuery) IDsX ¶
func (pq *PersonQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PersonQuery) Limit ¶
func (pq *PersonQuery) Limit(limit int) *PersonQuery
Limit the number of records to be returned by this query.
func (*PersonQuery) Offset ¶
func (pq *PersonQuery) Offset(offset int) *PersonQuery
Offset to start from.
func (*PersonQuery) Only ¶
func (pq *PersonQuery) Only(ctx context.Context) (*Person, error)
Only returns a single Person entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Person entity is found. Returns a *NotFoundError when no Person entities are found.
func (*PersonQuery) OnlyID ¶
OnlyID is like Only, but returns the only Person ID in the query. Returns a *NotSingularError when more than one Person ID is found. Returns a *NotFoundError when no entities are found.
func (*PersonQuery) OnlyIDX ¶
func (pq *PersonQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PersonQuery) OnlyX ¶
func (pq *PersonQuery) OnlyX(ctx context.Context) *Person
OnlyX is like Only, but panics if an error occurs.
func (*PersonQuery) Order ¶
func (pq *PersonQuery) Order(o ...person.OrderOption) *PersonQuery
Order specifies how the records should be ordered.
func (*PersonQuery) Select ¶
func (pq *PersonQuery) Select(fields ...string) *PersonSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Person.Query(). Select(person.FieldCreatedAt). Scan(ctx, &v)
func (*PersonQuery) Unique ¶
func (pq *PersonQuery) Unique(unique bool) *PersonQuery
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 (*PersonQuery) Where ¶
func (pq *PersonQuery) Where(ps ...predicate.Person) *PersonQuery
Where adds a new predicate for the PersonQuery builder.
type PersonSelect ¶
type PersonSelect struct { *PersonQuery // contains filtered or unexported fields }
PersonSelect is the builder for selecting fields of Person entities.
func (*PersonSelect) Aggregate ¶
func (ps *PersonSelect) Aggregate(fns ...AggregateFunc) *PersonSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PersonSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Scan ¶
func (ps *PersonSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonUpdate ¶
type PersonUpdate struct {
// contains filtered or unexported fields
}
PersonUpdate is the builder for updating Person entities.
func (*PersonUpdate) ClearAvatarURL ¶
func (pu *PersonUpdate) ClearAvatarURL() *PersonUpdate
ClearAvatarURL clears the value of the "avatar_url" field.
func (*PersonUpdate) ClearEmail ¶
func (pu *PersonUpdate) ClearEmail() *PersonUpdate
ClearEmail clears the value of the "email" field.
func (*PersonUpdate) ClearPasswordHash ¶
func (pu *PersonUpdate) ClearPasswordHash() *PersonUpdate
ClearPasswordHash clears the value of the "password_hash" field.
func (*PersonUpdate) Exec ¶
func (pu *PersonUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonUpdate) ExecX ¶
func (pu *PersonUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonUpdate) Mutation ¶
func (pu *PersonUpdate) Mutation() *PersonMutation
Mutation returns the PersonMutation object of the builder.
func (*PersonUpdate) Save ¶
func (pu *PersonUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PersonUpdate) SaveX ¶
func (pu *PersonUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PersonUpdate) SetAvatarURL ¶
func (pu *PersonUpdate) SetAvatarURL(s string) *PersonUpdate
SetAvatarURL sets the "avatar_url" field.
func (*PersonUpdate) SetEmail ¶
func (pu *PersonUpdate) SetEmail(s string) *PersonUpdate
SetEmail sets the "email" field.
func (*PersonUpdate) SetIsEmailVerified ¶
func (pu *PersonUpdate) SetIsEmailVerified(b bool) *PersonUpdate
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonUpdate) SetIsPhoneVerified ¶
func (pu *PersonUpdate) SetIsPhoneVerified(b bool) *PersonUpdate
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonUpdate) SetName ¶
func (pu *PersonUpdate) SetName(s string) *PersonUpdate
SetName sets the "name" field.
func (*PersonUpdate) SetNillableAvatarURL ¶
func (pu *PersonUpdate) SetNillableAvatarURL(s *string) *PersonUpdate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*PersonUpdate) SetNillableEmail ¶
func (pu *PersonUpdate) SetNillableEmail(s *string) *PersonUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PersonUpdate) SetNillableIsEmailVerified ¶
func (pu *PersonUpdate) SetNillableIsEmailVerified(b *bool) *PersonUpdate
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*PersonUpdate) SetNillableIsPhoneVerified ¶
func (pu *PersonUpdate) SetNillableIsPhoneVerified(b *bool) *PersonUpdate
SetNillableIsPhoneVerified sets the "is_phone_verified" field if the given value is not nil.
func (*PersonUpdate) SetNillableName ¶
func (pu *PersonUpdate) SetNillableName(s *string) *PersonUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PersonUpdate) SetNillablePhone ¶
func (pu *PersonUpdate) SetNillablePhone(s *string) *PersonUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PersonUpdate) SetNillableRole ¶
func (pu *PersonUpdate) SetNillableRole(pe *person.Role) *PersonUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*PersonUpdate) SetPasswordHash ¶
func (pu *PersonUpdate) SetPasswordHash(b []byte) *PersonUpdate
SetPasswordHash sets the "password_hash" field.
func (*PersonUpdate) SetPhone ¶
func (pu *PersonUpdate) SetPhone(s string) *PersonUpdate
SetPhone sets the "phone" field.
func (*PersonUpdate) SetRole ¶
func (pu *PersonUpdate) SetRole(pe person.Role) *PersonUpdate
SetRole sets the "role" field.
func (*PersonUpdate) SetUpdatedAt ¶
func (pu *PersonUpdate) SetUpdatedAt(t time.Time) *PersonUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PersonUpdate) Where ¶
func (pu *PersonUpdate) Where(ps ...predicate.Person) *PersonUpdate
Where appends a list predicates to the PersonUpdate builder.
type PersonUpdateOne ¶
type PersonUpdateOne struct {
// contains filtered or unexported fields
}
PersonUpdateOne is the builder for updating a single Person entity.
func (*PersonUpdateOne) ClearAvatarURL ¶
func (puo *PersonUpdateOne) ClearAvatarURL() *PersonUpdateOne
ClearAvatarURL clears the value of the "avatar_url" field.
func (*PersonUpdateOne) ClearEmail ¶
func (puo *PersonUpdateOne) ClearEmail() *PersonUpdateOne
ClearEmail clears the value of the "email" field.
func (*PersonUpdateOne) ClearPasswordHash ¶
func (puo *PersonUpdateOne) ClearPasswordHash() *PersonUpdateOne
ClearPasswordHash clears the value of the "password_hash" field.
func (*PersonUpdateOne) Exec ¶
func (puo *PersonUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PersonUpdateOne) ExecX ¶
func (puo *PersonUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonUpdateOne) Mutation ¶
func (puo *PersonUpdateOne) Mutation() *PersonMutation
Mutation returns the PersonMutation object of the builder.
func (*PersonUpdateOne) Save ¶
func (puo *PersonUpdateOne) Save(ctx context.Context) (*Person, error)
Save executes the query and returns the updated Person entity.
func (*PersonUpdateOne) SaveX ¶
func (puo *PersonUpdateOne) SaveX(ctx context.Context) *Person
SaveX is like Save, but panics if an error occurs.
func (*PersonUpdateOne) Select ¶
func (puo *PersonUpdateOne) Select(field string, fields ...string) *PersonUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PersonUpdateOne) SetAvatarURL ¶
func (puo *PersonUpdateOne) SetAvatarURL(s string) *PersonUpdateOne
SetAvatarURL sets the "avatar_url" field.
func (*PersonUpdateOne) SetEmail ¶
func (puo *PersonUpdateOne) SetEmail(s string) *PersonUpdateOne
SetEmail sets the "email" field.
func (*PersonUpdateOne) SetIsEmailVerified ¶
func (puo *PersonUpdateOne) SetIsEmailVerified(b bool) *PersonUpdateOne
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonUpdateOne) SetIsPhoneVerified ¶
func (puo *PersonUpdateOne) SetIsPhoneVerified(b bool) *PersonUpdateOne
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonUpdateOne) SetName ¶
func (puo *PersonUpdateOne) SetName(s string) *PersonUpdateOne
SetName sets the "name" field.
func (*PersonUpdateOne) SetNillableAvatarURL ¶
func (puo *PersonUpdateOne) SetNillableAvatarURL(s *string) *PersonUpdateOne
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableEmail ¶
func (puo *PersonUpdateOne) SetNillableEmail(s *string) *PersonUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableIsEmailVerified ¶
func (puo *PersonUpdateOne) SetNillableIsEmailVerified(b *bool) *PersonUpdateOne
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableIsPhoneVerified ¶
func (puo *PersonUpdateOne) SetNillableIsPhoneVerified(b *bool) *PersonUpdateOne
SetNillableIsPhoneVerified sets the "is_phone_verified" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableName ¶
func (puo *PersonUpdateOne) SetNillableName(s *string) *PersonUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PersonUpdateOne) SetNillablePhone ¶
func (puo *PersonUpdateOne) SetNillablePhone(s *string) *PersonUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableRole ¶
func (puo *PersonUpdateOne) SetNillableRole(pe *person.Role) *PersonUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*PersonUpdateOne) SetPasswordHash ¶
func (puo *PersonUpdateOne) SetPasswordHash(b []byte) *PersonUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*PersonUpdateOne) SetPhone ¶
func (puo *PersonUpdateOne) SetPhone(s string) *PersonUpdateOne
SetPhone sets the "phone" field.
func (*PersonUpdateOne) SetRole ¶
func (puo *PersonUpdateOne) SetRole(pe person.Role) *PersonUpdateOne
SetRole sets the "role" field.
func (*PersonUpdateOne) SetUpdatedAt ¶
func (puo *PersonUpdateOne) SetUpdatedAt(t time.Time) *PersonUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PersonUpdateOne) Where ¶
func (puo *PersonUpdateOne) Where(ps ...predicate.Person) *PersonUpdateOne
Where appends a list predicates to the PersonUpdate builder.
type Product ¶
type Product struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Year holds the value of the "year" field. Year *int `json:"year,omitempty"` // Price holds the value of the "price" field. Price decimal.Decimal `json:"price,omitempty"` // Qty holds the value of the "qty" field. Qty decimal.Decimal `json:"qty,omitempty"` // Colors holds the value of the "colors" field. Colors []string `json:"colors,omitempty"` // Provider holds the value of the "provider" field. Provider *string `json:"provider,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductQuery when eager-loading is set. Edges ProductEdges `json:"edges"` // contains filtered or unexported fields }
Product is the model entity for the Product schema.
func (*Product) QueryProductTags ¶
func (pr *Product) QueryProductTags() *ProductTagQuery
QueryProductTags queries the "product_tags" edge of the Product entity.
func (*Product) Unwrap ¶
Unwrap unwraps the Product 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 (*Product) Update ¶
func (pr *Product) Update() *ProductUpdateOne
Update returns a builder for updating this Product. Note that you need to call Product.Unwrap() before calling this method if this Product was returned from a transaction, and the transaction was committed or rolled back.
type ProductClient ¶
type ProductClient struct {
// contains filtered or unexported fields
}
ProductClient is a client for the Product schema.
func NewProductClient ¶
func NewProductClient(c config) *ProductClient
NewProductClient returns a client for the Product from the given config.
func (*ProductClient) Create ¶
func (c *ProductClient) Create() *ProductCreate
Create returns a builder for creating a Product entity.
func (*ProductClient) CreateBulk ¶
func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk
CreateBulk returns a builder for creating a bulk of Product entities.
func (*ProductClient) Delete ¶
func (c *ProductClient) Delete() *ProductDelete
Delete returns a delete builder for Product.
func (*ProductClient) DeleteOne ¶
func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductClient) DeleteOneID ¶
func (c *ProductClient) DeleteOneID(id string) *ProductDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductClient) GetX ¶
func (c *ProductClient) GetX(ctx context.Context, id string) *Product
GetX is like Get, but panics if an error occurs.
func (*ProductClient) Hooks ¶
func (c *ProductClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductClient) Intercept ¶
func (c *ProductClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `product.Intercept(f(g(h())))`.
func (*ProductClient) Interceptors ¶
func (c *ProductClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductClient) MapCreateBulk ¶
func (c *ProductClient) MapCreateBulk(slice any, setFunc func(*ProductCreate, int)) *ProductCreateBulk
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 (*ProductClient) Query ¶
func (c *ProductClient) Query() *ProductQuery
Query returns a query builder for Product.
func (*ProductClient) QueryProductTags ¶
func (c *ProductClient) QueryProductTags(pr *Product) *ProductTagQuery
QueryProductTags queries the product_tags edge of a Product.
func (*ProductClient) QueryTags ¶
func (c *ProductClient) QueryTags(pr *Product) *TagQuery
QueryTags queries the tags edge of a Product.
func (*ProductClient) Update ¶
func (c *ProductClient) Update() *ProductUpdate
Update returns an update builder for Product.
func (*ProductClient) UpdateOne ¶
func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductClient) UpdateOneID ¶
func (c *ProductClient) UpdateOneID(id string) *ProductUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductClient) Use ¶
func (c *ProductClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `product.Hooks(f(g(h())))`.
type ProductCreate ¶
type ProductCreate struct {
// contains filtered or unexported fields
}
ProductCreate is the builder for creating a Product entity.
func (*ProductCreate) AddTagIDs ¶
func (pc *ProductCreate) AddTagIDs(ids ...string) *ProductCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*ProductCreate) AddTags ¶
func (pc *ProductCreate) AddTags(t ...*Tag) *ProductCreate
AddTags adds the "tags" edges to the Tag entity.
func (*ProductCreate) Exec ¶
func (pc *ProductCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductCreate) ExecX ¶
func (pc *ProductCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductCreate) Mutation ¶
func (pc *ProductCreate) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductCreate) Save ¶
func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)
Save creates the Product in the database.
func (*ProductCreate) SaveX ¶
func (pc *ProductCreate) SaveX(ctx context.Context) *Product
SaveX calls Save and panics if Save returns an error.
func (*ProductCreate) SetColors ¶
func (pc *ProductCreate) SetColors(s []string) *ProductCreate
SetColors sets the "colors" field.
func (*ProductCreate) SetCreatedAt ¶
func (pc *ProductCreate) SetCreatedAt(t time.Time) *ProductCreate
SetCreatedAt sets the "created_at" field.
func (*ProductCreate) SetDescription ¶
func (pc *ProductCreate) SetDescription(s string) *ProductCreate
SetDescription sets the "description" field.
func (*ProductCreate) SetID ¶
func (pc *ProductCreate) SetID(s string) *ProductCreate
SetID sets the "id" field.
func (*ProductCreate) SetName ¶
func (pc *ProductCreate) SetName(s string) *ProductCreate
SetName sets the "name" field.
func (*ProductCreate) SetNillableCreatedAt ¶
func (pc *ProductCreate) SetNillableCreatedAt(t *time.Time) *ProductCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProductCreate) SetNillableDescription ¶
func (pc *ProductCreate) SetNillableDescription(s *string) *ProductCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductCreate) SetNillableProvider ¶
func (pc *ProductCreate) SetNillableProvider(s *string) *ProductCreate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*ProductCreate) SetNillableUpdatedAt ¶
func (pc *ProductCreate) SetNillableUpdatedAt(t *time.Time) *ProductCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProductCreate) SetNillableYear ¶
func (pc *ProductCreate) SetNillableYear(i *int) *ProductCreate
SetNillableYear sets the "year" field if the given value is not nil.
func (*ProductCreate) SetPrice ¶
func (pc *ProductCreate) SetPrice(d decimal.Decimal) *ProductCreate
SetPrice sets the "price" field.
func (*ProductCreate) SetProvider ¶
func (pc *ProductCreate) SetProvider(s string) *ProductCreate
SetProvider sets the "provider" field.
func (*ProductCreate) SetQty ¶
func (pc *ProductCreate) SetQty(d decimal.Decimal) *ProductCreate
SetQty sets the "qty" field.
func (*ProductCreate) SetUpdatedAt ¶
func (pc *ProductCreate) SetUpdatedAt(t time.Time) *ProductCreate
SetUpdatedAt sets the "updated_at" field.
func (*ProductCreate) SetYear ¶
func (pc *ProductCreate) SetYear(i int) *ProductCreate
SetYear sets the "year" field.
type ProductCreateBulk ¶
type ProductCreateBulk struct {
// contains filtered or unexported fields
}
ProductCreateBulk is the builder for creating many Product entities in bulk.
func (*ProductCreateBulk) Exec ¶
func (pcb *ProductCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductCreateBulk) ExecX ¶
func (pcb *ProductCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProductDelete ¶
type ProductDelete struct {
// contains filtered or unexported fields
}
ProductDelete is the builder for deleting a Product entity.
func (*ProductDelete) Exec ¶
func (pd *ProductDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductDelete) ExecX ¶
func (pd *ProductDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductDelete) Where ¶
func (pd *ProductDelete) Where(ps ...predicate.Product) *ProductDelete
Where appends a list predicates to the ProductDelete builder.
type ProductDeleteOne ¶
type ProductDeleteOne struct {
// contains filtered or unexported fields
}
ProductDeleteOne is the builder for deleting a single Product entity.
func (*ProductDeleteOne) Exec ¶
func (pdo *ProductDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductDeleteOne) ExecX ¶
func (pdo *ProductDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductDeleteOne) Where ¶
func (pdo *ProductDeleteOne) Where(ps ...predicate.Product) *ProductDeleteOne
Where appends a list predicates to the ProductDelete builder.
type ProductEdges ¶
type ProductEdges struct { // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // ProductTags holds the value of the product_tags edge. ProductTags []*ProductTag `json:"product_tags,omitempty"` // contains filtered or unexported fields }
ProductEdges holds the relations/edges for other nodes in the graph.
func (ProductEdges) ProductTagsOrErr ¶
func (e ProductEdges) ProductTagsOrErr() ([]*ProductTag, error)
ProductTagsOrErr returns the ProductTags value or an error if the edge was not loaded in eager-loading.
func (ProductEdges) TagsOrErr ¶
func (e ProductEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
type ProductGroupBy ¶
type ProductGroupBy struct {
// contains filtered or unexported fields
}
ProductGroupBy is the group-by builder for Product entities.
func (*ProductGroupBy) Aggregate ¶
func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductGroupBy) Scan ¶
func (pgb *ProductGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductImage ¶
type ProductImage struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // ProductID holds the value of the "product_id" field. ProductID string `json:"product_id,omitempty"` // ImageURL holds the value of the "image_url" field. ImageURL string `json:"image_url,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductImageQuery when eager-loading is set. Edges ProductImageEdges `json:"edges"` // contains filtered or unexported fields }
ProductImage is the model entity for the ProductImage schema.
func (*ProductImage) QueryProduct ¶
func (pi *ProductImage) QueryProduct() *ProductQuery
QueryProduct queries the "product" edge of the ProductImage entity.
func (*ProductImage) String ¶
func (pi *ProductImage) String() string
String implements the fmt.Stringer.
func (*ProductImage) Unwrap ¶
func (pi *ProductImage) Unwrap() *ProductImage
Unwrap unwraps the ProductImage 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 (*ProductImage) Update ¶
func (pi *ProductImage) Update() *ProductImageUpdateOne
Update returns a builder for updating this ProductImage. Note that you need to call ProductImage.Unwrap() before calling this method if this ProductImage was returned from a transaction, and the transaction was committed or rolled back.
type ProductImageClient ¶
type ProductImageClient struct {
// contains filtered or unexported fields
}
ProductImageClient is a client for the ProductImage schema.
func NewProductImageClient ¶
func NewProductImageClient(c config) *ProductImageClient
NewProductImageClient returns a client for the ProductImage from the given config.
func (*ProductImageClient) Create ¶
func (c *ProductImageClient) Create() *ProductImageCreate
Create returns a builder for creating a ProductImage entity.
func (*ProductImageClient) CreateBulk ¶
func (c *ProductImageClient) CreateBulk(builders ...*ProductImageCreate) *ProductImageCreateBulk
CreateBulk returns a builder for creating a bulk of ProductImage entities.
func (*ProductImageClient) Delete ¶
func (c *ProductImageClient) Delete() *ProductImageDelete
Delete returns a delete builder for ProductImage.
func (*ProductImageClient) DeleteOne ¶
func (c *ProductImageClient) DeleteOne(pi *ProductImage) *ProductImageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductImageClient) DeleteOneID ¶
func (c *ProductImageClient) DeleteOneID(id uuid.UUID) *ProductImageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductImageClient) Get ¶
func (c *ProductImageClient) Get(ctx context.Context, id uuid.UUID) (*ProductImage, error)
Get returns a ProductImage entity by its id.
func (*ProductImageClient) GetX ¶
func (c *ProductImageClient) GetX(ctx context.Context, id uuid.UUID) *ProductImage
GetX is like Get, but panics if an error occurs.
func (*ProductImageClient) Hooks ¶
func (c *ProductImageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductImageClient) Intercept ¶
func (c *ProductImageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `productimage.Intercept(f(g(h())))`.
func (*ProductImageClient) Interceptors ¶
func (c *ProductImageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductImageClient) MapCreateBulk ¶
func (c *ProductImageClient) MapCreateBulk(slice any, setFunc func(*ProductImageCreate, int)) *ProductImageCreateBulk
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 (*ProductImageClient) Query ¶
func (c *ProductImageClient) Query() *ProductImageQuery
Query returns a query builder for ProductImage.
func (*ProductImageClient) QueryProduct ¶
func (c *ProductImageClient) QueryProduct(pi *ProductImage) *ProductQuery
QueryProduct queries the product edge of a ProductImage.
func (*ProductImageClient) Update ¶
func (c *ProductImageClient) Update() *ProductImageUpdate
Update returns an update builder for ProductImage.
func (*ProductImageClient) UpdateOne ¶
func (c *ProductImageClient) UpdateOne(pi *ProductImage) *ProductImageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductImageClient) UpdateOneID ¶
func (c *ProductImageClient) UpdateOneID(id uuid.UUID) *ProductImageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductImageClient) Use ¶
func (c *ProductImageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `productimage.Hooks(f(g(h())))`.
type ProductImageCreate ¶
type ProductImageCreate struct {
// contains filtered or unexported fields
}
ProductImageCreate is the builder for creating a ProductImage entity.
func (*ProductImageCreate) Exec ¶
func (pic *ProductImageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductImageCreate) ExecX ¶
func (pic *ProductImageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageCreate) Mutation ¶
func (pic *ProductImageCreate) Mutation() *ProductImageMutation
Mutation returns the ProductImageMutation object of the builder.
func (*ProductImageCreate) Save ¶
func (pic *ProductImageCreate) Save(ctx context.Context) (*ProductImage, error)
Save creates the ProductImage in the database.
func (*ProductImageCreate) SaveX ¶
func (pic *ProductImageCreate) SaveX(ctx context.Context) *ProductImage
SaveX calls Save and panics if Save returns an error.
func (*ProductImageCreate) SetCreatedAt ¶
func (pic *ProductImageCreate) SetCreatedAt(t time.Time) *ProductImageCreate
SetCreatedAt sets the "created_at" field.
func (*ProductImageCreate) SetID ¶
func (pic *ProductImageCreate) SetID(u uuid.UUID) *ProductImageCreate
SetID sets the "id" field.
func (*ProductImageCreate) SetImageURL ¶
func (pic *ProductImageCreate) SetImageURL(s string) *ProductImageCreate
SetImageURL sets the "image_url" field.
func (*ProductImageCreate) SetNillableCreatedAt ¶
func (pic *ProductImageCreate) SetNillableCreatedAt(t *time.Time) *ProductImageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProductImageCreate) SetNillableID ¶
func (pic *ProductImageCreate) SetNillableID(u *uuid.UUID) *ProductImageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProductImageCreate) SetNillableUpdatedAt ¶
func (pic *ProductImageCreate) SetNillableUpdatedAt(t *time.Time) *ProductImageCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProductImageCreate) SetProduct ¶
func (pic *ProductImageCreate) SetProduct(p *Product) *ProductImageCreate
SetProduct sets the "product" edge to the Product entity.
func (*ProductImageCreate) SetProductID ¶
func (pic *ProductImageCreate) SetProductID(s string) *ProductImageCreate
SetProductID sets the "product_id" field.
func (*ProductImageCreate) SetUpdatedAt ¶
func (pic *ProductImageCreate) SetUpdatedAt(t time.Time) *ProductImageCreate
SetUpdatedAt sets the "updated_at" field.
type ProductImageCreateBulk ¶
type ProductImageCreateBulk struct {
// contains filtered or unexported fields
}
ProductImageCreateBulk is the builder for creating many ProductImage entities in bulk.
func (*ProductImageCreateBulk) Exec ¶
func (picb *ProductImageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductImageCreateBulk) ExecX ¶
func (picb *ProductImageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageCreateBulk) Save ¶
func (picb *ProductImageCreateBulk) Save(ctx context.Context) ([]*ProductImage, error)
Save creates the ProductImage entities in the database.
func (*ProductImageCreateBulk) SaveX ¶
func (picb *ProductImageCreateBulk) SaveX(ctx context.Context) []*ProductImage
SaveX is like Save, but panics if an error occurs.
type ProductImageDelete ¶
type ProductImageDelete struct {
// contains filtered or unexported fields
}
ProductImageDelete is the builder for deleting a ProductImage entity.
func (*ProductImageDelete) Exec ¶
func (pid *ProductImageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductImageDelete) ExecX ¶
func (pid *ProductImageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageDelete) Where ¶
func (pid *ProductImageDelete) Where(ps ...predicate.ProductImage) *ProductImageDelete
Where appends a list predicates to the ProductImageDelete builder.
type ProductImageDeleteOne ¶
type ProductImageDeleteOne struct {
// contains filtered or unexported fields
}
ProductImageDeleteOne is the builder for deleting a single ProductImage entity.
func (*ProductImageDeleteOne) Exec ¶
func (pido *ProductImageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductImageDeleteOne) ExecX ¶
func (pido *ProductImageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageDeleteOne) Where ¶
func (pido *ProductImageDeleteOne) Where(ps ...predicate.ProductImage) *ProductImageDeleteOne
Where appends a list predicates to the ProductImageDelete builder.
type ProductImageEdges ¶
type ProductImageEdges struct { // Product holds the value of the product edge. Product *Product `json:"product,omitempty"` // contains filtered or unexported fields }
ProductImageEdges holds the relations/edges for other nodes in the graph.
func (ProductImageEdges) ProductOrErr ¶
func (e ProductImageEdges) ProductOrErr() (*Product, error)
ProductOrErr returns the Product value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ProductImageGroupBy ¶
type ProductImageGroupBy struct {
// contains filtered or unexported fields
}
ProductImageGroupBy is the group-by builder for ProductImage entities.
func (*ProductImageGroupBy) Aggregate ¶
func (pigb *ProductImageGroupBy) Aggregate(fns ...AggregateFunc) *ProductImageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductImageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Scan ¶
func (pigb *ProductImageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductImageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductImageMutation ¶
type ProductImageMutation struct {
// contains filtered or unexported fields
}
ProductImageMutation represents an operation that mutates the ProductImage nodes in the graph.
func (*ProductImageMutation) AddField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) AddedEdges ¶
func (m *ProductImageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductImageMutation) AddedField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) AddedFields ¶
func (m *ProductImageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductImageMutation) AddedIDs ¶
func (m *ProductImageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductImageMutation) ClearEdge ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ClearField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ClearProduct ¶
func (m *ProductImageMutation) ClearProduct()
ClearProduct clears the "product" edge to the Product entity.
func (*ProductImageMutation) ClearedEdges ¶
func (m *ProductImageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductImageMutation) ClearedFields ¶
func (m *ProductImageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductImageMutation) Client ¶
func (m ProductImageMutation) 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 (*ProductImageMutation) CreatedAt ¶
func (m *ProductImageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductImageMutation) EdgeCleared ¶
func (m *ProductImageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductImageMutation) Field ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) FieldCleared ¶
func (m *ProductImageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductImageMutation) Fields ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ID ¶
func (m *ProductImageMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProductImageMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProductImageMutation) ImageURL ¶
func (m *ProductImageMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (*ProductImageMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) 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 (*ProductImageMutation) OldImageURL ¶
func (m *ProductImageMutation) OldImageURL(ctx context.Context) (v string, err error)
OldImageURL returns the old "image_url" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) OldProductID ¶
func (m *ProductImageMutation) OldProductID(ctx context.Context) (v string, err error)
OldProductID returns the old "product_id" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) Op ¶
func (m *ProductImageMutation) Op() Op
Op returns the operation name.
func (*ProductImageMutation) ProductCleared ¶
func (m *ProductImageMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the Product entity was cleared.
func (*ProductImageMutation) ProductID ¶
func (m *ProductImageMutation) ProductID() (r string, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*ProductImageMutation) ProductIDs ¶
func (m *ProductImageMutation) ProductIDs() (ids []string)
ProductIDs returns the "product" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductID instead. It exists only for internal usage by the builders.
func (*ProductImageMutation) RemovedEdges ¶
func (m *ProductImageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductImageMutation) RemovedIDs ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ResetCreatedAt ¶
func (m *ProductImageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductImageMutation) ResetEdge ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ResetField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ResetImageURL ¶
func (m *ProductImageMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (*ProductImageMutation) ResetProduct ¶
func (m *ProductImageMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*ProductImageMutation) ResetProductID ¶
func (m *ProductImageMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*ProductImageMutation) ResetUpdatedAt ¶
func (m *ProductImageMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductImageMutation) SetCreatedAt ¶
func (m *ProductImageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductImageMutation) SetField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) SetID ¶
func (m *ProductImageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ProductImage entities.
func (*ProductImageMutation) SetImageURL ¶
func (m *ProductImageMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (*ProductImageMutation) SetOp ¶
func (m *ProductImageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductImageMutation) SetProductID ¶
func (m *ProductImageMutation) SetProductID(s string)
SetProductID sets the "product_id" field.
func (*ProductImageMutation) SetUpdatedAt ¶
func (m *ProductImageMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ProductImageMutation) Tx ¶
func (m ProductImageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductImageMutation) Type ¶
func (m *ProductImageMutation) Type() string
Type returns the node type of this mutation (ProductImage).
func (*ProductImageMutation) UpdatedAt ¶
func (m *ProductImageMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProductImageMutation) Where ¶
func (m *ProductImageMutation) Where(ps ...predicate.ProductImage)
Where appends a list predicates to the ProductImageMutation builder.
func (*ProductImageMutation) WhereP ¶
func (m *ProductImageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductImageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductImageQuery ¶
type ProductImageQuery struct {
// contains filtered or unexported fields
}
ProductImageQuery is the builder for querying ProductImage entities.
func (*ProductImageQuery) Aggregate ¶
func (piq *ProductImageQuery) Aggregate(fns ...AggregateFunc) *ProductImageSelect
Aggregate returns a ProductImageSelect configured with the given aggregations.
func (*ProductImageQuery) All ¶
func (piq *ProductImageQuery) All(ctx context.Context) ([]*ProductImage, error)
All executes the query and returns a list of ProductImages.
func (*ProductImageQuery) AllX ¶
func (piq *ProductImageQuery) AllX(ctx context.Context) []*ProductImage
AllX is like All, but panics if an error occurs.
func (*ProductImageQuery) Clone ¶
func (piq *ProductImageQuery) Clone() *ProductImageQuery
Clone returns a duplicate of the ProductImageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductImageQuery) Count ¶
func (piq *ProductImageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductImageQuery) CountX ¶
func (piq *ProductImageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductImageQuery) Exist ¶
func (piq *ProductImageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductImageQuery) ExistX ¶
func (piq *ProductImageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductImageQuery) First ¶
func (piq *ProductImageQuery) First(ctx context.Context) (*ProductImage, error)
First returns the first ProductImage entity from the query. Returns a *NotFoundError when no ProductImage was found.
func (*ProductImageQuery) FirstID ¶
FirstID returns the first ProductImage ID from the query. Returns a *NotFoundError when no ProductImage ID was found.
func (*ProductImageQuery) FirstIDX ¶
func (piq *ProductImageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductImageQuery) FirstX ¶
func (piq *ProductImageQuery) FirstX(ctx context.Context) *ProductImage
FirstX is like First, but panics if an error occurs.
func (*ProductImageQuery) GroupBy ¶
func (piq *ProductImageQuery) GroupBy(field string, fields ...string) *ProductImageGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.ProductImage.Query(). GroupBy(productimage.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductImageQuery) IDsX ¶
func (piq *ProductImageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ProductImageQuery) Limit ¶
func (piq *ProductImageQuery) Limit(limit int) *ProductImageQuery
Limit the number of records to be returned by this query.
func (*ProductImageQuery) Offset ¶
func (piq *ProductImageQuery) Offset(offset int) *ProductImageQuery
Offset to start from.
func (*ProductImageQuery) Only ¶
func (piq *ProductImageQuery) Only(ctx context.Context) (*ProductImage, error)
Only returns a single ProductImage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductImage entity is found. Returns a *NotFoundError when no ProductImage entities are found.
func (*ProductImageQuery) OnlyID ¶
OnlyID is like Only, but returns the only ProductImage ID in the query. Returns a *NotSingularError when more than one ProductImage ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductImageQuery) OnlyIDX ¶
func (piq *ProductImageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductImageQuery) OnlyX ¶
func (piq *ProductImageQuery) OnlyX(ctx context.Context) *ProductImage
OnlyX is like Only, but panics if an error occurs.
func (*ProductImageQuery) Order ¶
func (piq *ProductImageQuery) Order(o ...productimage.OrderOption) *ProductImageQuery
Order specifies how the records should be ordered.
func (*ProductImageQuery) QueryProduct ¶
func (piq *ProductImageQuery) QueryProduct() *ProductQuery
QueryProduct chains the current query on the "product" edge.
func (*ProductImageQuery) Select ¶
func (piq *ProductImageQuery) Select(fields ...string) *ProductImageSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.ProductImage.Query(). Select(productimage.FieldCreatedAt). Scan(ctx, &v)
func (*ProductImageQuery) Unique ¶
func (piq *ProductImageQuery) Unique(unique bool) *ProductImageQuery
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 (*ProductImageQuery) Where ¶
func (piq *ProductImageQuery) Where(ps ...predicate.ProductImage) *ProductImageQuery
Where adds a new predicate for the ProductImageQuery builder.
func (*ProductImageQuery) WithProduct ¶
func (piq *ProductImageQuery) WithProduct(opts ...func(*ProductQuery)) *ProductImageQuery
WithProduct tells the query-builder to eager-load the nodes that are connected to the "product" edge. The optional arguments are used to configure the query builder of the edge.
type ProductImageSelect ¶
type ProductImageSelect struct { *ProductImageQuery // contains filtered or unexported fields }
ProductImageSelect is the builder for selecting fields of ProductImage entities.
func (*ProductImageSelect) Aggregate ¶
func (pis *ProductImageSelect) Aggregate(fns ...AggregateFunc) *ProductImageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductImageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Scan ¶
func (pis *ProductImageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductImageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductImageUpdate ¶
type ProductImageUpdate struct {
// contains filtered or unexported fields
}
ProductImageUpdate is the builder for updating ProductImage entities.
func (*ProductImageUpdate) Exec ¶
func (piu *ProductImageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductImageUpdate) ExecX ¶
func (piu *ProductImageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageUpdate) Mutation ¶
func (piu *ProductImageUpdate) Mutation() *ProductImageMutation
Mutation returns the ProductImageMutation object of the builder.
func (*ProductImageUpdate) Save ¶
func (piu *ProductImageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductImageUpdate) SaveX ¶
func (piu *ProductImageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductImageUpdate) SetUpdatedAt ¶
func (piu *ProductImageUpdate) SetUpdatedAt(t time.Time) *ProductImageUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProductImageUpdate) Where ¶
func (piu *ProductImageUpdate) Where(ps ...predicate.ProductImage) *ProductImageUpdate
Where appends a list predicates to the ProductImageUpdate builder.
type ProductImageUpdateOne ¶
type ProductImageUpdateOne struct {
// contains filtered or unexported fields
}
ProductImageUpdateOne is the builder for updating a single ProductImage entity.
func (*ProductImageUpdateOne) Exec ¶
func (piuo *ProductImageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductImageUpdateOne) ExecX ¶
func (piuo *ProductImageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageUpdateOne) Mutation ¶
func (piuo *ProductImageUpdateOne) Mutation() *ProductImageMutation
Mutation returns the ProductImageMutation object of the builder.
func (*ProductImageUpdateOne) Save ¶
func (piuo *ProductImageUpdateOne) Save(ctx context.Context) (*ProductImage, error)
Save executes the query and returns the updated ProductImage entity.
func (*ProductImageUpdateOne) SaveX ¶
func (piuo *ProductImageUpdateOne) SaveX(ctx context.Context) *ProductImage
SaveX is like Save, but panics if an error occurs.
func (*ProductImageUpdateOne) Select ¶
func (piuo *ProductImageUpdateOne) Select(field string, fields ...string) *ProductImageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductImageUpdateOne) SetUpdatedAt ¶
func (piuo *ProductImageUpdateOne) SetUpdatedAt(t time.Time) *ProductImageUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductImageUpdateOne) Where ¶
func (piuo *ProductImageUpdateOne) Where(ps ...predicate.ProductImage) *ProductImageUpdateOne
Where appends a list predicates to the ProductImageUpdate builder.
type ProductImages ¶
type ProductImages []*ProductImage
ProductImages is a parsable slice of ProductImage.
type ProductMutation ¶
type ProductMutation struct {
// contains filtered or unexported fields
}
ProductMutation represents an operation that mutates the Product nodes in the graph.
func (*ProductMutation) AddField ¶
func (m *ProductMutation) 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 (*ProductMutation) AddPrice ¶
func (m *ProductMutation) AddPrice(d decimal.Decimal)
AddPrice adds d to the "price" field.
func (*ProductMutation) AddQty ¶
func (m *ProductMutation) AddQty(d decimal.Decimal)
AddQty adds d to the "qty" field.
func (*ProductMutation) AddTagIDs ¶
func (m *ProductMutation) AddTagIDs(ids ...string)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*ProductMutation) AddYear ¶
func (m *ProductMutation) AddYear(i int)
AddYear adds i to the "year" field.
func (*ProductMutation) AddedEdges ¶
func (m *ProductMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductMutation) AddedField ¶
func (m *ProductMutation) 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 (*ProductMutation) AddedFields ¶
func (m *ProductMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductMutation) AddedIDs ¶
func (m *ProductMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductMutation) AddedPrice ¶
func (m *ProductMutation) AddedPrice() (r decimal.Decimal, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*ProductMutation) AddedQty ¶
func (m *ProductMutation) AddedQty() (r decimal.Decimal, exists bool)
AddedQty returns the value that was added to the "qty" field in this mutation.
func (*ProductMutation) AddedYear ¶
func (m *ProductMutation) AddedYear() (r int, exists bool)
AddedYear returns the value that was added to the "year" field in this mutation.
func (*ProductMutation) AppendColors ¶
func (m *ProductMutation) AppendColors(s []string)
AppendColors adds s to the "colors" field.
func (*ProductMutation) AppendedColors ¶
func (m *ProductMutation) AppendedColors() ([]string, bool)
AppendedColors returns the list of values that were appended to the "colors" field in this mutation.
func (*ProductMutation) ClearColors ¶
func (m *ProductMutation) ClearColors()
ClearColors clears the value of the "colors" field.
func (*ProductMutation) ClearDescription ¶
func (m *ProductMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ProductMutation) ClearEdge ¶
func (m *ProductMutation) 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 (*ProductMutation) ClearField ¶
func (m *ProductMutation) 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 (*ProductMutation) ClearProvider ¶
func (m *ProductMutation) ClearProvider()
ClearProvider clears the value of the "provider" field.
func (*ProductMutation) ClearTags ¶
func (m *ProductMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*ProductMutation) ClearYear ¶
func (m *ProductMutation) ClearYear()
ClearYear clears the value of the "year" field.
func (*ProductMutation) ClearedEdges ¶
func (m *ProductMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductMutation) ClearedFields ¶
func (m *ProductMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductMutation) Client ¶
func (m ProductMutation) 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 (*ProductMutation) Colors ¶
func (m *ProductMutation) Colors() (r []string, exists bool)
Colors returns the value of the "colors" field in the mutation.
func (*ProductMutation) ColorsCleared ¶
func (m *ProductMutation) ColorsCleared() bool
ColorsCleared returns if the "colors" field was cleared in this mutation.
func (*ProductMutation) CreatedAt ¶
func (m *ProductMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductMutation) Description ¶
func (m *ProductMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ProductMutation) DescriptionCleared ¶
func (m *ProductMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ProductMutation) EdgeCleared ¶
func (m *ProductMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductMutation) Field ¶
func (m *ProductMutation) 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 (*ProductMutation) FieldCleared ¶
func (m *ProductMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductMutation) Fields ¶
func (m *ProductMutation) 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 (*ProductMutation) ID ¶
func (m *ProductMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProductMutation) IDs ¶
func (m *ProductMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProductMutation) Name ¶
func (m *ProductMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProductMutation) OldColors ¶
func (m *ProductMutation) OldColors(ctx context.Context) (v []string, err error)
OldColors returns the old "colors" field's value of the Product entity. If the Product 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 (*ProductMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Product entity. If the Product 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 (*ProductMutation) OldDescription ¶
func (m *ProductMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the Product entity. If the Product 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 (*ProductMutation) 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 (*ProductMutation) OldName ¶
func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Product entity. If the Product 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 (*ProductMutation) OldPrice ¶
OldPrice returns the old "price" field's value of the Product entity. If the Product 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 (*ProductMutation) OldProvider ¶
func (m *ProductMutation) OldProvider(ctx context.Context) (v *string, err error)
OldProvider returns the old "provider" field's value of the Product entity. If the Product 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 (*ProductMutation) OldQty ¶
OldQty returns the old "qty" field's value of the Product entity. If the Product 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 (*ProductMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Product entity. If the Product 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 (*ProductMutation) OldYear ¶
func (m *ProductMutation) OldYear(ctx context.Context) (v *int, err error)
OldYear returns the old "year" field's value of the Product entity. If the Product 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 (*ProductMutation) Price ¶
func (m *ProductMutation) Price() (r decimal.Decimal, exists bool)
Price returns the value of the "price" field in the mutation.
func (*ProductMutation) Provider ¶
func (m *ProductMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*ProductMutation) ProviderCleared ¶
func (m *ProductMutation) ProviderCleared() bool
ProviderCleared returns if the "provider" field was cleared in this mutation.
func (*ProductMutation) Qty ¶
func (m *ProductMutation) Qty() (r decimal.Decimal, exists bool)
Qty returns the value of the "qty" field in the mutation.
func (*ProductMutation) RemoveTagIDs ¶
func (m *ProductMutation) RemoveTagIDs(ids ...string)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*ProductMutation) RemovedEdges ¶
func (m *ProductMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductMutation) RemovedIDs ¶
func (m *ProductMutation) 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 (*ProductMutation) RemovedTagsIDs ¶
func (m *ProductMutation) RemovedTagsIDs() (ids []string)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*ProductMutation) ResetColors ¶
func (m *ProductMutation) ResetColors()
ResetColors resets all changes to the "colors" field.
func (*ProductMutation) ResetCreatedAt ¶
func (m *ProductMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductMutation) ResetDescription ¶
func (m *ProductMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ProductMutation) ResetEdge ¶
func (m *ProductMutation) 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 (*ProductMutation) ResetField ¶
func (m *ProductMutation) 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 (*ProductMutation) ResetName ¶
func (m *ProductMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProductMutation) ResetPrice ¶
func (m *ProductMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*ProductMutation) ResetProvider ¶
func (m *ProductMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*ProductMutation) ResetQty ¶
func (m *ProductMutation) ResetQty()
ResetQty resets all changes to the "qty" field.
func (*ProductMutation) ResetTags ¶
func (m *ProductMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*ProductMutation) ResetUpdatedAt ¶
func (m *ProductMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductMutation) ResetYear ¶
func (m *ProductMutation) ResetYear()
ResetYear resets all changes to the "year" field.
func (*ProductMutation) SetColors ¶
func (m *ProductMutation) SetColors(s []string)
SetColors sets the "colors" field.
func (*ProductMutation) SetCreatedAt ¶
func (m *ProductMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductMutation) SetDescription ¶
func (m *ProductMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ProductMutation) SetField ¶
func (m *ProductMutation) 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 (*ProductMutation) SetID ¶
func (m *ProductMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Product entities.
func (*ProductMutation) SetName ¶
func (m *ProductMutation) SetName(s string)
SetName sets the "name" field.
func (*ProductMutation) SetOp ¶
func (m *ProductMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductMutation) SetPrice ¶
func (m *ProductMutation) SetPrice(d decimal.Decimal)
SetPrice sets the "price" field.
func (*ProductMutation) SetProvider ¶
func (m *ProductMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*ProductMutation) SetQty ¶
func (m *ProductMutation) SetQty(d decimal.Decimal)
SetQty sets the "qty" field.
func (*ProductMutation) SetUpdatedAt ¶
func (m *ProductMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ProductMutation) SetYear ¶
func (m *ProductMutation) SetYear(i int)
SetYear sets the "year" field.
func (*ProductMutation) TagsCleared ¶
func (m *ProductMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*ProductMutation) TagsIDs ¶
func (m *ProductMutation) TagsIDs() (ids []string)
TagsIDs returns the "tags" edge IDs in the mutation.
func (ProductMutation) Tx ¶
func (m ProductMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductMutation) Type ¶
func (m *ProductMutation) Type() string
Type returns the node type of this mutation (Product).
func (*ProductMutation) UpdatedAt ¶
func (m *ProductMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProductMutation) Where ¶
func (m *ProductMutation) Where(ps ...predicate.Product)
Where appends a list predicates to the ProductMutation builder.
func (*ProductMutation) WhereP ¶
func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*ProductMutation) Year ¶
func (m *ProductMutation) Year() (r int, exists bool)
Year returns the value of the "year" field in the mutation.
func (*ProductMutation) YearCleared ¶
func (m *ProductMutation) YearCleared() bool
YearCleared returns if the "year" field was cleared in this mutation.
type ProductQuery ¶
type ProductQuery struct {
// contains filtered or unexported fields
}
ProductQuery is the builder for querying Product entities.
func (*ProductQuery) Aggregate ¶
func (pq *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect
Aggregate returns a ProductSelect configured with the given aggregations.
func (*ProductQuery) All ¶
func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)
All executes the query and returns a list of Products.
func (*ProductQuery) AllX ¶
func (pq *ProductQuery) AllX(ctx context.Context) []*Product
AllX is like All, but panics if an error occurs.
func (*ProductQuery) Clone ¶
func (pq *ProductQuery) Clone() *ProductQuery
Clone returns a duplicate of the ProductQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductQuery) Count ¶
func (pq *ProductQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductQuery) CountX ¶
func (pq *ProductQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductQuery) Exist ¶
func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductQuery) ExistX ¶
func (pq *ProductQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductQuery) First ¶
func (pq *ProductQuery) First(ctx context.Context) (*Product, error)
First returns the first Product entity from the query. Returns a *NotFoundError when no Product was found.
func (*ProductQuery) FirstID ¶
func (pq *ProductQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Product ID from the query. Returns a *NotFoundError when no Product ID was found.
func (*ProductQuery) FirstIDX ¶
func (pq *ProductQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductQuery) FirstX ¶
func (pq *ProductQuery) FirstX(ctx context.Context) *Product
FirstX is like First, but panics if an error occurs.
func (*ProductQuery) GroupBy ¶
func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Product.Query(). GroupBy(product.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductQuery) IDs ¶
func (pq *ProductQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Product IDs.
func (*ProductQuery) IDsX ¶
func (pq *ProductQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ProductQuery) Limit ¶
func (pq *ProductQuery) Limit(limit int) *ProductQuery
Limit the number of records to be returned by this query.
func (*ProductQuery) Offset ¶
func (pq *ProductQuery) Offset(offset int) *ProductQuery
Offset to start from.
func (*ProductQuery) Only ¶
func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)
Only returns a single Product entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Product entity is found. Returns a *NotFoundError when no Product entities are found.
func (*ProductQuery) OnlyID ¶
func (pq *ProductQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Product ID in the query. Returns a *NotSingularError when more than one Product ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductQuery) OnlyIDX ¶
func (pq *ProductQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductQuery) OnlyX ¶
func (pq *ProductQuery) OnlyX(ctx context.Context) *Product
OnlyX is like Only, but panics if an error occurs.
func (*ProductQuery) Order ¶
func (pq *ProductQuery) Order(o ...product.OrderOption) *ProductQuery
Order specifies how the records should be ordered.
func (*ProductQuery) QueryProductTags ¶
func (pq *ProductQuery) QueryProductTags() *ProductTagQuery
QueryProductTags chains the current query on the "product_tags" edge.
func (*ProductQuery) QueryTags ¶
func (pq *ProductQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*ProductQuery) Select ¶
func (pq *ProductQuery) Select(fields ...string) *ProductSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Product.Query(). Select(product.FieldCreatedAt). Scan(ctx, &v)
func (*ProductQuery) Unique ¶
func (pq *ProductQuery) Unique(unique bool) *ProductQuery
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 (*ProductQuery) Where ¶
func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery
Where adds a new predicate for the ProductQuery builder.
func (*ProductQuery) WithProductTags ¶
func (pq *ProductQuery) WithProductTags(opts ...func(*ProductTagQuery)) *ProductQuery
WithProductTags tells the query-builder to eager-load the nodes that are connected to the "product_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductQuery) WithTags ¶
func (pq *ProductQuery) WithTags(opts ...func(*TagQuery)) *ProductQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type ProductSelect ¶
type ProductSelect struct { *ProductQuery // contains filtered or unexported fields }
ProductSelect is the builder for selecting fields of Product entities.
func (*ProductSelect) Aggregate ¶
func (ps *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductSelect) Scan ¶
func (ps *ProductSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductTag ¶
type ProductTag struct { // ProductID holds the value of the "product_id" field. ProductID string `json:"product_id,omitempty"` // TagID holds the value of the "tag_id" field. TagID string `json:"tag_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductTagQuery when eager-loading is set. Edges ProductTagEdges `json:"edges"` // contains filtered or unexported fields }
ProductTag is the model entity for the ProductTag schema.
func (*ProductTag) QueryProducts ¶
func (pt *ProductTag) QueryProducts() *ProductQuery
QueryProducts queries the "products" edge of the ProductTag entity.
func (*ProductTag) QueryTags ¶
func (pt *ProductTag) QueryTags() *TagQuery
QueryTags queries the "tags" edge of the ProductTag entity.
func (*ProductTag) String ¶
func (pt *ProductTag) String() string
String implements the fmt.Stringer.
func (*ProductTag) Unwrap ¶
func (pt *ProductTag) Unwrap() *ProductTag
Unwrap unwraps the ProductTag 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 (*ProductTag) Update ¶
func (pt *ProductTag) Update() *ProductTagUpdateOne
Update returns a builder for updating this ProductTag. Note that you need to call ProductTag.Unwrap() before calling this method if this ProductTag was returned from a transaction, and the transaction was committed or rolled back.
type ProductTagClient ¶
type ProductTagClient struct {
// contains filtered or unexported fields
}
ProductTagClient is a client for the ProductTag schema.
func NewProductTagClient ¶
func NewProductTagClient(c config) *ProductTagClient
NewProductTagClient returns a client for the ProductTag from the given config.
func (*ProductTagClient) Create ¶
func (c *ProductTagClient) Create() *ProductTagCreate
Create returns a builder for creating a ProductTag entity.
func (*ProductTagClient) CreateBulk ¶
func (c *ProductTagClient) CreateBulk(builders ...*ProductTagCreate) *ProductTagCreateBulk
CreateBulk returns a builder for creating a bulk of ProductTag entities.
func (*ProductTagClient) Delete ¶
func (c *ProductTagClient) Delete() *ProductTagDelete
Delete returns a delete builder for ProductTag.
func (*ProductTagClient) Hooks ¶
func (c *ProductTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductTagClient) Intercept ¶
func (c *ProductTagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `producttag.Intercept(f(g(h())))`.
func (*ProductTagClient) Interceptors ¶
func (c *ProductTagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductTagClient) MapCreateBulk ¶
func (c *ProductTagClient) MapCreateBulk(slice any, setFunc func(*ProductTagCreate, int)) *ProductTagCreateBulk
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 (*ProductTagClient) Query ¶
func (c *ProductTagClient) Query() *ProductTagQuery
Query returns a query builder for ProductTag.
func (*ProductTagClient) QueryProducts ¶
func (c *ProductTagClient) QueryProducts(pt *ProductTag) *ProductQuery
QueryProducts queries the products edge of a ProductTag.
func (*ProductTagClient) QueryTags ¶
func (c *ProductTagClient) QueryTags(pt *ProductTag) *TagQuery
QueryTags queries the tags edge of a ProductTag.
func (*ProductTagClient) Update ¶
func (c *ProductTagClient) Update() *ProductTagUpdate
Update returns an update builder for ProductTag.
func (*ProductTagClient) UpdateOne ¶
func (c *ProductTagClient) UpdateOne(pt *ProductTag) *ProductTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductTagClient) Use ¶
func (c *ProductTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `producttag.Hooks(f(g(h())))`.
type ProductTagCreate ¶
type ProductTagCreate struct {
// contains filtered or unexported fields
}
ProductTagCreate is the builder for creating a ProductTag entity.
func (*ProductTagCreate) Exec ¶
func (ptc *ProductTagCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductTagCreate) ExecX ¶
func (ptc *ProductTagCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagCreate) Mutation ¶
func (ptc *ProductTagCreate) Mutation() *ProductTagMutation
Mutation returns the ProductTagMutation object of the builder.
func (*ProductTagCreate) Save ¶
func (ptc *ProductTagCreate) Save(ctx context.Context) (*ProductTag, error)
Save creates the ProductTag in the database.
func (*ProductTagCreate) SaveX ¶
func (ptc *ProductTagCreate) SaveX(ctx context.Context) *ProductTag
SaveX calls Save and panics if Save returns an error.
func (*ProductTagCreate) SetProductID ¶
func (ptc *ProductTagCreate) SetProductID(s string) *ProductTagCreate
SetProductID sets the "product_id" field.
func (*ProductTagCreate) SetProducts ¶
func (ptc *ProductTagCreate) SetProducts(p *Product) *ProductTagCreate
SetProducts sets the "products" edge to the Product entity.
func (*ProductTagCreate) SetProductsID ¶
func (ptc *ProductTagCreate) SetProductsID(id string) *ProductTagCreate
SetProductsID sets the "products" edge to the Product entity by ID.
func (*ProductTagCreate) SetTagID ¶
func (ptc *ProductTagCreate) SetTagID(s string) *ProductTagCreate
SetTagID sets the "tag_id" field.
func (*ProductTagCreate) SetTags ¶
func (ptc *ProductTagCreate) SetTags(t *Tag) *ProductTagCreate
SetTags sets the "tags" edge to the Tag entity.
func (*ProductTagCreate) SetTagsID ¶
func (ptc *ProductTagCreate) SetTagsID(id string) *ProductTagCreate
SetTagsID sets the "tags" edge to the Tag entity by ID.
type ProductTagCreateBulk ¶
type ProductTagCreateBulk struct {
// contains filtered or unexported fields
}
ProductTagCreateBulk is the builder for creating many ProductTag entities in bulk.
func (*ProductTagCreateBulk) Exec ¶
func (ptcb *ProductTagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductTagCreateBulk) ExecX ¶
func (ptcb *ProductTagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagCreateBulk) Save ¶
func (ptcb *ProductTagCreateBulk) Save(ctx context.Context) ([]*ProductTag, error)
Save creates the ProductTag entities in the database.
func (*ProductTagCreateBulk) SaveX ¶
func (ptcb *ProductTagCreateBulk) SaveX(ctx context.Context) []*ProductTag
SaveX is like Save, but panics if an error occurs.
type ProductTagDelete ¶
type ProductTagDelete struct {
// contains filtered or unexported fields
}
ProductTagDelete is the builder for deleting a ProductTag entity.
func (*ProductTagDelete) Exec ¶
func (ptd *ProductTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductTagDelete) ExecX ¶
func (ptd *ProductTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagDelete) Where ¶
func (ptd *ProductTagDelete) Where(ps ...predicate.ProductTag) *ProductTagDelete
Where appends a list predicates to the ProductTagDelete builder.
type ProductTagDeleteOne ¶
type ProductTagDeleteOne struct {
// contains filtered or unexported fields
}
ProductTagDeleteOne is the builder for deleting a single ProductTag entity.
func (*ProductTagDeleteOne) Exec ¶
func (ptdo *ProductTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductTagDeleteOne) ExecX ¶
func (ptdo *ProductTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagDeleteOne) Where ¶
func (ptdo *ProductTagDeleteOne) Where(ps ...predicate.ProductTag) *ProductTagDeleteOne
Where appends a list predicates to the ProductTagDelete builder.
type ProductTagEdges ¶
type ProductTagEdges struct { // Products holds the value of the products edge. Products *Product `json:"products,omitempty"` // Tags holds the value of the tags edge. Tags *Tag `json:"tags,omitempty"` // contains filtered or unexported fields }
ProductTagEdges holds the relations/edges for other nodes in the graph.
func (ProductTagEdges) ProductsOrErr ¶
func (e ProductTagEdges) ProductsOrErr() (*Product, error)
ProductsOrErr returns the Products value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ProductTagEdges) TagsOrErr ¶
func (e ProductTagEdges) TagsOrErr() (*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ProductTagGroupBy ¶
type ProductTagGroupBy struct {
// contains filtered or unexported fields
}
ProductTagGroupBy is the group-by builder for ProductTag entities.
func (*ProductTagGroupBy) Aggregate ¶
func (ptgb *ProductTagGroupBy) Aggregate(fns ...AggregateFunc) *ProductTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductTagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Scan ¶
func (ptgb *ProductTagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductTagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductTagMutation ¶
type ProductTagMutation struct {
// contains filtered or unexported fields
}
ProductTagMutation represents an operation that mutates the ProductTag nodes in the graph.
func (*ProductTagMutation) AddField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) AddedEdges ¶
func (m *ProductTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductTagMutation) AddedField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) AddedFields ¶
func (m *ProductTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductTagMutation) AddedIDs ¶
func (m *ProductTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductTagMutation) ClearEdge ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ClearField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ClearProducts ¶
func (m *ProductTagMutation) ClearProducts()
ClearProducts clears the "products" edge to the Product entity.
func (*ProductTagMutation) ClearTags ¶
func (m *ProductTagMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*ProductTagMutation) ClearedEdges ¶
func (m *ProductTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductTagMutation) ClearedFields ¶
func (m *ProductTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductTagMutation) Client ¶
func (m ProductTagMutation) 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 (*ProductTagMutation) EdgeCleared ¶
func (m *ProductTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductTagMutation) Field ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) FieldCleared ¶
func (m *ProductTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductTagMutation) Fields ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) 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 (*ProductTagMutation) ProductID ¶
func (m *ProductTagMutation) ProductID() (r string, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*ProductTagMutation) ProductsCleared ¶
func (m *ProductTagMutation) ProductsCleared() bool
ProductsCleared reports if the "products" edge to the Product entity was cleared.
func (*ProductTagMutation) ProductsID ¶
func (m *ProductTagMutation) ProductsID() (id string, exists bool)
ProductsID returns the "products" edge ID in the mutation.
func (*ProductTagMutation) ProductsIDs ¶
func (m *ProductTagMutation) ProductsIDs() (ids []string)
ProductsIDs returns the "products" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductsID instead. It exists only for internal usage by the builders.
func (*ProductTagMutation) RemovedEdges ¶
func (m *ProductTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductTagMutation) RemovedIDs ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ResetEdge ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ResetField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ResetProductID ¶
func (m *ProductTagMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*ProductTagMutation) ResetProducts ¶
func (m *ProductTagMutation) ResetProducts()
ResetProducts resets all changes to the "products" edge.
func (*ProductTagMutation) ResetTagID ¶
func (m *ProductTagMutation) ResetTagID()
ResetTagID resets all changes to the "tag_id" field.
func (*ProductTagMutation) ResetTags ¶
func (m *ProductTagMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*ProductTagMutation) SetField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) SetOp ¶
func (m *ProductTagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductTagMutation) SetProductID ¶
func (m *ProductTagMutation) SetProductID(s string)
SetProductID sets the "product_id" field.
func (*ProductTagMutation) SetProductsID ¶
func (m *ProductTagMutation) SetProductsID(id string)
SetProductsID sets the "products" edge to the Product entity by id.
func (*ProductTagMutation) SetTagID ¶
func (m *ProductTagMutation) SetTagID(s string)
SetTagID sets the "tag_id" field.
func (*ProductTagMutation) SetTagsID ¶
func (m *ProductTagMutation) SetTagsID(id string)
SetTagsID sets the "tags" edge to the Tag entity by id.
func (*ProductTagMutation) TagID ¶
func (m *ProductTagMutation) TagID() (r string, exists bool)
TagID returns the value of the "tag_id" field in the mutation.
func (*ProductTagMutation) TagsCleared ¶
func (m *ProductTagMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*ProductTagMutation) TagsID ¶
func (m *ProductTagMutation) TagsID() (id string, exists bool)
TagsID returns the "tags" edge ID in the mutation.
func (*ProductTagMutation) TagsIDs ¶
func (m *ProductTagMutation) TagsIDs() (ids []string)
TagsIDs returns the "tags" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TagsID instead. It exists only for internal usage by the builders.
func (ProductTagMutation) Tx ¶
func (m ProductTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductTagMutation) Type ¶
func (m *ProductTagMutation) Type() string
Type returns the node type of this mutation (ProductTag).
func (*ProductTagMutation) Where ¶
func (m *ProductTagMutation) Where(ps ...predicate.ProductTag)
Where appends a list predicates to the ProductTagMutation builder.
func (*ProductTagMutation) WhereP ¶
func (m *ProductTagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductTagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductTagQuery ¶
type ProductTagQuery struct {
// contains filtered or unexported fields
}
ProductTagQuery is the builder for querying ProductTag entities.
func (*ProductTagQuery) Aggregate ¶
func (ptq *ProductTagQuery) Aggregate(fns ...AggregateFunc) *ProductTagSelect
Aggregate returns a ProductTagSelect configured with the given aggregations.
func (*ProductTagQuery) All ¶
func (ptq *ProductTagQuery) All(ctx context.Context) ([]*ProductTag, error)
All executes the query and returns a list of ProductTags.
func (*ProductTagQuery) AllX ¶
func (ptq *ProductTagQuery) AllX(ctx context.Context) []*ProductTag
AllX is like All, but panics if an error occurs.
func (*ProductTagQuery) Clone ¶
func (ptq *ProductTagQuery) Clone() *ProductTagQuery
Clone returns a duplicate of the ProductTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductTagQuery) Count ¶
func (ptq *ProductTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductTagQuery) CountX ¶
func (ptq *ProductTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductTagQuery) Exist ¶
func (ptq *ProductTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductTagQuery) ExistX ¶
func (ptq *ProductTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductTagQuery) First ¶
func (ptq *ProductTagQuery) First(ctx context.Context) (*ProductTag, error)
First returns the first ProductTag entity from the query. Returns a *NotFoundError when no ProductTag was found.
func (*ProductTagQuery) FirstX ¶
func (ptq *ProductTagQuery) FirstX(ctx context.Context) *ProductTag
FirstX is like First, but panics if an error occurs.
func (*ProductTagQuery) GroupBy ¶
func (ptq *ProductTagQuery) GroupBy(field string, fields ...string) *ProductTagGroupBy
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 { ProductID string `json:"product_id,omitempty"` Count int `json:"count,omitempty"` } client.ProductTag.Query(). GroupBy(producttag.FieldProductID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductTagQuery) Limit ¶
func (ptq *ProductTagQuery) Limit(limit int) *ProductTagQuery
Limit the number of records to be returned by this query.
func (*ProductTagQuery) Offset ¶
func (ptq *ProductTagQuery) Offset(offset int) *ProductTagQuery
Offset to start from.
func (*ProductTagQuery) Only ¶
func (ptq *ProductTagQuery) Only(ctx context.Context) (*ProductTag, error)
Only returns a single ProductTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductTag entity is found. Returns a *NotFoundError when no ProductTag entities are found.
func (*ProductTagQuery) OnlyX ¶
func (ptq *ProductTagQuery) OnlyX(ctx context.Context) *ProductTag
OnlyX is like Only, but panics if an error occurs.
func (*ProductTagQuery) Order ¶
func (ptq *ProductTagQuery) Order(o ...producttag.OrderOption) *ProductTagQuery
Order specifies how the records should be ordered.
func (*ProductTagQuery) QueryProducts ¶
func (ptq *ProductTagQuery) QueryProducts() *ProductQuery
QueryProducts chains the current query on the "products" edge.
func (*ProductTagQuery) QueryTags ¶
func (ptq *ProductTagQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*ProductTagQuery) Select ¶
func (ptq *ProductTagQuery) Select(fields ...string) *ProductTagSelect
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 { ProductID string `json:"product_id,omitempty"` } client.ProductTag.Query(). Select(producttag.FieldProductID). Scan(ctx, &v)
func (*ProductTagQuery) Unique ¶
func (ptq *ProductTagQuery) Unique(unique bool) *ProductTagQuery
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 (*ProductTagQuery) Where ¶
func (ptq *ProductTagQuery) Where(ps ...predicate.ProductTag) *ProductTagQuery
Where adds a new predicate for the ProductTagQuery builder.
func (*ProductTagQuery) WithProducts ¶
func (ptq *ProductTagQuery) WithProducts(opts ...func(*ProductQuery)) *ProductTagQuery
WithProducts tells the query-builder to eager-load the nodes that are connected to the "products" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductTagQuery) WithTags ¶
func (ptq *ProductTagQuery) WithTags(opts ...func(*TagQuery)) *ProductTagQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type ProductTagSelect ¶
type ProductTagSelect struct { *ProductTagQuery // contains filtered or unexported fields }
ProductTagSelect is the builder for selecting fields of ProductTag entities.
func (*ProductTagSelect) Aggregate ¶
func (pts *ProductTagSelect) Aggregate(fns ...AggregateFunc) *ProductTagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductTagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Scan ¶
func (pts *ProductTagSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductTagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductTagUpdate ¶
type ProductTagUpdate struct {
// contains filtered or unexported fields
}
ProductTagUpdate is the builder for updating ProductTag entities.
func (*ProductTagUpdate) Exec ¶
func (ptu *ProductTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductTagUpdate) ExecX ¶
func (ptu *ProductTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagUpdate) Mutation ¶
func (ptu *ProductTagUpdate) Mutation() *ProductTagMutation
Mutation returns the ProductTagMutation object of the builder.
func (*ProductTagUpdate) Save ¶
func (ptu *ProductTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductTagUpdate) SaveX ¶
func (ptu *ProductTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductTagUpdate) Where ¶
func (ptu *ProductTagUpdate) Where(ps ...predicate.ProductTag) *ProductTagUpdate
Where appends a list predicates to the ProductTagUpdate builder.
type ProductTagUpdateOne ¶
type ProductTagUpdateOne struct {
// contains filtered or unexported fields
}
ProductTagUpdateOne is the builder for updating a single ProductTag entity.
func (*ProductTagUpdateOne) Exec ¶
func (ptuo *ProductTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductTagUpdateOne) ExecX ¶
func (ptuo *ProductTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagUpdateOne) Mutation ¶
func (ptuo *ProductTagUpdateOne) Mutation() *ProductTagMutation
Mutation returns the ProductTagMutation object of the builder.
func (*ProductTagUpdateOne) Save ¶
func (ptuo *ProductTagUpdateOne) Save(ctx context.Context) (*ProductTag, error)
Save executes the query and returns the updated ProductTag entity.
func (*ProductTagUpdateOne) SaveX ¶
func (ptuo *ProductTagUpdateOne) SaveX(ctx context.Context) *ProductTag
SaveX is like Save, but panics if an error occurs.
func (*ProductTagUpdateOne) Select ¶
func (ptuo *ProductTagUpdateOne) Select(field string, fields ...string) *ProductTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductTagUpdateOne) Where ¶
func (ptuo *ProductTagUpdateOne) Where(ps ...predicate.ProductTag) *ProductTagUpdateOne
Where appends a list predicates to the ProductTagUpdate builder.
type ProductUpdate ¶
type ProductUpdate struct {
// contains filtered or unexported fields
}
ProductUpdate is the builder for updating Product entities.
func (*ProductUpdate) AddPrice ¶
func (pu *ProductUpdate) AddPrice(d decimal.Decimal) *ProductUpdate
AddPrice adds d to the "price" field.
func (*ProductUpdate) AddQty ¶
func (pu *ProductUpdate) AddQty(d decimal.Decimal) *ProductUpdate
AddQty adds d to the "qty" field.
func (*ProductUpdate) AddTagIDs ¶
func (pu *ProductUpdate) AddTagIDs(ids ...string) *ProductUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*ProductUpdate) AddTags ¶
func (pu *ProductUpdate) AddTags(t ...*Tag) *ProductUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*ProductUpdate) AddYear ¶
func (pu *ProductUpdate) AddYear(i int) *ProductUpdate
AddYear adds i to the "year" field.
func (*ProductUpdate) AppendColors ¶
func (pu *ProductUpdate) AppendColors(s []string) *ProductUpdate
AppendColors appends s to the "colors" field.
func (*ProductUpdate) ClearColors ¶
func (pu *ProductUpdate) ClearColors() *ProductUpdate
ClearColors clears the value of the "colors" field.
func (*ProductUpdate) ClearDescription ¶
func (pu *ProductUpdate) ClearDescription() *ProductUpdate
ClearDescription clears the value of the "description" field.
func (*ProductUpdate) ClearProvider ¶
func (pu *ProductUpdate) ClearProvider() *ProductUpdate
ClearProvider clears the value of the "provider" field.
func (*ProductUpdate) ClearTags ¶
func (pu *ProductUpdate) ClearTags() *ProductUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*ProductUpdate) ClearYear ¶
func (pu *ProductUpdate) ClearYear() *ProductUpdate
ClearYear clears the value of the "year" field.
func (*ProductUpdate) Exec ¶
func (pu *ProductUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductUpdate) ExecX ¶
func (pu *ProductUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpdate) Mutation ¶
func (pu *ProductUpdate) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdate) RemoveTagIDs ¶
func (pu *ProductUpdate) RemoveTagIDs(ids ...string) *ProductUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*ProductUpdate) RemoveTags ¶
func (pu *ProductUpdate) RemoveTags(t ...*Tag) *ProductUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*ProductUpdate) Save ¶
func (pu *ProductUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductUpdate) SaveX ¶
func (pu *ProductUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductUpdate) SetColors ¶
func (pu *ProductUpdate) SetColors(s []string) *ProductUpdate
SetColors sets the "colors" field.
func (*ProductUpdate) SetDescription ¶
func (pu *ProductUpdate) SetDescription(s string) *ProductUpdate
SetDescription sets the "description" field.
func (*ProductUpdate) SetName ¶
func (pu *ProductUpdate) SetName(s string) *ProductUpdate
SetName sets the "name" field.
func (*ProductUpdate) SetNillableDescription ¶
func (pu *ProductUpdate) SetNillableDescription(s *string) *ProductUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductUpdate) SetNillableName ¶
func (pu *ProductUpdate) SetNillableName(s *string) *ProductUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductUpdate) SetNillablePrice ¶
func (pu *ProductUpdate) SetNillablePrice(d *decimal.Decimal) *ProductUpdate
SetNillablePrice sets the "price" field if the given value is not nil.
func (*ProductUpdate) SetNillableProvider ¶
func (pu *ProductUpdate) SetNillableProvider(s *string) *ProductUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*ProductUpdate) SetNillableQty ¶
func (pu *ProductUpdate) SetNillableQty(d *decimal.Decimal) *ProductUpdate
SetNillableQty sets the "qty" field if the given value is not nil.
func (*ProductUpdate) SetNillableYear ¶
func (pu *ProductUpdate) SetNillableYear(i *int) *ProductUpdate
SetNillableYear sets the "year" field if the given value is not nil.
func (*ProductUpdate) SetPrice ¶
func (pu *ProductUpdate) SetPrice(d decimal.Decimal) *ProductUpdate
SetPrice sets the "price" field.
func (*ProductUpdate) SetProvider ¶
func (pu *ProductUpdate) SetProvider(s string) *ProductUpdate
SetProvider sets the "provider" field.
func (*ProductUpdate) SetQty ¶
func (pu *ProductUpdate) SetQty(d decimal.Decimal) *ProductUpdate
SetQty sets the "qty" field.
func (*ProductUpdate) SetUpdatedAt ¶
func (pu *ProductUpdate) SetUpdatedAt(t time.Time) *ProductUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProductUpdate) SetYear ¶
func (pu *ProductUpdate) SetYear(i int) *ProductUpdate
SetYear sets the "year" field.
func (*ProductUpdate) Where ¶
func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate
Where appends a list predicates to the ProductUpdate builder.
type ProductUpdateOne ¶
type ProductUpdateOne struct {
// contains filtered or unexported fields
}
ProductUpdateOne is the builder for updating a single Product entity.
func (*ProductUpdateOne) AddPrice ¶
func (puo *ProductUpdateOne) AddPrice(d decimal.Decimal) *ProductUpdateOne
AddPrice adds d to the "price" field.
func (*ProductUpdateOne) AddQty ¶
func (puo *ProductUpdateOne) AddQty(d decimal.Decimal) *ProductUpdateOne
AddQty adds d to the "qty" field.
func (*ProductUpdateOne) AddTagIDs ¶
func (puo *ProductUpdateOne) AddTagIDs(ids ...string) *ProductUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*ProductUpdateOne) AddTags ¶
func (puo *ProductUpdateOne) AddTags(t ...*Tag) *ProductUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*ProductUpdateOne) AddYear ¶
func (puo *ProductUpdateOne) AddYear(i int) *ProductUpdateOne
AddYear adds i to the "year" field.
func (*ProductUpdateOne) AppendColors ¶
func (puo *ProductUpdateOne) AppendColors(s []string) *ProductUpdateOne
AppendColors appends s to the "colors" field.
func (*ProductUpdateOne) ClearColors ¶
func (puo *ProductUpdateOne) ClearColors() *ProductUpdateOne
ClearColors clears the value of the "colors" field.
func (*ProductUpdateOne) ClearDescription ¶
func (puo *ProductUpdateOne) ClearDescription() *ProductUpdateOne
ClearDescription clears the value of the "description" field.
func (*ProductUpdateOne) ClearProvider ¶
func (puo *ProductUpdateOne) ClearProvider() *ProductUpdateOne
ClearProvider clears the value of the "provider" field.
func (*ProductUpdateOne) ClearTags ¶
func (puo *ProductUpdateOne) ClearTags() *ProductUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*ProductUpdateOne) ClearYear ¶
func (puo *ProductUpdateOne) ClearYear() *ProductUpdateOne
ClearYear clears the value of the "year" field.
func (*ProductUpdateOne) Exec ¶
func (puo *ProductUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductUpdateOne) ExecX ¶
func (puo *ProductUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpdateOne) Mutation ¶
func (puo *ProductUpdateOne) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdateOne) RemoveTagIDs ¶
func (puo *ProductUpdateOne) RemoveTagIDs(ids ...string) *ProductUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*ProductUpdateOne) RemoveTags ¶
func (puo *ProductUpdateOne) RemoveTags(t ...*Tag) *ProductUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*ProductUpdateOne) Save ¶
func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)
Save executes the query and returns the updated Product entity.
func (*ProductUpdateOne) SaveX ¶
func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product
SaveX is like Save, but panics if an error occurs.
func (*ProductUpdateOne) Select ¶
func (puo *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductUpdateOne) SetColors ¶
func (puo *ProductUpdateOne) SetColors(s []string) *ProductUpdateOne
SetColors sets the "colors" field.
func (*ProductUpdateOne) SetDescription ¶
func (puo *ProductUpdateOne) SetDescription(s string) *ProductUpdateOne
SetDescription sets the "description" field.
func (*ProductUpdateOne) SetName ¶
func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
SetName sets the "name" field.
func (*ProductUpdateOne) SetNillableDescription ¶
func (puo *ProductUpdateOne) SetNillableDescription(s *string) *ProductUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableName ¶
func (puo *ProductUpdateOne) SetNillableName(s *string) *ProductUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductUpdateOne) SetNillablePrice ¶
func (puo *ProductUpdateOne) SetNillablePrice(d *decimal.Decimal) *ProductUpdateOne
SetNillablePrice sets the "price" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableProvider ¶
func (puo *ProductUpdateOne) SetNillableProvider(s *string) *ProductUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableQty ¶
func (puo *ProductUpdateOne) SetNillableQty(d *decimal.Decimal) *ProductUpdateOne
SetNillableQty sets the "qty" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableYear ¶
func (puo *ProductUpdateOne) SetNillableYear(i *int) *ProductUpdateOne
SetNillableYear sets the "year" field if the given value is not nil.
func (*ProductUpdateOne) SetPrice ¶
func (puo *ProductUpdateOne) SetPrice(d decimal.Decimal) *ProductUpdateOne
SetPrice sets the "price" field.
func (*ProductUpdateOne) SetProvider ¶
func (puo *ProductUpdateOne) SetProvider(s string) *ProductUpdateOne
SetProvider sets the "provider" field.
func (*ProductUpdateOne) SetQty ¶
func (puo *ProductUpdateOne) SetQty(d decimal.Decimal) *ProductUpdateOne
SetQty sets the "qty" field.
func (*ProductUpdateOne) SetUpdatedAt ¶
func (puo *ProductUpdateOne) SetUpdatedAt(t time.Time) *ProductUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductUpdateOne) SetYear ¶
func (puo *ProductUpdateOne) SetYear(i int) *ProductUpdateOne
SetYear sets the "year" field.
func (*ProductUpdateOne) Where ¶
func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
Where appends a list predicates to the ProductUpdate 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 Tag ¶
type Tag struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) QueryProductTags ¶
func (t *Tag) QueryProductTags() *ProductTagQuery
QueryProductTags queries the "product_tags" edge of the Tag entity.
func (*Tag) QueryProducts ¶
func (t *Tag) QueryProducts() *ProductQuery
QueryProducts queries the "products" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id string) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) Intercept ¶
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) MapCreateBulk ¶
func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
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 (*TagClient) QueryProductTags ¶
func (c *TagClient) QueryProductTags(t *Tag) *ProductTagQuery
QueryProductTags queries the product_tags edge of a Tag.
func (*TagClient) QueryProducts ¶
func (c *TagClient) QueryProducts(t *Tag) *ProductQuery
QueryProducts queries the products edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id string) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddProductIDs ¶
AddProductIDs adds the "products" edge to the Product entity by IDs.
func (*TagCreate) AddProducts ¶
AddProducts adds the "products" edges to the Product entity.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TagCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TagCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagDeleteOne) Where ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Products holds the value of the products edge. Products []*Product `json:"products,omitempty"` // ProductTags holds the value of the product_tags edge. ProductTags []*ProductTag `json:"product_tags,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) ProductTagsOrErr ¶
func (e TagEdges) ProductTagsOrErr() ([]*ProductTag, error)
ProductTagsOrErr returns the ProductTags value or an error if the edge was not loaded in eager-loading.
func (TagEdges) ProductsOrErr ¶
ProductsOrErr returns the Products value or an error if the edge was not loaded in eager-loading.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddField ¶
func (m *TagMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*TagMutation) AddProductIDs ¶
func (m *TagMutation) AddProductIDs(ids ...string)
AddProductIDs adds the "products" edge to the Product entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*TagMutation) ClearField ¶
func (m *TagMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*TagMutation) ClearProducts ¶
func (m *TagMutation) ClearProducts()
ClearProducts clears the "products" edge to the Product entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*TagMutation) CreatedAt ¶
func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*TagMutation) ID ¶
func (m *TagMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TagMutation) IDs ¶
func (m *TagMutation) IDs(ctx context.Context) ([]string, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TagMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*TagMutation) OldTitle ¶
func (m *TagMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) ProductsCleared ¶
func (m *TagMutation) ProductsCleared() bool
ProductsCleared reports if the "products" edge to the Product entity was cleared.
func (*TagMutation) ProductsIDs ¶
func (m *TagMutation) ProductsIDs() (ids []string)
ProductsIDs returns the "products" edge IDs in the mutation.
func (*TagMutation) RemoveProductIDs ¶
func (m *TagMutation) RemoveProductIDs(ids ...string)
RemoveProductIDs removes the "products" edge to the Product entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*TagMutation) RemovedProductsIDs ¶
func (m *TagMutation) RemovedProductsIDs() (ids []string)
RemovedProducts returns the removed IDs of the "products" edge to the Product entity.
func (*TagMutation) ResetCreatedAt ¶
func (m *TagMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*TagMutation) ResetField ¶
func (m *TagMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*TagMutation) ResetProducts ¶
func (m *TagMutation) ResetProducts()
ResetProducts resets all changes to the "products" edge.
func (*TagMutation) ResetTitle ¶
func (m *TagMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TagMutation) ResetUpdatedAt ¶
func (m *TagMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TagMutation) SetCreatedAt ¶
func (m *TagMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*TagMutation) SetID ¶
func (m *TagMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tag entities.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TagMutation) SetTitle ¶
func (m *TagMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TagMutation) SetUpdatedAt ¶
func (m *TagMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TagMutation) Title ¶
func (m *TagMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) UpdatedAt ¶
func (m *TagMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Tag.Query(). GroupBy(tag.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) QueryProductTags ¶
func (tq *TagQuery) QueryProductTags() *ProductTagQuery
QueryProductTags chains the current query on the "product_tags" edge.
func (*TagQuery) QueryProducts ¶
func (tq *TagQuery) QueryProducts() *ProductQuery
QueryProducts chains the current query on the "products" edge.
func (*TagQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Tag.Query(). Select(tag.FieldCreatedAt). Scan(ctx, &v)
func (*TagQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TagQuery) WithProductTags ¶
func (tq *TagQuery) WithProductTags(opts ...func(*ProductTagQuery)) *TagQuery
WithProductTags tells the query-builder to eager-load the nodes that are connected to the "product_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*TagQuery) WithProducts ¶
func (tq *TagQuery) WithProducts(opts ...func(*ProductQuery)) *TagQuery
WithProducts tells the query-builder to eager-load the nodes that are connected to the "products" edge. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddProductIDs ¶
AddProductIDs adds the "products" edge to the Product entity by IDs.
func (*TagUpdate) AddProducts ¶
AddProducts adds the "products" edges to the Product entity.
func (*TagUpdate) ClearProducts ¶
ClearProducts clears all "products" edges to the Product entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveProductIDs ¶
RemoveProductIDs removes the "products" edge to Product entities by IDs.
func (*TagUpdate) RemoveProducts ¶
RemoveProducts removes "products" edges to Product entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetNillableTitle ¶
SetNillableTitle sets the "title" field if the given value is not nil.
func (*TagUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddProductIDs ¶
func (tuo *TagUpdateOne) AddProductIDs(ids ...string) *TagUpdateOne
AddProductIDs adds the "products" edge to the Product entity by IDs.
func (*TagUpdateOne) AddProducts ¶
func (tuo *TagUpdateOne) AddProducts(p ...*Product) *TagUpdateOne
AddProducts adds the "products" edges to the Product entity.
func (*TagUpdateOne) ClearProducts ¶
func (tuo *TagUpdateOne) ClearProducts() *TagUpdateOne
ClearProducts clears all "products" edges to the Product entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveProductIDs ¶
func (tuo *TagUpdateOne) RemoveProductIDs(ids ...string) *TagUpdateOne
RemoveProductIDs removes the "products" edge to Product entities by IDs.
func (*TagUpdateOne) RemoveProducts ¶
func (tuo *TagUpdateOne) RemoveProducts(p ...*Product) *TagUpdateOne
RemoveProducts removes "products" edges to Product entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetNillableTitle ¶
func (tuo *TagUpdateOne) SetNillableTitle(s *string) *TagUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*TagUpdateOne) SetTitle ¶
func (tuo *TagUpdateOne) SetTitle(s string) *TagUpdateOne
SetTitle sets the "title" field.
func (*TagUpdateOne) SetUpdatedAt ¶
func (tuo *TagUpdateOne) SetUpdatedAt(t time.Time) *TagUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Conversation is the client for interacting with the Conversation builders. Conversation *ConversationClient // FinancialTransaction is the client for interacting with the FinancialTransaction builders. FinancialTransaction *FinancialTransactionClient // Invoice is the client for interacting with the Invoice builders. Invoice *InvoiceClient // InvoiceLineItem is the client for interacting with the InvoiceLineItem builders. InvoiceLineItem *InvoiceLineItemClient // Message is the client for interacting with the Message builders. Message *MessageClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderLineItem is the client for interacting with the OrderLineItem builders. OrderLineItem *OrderLineItemClient // OrderStatusCode is the client for interacting with the OrderStatusCode builders. OrderStatusCode *OrderStatusCodeClient // Person is the client for interacting with the Person builders. Person *PersonClient // Product is the client for interacting with the Product builders. Product *ProductClient // ProductImage is the client for interacting with the ProductImage builders. ProductImage *ProductImageClient // ProductTag is the client for interacting with the ProductTag builders. ProductTag *ProductTagClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field 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
- conversation.go
- conversation_create.go
- conversation_delete.go
- conversation_query.go
- conversation_update.go
- ent.go
- financialtransaction.go
- financialtransaction_create.go
- financialtransaction_delete.go
- financialtransaction_query.go
- financialtransaction_update.go
- generate.go
- invoice.go
- invoice_create.go
- invoice_delete.go
- invoice_query.go
- invoice_update.go
- invoicelineitem.go
- invoicelineitem_create.go
- invoicelineitem_delete.go
- invoicelineitem_query.go
- invoicelineitem_update.go
- message.go
- message_create.go
- message_delete.go
- message_query.go
- message_update.go
- mutation.go
- order.go
- order_create.go
- order_delete.go
- order_query.go
- order_update.go
- orderlineitem.go
- orderlineitem_create.go
- orderlineitem_delete.go
- orderlineitem_query.go
- orderlineitem_update.go
- orderstatuscode.go
- orderstatuscode_create.go
- orderstatuscode_delete.go
- orderstatuscode_query.go
- orderstatuscode_update.go
- person.go
- person_create.go
- person_delete.go
- person_query.go
- person_update.go
- product.go
- product_create.go
- product_delete.go
- product_query.go
- product_update.go
- productimage.go
- productimage_create.go
- productimage_delete.go
- productimage_query.go
- productimage_update.go
- producttag.go
- producttag_create.go
- producttag_delete.go
- producttag_query.go
- producttag_update.go
- runtime.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tx.go