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 Bundle
- type BundleClient
- func (c *BundleClient) Create() *BundleCreate
- func (c *BundleClient) CreateBulk(builders ...*BundleCreate) *BundleCreateBulk
- func (c *BundleClient) Delete() *BundleDelete
- func (c *BundleClient) DeleteOne(b *Bundle) *BundleDeleteOne
- func (c *BundleClient) DeleteOneID(id int64) *BundleDeleteOne
- func (c *BundleClient) Get(ctx context.Context, id int64) (*Bundle, error)
- func (c *BundleClient) GetX(ctx context.Context, id int64) *Bundle
- func (c *BundleClient) Hooks() []Hook
- func (c *BundleClient) Intercept(interceptors ...Interceptor)
- func (c *BundleClient) Interceptors() []Interceptor
- func (c *BundleClient) MapCreateBulk(slice any, setFunc func(*BundleCreate, int)) *BundleCreateBulk
- func (c *BundleClient) Query() *BundleQuery
- func (c *BundleClient) QueryItem(b *Bundle) *ItemQuery
- func (c *BundleClient) QueryProduct(b *Bundle) *ProductQuery
- func (c *BundleClient) Update() *BundleUpdate
- func (c *BundleClient) UpdateOne(b *Bundle) *BundleUpdateOne
- func (c *BundleClient) UpdateOneID(id int64) *BundleUpdateOne
- func (c *BundleClient) Use(hooks ...Hook)
- type BundleCreate
- func (bc *BundleCreate) Exec(ctx context.Context) error
- func (bc *BundleCreate) ExecX(ctx context.Context)
- func (bc *BundleCreate) Mutation() *BundleMutation
- func (bc *BundleCreate) OnConflict(opts ...sql.ConflictOption) *BundleUpsertOne
- func (bc *BundleCreate) OnConflictColumns(columns ...string) *BundleUpsertOne
- func (bc *BundleCreate) Save(ctx context.Context) (*Bundle, error)
- func (bc *BundleCreate) SaveX(ctx context.Context) *Bundle
- func (bc *BundleCreate) SetAmount(f float64) *BundleCreate
- func (bc *BundleCreate) SetCreatedAt(t time.Time) *BundleCreate
- func (bc *BundleCreate) SetDeletedAt(t time.Time) *BundleCreate
- func (bc *BundleCreate) SetID(i int64) *BundleCreate
- func (bc *BundleCreate) SetItem(i *Item) *BundleCreate
- func (bc *BundleCreate) SetItemID(i int64) *BundleCreate
- func (bc *BundleCreate) SetNillableAmount(f *float64) *BundleCreate
- func (bc *BundleCreate) SetNillableCreatedAt(t *time.Time) *BundleCreate
- func (bc *BundleCreate) SetNillableDeletedAt(t *time.Time) *BundleCreate
- func (bc *BundleCreate) SetNillableUpdatedAt(t *time.Time) *BundleCreate
- func (bc *BundleCreate) SetProduct(p *Product) *BundleCreate
- func (bc *BundleCreate) SetProductID(i int64) *BundleCreate
- func (bc *BundleCreate) SetUpdatedAt(t time.Time) *BundleCreate
- type BundleCreateBulk
- func (bcb *BundleCreateBulk) Exec(ctx context.Context) error
- func (bcb *BundleCreateBulk) ExecX(ctx context.Context)
- func (bcb *BundleCreateBulk) OnConflict(opts ...sql.ConflictOption) *BundleUpsertBulk
- func (bcb *BundleCreateBulk) OnConflictColumns(columns ...string) *BundleUpsertBulk
- func (bcb *BundleCreateBulk) Save(ctx context.Context) ([]*Bundle, error)
- func (bcb *BundleCreateBulk) SaveX(ctx context.Context) []*Bundle
- type BundleDelete
- type BundleDeleteOne
- type BundleEdges
- type BundleFilter
- func (f *BundleFilter) Where(p entql.P)
- func (f *BundleFilter) WhereAmount(p entql.Float64P)
- func (f *BundleFilter) WhereCreatedAt(p entql.TimeP)
- func (f *BundleFilter) WhereDeletedAt(p entql.TimeP)
- func (f *BundleFilter) WhereHasItem()
- func (f *BundleFilter) WhereHasItemWith(preds ...predicate.Item)
- func (f *BundleFilter) WhereHasProduct()
- func (f *BundleFilter) WhereHasProductWith(preds ...predicate.Product)
- func (f *BundleFilter) WhereID(p entql.Int64P)
- func (f *BundleFilter) WhereItemID(p entql.Int64P)
- func (f *BundleFilter) WhereProductID(p entql.Int64P)
- func (f *BundleFilter) WhereUpdatedAt(p entql.TimeP)
- type BundleGroupBy
- func (bgb *BundleGroupBy) Aggregate(fns ...AggregateFunc) *BundleGroupBy
- func (s *BundleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BundleGroupBy) BoolX(ctx context.Context) bool
- func (s *BundleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BundleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BundleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BundleGroupBy) Float64X(ctx context.Context) float64
- func (s *BundleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BundleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BundleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BundleGroupBy) IntX(ctx context.Context) int
- func (s *BundleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BundleGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BundleGroupBy) Scan(ctx context.Context, v any) error
- func (s *BundleGroupBy) ScanX(ctx context.Context, v any)
- func (s *BundleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BundleGroupBy) StringX(ctx context.Context) string
- func (s *BundleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BundleGroupBy) StringsX(ctx context.Context) []string
- type BundleMutation
- func (m *BundleMutation) AddAmount(f float64)
- func (m *BundleMutation) AddField(name string, value ent.Value) error
- func (m *BundleMutation) AddedAmount() (r float64, exists bool)
- func (m *BundleMutation) AddedEdges() []string
- func (m *BundleMutation) AddedField(name string) (ent.Value, bool)
- func (m *BundleMutation) AddedFields() []string
- func (m *BundleMutation) AddedIDs(name string) []ent.Value
- func (m *BundleMutation) Amount() (r float64, exists bool)
- func (m *BundleMutation) ClearDeletedAt()
- func (m *BundleMutation) ClearEdge(name string) error
- func (m *BundleMutation) ClearField(name string) error
- func (m *BundleMutation) ClearItem()
- func (m *BundleMutation) ClearProduct()
- func (m *BundleMutation) ClearedEdges() []string
- func (m *BundleMutation) ClearedFields() []string
- func (m BundleMutation) Client() *Client
- func (m *BundleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *BundleMutation) DeletedAt() (r time.Time, exists bool)
- func (m *BundleMutation) DeletedAtCleared() bool
- func (m *BundleMutation) EdgeCleared(name string) bool
- func (m *BundleMutation) Field(name string) (ent.Value, bool)
- func (m *BundleMutation) FieldCleared(name string) bool
- func (m *BundleMutation) Fields() []string
- func (m *BundleMutation) Filter() *BundleFilter
- func (m *BundleMutation) ID() (id int64, exists bool)
- func (m *BundleMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *BundleMutation) ItemCleared() bool
- func (m *BundleMutation) ItemID() (r int64, exists bool)
- func (m *BundleMutation) ItemIDs() (ids []int64)
- func (m *BundleMutation) OldAmount(ctx context.Context) (v float64, err error)
- func (m *BundleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BundleMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *BundleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BundleMutation) OldItemID(ctx context.Context) (v int64, err error)
- func (m *BundleMutation) OldProductID(ctx context.Context) (v int64, err error)
- func (m *BundleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BundleMutation) Op() Op
- func (m *BundleMutation) ProductCleared() bool
- func (m *BundleMutation) ProductID() (r int64, exists bool)
- func (m *BundleMutation) ProductIDs() (ids []int64)
- func (m *BundleMutation) RemovedEdges() []string
- func (m *BundleMutation) RemovedIDs(name string) []ent.Value
- func (m *BundleMutation) ResetAmount()
- func (m *BundleMutation) ResetCreatedAt()
- func (m *BundleMutation) ResetDeletedAt()
- func (m *BundleMutation) ResetEdge(name string) error
- func (m *BundleMutation) ResetField(name string) error
- func (m *BundleMutation) ResetItem()
- func (m *BundleMutation) ResetItemID()
- func (m *BundleMutation) ResetProduct()
- func (m *BundleMutation) ResetProductID()
- func (m *BundleMutation) ResetUpdatedAt()
- func (m *BundleMutation) SetAmount(f float64)
- func (m *BundleMutation) SetCreatedAt(t time.Time)
- func (m *BundleMutation) SetDeletedAt(t time.Time)
- func (m *BundleMutation) SetField(name string, value ent.Value) error
- func (m *BundleMutation) SetID(id int64)
- func (m *BundleMutation) SetItemID(i int64)
- func (m *BundleMutation) SetOp(op Op)
- func (m *BundleMutation) SetProductID(i int64)
- func (m *BundleMutation) SetUpdatedAt(t time.Time)
- func (m BundleMutation) Tx() (*Tx, error)
- func (m *BundleMutation) Type() string
- func (m *BundleMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *BundleMutation) Where(ps ...predicate.Bundle)
- func (m *BundleMutation) WhereP(ps ...func(*sql.Selector))
- type BundleQuery
- func (bq *BundleQuery) Aggregate(fns ...AggregateFunc) *BundleSelect
- func (bq *BundleQuery) All(ctx context.Context) ([]*Bundle, error)
- func (bq *BundleQuery) AllX(ctx context.Context) []*Bundle
- func (bq *BundleQuery) Clone() *BundleQuery
- func (bq *BundleQuery) Count(ctx context.Context) (int, error)
- func (bq *BundleQuery) CountX(ctx context.Context) int
- func (bq *BundleQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BundleQuery) ExistX(ctx context.Context) bool
- func (bq *BundleQuery) Filter() *BundleFilter
- func (bq *BundleQuery) First(ctx context.Context) (*Bundle, error)
- func (bq *BundleQuery) FirstID(ctx context.Context) (id int64, err error)
- func (bq *BundleQuery) FirstIDX(ctx context.Context) int64
- func (bq *BundleQuery) FirstX(ctx context.Context) *Bundle
- func (bq *BundleQuery) GroupBy(field string, fields ...string) *BundleGroupBy
- func (bq *BundleQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (bq *BundleQuery) IDsX(ctx context.Context) []int64
- func (bq *BundleQuery) Limit(limit int) *BundleQuery
- func (bq *BundleQuery) Modify(modifiers ...func(s *sql.Selector)) *BundleSelect
- func (bq *BundleQuery) Offset(offset int) *BundleQuery
- func (bq *BundleQuery) Only(ctx context.Context) (*Bundle, error)
- func (bq *BundleQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (bq *BundleQuery) OnlyIDX(ctx context.Context) int64
- func (bq *BundleQuery) OnlyX(ctx context.Context) *Bundle
- func (bq *BundleQuery) Order(o ...bundle.OrderOption) *BundleQuery
- func (bq *BundleQuery) QueryItem() *ItemQuery
- func (bq *BundleQuery) QueryProduct() *ProductQuery
- func (bq *BundleQuery) Select(fields ...string) *BundleSelect
- func (bq *BundleQuery) Unique(unique bool) *BundleQuery
- func (bq *BundleQuery) Where(ps ...predicate.Bundle) *BundleQuery
- func (bq *BundleQuery) WithItem(opts ...func(*ItemQuery)) *BundleQuery
- func (bq *BundleQuery) WithProduct(opts ...func(*ProductQuery)) *BundleQuery
- type BundleSelect
- func (bs *BundleSelect) Aggregate(fns ...AggregateFunc) *BundleSelect
- func (s *BundleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BundleSelect) BoolX(ctx context.Context) bool
- func (s *BundleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BundleSelect) BoolsX(ctx context.Context) []bool
- func (s *BundleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BundleSelect) Float64X(ctx context.Context) float64
- func (s *BundleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BundleSelect) Float64sX(ctx context.Context) []float64
- func (s *BundleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BundleSelect) IntX(ctx context.Context) int
- func (s *BundleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BundleSelect) IntsX(ctx context.Context) []int
- func (bs *BundleSelect) Modify(modifiers ...func(s *sql.Selector)) *BundleSelect
- func (bs *BundleSelect) Scan(ctx context.Context, v any) error
- func (s *BundleSelect) ScanX(ctx context.Context, v any)
- func (s *BundleSelect) String(ctx context.Context) (_ string, err error)
- func (s *BundleSelect) StringX(ctx context.Context) string
- func (s *BundleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BundleSelect) StringsX(ctx context.Context) []string
- type BundleUpdate
- func (bu *BundleUpdate) AddAmount(f float64) *BundleUpdate
- func (bu *BundleUpdate) ClearDeletedAt() *BundleUpdate
- func (bu *BundleUpdate) Exec(ctx context.Context) error
- func (bu *BundleUpdate) ExecX(ctx context.Context)
- func (bu *BundleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *BundleUpdate
- func (bu *BundleUpdate) Mutation() *BundleMutation
- func (bu *BundleUpdate) Save(ctx context.Context) (int, error)
- func (bu *BundleUpdate) SaveX(ctx context.Context) int
- func (bu *BundleUpdate) SetAmount(f float64) *BundleUpdate
- func (bu *BundleUpdate) SetDeletedAt(t time.Time) *BundleUpdate
- func (bu *BundleUpdate) SetNillableAmount(f *float64) *BundleUpdate
- func (bu *BundleUpdate) SetNillableDeletedAt(t *time.Time) *BundleUpdate
- func (bu *BundleUpdate) SetUpdatedAt(t time.Time) *BundleUpdate
- func (bu *BundleUpdate) Where(ps ...predicate.Bundle) *BundleUpdate
- type BundleUpdateOne
- func (buo *BundleUpdateOne) AddAmount(f float64) *BundleUpdateOne
- func (buo *BundleUpdateOne) ClearDeletedAt() *BundleUpdateOne
- func (buo *BundleUpdateOne) Exec(ctx context.Context) error
- func (buo *BundleUpdateOne) ExecX(ctx context.Context)
- func (buo *BundleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *BundleUpdateOne
- func (buo *BundleUpdateOne) Mutation() *BundleMutation
- func (buo *BundleUpdateOne) Save(ctx context.Context) (*Bundle, error)
- func (buo *BundleUpdateOne) SaveX(ctx context.Context) *Bundle
- func (buo *BundleUpdateOne) Select(field string, fields ...string) *BundleUpdateOne
- func (buo *BundleUpdateOne) SetAmount(f float64) *BundleUpdateOne
- func (buo *BundleUpdateOne) SetDeletedAt(t time.Time) *BundleUpdateOne
- func (buo *BundleUpdateOne) SetNillableAmount(f *float64) *BundleUpdateOne
- func (buo *BundleUpdateOne) SetNillableDeletedAt(t *time.Time) *BundleUpdateOne
- func (buo *BundleUpdateOne) SetUpdatedAt(t time.Time) *BundleUpdateOne
- func (buo *BundleUpdateOne) Where(ps ...predicate.Bundle) *BundleUpdateOne
- type BundleUpsert
- func (u *BundleUpsert) AddAmount(v float64) *BundleUpsert
- func (u *BundleUpsert) ClearDeletedAt() *BundleUpsert
- func (u *BundleUpsert) SetAmount(v float64) *BundleUpsert
- func (u *BundleUpsert) SetDeletedAt(v time.Time) *BundleUpsert
- func (u *BundleUpsert) SetUpdatedAt(v time.Time) *BundleUpsert
- func (u *BundleUpsert) UpdateAmount() *BundleUpsert
- func (u *BundleUpsert) UpdateDeletedAt() *BundleUpsert
- func (u *BundleUpsert) UpdateUpdatedAt() *BundleUpsert
- type BundleUpsertBulk
- func (u *BundleUpsertBulk) AddAmount(v float64) *BundleUpsertBulk
- func (u *BundleUpsertBulk) ClearDeletedAt() *BundleUpsertBulk
- func (u *BundleUpsertBulk) DoNothing() *BundleUpsertBulk
- func (u *BundleUpsertBulk) Exec(ctx context.Context) error
- func (u *BundleUpsertBulk) ExecX(ctx context.Context)
- func (u *BundleUpsertBulk) Ignore() *BundleUpsertBulk
- func (u *BundleUpsertBulk) SetAmount(v float64) *BundleUpsertBulk
- func (u *BundleUpsertBulk) SetDeletedAt(v time.Time) *BundleUpsertBulk
- func (u *BundleUpsertBulk) SetUpdatedAt(v time.Time) *BundleUpsertBulk
- func (u *BundleUpsertBulk) Update(set func(*BundleUpsert)) *BundleUpsertBulk
- func (u *BundleUpsertBulk) UpdateAmount() *BundleUpsertBulk
- func (u *BundleUpsertBulk) UpdateDeletedAt() *BundleUpsertBulk
- func (u *BundleUpsertBulk) UpdateNewValues() *BundleUpsertBulk
- func (u *BundleUpsertBulk) UpdateUpdatedAt() *BundleUpsertBulk
- type BundleUpsertOne
- func (u *BundleUpsertOne) AddAmount(v float64) *BundleUpsertOne
- func (u *BundleUpsertOne) ClearDeletedAt() *BundleUpsertOne
- func (u *BundleUpsertOne) DoNothing() *BundleUpsertOne
- func (u *BundleUpsertOne) Exec(ctx context.Context) error
- func (u *BundleUpsertOne) ExecX(ctx context.Context)
- func (u *BundleUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *BundleUpsertOne) IDX(ctx context.Context) int64
- func (u *BundleUpsertOne) Ignore() *BundleUpsertOne
- func (u *BundleUpsertOne) SetAmount(v float64) *BundleUpsertOne
- func (u *BundleUpsertOne) SetDeletedAt(v time.Time) *BundleUpsertOne
- func (u *BundleUpsertOne) SetUpdatedAt(v time.Time) *BundleUpsertOne
- func (u *BundleUpsertOne) Update(set func(*BundleUpsert)) *BundleUpsertOne
- func (u *BundleUpsertOne) UpdateAmount() *BundleUpsertOne
- func (u *BundleUpsertOne) UpdateDeletedAt() *BundleUpsertOne
- func (u *BundleUpsertOne) UpdateNewValues() *BundleUpsertOne
- func (u *BundleUpsertOne) UpdateUpdatedAt() *BundleUpsertOne
- type Bundles
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type Invoice
- func (i *Invoice) QueryPaymentProfile() *PaymentProfileQuery
- func (i *Invoice) QueryProduct() *ProductQuery
- func (i *Invoice) QueryReservations() *ProductReservationQuery
- func (i *Invoice) QuerySubscriptions() *SubscriptionsQuery
- func (i *Invoice) String() string
- func (i *Invoice) Unwrap() *Invoice
- func (i *Invoice) Update() *InvoiceUpdateOne
- func (i *Invoice) Value(name string) (ent.Value, error)
- 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 int64) *InvoiceDeleteOne
- func (c *InvoiceClient) Get(ctx context.Context, id int64) (*Invoice, error)
- func (c *InvoiceClient) GetX(ctx context.Context, id int64) *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) QueryPaymentProfile(i *Invoice) *PaymentProfileQuery
- func (c *InvoiceClient) QueryProduct(i *Invoice) *ProductQuery
- func (c *InvoiceClient) QueryReservations(i *Invoice) *ProductReservationQuery
- func (c *InvoiceClient) QuerySubscriptions(i *Invoice) *SubscriptionsQuery
- func (c *InvoiceClient) Update() *InvoiceUpdate
- func (c *InvoiceClient) UpdateOne(i *Invoice) *InvoiceUpdateOne
- func (c *InvoiceClient) UpdateOneID(id int64) *InvoiceUpdateOne
- func (c *InvoiceClient) Use(hooks ...Hook)
- type InvoiceCreate
- func (ic *InvoiceCreate) AddReservationIDs(ids ...int64) *InvoiceCreate
- func (ic *InvoiceCreate) AddReservations(p ...*ProductReservation) *InvoiceCreate
- func (ic *InvoiceCreate) Exec(ctx context.Context) error
- func (ic *InvoiceCreate) ExecX(ctx context.Context)
- func (ic *InvoiceCreate) Mutation() *InvoiceMutation
- func (ic *InvoiceCreate) OnConflict(opts ...sql.ConflictOption) *InvoiceUpsertOne
- func (ic *InvoiceCreate) OnConflictColumns(columns ...string) *InvoiceUpsertOne
- func (ic *InvoiceCreate) Save(ctx context.Context) (*Invoice, error)
- func (ic *InvoiceCreate) SaveX(ctx context.Context) *Invoice
- func (ic *InvoiceCreate) SetAmount(i int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetAppID(s string) *InvoiceCreate
- func (ic *InvoiceCreate) SetCurrency(s string) *InvoiceCreate
- func (ic *InvoiceCreate) SetExternalTransactionID(s string) *InvoiceCreate
- func (ic *InvoiceCreate) SetID(i int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetIsPaidAtProcessed(b bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetIsPaidTillProcessed(b bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetIsRevoked(b bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetIsRevokedProcessed(b bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetIsTrial(b bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableCurrency(s *string) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableExternalTransactionID(s *string) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableIsPaidAtProcessed(b *bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableIsPaidTillProcessed(b *bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableIsRevoked(b *bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableIsRevokedProcessed(b *bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableIsTrial(b *bool) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillablePaidAt(t *time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillablePaidTill(t *time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillablePaymentProfileID(i *int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillablePaymentProvider(ep *enum.PaymentProvider) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableRevokedAt(t *time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableStatus(es *enum.InvoiceStatus) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableSubscriptionID(i *int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableSubscriptionsID(id *int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableTtpSubscriptionID(s *string) *InvoiceCreate
- func (ic *InvoiceCreate) SetPaidAt(t time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetPaidTill(t time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetPaymentProfile(p *PaymentProfile) *InvoiceCreate
- func (ic *InvoiceCreate) SetPaymentProfileID(i int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetPaymentProvider(ep enum.PaymentProvider) *InvoiceCreate
- func (ic *InvoiceCreate) SetPrice(d decimal.Decimal) *InvoiceCreate
- func (ic *InvoiceCreate) SetProduct(p *Product) *InvoiceCreate
- func (ic *InvoiceCreate) SetProductID(i int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetRevokedAt(t time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetStatus(es enum.InvoiceStatus) *InvoiceCreate
- func (ic *InvoiceCreate) SetSubscriptionID(i int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetSubscriptions(s *Subscriptions) *InvoiceCreate
- func (ic *InvoiceCreate) SetSubscriptionsID(id int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetTenantID(i int64) *InvoiceCreate
- func (ic *InvoiceCreate) SetTtpSubscriptionID(s string) *InvoiceCreate
- func (ic *InvoiceCreate) SetUserID(i int64) *InvoiceCreate
- type InvoiceCreateBulk
- func (icb *InvoiceCreateBulk) Exec(ctx context.Context) error
- func (icb *InvoiceCreateBulk) ExecX(ctx context.Context)
- func (icb *InvoiceCreateBulk) OnConflict(opts ...sql.ConflictOption) *InvoiceUpsertBulk
- func (icb *InvoiceCreateBulk) OnConflictColumns(columns ...string) *InvoiceUpsertBulk
- func (icb *InvoiceCreateBulk) Save(ctx context.Context) ([]*Invoice, error)
- func (icb *InvoiceCreateBulk) SaveX(ctx context.Context) []*Invoice
- type InvoiceDelete
- type InvoiceDeleteOne
- type InvoiceEdges
- type InvoiceFilter
- func (f *InvoiceFilter) Where(p entql.P)
- func (f *InvoiceFilter) WhereAmount(p entql.Int64P)
- func (f *InvoiceFilter) WhereAppID(p entql.StringP)
- func (f *InvoiceFilter) WhereCurrency(p entql.StringP)
- func (f *InvoiceFilter) WhereExternalTransactionID(p entql.StringP)
- func (f *InvoiceFilter) WhereHasPaymentProfile()
- func (f *InvoiceFilter) WhereHasPaymentProfileWith(preds ...predicate.PaymentProfile)
- func (f *InvoiceFilter) WhereHasProduct()
- func (f *InvoiceFilter) WhereHasProductWith(preds ...predicate.Product)
- func (f *InvoiceFilter) WhereHasReservations()
- func (f *InvoiceFilter) WhereHasReservationsWith(preds ...predicate.ProductReservation)
- func (f *InvoiceFilter) WhereHasSubscriptions()
- func (f *InvoiceFilter) WhereHasSubscriptionsWith(preds ...predicate.Subscriptions)
- func (f *InvoiceFilter) WhereID(p entql.Int64P)
- func (f *InvoiceFilter) WhereIsPaidAtProcessed(p entql.BoolP)
- func (f *InvoiceFilter) WhereIsPaidTillProcessed(p entql.BoolP)
- func (f *InvoiceFilter) WhereIsRevoked(p entql.BoolP)
- func (f *InvoiceFilter) WhereIsRevokedProcessed(p entql.BoolP)
- func (f *InvoiceFilter) WhereIsTrial(p entql.BoolP)
- func (f *InvoiceFilter) WherePaidAt(p entql.TimeP)
- func (f *InvoiceFilter) WherePaidTill(p entql.TimeP)
- func (f *InvoiceFilter) WherePaymentProfileID(p entql.Int64P)
- func (f *InvoiceFilter) WherePaymentProvider(p entql.StringP)
- func (f *InvoiceFilter) WherePrice(p entql.Float64P)
- func (f *InvoiceFilter) WhereProductID(p entql.Int64P)
- func (f *InvoiceFilter) WhereRevokedAt(p entql.TimeP)
- func (f *InvoiceFilter) WhereStatus(p entql.StringP)
- func (f *InvoiceFilter) WhereSubscriptionID(p entql.Int64P)
- func (f *InvoiceFilter) WhereTenantID(p entql.Int64P)
- func (f *InvoiceFilter) WhereTtpSubscriptionID(p entql.StringP)
- func (f *InvoiceFilter) WhereUserID(p entql.Int64P)
- 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 InvoiceMutation
- func (m *InvoiceMutation) AddAmount(i int64)
- func (m *InvoiceMutation) AddField(name string, value ent.Value) error
- func (m *InvoiceMutation) AddPrice(d decimal.Decimal)
- func (m *InvoiceMutation) AddReservationIDs(ids ...int64)
- func (m *InvoiceMutation) AddTenantID(i int64)
- func (m *InvoiceMutation) AddUserID(i int64)
- func (m *InvoiceMutation) AddedAmount() (r int64, exists bool)
- 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) AddedPrice() (r decimal.Decimal, exists bool)
- func (m *InvoiceMutation) AddedTenantID() (r int64, exists bool)
- func (m *InvoiceMutation) AddedUserID() (r int64, exists bool)
- func (m *InvoiceMutation) Amount() (r int64, exists bool)
- func (m *InvoiceMutation) AppID() (r string, exists bool)
- func (m *InvoiceMutation) ClearEdge(name string) error
- func (m *InvoiceMutation) ClearExternalTransactionID()
- func (m *InvoiceMutation) ClearField(name string) error
- func (m *InvoiceMutation) ClearPaidAt()
- func (m *InvoiceMutation) ClearPaidTill()
- func (m *InvoiceMutation) ClearPaymentProfile()
- func (m *InvoiceMutation) ClearPaymentProfileID()
- func (m *InvoiceMutation) ClearProduct()
- func (m *InvoiceMutation) ClearReservations()
- func (m *InvoiceMutation) ClearRevokedAt()
- func (m *InvoiceMutation) ClearSubscriptionID()
- func (m *InvoiceMutation) ClearSubscriptions()
- func (m *InvoiceMutation) ClearTtpSubscriptionID()
- func (m *InvoiceMutation) ClearedEdges() []string
- func (m *InvoiceMutation) ClearedFields() []string
- func (m InvoiceMutation) Client() *Client
- func (m *InvoiceMutation) Currency() (r string, exists bool)
- func (m *InvoiceMutation) EdgeCleared(name string) bool
- func (m *InvoiceMutation) ExternalTransactionID() (r string, exists bool)
- func (m *InvoiceMutation) ExternalTransactionIDCleared() 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) Filter() *InvoiceFilter
- func (m *InvoiceMutation) ID() (id int64, exists bool)
- func (m *InvoiceMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *InvoiceMutation) IsPaidAtProcessed() (r bool, exists bool)
- func (m *InvoiceMutation) IsPaidTillProcessed() (r bool, exists bool)
- func (m *InvoiceMutation) IsRevoked() (r bool, exists bool)
- func (m *InvoiceMutation) IsRevokedProcessed() (r bool, exists bool)
- func (m *InvoiceMutation) IsTrial() (r bool, exists bool)
- func (m *InvoiceMutation) OldAmount(ctx context.Context) (v int64, err error)
- func (m *InvoiceMutation) OldAppID(ctx context.Context) (v string, err error)
- func (m *InvoiceMutation) OldCurrency(ctx context.Context) (v string, err error)
- func (m *InvoiceMutation) OldExternalTransactionID(ctx context.Context) (v *string, err error)
- func (m *InvoiceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InvoiceMutation) OldIsPaidAtProcessed(ctx context.Context) (v bool, err error)
- func (m *InvoiceMutation) OldIsPaidTillProcessed(ctx context.Context) (v bool, err error)
- func (m *InvoiceMutation) OldIsRevoked(ctx context.Context) (v bool, err error)
- func (m *InvoiceMutation) OldIsRevokedProcessed(ctx context.Context) (v bool, err error)
- func (m *InvoiceMutation) OldIsTrial(ctx context.Context) (v bool, err error)
- func (m *InvoiceMutation) OldPaidAt(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceMutation) OldPaidTill(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceMutation) OldPaymentProfileID(ctx context.Context) (v *int64, err error)
- func (m *InvoiceMutation) OldPaymentProvider(ctx context.Context) (v enum.PaymentProvider, err error)
- func (m *InvoiceMutation) OldPrice(ctx context.Context) (v decimal.Decimal, err error)
- func (m *InvoiceMutation) OldProductID(ctx context.Context) (v int64, err error)
- func (m *InvoiceMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceMutation) OldStatus(ctx context.Context) (v enum.InvoiceStatus, err error)
- func (m *InvoiceMutation) OldSubscriptionID(ctx context.Context) (v *int64, err error)
- func (m *InvoiceMutation) OldTenantID(ctx context.Context) (v int64, err error)
- func (m *InvoiceMutation) OldTtpSubscriptionID(ctx context.Context) (v *string, err error)
- func (m *InvoiceMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *InvoiceMutation) Op() Op
- func (m *InvoiceMutation) PaidAt() (r time.Time, exists bool)
- func (m *InvoiceMutation) PaidAtCleared() bool
- func (m *InvoiceMutation) PaidTill() (r time.Time, exists bool)
- func (m *InvoiceMutation) PaidTillCleared() bool
- func (m *InvoiceMutation) PaymentProfileCleared() bool
- func (m *InvoiceMutation) PaymentProfileID() (r int64, exists bool)
- func (m *InvoiceMutation) PaymentProfileIDCleared() bool
- func (m *InvoiceMutation) PaymentProfileIDs() (ids []int64)
- func (m *InvoiceMutation) PaymentProvider() (r enum.PaymentProvider, exists bool)
- func (m *InvoiceMutation) Price() (r decimal.Decimal, exists bool)
- func (m *InvoiceMutation) ProductCleared() bool
- func (m *InvoiceMutation) ProductID() (r int64, exists bool)
- func (m *InvoiceMutation) ProductIDs() (ids []int64)
- func (m *InvoiceMutation) RemoveReservationIDs(ids ...int64)
- func (m *InvoiceMutation) RemovedEdges() []string
- func (m *InvoiceMutation) RemovedIDs(name string) []ent.Value
- func (m *InvoiceMutation) RemovedReservationsIDs() (ids []int64)
- func (m *InvoiceMutation) ReservationsCleared() bool
- func (m *InvoiceMutation) ReservationsIDs() (ids []int64)
- func (m *InvoiceMutation) ResetAmount()
- func (m *InvoiceMutation) ResetAppID()
- func (m *InvoiceMutation) ResetCurrency()
- func (m *InvoiceMutation) ResetEdge(name string) error
- func (m *InvoiceMutation) ResetExternalTransactionID()
- func (m *InvoiceMutation) ResetField(name string) error
- func (m *InvoiceMutation) ResetIsPaidAtProcessed()
- func (m *InvoiceMutation) ResetIsPaidTillProcessed()
- func (m *InvoiceMutation) ResetIsRevoked()
- func (m *InvoiceMutation) ResetIsRevokedProcessed()
- func (m *InvoiceMutation) ResetIsTrial()
- func (m *InvoiceMutation) ResetPaidAt()
- func (m *InvoiceMutation) ResetPaidTill()
- func (m *InvoiceMutation) ResetPaymentProfile()
- func (m *InvoiceMutation) ResetPaymentProfileID()
- func (m *InvoiceMutation) ResetPaymentProvider()
- func (m *InvoiceMutation) ResetPrice()
- func (m *InvoiceMutation) ResetProduct()
- func (m *InvoiceMutation) ResetProductID()
- func (m *InvoiceMutation) ResetReservations()
- func (m *InvoiceMutation) ResetRevokedAt()
- func (m *InvoiceMutation) ResetStatus()
- func (m *InvoiceMutation) ResetSubscriptionID()
- func (m *InvoiceMutation) ResetSubscriptions()
- func (m *InvoiceMutation) ResetTenantID()
- func (m *InvoiceMutation) ResetTtpSubscriptionID()
- func (m *InvoiceMutation) ResetUserID()
- func (m *InvoiceMutation) RevokedAt() (r time.Time, exists bool)
- func (m *InvoiceMutation) RevokedAtCleared() bool
- func (m *InvoiceMutation) SetAmount(i int64)
- func (m *InvoiceMutation) SetAppID(s string)
- func (m *InvoiceMutation) SetCurrency(s string)
- func (m *InvoiceMutation) SetExternalTransactionID(s string)
- func (m *InvoiceMutation) SetField(name string, value ent.Value) error
- func (m *InvoiceMutation) SetID(id int64)
- func (m *InvoiceMutation) SetIsPaidAtProcessed(b bool)
- func (m *InvoiceMutation) SetIsPaidTillProcessed(b bool)
- func (m *InvoiceMutation) SetIsRevoked(b bool)
- func (m *InvoiceMutation) SetIsRevokedProcessed(b bool)
- func (m *InvoiceMutation) SetIsTrial(b bool)
- func (m *InvoiceMutation) SetOp(op Op)
- func (m *InvoiceMutation) SetPaidAt(t time.Time)
- func (m *InvoiceMutation) SetPaidTill(t time.Time)
- func (m *InvoiceMutation) SetPaymentProfileID(i int64)
- func (m *InvoiceMutation) SetPaymentProvider(ep enum.PaymentProvider)
- func (m *InvoiceMutation) SetPrice(d decimal.Decimal)
- func (m *InvoiceMutation) SetProductID(i int64)
- func (m *InvoiceMutation) SetRevokedAt(t time.Time)
- func (m *InvoiceMutation) SetStatus(es enum.InvoiceStatus)
- func (m *InvoiceMutation) SetSubscriptionID(i int64)
- func (m *InvoiceMutation) SetSubscriptionsID(id int64)
- func (m *InvoiceMutation) SetTenantID(i int64)
- func (m *InvoiceMutation) SetTtpSubscriptionID(s string)
- func (m *InvoiceMutation) SetUserID(i int64)
- func (m *InvoiceMutation) Status() (r enum.InvoiceStatus, exists bool)
- func (m *InvoiceMutation) SubscriptionID() (r int64, exists bool)
- func (m *InvoiceMutation) SubscriptionIDCleared() bool
- func (m *InvoiceMutation) SubscriptionsCleared() bool
- func (m *InvoiceMutation) SubscriptionsID() (id int64, exists bool)
- func (m *InvoiceMutation) SubscriptionsIDs() (ids []int64)
- func (m *InvoiceMutation) TenantID() (r int64, exists bool)
- func (m *InvoiceMutation) TtpSubscriptionID() (r string, exists bool)
- func (m *InvoiceMutation) TtpSubscriptionIDCleared() bool
- func (m InvoiceMutation) Tx() (*Tx, error)
- func (m *InvoiceMutation) Type() string
- func (m *InvoiceMutation) UserID() (r int64, 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) Filter() *InvoiceFilter
- func (iq *InvoiceQuery) First(ctx context.Context) (*Invoice, error)
- func (iq *InvoiceQuery) FirstID(ctx context.Context) (id int64, err error)
- func (iq *InvoiceQuery) FirstIDX(ctx context.Context) int64
- 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 []int64, err error)
- func (iq *InvoiceQuery) IDsX(ctx context.Context) []int64
- func (iq *InvoiceQuery) Limit(limit int) *InvoiceQuery
- func (iq *InvoiceQuery) Modify(modifiers ...func(s *sql.Selector)) *InvoiceSelect
- func (iq *InvoiceQuery) Offset(offset int) *InvoiceQuery
- func (iq *InvoiceQuery) Only(ctx context.Context) (*Invoice, error)
- func (iq *InvoiceQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (iq *InvoiceQuery) OnlyIDX(ctx context.Context) int64
- func (iq *InvoiceQuery) OnlyX(ctx context.Context) *Invoice
- func (iq *InvoiceQuery) Order(o ...invoice.OrderOption) *InvoiceQuery
- func (iq *InvoiceQuery) QueryPaymentProfile() *PaymentProfileQuery
- func (iq *InvoiceQuery) QueryProduct() *ProductQuery
- func (iq *InvoiceQuery) QueryReservations() *ProductReservationQuery
- func (iq *InvoiceQuery) QuerySubscriptions() *SubscriptionsQuery
- 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) WithPaymentProfile(opts ...func(*PaymentProfileQuery)) *InvoiceQuery
- func (iq *InvoiceQuery) WithProduct(opts ...func(*ProductQuery)) *InvoiceQuery
- func (iq *InvoiceQuery) WithReservations(opts ...func(*ProductReservationQuery)) *InvoiceQuery
- func (iq *InvoiceQuery) WithSubscriptions(opts ...func(*SubscriptionsQuery)) *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) Modify(modifiers ...func(s *sql.Selector)) *InvoiceSelect
- 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) AddPrice(d decimal.Decimal) *InvoiceUpdate
- func (iu *InvoiceUpdate) AddReservationIDs(ids ...int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) AddReservations(p ...*ProductReservation) *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearExternalTransactionID() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearPaidAt() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearPaidTill() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearPaymentProfile() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearPaymentProfileID() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearReservations() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearRevokedAt() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearSubscriptionID() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearSubscriptions() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearTtpSubscriptionID() *InvoiceUpdate
- func (iu *InvoiceUpdate) Exec(ctx context.Context) error
- func (iu *InvoiceUpdate) ExecX(ctx context.Context)
- func (iu *InvoiceUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *InvoiceUpdate
- func (iu *InvoiceUpdate) Mutation() *InvoiceMutation
- func (iu *InvoiceUpdate) RemoveReservationIDs(ids ...int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) RemoveReservations(p ...*ProductReservation) *InvoiceUpdate
- func (iu *InvoiceUpdate) Save(ctx context.Context) (int, error)
- func (iu *InvoiceUpdate) SaveX(ctx context.Context) int
- func (iu *InvoiceUpdate) SetCurrency(s string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetExternalTransactionID(s string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetIsPaidAtProcessed(b bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetIsPaidTillProcessed(b bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetIsRevoked(b bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetIsRevokedProcessed(b bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetIsTrial(b bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableCurrency(s *string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableExternalTransactionID(s *string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableIsPaidAtProcessed(b *bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableIsPaidTillProcessed(b *bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableIsRevoked(b *bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableIsRevokedProcessed(b *bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableIsTrial(b *bool) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillablePaidAt(t *time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillablePaidTill(t *time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillablePaymentProfileID(i *int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillablePaymentProvider(ep *enum.PaymentProvider) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillablePrice(d *decimal.Decimal) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableRevokedAt(t *time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableStatus(es *enum.InvoiceStatus) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableSubscriptionID(i *int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableSubscriptionsID(id *int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableTtpSubscriptionID(s *string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetPaidAt(t time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetPaidTill(t time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetPaymentProfile(p *PaymentProfile) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetPaymentProfileID(i int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetPaymentProvider(ep enum.PaymentProvider) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetPrice(d decimal.Decimal) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetRevokedAt(t time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetStatus(es enum.InvoiceStatus) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetSubscriptionID(i int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetSubscriptions(s *Subscriptions) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetSubscriptionsID(id int64) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetTtpSubscriptionID(s string) *InvoiceUpdate
- func (iu *InvoiceUpdate) Where(ps ...predicate.Invoice) *InvoiceUpdate
- type InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) AddPrice(d decimal.Decimal) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) AddReservationIDs(ids ...int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) AddReservations(p ...*ProductReservation) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearExternalTransactionID() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearPaidAt() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearPaidTill() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearPaymentProfile() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearPaymentProfileID() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearReservations() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearRevokedAt() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearSubscriptionID() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearSubscriptions() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearTtpSubscriptionID() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) Exec(ctx context.Context) error
- func (iuo *InvoiceUpdateOne) ExecX(ctx context.Context)
- func (iuo *InvoiceUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) Mutation() *InvoiceMutation
- func (iuo *InvoiceUpdateOne) RemoveReservationIDs(ids ...int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) RemoveReservations(p ...*ProductReservation) *InvoiceUpdateOne
- 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) SetCurrency(s string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetExternalTransactionID(s string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetIsPaidAtProcessed(b bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetIsPaidTillProcessed(b bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetIsRevoked(b bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetIsRevokedProcessed(b bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetIsTrial(b bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableCurrency(s *string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableExternalTransactionID(s *string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableIsPaidAtProcessed(b *bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableIsPaidTillProcessed(b *bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableIsRevoked(b *bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableIsRevokedProcessed(b *bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableIsTrial(b *bool) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillablePaidAt(t *time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillablePaidTill(t *time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillablePaymentProfileID(i *int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillablePaymentProvider(ep *enum.PaymentProvider) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillablePrice(d *decimal.Decimal) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableRevokedAt(t *time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableStatus(es *enum.InvoiceStatus) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableSubscriptionID(i *int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableSubscriptionsID(id *int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableTtpSubscriptionID(s *string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetPaidAt(t time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetPaidTill(t time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetPaymentProfile(p *PaymentProfile) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetPaymentProfileID(i int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetPaymentProvider(ep enum.PaymentProvider) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetPrice(d decimal.Decimal) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetRevokedAt(t time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetStatus(es enum.InvoiceStatus) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetSubscriptionID(i int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetSubscriptions(s *Subscriptions) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetSubscriptionsID(id int64) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetTtpSubscriptionID(s string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) Where(ps ...predicate.Invoice) *InvoiceUpdateOne
- type InvoiceUpsert
- func (u *InvoiceUpsert) AddPrice(v decimal.Decimal) *InvoiceUpsert
- func (u *InvoiceUpsert) ClearExternalTransactionID() *InvoiceUpsert
- func (u *InvoiceUpsert) ClearPaidAt() *InvoiceUpsert
- func (u *InvoiceUpsert) ClearPaidTill() *InvoiceUpsert
- func (u *InvoiceUpsert) ClearPaymentProfileID() *InvoiceUpsert
- func (u *InvoiceUpsert) ClearRevokedAt() *InvoiceUpsert
- func (u *InvoiceUpsert) ClearSubscriptionID() *InvoiceUpsert
- func (u *InvoiceUpsert) ClearTtpSubscriptionID() *InvoiceUpsert
- func (u *InvoiceUpsert) SetCurrency(v string) *InvoiceUpsert
- func (u *InvoiceUpsert) SetExternalTransactionID(v string) *InvoiceUpsert
- func (u *InvoiceUpsert) SetIsPaidAtProcessed(v bool) *InvoiceUpsert
- func (u *InvoiceUpsert) SetIsPaidTillProcessed(v bool) *InvoiceUpsert
- func (u *InvoiceUpsert) SetIsRevoked(v bool) *InvoiceUpsert
- func (u *InvoiceUpsert) SetIsRevokedProcessed(v bool) *InvoiceUpsert
- func (u *InvoiceUpsert) SetIsTrial(v bool) *InvoiceUpsert
- func (u *InvoiceUpsert) SetPaidAt(v time.Time) *InvoiceUpsert
- func (u *InvoiceUpsert) SetPaidTill(v time.Time) *InvoiceUpsert
- func (u *InvoiceUpsert) SetPaymentProfileID(v int64) *InvoiceUpsert
- func (u *InvoiceUpsert) SetPaymentProvider(v enum.PaymentProvider) *InvoiceUpsert
- func (u *InvoiceUpsert) SetPrice(v decimal.Decimal) *InvoiceUpsert
- func (u *InvoiceUpsert) SetRevokedAt(v time.Time) *InvoiceUpsert
- func (u *InvoiceUpsert) SetStatus(v enum.InvoiceStatus) *InvoiceUpsert
- func (u *InvoiceUpsert) SetSubscriptionID(v int64) *InvoiceUpsert
- func (u *InvoiceUpsert) SetTtpSubscriptionID(v string) *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateCurrency() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateExternalTransactionID() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateIsPaidAtProcessed() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateIsPaidTillProcessed() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateIsRevoked() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateIsRevokedProcessed() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateIsTrial() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdatePaidAt() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdatePaidTill() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdatePaymentProfileID() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdatePaymentProvider() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdatePrice() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateRevokedAt() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateStatus() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateSubscriptionID() *InvoiceUpsert
- func (u *InvoiceUpsert) UpdateTtpSubscriptionID() *InvoiceUpsert
- type InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) AddPrice(v decimal.Decimal) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) ClearExternalTransactionID() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) ClearPaidAt() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) ClearPaidTill() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) ClearPaymentProfileID() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) ClearRevokedAt() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) ClearSubscriptionID() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) ClearTtpSubscriptionID() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) DoNothing() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) Exec(ctx context.Context) error
- func (u *InvoiceUpsertBulk) ExecX(ctx context.Context)
- func (u *InvoiceUpsertBulk) Ignore() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetCurrency(v string) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetExternalTransactionID(v string) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetIsPaidAtProcessed(v bool) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetIsPaidTillProcessed(v bool) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetIsRevoked(v bool) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetIsRevokedProcessed(v bool) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetIsTrial(v bool) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetPaidAt(v time.Time) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetPaidTill(v time.Time) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetPaymentProfileID(v int64) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetPaymentProvider(v enum.PaymentProvider) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetPrice(v decimal.Decimal) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetRevokedAt(v time.Time) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetStatus(v enum.InvoiceStatus) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetSubscriptionID(v int64) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) SetTtpSubscriptionID(v string) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) Update(set func(*InvoiceUpsert)) *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateCurrency() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateExternalTransactionID() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateIsPaidAtProcessed() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateIsPaidTillProcessed() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateIsRevoked() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateIsRevokedProcessed() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateIsTrial() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateNewValues() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdatePaidAt() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdatePaidTill() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdatePaymentProfileID() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdatePaymentProvider() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdatePrice() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateRevokedAt() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateStatus() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateSubscriptionID() *InvoiceUpsertBulk
- func (u *InvoiceUpsertBulk) UpdateTtpSubscriptionID() *InvoiceUpsertBulk
- type InvoiceUpsertOne
- func (u *InvoiceUpsertOne) AddPrice(v decimal.Decimal) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) ClearExternalTransactionID() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) ClearPaidAt() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) ClearPaidTill() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) ClearPaymentProfileID() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) ClearRevokedAt() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) ClearSubscriptionID() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) ClearTtpSubscriptionID() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) DoNothing() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) Exec(ctx context.Context) error
- func (u *InvoiceUpsertOne) ExecX(ctx context.Context)
- func (u *InvoiceUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *InvoiceUpsertOne) IDX(ctx context.Context) int64
- func (u *InvoiceUpsertOne) Ignore() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetCurrency(v string) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetExternalTransactionID(v string) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetIsPaidAtProcessed(v bool) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetIsPaidTillProcessed(v bool) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetIsRevoked(v bool) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetIsRevokedProcessed(v bool) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetIsTrial(v bool) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetPaidAt(v time.Time) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetPaidTill(v time.Time) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetPaymentProfileID(v int64) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetPaymentProvider(v enum.PaymentProvider) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetPrice(v decimal.Decimal) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetRevokedAt(v time.Time) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetStatus(v enum.InvoiceStatus) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetSubscriptionID(v int64) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) SetTtpSubscriptionID(v string) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) Update(set func(*InvoiceUpsert)) *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateCurrency() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateExternalTransactionID() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateIsPaidAtProcessed() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateIsPaidTillProcessed() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateIsRevoked() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateIsRevokedProcessed() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateIsTrial() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateNewValues() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdatePaidAt() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdatePaidTill() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdatePaymentProfileID() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdatePaymentProvider() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdatePrice() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateRevokedAt() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateStatus() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateSubscriptionID() *InvoiceUpsertOne
- func (u *InvoiceUpsertOne) UpdateTtpSubscriptionID() *InvoiceUpsertOne
- type Invoices
- type Item
- type ItemClient
- func (c *ItemClient) Create() *ItemCreate
- func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
- func (c *ItemClient) Delete() *ItemDelete
- func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
- func (c *ItemClient) DeleteOneID(id int64) *ItemDeleteOne
- func (c *ItemClient) Get(ctx context.Context, id int64) (*Item, error)
- func (c *ItemClient) GetX(ctx context.Context, id int64) *Item
- func (c *ItemClient) Hooks() []Hook
- func (c *ItemClient) Intercept(interceptors ...Interceptor)
- func (c *ItemClient) Interceptors() []Interceptor
- func (c *ItemClient) MapCreateBulk(slice any, setFunc func(*ItemCreate, int)) *ItemCreateBulk
- func (c *ItemClient) Query() *ItemQuery
- func (c *ItemClient) QueryBundles(i *Item) *BundleQuery
- func (c *ItemClient) Update() *ItemUpdate
- func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
- func (c *ItemClient) UpdateOneID(id int64) *ItemUpdateOne
- func (c *ItemClient) Use(hooks ...Hook)
- type ItemCreate
- func (ic *ItemCreate) AddBundleIDs(ids ...int64) *ItemCreate
- func (ic *ItemCreate) AddBundles(b ...*Bundle) *ItemCreate
- func (ic *ItemCreate) Exec(ctx context.Context) error
- func (ic *ItemCreate) ExecX(ctx context.Context)
- func (ic *ItemCreate) Mutation() *ItemMutation
- func (ic *ItemCreate) OnConflict(opts ...sql.ConflictOption) *ItemUpsertOne
- func (ic *ItemCreate) OnConflictColumns(columns ...string) *ItemUpsertOne
- func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
- func (ic *ItemCreate) SaveX(ctx context.Context) *Item
- func (ic *ItemCreate) SetCreatedAt(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetDeletedAt(t time.Time) *ItemCreate
- func (ic *ItemCreate) SetDescription(s string) *ItemCreate
- func (ic *ItemCreate) SetID(i int64) *ItemCreate
- func (ic *ItemCreate) SetName(s string) *ItemCreate
- func (ic *ItemCreate) SetNillableCreatedAt(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableDeletedAt(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetNillableTopicName(s *string) *ItemCreate
- func (ic *ItemCreate) SetNillableUpdatedAt(t *time.Time) *ItemCreate
- func (ic *ItemCreate) SetTopicName(s string) *ItemCreate
- func (ic *ItemCreate) SetUpdatedAt(t time.Time) *ItemCreate
- type ItemCreateBulk
- func (icb *ItemCreateBulk) Exec(ctx context.Context) error
- func (icb *ItemCreateBulk) ExecX(ctx context.Context)
- func (icb *ItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *ItemUpsertBulk
- func (icb *ItemCreateBulk) OnConflictColumns(columns ...string) *ItemUpsertBulk
- func (icb *ItemCreateBulk) Save(ctx context.Context) ([]*Item, error)
- func (icb *ItemCreateBulk) SaveX(ctx context.Context) []*Item
- type ItemDelete
- type ItemDeleteOne
- type ItemEdges
- type ItemFilter
- func (f *ItemFilter) Where(p entql.P)
- func (f *ItemFilter) WhereCreatedAt(p entql.TimeP)
- func (f *ItemFilter) WhereDeletedAt(p entql.TimeP)
- func (f *ItemFilter) WhereDescription(p entql.StringP)
- func (f *ItemFilter) WhereHasBundles()
- func (f *ItemFilter) WhereHasBundlesWith(preds ...predicate.Bundle)
- func (f *ItemFilter) WhereID(p entql.Int64P)
- func (f *ItemFilter) WhereName(p entql.StringP)
- func (f *ItemFilter) WhereTopicName(p entql.StringP)
- func (f *ItemFilter) WhereUpdatedAt(p entql.TimeP)
- type ItemGroupBy
- func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
- func (s *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemGroupBy) BoolX(ctx context.Context) bool
- func (s *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemGroupBy) Float64X(ctx context.Context) float64
- func (s *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ItemGroupBy) IntX(ctx context.Context) int
- func (s *ItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ItemGroupBy) IntsX(ctx context.Context) []int
- func (igb *ItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *ItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *ItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ItemGroupBy) StringX(ctx context.Context) string
- func (s *ItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ItemGroupBy) StringsX(ctx context.Context) []string
- type ItemMutation
- func (m *ItemMutation) AddBundleIDs(ids ...int64)
- func (m *ItemMutation) AddField(name string, value ent.Value) error
- func (m *ItemMutation) AddedEdges() []string
- func (m *ItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ItemMutation) AddedFields() []string
- func (m *ItemMutation) AddedIDs(name string) []ent.Value
- func (m *ItemMutation) BundlesCleared() bool
- func (m *ItemMutation) BundlesIDs() (ids []int64)
- func (m *ItemMutation) ClearBundles()
- func (m *ItemMutation) ClearDeletedAt()
- func (m *ItemMutation) ClearEdge(name string) error
- func (m *ItemMutation) ClearField(name string) error
- func (m *ItemMutation) ClearTopicName()
- func (m *ItemMutation) ClearedEdges() []string
- func (m *ItemMutation) ClearedFields() []string
- func (m ItemMutation) Client() *Client
- func (m *ItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ItemMutation) DeletedAt() (r time.Time, exists bool)
- func (m *ItemMutation) DeletedAtCleared() bool
- func (m *ItemMutation) Description() (r string, exists bool)
- func (m *ItemMutation) EdgeCleared(name string) bool
- func (m *ItemMutation) Field(name string) (ent.Value, bool)
- func (m *ItemMutation) FieldCleared(name string) bool
- func (m *ItemMutation) Fields() []string
- func (m *ItemMutation) Filter() *ItemFilter
- func (m *ItemMutation) ID() (id int64, exists bool)
- func (m *ItemMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *ItemMutation) Name() (r string, exists bool)
- func (m *ItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ItemMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ItemMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ItemMutation) OldTopicName(ctx context.Context) (v *string, err error)
- func (m *ItemMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ItemMutation) Op() Op
- func (m *ItemMutation) RemoveBundleIDs(ids ...int64)
- func (m *ItemMutation) RemovedBundlesIDs() (ids []int64)
- func (m *ItemMutation) RemovedEdges() []string
- func (m *ItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ItemMutation) ResetBundles()
- func (m *ItemMutation) ResetCreatedAt()
- func (m *ItemMutation) ResetDeletedAt()
- func (m *ItemMutation) ResetDescription()
- func (m *ItemMutation) ResetEdge(name string) error
- func (m *ItemMutation) ResetField(name string) error
- func (m *ItemMutation) ResetName()
- func (m *ItemMutation) ResetTopicName()
- func (m *ItemMutation) ResetUpdatedAt()
- func (m *ItemMutation) SetCreatedAt(t time.Time)
- func (m *ItemMutation) SetDeletedAt(t time.Time)
- func (m *ItemMutation) SetDescription(s string)
- func (m *ItemMutation) SetField(name string, value ent.Value) error
- func (m *ItemMutation) SetID(id int64)
- func (m *ItemMutation) SetName(s string)
- func (m *ItemMutation) SetOp(op Op)
- func (m *ItemMutation) SetTopicName(s string)
- func (m *ItemMutation) SetUpdatedAt(t time.Time)
- func (m *ItemMutation) TopicName() (r string, exists bool)
- func (m *ItemMutation) TopicNameCleared() bool
- func (m ItemMutation) Tx() (*Tx, error)
- func (m *ItemMutation) Type() string
- func (m *ItemMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ItemMutation) Where(ps ...predicate.Item)
- func (m *ItemMutation) WhereP(ps ...func(*sql.Selector))
- type ItemQuery
- func (iq *ItemQuery) Aggregate(fns ...AggregateFunc) *ItemSelect
- func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error)
- func (iq *ItemQuery) AllX(ctx context.Context) []*Item
- func (iq *ItemQuery) Clone() *ItemQuery
- func (iq *ItemQuery) Count(ctx context.Context) (int, error)
- func (iq *ItemQuery) CountX(ctx context.Context) int
- func (iq *ItemQuery) Exist(ctx context.Context) (bool, error)
- func (iq *ItemQuery) ExistX(ctx context.Context) bool
- func (iq *ItemQuery) Filter() *ItemFilter
- func (iq *ItemQuery) First(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) FirstID(ctx context.Context) (id int64, err error)
- func (iq *ItemQuery) FirstIDX(ctx context.Context) int64
- func (iq *ItemQuery) FirstX(ctx context.Context) *Item
- func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
- func (iq *ItemQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (iq *ItemQuery) IDsX(ctx context.Context) []int64
- func (iq *ItemQuery) Limit(limit int) *ItemQuery
- func (iq *ItemQuery) Modify(modifiers ...func(s *sql.Selector)) *ItemSelect
- func (iq *ItemQuery) Offset(offset int) *ItemQuery
- func (iq *ItemQuery) Only(ctx context.Context) (*Item, error)
- func (iq *ItemQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (iq *ItemQuery) OnlyIDX(ctx context.Context) int64
- func (iq *ItemQuery) OnlyX(ctx context.Context) *Item
- func (iq *ItemQuery) Order(o ...item.OrderOption) *ItemQuery
- func (iq *ItemQuery) QueryBundles() *BundleQuery
- func (iq *ItemQuery) Select(fields ...string) *ItemSelect
- func (iq *ItemQuery) Unique(unique bool) *ItemQuery
- func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery
- func (iq *ItemQuery) WithBundles(opts ...func(*BundleQuery)) *ItemQuery
- type ItemSelect
- func (is *ItemSelect) Aggregate(fns ...AggregateFunc) *ItemSelect
- func (s *ItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ItemSelect) BoolX(ctx context.Context) bool
- func (s *ItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ItemSelect) BoolsX(ctx context.Context) []bool
- func (s *ItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ItemSelect) Float64X(ctx context.Context) float64
- func (s *ItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ItemSelect) Float64sX(ctx context.Context) []float64
- func (s *ItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ItemSelect) IntX(ctx context.Context) int
- func (s *ItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ItemSelect) IntsX(ctx context.Context) []int
- func (is *ItemSelect) Modify(modifiers ...func(s *sql.Selector)) *ItemSelect
- func (is *ItemSelect) Scan(ctx context.Context, v any) error
- func (s *ItemSelect) ScanX(ctx context.Context, v any)
- func (s *ItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *ItemSelect) StringX(ctx context.Context) string
- func (s *ItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ItemSelect) StringsX(ctx context.Context) []string
- type ItemUpdate
- func (iu *ItemUpdate) AddBundleIDs(ids ...int64) *ItemUpdate
- func (iu *ItemUpdate) AddBundles(b ...*Bundle) *ItemUpdate
- func (iu *ItemUpdate) ClearBundles() *ItemUpdate
- func (iu *ItemUpdate) ClearDeletedAt() *ItemUpdate
- func (iu *ItemUpdate) ClearTopicName() *ItemUpdate
- func (iu *ItemUpdate) Exec(ctx context.Context) error
- func (iu *ItemUpdate) ExecX(ctx context.Context)
- func (iu *ItemUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ItemUpdate
- func (iu *ItemUpdate) Mutation() *ItemMutation
- func (iu *ItemUpdate) RemoveBundleIDs(ids ...int64) *ItemUpdate
- func (iu *ItemUpdate) RemoveBundles(b ...*Bundle) *ItemUpdate
- func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
- func (iu *ItemUpdate) SaveX(ctx context.Context) int
- func (iu *ItemUpdate) SetDeletedAt(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetDescription(s string) *ItemUpdate
- func (iu *ItemUpdate) SetName(s string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableDeletedAt(t *time.Time) *ItemUpdate
- func (iu *ItemUpdate) SetNillableDescription(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableName(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetNillableTopicName(s *string) *ItemUpdate
- func (iu *ItemUpdate) SetTopicName(s string) *ItemUpdate
- func (iu *ItemUpdate) SetUpdatedAt(t time.Time) *ItemUpdate
- func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
- type ItemUpdateOne
- func (iuo *ItemUpdateOne) AddBundleIDs(ids ...int64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) AddBundles(b ...*Bundle) *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearBundles() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearDeletedAt() *ItemUpdateOne
- func (iuo *ItemUpdateOne) ClearTopicName() *ItemUpdateOne
- func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
- func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
- func (iuo *ItemUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Mutation() *ItemMutation
- func (iuo *ItemUpdateOne) RemoveBundleIDs(ids ...int64) *ItemUpdateOne
- func (iuo *ItemUpdateOne) RemoveBundles(b ...*Bundle) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
- func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
- func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetDeletedAt(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetDescription(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetName(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableDeletedAt(t *time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableDescription(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableName(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetNillableTopicName(s *string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetTopicName(s string) *ItemUpdateOne
- func (iuo *ItemUpdateOne) SetUpdatedAt(t time.Time) *ItemUpdateOne
- func (iuo *ItemUpdateOne) Where(ps ...predicate.Item) *ItemUpdateOne
- type ItemUpsert
- func (u *ItemUpsert) ClearDeletedAt() *ItemUpsert
- func (u *ItemUpsert) ClearTopicName() *ItemUpsert
- func (u *ItemUpsert) SetDeletedAt(v time.Time) *ItemUpsert
- func (u *ItemUpsert) SetDescription(v string) *ItemUpsert
- func (u *ItemUpsert) SetName(v string) *ItemUpsert
- func (u *ItemUpsert) SetTopicName(v string) *ItemUpsert
- func (u *ItemUpsert) SetUpdatedAt(v time.Time) *ItemUpsert
- func (u *ItemUpsert) UpdateDeletedAt() *ItemUpsert
- func (u *ItemUpsert) UpdateDescription() *ItemUpsert
- func (u *ItemUpsert) UpdateName() *ItemUpsert
- func (u *ItemUpsert) UpdateTopicName() *ItemUpsert
- func (u *ItemUpsert) UpdateUpdatedAt() *ItemUpsert
- type ItemUpsertBulk
- func (u *ItemUpsertBulk) ClearDeletedAt() *ItemUpsertBulk
- func (u *ItemUpsertBulk) ClearTopicName() *ItemUpsertBulk
- func (u *ItemUpsertBulk) DoNothing() *ItemUpsertBulk
- func (u *ItemUpsertBulk) Exec(ctx context.Context) error
- func (u *ItemUpsertBulk) ExecX(ctx context.Context)
- func (u *ItemUpsertBulk) Ignore() *ItemUpsertBulk
- func (u *ItemUpsertBulk) SetDeletedAt(v time.Time) *ItemUpsertBulk
- func (u *ItemUpsertBulk) SetDescription(v string) *ItemUpsertBulk
- func (u *ItemUpsertBulk) SetName(v string) *ItemUpsertBulk
- func (u *ItemUpsertBulk) SetTopicName(v string) *ItemUpsertBulk
- func (u *ItemUpsertBulk) SetUpdatedAt(v time.Time) *ItemUpsertBulk
- func (u *ItemUpsertBulk) Update(set func(*ItemUpsert)) *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateDeletedAt() *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateDescription() *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateName() *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateNewValues() *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateTopicName() *ItemUpsertBulk
- func (u *ItemUpsertBulk) UpdateUpdatedAt() *ItemUpsertBulk
- type ItemUpsertOne
- func (u *ItemUpsertOne) ClearDeletedAt() *ItemUpsertOne
- func (u *ItemUpsertOne) ClearTopicName() *ItemUpsertOne
- func (u *ItemUpsertOne) DoNothing() *ItemUpsertOne
- func (u *ItemUpsertOne) Exec(ctx context.Context) error
- func (u *ItemUpsertOne) ExecX(ctx context.Context)
- func (u *ItemUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *ItemUpsertOne) IDX(ctx context.Context) int64
- func (u *ItemUpsertOne) Ignore() *ItemUpsertOne
- func (u *ItemUpsertOne) SetDeletedAt(v time.Time) *ItemUpsertOne
- func (u *ItemUpsertOne) SetDescription(v string) *ItemUpsertOne
- func (u *ItemUpsertOne) SetName(v string) *ItemUpsertOne
- func (u *ItemUpsertOne) SetTopicName(v string) *ItemUpsertOne
- func (u *ItemUpsertOne) SetUpdatedAt(v time.Time) *ItemUpsertOne
- func (u *ItemUpsertOne) Update(set func(*ItemUpsert)) *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateDeletedAt() *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateDescription() *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateName() *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateNewValues() *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateTopicName() *ItemUpsertOne
- func (u *ItemUpsertOne) UpdateUpdatedAt() *ItemUpsertOne
- type Items
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type PaymentProfile
- type PaymentProfileClient
- func (c *PaymentProfileClient) Create() *PaymentProfileCreate
- func (c *PaymentProfileClient) CreateBulk(builders ...*PaymentProfileCreate) *PaymentProfileCreateBulk
- func (c *PaymentProfileClient) Delete() *PaymentProfileDelete
- func (c *PaymentProfileClient) DeleteOne(pp *PaymentProfile) *PaymentProfileDeleteOne
- func (c *PaymentProfileClient) DeleteOneID(id int64) *PaymentProfileDeleteOne
- func (c *PaymentProfileClient) Get(ctx context.Context, id int64) (*PaymentProfile, error)
- func (c *PaymentProfileClient) GetX(ctx context.Context, id int64) *PaymentProfile
- func (c *PaymentProfileClient) Hooks() []Hook
- func (c *PaymentProfileClient) Intercept(interceptors ...Interceptor)
- func (c *PaymentProfileClient) Interceptors() []Interceptor
- func (c *PaymentProfileClient) MapCreateBulk(slice any, setFunc func(*PaymentProfileCreate, int)) *PaymentProfileCreateBulk
- func (c *PaymentProfileClient) Query() *PaymentProfileQuery
- func (c *PaymentProfileClient) QueryInvoices(pp *PaymentProfile) *InvoiceQuery
- func (c *PaymentProfileClient) Update() *PaymentProfileUpdate
- func (c *PaymentProfileClient) UpdateOne(pp *PaymentProfile) *PaymentProfileUpdateOne
- func (c *PaymentProfileClient) UpdateOneID(id int64) *PaymentProfileUpdateOne
- func (c *PaymentProfileClient) Use(hooks ...Hook)
- type PaymentProfileCreate
- func (ppc *PaymentProfileCreate) AddInvoiceIDs(ids ...int64) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) AddInvoices(i ...*Invoice) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) Exec(ctx context.Context) error
- func (ppc *PaymentProfileCreate) ExecX(ctx context.Context)
- func (ppc *PaymentProfileCreate) Mutation() *PaymentProfileMutation
- func (ppc *PaymentProfileCreate) OnConflict(opts ...sql.ConflictOption) *PaymentProfileUpsertOne
- func (ppc *PaymentProfileCreate) OnConflictColumns(columns ...string) *PaymentProfileUpsertOne
- func (ppc *PaymentProfileCreate) Save(ctx context.Context) (*PaymentProfile, error)
- func (ppc *PaymentProfileCreate) SaveX(ctx context.Context) *PaymentProfile
- func (ppc *PaymentProfileCreate) SetCreatedAt(t time.Time) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetDeletedAt(t time.Time) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetEmail(s string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetHolder(s string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetID(i int64) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetNillableCreatedAt(t *time.Time) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetNillableDeletedAt(t *time.Time) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetNillableEmail(s *string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetNillablePhone(s *string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetNillableRecurrentToken(s *string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetNillableUpdatedAt(t *time.Time) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetNillableUserToken(s *string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetPanMasked(s string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetPhone(s string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetRecurrentToken(s string) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetUpdatedAt(t time.Time) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetUserID(i int64) *PaymentProfileCreate
- func (ppc *PaymentProfileCreate) SetUserToken(s string) *PaymentProfileCreate
- type PaymentProfileCreateBulk
- func (ppcb *PaymentProfileCreateBulk) Exec(ctx context.Context) error
- func (ppcb *PaymentProfileCreateBulk) ExecX(ctx context.Context)
- func (ppcb *PaymentProfileCreateBulk) OnConflict(opts ...sql.ConflictOption) *PaymentProfileUpsertBulk
- func (ppcb *PaymentProfileCreateBulk) OnConflictColumns(columns ...string) *PaymentProfileUpsertBulk
- func (ppcb *PaymentProfileCreateBulk) Save(ctx context.Context) ([]*PaymentProfile, error)
- func (ppcb *PaymentProfileCreateBulk) SaveX(ctx context.Context) []*PaymentProfile
- type PaymentProfileDelete
- type PaymentProfileDeleteOne
- type PaymentProfileEdges
- type PaymentProfileFilter
- func (f *PaymentProfileFilter) Where(p entql.P)
- func (f *PaymentProfileFilter) WhereCreatedAt(p entql.TimeP)
- func (f *PaymentProfileFilter) WhereDeletedAt(p entql.TimeP)
- func (f *PaymentProfileFilter) WhereEmail(p entql.StringP)
- func (f *PaymentProfileFilter) WhereHasInvoices()
- func (f *PaymentProfileFilter) WhereHasInvoicesWith(preds ...predicate.Invoice)
- func (f *PaymentProfileFilter) WhereHolder(p entql.StringP)
- func (f *PaymentProfileFilter) WhereID(p entql.Int64P)
- func (f *PaymentProfileFilter) WherePanMasked(p entql.StringP)
- func (f *PaymentProfileFilter) WherePhone(p entql.StringP)
- func (f *PaymentProfileFilter) WhereRecurrentToken(p entql.StringP)
- func (f *PaymentProfileFilter) WhereUpdatedAt(p entql.TimeP)
- func (f *PaymentProfileFilter) WhereUserID(p entql.Int64P)
- func (f *PaymentProfileFilter) WhereUserToken(p entql.StringP)
- type PaymentProfileGroupBy
- func (ppgb *PaymentProfileGroupBy) Aggregate(fns ...AggregateFunc) *PaymentProfileGroupBy
- func (s *PaymentProfileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentProfileGroupBy) BoolX(ctx context.Context) bool
- func (s *PaymentProfileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentProfileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PaymentProfileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentProfileGroupBy) Float64X(ctx context.Context) float64
- func (s *PaymentProfileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentProfileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PaymentProfileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentProfileGroupBy) IntX(ctx context.Context) int
- func (s *PaymentProfileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentProfileGroupBy) IntsX(ctx context.Context) []int
- func (ppgb *PaymentProfileGroupBy) Scan(ctx context.Context, v any) error
- func (s *PaymentProfileGroupBy) ScanX(ctx context.Context, v any)
- func (s *PaymentProfileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PaymentProfileGroupBy) StringX(ctx context.Context) string
- func (s *PaymentProfileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentProfileGroupBy) StringsX(ctx context.Context) []string
- type PaymentProfileMutation
- func (m *PaymentProfileMutation) AddField(name string, value ent.Value) error
- func (m *PaymentProfileMutation) AddInvoiceIDs(ids ...int64)
- func (m *PaymentProfileMutation) AddUserID(i int64)
- func (m *PaymentProfileMutation) AddedEdges() []string
- func (m *PaymentProfileMutation) AddedField(name string) (ent.Value, bool)
- func (m *PaymentProfileMutation) AddedFields() []string
- func (m *PaymentProfileMutation) AddedIDs(name string) []ent.Value
- func (m *PaymentProfileMutation) AddedUserID() (r int64, exists bool)
- func (m *PaymentProfileMutation) ClearDeletedAt()
- func (m *PaymentProfileMutation) ClearEdge(name string) error
- func (m *PaymentProfileMutation) ClearEmail()
- func (m *PaymentProfileMutation) ClearField(name string) error
- func (m *PaymentProfileMutation) ClearInvoices()
- func (m *PaymentProfileMutation) ClearPhone()
- func (m *PaymentProfileMutation) ClearRecurrentToken()
- func (m *PaymentProfileMutation) ClearUserToken()
- func (m *PaymentProfileMutation) ClearedEdges() []string
- func (m *PaymentProfileMutation) ClearedFields() []string
- func (m PaymentProfileMutation) Client() *Client
- func (m *PaymentProfileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PaymentProfileMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PaymentProfileMutation) DeletedAtCleared() bool
- func (m *PaymentProfileMutation) EdgeCleared(name string) bool
- func (m *PaymentProfileMutation) Email() (r string, exists bool)
- func (m *PaymentProfileMutation) EmailCleared() bool
- func (m *PaymentProfileMutation) Field(name string) (ent.Value, bool)
- func (m *PaymentProfileMutation) FieldCleared(name string) bool
- func (m *PaymentProfileMutation) Fields() []string
- func (m *PaymentProfileMutation) Filter() *PaymentProfileFilter
- func (m *PaymentProfileMutation) Holder() (r string, exists bool)
- func (m *PaymentProfileMutation) ID() (id int64, exists bool)
- func (m *PaymentProfileMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *PaymentProfileMutation) InvoicesCleared() bool
- func (m *PaymentProfileMutation) InvoicesIDs() (ids []int64)
- func (m *PaymentProfileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentProfileMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PaymentProfileMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *PaymentProfileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PaymentProfileMutation) OldHolder(ctx context.Context) (v string, err error)
- func (m *PaymentProfileMutation) OldPanMasked(ctx context.Context) (v string, err error)
- func (m *PaymentProfileMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *PaymentProfileMutation) OldRecurrentToken(ctx context.Context) (v *string, err error)
- func (m *PaymentProfileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentProfileMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *PaymentProfileMutation) OldUserToken(ctx context.Context) (v string, err error)
- func (m *PaymentProfileMutation) Op() Op
- func (m *PaymentProfileMutation) PanMasked() (r string, exists bool)
- func (m *PaymentProfileMutation) Phone() (r string, exists bool)
- func (m *PaymentProfileMutation) PhoneCleared() bool
- func (m *PaymentProfileMutation) RecurrentToken() (r string, exists bool)
- func (m *PaymentProfileMutation) RecurrentTokenCleared() bool
- func (m *PaymentProfileMutation) RemoveInvoiceIDs(ids ...int64)
- func (m *PaymentProfileMutation) RemovedEdges() []string
- func (m *PaymentProfileMutation) RemovedIDs(name string) []ent.Value
- func (m *PaymentProfileMutation) RemovedInvoicesIDs() (ids []int64)
- func (m *PaymentProfileMutation) ResetCreatedAt()
- func (m *PaymentProfileMutation) ResetDeletedAt()
- func (m *PaymentProfileMutation) ResetEdge(name string) error
- func (m *PaymentProfileMutation) ResetEmail()
- func (m *PaymentProfileMutation) ResetField(name string) error
- func (m *PaymentProfileMutation) ResetHolder()
- func (m *PaymentProfileMutation) ResetInvoices()
- func (m *PaymentProfileMutation) ResetPanMasked()
- func (m *PaymentProfileMutation) ResetPhone()
- func (m *PaymentProfileMutation) ResetRecurrentToken()
- func (m *PaymentProfileMutation) ResetUpdatedAt()
- func (m *PaymentProfileMutation) ResetUserID()
- func (m *PaymentProfileMutation) ResetUserToken()
- func (m *PaymentProfileMutation) SetCreatedAt(t time.Time)
- func (m *PaymentProfileMutation) SetDeletedAt(t time.Time)
- func (m *PaymentProfileMutation) SetEmail(s string)
- func (m *PaymentProfileMutation) SetField(name string, value ent.Value) error
- func (m *PaymentProfileMutation) SetHolder(s string)
- func (m *PaymentProfileMutation) SetID(id int64)
- func (m *PaymentProfileMutation) SetOp(op Op)
- func (m *PaymentProfileMutation) SetPanMasked(s string)
- func (m *PaymentProfileMutation) SetPhone(s string)
- func (m *PaymentProfileMutation) SetRecurrentToken(s string)
- func (m *PaymentProfileMutation) SetUpdatedAt(t time.Time)
- func (m *PaymentProfileMutation) SetUserID(i int64)
- func (m *PaymentProfileMutation) SetUserToken(s string)
- func (m PaymentProfileMutation) Tx() (*Tx, error)
- func (m *PaymentProfileMutation) Type() string
- func (m *PaymentProfileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PaymentProfileMutation) UserID() (r int64, exists bool)
- func (m *PaymentProfileMutation) UserToken() (r string, exists bool)
- func (m *PaymentProfileMutation) UserTokenCleared() bool
- func (m *PaymentProfileMutation) Where(ps ...predicate.PaymentProfile)
- func (m *PaymentProfileMutation) WhereP(ps ...func(*sql.Selector))
- type PaymentProfileQuery
- func (ppq *PaymentProfileQuery) Aggregate(fns ...AggregateFunc) *PaymentProfileSelect
- func (ppq *PaymentProfileQuery) All(ctx context.Context) ([]*PaymentProfile, error)
- func (ppq *PaymentProfileQuery) AllX(ctx context.Context) []*PaymentProfile
- func (ppq *PaymentProfileQuery) Clone() *PaymentProfileQuery
- func (ppq *PaymentProfileQuery) Count(ctx context.Context) (int, error)
- func (ppq *PaymentProfileQuery) CountX(ctx context.Context) int
- func (ppq *PaymentProfileQuery) Exist(ctx context.Context) (bool, error)
- func (ppq *PaymentProfileQuery) ExistX(ctx context.Context) bool
- func (ppq *PaymentProfileQuery) Filter() *PaymentProfileFilter
- func (ppq *PaymentProfileQuery) First(ctx context.Context) (*PaymentProfile, error)
- func (ppq *PaymentProfileQuery) FirstID(ctx context.Context) (id int64, err error)
- func (ppq *PaymentProfileQuery) FirstIDX(ctx context.Context) int64
- func (ppq *PaymentProfileQuery) FirstX(ctx context.Context) *PaymentProfile
- func (ppq *PaymentProfileQuery) GroupBy(field string, fields ...string) *PaymentProfileGroupBy
- func (ppq *PaymentProfileQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (ppq *PaymentProfileQuery) IDsX(ctx context.Context) []int64
- func (ppq *PaymentProfileQuery) Limit(limit int) *PaymentProfileQuery
- func (ppq *PaymentProfileQuery) Modify(modifiers ...func(s *sql.Selector)) *PaymentProfileSelect
- func (ppq *PaymentProfileQuery) Offset(offset int) *PaymentProfileQuery
- func (ppq *PaymentProfileQuery) Only(ctx context.Context) (*PaymentProfile, error)
- func (ppq *PaymentProfileQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (ppq *PaymentProfileQuery) OnlyIDX(ctx context.Context) int64
- func (ppq *PaymentProfileQuery) OnlyX(ctx context.Context) *PaymentProfile
- func (ppq *PaymentProfileQuery) Order(o ...paymentprofile.OrderOption) *PaymentProfileQuery
- func (ppq *PaymentProfileQuery) QueryInvoices() *InvoiceQuery
- func (ppq *PaymentProfileQuery) Select(fields ...string) *PaymentProfileSelect
- func (ppq *PaymentProfileQuery) Unique(unique bool) *PaymentProfileQuery
- func (ppq *PaymentProfileQuery) Where(ps ...predicate.PaymentProfile) *PaymentProfileQuery
- func (ppq *PaymentProfileQuery) WithInvoices(opts ...func(*InvoiceQuery)) *PaymentProfileQuery
- type PaymentProfileSelect
- func (pps *PaymentProfileSelect) Aggregate(fns ...AggregateFunc) *PaymentProfileSelect
- func (s *PaymentProfileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentProfileSelect) BoolX(ctx context.Context) bool
- func (s *PaymentProfileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentProfileSelect) BoolsX(ctx context.Context) []bool
- func (s *PaymentProfileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentProfileSelect) Float64X(ctx context.Context) float64
- func (s *PaymentProfileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentProfileSelect) Float64sX(ctx context.Context) []float64
- func (s *PaymentProfileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentProfileSelect) IntX(ctx context.Context) int
- func (s *PaymentProfileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentProfileSelect) IntsX(ctx context.Context) []int
- func (pps *PaymentProfileSelect) Modify(modifiers ...func(s *sql.Selector)) *PaymentProfileSelect
- func (pps *PaymentProfileSelect) Scan(ctx context.Context, v any) error
- func (s *PaymentProfileSelect) ScanX(ctx context.Context, v any)
- func (s *PaymentProfileSelect) String(ctx context.Context) (_ string, err error)
- func (s *PaymentProfileSelect) StringX(ctx context.Context) string
- func (s *PaymentProfileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentProfileSelect) StringsX(ctx context.Context) []string
- type PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) AddInvoiceIDs(ids ...int64) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) AddInvoices(i ...*Invoice) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) ClearDeletedAt() *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) ClearEmail() *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) ClearInvoices() *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) ClearPhone() *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) ClearRecurrentToken() *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) ClearUserToken() *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) Exec(ctx context.Context) error
- func (ppu *PaymentProfileUpdate) ExecX(ctx context.Context)
- func (ppu *PaymentProfileUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) Mutation() *PaymentProfileMutation
- func (ppu *PaymentProfileUpdate) RemoveInvoiceIDs(ids ...int64) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) RemoveInvoices(i ...*Invoice) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) Save(ctx context.Context) (int, error)
- func (ppu *PaymentProfileUpdate) SaveX(ctx context.Context) int
- func (ppu *PaymentProfileUpdate) SetDeletedAt(t time.Time) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetEmail(s string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetNillableDeletedAt(t *time.Time) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetNillableEmail(s *string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetNillablePhone(s *string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetNillableRecurrentToken(s *string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetNillableUserToken(s *string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetPhone(s string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetRecurrentToken(s string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetUpdatedAt(t time.Time) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) SetUserToken(s string) *PaymentProfileUpdate
- func (ppu *PaymentProfileUpdate) Where(ps ...predicate.PaymentProfile) *PaymentProfileUpdate
- type PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) AddInvoiceIDs(ids ...int64) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) AddInvoices(i ...*Invoice) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) ClearDeletedAt() *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) ClearEmail() *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) ClearInvoices() *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) ClearPhone() *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) ClearRecurrentToken() *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) ClearUserToken() *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) Exec(ctx context.Context) error
- func (ppuo *PaymentProfileUpdateOne) ExecX(ctx context.Context)
- func (ppuo *PaymentProfileUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) Mutation() *PaymentProfileMutation
- func (ppuo *PaymentProfileUpdateOne) RemoveInvoiceIDs(ids ...int64) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) RemoveInvoices(i ...*Invoice) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) Save(ctx context.Context) (*PaymentProfile, error)
- func (ppuo *PaymentProfileUpdateOne) SaveX(ctx context.Context) *PaymentProfile
- func (ppuo *PaymentProfileUpdateOne) Select(field string, fields ...string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetDeletedAt(t time.Time) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetEmail(s string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetNillableDeletedAt(t *time.Time) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetNillableEmail(s *string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetNillablePhone(s *string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetNillableRecurrentToken(s *string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetNillableUserToken(s *string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetPhone(s string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetRecurrentToken(s string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetUpdatedAt(t time.Time) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) SetUserToken(s string) *PaymentProfileUpdateOne
- func (ppuo *PaymentProfileUpdateOne) Where(ps ...predicate.PaymentProfile) *PaymentProfileUpdateOne
- type PaymentProfileUpsert
- func (u *PaymentProfileUpsert) ClearDeletedAt() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) ClearEmail() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) ClearPhone() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) ClearRecurrentToken() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) ClearUserToken() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) SetDeletedAt(v time.Time) *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) SetEmail(v string) *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) SetPhone(v string) *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) SetRecurrentToken(v string) *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) SetUpdatedAt(v time.Time) *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) SetUserToken(v string) *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) UpdateDeletedAt() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) UpdateEmail() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) UpdatePhone() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) UpdateRecurrentToken() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) UpdateUpdatedAt() *PaymentProfileUpsert
- func (u *PaymentProfileUpsert) UpdateUserToken() *PaymentProfileUpsert
- type PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) ClearDeletedAt() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) ClearEmail() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) ClearPhone() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) ClearRecurrentToken() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) ClearUserToken() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) DoNothing() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) Exec(ctx context.Context) error
- func (u *PaymentProfileUpsertBulk) ExecX(ctx context.Context)
- func (u *PaymentProfileUpsertBulk) Ignore() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) SetDeletedAt(v time.Time) *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) SetEmail(v string) *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) SetPhone(v string) *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) SetRecurrentToken(v string) *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) SetUpdatedAt(v time.Time) *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) SetUserToken(v string) *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) Update(set func(*PaymentProfileUpsert)) *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) UpdateDeletedAt() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) UpdateEmail() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) UpdateNewValues() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) UpdatePhone() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) UpdateRecurrentToken() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) UpdateUpdatedAt() *PaymentProfileUpsertBulk
- func (u *PaymentProfileUpsertBulk) UpdateUserToken() *PaymentProfileUpsertBulk
- type PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) ClearDeletedAt() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) ClearEmail() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) ClearPhone() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) ClearRecurrentToken() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) ClearUserToken() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) DoNothing() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) Exec(ctx context.Context) error
- func (u *PaymentProfileUpsertOne) ExecX(ctx context.Context)
- func (u *PaymentProfileUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *PaymentProfileUpsertOne) IDX(ctx context.Context) int64
- func (u *PaymentProfileUpsertOne) Ignore() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) SetDeletedAt(v time.Time) *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) SetEmail(v string) *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) SetPhone(v string) *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) SetRecurrentToken(v string) *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) SetUpdatedAt(v time.Time) *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) SetUserToken(v string) *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) Update(set func(*PaymentProfileUpsert)) *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) UpdateDeletedAt() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) UpdateEmail() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) UpdateNewValues() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) UpdatePhone() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) UpdateRecurrentToken() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) UpdateUpdatedAt() *PaymentProfileUpsertOne
- func (u *PaymentProfileUpsertOne) UpdateUserToken() *PaymentProfileUpsertOne
- type PaymentProfiles
- type Policy
- type Product
- func (pr *Product) QueryBundles() *BundleQuery
- func (pr *Product) QueryInvoices() *InvoiceQuery
- func (pr *Product) QueryReservations() *ProductReservationQuery
- func (pr *Product) QuerySubscriptions() *SubscriptionsQuery
- func (pr *Product) String() string
- func (pr *Product) Unwrap() *Product
- func (pr *Product) Update() *ProductUpdateOne
- func (pr *Product) Value(name string) (ent.Value, error)
- 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 int64) *ProductDeleteOne
- func (c *ProductClient) Get(ctx context.Context, id int64) (*Product, error)
- func (c *ProductClient) GetX(ctx context.Context, id int64) *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) QueryBundles(pr *Product) *BundleQuery
- func (c *ProductClient) QueryInvoices(pr *Product) *InvoiceQuery
- func (c *ProductClient) QueryReservations(pr *Product) *ProductReservationQuery
- func (c *ProductClient) QuerySubscriptions(pr *Product) *SubscriptionsQuery
- func (c *ProductClient) Update() *ProductUpdate
- func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne
- func (c *ProductClient) UpdateOneID(id int64) *ProductUpdateOne
- func (c *ProductClient) Use(hooks ...Hook)
- type ProductCreate
- func (pc *ProductCreate) AddBundleIDs(ids ...int64) *ProductCreate
- func (pc *ProductCreate) AddBundles(b ...*Bundle) *ProductCreate
- func (pc *ProductCreate) AddInvoiceIDs(ids ...int64) *ProductCreate
- func (pc *ProductCreate) AddInvoices(i ...*Invoice) *ProductCreate
- func (pc *ProductCreate) AddReservationIDs(ids ...int64) *ProductCreate
- func (pc *ProductCreate) AddReservations(p ...*ProductReservation) *ProductCreate
- func (pc *ProductCreate) AddSubscriptionIDs(ids ...int64) *ProductCreate
- func (pc *ProductCreate) AddSubscriptions(s ...*Subscriptions) *ProductCreate
- func (pc *ProductCreate) Exec(ctx context.Context) error
- func (pc *ProductCreate) ExecX(ctx context.Context)
- func (pc *ProductCreate) Mutation() *ProductMutation
- func (pc *ProductCreate) OnConflict(opts ...sql.ConflictOption) *ProductUpsertOne
- func (pc *ProductCreate) OnConflictColumns(columns ...string) *ProductUpsertOne
- func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)
- func (pc *ProductCreate) SaveX(ctx context.Context) *Product
- func (pc *ProductCreate) SetAppID(s string) *ProductCreate
- func (pc *ProductCreate) SetCreatedAt(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetCurrency(s string) *ProductCreate
- func (pc *ProductCreate) SetDeletedAt(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetDescription(s string) *ProductCreate
- func (pc *ProductCreate) SetExpiringTime(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetID(i int64) *ProductCreate
- func (pc *ProductCreate) SetIsActive(b bool) *ProductCreate
- func (pc *ProductCreate) SetIsExpiring(b bool) *ProductCreate
- func (pc *ProductCreate) SetIsLimited(b bool) *ProductCreate
- func (pc *ProductCreate) SetIsUnique(b bool) *ProductCreate
- func (pc *ProductCreate) SetLeft(i int64) *ProductCreate
- func (pc *ProductCreate) SetLimitedTill(t time.Time) *ProductCreate
- func (pc *ProductCreate) SetName(s string) *ProductCreate
- func (pc *ProductCreate) SetNillableCreatedAt(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableCurrency(s *string) *ProductCreate
- func (pc *ProductCreate) SetNillableDeletedAt(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableExpiringTime(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillableIsActive(b *bool) *ProductCreate
- func (pc *ProductCreate) SetNillableIsExpiring(b *bool) *ProductCreate
- func (pc *ProductCreate) SetNillableIsLimited(b *bool) *ProductCreate
- func (pc *ProductCreate) SetNillableIsUnique(b *bool) *ProductCreate
- func (pc *ProductCreate) SetNillableLeft(i *int64) *ProductCreate
- func (pc *ProductCreate) SetNillableLimitedTill(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetNillablePaymentModel(em *enum.PaymentModel) *ProductCreate
- func (pc *ProductCreate) SetNillableProductPeriod(ep *enum.ProductPeriod) *ProductCreate
- func (pc *ProductCreate) SetNillableUniqueLimit(i *int64) *ProductCreate
- func (pc *ProductCreate) SetNillableUpdatedAt(t *time.Time) *ProductCreate
- func (pc *ProductCreate) SetPaymentModel(em enum.PaymentModel) *ProductCreate
- func (pc *ProductCreate) SetPrice(d decimal.Decimal) *ProductCreate
- func (pc *ProductCreate) SetProductPeriod(ep enum.ProductPeriod) *ProductCreate
- func (pc *ProductCreate) SetUniqueLimit(i int64) *ProductCreate
- func (pc *ProductCreate) SetUpdatedAt(t time.Time) *ProductCreate
- type ProductCreateBulk
- func (pcb *ProductCreateBulk) Exec(ctx context.Context) error
- func (pcb *ProductCreateBulk) ExecX(ctx context.Context)
- func (pcb *ProductCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProductUpsertBulk
- func (pcb *ProductCreateBulk) OnConflictColumns(columns ...string) *ProductUpsertBulk
- func (pcb *ProductCreateBulk) Save(ctx context.Context) ([]*Product, error)
- func (pcb *ProductCreateBulk) SaveX(ctx context.Context) []*Product
- type ProductDelete
- type ProductDeleteOne
- type ProductEdges
- type ProductFilter
- func (f *ProductFilter) Where(p entql.P)
- func (f *ProductFilter) WhereAppID(p entql.StringP)
- func (f *ProductFilter) WhereCreatedAt(p entql.TimeP)
- func (f *ProductFilter) WhereCurrency(p entql.StringP)
- func (f *ProductFilter) WhereDeletedAt(p entql.TimeP)
- func (f *ProductFilter) WhereDescription(p entql.StringP)
- func (f *ProductFilter) WhereExpiringTime(p entql.TimeP)
- func (f *ProductFilter) WhereHasBundles()
- func (f *ProductFilter) WhereHasBundlesWith(preds ...predicate.Bundle)
- func (f *ProductFilter) WhereHasInvoices()
- func (f *ProductFilter) WhereHasInvoicesWith(preds ...predicate.Invoice)
- func (f *ProductFilter) WhereHasReservations()
- func (f *ProductFilter) WhereHasReservationsWith(preds ...predicate.ProductReservation)
- func (f *ProductFilter) WhereHasSubscriptions()
- func (f *ProductFilter) WhereHasSubscriptionsWith(preds ...predicate.Subscriptions)
- func (f *ProductFilter) WhereID(p entql.Int64P)
- func (f *ProductFilter) WhereIsActive(p entql.BoolP)
- func (f *ProductFilter) WhereIsExpiring(p entql.BoolP)
- func (f *ProductFilter) WhereIsLimited(p entql.BoolP)
- func (f *ProductFilter) WhereIsUnique(p entql.BoolP)
- func (f *ProductFilter) WhereLeft(p entql.Int64P)
- func (f *ProductFilter) WhereLimitedTill(p entql.TimeP)
- func (f *ProductFilter) WhereName(p entql.StringP)
- func (f *ProductFilter) WherePaymentModel(p entql.StringP)
- func (f *ProductFilter) WherePrice(p entql.Float64P)
- func (f *ProductFilter) WhereProductPeriod(p entql.StringP)
- func (f *ProductFilter) WhereUniqueLimit(p entql.Int64P)
- func (f *ProductFilter) WhereUpdatedAt(p entql.TimeP)
- 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 ProductMutation
- func (m *ProductMutation) AddBundleIDs(ids ...int64)
- func (m *ProductMutation) AddField(name string, value ent.Value) error
- func (m *ProductMutation) AddInvoiceIDs(ids ...int64)
- func (m *ProductMutation) AddLeft(i int64)
- func (m *ProductMutation) AddPrice(d decimal.Decimal)
- func (m *ProductMutation) AddReservationIDs(ids ...int64)
- func (m *ProductMutation) AddSubscriptionIDs(ids ...int64)
- func (m *ProductMutation) AddUniqueLimit(i int64)
- 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) AddedLeft() (r int64, exists bool)
- func (m *ProductMutation) AddedPrice() (r decimal.Decimal, exists bool)
- func (m *ProductMutation) AddedUniqueLimit() (r int64, exists bool)
- func (m *ProductMutation) AppID() (r string, exists bool)
- func (m *ProductMutation) BundlesCleared() bool
- func (m *ProductMutation) BundlesIDs() (ids []int64)
- func (m *ProductMutation) ClearBundles()
- func (m *ProductMutation) ClearDeletedAt()
- func (m *ProductMutation) ClearEdge(name string) error
- func (m *ProductMutation) ClearExpiringTime()
- func (m *ProductMutation) ClearField(name string) error
- func (m *ProductMutation) ClearInvoices()
- func (m *ProductMutation) ClearIsExpiring()
- func (m *ProductMutation) ClearIsUnique()
- func (m *ProductMutation) ClearLimitedTill()
- func (m *ProductMutation) ClearReservations()
- func (m *ProductMutation) ClearSubscriptions()
- func (m *ProductMutation) ClearedEdges() []string
- func (m *ProductMutation) ClearedFields() []string
- func (m ProductMutation) Client() *Client
- func (m *ProductMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductMutation) Currency() (r string, exists bool)
- func (m *ProductMutation) DeletedAt() (r time.Time, exists bool)
- func (m *ProductMutation) DeletedAtCleared() bool
- func (m *ProductMutation) Description() (r string, exists bool)
- func (m *ProductMutation) EdgeCleared(name string) bool
- func (m *ProductMutation) ExpiringTime() (r time.Time, exists bool)
- func (m *ProductMutation) ExpiringTimeCleared() 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) Filter() *ProductFilter
- func (m *ProductMutation) ID() (id int64, exists bool)
- func (m *ProductMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *ProductMutation) InvoicesCleared() bool
- func (m *ProductMutation) InvoicesIDs() (ids []int64)
- func (m *ProductMutation) IsActive() (r bool, exists bool)
- func (m *ProductMutation) IsExpiring() (r bool, exists bool)
- func (m *ProductMutation) IsExpiringCleared() bool
- func (m *ProductMutation) IsLimited() (r bool, exists bool)
- func (m *ProductMutation) IsUnique() (r bool, exists bool)
- func (m *ProductMutation) IsUniqueCleared() bool
- func (m *ProductMutation) Left() (r int64, exists bool)
- func (m *ProductMutation) LimitedTill() (r time.Time, exists bool)
- func (m *ProductMutation) LimitedTillCleared() bool
- func (m *ProductMutation) Name() (r string, exists bool)
- func (m *ProductMutation) OldAppID(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) OldCurrency(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldExpiringTime(ctx context.Context) (v *time.Time, err error)
- func (m *ProductMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductMutation) OldIsActive(ctx context.Context) (v bool, err error)
- func (m *ProductMutation) OldIsExpiring(ctx context.Context) (v bool, err error)
- func (m *ProductMutation) OldIsLimited(ctx context.Context) (v bool, err error)
- func (m *ProductMutation) OldIsUnique(ctx context.Context) (v bool, err error)
- func (m *ProductMutation) OldLeft(ctx context.Context) (v int64, err error)
- func (m *ProductMutation) OldLimitedTill(ctx context.Context) (v *time.Time, err error)
- func (m *ProductMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProductMutation) OldPaymentModel(ctx context.Context) (v enum.PaymentModel, err error)
- func (m *ProductMutation) OldPrice(ctx context.Context) (v decimal.Decimal, err error)
- func (m *ProductMutation) OldProductPeriod(ctx context.Context) (v enum.ProductPeriod, err error)
- func (m *ProductMutation) OldUniqueLimit(ctx context.Context) (v int64, err error)
- func (m *ProductMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductMutation) Op() Op
- func (m *ProductMutation) PaymentModel() (r enum.PaymentModel, exists bool)
- func (m *ProductMutation) Price() (r decimal.Decimal, exists bool)
- func (m *ProductMutation) ProductPeriod() (r enum.ProductPeriod, exists bool)
- func (m *ProductMutation) RemoveBundleIDs(ids ...int64)
- func (m *ProductMutation) RemoveInvoiceIDs(ids ...int64)
- func (m *ProductMutation) RemoveReservationIDs(ids ...int64)
- func (m *ProductMutation) RemoveSubscriptionIDs(ids ...int64)
- func (m *ProductMutation) RemovedBundlesIDs() (ids []int64)
- func (m *ProductMutation) RemovedEdges() []string
- func (m *ProductMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductMutation) RemovedInvoicesIDs() (ids []int64)
- func (m *ProductMutation) RemovedReservationsIDs() (ids []int64)
- func (m *ProductMutation) RemovedSubscriptionsIDs() (ids []int64)
- func (m *ProductMutation) ReservationsCleared() bool
- func (m *ProductMutation) ReservationsIDs() (ids []int64)
- func (m *ProductMutation) ResetAppID()
- func (m *ProductMutation) ResetBundles()
- func (m *ProductMutation) ResetCreatedAt()
- func (m *ProductMutation) ResetCurrency()
- func (m *ProductMutation) ResetDeletedAt()
- func (m *ProductMutation) ResetDescription()
- func (m *ProductMutation) ResetEdge(name string) error
- func (m *ProductMutation) ResetExpiringTime()
- func (m *ProductMutation) ResetField(name string) error
- func (m *ProductMutation) ResetInvoices()
- func (m *ProductMutation) ResetIsActive()
- func (m *ProductMutation) ResetIsExpiring()
- func (m *ProductMutation) ResetIsLimited()
- func (m *ProductMutation) ResetIsUnique()
- func (m *ProductMutation) ResetLeft()
- func (m *ProductMutation) ResetLimitedTill()
- func (m *ProductMutation) ResetName()
- func (m *ProductMutation) ResetPaymentModel()
- func (m *ProductMutation) ResetPrice()
- func (m *ProductMutation) ResetProductPeriod()
- func (m *ProductMutation) ResetReservations()
- func (m *ProductMutation) ResetSubscriptions()
- func (m *ProductMutation) ResetUniqueLimit()
- func (m *ProductMutation) ResetUpdatedAt()
- func (m *ProductMutation) SetAppID(s string)
- func (m *ProductMutation) SetCreatedAt(t time.Time)
- func (m *ProductMutation) SetCurrency(s string)
- func (m *ProductMutation) SetDeletedAt(t time.Time)
- func (m *ProductMutation) SetDescription(s string)
- func (m *ProductMutation) SetExpiringTime(t time.Time)
- func (m *ProductMutation) SetField(name string, value ent.Value) error
- func (m *ProductMutation) SetID(id int64)
- func (m *ProductMutation) SetIsActive(b bool)
- func (m *ProductMutation) SetIsExpiring(b bool)
- func (m *ProductMutation) SetIsLimited(b bool)
- func (m *ProductMutation) SetIsUnique(b bool)
- func (m *ProductMutation) SetLeft(i int64)
- func (m *ProductMutation) SetLimitedTill(t time.Time)
- func (m *ProductMutation) SetName(s string)
- func (m *ProductMutation) SetOp(op Op)
- func (m *ProductMutation) SetPaymentModel(em enum.PaymentModel)
- func (m *ProductMutation) SetPrice(d decimal.Decimal)
- func (m *ProductMutation) SetProductPeriod(ep enum.ProductPeriod)
- func (m *ProductMutation) SetUniqueLimit(i int64)
- func (m *ProductMutation) SetUpdatedAt(t time.Time)
- func (m *ProductMutation) SubscriptionsCleared() bool
- func (m *ProductMutation) SubscriptionsIDs() (ids []int64)
- func (m ProductMutation) Tx() (*Tx, error)
- func (m *ProductMutation) Type() string
- func (m *ProductMutation) UniqueLimit() (r int64, exists bool)
- func (m *ProductMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductMutation) Where(ps ...predicate.Product)
- func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))
- 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) Filter() *ProductFilter
- func (pq *ProductQuery) First(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) FirstID(ctx context.Context) (id int64, err error)
- func (pq *ProductQuery) FirstIDX(ctx context.Context) int64
- 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 []int64, err error)
- func (pq *ProductQuery) IDsX(ctx context.Context) []int64
- func (pq *ProductQuery) Limit(limit int) *ProductQuery
- func (pq *ProductQuery) Modify(modifiers ...func(s *sql.Selector)) *ProductSelect
- func (pq *ProductQuery) Offset(offset int) *ProductQuery
- func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)
- func (pq *ProductQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (pq *ProductQuery) OnlyIDX(ctx context.Context) int64
- func (pq *ProductQuery) OnlyX(ctx context.Context) *Product
- func (pq *ProductQuery) Order(o ...product.OrderOption) *ProductQuery
- func (pq *ProductQuery) QueryBundles() *BundleQuery
- func (pq *ProductQuery) QueryInvoices() *InvoiceQuery
- func (pq *ProductQuery) QueryReservations() *ProductReservationQuery
- func (pq *ProductQuery) QuerySubscriptions() *SubscriptionsQuery
- 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) WithBundles(opts ...func(*BundleQuery)) *ProductQuery
- func (pq *ProductQuery) WithInvoices(opts ...func(*InvoiceQuery)) *ProductQuery
- func (pq *ProductQuery) WithReservations(opts ...func(*ProductReservationQuery)) *ProductQuery
- func (pq *ProductQuery) WithSubscriptions(opts ...func(*SubscriptionsQuery)) *ProductQuery
- type ProductReservation
- func (pr *ProductReservation) QueryInvoice() *InvoiceQuery
- func (pr *ProductReservation) QueryProduct() *ProductQuery
- func (pr *ProductReservation) String() string
- func (pr *ProductReservation) Unwrap() *ProductReservation
- func (pr *ProductReservation) Update() *ProductReservationUpdateOne
- func (pr *ProductReservation) Value(name string) (ent.Value, error)
- type ProductReservationClient
- func (c *ProductReservationClient) Create() *ProductReservationCreate
- func (c *ProductReservationClient) CreateBulk(builders ...*ProductReservationCreate) *ProductReservationCreateBulk
- func (c *ProductReservationClient) Delete() *ProductReservationDelete
- func (c *ProductReservationClient) DeleteOne(pr *ProductReservation) *ProductReservationDeleteOne
- func (c *ProductReservationClient) DeleteOneID(id int64) *ProductReservationDeleteOne
- func (c *ProductReservationClient) Get(ctx context.Context, id int64) (*ProductReservation, error)
- func (c *ProductReservationClient) GetX(ctx context.Context, id int64) *ProductReservation
- func (c *ProductReservationClient) Hooks() []Hook
- func (c *ProductReservationClient) Intercept(interceptors ...Interceptor)
- func (c *ProductReservationClient) Interceptors() []Interceptor
- func (c *ProductReservationClient) MapCreateBulk(slice any, setFunc func(*ProductReservationCreate, int)) *ProductReservationCreateBulk
- func (c *ProductReservationClient) Query() *ProductReservationQuery
- func (c *ProductReservationClient) QueryInvoice(pr *ProductReservation) *InvoiceQuery
- func (c *ProductReservationClient) QueryProduct(pr *ProductReservation) *ProductQuery
- func (c *ProductReservationClient) Update() *ProductReservationUpdate
- func (c *ProductReservationClient) UpdateOne(pr *ProductReservation) *ProductReservationUpdateOne
- func (c *ProductReservationClient) UpdateOneID(id int64) *ProductReservationUpdateOne
- func (c *ProductReservationClient) Use(hooks ...Hook)
- type ProductReservationCreate
- func (prc *ProductReservationCreate) Exec(ctx context.Context) error
- func (prc *ProductReservationCreate) ExecX(ctx context.Context)
- func (prc *ProductReservationCreate) Mutation() *ProductReservationMutation
- func (prc *ProductReservationCreate) OnConflict(opts ...sql.ConflictOption) *ProductReservationUpsertOne
- func (prc *ProductReservationCreate) OnConflictColumns(columns ...string) *ProductReservationUpsertOne
- func (prc *ProductReservationCreate) Save(ctx context.Context) (*ProductReservation, error)
- func (prc *ProductReservationCreate) SaveX(ctx context.Context) *ProductReservation
- func (prc *ProductReservationCreate) SetCreatedAt(t time.Time) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetExpirationTime(t time.Time) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetID(i int64) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetInvoice(i *Invoice) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetInvoiceID(i int64) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetNillableCreatedAt(t *time.Time) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetNillableExpirationTime(t *time.Time) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetNillableReservedQuantity(i *int64) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetNillableStatus(es *enum.ReservationStatus) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetNillableUpdatedAt(t *time.Time) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetProduct(p *Product) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetProductID(i int64) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetReservedQuantity(i int64) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetStatus(es enum.ReservationStatus) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetUpdatedAt(t time.Time) *ProductReservationCreate
- func (prc *ProductReservationCreate) SetUserID(i int64) *ProductReservationCreate
- type ProductReservationCreateBulk
- func (prcb *ProductReservationCreateBulk) Exec(ctx context.Context) error
- func (prcb *ProductReservationCreateBulk) ExecX(ctx context.Context)
- func (prcb *ProductReservationCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProductReservationUpsertBulk
- func (prcb *ProductReservationCreateBulk) OnConflictColumns(columns ...string) *ProductReservationUpsertBulk
- func (prcb *ProductReservationCreateBulk) Save(ctx context.Context) ([]*ProductReservation, error)
- func (prcb *ProductReservationCreateBulk) SaveX(ctx context.Context) []*ProductReservation
- type ProductReservationDelete
- type ProductReservationDeleteOne
- type ProductReservationEdges
- type ProductReservationFilter
- func (f *ProductReservationFilter) Where(p entql.P)
- func (f *ProductReservationFilter) WhereCreatedAt(p entql.TimeP)
- func (f *ProductReservationFilter) WhereExpirationTime(p entql.TimeP)
- func (f *ProductReservationFilter) WhereHasInvoice()
- func (f *ProductReservationFilter) WhereHasInvoiceWith(preds ...predicate.Invoice)
- func (f *ProductReservationFilter) WhereHasProduct()
- func (f *ProductReservationFilter) WhereHasProductWith(preds ...predicate.Product)
- func (f *ProductReservationFilter) WhereID(p entql.Int64P)
- func (f *ProductReservationFilter) WhereInvoiceID(p entql.Int64P)
- func (f *ProductReservationFilter) WhereProductID(p entql.Int64P)
- func (f *ProductReservationFilter) WhereReservedQuantity(p entql.Int64P)
- func (f *ProductReservationFilter) WhereStatus(p entql.StringP)
- func (f *ProductReservationFilter) WhereUpdatedAt(p entql.TimeP)
- func (f *ProductReservationFilter) WhereUserID(p entql.Int64P)
- type ProductReservationGroupBy
- func (prgb *ProductReservationGroupBy) Aggregate(fns ...AggregateFunc) *ProductReservationGroupBy
- func (s *ProductReservationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductReservationGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductReservationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductReservationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductReservationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductReservationGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductReservationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductReservationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductReservationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductReservationGroupBy) IntX(ctx context.Context) int
- func (s *ProductReservationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductReservationGroupBy) IntsX(ctx context.Context) []int
- func (prgb *ProductReservationGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductReservationGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductReservationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductReservationGroupBy) StringX(ctx context.Context) string
- func (s *ProductReservationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductReservationGroupBy) StringsX(ctx context.Context) []string
- type ProductReservationMutation
- func (m *ProductReservationMutation) AddField(name string, value ent.Value) error
- func (m *ProductReservationMutation) AddReservedQuantity(i int64)
- func (m *ProductReservationMutation) AddUserID(i int64)
- func (m *ProductReservationMutation) AddedEdges() []string
- func (m *ProductReservationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductReservationMutation) AddedFields() []string
- func (m *ProductReservationMutation) AddedIDs(name string) []ent.Value
- func (m *ProductReservationMutation) AddedReservedQuantity() (r int64, exists bool)
- func (m *ProductReservationMutation) AddedUserID() (r int64, exists bool)
- func (m *ProductReservationMutation) ClearEdge(name string) error
- func (m *ProductReservationMutation) ClearField(name string) error
- func (m *ProductReservationMutation) ClearInvoice()
- func (m *ProductReservationMutation) ClearProduct()
- func (m *ProductReservationMutation) ClearedEdges() []string
- func (m *ProductReservationMutation) ClearedFields() []string
- func (m ProductReservationMutation) Client() *Client
- func (m *ProductReservationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductReservationMutation) EdgeCleared(name string) bool
- func (m *ProductReservationMutation) ExpirationTime() (r time.Time, exists bool)
- func (m *ProductReservationMutation) Field(name string) (ent.Value, bool)
- func (m *ProductReservationMutation) FieldCleared(name string) bool
- func (m *ProductReservationMutation) Fields() []string
- func (m *ProductReservationMutation) Filter() *ProductReservationFilter
- func (m *ProductReservationMutation) ID() (id int64, exists bool)
- func (m *ProductReservationMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *ProductReservationMutation) InvoiceCleared() bool
- func (m *ProductReservationMutation) InvoiceID() (r int64, exists bool)
- func (m *ProductReservationMutation) InvoiceIDs() (ids []int64)
- func (m *ProductReservationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductReservationMutation) OldExpirationTime(ctx context.Context) (v time.Time, err error)
- func (m *ProductReservationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductReservationMutation) OldInvoiceID(ctx context.Context) (v int64, err error)
- func (m *ProductReservationMutation) OldProductID(ctx context.Context) (v int64, err error)
- func (m *ProductReservationMutation) OldReservedQuantity(ctx context.Context) (v int64, err error)
- func (m *ProductReservationMutation) OldStatus(ctx context.Context) (v enum.ReservationStatus, err error)
- func (m *ProductReservationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProductReservationMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *ProductReservationMutation) Op() Op
- func (m *ProductReservationMutation) ProductCleared() bool
- func (m *ProductReservationMutation) ProductID() (r int64, exists bool)
- func (m *ProductReservationMutation) ProductIDs() (ids []int64)
- func (m *ProductReservationMutation) RemovedEdges() []string
- func (m *ProductReservationMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductReservationMutation) ReservedQuantity() (r int64, exists bool)
- func (m *ProductReservationMutation) ResetCreatedAt()
- func (m *ProductReservationMutation) ResetEdge(name string) error
- func (m *ProductReservationMutation) ResetExpirationTime()
- func (m *ProductReservationMutation) ResetField(name string) error
- func (m *ProductReservationMutation) ResetInvoice()
- func (m *ProductReservationMutation) ResetInvoiceID()
- func (m *ProductReservationMutation) ResetProduct()
- func (m *ProductReservationMutation) ResetProductID()
- func (m *ProductReservationMutation) ResetReservedQuantity()
- func (m *ProductReservationMutation) ResetStatus()
- func (m *ProductReservationMutation) ResetUpdatedAt()
- func (m *ProductReservationMutation) ResetUserID()
- func (m *ProductReservationMutation) SetCreatedAt(t time.Time)
- func (m *ProductReservationMutation) SetExpirationTime(t time.Time)
- func (m *ProductReservationMutation) SetField(name string, value ent.Value) error
- func (m *ProductReservationMutation) SetID(id int64)
- func (m *ProductReservationMutation) SetInvoiceID(i int64)
- func (m *ProductReservationMutation) SetOp(op Op)
- func (m *ProductReservationMutation) SetProductID(i int64)
- func (m *ProductReservationMutation) SetReservedQuantity(i int64)
- func (m *ProductReservationMutation) SetStatus(es enum.ReservationStatus)
- func (m *ProductReservationMutation) SetUpdatedAt(t time.Time)
- func (m *ProductReservationMutation) SetUserID(i int64)
- func (m *ProductReservationMutation) Status() (r enum.ReservationStatus, exists bool)
- func (m ProductReservationMutation) Tx() (*Tx, error)
- func (m *ProductReservationMutation) Type() string
- func (m *ProductReservationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductReservationMutation) UserID() (r int64, exists bool)
- func (m *ProductReservationMutation) Where(ps ...predicate.ProductReservation)
- func (m *ProductReservationMutation) WhereP(ps ...func(*sql.Selector))
- type ProductReservationQuery
- func (prq *ProductReservationQuery) Aggregate(fns ...AggregateFunc) *ProductReservationSelect
- func (prq *ProductReservationQuery) All(ctx context.Context) ([]*ProductReservation, error)
- func (prq *ProductReservationQuery) AllX(ctx context.Context) []*ProductReservation
- func (prq *ProductReservationQuery) Clone() *ProductReservationQuery
- func (prq *ProductReservationQuery) Count(ctx context.Context) (int, error)
- func (prq *ProductReservationQuery) CountX(ctx context.Context) int
- func (prq *ProductReservationQuery) Exist(ctx context.Context) (bool, error)
- func (prq *ProductReservationQuery) ExistX(ctx context.Context) bool
- func (prq *ProductReservationQuery) Filter() *ProductReservationFilter
- func (prq *ProductReservationQuery) First(ctx context.Context) (*ProductReservation, error)
- func (prq *ProductReservationQuery) FirstID(ctx context.Context) (id int64, err error)
- func (prq *ProductReservationQuery) FirstIDX(ctx context.Context) int64
- func (prq *ProductReservationQuery) FirstX(ctx context.Context) *ProductReservation
- func (prq *ProductReservationQuery) GroupBy(field string, fields ...string) *ProductReservationGroupBy
- func (prq *ProductReservationQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (prq *ProductReservationQuery) IDsX(ctx context.Context) []int64
- func (prq *ProductReservationQuery) Limit(limit int) *ProductReservationQuery
- func (prq *ProductReservationQuery) Modify(modifiers ...func(s *sql.Selector)) *ProductReservationSelect
- func (prq *ProductReservationQuery) Offset(offset int) *ProductReservationQuery
- func (prq *ProductReservationQuery) Only(ctx context.Context) (*ProductReservation, error)
- func (prq *ProductReservationQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (prq *ProductReservationQuery) OnlyIDX(ctx context.Context) int64
- func (prq *ProductReservationQuery) OnlyX(ctx context.Context) *ProductReservation
- func (prq *ProductReservationQuery) Order(o ...productreservation.OrderOption) *ProductReservationQuery
- func (prq *ProductReservationQuery) QueryInvoice() *InvoiceQuery
- func (prq *ProductReservationQuery) QueryProduct() *ProductQuery
- func (prq *ProductReservationQuery) Select(fields ...string) *ProductReservationSelect
- func (prq *ProductReservationQuery) Unique(unique bool) *ProductReservationQuery
- func (prq *ProductReservationQuery) Where(ps ...predicate.ProductReservation) *ProductReservationQuery
- func (prq *ProductReservationQuery) WithInvoice(opts ...func(*InvoiceQuery)) *ProductReservationQuery
- func (prq *ProductReservationQuery) WithProduct(opts ...func(*ProductQuery)) *ProductReservationQuery
- type ProductReservationSelect
- func (prs *ProductReservationSelect) Aggregate(fns ...AggregateFunc) *ProductReservationSelect
- func (s *ProductReservationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductReservationSelect) BoolX(ctx context.Context) bool
- func (s *ProductReservationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductReservationSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductReservationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductReservationSelect) Float64X(ctx context.Context) float64
- func (s *ProductReservationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductReservationSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductReservationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductReservationSelect) IntX(ctx context.Context) int
- func (s *ProductReservationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductReservationSelect) IntsX(ctx context.Context) []int
- func (prs *ProductReservationSelect) Modify(modifiers ...func(s *sql.Selector)) *ProductReservationSelect
- func (prs *ProductReservationSelect) Scan(ctx context.Context, v any) error
- func (s *ProductReservationSelect) ScanX(ctx context.Context, v any)
- func (s *ProductReservationSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductReservationSelect) StringX(ctx context.Context) string
- func (s *ProductReservationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductReservationSelect) StringsX(ctx context.Context) []string
- type ProductReservationUpdate
- func (pru *ProductReservationUpdate) AddReservedQuantity(i int64) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) Exec(ctx context.Context) error
- func (pru *ProductReservationUpdate) ExecX(ctx context.Context)
- func (pru *ProductReservationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) Mutation() *ProductReservationMutation
- func (pru *ProductReservationUpdate) Save(ctx context.Context) (int, error)
- func (pru *ProductReservationUpdate) SaveX(ctx context.Context) int
- func (pru *ProductReservationUpdate) SetExpirationTime(t time.Time) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) SetNillableExpirationTime(t *time.Time) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) SetNillableReservedQuantity(i *int64) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) SetNillableStatus(es *enum.ReservationStatus) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) SetReservedQuantity(i int64) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) SetStatus(es enum.ReservationStatus) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) SetUpdatedAt(t time.Time) *ProductReservationUpdate
- func (pru *ProductReservationUpdate) Where(ps ...predicate.ProductReservation) *ProductReservationUpdate
- type ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) AddReservedQuantity(i int64) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) Exec(ctx context.Context) error
- func (pruo *ProductReservationUpdateOne) ExecX(ctx context.Context)
- func (pruo *ProductReservationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) Mutation() *ProductReservationMutation
- func (pruo *ProductReservationUpdateOne) Save(ctx context.Context) (*ProductReservation, error)
- func (pruo *ProductReservationUpdateOne) SaveX(ctx context.Context) *ProductReservation
- func (pruo *ProductReservationUpdateOne) Select(field string, fields ...string) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) SetExpirationTime(t time.Time) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) SetNillableExpirationTime(t *time.Time) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) SetNillableReservedQuantity(i *int64) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) SetNillableStatus(es *enum.ReservationStatus) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) SetReservedQuantity(i int64) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) SetStatus(es enum.ReservationStatus) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) SetUpdatedAt(t time.Time) *ProductReservationUpdateOne
- func (pruo *ProductReservationUpdateOne) Where(ps ...predicate.ProductReservation) *ProductReservationUpdateOne
- type ProductReservationUpsert
- func (u *ProductReservationUpsert) AddReservedQuantity(v int64) *ProductReservationUpsert
- func (u *ProductReservationUpsert) SetExpirationTime(v time.Time) *ProductReservationUpsert
- func (u *ProductReservationUpsert) SetReservedQuantity(v int64) *ProductReservationUpsert
- func (u *ProductReservationUpsert) SetStatus(v enum.ReservationStatus) *ProductReservationUpsert
- func (u *ProductReservationUpsert) SetUpdatedAt(v time.Time) *ProductReservationUpsert
- func (u *ProductReservationUpsert) UpdateExpirationTime() *ProductReservationUpsert
- func (u *ProductReservationUpsert) UpdateReservedQuantity() *ProductReservationUpsert
- func (u *ProductReservationUpsert) UpdateStatus() *ProductReservationUpsert
- func (u *ProductReservationUpsert) UpdateUpdatedAt() *ProductReservationUpsert
- type ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) AddReservedQuantity(v int64) *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) DoNothing() *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) Exec(ctx context.Context) error
- func (u *ProductReservationUpsertBulk) ExecX(ctx context.Context)
- func (u *ProductReservationUpsertBulk) Ignore() *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) SetExpirationTime(v time.Time) *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) SetReservedQuantity(v int64) *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) SetStatus(v enum.ReservationStatus) *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) SetUpdatedAt(v time.Time) *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) Update(set func(*ProductReservationUpsert)) *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) UpdateExpirationTime() *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) UpdateNewValues() *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) UpdateReservedQuantity() *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) UpdateStatus() *ProductReservationUpsertBulk
- func (u *ProductReservationUpsertBulk) UpdateUpdatedAt() *ProductReservationUpsertBulk
- type ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) AddReservedQuantity(v int64) *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) DoNothing() *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) Exec(ctx context.Context) error
- func (u *ProductReservationUpsertOne) ExecX(ctx context.Context)
- func (u *ProductReservationUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *ProductReservationUpsertOne) IDX(ctx context.Context) int64
- func (u *ProductReservationUpsertOne) Ignore() *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) SetExpirationTime(v time.Time) *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) SetReservedQuantity(v int64) *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) SetStatus(v enum.ReservationStatus) *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) SetUpdatedAt(v time.Time) *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) Update(set func(*ProductReservationUpsert)) *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) UpdateExpirationTime() *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) UpdateNewValues() *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) UpdateReservedQuantity() *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) UpdateStatus() *ProductReservationUpsertOne
- func (u *ProductReservationUpsertOne) UpdateUpdatedAt() *ProductReservationUpsertOne
- type ProductReservations
- 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) Modify(modifiers ...func(s *sql.Selector)) *ProductSelect
- 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 ProductUpdate
- func (pu *ProductUpdate) AddBundleIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) AddBundles(b ...*Bundle) *ProductUpdate
- func (pu *ProductUpdate) AddInvoiceIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) AddInvoices(i ...*Invoice) *ProductUpdate
- func (pu *ProductUpdate) AddLeft(i int64) *ProductUpdate
- func (pu *ProductUpdate) AddPrice(d decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) AddReservationIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) AddReservations(p ...*ProductReservation) *ProductUpdate
- func (pu *ProductUpdate) AddSubscriptionIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) AddSubscriptions(s ...*Subscriptions) *ProductUpdate
- func (pu *ProductUpdate) AddUniqueLimit(i int64) *ProductUpdate
- func (pu *ProductUpdate) ClearBundles() *ProductUpdate
- func (pu *ProductUpdate) ClearDeletedAt() *ProductUpdate
- func (pu *ProductUpdate) ClearExpiringTime() *ProductUpdate
- func (pu *ProductUpdate) ClearInvoices() *ProductUpdate
- func (pu *ProductUpdate) ClearIsExpiring() *ProductUpdate
- func (pu *ProductUpdate) ClearIsUnique() *ProductUpdate
- func (pu *ProductUpdate) ClearLimitedTill() *ProductUpdate
- func (pu *ProductUpdate) ClearReservations() *ProductUpdate
- func (pu *ProductUpdate) ClearSubscriptions() *ProductUpdate
- func (pu *ProductUpdate) Exec(ctx context.Context) error
- func (pu *ProductUpdate) ExecX(ctx context.Context)
- func (pu *ProductUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductUpdate
- func (pu *ProductUpdate) Mutation() *ProductMutation
- func (pu *ProductUpdate) RemoveBundleIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) RemoveBundles(b ...*Bundle) *ProductUpdate
- func (pu *ProductUpdate) RemoveInvoiceIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) RemoveInvoices(i ...*Invoice) *ProductUpdate
- func (pu *ProductUpdate) RemoveReservationIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) RemoveReservations(p ...*ProductReservation) *ProductUpdate
- func (pu *ProductUpdate) RemoveSubscriptionIDs(ids ...int64) *ProductUpdate
- func (pu *ProductUpdate) RemoveSubscriptions(s ...*Subscriptions) *ProductUpdate
- func (pu *ProductUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProductUpdate) SaveX(ctx context.Context) int
- func (pu *ProductUpdate) SetAppID(s string) *ProductUpdate
- func (pu *ProductUpdate) SetCurrency(s string) *ProductUpdate
- func (pu *ProductUpdate) SetDeletedAt(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetDescription(s string) *ProductUpdate
- func (pu *ProductUpdate) SetExpiringTime(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetIsActive(b bool) *ProductUpdate
- func (pu *ProductUpdate) SetIsExpiring(b bool) *ProductUpdate
- func (pu *ProductUpdate) SetIsLimited(b bool) *ProductUpdate
- func (pu *ProductUpdate) SetIsUnique(b bool) *ProductUpdate
- func (pu *ProductUpdate) SetLeft(i int64) *ProductUpdate
- func (pu *ProductUpdate) SetLimitedTill(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetName(s string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableAppID(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableCurrency(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableDeletedAt(t *time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetNillableDescription(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillableExpiringTime(t *time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetNillableIsActive(b *bool) *ProductUpdate
- func (pu *ProductUpdate) SetNillableIsExpiring(b *bool) *ProductUpdate
- func (pu *ProductUpdate) SetNillableIsLimited(b *bool) *ProductUpdate
- func (pu *ProductUpdate) SetNillableIsUnique(b *bool) *ProductUpdate
- func (pu *ProductUpdate) SetNillableLeft(i *int64) *ProductUpdate
- func (pu *ProductUpdate) SetNillableLimitedTill(t *time.Time) *ProductUpdate
- func (pu *ProductUpdate) SetNillableName(s *string) *ProductUpdate
- func (pu *ProductUpdate) SetNillablePaymentModel(em *enum.PaymentModel) *ProductUpdate
- func (pu *ProductUpdate) SetNillablePrice(d *decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) SetNillableProductPeriod(ep *enum.ProductPeriod) *ProductUpdate
- func (pu *ProductUpdate) SetNillableUniqueLimit(i *int64) *ProductUpdate
- func (pu *ProductUpdate) SetPaymentModel(em enum.PaymentModel) *ProductUpdate
- func (pu *ProductUpdate) SetPrice(d decimal.Decimal) *ProductUpdate
- func (pu *ProductUpdate) SetProductPeriod(ep enum.ProductPeriod) *ProductUpdate
- func (pu *ProductUpdate) SetUniqueLimit(i int64) *ProductUpdate
- func (pu *ProductUpdate) SetUpdatedAt(t time.Time) *ProductUpdate
- func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate
- type ProductUpdateOne
- func (puo *ProductUpdateOne) AddBundleIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddBundles(b ...*Bundle) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddInvoiceIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddInvoices(i ...*Invoice) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddLeft(i int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddPrice(d decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddReservationIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddReservations(p ...*ProductReservation) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddSubscriptionIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddSubscriptions(s ...*Subscriptions) *ProductUpdateOne
- func (puo *ProductUpdateOne) AddUniqueLimit(i int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearBundles() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearDeletedAt() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearExpiringTime() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearInvoices() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearIsExpiring() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearIsUnique() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearLimitedTill() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearReservations() *ProductUpdateOne
- func (puo *ProductUpdateOne) ClearSubscriptions() *ProductUpdateOne
- func (puo *ProductUpdateOne) Exec(ctx context.Context) error
- func (puo *ProductUpdateOne) ExecX(ctx context.Context)
- func (puo *ProductUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductUpdateOne
- func (puo *ProductUpdateOne) Mutation() *ProductMutation
- func (puo *ProductUpdateOne) RemoveBundleIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveBundles(b ...*Bundle) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveInvoiceIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveInvoices(i ...*Invoice) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveReservationIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveReservations(p ...*ProductReservation) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveSubscriptionIDs(ids ...int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) RemoveSubscriptions(s ...*Subscriptions) *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) SetAppID(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetCurrency(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetDeletedAt(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetDescription(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetExpiringTime(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetIsActive(b bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetIsExpiring(b bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetIsLimited(b bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetIsUnique(b bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetLeft(i int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetLimitedTill(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableAppID(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableCurrency(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableDeletedAt(t *time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableDescription(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableExpiringTime(t *time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableIsActive(b *bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableIsExpiring(b *bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableIsLimited(b *bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableIsUnique(b *bool) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableLeft(i *int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableLimitedTill(t *time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableName(s *string) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillablePaymentModel(em *enum.PaymentModel) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillablePrice(d *decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableProductPeriod(ep *enum.ProductPeriod) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetNillableUniqueLimit(i *int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetPaymentModel(em enum.PaymentModel) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetPrice(d decimal.Decimal) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetProductPeriod(ep enum.ProductPeriod) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetUniqueLimit(i int64) *ProductUpdateOne
- func (puo *ProductUpdateOne) SetUpdatedAt(t time.Time) *ProductUpdateOne
- func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
- type ProductUpsert
- func (u *ProductUpsert) AddLeft(v int64) *ProductUpsert
- func (u *ProductUpsert) AddPrice(v decimal.Decimal) *ProductUpsert
- func (u *ProductUpsert) AddUniqueLimit(v int64) *ProductUpsert
- func (u *ProductUpsert) ClearDeletedAt() *ProductUpsert
- func (u *ProductUpsert) ClearExpiringTime() *ProductUpsert
- func (u *ProductUpsert) ClearIsExpiring() *ProductUpsert
- func (u *ProductUpsert) ClearIsUnique() *ProductUpsert
- func (u *ProductUpsert) ClearLimitedTill() *ProductUpsert
- func (u *ProductUpsert) SetAppID(v string) *ProductUpsert
- func (u *ProductUpsert) SetCurrency(v string) *ProductUpsert
- func (u *ProductUpsert) SetDeletedAt(v time.Time) *ProductUpsert
- func (u *ProductUpsert) SetDescription(v string) *ProductUpsert
- func (u *ProductUpsert) SetExpiringTime(v time.Time) *ProductUpsert
- func (u *ProductUpsert) SetIsActive(v bool) *ProductUpsert
- func (u *ProductUpsert) SetIsExpiring(v bool) *ProductUpsert
- func (u *ProductUpsert) SetIsLimited(v bool) *ProductUpsert
- func (u *ProductUpsert) SetIsUnique(v bool) *ProductUpsert
- func (u *ProductUpsert) SetLeft(v int64) *ProductUpsert
- func (u *ProductUpsert) SetLimitedTill(v time.Time) *ProductUpsert
- func (u *ProductUpsert) SetName(v string) *ProductUpsert
- func (u *ProductUpsert) SetPaymentModel(v enum.PaymentModel) *ProductUpsert
- func (u *ProductUpsert) SetPrice(v decimal.Decimal) *ProductUpsert
- func (u *ProductUpsert) SetProductPeriod(v enum.ProductPeriod) *ProductUpsert
- func (u *ProductUpsert) SetUniqueLimit(v int64) *ProductUpsert
- func (u *ProductUpsert) SetUpdatedAt(v time.Time) *ProductUpsert
- func (u *ProductUpsert) UpdateAppID() *ProductUpsert
- func (u *ProductUpsert) UpdateCurrency() *ProductUpsert
- func (u *ProductUpsert) UpdateDeletedAt() *ProductUpsert
- func (u *ProductUpsert) UpdateDescription() *ProductUpsert
- func (u *ProductUpsert) UpdateExpiringTime() *ProductUpsert
- func (u *ProductUpsert) UpdateIsActive() *ProductUpsert
- func (u *ProductUpsert) UpdateIsExpiring() *ProductUpsert
- func (u *ProductUpsert) UpdateIsLimited() *ProductUpsert
- func (u *ProductUpsert) UpdateIsUnique() *ProductUpsert
- func (u *ProductUpsert) UpdateLeft() *ProductUpsert
- func (u *ProductUpsert) UpdateLimitedTill() *ProductUpsert
- func (u *ProductUpsert) UpdateName() *ProductUpsert
- func (u *ProductUpsert) UpdatePaymentModel() *ProductUpsert
- func (u *ProductUpsert) UpdatePrice() *ProductUpsert
- func (u *ProductUpsert) UpdateProductPeriod() *ProductUpsert
- func (u *ProductUpsert) UpdateUniqueLimit() *ProductUpsert
- func (u *ProductUpsert) UpdateUpdatedAt() *ProductUpsert
- type ProductUpsertBulk
- func (u *ProductUpsertBulk) AddLeft(v int64) *ProductUpsertBulk
- func (u *ProductUpsertBulk) AddPrice(v decimal.Decimal) *ProductUpsertBulk
- func (u *ProductUpsertBulk) AddUniqueLimit(v int64) *ProductUpsertBulk
- func (u *ProductUpsertBulk) ClearDeletedAt() *ProductUpsertBulk
- func (u *ProductUpsertBulk) ClearExpiringTime() *ProductUpsertBulk
- func (u *ProductUpsertBulk) ClearIsExpiring() *ProductUpsertBulk
- func (u *ProductUpsertBulk) ClearIsUnique() *ProductUpsertBulk
- func (u *ProductUpsertBulk) ClearLimitedTill() *ProductUpsertBulk
- func (u *ProductUpsertBulk) DoNothing() *ProductUpsertBulk
- func (u *ProductUpsertBulk) Exec(ctx context.Context) error
- func (u *ProductUpsertBulk) ExecX(ctx context.Context)
- func (u *ProductUpsertBulk) Ignore() *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetAppID(v string) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetCurrency(v string) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetDeletedAt(v time.Time) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetDescription(v string) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetExpiringTime(v time.Time) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetIsActive(v bool) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetIsExpiring(v bool) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetIsLimited(v bool) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetIsUnique(v bool) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetLeft(v int64) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetLimitedTill(v time.Time) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetName(v string) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetPaymentModel(v enum.PaymentModel) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetPrice(v decimal.Decimal) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetProductPeriod(v enum.ProductPeriod) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetUniqueLimit(v int64) *ProductUpsertBulk
- func (u *ProductUpsertBulk) SetUpdatedAt(v time.Time) *ProductUpsertBulk
- func (u *ProductUpsertBulk) Update(set func(*ProductUpsert)) *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateAppID() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateCurrency() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateDeletedAt() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateDescription() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateExpiringTime() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateIsActive() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateIsExpiring() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateIsLimited() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateIsUnique() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateLeft() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateLimitedTill() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateName() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateNewValues() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdatePaymentModel() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdatePrice() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateProductPeriod() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateUniqueLimit() *ProductUpsertBulk
- func (u *ProductUpsertBulk) UpdateUpdatedAt() *ProductUpsertBulk
- type ProductUpsertOne
- func (u *ProductUpsertOne) AddLeft(v int64) *ProductUpsertOne
- func (u *ProductUpsertOne) AddPrice(v decimal.Decimal) *ProductUpsertOne
- func (u *ProductUpsertOne) AddUniqueLimit(v int64) *ProductUpsertOne
- func (u *ProductUpsertOne) ClearDeletedAt() *ProductUpsertOne
- func (u *ProductUpsertOne) ClearExpiringTime() *ProductUpsertOne
- func (u *ProductUpsertOne) ClearIsExpiring() *ProductUpsertOne
- func (u *ProductUpsertOne) ClearIsUnique() *ProductUpsertOne
- func (u *ProductUpsertOne) ClearLimitedTill() *ProductUpsertOne
- func (u *ProductUpsertOne) DoNothing() *ProductUpsertOne
- func (u *ProductUpsertOne) Exec(ctx context.Context) error
- func (u *ProductUpsertOne) ExecX(ctx context.Context)
- func (u *ProductUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *ProductUpsertOne) IDX(ctx context.Context) int64
- func (u *ProductUpsertOne) Ignore() *ProductUpsertOne
- func (u *ProductUpsertOne) SetAppID(v string) *ProductUpsertOne
- func (u *ProductUpsertOne) SetCurrency(v string) *ProductUpsertOne
- func (u *ProductUpsertOne) SetDeletedAt(v time.Time) *ProductUpsertOne
- func (u *ProductUpsertOne) SetDescription(v string) *ProductUpsertOne
- func (u *ProductUpsertOne) SetExpiringTime(v time.Time) *ProductUpsertOne
- func (u *ProductUpsertOne) SetIsActive(v bool) *ProductUpsertOne
- func (u *ProductUpsertOne) SetIsExpiring(v bool) *ProductUpsertOne
- func (u *ProductUpsertOne) SetIsLimited(v bool) *ProductUpsertOne
- func (u *ProductUpsertOne) SetIsUnique(v bool) *ProductUpsertOne
- func (u *ProductUpsertOne) SetLeft(v int64) *ProductUpsertOne
- func (u *ProductUpsertOne) SetLimitedTill(v time.Time) *ProductUpsertOne
- func (u *ProductUpsertOne) SetName(v string) *ProductUpsertOne
- func (u *ProductUpsertOne) SetPaymentModel(v enum.PaymentModel) *ProductUpsertOne
- func (u *ProductUpsertOne) SetPrice(v decimal.Decimal) *ProductUpsertOne
- func (u *ProductUpsertOne) SetProductPeriod(v enum.ProductPeriod) *ProductUpsertOne
- func (u *ProductUpsertOne) SetUniqueLimit(v int64) *ProductUpsertOne
- func (u *ProductUpsertOne) SetUpdatedAt(v time.Time) *ProductUpsertOne
- func (u *ProductUpsertOne) Update(set func(*ProductUpsert)) *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateAppID() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateCurrency() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateDeletedAt() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateDescription() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateExpiringTime() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateIsActive() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateIsExpiring() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateIsLimited() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateIsUnique() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateLeft() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateLimitedTill() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateName() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateNewValues() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdatePaymentModel() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdatePrice() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateProductPeriod() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateUniqueLimit() *ProductUpsertOne
- func (u *ProductUpsertOne) UpdateUpdatedAt() *ProductUpsertOne
- type Products
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Subscriptions
- func (s *Subscriptions) QueryInvoices() *InvoiceQuery
- func (s *Subscriptions) QueryProduct() *ProductQuery
- func (s *Subscriptions) String() string
- func (s *Subscriptions) Unwrap() *Subscriptions
- func (s *Subscriptions) Update() *SubscriptionsUpdateOne
- func (s *Subscriptions) Value(name string) (ent.Value, error)
- type SubscriptionsClient
- func (c *SubscriptionsClient) Create() *SubscriptionsCreate
- func (c *SubscriptionsClient) CreateBulk(builders ...*SubscriptionsCreate) *SubscriptionsCreateBulk
- func (c *SubscriptionsClient) Delete() *SubscriptionsDelete
- func (c *SubscriptionsClient) DeleteOne(s *Subscriptions) *SubscriptionsDeleteOne
- func (c *SubscriptionsClient) DeleteOneID(id int64) *SubscriptionsDeleteOne
- func (c *SubscriptionsClient) Get(ctx context.Context, id int64) (*Subscriptions, error)
- func (c *SubscriptionsClient) GetX(ctx context.Context, id int64) *Subscriptions
- func (c *SubscriptionsClient) Hooks() []Hook
- func (c *SubscriptionsClient) Intercept(interceptors ...Interceptor)
- func (c *SubscriptionsClient) Interceptors() []Interceptor
- func (c *SubscriptionsClient) MapCreateBulk(slice any, setFunc func(*SubscriptionsCreate, int)) *SubscriptionsCreateBulk
- func (c *SubscriptionsClient) Query() *SubscriptionsQuery
- func (c *SubscriptionsClient) QueryInvoices(s *Subscriptions) *InvoiceQuery
- func (c *SubscriptionsClient) QueryProduct(s *Subscriptions) *ProductQuery
- func (c *SubscriptionsClient) Update() *SubscriptionsUpdate
- func (c *SubscriptionsClient) UpdateOne(s *Subscriptions) *SubscriptionsUpdateOne
- func (c *SubscriptionsClient) UpdateOneID(id int64) *SubscriptionsUpdateOne
- func (c *SubscriptionsClient) Use(hooks ...Hook)
- type SubscriptionsCreate
- func (sc *SubscriptionsCreate) AddInvoiceIDs(ids ...int64) *SubscriptionsCreate
- func (sc *SubscriptionsCreate) AddInvoices(i ...*Invoice) *SubscriptionsCreate
- func (sc *SubscriptionsCreate) Exec(ctx context.Context) error
- func (sc *SubscriptionsCreate) ExecX(ctx context.Context)
- func (sc *SubscriptionsCreate) Mutation() *SubscriptionsMutation
- func (sc *SubscriptionsCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionsUpsertOne
- func (sc *SubscriptionsCreate) OnConflictColumns(columns ...string) *SubscriptionsUpsertOne
- func (sc *SubscriptionsCreate) Save(ctx context.Context) (*Subscriptions, error)
- func (sc *SubscriptionsCreate) SaveX(ctx context.Context) *Subscriptions
- func (sc *SubscriptionsCreate) SetAppID(s string) *SubscriptionsCreate
- func (sc *SubscriptionsCreate) SetID(i int64) *SubscriptionsCreate
- func (sc *SubscriptionsCreate) SetProduct(p *Product) *SubscriptionsCreate
- func (sc *SubscriptionsCreate) SetProductID(i int64) *SubscriptionsCreate
- func (sc *SubscriptionsCreate) SetTenantID(i int64) *SubscriptionsCreate
- func (sc *SubscriptionsCreate) SetUserID(i int64) *SubscriptionsCreate
- type SubscriptionsCreateBulk
- func (scb *SubscriptionsCreateBulk) Exec(ctx context.Context) error
- func (scb *SubscriptionsCreateBulk) ExecX(ctx context.Context)
- func (scb *SubscriptionsCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionsUpsertBulk
- func (scb *SubscriptionsCreateBulk) OnConflictColumns(columns ...string) *SubscriptionsUpsertBulk
- func (scb *SubscriptionsCreateBulk) Save(ctx context.Context) ([]*Subscriptions, error)
- func (scb *SubscriptionsCreateBulk) SaveX(ctx context.Context) []*Subscriptions
- type SubscriptionsDelete
- type SubscriptionsDeleteOne
- type SubscriptionsEdges
- type SubscriptionsFilter
- func (f *SubscriptionsFilter) Where(p entql.P)
- func (f *SubscriptionsFilter) WhereAppID(p entql.StringP)
- func (f *SubscriptionsFilter) WhereHasInvoices()
- func (f *SubscriptionsFilter) WhereHasInvoicesWith(preds ...predicate.Invoice)
- func (f *SubscriptionsFilter) WhereHasProduct()
- func (f *SubscriptionsFilter) WhereHasProductWith(preds ...predicate.Product)
- func (f *SubscriptionsFilter) WhereID(p entql.Int64P)
- func (f *SubscriptionsFilter) WhereProductID(p entql.Int64P)
- func (f *SubscriptionsFilter) WhereTenantID(p entql.Int64P)
- func (f *SubscriptionsFilter) WhereUserID(p entql.Int64P)
- type SubscriptionsGroupBy
- func (sgb *SubscriptionsGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionsGroupBy
- func (s *SubscriptionsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionsGroupBy) BoolX(ctx context.Context) bool
- func (s *SubscriptionsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionsGroupBy) Float64X(ctx context.Context) float64
- func (s *SubscriptionsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionsGroupBy) IntX(ctx context.Context) int
- func (s *SubscriptionsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionsGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SubscriptionsGroupBy) Scan(ctx context.Context, v any) error
- func (s *SubscriptionsGroupBy) ScanX(ctx context.Context, v any)
- func (s *SubscriptionsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionsGroupBy) StringX(ctx context.Context) string
- func (s *SubscriptionsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionsGroupBy) StringsX(ctx context.Context) []string
- type SubscriptionsMutation
- func (m *SubscriptionsMutation) AddField(name string, value ent.Value) error
- func (m *SubscriptionsMutation) AddInvoiceIDs(ids ...int64)
- func (m *SubscriptionsMutation) AddTenantID(i int64)
- func (m *SubscriptionsMutation) AddUserID(i int64)
- func (m *SubscriptionsMutation) AddedEdges() []string
- func (m *SubscriptionsMutation) AddedField(name string) (ent.Value, bool)
- func (m *SubscriptionsMutation) AddedFields() []string
- func (m *SubscriptionsMutation) AddedIDs(name string) []ent.Value
- func (m *SubscriptionsMutation) AddedTenantID() (r int64, exists bool)
- func (m *SubscriptionsMutation) AddedUserID() (r int64, exists bool)
- func (m *SubscriptionsMutation) AppID() (r string, exists bool)
- func (m *SubscriptionsMutation) ClearEdge(name string) error
- func (m *SubscriptionsMutation) ClearField(name string) error
- func (m *SubscriptionsMutation) ClearInvoices()
- func (m *SubscriptionsMutation) ClearProduct()
- func (m *SubscriptionsMutation) ClearedEdges() []string
- func (m *SubscriptionsMutation) ClearedFields() []string
- func (m SubscriptionsMutation) Client() *Client
- func (m *SubscriptionsMutation) EdgeCleared(name string) bool
- func (m *SubscriptionsMutation) Field(name string) (ent.Value, bool)
- func (m *SubscriptionsMutation) FieldCleared(name string) bool
- func (m *SubscriptionsMutation) Fields() []string
- func (m *SubscriptionsMutation) Filter() *SubscriptionsFilter
- func (m *SubscriptionsMutation) ID() (id int64, exists bool)
- func (m *SubscriptionsMutation) IDs(ctx context.Context) ([]int64, error)
- func (m *SubscriptionsMutation) InvoicesCleared() bool
- func (m *SubscriptionsMutation) InvoicesIDs() (ids []int64)
- func (m *SubscriptionsMutation) OldAppID(ctx context.Context) (v string, err error)
- func (m *SubscriptionsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SubscriptionsMutation) OldProductID(ctx context.Context) (v int64, err error)
- func (m *SubscriptionsMutation) OldTenantID(ctx context.Context) (v int64, err error)
- func (m *SubscriptionsMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *SubscriptionsMutation) Op() Op
- func (m *SubscriptionsMutation) ProductCleared() bool
- func (m *SubscriptionsMutation) ProductID() (r int64, exists bool)
- func (m *SubscriptionsMutation) ProductIDs() (ids []int64)
- func (m *SubscriptionsMutation) RemoveInvoiceIDs(ids ...int64)
- func (m *SubscriptionsMutation) RemovedEdges() []string
- func (m *SubscriptionsMutation) RemovedIDs(name string) []ent.Value
- func (m *SubscriptionsMutation) RemovedInvoicesIDs() (ids []int64)
- func (m *SubscriptionsMutation) ResetAppID()
- func (m *SubscriptionsMutation) ResetEdge(name string) error
- func (m *SubscriptionsMutation) ResetField(name string) error
- func (m *SubscriptionsMutation) ResetInvoices()
- func (m *SubscriptionsMutation) ResetProduct()
- func (m *SubscriptionsMutation) ResetProductID()
- func (m *SubscriptionsMutation) ResetTenantID()
- func (m *SubscriptionsMutation) ResetUserID()
- func (m *SubscriptionsMutation) SetAppID(s string)
- func (m *SubscriptionsMutation) SetField(name string, value ent.Value) error
- func (m *SubscriptionsMutation) SetID(id int64)
- func (m *SubscriptionsMutation) SetOp(op Op)
- func (m *SubscriptionsMutation) SetProductID(i int64)
- func (m *SubscriptionsMutation) SetTenantID(i int64)
- func (m *SubscriptionsMutation) SetUserID(i int64)
- func (m *SubscriptionsMutation) TenantID() (r int64, exists bool)
- func (m SubscriptionsMutation) Tx() (*Tx, error)
- func (m *SubscriptionsMutation) Type() string
- func (m *SubscriptionsMutation) UserID() (r int64, exists bool)
- func (m *SubscriptionsMutation) Where(ps ...predicate.Subscriptions)
- func (m *SubscriptionsMutation) WhereP(ps ...func(*sql.Selector))
- type SubscriptionsQuery
- func (sq *SubscriptionsQuery) Aggregate(fns ...AggregateFunc) *SubscriptionsSelect
- func (sq *SubscriptionsQuery) All(ctx context.Context) ([]*Subscriptions, error)
- func (sq *SubscriptionsQuery) AllX(ctx context.Context) []*Subscriptions
- func (sq *SubscriptionsQuery) Clone() *SubscriptionsQuery
- func (sq *SubscriptionsQuery) Count(ctx context.Context) (int, error)
- func (sq *SubscriptionsQuery) CountX(ctx context.Context) int
- func (sq *SubscriptionsQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SubscriptionsQuery) ExistX(ctx context.Context) bool
- func (sq *SubscriptionsQuery) Filter() *SubscriptionsFilter
- func (sq *SubscriptionsQuery) First(ctx context.Context) (*Subscriptions, error)
- func (sq *SubscriptionsQuery) FirstID(ctx context.Context) (id int64, err error)
- func (sq *SubscriptionsQuery) FirstIDX(ctx context.Context) int64
- func (sq *SubscriptionsQuery) FirstX(ctx context.Context) *Subscriptions
- func (sq *SubscriptionsQuery) GroupBy(field string, fields ...string) *SubscriptionsGroupBy
- func (sq *SubscriptionsQuery) IDs(ctx context.Context) (ids []int64, err error)
- func (sq *SubscriptionsQuery) IDsX(ctx context.Context) []int64
- func (sq *SubscriptionsQuery) Limit(limit int) *SubscriptionsQuery
- func (sq *SubscriptionsQuery) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionsSelect
- func (sq *SubscriptionsQuery) Offset(offset int) *SubscriptionsQuery
- func (sq *SubscriptionsQuery) Only(ctx context.Context) (*Subscriptions, error)
- func (sq *SubscriptionsQuery) OnlyID(ctx context.Context) (id int64, err error)
- func (sq *SubscriptionsQuery) OnlyIDX(ctx context.Context) int64
- func (sq *SubscriptionsQuery) OnlyX(ctx context.Context) *Subscriptions
- func (sq *SubscriptionsQuery) Order(o ...subscriptions.OrderOption) *SubscriptionsQuery
- func (sq *SubscriptionsQuery) QueryInvoices() *InvoiceQuery
- func (sq *SubscriptionsQuery) QueryProduct() *ProductQuery
- func (sq *SubscriptionsQuery) Select(fields ...string) *SubscriptionsSelect
- func (sq *SubscriptionsQuery) Unique(unique bool) *SubscriptionsQuery
- func (sq *SubscriptionsQuery) Where(ps ...predicate.Subscriptions) *SubscriptionsQuery
- func (sq *SubscriptionsQuery) WithInvoices(opts ...func(*InvoiceQuery)) *SubscriptionsQuery
- func (sq *SubscriptionsQuery) WithProduct(opts ...func(*ProductQuery)) *SubscriptionsQuery
- type SubscriptionsSelect
- func (ss *SubscriptionsSelect) Aggregate(fns ...AggregateFunc) *SubscriptionsSelect
- func (s *SubscriptionsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscriptionsSelect) BoolX(ctx context.Context) bool
- func (s *SubscriptionsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscriptionsSelect) BoolsX(ctx context.Context) []bool
- func (s *SubscriptionsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscriptionsSelect) Float64X(ctx context.Context) float64
- func (s *SubscriptionsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscriptionsSelect) Float64sX(ctx context.Context) []float64
- func (s *SubscriptionsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SubscriptionsSelect) IntX(ctx context.Context) int
- func (s *SubscriptionsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SubscriptionsSelect) IntsX(ctx context.Context) []int
- func (ss *SubscriptionsSelect) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionsSelect
- func (ss *SubscriptionsSelect) Scan(ctx context.Context, v any) error
- func (s *SubscriptionsSelect) ScanX(ctx context.Context, v any)
- func (s *SubscriptionsSelect) String(ctx context.Context) (_ string, err error)
- func (s *SubscriptionsSelect) StringX(ctx context.Context) string
- func (s *SubscriptionsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SubscriptionsSelect) StringsX(ctx context.Context) []string
- type SubscriptionsSlice
- type SubscriptionsUpdate
- func (su *SubscriptionsUpdate) AddInvoiceIDs(ids ...int64) *SubscriptionsUpdate
- func (su *SubscriptionsUpdate) AddInvoices(i ...*Invoice) *SubscriptionsUpdate
- func (su *SubscriptionsUpdate) ClearInvoices() *SubscriptionsUpdate
- func (su *SubscriptionsUpdate) Exec(ctx context.Context) error
- func (su *SubscriptionsUpdate) ExecX(ctx context.Context)
- func (su *SubscriptionsUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionsUpdate
- func (su *SubscriptionsUpdate) Mutation() *SubscriptionsMutation
- func (su *SubscriptionsUpdate) RemoveInvoiceIDs(ids ...int64) *SubscriptionsUpdate
- func (su *SubscriptionsUpdate) RemoveInvoices(i ...*Invoice) *SubscriptionsUpdate
- func (su *SubscriptionsUpdate) Save(ctx context.Context) (int, error)
- func (su *SubscriptionsUpdate) SaveX(ctx context.Context) int
- func (su *SubscriptionsUpdate) Where(ps ...predicate.Subscriptions) *SubscriptionsUpdate
- type SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) AddInvoiceIDs(ids ...int64) *SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) AddInvoices(i ...*Invoice) *SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) ClearInvoices() *SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) Exec(ctx context.Context) error
- func (suo *SubscriptionsUpdateOne) ExecX(ctx context.Context)
- func (suo *SubscriptionsUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) Mutation() *SubscriptionsMutation
- func (suo *SubscriptionsUpdateOne) RemoveInvoiceIDs(ids ...int64) *SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) RemoveInvoices(i ...*Invoice) *SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) Save(ctx context.Context) (*Subscriptions, error)
- func (suo *SubscriptionsUpdateOne) SaveX(ctx context.Context) *Subscriptions
- func (suo *SubscriptionsUpdateOne) Select(field string, fields ...string) *SubscriptionsUpdateOne
- func (suo *SubscriptionsUpdateOne) Where(ps ...predicate.Subscriptions) *SubscriptionsUpdateOne
- type SubscriptionsUpsert
- type SubscriptionsUpsertBulk
- func (u *SubscriptionsUpsertBulk) DoNothing() *SubscriptionsUpsertBulk
- func (u *SubscriptionsUpsertBulk) Exec(ctx context.Context) error
- func (u *SubscriptionsUpsertBulk) ExecX(ctx context.Context)
- func (u *SubscriptionsUpsertBulk) Ignore() *SubscriptionsUpsertBulk
- func (u *SubscriptionsUpsertBulk) Update(set func(*SubscriptionsUpsert)) *SubscriptionsUpsertBulk
- func (u *SubscriptionsUpsertBulk) UpdateNewValues() *SubscriptionsUpsertBulk
- type SubscriptionsUpsertOne
- func (u *SubscriptionsUpsertOne) DoNothing() *SubscriptionsUpsertOne
- func (u *SubscriptionsUpsertOne) Exec(ctx context.Context) error
- func (u *SubscriptionsUpsertOne) ExecX(ctx context.Context)
- func (u *SubscriptionsUpsertOne) ID(ctx context.Context) (id int64, err error)
- func (u *SubscriptionsUpsertOne) IDX(ctx context.Context) int64
- func (u *SubscriptionsUpsertOne) Ignore() *SubscriptionsUpsertOne
- func (u *SubscriptionsUpsertOne) Update(set func(*SubscriptionsUpsert)) *SubscriptionsUpsertOne
- func (u *SubscriptionsUpsertOne) UpdateNewValues() *SubscriptionsUpsertOne
- 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. TypeBundle = "Bundle" TypeInvoice = "Invoice" TypeItem = "Item" TypePaymentProfile = "PaymentProfile" TypeProduct = "Product" TypeProductReservation = "ProductReservation" TypeSubscriptions = "Subscriptions" )
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 Bundle ¶
type Bundle struct {
// ID of the ent.
ID int64 `json:"id,omitempty"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,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 int64 `json:"product_id,omitempty"`
// ItemID holds the value of the "item_id" field.
ItemID int64 `json:"item_id,omitempty"`
// Amount holds the value of the "amount" field.
Amount float64 `json:"amount,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the BundleQuery when eager-loading is set.
Edges BundleEdges `json:"edges"`
// contains filtered or unexported fields
}
Bundle is the model entity for the Bundle schema.
func (*Bundle) QueryProduct ¶
func (b *Bundle) QueryProduct() *ProductQuery
QueryProduct queries the "product" edge of the Bundle entity.
func (*Bundle) Unwrap ¶
Unwrap unwraps the Bundle 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 (*Bundle) Update ¶
func (b *Bundle) Update() *BundleUpdateOne
Update returns a builder for updating this Bundle. Note that you need to call Bundle.Unwrap() before calling this method if this Bundle was returned from a transaction, and the transaction was committed or rolled back.
type BundleClient ¶
type BundleClient struct {
// contains filtered or unexported fields
}
BundleClient is a client for the Bundle schema.
func NewBundleClient ¶
func NewBundleClient(c config) *BundleClient
NewBundleClient returns a client for the Bundle from the given config.
func (*BundleClient) Create ¶
func (c *BundleClient) Create() *BundleCreate
Create returns a builder for creating a Bundle entity.
func (*BundleClient) CreateBulk ¶
func (c *BundleClient) CreateBulk(builders ...*BundleCreate) *BundleCreateBulk
CreateBulk returns a builder for creating a bulk of Bundle entities.
func (*BundleClient) Delete ¶
func (c *BundleClient) Delete() *BundleDelete
Delete returns a delete builder for Bundle.
func (*BundleClient) DeleteOne ¶
func (c *BundleClient) DeleteOne(b *Bundle) *BundleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BundleClient) DeleteOneID ¶
func (c *BundleClient) DeleteOneID(id int64) *BundleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BundleClient) GetX ¶
func (c *BundleClient) GetX(ctx context.Context, id int64) *Bundle
GetX is like Get, but panics if an error occurs.
func (*BundleClient) Intercept ¶
func (c *BundleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `bundle.Intercept(f(g(h())))`.
func (*BundleClient) Interceptors ¶
func (c *BundleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BundleClient) MapCreateBulk ¶
func (c *BundleClient) MapCreateBulk(slice any, setFunc func(*BundleCreate, int)) *BundleCreateBulk
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 (*BundleClient) Query ¶
func (c *BundleClient) Query() *BundleQuery
Query returns a query builder for Bundle.
func (*BundleClient) QueryItem ¶
func (c *BundleClient) QueryItem(b *Bundle) *ItemQuery
QueryItem queries the item edge of a Bundle.
func (*BundleClient) QueryProduct ¶
func (c *BundleClient) QueryProduct(b *Bundle) *ProductQuery
QueryProduct queries the product edge of a Bundle.
func (*BundleClient) Update ¶
func (c *BundleClient) Update() *BundleUpdate
Update returns an update builder for Bundle.
func (*BundleClient) UpdateOne ¶
func (c *BundleClient) UpdateOne(b *Bundle) *BundleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BundleClient) UpdateOneID ¶
func (c *BundleClient) UpdateOneID(id int64) *BundleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BundleClient) Use ¶
func (c *BundleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `bundle.Hooks(f(g(h())))`.
type BundleCreate ¶
type BundleCreate struct {
// contains filtered or unexported fields
}
BundleCreate is the builder for creating a Bundle entity.
func (*BundleCreate) Exec ¶
func (bc *BundleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BundleCreate) ExecX ¶
func (bc *BundleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BundleCreate) Mutation ¶
func (bc *BundleCreate) Mutation() *BundleMutation
Mutation returns the BundleMutation object of the builder.
func (*BundleCreate) OnConflict ¶
func (bc *BundleCreate) OnConflict(opts ...sql.ConflictOption) *BundleUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Bundle.Create().
SetDeletedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.BundleUpsert) {
SetDeletedAt(v+v).
}).
Exec(ctx)
func (*BundleCreate) OnConflictColumns ¶
func (bc *BundleCreate) OnConflictColumns(columns ...string) *BundleUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Bundle.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*BundleCreate) Save ¶
func (bc *BundleCreate) Save(ctx context.Context) (*Bundle, error)
Save creates the Bundle in the database.
func (*BundleCreate) SaveX ¶
func (bc *BundleCreate) SaveX(ctx context.Context) *Bundle
SaveX calls Save and panics if Save returns an error.
func (*BundleCreate) SetAmount ¶
func (bc *BundleCreate) SetAmount(f float64) *BundleCreate
SetAmount sets the "amount" field.
func (*BundleCreate) SetCreatedAt ¶
func (bc *BundleCreate) SetCreatedAt(t time.Time) *BundleCreate
SetCreatedAt sets the "created_at" field.
func (*BundleCreate) SetDeletedAt ¶
func (bc *BundleCreate) SetDeletedAt(t time.Time) *BundleCreate
SetDeletedAt sets the "deleted_at" field.
func (*BundleCreate) SetID ¶
func (bc *BundleCreate) SetID(i int64) *BundleCreate
SetID sets the "id" field.
func (*BundleCreate) SetItem ¶
func (bc *BundleCreate) SetItem(i *Item) *BundleCreate
SetItem sets the "item" edge to the Item entity.
func (*BundleCreate) SetItemID ¶
func (bc *BundleCreate) SetItemID(i int64) *BundleCreate
SetItemID sets the "item_id" field.
func (*BundleCreate) SetNillableAmount ¶
func (bc *BundleCreate) SetNillableAmount(f *float64) *BundleCreate
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*BundleCreate) SetNillableCreatedAt ¶
func (bc *BundleCreate) SetNillableCreatedAt(t *time.Time) *BundleCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BundleCreate) SetNillableDeletedAt ¶
func (bc *BundleCreate) SetNillableDeletedAt(t *time.Time) *BundleCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BundleCreate) SetNillableUpdatedAt ¶
func (bc *BundleCreate) SetNillableUpdatedAt(t *time.Time) *BundleCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*BundleCreate) SetProduct ¶
func (bc *BundleCreate) SetProduct(p *Product) *BundleCreate
SetProduct sets the "product" edge to the Product entity.
func (*BundleCreate) SetProductID ¶
func (bc *BundleCreate) SetProductID(i int64) *BundleCreate
SetProductID sets the "product_id" field.
func (*BundleCreate) SetUpdatedAt ¶
func (bc *BundleCreate) SetUpdatedAt(t time.Time) *BundleCreate
SetUpdatedAt sets the "updated_at" field.
type BundleCreateBulk ¶
type BundleCreateBulk struct {
// contains filtered or unexported fields
}
BundleCreateBulk is the builder for creating many Bundle entities in bulk.
func (*BundleCreateBulk) Exec ¶
func (bcb *BundleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BundleCreateBulk) ExecX ¶
func (bcb *BundleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BundleCreateBulk) OnConflict ¶
func (bcb *BundleCreateBulk) OnConflict(opts ...sql.ConflictOption) *BundleUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Bundle.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.BundleUpsert) {
SetDeletedAt(v+v).
}).
Exec(ctx)
func (*BundleCreateBulk) OnConflictColumns ¶
func (bcb *BundleCreateBulk) OnConflictColumns(columns ...string) *BundleUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Bundle.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type BundleDelete ¶
type BundleDelete struct {
// contains filtered or unexported fields
}
BundleDelete is the builder for deleting a Bundle entity.
func (*BundleDelete) Exec ¶
func (bd *BundleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BundleDelete) ExecX ¶
func (bd *BundleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BundleDelete) Where ¶
func (bd *BundleDelete) Where(ps ...predicate.Bundle) *BundleDelete
Where appends a list predicates to the BundleDelete builder.
type BundleDeleteOne ¶
type BundleDeleteOne struct {
// contains filtered or unexported fields
}
BundleDeleteOne is the builder for deleting a single Bundle entity.
func (*BundleDeleteOne) Exec ¶
func (bdo *BundleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BundleDeleteOne) ExecX ¶
func (bdo *BundleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BundleDeleteOne) Where ¶
func (bdo *BundleDeleteOne) Where(ps ...predicate.Bundle) *BundleDeleteOne
Where appends a list predicates to the BundleDelete builder.
type BundleEdges ¶
type BundleEdges struct {
// Product holds the value of the product edge.
Product *Product `json:"product,omitempty"`
// Item holds the value of the item edge.
Item *Item `json:"item,omitempty"`
// contains filtered or unexported fields
}
BundleEdges holds the relations/edges for other nodes in the graph.
func (BundleEdges) ItemOrErr ¶
func (e BundleEdges) ItemOrErr() (*Item, error)
ItemOrErr returns the Item value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (BundleEdges) ProductOrErr ¶
func (e BundleEdges) 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 BundleFilter ¶
type BundleFilter struct {
// contains filtered or unexported fields
}
BundleFilter provides a generic filtering capability at runtime for BundleQuery.
func (*BundleFilter) Where ¶
func (f *BundleFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*BundleFilter) WhereAmount ¶
func (f *BundleFilter) WhereAmount(p entql.Float64P)
WhereAmount applies the entql float64 predicate on the amount field.
func (*BundleFilter) WhereCreatedAt ¶
func (f *BundleFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*BundleFilter) WhereDeletedAt ¶
func (f *BundleFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*BundleFilter) WhereHasItem ¶
func (f *BundleFilter) WhereHasItem()
WhereHasItem applies a predicate to check if query has an edge item.
func (*BundleFilter) WhereHasItemWith ¶
func (f *BundleFilter) WhereHasItemWith(preds ...predicate.Item)
WhereHasItemWith applies a predicate to check if query has an edge item with a given conditions (other predicates).
func (*BundleFilter) WhereHasProduct ¶
func (f *BundleFilter) WhereHasProduct()
WhereHasProduct applies a predicate to check if query has an edge product.
func (*BundleFilter) WhereHasProductWith ¶
func (f *BundleFilter) WhereHasProductWith(preds ...predicate.Product)
WhereHasProductWith applies a predicate to check if query has an edge product with a given conditions (other predicates).
func (*BundleFilter) WhereID ¶
func (f *BundleFilter) WhereID(p entql.Int64P)
WhereID applies the entql int64 predicate on the id field.
func (*BundleFilter) WhereItemID ¶
func (f *BundleFilter) WhereItemID(p entql.Int64P)
WhereItemID applies the entql int64 predicate on the item_id field.
func (*BundleFilter) WhereProductID ¶
func (f *BundleFilter) WhereProductID(p entql.Int64P)
WhereProductID applies the entql int64 predicate on the product_id field.
func (*BundleFilter) WhereUpdatedAt ¶
func (f *BundleFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type BundleGroupBy ¶
type BundleGroupBy struct {
// contains filtered or unexported fields
}
BundleGroupBy is the group-by builder for Bundle entities.
func (*BundleGroupBy) Aggregate ¶
func (bgb *BundleGroupBy) Aggregate(fns ...AggregateFunc) *BundleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BundleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BundleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BundleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BundleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BundleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BundleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BundleGroupBy) Scan ¶
func (bgb *BundleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BundleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BundleMutation ¶
type BundleMutation struct {
// contains filtered or unexported fields
}
BundleMutation represents an operation that mutates the Bundle nodes in the graph.
func (*BundleMutation) AddAmount ¶
func (m *BundleMutation) AddAmount(f float64)
AddAmount adds f to the "amount" field.
func (*BundleMutation) AddField ¶
func (m *BundleMutation) 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 (*BundleMutation) AddedAmount ¶
func (m *BundleMutation) AddedAmount() (r float64, exists bool)
AddedAmount returns the value that was added to the "amount" field in this mutation.
func (*BundleMutation) AddedEdges ¶
func (m *BundleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BundleMutation) AddedField ¶
func (m *BundleMutation) 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 (*BundleMutation) AddedFields ¶
func (m *BundleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BundleMutation) AddedIDs ¶
func (m *BundleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BundleMutation) Amount ¶
func (m *BundleMutation) Amount() (r float64, exists bool)
Amount returns the value of the "amount" field in the mutation.
func (*BundleMutation) ClearDeletedAt ¶
func (m *BundleMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BundleMutation) ClearEdge ¶
func (m *BundleMutation) 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 (*BundleMutation) ClearField ¶
func (m *BundleMutation) 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 (*BundleMutation) ClearItem ¶
func (m *BundleMutation) ClearItem()
ClearItem clears the "item" edge to the Item entity.
func (*BundleMutation) ClearProduct ¶
func (m *BundleMutation) ClearProduct()
ClearProduct clears the "product" edge to the Product entity.
func (*BundleMutation) ClearedEdges ¶
func (m *BundleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BundleMutation) ClearedFields ¶
func (m *BundleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BundleMutation) Client ¶
func (m BundleMutation) 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 (*BundleMutation) CreatedAt ¶
func (m *BundleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*BundleMutation) DeletedAt ¶
func (m *BundleMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*BundleMutation) DeletedAtCleared ¶
func (m *BundleMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*BundleMutation) EdgeCleared ¶
func (m *BundleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BundleMutation) Field ¶
func (m *BundleMutation) 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 (*BundleMutation) FieldCleared ¶
func (m *BundleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BundleMutation) Fields ¶
func (m *BundleMutation) 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 (*BundleMutation) Filter ¶
func (m *BundleMutation) Filter() *BundleFilter
Filter returns an entql.Where implementation to apply filters on the BundleMutation builder.
func (*BundleMutation) ID ¶
func (m *BundleMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BundleMutation) IDs ¶
func (m *BundleMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BundleMutation) ItemCleared ¶
func (m *BundleMutation) ItemCleared() bool
ItemCleared reports if the "item" edge to the Item entity was cleared.
func (*BundleMutation) ItemID ¶
func (m *BundleMutation) ItemID() (r int64, exists bool)
ItemID returns the value of the "item_id" field in the mutation.
func (*BundleMutation) ItemIDs ¶
func (m *BundleMutation) ItemIDs() (ids []int64)
ItemIDs returns the "item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ItemID instead. It exists only for internal usage by the builders.
func (*BundleMutation) OldAmount ¶
func (m *BundleMutation) OldAmount(ctx context.Context) (v float64, err error)
OldAmount returns the old "amount" field's value of the Bundle entity. If the Bundle 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 (*BundleMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Bundle entity. If the Bundle 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 (*BundleMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Bundle entity. If the Bundle 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 (*BundleMutation) 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 (*BundleMutation) OldItemID ¶
func (m *BundleMutation) OldItemID(ctx context.Context) (v int64, err error)
OldItemID returns the old "item_id" field's value of the Bundle entity. If the Bundle 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 (*BundleMutation) OldProductID ¶
func (m *BundleMutation) OldProductID(ctx context.Context) (v int64, err error)
OldProductID returns the old "product_id" field's value of the Bundle entity. If the Bundle 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 (*BundleMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Bundle entity. If the Bundle 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 (*BundleMutation) ProductCleared ¶
func (m *BundleMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the Product entity was cleared.
func (*BundleMutation) ProductID ¶
func (m *BundleMutation) ProductID() (r int64, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*BundleMutation) ProductIDs ¶
func (m *BundleMutation) ProductIDs() (ids []int64)
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 (*BundleMutation) RemovedEdges ¶
func (m *BundleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BundleMutation) RemovedIDs ¶
func (m *BundleMutation) 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 (*BundleMutation) ResetAmount ¶
func (m *BundleMutation) ResetAmount()
ResetAmount resets all changes to the "amount" field.
func (*BundleMutation) ResetCreatedAt ¶
func (m *BundleMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*BundleMutation) ResetDeletedAt ¶
func (m *BundleMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*BundleMutation) ResetEdge ¶
func (m *BundleMutation) 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 (*BundleMutation) ResetField ¶
func (m *BundleMutation) 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 (*BundleMutation) ResetItem ¶
func (m *BundleMutation) ResetItem()
ResetItem resets all changes to the "item" edge.
func (*BundleMutation) ResetItemID ¶
func (m *BundleMutation) ResetItemID()
ResetItemID resets all changes to the "item_id" field.
func (*BundleMutation) ResetProduct ¶
func (m *BundleMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*BundleMutation) ResetProductID ¶
func (m *BundleMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*BundleMutation) ResetUpdatedAt ¶
func (m *BundleMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*BundleMutation) SetAmount ¶
func (m *BundleMutation) SetAmount(f float64)
SetAmount sets the "amount" field.
func (*BundleMutation) SetCreatedAt ¶
func (m *BundleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*BundleMutation) SetDeletedAt ¶
func (m *BundleMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*BundleMutation) SetField ¶
func (m *BundleMutation) 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 (*BundleMutation) SetID ¶
func (m *BundleMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Bundle entities.
func (*BundleMutation) SetItemID ¶
func (m *BundleMutation) SetItemID(i int64)
SetItemID sets the "item_id" field.
func (*BundleMutation) SetOp ¶
func (m *BundleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BundleMutation) SetProductID ¶
func (m *BundleMutation) SetProductID(i int64)
SetProductID sets the "product_id" field.
func (*BundleMutation) SetUpdatedAt ¶
func (m *BundleMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (BundleMutation) Tx ¶
func (m BundleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BundleMutation) Type ¶
func (m *BundleMutation) Type() string
Type returns the node type of this mutation (Bundle).
func (*BundleMutation) UpdatedAt ¶
func (m *BundleMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*BundleMutation) Where ¶
func (m *BundleMutation) Where(ps ...predicate.Bundle)
Where appends a list predicates to the BundleMutation builder.
func (*BundleMutation) WhereP ¶
func (m *BundleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BundleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BundleQuery ¶
type BundleQuery struct {
// contains filtered or unexported fields
}
BundleQuery is the builder for querying Bundle entities.
func (*BundleQuery) Aggregate ¶
func (bq *BundleQuery) Aggregate(fns ...AggregateFunc) *BundleSelect
Aggregate returns a BundleSelect configured with the given aggregations.
func (*BundleQuery) All ¶
func (bq *BundleQuery) All(ctx context.Context) ([]*Bundle, error)
All executes the query and returns a list of Bundles.
func (*BundleQuery) AllX ¶
func (bq *BundleQuery) AllX(ctx context.Context) []*Bundle
AllX is like All, but panics if an error occurs.
func (*BundleQuery) Clone ¶
func (bq *BundleQuery) Clone() *BundleQuery
Clone returns a duplicate of the BundleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BundleQuery) Count ¶
func (bq *BundleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BundleQuery) CountX ¶
func (bq *BundleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BundleQuery) Exist ¶
func (bq *BundleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BundleQuery) ExistX ¶
func (bq *BundleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BundleQuery) Filter ¶
func (bq *BundleQuery) Filter() *BundleFilter
Filter returns a Filter implementation to apply filters on the BundleQuery builder.
func (*BundleQuery) First ¶
func (bq *BundleQuery) First(ctx context.Context) (*Bundle, error)
First returns the first Bundle entity from the query. Returns a *NotFoundError when no Bundle was found.
func (*BundleQuery) FirstID ¶
func (bq *BundleQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Bundle ID from the query. Returns a *NotFoundError when no Bundle ID was found.
func (*BundleQuery) FirstIDX ¶
func (bq *BundleQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*BundleQuery) FirstX ¶
func (bq *BundleQuery) FirstX(ctx context.Context) *Bundle
FirstX is like First, but panics if an error occurs.
func (*BundleQuery) GroupBy ¶
func (bq *BundleQuery) GroupBy(field string, fields ...string) *BundleGroupBy
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 {
DeletedAt time.Time `json:"deleted_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Bundle.Query().
GroupBy(bundle.FieldDeletedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*BundleQuery) IDs ¶
func (bq *BundleQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Bundle IDs.
func (*BundleQuery) IDsX ¶
func (bq *BundleQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*BundleQuery) Limit ¶
func (bq *BundleQuery) Limit(limit int) *BundleQuery
Limit the number of records to be returned by this query.
func (*BundleQuery) Modify ¶
func (bq *BundleQuery) Modify(modifiers ...func(s *sql.Selector)) *BundleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*BundleQuery) Offset ¶
func (bq *BundleQuery) Offset(offset int) *BundleQuery
Offset to start from.
func (*BundleQuery) Only ¶
func (bq *BundleQuery) Only(ctx context.Context) (*Bundle, error)
Only returns a single Bundle entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Bundle entity is found. Returns a *NotFoundError when no Bundle entities are found.
func (*BundleQuery) OnlyID ¶
func (bq *BundleQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Bundle ID in the query. Returns a *NotSingularError when more than one Bundle ID is found. Returns a *NotFoundError when no entities are found.
func (*BundleQuery) OnlyIDX ¶
func (bq *BundleQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BundleQuery) OnlyX ¶
func (bq *BundleQuery) OnlyX(ctx context.Context) *Bundle
OnlyX is like Only, but panics if an error occurs.
func (*BundleQuery) Order ¶
func (bq *BundleQuery) Order(o ...bundle.OrderOption) *BundleQuery
Order specifies how the records should be ordered.
func (*BundleQuery) QueryItem ¶
func (bq *BundleQuery) QueryItem() *ItemQuery
QueryItem chains the current query on the "item" edge.
func (*BundleQuery) QueryProduct ¶
func (bq *BundleQuery) QueryProduct() *ProductQuery
QueryProduct chains the current query on the "product" edge.
func (*BundleQuery) Select ¶
func (bq *BundleQuery) Select(fields ...string) *BundleSelect
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 {
DeletedAt time.Time `json:"deleted_at,omitempty"`
}
client.Bundle.Query().
Select(bundle.FieldDeletedAt).
Scan(ctx, &v)
func (*BundleQuery) Unique ¶
func (bq *BundleQuery) Unique(unique bool) *BundleQuery
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 (*BundleQuery) Where ¶
func (bq *BundleQuery) Where(ps ...predicate.Bundle) *BundleQuery
Where adds a new predicate for the BundleQuery builder.
func (*BundleQuery) WithItem ¶
func (bq *BundleQuery) WithItem(opts ...func(*ItemQuery)) *BundleQuery
WithItem tells the query-builder to eager-load the nodes that are connected to the "item" edge. The optional arguments are used to configure the query builder of the edge.
func (*BundleQuery) WithProduct ¶
func (bq *BundleQuery) WithProduct(opts ...func(*ProductQuery)) *BundleQuery
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 BundleSelect ¶
type BundleSelect struct {
*BundleQuery
// contains filtered or unexported fields
}
BundleSelect is the builder for selecting fields of Bundle entities.
func (*BundleSelect) Aggregate ¶
func (bs *BundleSelect) Aggregate(fns ...AggregateFunc) *BundleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BundleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BundleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BundleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BundleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BundleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BundleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BundleSelect) Modify ¶
func (bs *BundleSelect) Modify(modifiers ...func(s *sql.Selector)) *BundleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*BundleSelect) Scan ¶
func (bs *BundleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BundleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BundleUpdate ¶
type BundleUpdate struct {
// contains filtered or unexported fields
}
BundleUpdate is the builder for updating Bundle entities.
func (*BundleUpdate) AddAmount ¶
func (bu *BundleUpdate) AddAmount(f float64) *BundleUpdate
AddAmount adds f to the "amount" field.
func (*BundleUpdate) ClearDeletedAt ¶
func (bu *BundleUpdate) ClearDeletedAt() *BundleUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BundleUpdate) Exec ¶
func (bu *BundleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BundleUpdate) ExecX ¶
func (bu *BundleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BundleUpdate) Modify ¶
func (bu *BundleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *BundleUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*BundleUpdate) Mutation ¶
func (bu *BundleUpdate) Mutation() *BundleMutation
Mutation returns the BundleMutation object of the builder.
func (*BundleUpdate) Save ¶
func (bu *BundleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BundleUpdate) SaveX ¶
func (bu *BundleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BundleUpdate) SetAmount ¶
func (bu *BundleUpdate) SetAmount(f float64) *BundleUpdate
SetAmount sets the "amount" field.
func (*BundleUpdate) SetDeletedAt ¶
func (bu *BundleUpdate) SetDeletedAt(t time.Time) *BundleUpdate
SetDeletedAt sets the "deleted_at" field.
func (*BundleUpdate) SetNillableAmount ¶
func (bu *BundleUpdate) SetNillableAmount(f *float64) *BundleUpdate
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*BundleUpdate) SetNillableDeletedAt ¶
func (bu *BundleUpdate) SetNillableDeletedAt(t *time.Time) *BundleUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BundleUpdate) SetUpdatedAt ¶
func (bu *BundleUpdate) SetUpdatedAt(t time.Time) *BundleUpdate
SetUpdatedAt sets the "updated_at" field.
func (*BundleUpdate) Where ¶
func (bu *BundleUpdate) Where(ps ...predicate.Bundle) *BundleUpdate
Where appends a list predicates to the BundleUpdate builder.
type BundleUpdateOne ¶
type BundleUpdateOne struct {
// contains filtered or unexported fields
}
BundleUpdateOne is the builder for updating a single Bundle entity.
func (*BundleUpdateOne) AddAmount ¶
func (buo *BundleUpdateOne) AddAmount(f float64) *BundleUpdateOne
AddAmount adds f to the "amount" field.
func (*BundleUpdateOne) ClearDeletedAt ¶
func (buo *BundleUpdateOne) ClearDeletedAt() *BundleUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BundleUpdateOne) Exec ¶
func (buo *BundleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BundleUpdateOne) ExecX ¶
func (buo *BundleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BundleUpdateOne) Modify ¶
func (buo *BundleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *BundleUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*BundleUpdateOne) Mutation ¶
func (buo *BundleUpdateOne) Mutation() *BundleMutation
Mutation returns the BundleMutation object of the builder.
func (*BundleUpdateOne) Save ¶
func (buo *BundleUpdateOne) Save(ctx context.Context) (*Bundle, error)
Save executes the query and returns the updated Bundle entity.
func (*BundleUpdateOne) SaveX ¶
func (buo *BundleUpdateOne) SaveX(ctx context.Context) *Bundle
SaveX is like Save, but panics if an error occurs.
func (*BundleUpdateOne) Select ¶
func (buo *BundleUpdateOne) Select(field string, fields ...string) *BundleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BundleUpdateOne) SetAmount ¶
func (buo *BundleUpdateOne) SetAmount(f float64) *BundleUpdateOne
SetAmount sets the "amount" field.
func (*BundleUpdateOne) SetDeletedAt ¶
func (buo *BundleUpdateOne) SetDeletedAt(t time.Time) *BundleUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*BundleUpdateOne) SetNillableAmount ¶
func (buo *BundleUpdateOne) SetNillableAmount(f *float64) *BundleUpdateOne
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*BundleUpdateOne) SetNillableDeletedAt ¶
func (buo *BundleUpdateOne) SetNillableDeletedAt(t *time.Time) *BundleUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BundleUpdateOne) SetUpdatedAt ¶
func (buo *BundleUpdateOne) SetUpdatedAt(t time.Time) *BundleUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*BundleUpdateOne) Where ¶
func (buo *BundleUpdateOne) Where(ps ...predicate.Bundle) *BundleUpdateOne
Where appends a list predicates to the BundleUpdate builder.
type BundleUpsert ¶
BundleUpsert is the "OnConflict" setter.
func (*BundleUpsert) AddAmount ¶
func (u *BundleUpsert) AddAmount(v float64) *BundleUpsert
AddAmount adds v to the "amount" field.
func (*BundleUpsert) ClearDeletedAt ¶
func (u *BundleUpsert) ClearDeletedAt() *BundleUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BundleUpsert) SetAmount ¶
func (u *BundleUpsert) SetAmount(v float64) *BundleUpsert
SetAmount sets the "amount" field.
func (*BundleUpsert) SetDeletedAt ¶
func (u *BundleUpsert) SetDeletedAt(v time.Time) *BundleUpsert
SetDeletedAt sets the "deleted_at" field.
func (*BundleUpsert) SetUpdatedAt ¶
func (u *BundleUpsert) SetUpdatedAt(v time.Time) *BundleUpsert
SetUpdatedAt sets the "updated_at" field.
func (*BundleUpsert) UpdateAmount ¶
func (u *BundleUpsert) UpdateAmount() *BundleUpsert
UpdateAmount sets the "amount" field to the value that was provided on create.
func (*BundleUpsert) UpdateDeletedAt ¶
func (u *BundleUpsert) UpdateDeletedAt() *BundleUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*BundleUpsert) UpdateUpdatedAt ¶
func (u *BundleUpsert) UpdateUpdatedAt() *BundleUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type BundleUpsertBulk ¶
type BundleUpsertBulk struct {
// contains filtered or unexported fields
}
BundleUpsertBulk is the builder for "upsert"-ing a bulk of Bundle nodes.
func (*BundleUpsertBulk) AddAmount ¶
func (u *BundleUpsertBulk) AddAmount(v float64) *BundleUpsertBulk
AddAmount adds v to the "amount" field.
func (*BundleUpsertBulk) ClearDeletedAt ¶
func (u *BundleUpsertBulk) ClearDeletedAt() *BundleUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BundleUpsertBulk) DoNothing ¶
func (u *BundleUpsertBulk) DoNothing() *BundleUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BundleUpsertBulk) Exec ¶
func (u *BundleUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BundleUpsertBulk) ExecX ¶
func (u *BundleUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BundleUpsertBulk) Ignore ¶
func (u *BundleUpsertBulk) Ignore() *BundleUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Bundle.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BundleUpsertBulk) SetAmount ¶
func (u *BundleUpsertBulk) SetAmount(v float64) *BundleUpsertBulk
SetAmount sets the "amount" field.
func (*BundleUpsertBulk) SetDeletedAt ¶
func (u *BundleUpsertBulk) SetDeletedAt(v time.Time) *BundleUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*BundleUpsertBulk) SetUpdatedAt ¶
func (u *BundleUpsertBulk) SetUpdatedAt(v time.Time) *BundleUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*BundleUpsertBulk) Update ¶
func (u *BundleUpsertBulk) Update(set func(*BundleUpsert)) *BundleUpsertBulk
Update allows overriding fields `UPDATE` values. See the BundleCreateBulk.OnConflict documentation for more info.
func (*BundleUpsertBulk) UpdateAmount ¶
func (u *BundleUpsertBulk) UpdateAmount() *BundleUpsertBulk
UpdateAmount sets the "amount" field to the value that was provided on create.
func (*BundleUpsertBulk) UpdateDeletedAt ¶
func (u *BundleUpsertBulk) UpdateDeletedAt() *BundleUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*BundleUpsertBulk) UpdateNewValues ¶
func (u *BundleUpsertBulk) UpdateNewValues() *BundleUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Bundle.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(bundle.FieldID)
}),
).
Exec(ctx)
func (*BundleUpsertBulk) UpdateUpdatedAt ¶
func (u *BundleUpsertBulk) UpdateUpdatedAt() *BundleUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type BundleUpsertOne ¶
type BundleUpsertOne struct {
// contains filtered or unexported fields
}
BundleUpsertOne is the builder for "upsert"-ing
one Bundle node.
func (*BundleUpsertOne) AddAmount ¶
func (u *BundleUpsertOne) AddAmount(v float64) *BundleUpsertOne
AddAmount adds v to the "amount" field.
func (*BundleUpsertOne) ClearDeletedAt ¶
func (u *BundleUpsertOne) ClearDeletedAt() *BundleUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BundleUpsertOne) DoNothing ¶
func (u *BundleUpsertOne) DoNothing() *BundleUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BundleUpsertOne) Exec ¶
func (u *BundleUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*BundleUpsertOne) ExecX ¶
func (u *BundleUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BundleUpsertOne) ID ¶
func (u *BundleUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*BundleUpsertOne) IDX ¶
func (u *BundleUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*BundleUpsertOne) Ignore ¶
func (u *BundleUpsertOne) Ignore() *BundleUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Bundle.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*BundleUpsertOne) SetAmount ¶
func (u *BundleUpsertOne) SetAmount(v float64) *BundleUpsertOne
SetAmount sets the "amount" field.
func (*BundleUpsertOne) SetDeletedAt ¶
func (u *BundleUpsertOne) SetDeletedAt(v time.Time) *BundleUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*BundleUpsertOne) SetUpdatedAt ¶
func (u *BundleUpsertOne) SetUpdatedAt(v time.Time) *BundleUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*BundleUpsertOne) Update ¶
func (u *BundleUpsertOne) Update(set func(*BundleUpsert)) *BundleUpsertOne
Update allows overriding fields `UPDATE` values. See the BundleCreate.OnConflict documentation for more info.
func (*BundleUpsertOne) UpdateAmount ¶
func (u *BundleUpsertOne) UpdateAmount() *BundleUpsertOne
UpdateAmount sets the "amount" field to the value that was provided on create.
func (*BundleUpsertOne) UpdateDeletedAt ¶
func (u *BundleUpsertOne) UpdateDeletedAt() *BundleUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*BundleUpsertOne) UpdateNewValues ¶
func (u *BundleUpsertOne) UpdateNewValues() *BundleUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Bundle.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(bundle.FieldID)
}),
).
Exec(ctx)
func (*BundleUpsertOne) UpdateUpdatedAt ¶
func (u *BundleUpsertOne) UpdateUpdatedAt() *BundleUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Bundle is the client for interacting with the Bundle builders.
Bundle *BundleClient
// Invoice is the client for interacting with the Invoice builders.
Invoice *InvoiceClient
// Item is the client for interacting with the Item builders.
Item *ItemClient
// PaymentProfile is the client for interacting with the PaymentProfile builders.
PaymentProfile *PaymentProfileClient
// Product is the client for interacting with the Product builders.
Product *ProductClient
// ProductReservation is the client for interacting with the ProductReservation builders.
ProductReservation *ProductReservationClient
// Subscriptions is the client for interacting with the Subscriptions builders.
Subscriptions *SubscriptionsClient
// 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(). Bundle. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Invoice ¶
type Invoice struct {
// ID of the ent.
ID int64 `json:"id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID int64 `json:"user_id,omitempty"`
// TenantID holds the value of the "tenant_id" field.
TenantID int64 `json:"tenant_id,omitempty"`
// AppID holds the value of the "app_id" field.
AppID string `json:"app_id,omitempty"`
// ProductID holds the value of the "product_id" field.
ProductID int64 `json:"product_id,omitempty"`
// Amount holds the value of the "amount" field.
Amount int64 `json:"amount,omitempty"`
// Price holds the value of the "price" field.
Price decimal.Decimal `json:"price,omitempty"`
// Currency holds the value of the "currency" field.
Currency string `json:"currency,omitempty"`
// Status holds the value of the "status" field.
Status enum.InvoiceStatus `json:"status,omitempty"`
// PaidAt holds the value of the "paid_at" field.
PaidAt *time.Time `json:"paid_at,omitempty"`
// PaidTill holds the value of the "paid_till" field.
PaidTill *time.Time `json:"paid_till,omitempty"`
// IsRevoked holds the value of the "is_revoked" field.
IsRevoked bool `json:"is_revoked,omitempty"`
// RevokedAt holds the value of the "revoked_at" field.
RevokedAt *time.Time `json:"revoked_at,omitempty"`
// IsRevokedProcessed holds the value of the "is_revoked_processed" field.
IsRevokedProcessed bool `json:"is_revoked_processed,omitempty"`
// IsPaidAtProcessed holds the value of the "is_paid_at_processed" field.
IsPaidAtProcessed bool `json:"is_paid_at_processed,omitempty"`
// IsPaidTillProcessed holds the value of the "is_paid_till_processed" field.
IsPaidTillProcessed bool `json:"is_paid_till_processed,omitempty"`
// SubscriptionID holds the value of the "subscription_id" field.
SubscriptionID *int64 `json:"subscription_id,omitempty"`
// ExternalTransactionID holds the value of the "external_transaction_id" field.
ExternalTransactionID *string `json:"external_transaction_id,omitempty"`
// PaymentProvider holds the value of the "payment_provider" field.
PaymentProvider enum.PaymentProvider `json:"payment_provider,omitempty"`
// IsTrial holds the value of the "is_trial" field.
IsTrial bool `json:"is_trial,omitempty"`
// PaymentProfileID holds the value of the "payment_profile_id" field.
PaymentProfileID *int64 `json:"payment_profile_id,omitempty"`
// TtpSubscriptionID holds the value of the "ttp_subscription_id" field.
TtpSubscriptionID *string `json:"ttp_subscription_id,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) QueryPaymentProfile ¶
func (i *Invoice) QueryPaymentProfile() *PaymentProfileQuery
QueryPaymentProfile queries the "payment_profile" edge of the Invoice entity.
func (*Invoice) QueryProduct ¶
func (i *Invoice) QueryProduct() *ProductQuery
QueryProduct queries the "product" edge of the Invoice entity.
func (*Invoice) QueryReservations ¶
func (i *Invoice) QueryReservations() *ProductReservationQuery
QueryReservations queries the "reservations" edge of the Invoice entity.
func (*Invoice) QuerySubscriptions ¶
func (i *Invoice) QuerySubscriptions() *SubscriptionsQuery
QuerySubscriptions queries the "subscriptions" 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 int64) *InvoiceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InvoiceClient) GetX ¶
func (c *InvoiceClient) GetX(ctx context.Context, id int64) *Invoice
GetX is like Get, but panics if an error occurs.
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) QueryPaymentProfile ¶
func (c *InvoiceClient) QueryPaymentProfile(i *Invoice) *PaymentProfileQuery
QueryPaymentProfile queries the payment_profile edge of a Invoice.
func (*InvoiceClient) QueryProduct ¶
func (c *InvoiceClient) QueryProduct(i *Invoice) *ProductQuery
QueryProduct queries the product edge of a Invoice.
func (*InvoiceClient) QueryReservations ¶
func (c *InvoiceClient) QueryReservations(i *Invoice) *ProductReservationQuery
QueryReservations queries the reservations edge of a Invoice.
func (*InvoiceClient) QuerySubscriptions ¶
func (c *InvoiceClient) QuerySubscriptions(i *Invoice) *SubscriptionsQuery
QuerySubscriptions queries the subscriptions 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 int64) *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) AddReservationIDs ¶
func (ic *InvoiceCreate) AddReservationIDs(ids ...int64) *InvoiceCreate
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by IDs.
func (*InvoiceCreate) AddReservations ¶
func (ic *InvoiceCreate) AddReservations(p ...*ProductReservation) *InvoiceCreate
AddReservations adds the "reservations" edges to the ProductReservation 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) OnConflict ¶
func (ic *InvoiceCreate) OnConflict(opts ...sql.ConflictOption) *InvoiceUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Invoice.Create().
SetUserID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.InvoiceUpsert) {
SetUserID(v+v).
}).
Exec(ctx)
func (*InvoiceCreate) OnConflictColumns ¶
func (ic *InvoiceCreate) OnConflictColumns(columns ...string) *InvoiceUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Invoice.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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) SetAmount ¶
func (ic *InvoiceCreate) SetAmount(i int64) *InvoiceCreate
SetAmount sets the "amount" field.
func (*InvoiceCreate) SetAppID ¶
func (ic *InvoiceCreate) SetAppID(s string) *InvoiceCreate
SetAppID sets the "app_id" field.
func (*InvoiceCreate) SetCurrency ¶
func (ic *InvoiceCreate) SetCurrency(s string) *InvoiceCreate
SetCurrency sets the "currency" field.
func (*InvoiceCreate) SetExternalTransactionID ¶
func (ic *InvoiceCreate) SetExternalTransactionID(s string) *InvoiceCreate
SetExternalTransactionID sets the "external_transaction_id" field.
func (*InvoiceCreate) SetID ¶
func (ic *InvoiceCreate) SetID(i int64) *InvoiceCreate
SetID sets the "id" field.
func (*InvoiceCreate) SetIsPaidAtProcessed ¶
func (ic *InvoiceCreate) SetIsPaidAtProcessed(b bool) *InvoiceCreate
SetIsPaidAtProcessed sets the "is_paid_at_processed" field.
func (*InvoiceCreate) SetIsPaidTillProcessed ¶
func (ic *InvoiceCreate) SetIsPaidTillProcessed(b bool) *InvoiceCreate
SetIsPaidTillProcessed sets the "is_paid_till_processed" field.
func (*InvoiceCreate) SetIsRevoked ¶
func (ic *InvoiceCreate) SetIsRevoked(b bool) *InvoiceCreate
SetIsRevoked sets the "is_revoked" field.
func (*InvoiceCreate) SetIsRevokedProcessed ¶
func (ic *InvoiceCreate) SetIsRevokedProcessed(b bool) *InvoiceCreate
SetIsRevokedProcessed sets the "is_revoked_processed" field.
func (*InvoiceCreate) SetIsTrial ¶
func (ic *InvoiceCreate) SetIsTrial(b bool) *InvoiceCreate
SetIsTrial sets the "is_trial" field.
func (*InvoiceCreate) SetNillableCurrency ¶
func (ic *InvoiceCreate) SetNillableCurrency(s *string) *InvoiceCreate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*InvoiceCreate) SetNillableExternalTransactionID ¶
func (ic *InvoiceCreate) SetNillableExternalTransactionID(s *string) *InvoiceCreate
SetNillableExternalTransactionID sets the "external_transaction_id" field if the given value is not nil.
func (*InvoiceCreate) SetNillableIsPaidAtProcessed ¶
func (ic *InvoiceCreate) SetNillableIsPaidAtProcessed(b *bool) *InvoiceCreate
SetNillableIsPaidAtProcessed sets the "is_paid_at_processed" field if the given value is not nil.
func (*InvoiceCreate) SetNillableIsPaidTillProcessed ¶
func (ic *InvoiceCreate) SetNillableIsPaidTillProcessed(b *bool) *InvoiceCreate
SetNillableIsPaidTillProcessed sets the "is_paid_till_processed" field if the given value is not nil.
func (*InvoiceCreate) SetNillableIsRevoked ¶
func (ic *InvoiceCreate) SetNillableIsRevoked(b *bool) *InvoiceCreate
SetNillableIsRevoked sets the "is_revoked" field if the given value is not nil.
func (*InvoiceCreate) SetNillableIsRevokedProcessed ¶
func (ic *InvoiceCreate) SetNillableIsRevokedProcessed(b *bool) *InvoiceCreate
SetNillableIsRevokedProcessed sets the "is_revoked_processed" field if the given value is not nil.
func (*InvoiceCreate) SetNillableIsTrial ¶
func (ic *InvoiceCreate) SetNillableIsTrial(b *bool) *InvoiceCreate
SetNillableIsTrial sets the "is_trial" field if the given value is not nil.
func (*InvoiceCreate) SetNillablePaidAt ¶
func (ic *InvoiceCreate) SetNillablePaidAt(t *time.Time) *InvoiceCreate
SetNillablePaidAt sets the "paid_at" field if the given value is not nil.
func (*InvoiceCreate) SetNillablePaidTill ¶
func (ic *InvoiceCreate) SetNillablePaidTill(t *time.Time) *InvoiceCreate
SetNillablePaidTill sets the "paid_till" field if the given value is not nil.
func (*InvoiceCreate) SetNillablePaymentProfileID ¶
func (ic *InvoiceCreate) SetNillablePaymentProfileID(i *int64) *InvoiceCreate
SetNillablePaymentProfileID sets the "payment_profile_id" field if the given value is not nil.
func (*InvoiceCreate) SetNillablePaymentProvider ¶
func (ic *InvoiceCreate) SetNillablePaymentProvider(ep *enum.PaymentProvider) *InvoiceCreate
SetNillablePaymentProvider sets the "payment_provider" field if the given value is not nil.
func (*InvoiceCreate) SetNillableRevokedAt ¶
func (ic *InvoiceCreate) SetNillableRevokedAt(t *time.Time) *InvoiceCreate
SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.
func (*InvoiceCreate) SetNillableStatus ¶
func (ic *InvoiceCreate) SetNillableStatus(es *enum.InvoiceStatus) *InvoiceCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InvoiceCreate) SetNillableSubscriptionID ¶
func (ic *InvoiceCreate) SetNillableSubscriptionID(i *int64) *InvoiceCreate
SetNillableSubscriptionID sets the "subscription_id" field if the given value is not nil.
func (*InvoiceCreate) SetNillableSubscriptionsID ¶
func (ic *InvoiceCreate) SetNillableSubscriptionsID(id *int64) *InvoiceCreate
SetNillableSubscriptionsID sets the "subscriptions" edge to the Subscriptions entity by ID if the given value is not nil.
func (*InvoiceCreate) SetNillableTtpSubscriptionID ¶
func (ic *InvoiceCreate) SetNillableTtpSubscriptionID(s *string) *InvoiceCreate
SetNillableTtpSubscriptionID sets the "ttp_subscription_id" field if the given value is not nil.
func (*InvoiceCreate) SetPaidAt ¶
func (ic *InvoiceCreate) SetPaidAt(t time.Time) *InvoiceCreate
SetPaidAt sets the "paid_at" field.
func (*InvoiceCreate) SetPaidTill ¶
func (ic *InvoiceCreate) SetPaidTill(t time.Time) *InvoiceCreate
SetPaidTill sets the "paid_till" field.
func (*InvoiceCreate) SetPaymentProfile ¶
func (ic *InvoiceCreate) SetPaymentProfile(p *PaymentProfile) *InvoiceCreate
SetPaymentProfile sets the "payment_profile" edge to the PaymentProfile entity.
func (*InvoiceCreate) SetPaymentProfileID ¶
func (ic *InvoiceCreate) SetPaymentProfileID(i int64) *InvoiceCreate
SetPaymentProfileID sets the "payment_profile_id" field.
func (*InvoiceCreate) SetPaymentProvider ¶
func (ic *InvoiceCreate) SetPaymentProvider(ep enum.PaymentProvider) *InvoiceCreate
SetPaymentProvider sets the "payment_provider" field.
func (*InvoiceCreate) SetPrice ¶
func (ic *InvoiceCreate) SetPrice(d decimal.Decimal) *InvoiceCreate
SetPrice sets the "price" field.
func (*InvoiceCreate) SetProduct ¶
func (ic *InvoiceCreate) SetProduct(p *Product) *InvoiceCreate
SetProduct sets the "product" edge to the Product entity.
func (*InvoiceCreate) SetProductID ¶
func (ic *InvoiceCreate) SetProductID(i int64) *InvoiceCreate
SetProductID sets the "product_id" field.
func (*InvoiceCreate) SetRevokedAt ¶
func (ic *InvoiceCreate) SetRevokedAt(t time.Time) *InvoiceCreate
SetRevokedAt sets the "revoked_at" field.
func (*InvoiceCreate) SetStatus ¶
func (ic *InvoiceCreate) SetStatus(es enum.InvoiceStatus) *InvoiceCreate
SetStatus sets the "status" field.
func (*InvoiceCreate) SetSubscriptionID ¶
func (ic *InvoiceCreate) SetSubscriptionID(i int64) *InvoiceCreate
SetSubscriptionID sets the "subscription_id" field.
func (*InvoiceCreate) SetSubscriptions ¶
func (ic *InvoiceCreate) SetSubscriptions(s *Subscriptions) *InvoiceCreate
SetSubscriptions sets the "subscriptions" edge to the Subscriptions entity.
func (*InvoiceCreate) SetSubscriptionsID ¶
func (ic *InvoiceCreate) SetSubscriptionsID(id int64) *InvoiceCreate
SetSubscriptionsID sets the "subscriptions" edge to the Subscriptions entity by ID.
func (*InvoiceCreate) SetTenantID ¶
func (ic *InvoiceCreate) SetTenantID(i int64) *InvoiceCreate
SetTenantID sets the "tenant_id" field.
func (*InvoiceCreate) SetTtpSubscriptionID ¶
func (ic *InvoiceCreate) SetTtpSubscriptionID(s string) *InvoiceCreate
SetTtpSubscriptionID sets the "ttp_subscription_id" field.
func (*InvoiceCreate) SetUserID ¶
func (ic *InvoiceCreate) SetUserID(i int64) *InvoiceCreate
SetUserID sets the "user_id" 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.
func (*InvoiceCreateBulk) OnConflict ¶
func (icb *InvoiceCreateBulk) OnConflict(opts ...sql.ConflictOption) *InvoiceUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Invoice.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.InvoiceUpsert) {
SetUserID(v+v).
}).
Exec(ctx)
func (*InvoiceCreateBulk) OnConflictColumns ¶
func (icb *InvoiceCreateBulk) OnConflictColumns(columns ...string) *InvoiceUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Invoice.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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 {
// Product holds the value of the product edge.
Product *Product `json:"product,omitempty"`
// Subscriptions holds the value of the subscriptions edge.
Subscriptions *Subscriptions `json:"subscriptions,omitempty"`
// PaymentProfile holds the value of the payment_profile edge.
PaymentProfile *PaymentProfile `json:"payment_profile,omitempty"`
// Reservations holds the value of the reservations edge.
Reservations []*ProductReservation `json:"reservations,omitempty"`
// contains filtered or unexported fields
}
InvoiceEdges holds the relations/edges for other nodes in the graph.
func (InvoiceEdges) PaymentProfileOrErr ¶
func (e InvoiceEdges) PaymentProfileOrErr() (*PaymentProfile, error)
PaymentProfileOrErr returns the PaymentProfile value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InvoiceEdges) ProductOrErr ¶
func (e InvoiceEdges) 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.
func (InvoiceEdges) ReservationsOrErr ¶
func (e InvoiceEdges) ReservationsOrErr() ([]*ProductReservation, error)
ReservationsOrErr returns the Reservations value or an error if the edge was not loaded in eager-loading.
func (InvoiceEdges) SubscriptionsOrErr ¶
func (e InvoiceEdges) SubscriptionsOrErr() (*Subscriptions, error)
SubscriptionsOrErr returns the Subscriptions value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InvoiceFilter ¶
type InvoiceFilter struct {
// contains filtered or unexported fields
}
InvoiceFilter provides a generic filtering capability at runtime for InvoiceQuery.
func (*InvoiceFilter) Where ¶
func (f *InvoiceFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*InvoiceFilter) WhereAmount ¶
func (f *InvoiceFilter) WhereAmount(p entql.Int64P)
WhereAmount applies the entql int64 predicate on the amount field.
func (*InvoiceFilter) WhereAppID ¶
func (f *InvoiceFilter) WhereAppID(p entql.StringP)
WhereAppID applies the entql string predicate on the app_id field.
func (*InvoiceFilter) WhereCurrency ¶
func (f *InvoiceFilter) WhereCurrency(p entql.StringP)
WhereCurrency applies the entql string predicate on the currency field.
func (*InvoiceFilter) WhereExternalTransactionID ¶
func (f *InvoiceFilter) WhereExternalTransactionID(p entql.StringP)
WhereExternalTransactionID applies the entql string predicate on the external_transaction_id field.
func (*InvoiceFilter) WhereHasPaymentProfile ¶
func (f *InvoiceFilter) WhereHasPaymentProfile()
WhereHasPaymentProfile applies a predicate to check if query has an edge payment_profile.
func (*InvoiceFilter) WhereHasPaymentProfileWith ¶
func (f *InvoiceFilter) WhereHasPaymentProfileWith(preds ...predicate.PaymentProfile)
WhereHasPaymentProfileWith applies a predicate to check if query has an edge payment_profile with a given conditions (other predicates).
func (*InvoiceFilter) WhereHasProduct ¶
func (f *InvoiceFilter) WhereHasProduct()
WhereHasProduct applies a predicate to check if query has an edge product.
func (*InvoiceFilter) WhereHasProductWith ¶
func (f *InvoiceFilter) WhereHasProductWith(preds ...predicate.Product)
WhereHasProductWith applies a predicate to check if query has an edge product with a given conditions (other predicates).
func (*InvoiceFilter) WhereHasReservations ¶
func (f *InvoiceFilter) WhereHasReservations()
WhereHasReservations applies a predicate to check if query has an edge reservations.
func (*InvoiceFilter) WhereHasReservationsWith ¶
func (f *InvoiceFilter) WhereHasReservationsWith(preds ...predicate.ProductReservation)
WhereHasReservationsWith applies a predicate to check if query has an edge reservations with a given conditions (other predicates).
func (*InvoiceFilter) WhereHasSubscriptions ¶
func (f *InvoiceFilter) WhereHasSubscriptions()
WhereHasSubscriptions applies a predicate to check if query has an edge subscriptions.
func (*InvoiceFilter) WhereHasSubscriptionsWith ¶
func (f *InvoiceFilter) WhereHasSubscriptionsWith(preds ...predicate.Subscriptions)
WhereHasSubscriptionsWith applies a predicate to check if query has an edge subscriptions with a given conditions (other predicates).
func (*InvoiceFilter) WhereID ¶
func (f *InvoiceFilter) WhereID(p entql.Int64P)
WhereID applies the entql int64 predicate on the id field.
func (*InvoiceFilter) WhereIsPaidAtProcessed ¶
func (f *InvoiceFilter) WhereIsPaidAtProcessed(p entql.BoolP)
WhereIsPaidAtProcessed applies the entql bool predicate on the is_paid_at_processed field.
func (*InvoiceFilter) WhereIsPaidTillProcessed ¶
func (f *InvoiceFilter) WhereIsPaidTillProcessed(p entql.BoolP)
WhereIsPaidTillProcessed applies the entql bool predicate on the is_paid_till_processed field.
func (*InvoiceFilter) WhereIsRevoked ¶
func (f *InvoiceFilter) WhereIsRevoked(p entql.BoolP)
WhereIsRevoked applies the entql bool predicate on the is_revoked field.
func (*InvoiceFilter) WhereIsRevokedProcessed ¶
func (f *InvoiceFilter) WhereIsRevokedProcessed(p entql.BoolP)
WhereIsRevokedProcessed applies the entql bool predicate on the is_revoked_processed field.
func (*InvoiceFilter) WhereIsTrial ¶
func (f *InvoiceFilter) WhereIsTrial(p entql.BoolP)
WhereIsTrial applies the entql bool predicate on the is_trial field.
func (*InvoiceFilter) WherePaidAt ¶
func (f *InvoiceFilter) WherePaidAt(p entql.TimeP)
WherePaidAt applies the entql time.Time predicate on the paid_at field.
func (*InvoiceFilter) WherePaidTill ¶
func (f *InvoiceFilter) WherePaidTill(p entql.TimeP)
WherePaidTill applies the entql time.Time predicate on the paid_till field.
func (*InvoiceFilter) WherePaymentProfileID ¶
func (f *InvoiceFilter) WherePaymentProfileID(p entql.Int64P)
WherePaymentProfileID applies the entql int64 predicate on the payment_profile_id field.
func (*InvoiceFilter) WherePaymentProvider ¶
func (f *InvoiceFilter) WherePaymentProvider(p entql.StringP)
WherePaymentProvider applies the entql string predicate on the payment_provider field.
func (*InvoiceFilter) WherePrice ¶
func (f *InvoiceFilter) WherePrice(p entql.Float64P)
WherePrice applies the entql float64 predicate on the price field.
func (*InvoiceFilter) WhereProductID ¶
func (f *InvoiceFilter) WhereProductID(p entql.Int64P)
WhereProductID applies the entql int64 predicate on the product_id field.
func (*InvoiceFilter) WhereRevokedAt ¶
func (f *InvoiceFilter) WhereRevokedAt(p entql.TimeP)
WhereRevokedAt applies the entql time.Time predicate on the revoked_at field.
func (*InvoiceFilter) WhereStatus ¶
func (f *InvoiceFilter) WhereStatus(p entql.StringP)
WhereStatus applies the entql string predicate on the status field.
func (*InvoiceFilter) WhereSubscriptionID ¶
func (f *InvoiceFilter) WhereSubscriptionID(p entql.Int64P)
WhereSubscriptionID applies the entql int64 predicate on the subscription_id field.
func (*InvoiceFilter) WhereTenantID ¶
func (f *InvoiceFilter) WhereTenantID(p entql.Int64P)
WhereTenantID applies the entql int64 predicate on the tenant_id field.
func (*InvoiceFilter) WhereTtpSubscriptionID ¶
func (f *InvoiceFilter) WhereTtpSubscriptionID(p entql.StringP)
WhereTtpSubscriptionID applies the entql string predicate on the ttp_subscription_id field.
func (*InvoiceFilter) WhereUserID ¶
func (f *InvoiceFilter) WhereUserID(p entql.Int64P)
WhereUserID applies the entql int64 predicate on the user_id field.
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 InvoiceMutation ¶
type InvoiceMutation struct {
// contains filtered or unexported fields
}
InvoiceMutation represents an operation that mutates the Invoice nodes in the graph.
func (*InvoiceMutation) AddAmount ¶
func (m *InvoiceMutation) AddAmount(i int64)
AddAmount adds i to the "amount" field.
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) AddPrice ¶
func (m *InvoiceMutation) AddPrice(d decimal.Decimal)
AddPrice adds d to the "price" field.
func (*InvoiceMutation) AddReservationIDs ¶
func (m *InvoiceMutation) AddReservationIDs(ids ...int64)
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by ids.
func (*InvoiceMutation) AddTenantID ¶
func (m *InvoiceMutation) AddTenantID(i int64)
AddTenantID adds i to the "tenant_id" field.
func (*InvoiceMutation) AddUserID ¶
func (m *InvoiceMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*InvoiceMutation) AddedAmount ¶
func (m *InvoiceMutation) AddedAmount() (r int64, exists bool)
AddedAmount returns the value that was added to the "amount" field in this mutation.
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) AddedPrice ¶
func (m *InvoiceMutation) AddedPrice() (r decimal.Decimal, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*InvoiceMutation) AddedTenantID ¶
func (m *InvoiceMutation) AddedTenantID() (r int64, exists bool)
AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.
func (*InvoiceMutation) AddedUserID ¶
func (m *InvoiceMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*InvoiceMutation) Amount ¶
func (m *InvoiceMutation) Amount() (r int64, exists bool)
Amount returns the value of the "amount" field in the mutation.
func (*InvoiceMutation) AppID ¶
func (m *InvoiceMutation) AppID() (r string, exists bool)
AppID returns the value of the "app_id" field in the mutation.
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) ClearExternalTransactionID ¶
func (m *InvoiceMutation) ClearExternalTransactionID()
ClearExternalTransactionID clears the value of the "external_transaction_id" field.
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) ClearPaidAt ¶
func (m *InvoiceMutation) ClearPaidAt()
ClearPaidAt clears the value of the "paid_at" field.
func (*InvoiceMutation) ClearPaidTill ¶
func (m *InvoiceMutation) ClearPaidTill()
ClearPaidTill clears the value of the "paid_till" field.
func (*InvoiceMutation) ClearPaymentProfile ¶
func (m *InvoiceMutation) ClearPaymentProfile()
ClearPaymentProfile clears the "payment_profile" edge to the PaymentProfile entity.
func (*InvoiceMutation) ClearPaymentProfileID ¶
func (m *InvoiceMutation) ClearPaymentProfileID()
ClearPaymentProfileID clears the value of the "payment_profile_id" field.
func (*InvoiceMutation) ClearProduct ¶
func (m *InvoiceMutation) ClearProduct()
ClearProduct clears the "product" edge to the Product entity.
func (*InvoiceMutation) ClearReservations ¶
func (m *InvoiceMutation) ClearReservations()
ClearReservations clears the "reservations" edge to the ProductReservation entity.
func (*InvoiceMutation) ClearRevokedAt ¶
func (m *InvoiceMutation) ClearRevokedAt()
ClearRevokedAt clears the value of the "revoked_at" field.
func (*InvoiceMutation) ClearSubscriptionID ¶
func (m *InvoiceMutation) ClearSubscriptionID()
ClearSubscriptionID clears the value of the "subscription_id" field.
func (*InvoiceMutation) ClearSubscriptions ¶
func (m *InvoiceMutation) ClearSubscriptions()
ClearSubscriptions clears the "subscriptions" edge to the Subscriptions entity.
func (*InvoiceMutation) ClearTtpSubscriptionID ¶
func (m *InvoiceMutation) ClearTtpSubscriptionID()
ClearTtpSubscriptionID clears the value of the "ttp_subscription_id" field.
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) Currency ¶
func (m *InvoiceMutation) Currency() (r string, exists bool)
Currency returns the value of the "currency" 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) ExternalTransactionID ¶
func (m *InvoiceMutation) ExternalTransactionID() (r string, exists bool)
ExternalTransactionID returns the value of the "external_transaction_id" field in the mutation.
func (*InvoiceMutation) ExternalTransactionIDCleared ¶
func (m *InvoiceMutation) ExternalTransactionIDCleared() bool
ExternalTransactionIDCleared returns if the "external_transaction_id" field 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) Filter ¶
func (m *InvoiceMutation) Filter() *InvoiceFilter
Filter returns an entql.Where implementation to apply filters on the InvoiceMutation builder.
func (*InvoiceMutation) ID ¶
func (m *InvoiceMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*InvoiceMutation) IDs ¶
func (m *InvoiceMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InvoiceMutation) IsPaidAtProcessed ¶
func (m *InvoiceMutation) IsPaidAtProcessed() (r bool, exists bool)
IsPaidAtProcessed returns the value of the "is_paid_at_processed" field in the mutation.
func (*InvoiceMutation) IsPaidTillProcessed ¶
func (m *InvoiceMutation) IsPaidTillProcessed() (r bool, exists bool)
IsPaidTillProcessed returns the value of the "is_paid_till_processed" field in the mutation.
func (*InvoiceMutation) IsRevoked ¶
func (m *InvoiceMutation) IsRevoked() (r bool, exists bool)
IsRevoked returns the value of the "is_revoked" field in the mutation.
func (*InvoiceMutation) IsRevokedProcessed ¶
func (m *InvoiceMutation) IsRevokedProcessed() (r bool, exists bool)
IsRevokedProcessed returns the value of the "is_revoked_processed" field in the mutation.
func (*InvoiceMutation) IsTrial ¶
func (m *InvoiceMutation) IsTrial() (r bool, exists bool)
IsTrial returns the value of the "is_trial" field in the mutation.
func (*InvoiceMutation) OldAmount ¶
func (m *InvoiceMutation) OldAmount(ctx context.Context) (v int64, err error)
OldAmount returns the old "amount" 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) OldAppID ¶
func (m *InvoiceMutation) OldAppID(ctx context.Context) (v string, err error)
OldAppID returns the old "app_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) OldCurrency ¶
func (m *InvoiceMutation) OldCurrency(ctx context.Context) (v string, err error)
OldCurrency returns the old "currency" 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) OldExternalTransactionID ¶
func (m *InvoiceMutation) OldExternalTransactionID(ctx context.Context) (v *string, err error)
OldExternalTransactionID returns the old "external_transaction_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) 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) OldIsPaidAtProcessed ¶
func (m *InvoiceMutation) OldIsPaidAtProcessed(ctx context.Context) (v bool, err error)
OldIsPaidAtProcessed returns the old "is_paid_at_processed" 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) OldIsPaidTillProcessed ¶
func (m *InvoiceMutation) OldIsPaidTillProcessed(ctx context.Context) (v bool, err error)
OldIsPaidTillProcessed returns the old "is_paid_till_processed" 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) OldIsRevoked ¶
func (m *InvoiceMutation) OldIsRevoked(ctx context.Context) (v bool, err error)
OldIsRevoked returns the old "is_revoked" 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) OldIsRevokedProcessed ¶
func (m *InvoiceMutation) OldIsRevokedProcessed(ctx context.Context) (v bool, err error)
OldIsRevokedProcessed returns the old "is_revoked_processed" 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) OldIsTrial ¶
func (m *InvoiceMutation) OldIsTrial(ctx context.Context) (v bool, err error)
OldIsTrial returns the old "is_trial" 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) OldPaidAt ¶
OldPaidAt returns the old "paid_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) OldPaidTill ¶
OldPaidTill returns the old "paid_till" 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) OldPaymentProfileID ¶
func (m *InvoiceMutation) OldPaymentProfileID(ctx context.Context) (v *int64, err error)
OldPaymentProfileID returns the old "payment_profile_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) OldPaymentProvider ¶
func (m *InvoiceMutation) OldPaymentProvider(ctx context.Context) (v enum.PaymentProvider, err error)
OldPaymentProvider returns the old "payment_provider" 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) OldPrice ¶
OldPrice returns the old "price" 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) OldProductID ¶
func (m *InvoiceMutation) OldProductID(ctx context.Context) (v int64, err error)
OldProductID returns the old "product_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) OldRevokedAt ¶
OldRevokedAt returns the old "revoked_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) OldStatus ¶
func (m *InvoiceMutation) OldStatus(ctx context.Context) (v enum.InvoiceStatus, err error)
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) OldSubscriptionID ¶
func (m *InvoiceMutation) OldSubscriptionID(ctx context.Context) (v *int64, err error)
OldSubscriptionID returns the old "subscription_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) OldTenantID ¶
func (m *InvoiceMutation) OldTenantID(ctx context.Context) (v int64, err error)
OldTenantID returns the old "tenant_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) OldTtpSubscriptionID ¶
func (m *InvoiceMutation) OldTtpSubscriptionID(ctx context.Context) (v *string, err error)
OldTtpSubscriptionID returns the old "ttp_subscription_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) OldUserID ¶
func (m *InvoiceMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_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) PaidAt ¶
func (m *InvoiceMutation) PaidAt() (r time.Time, exists bool)
PaidAt returns the value of the "paid_at" field in the mutation.
func (*InvoiceMutation) PaidAtCleared ¶
func (m *InvoiceMutation) PaidAtCleared() bool
PaidAtCleared returns if the "paid_at" field was cleared in this mutation.
func (*InvoiceMutation) PaidTill ¶
func (m *InvoiceMutation) PaidTill() (r time.Time, exists bool)
PaidTill returns the value of the "paid_till" field in the mutation.
func (*InvoiceMutation) PaidTillCleared ¶
func (m *InvoiceMutation) PaidTillCleared() bool
PaidTillCleared returns if the "paid_till" field was cleared in this mutation.
func (*InvoiceMutation) PaymentProfileCleared ¶
func (m *InvoiceMutation) PaymentProfileCleared() bool
PaymentProfileCleared reports if the "payment_profile" edge to the PaymentProfile entity was cleared.
func (*InvoiceMutation) PaymentProfileID ¶
func (m *InvoiceMutation) PaymentProfileID() (r int64, exists bool)
PaymentProfileID returns the value of the "payment_profile_id" field in the mutation.
func (*InvoiceMutation) PaymentProfileIDCleared ¶
func (m *InvoiceMutation) PaymentProfileIDCleared() bool
PaymentProfileIDCleared returns if the "payment_profile_id" field was cleared in this mutation.
func (*InvoiceMutation) PaymentProfileIDs ¶
func (m *InvoiceMutation) PaymentProfileIDs() (ids []int64)
PaymentProfileIDs returns the "payment_profile" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PaymentProfileID instead. It exists only for internal usage by the builders.
func (*InvoiceMutation) PaymentProvider ¶
func (m *InvoiceMutation) PaymentProvider() (r enum.PaymentProvider, exists bool)
PaymentProvider returns the value of the "payment_provider" field in the mutation.
func (*InvoiceMutation) Price ¶
func (m *InvoiceMutation) Price() (r decimal.Decimal, exists bool)
Price returns the value of the "price" field in the mutation.
func (*InvoiceMutation) ProductCleared ¶
func (m *InvoiceMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the Product entity was cleared.
func (*InvoiceMutation) ProductID ¶
func (m *InvoiceMutation) ProductID() (r int64, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*InvoiceMutation) ProductIDs ¶
func (m *InvoiceMutation) ProductIDs() (ids []int64)
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 (*InvoiceMutation) RemoveReservationIDs ¶
func (m *InvoiceMutation) RemoveReservationIDs(ids ...int64)
RemoveReservationIDs removes the "reservations" edge to the ProductReservation entity by IDs.
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) RemovedReservationsIDs ¶
func (m *InvoiceMutation) RemovedReservationsIDs() (ids []int64)
RemovedReservations returns the removed IDs of the "reservations" edge to the ProductReservation entity.
func (*InvoiceMutation) ReservationsCleared ¶
func (m *InvoiceMutation) ReservationsCleared() bool
ReservationsCleared reports if the "reservations" edge to the ProductReservation entity was cleared.
func (*InvoiceMutation) ReservationsIDs ¶
func (m *InvoiceMutation) ReservationsIDs() (ids []int64)
ReservationsIDs returns the "reservations" edge IDs in the mutation.
func (*InvoiceMutation) ResetAmount ¶
func (m *InvoiceMutation) ResetAmount()
ResetAmount resets all changes to the "amount" field.
func (*InvoiceMutation) ResetAppID ¶
func (m *InvoiceMutation) ResetAppID()
ResetAppID resets all changes to the "app_id" field.
func (*InvoiceMutation) ResetCurrency ¶
func (m *InvoiceMutation) ResetCurrency()
ResetCurrency resets all changes to the "currency" 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) ResetExternalTransactionID ¶
func (m *InvoiceMutation) ResetExternalTransactionID()
ResetExternalTransactionID resets all changes to the "external_transaction_id" field.
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) ResetIsPaidAtProcessed ¶
func (m *InvoiceMutation) ResetIsPaidAtProcessed()
ResetIsPaidAtProcessed resets all changes to the "is_paid_at_processed" field.
func (*InvoiceMutation) ResetIsPaidTillProcessed ¶
func (m *InvoiceMutation) ResetIsPaidTillProcessed()
ResetIsPaidTillProcessed resets all changes to the "is_paid_till_processed" field.
func (*InvoiceMutation) ResetIsRevoked ¶
func (m *InvoiceMutation) ResetIsRevoked()
ResetIsRevoked resets all changes to the "is_revoked" field.
func (*InvoiceMutation) ResetIsRevokedProcessed ¶
func (m *InvoiceMutation) ResetIsRevokedProcessed()
ResetIsRevokedProcessed resets all changes to the "is_revoked_processed" field.
func (*InvoiceMutation) ResetIsTrial ¶
func (m *InvoiceMutation) ResetIsTrial()
ResetIsTrial resets all changes to the "is_trial" field.
func (*InvoiceMutation) ResetPaidAt ¶
func (m *InvoiceMutation) ResetPaidAt()
ResetPaidAt resets all changes to the "paid_at" field.
func (*InvoiceMutation) ResetPaidTill ¶
func (m *InvoiceMutation) ResetPaidTill()
ResetPaidTill resets all changes to the "paid_till" field.
func (*InvoiceMutation) ResetPaymentProfile ¶
func (m *InvoiceMutation) ResetPaymentProfile()
ResetPaymentProfile resets all changes to the "payment_profile" edge.
func (*InvoiceMutation) ResetPaymentProfileID ¶
func (m *InvoiceMutation) ResetPaymentProfileID()
ResetPaymentProfileID resets all changes to the "payment_profile_id" field.
func (*InvoiceMutation) ResetPaymentProvider ¶
func (m *InvoiceMutation) ResetPaymentProvider()
ResetPaymentProvider resets all changes to the "payment_provider" field.
func (*InvoiceMutation) ResetPrice ¶
func (m *InvoiceMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*InvoiceMutation) ResetProduct ¶
func (m *InvoiceMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*InvoiceMutation) ResetProductID ¶
func (m *InvoiceMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*InvoiceMutation) ResetReservations ¶
func (m *InvoiceMutation) ResetReservations()
ResetReservations resets all changes to the "reservations" edge.
func (*InvoiceMutation) ResetRevokedAt ¶
func (m *InvoiceMutation) ResetRevokedAt()
ResetRevokedAt resets all changes to the "revoked_at" field.
func (*InvoiceMutation) ResetStatus ¶
func (m *InvoiceMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*InvoiceMutation) ResetSubscriptionID ¶
func (m *InvoiceMutation) ResetSubscriptionID()
ResetSubscriptionID resets all changes to the "subscription_id" field.
func (*InvoiceMutation) ResetSubscriptions ¶
func (m *InvoiceMutation) ResetSubscriptions()
ResetSubscriptions resets all changes to the "subscriptions" edge.
func (*InvoiceMutation) ResetTenantID ¶
func (m *InvoiceMutation) ResetTenantID()
ResetTenantID resets all changes to the "tenant_id" field.
func (*InvoiceMutation) ResetTtpSubscriptionID ¶
func (m *InvoiceMutation) ResetTtpSubscriptionID()
ResetTtpSubscriptionID resets all changes to the "ttp_subscription_id" field.
func (*InvoiceMutation) ResetUserID ¶
func (m *InvoiceMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*InvoiceMutation) RevokedAt ¶
func (m *InvoiceMutation) RevokedAt() (r time.Time, exists bool)
RevokedAt returns the value of the "revoked_at" field in the mutation.
func (*InvoiceMutation) RevokedAtCleared ¶
func (m *InvoiceMutation) RevokedAtCleared() bool
RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.
func (*InvoiceMutation) SetAmount ¶
func (m *InvoiceMutation) SetAmount(i int64)
SetAmount sets the "amount" field.
func (*InvoiceMutation) SetAppID ¶
func (m *InvoiceMutation) SetAppID(s string)
SetAppID sets the "app_id" field.
func (*InvoiceMutation) SetCurrency ¶
func (m *InvoiceMutation) SetCurrency(s string)
SetCurrency sets the "currency" field.
func (*InvoiceMutation) SetExternalTransactionID ¶
func (m *InvoiceMutation) SetExternalTransactionID(s string)
SetExternalTransactionID sets the "external_transaction_id" 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 int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Invoice entities.
func (*InvoiceMutation) SetIsPaidAtProcessed ¶
func (m *InvoiceMutation) SetIsPaidAtProcessed(b bool)
SetIsPaidAtProcessed sets the "is_paid_at_processed" field.
func (*InvoiceMutation) SetIsPaidTillProcessed ¶
func (m *InvoiceMutation) SetIsPaidTillProcessed(b bool)
SetIsPaidTillProcessed sets the "is_paid_till_processed" field.
func (*InvoiceMutation) SetIsRevoked ¶
func (m *InvoiceMutation) SetIsRevoked(b bool)
SetIsRevoked sets the "is_revoked" field.
func (*InvoiceMutation) SetIsRevokedProcessed ¶
func (m *InvoiceMutation) SetIsRevokedProcessed(b bool)
SetIsRevokedProcessed sets the "is_revoked_processed" field.
func (*InvoiceMutation) SetIsTrial ¶
func (m *InvoiceMutation) SetIsTrial(b bool)
SetIsTrial sets the "is_trial" field.
func (*InvoiceMutation) SetOp ¶
func (m *InvoiceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InvoiceMutation) SetPaidAt ¶
func (m *InvoiceMutation) SetPaidAt(t time.Time)
SetPaidAt sets the "paid_at" field.
func (*InvoiceMutation) SetPaidTill ¶
func (m *InvoiceMutation) SetPaidTill(t time.Time)
SetPaidTill sets the "paid_till" field.
func (*InvoiceMutation) SetPaymentProfileID ¶
func (m *InvoiceMutation) SetPaymentProfileID(i int64)
SetPaymentProfileID sets the "payment_profile_id" field.
func (*InvoiceMutation) SetPaymentProvider ¶
func (m *InvoiceMutation) SetPaymentProvider(ep enum.PaymentProvider)
SetPaymentProvider sets the "payment_provider" field.
func (*InvoiceMutation) SetPrice ¶
func (m *InvoiceMutation) SetPrice(d decimal.Decimal)
SetPrice sets the "price" field.
func (*InvoiceMutation) SetProductID ¶
func (m *InvoiceMutation) SetProductID(i int64)
SetProductID sets the "product_id" field.
func (*InvoiceMutation) SetRevokedAt ¶
func (m *InvoiceMutation) SetRevokedAt(t time.Time)
SetRevokedAt sets the "revoked_at" field.
func (*InvoiceMutation) SetStatus ¶
func (m *InvoiceMutation) SetStatus(es enum.InvoiceStatus)
SetStatus sets the "status" field.
func (*InvoiceMutation) SetSubscriptionID ¶
func (m *InvoiceMutation) SetSubscriptionID(i int64)
SetSubscriptionID sets the "subscription_id" field.
func (*InvoiceMutation) SetSubscriptionsID ¶
func (m *InvoiceMutation) SetSubscriptionsID(id int64)
SetSubscriptionsID sets the "subscriptions" edge to the Subscriptions entity by id.
func (*InvoiceMutation) SetTenantID ¶
func (m *InvoiceMutation) SetTenantID(i int64)
SetTenantID sets the "tenant_id" field.
func (*InvoiceMutation) SetTtpSubscriptionID ¶
func (m *InvoiceMutation) SetTtpSubscriptionID(s string)
SetTtpSubscriptionID sets the "ttp_subscription_id" field.
func (*InvoiceMutation) SetUserID ¶
func (m *InvoiceMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*InvoiceMutation) Status ¶
func (m *InvoiceMutation) Status() (r enum.InvoiceStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (*InvoiceMutation) SubscriptionID ¶
func (m *InvoiceMutation) SubscriptionID() (r int64, exists bool)
SubscriptionID returns the value of the "subscription_id" field in the mutation.
func (*InvoiceMutation) SubscriptionIDCleared ¶
func (m *InvoiceMutation) SubscriptionIDCleared() bool
SubscriptionIDCleared returns if the "subscription_id" field was cleared in this mutation.
func (*InvoiceMutation) SubscriptionsCleared ¶
func (m *InvoiceMutation) SubscriptionsCleared() bool
SubscriptionsCleared reports if the "subscriptions" edge to the Subscriptions entity was cleared.
func (*InvoiceMutation) SubscriptionsID ¶
func (m *InvoiceMutation) SubscriptionsID() (id int64, exists bool)
SubscriptionsID returns the "subscriptions" edge ID in the mutation.
func (*InvoiceMutation) SubscriptionsIDs ¶
func (m *InvoiceMutation) SubscriptionsIDs() (ids []int64)
SubscriptionsIDs returns the "subscriptions" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubscriptionsID instead. It exists only for internal usage by the builders.
func (*InvoiceMutation) TenantID ¶
func (m *InvoiceMutation) TenantID() (r int64, exists bool)
TenantID returns the value of the "tenant_id" field in the mutation.
func (*InvoiceMutation) TtpSubscriptionID ¶
func (m *InvoiceMutation) TtpSubscriptionID() (r string, exists bool)
TtpSubscriptionID returns the value of the "ttp_subscription_id" field in the mutation.
func (*InvoiceMutation) TtpSubscriptionIDCleared ¶
func (m *InvoiceMutation) TtpSubscriptionIDCleared() bool
TtpSubscriptionIDCleared returns if the "ttp_subscription_id" field was cleared in this 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) UserID ¶
func (m *InvoiceMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" 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) Filter ¶
func (iq *InvoiceQuery) Filter() *InvoiceFilter
Filter returns a Filter implementation to apply filters on the InvoiceQuery builder.
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 ¶
func (iq *InvoiceQuery) FirstID(ctx context.Context) (id int64, err error)
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) int64
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 {
UserID int64 `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Invoice.Query().
GroupBy(invoice.FieldUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*InvoiceQuery) IDs ¶
func (iq *InvoiceQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Invoice IDs.
func (*InvoiceQuery) IDsX ¶
func (iq *InvoiceQuery) IDsX(ctx context.Context) []int64
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) Modify ¶
func (iq *InvoiceQuery) Modify(modifiers ...func(s *sql.Selector)) *InvoiceSelect
Modify adds a query modifier for attaching custom logic to queries.
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 ¶
func (iq *InvoiceQuery) OnlyID(ctx context.Context) (id int64, err error)
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) int64
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) QueryPaymentProfile ¶
func (iq *InvoiceQuery) QueryPaymentProfile() *PaymentProfileQuery
QueryPaymentProfile chains the current query on the "payment_profile" edge.
func (*InvoiceQuery) QueryProduct ¶
func (iq *InvoiceQuery) QueryProduct() *ProductQuery
QueryProduct chains the current query on the "product" edge.
func (*InvoiceQuery) QueryReservations ¶
func (iq *InvoiceQuery) QueryReservations() *ProductReservationQuery
QueryReservations chains the current query on the "reservations" edge.
func (*InvoiceQuery) QuerySubscriptions ¶
func (iq *InvoiceQuery) QuerySubscriptions() *SubscriptionsQuery
QuerySubscriptions chains the current query on the "subscriptions" 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 {
UserID int64 `json:"user_id,omitempty"`
}
client.Invoice.Query().
Select(invoice.FieldUserID).
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) WithPaymentProfile ¶
func (iq *InvoiceQuery) WithPaymentProfile(opts ...func(*PaymentProfileQuery)) *InvoiceQuery
WithPaymentProfile tells the query-builder to eager-load the nodes that are connected to the "payment_profile" edge. The optional arguments are used to configure the query builder of the edge.
func (*InvoiceQuery) WithProduct ¶
func (iq *InvoiceQuery) WithProduct(opts ...func(*ProductQuery)) *InvoiceQuery
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.
func (*InvoiceQuery) WithReservations ¶
func (iq *InvoiceQuery) WithReservations(opts ...func(*ProductReservationQuery)) *InvoiceQuery
WithReservations tells the query-builder to eager-load the nodes that are connected to the "reservations" edge. The optional arguments are used to configure the query builder of the edge.
func (*InvoiceQuery) WithSubscriptions ¶
func (iq *InvoiceQuery) WithSubscriptions(opts ...func(*SubscriptionsQuery)) *InvoiceQuery
WithSubscriptions tells the query-builder to eager-load the nodes that are connected to the "subscriptions" 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) Modify ¶
func (is *InvoiceSelect) Modify(modifiers ...func(s *sql.Selector)) *InvoiceSelect
Modify adds a query modifier for attaching custom logic to queries.
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) AddPrice ¶
func (iu *InvoiceUpdate) AddPrice(d decimal.Decimal) *InvoiceUpdate
AddPrice adds d to the "price" field.
func (*InvoiceUpdate) AddReservationIDs ¶
func (iu *InvoiceUpdate) AddReservationIDs(ids ...int64) *InvoiceUpdate
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by IDs.
func (*InvoiceUpdate) AddReservations ¶
func (iu *InvoiceUpdate) AddReservations(p ...*ProductReservation) *InvoiceUpdate
AddReservations adds the "reservations" edges to the ProductReservation entity.
func (*InvoiceUpdate) ClearExternalTransactionID ¶
func (iu *InvoiceUpdate) ClearExternalTransactionID() *InvoiceUpdate
ClearExternalTransactionID clears the value of the "external_transaction_id" field.
func (*InvoiceUpdate) ClearPaidAt ¶
func (iu *InvoiceUpdate) ClearPaidAt() *InvoiceUpdate
ClearPaidAt clears the value of the "paid_at" field.
func (*InvoiceUpdate) ClearPaidTill ¶
func (iu *InvoiceUpdate) ClearPaidTill() *InvoiceUpdate
ClearPaidTill clears the value of the "paid_till" field.
func (*InvoiceUpdate) ClearPaymentProfile ¶
func (iu *InvoiceUpdate) ClearPaymentProfile() *InvoiceUpdate
ClearPaymentProfile clears the "payment_profile" edge to the PaymentProfile entity.
func (*InvoiceUpdate) ClearPaymentProfileID ¶
func (iu *InvoiceUpdate) ClearPaymentProfileID() *InvoiceUpdate
ClearPaymentProfileID clears the value of the "payment_profile_id" field.
func (*InvoiceUpdate) ClearReservations ¶
func (iu *InvoiceUpdate) ClearReservations() *InvoiceUpdate
ClearReservations clears all "reservations" edges to the ProductReservation entity.
func (*InvoiceUpdate) ClearRevokedAt ¶
func (iu *InvoiceUpdate) ClearRevokedAt() *InvoiceUpdate
ClearRevokedAt clears the value of the "revoked_at" field.
func (*InvoiceUpdate) ClearSubscriptionID ¶
func (iu *InvoiceUpdate) ClearSubscriptionID() *InvoiceUpdate
ClearSubscriptionID clears the value of the "subscription_id" field.
func (*InvoiceUpdate) ClearSubscriptions ¶
func (iu *InvoiceUpdate) ClearSubscriptions() *InvoiceUpdate
ClearSubscriptions clears the "subscriptions" edge to the Subscriptions entity.
func (*InvoiceUpdate) ClearTtpSubscriptionID ¶
func (iu *InvoiceUpdate) ClearTtpSubscriptionID() *InvoiceUpdate
ClearTtpSubscriptionID clears the value of the "ttp_subscription_id" 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) Modify ¶
func (iu *InvoiceUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *InvoiceUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*InvoiceUpdate) Mutation ¶
func (iu *InvoiceUpdate) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceUpdate) RemoveReservationIDs ¶
func (iu *InvoiceUpdate) RemoveReservationIDs(ids ...int64) *InvoiceUpdate
RemoveReservationIDs removes the "reservations" edge to ProductReservation entities by IDs.
func (*InvoiceUpdate) RemoveReservations ¶
func (iu *InvoiceUpdate) RemoveReservations(p ...*ProductReservation) *InvoiceUpdate
RemoveReservations removes "reservations" edges to ProductReservation entities.
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) SetCurrency ¶
func (iu *InvoiceUpdate) SetCurrency(s string) *InvoiceUpdate
SetCurrency sets the "currency" field.
func (*InvoiceUpdate) SetExternalTransactionID ¶
func (iu *InvoiceUpdate) SetExternalTransactionID(s string) *InvoiceUpdate
SetExternalTransactionID sets the "external_transaction_id" field.
func (*InvoiceUpdate) SetIsPaidAtProcessed ¶
func (iu *InvoiceUpdate) SetIsPaidAtProcessed(b bool) *InvoiceUpdate
SetIsPaidAtProcessed sets the "is_paid_at_processed" field.
func (*InvoiceUpdate) SetIsPaidTillProcessed ¶
func (iu *InvoiceUpdate) SetIsPaidTillProcessed(b bool) *InvoiceUpdate
SetIsPaidTillProcessed sets the "is_paid_till_processed" field.
func (*InvoiceUpdate) SetIsRevoked ¶
func (iu *InvoiceUpdate) SetIsRevoked(b bool) *InvoiceUpdate
SetIsRevoked sets the "is_revoked" field.
func (*InvoiceUpdate) SetIsRevokedProcessed ¶
func (iu *InvoiceUpdate) SetIsRevokedProcessed(b bool) *InvoiceUpdate
SetIsRevokedProcessed sets the "is_revoked_processed" field.
func (*InvoiceUpdate) SetIsTrial ¶
func (iu *InvoiceUpdate) SetIsTrial(b bool) *InvoiceUpdate
SetIsTrial sets the "is_trial" field.
func (*InvoiceUpdate) SetNillableCurrency ¶
func (iu *InvoiceUpdate) SetNillableCurrency(s *string) *InvoiceUpdate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableExternalTransactionID ¶
func (iu *InvoiceUpdate) SetNillableExternalTransactionID(s *string) *InvoiceUpdate
SetNillableExternalTransactionID sets the "external_transaction_id" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableIsPaidAtProcessed ¶
func (iu *InvoiceUpdate) SetNillableIsPaidAtProcessed(b *bool) *InvoiceUpdate
SetNillableIsPaidAtProcessed sets the "is_paid_at_processed" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableIsPaidTillProcessed ¶
func (iu *InvoiceUpdate) SetNillableIsPaidTillProcessed(b *bool) *InvoiceUpdate
SetNillableIsPaidTillProcessed sets the "is_paid_till_processed" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableIsRevoked ¶
func (iu *InvoiceUpdate) SetNillableIsRevoked(b *bool) *InvoiceUpdate
SetNillableIsRevoked sets the "is_revoked" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableIsRevokedProcessed ¶
func (iu *InvoiceUpdate) SetNillableIsRevokedProcessed(b *bool) *InvoiceUpdate
SetNillableIsRevokedProcessed sets the "is_revoked_processed" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableIsTrial ¶
func (iu *InvoiceUpdate) SetNillableIsTrial(b *bool) *InvoiceUpdate
SetNillableIsTrial sets the "is_trial" field if the given value is not nil.
func (*InvoiceUpdate) SetNillablePaidAt ¶
func (iu *InvoiceUpdate) SetNillablePaidAt(t *time.Time) *InvoiceUpdate
SetNillablePaidAt sets the "paid_at" field if the given value is not nil.
func (*InvoiceUpdate) SetNillablePaidTill ¶
func (iu *InvoiceUpdate) SetNillablePaidTill(t *time.Time) *InvoiceUpdate
SetNillablePaidTill sets the "paid_till" field if the given value is not nil.
func (*InvoiceUpdate) SetNillablePaymentProfileID ¶
func (iu *InvoiceUpdate) SetNillablePaymentProfileID(i *int64) *InvoiceUpdate
SetNillablePaymentProfileID sets the "payment_profile_id" field if the given value is not nil.
func (*InvoiceUpdate) SetNillablePaymentProvider ¶
func (iu *InvoiceUpdate) SetNillablePaymentProvider(ep *enum.PaymentProvider) *InvoiceUpdate
SetNillablePaymentProvider sets the "payment_provider" field if the given value is not nil.
func (*InvoiceUpdate) SetNillablePrice ¶
func (iu *InvoiceUpdate) SetNillablePrice(d *decimal.Decimal) *InvoiceUpdate
SetNillablePrice sets the "price" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableRevokedAt ¶
func (iu *InvoiceUpdate) SetNillableRevokedAt(t *time.Time) *InvoiceUpdate
SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableStatus ¶
func (iu *InvoiceUpdate) SetNillableStatus(es *enum.InvoiceStatus) *InvoiceUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableSubscriptionID ¶
func (iu *InvoiceUpdate) SetNillableSubscriptionID(i *int64) *InvoiceUpdate
SetNillableSubscriptionID sets the "subscription_id" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableSubscriptionsID ¶
func (iu *InvoiceUpdate) SetNillableSubscriptionsID(id *int64) *InvoiceUpdate
SetNillableSubscriptionsID sets the "subscriptions" edge to the Subscriptions entity by ID if the given value is not nil.
func (*InvoiceUpdate) SetNillableTtpSubscriptionID ¶
func (iu *InvoiceUpdate) SetNillableTtpSubscriptionID(s *string) *InvoiceUpdate
SetNillableTtpSubscriptionID sets the "ttp_subscription_id" field if the given value is not nil.
func (*InvoiceUpdate) SetPaidAt ¶
func (iu *InvoiceUpdate) SetPaidAt(t time.Time) *InvoiceUpdate
SetPaidAt sets the "paid_at" field.
func (*InvoiceUpdate) SetPaidTill ¶
func (iu *InvoiceUpdate) SetPaidTill(t time.Time) *InvoiceUpdate
SetPaidTill sets the "paid_till" field.
func (*InvoiceUpdate) SetPaymentProfile ¶
func (iu *InvoiceUpdate) SetPaymentProfile(p *PaymentProfile) *InvoiceUpdate
SetPaymentProfile sets the "payment_profile" edge to the PaymentProfile entity.
func (*InvoiceUpdate) SetPaymentProfileID ¶
func (iu *InvoiceUpdate) SetPaymentProfileID(i int64) *InvoiceUpdate
SetPaymentProfileID sets the "payment_profile_id" field.
func (*InvoiceUpdate) SetPaymentProvider ¶
func (iu *InvoiceUpdate) SetPaymentProvider(ep enum.PaymentProvider) *InvoiceUpdate
SetPaymentProvider sets the "payment_provider" field.
func (*InvoiceUpdate) SetPrice ¶
func (iu *InvoiceUpdate) SetPrice(d decimal.Decimal) *InvoiceUpdate
SetPrice sets the "price" field.
func (*InvoiceUpdate) SetRevokedAt ¶
func (iu *InvoiceUpdate) SetRevokedAt(t time.Time) *InvoiceUpdate
SetRevokedAt sets the "revoked_at" field.
func (*InvoiceUpdate) SetStatus ¶
func (iu *InvoiceUpdate) SetStatus(es enum.InvoiceStatus) *InvoiceUpdate
SetStatus sets the "status" field.
func (*InvoiceUpdate) SetSubscriptionID ¶
func (iu *InvoiceUpdate) SetSubscriptionID(i int64) *InvoiceUpdate
SetSubscriptionID sets the "subscription_id" field.
func (*InvoiceUpdate) SetSubscriptions ¶
func (iu *InvoiceUpdate) SetSubscriptions(s *Subscriptions) *InvoiceUpdate
SetSubscriptions sets the "subscriptions" edge to the Subscriptions entity.
func (*InvoiceUpdate) SetSubscriptionsID ¶
func (iu *InvoiceUpdate) SetSubscriptionsID(id int64) *InvoiceUpdate
SetSubscriptionsID sets the "subscriptions" edge to the Subscriptions entity by ID.
func (*InvoiceUpdate) SetTtpSubscriptionID ¶
func (iu *InvoiceUpdate) SetTtpSubscriptionID(s string) *InvoiceUpdate
SetTtpSubscriptionID sets the "ttp_subscription_id" 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) AddPrice ¶
func (iuo *InvoiceUpdateOne) AddPrice(d decimal.Decimal) *InvoiceUpdateOne
AddPrice adds d to the "price" field.
func (*InvoiceUpdateOne) AddReservationIDs ¶
func (iuo *InvoiceUpdateOne) AddReservationIDs(ids ...int64) *InvoiceUpdateOne
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by IDs.
func (*InvoiceUpdateOne) AddReservations ¶
func (iuo *InvoiceUpdateOne) AddReservations(p ...*ProductReservation) *InvoiceUpdateOne
AddReservations adds the "reservations" edges to the ProductReservation entity.
func (*InvoiceUpdateOne) ClearExternalTransactionID ¶
func (iuo *InvoiceUpdateOne) ClearExternalTransactionID() *InvoiceUpdateOne
ClearExternalTransactionID clears the value of the "external_transaction_id" field.
func (*InvoiceUpdateOne) ClearPaidAt ¶
func (iuo *InvoiceUpdateOne) ClearPaidAt() *InvoiceUpdateOne
ClearPaidAt clears the value of the "paid_at" field.
func (*InvoiceUpdateOne) ClearPaidTill ¶
func (iuo *InvoiceUpdateOne) ClearPaidTill() *InvoiceUpdateOne
ClearPaidTill clears the value of the "paid_till" field.
func (*InvoiceUpdateOne) ClearPaymentProfile ¶
func (iuo *InvoiceUpdateOne) ClearPaymentProfile() *InvoiceUpdateOne
ClearPaymentProfile clears the "payment_profile" edge to the PaymentProfile entity.
func (*InvoiceUpdateOne) ClearPaymentProfileID ¶
func (iuo *InvoiceUpdateOne) ClearPaymentProfileID() *InvoiceUpdateOne
ClearPaymentProfileID clears the value of the "payment_profile_id" field.
func (*InvoiceUpdateOne) ClearReservations ¶
func (iuo *InvoiceUpdateOne) ClearReservations() *InvoiceUpdateOne
ClearReservations clears all "reservations" edges to the ProductReservation entity.
func (*InvoiceUpdateOne) ClearRevokedAt ¶
func (iuo *InvoiceUpdateOne) ClearRevokedAt() *InvoiceUpdateOne
ClearRevokedAt clears the value of the "revoked_at" field.
func (*InvoiceUpdateOne) ClearSubscriptionID ¶
func (iuo *InvoiceUpdateOne) ClearSubscriptionID() *InvoiceUpdateOne
ClearSubscriptionID clears the value of the "subscription_id" field.
func (*InvoiceUpdateOne) ClearSubscriptions ¶
func (iuo *InvoiceUpdateOne) ClearSubscriptions() *InvoiceUpdateOne
ClearSubscriptions clears the "subscriptions" edge to the Subscriptions entity.
func (*InvoiceUpdateOne) ClearTtpSubscriptionID ¶
func (iuo *InvoiceUpdateOne) ClearTtpSubscriptionID() *InvoiceUpdateOne
ClearTtpSubscriptionID clears the value of the "ttp_subscription_id" 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) Modify ¶
func (iuo *InvoiceUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *InvoiceUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*InvoiceUpdateOne) Mutation ¶
func (iuo *InvoiceUpdateOne) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceUpdateOne) RemoveReservationIDs ¶
func (iuo *InvoiceUpdateOne) RemoveReservationIDs(ids ...int64) *InvoiceUpdateOne
RemoveReservationIDs removes the "reservations" edge to ProductReservation entities by IDs.
func (*InvoiceUpdateOne) RemoveReservations ¶
func (iuo *InvoiceUpdateOne) RemoveReservations(p ...*ProductReservation) *InvoiceUpdateOne
RemoveReservations removes "reservations" edges to ProductReservation entities.
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) SetCurrency ¶
func (iuo *InvoiceUpdateOne) SetCurrency(s string) *InvoiceUpdateOne
SetCurrency sets the "currency" field.
func (*InvoiceUpdateOne) SetExternalTransactionID ¶
func (iuo *InvoiceUpdateOne) SetExternalTransactionID(s string) *InvoiceUpdateOne
SetExternalTransactionID sets the "external_transaction_id" field.
func (*InvoiceUpdateOne) SetIsPaidAtProcessed ¶
func (iuo *InvoiceUpdateOne) SetIsPaidAtProcessed(b bool) *InvoiceUpdateOne
SetIsPaidAtProcessed sets the "is_paid_at_processed" field.
func (*InvoiceUpdateOne) SetIsPaidTillProcessed ¶
func (iuo *InvoiceUpdateOne) SetIsPaidTillProcessed(b bool) *InvoiceUpdateOne
SetIsPaidTillProcessed sets the "is_paid_till_processed" field.
func (*InvoiceUpdateOne) SetIsRevoked ¶
func (iuo *InvoiceUpdateOne) SetIsRevoked(b bool) *InvoiceUpdateOne
SetIsRevoked sets the "is_revoked" field.
func (*InvoiceUpdateOne) SetIsRevokedProcessed ¶
func (iuo *InvoiceUpdateOne) SetIsRevokedProcessed(b bool) *InvoiceUpdateOne
SetIsRevokedProcessed sets the "is_revoked_processed" field.
func (*InvoiceUpdateOne) SetIsTrial ¶
func (iuo *InvoiceUpdateOne) SetIsTrial(b bool) *InvoiceUpdateOne
SetIsTrial sets the "is_trial" field.
func (*InvoiceUpdateOne) SetNillableCurrency ¶
func (iuo *InvoiceUpdateOne) SetNillableCurrency(s *string) *InvoiceUpdateOne
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableExternalTransactionID ¶
func (iuo *InvoiceUpdateOne) SetNillableExternalTransactionID(s *string) *InvoiceUpdateOne
SetNillableExternalTransactionID sets the "external_transaction_id" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableIsPaidAtProcessed ¶
func (iuo *InvoiceUpdateOne) SetNillableIsPaidAtProcessed(b *bool) *InvoiceUpdateOne
SetNillableIsPaidAtProcessed sets the "is_paid_at_processed" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableIsPaidTillProcessed ¶
func (iuo *InvoiceUpdateOne) SetNillableIsPaidTillProcessed(b *bool) *InvoiceUpdateOne
SetNillableIsPaidTillProcessed sets the "is_paid_till_processed" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableIsRevoked ¶
func (iuo *InvoiceUpdateOne) SetNillableIsRevoked(b *bool) *InvoiceUpdateOne
SetNillableIsRevoked sets the "is_revoked" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableIsRevokedProcessed ¶
func (iuo *InvoiceUpdateOne) SetNillableIsRevokedProcessed(b *bool) *InvoiceUpdateOne
SetNillableIsRevokedProcessed sets the "is_revoked_processed" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableIsTrial ¶
func (iuo *InvoiceUpdateOne) SetNillableIsTrial(b *bool) *InvoiceUpdateOne
SetNillableIsTrial sets the "is_trial" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillablePaidAt ¶
func (iuo *InvoiceUpdateOne) SetNillablePaidAt(t *time.Time) *InvoiceUpdateOne
SetNillablePaidAt sets the "paid_at" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillablePaidTill ¶
func (iuo *InvoiceUpdateOne) SetNillablePaidTill(t *time.Time) *InvoiceUpdateOne
SetNillablePaidTill sets the "paid_till" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillablePaymentProfileID ¶
func (iuo *InvoiceUpdateOne) SetNillablePaymentProfileID(i *int64) *InvoiceUpdateOne
SetNillablePaymentProfileID sets the "payment_profile_id" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillablePaymentProvider ¶
func (iuo *InvoiceUpdateOne) SetNillablePaymentProvider(ep *enum.PaymentProvider) *InvoiceUpdateOne
SetNillablePaymentProvider sets the "payment_provider" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillablePrice ¶
func (iuo *InvoiceUpdateOne) SetNillablePrice(d *decimal.Decimal) *InvoiceUpdateOne
SetNillablePrice sets the "price" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableRevokedAt ¶
func (iuo *InvoiceUpdateOne) SetNillableRevokedAt(t *time.Time) *InvoiceUpdateOne
SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableStatus ¶
func (iuo *InvoiceUpdateOne) SetNillableStatus(es *enum.InvoiceStatus) *InvoiceUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableSubscriptionID ¶
func (iuo *InvoiceUpdateOne) SetNillableSubscriptionID(i *int64) *InvoiceUpdateOne
SetNillableSubscriptionID sets the "subscription_id" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableSubscriptionsID ¶
func (iuo *InvoiceUpdateOne) SetNillableSubscriptionsID(id *int64) *InvoiceUpdateOne
SetNillableSubscriptionsID sets the "subscriptions" edge to the Subscriptions entity by ID if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableTtpSubscriptionID ¶
func (iuo *InvoiceUpdateOne) SetNillableTtpSubscriptionID(s *string) *InvoiceUpdateOne
SetNillableTtpSubscriptionID sets the "ttp_subscription_id" field if the given value is not nil.
func (*InvoiceUpdateOne) SetPaidAt ¶
func (iuo *InvoiceUpdateOne) SetPaidAt(t time.Time) *InvoiceUpdateOne
SetPaidAt sets the "paid_at" field.
func (*InvoiceUpdateOne) SetPaidTill ¶
func (iuo *InvoiceUpdateOne) SetPaidTill(t time.Time) *InvoiceUpdateOne
SetPaidTill sets the "paid_till" field.
func (*InvoiceUpdateOne) SetPaymentProfile ¶
func (iuo *InvoiceUpdateOne) SetPaymentProfile(p *PaymentProfile) *InvoiceUpdateOne
SetPaymentProfile sets the "payment_profile" edge to the PaymentProfile entity.
func (*InvoiceUpdateOne) SetPaymentProfileID ¶
func (iuo *InvoiceUpdateOne) SetPaymentProfileID(i int64) *InvoiceUpdateOne
SetPaymentProfileID sets the "payment_profile_id" field.
func (*InvoiceUpdateOne) SetPaymentProvider ¶
func (iuo *InvoiceUpdateOne) SetPaymentProvider(ep enum.PaymentProvider) *InvoiceUpdateOne
SetPaymentProvider sets the "payment_provider" field.
func (*InvoiceUpdateOne) SetPrice ¶
func (iuo *InvoiceUpdateOne) SetPrice(d decimal.Decimal) *InvoiceUpdateOne
SetPrice sets the "price" field.
func (*InvoiceUpdateOne) SetRevokedAt ¶
func (iuo *InvoiceUpdateOne) SetRevokedAt(t time.Time) *InvoiceUpdateOne
SetRevokedAt sets the "revoked_at" field.
func (*InvoiceUpdateOne) SetStatus ¶
func (iuo *InvoiceUpdateOne) SetStatus(es enum.InvoiceStatus) *InvoiceUpdateOne
SetStatus sets the "status" field.
func (*InvoiceUpdateOne) SetSubscriptionID ¶
func (iuo *InvoiceUpdateOne) SetSubscriptionID(i int64) *InvoiceUpdateOne
SetSubscriptionID sets the "subscription_id" field.
func (*InvoiceUpdateOne) SetSubscriptions ¶
func (iuo *InvoiceUpdateOne) SetSubscriptions(s *Subscriptions) *InvoiceUpdateOne
SetSubscriptions sets the "subscriptions" edge to the Subscriptions entity.
func (*InvoiceUpdateOne) SetSubscriptionsID ¶
func (iuo *InvoiceUpdateOne) SetSubscriptionsID(id int64) *InvoiceUpdateOne
SetSubscriptionsID sets the "subscriptions" edge to the Subscriptions entity by ID.
func (*InvoiceUpdateOne) SetTtpSubscriptionID ¶
func (iuo *InvoiceUpdateOne) SetTtpSubscriptionID(s string) *InvoiceUpdateOne
SetTtpSubscriptionID sets the "ttp_subscription_id" field.
func (*InvoiceUpdateOne) Where ¶
func (iuo *InvoiceUpdateOne) Where(ps ...predicate.Invoice) *InvoiceUpdateOne
Where appends a list predicates to the InvoiceUpdate builder.
type InvoiceUpsert ¶
InvoiceUpsert is the "OnConflict" setter.
func (*InvoiceUpsert) AddPrice ¶
func (u *InvoiceUpsert) AddPrice(v decimal.Decimal) *InvoiceUpsert
AddPrice adds v to the "price" field.
func (*InvoiceUpsert) ClearExternalTransactionID ¶
func (u *InvoiceUpsert) ClearExternalTransactionID() *InvoiceUpsert
ClearExternalTransactionID clears the value of the "external_transaction_id" field.
func (*InvoiceUpsert) ClearPaidAt ¶
func (u *InvoiceUpsert) ClearPaidAt() *InvoiceUpsert
ClearPaidAt clears the value of the "paid_at" field.
func (*InvoiceUpsert) ClearPaidTill ¶
func (u *InvoiceUpsert) ClearPaidTill() *InvoiceUpsert
ClearPaidTill clears the value of the "paid_till" field.
func (*InvoiceUpsert) ClearPaymentProfileID ¶
func (u *InvoiceUpsert) ClearPaymentProfileID() *InvoiceUpsert
ClearPaymentProfileID clears the value of the "payment_profile_id" field.
func (*InvoiceUpsert) ClearRevokedAt ¶
func (u *InvoiceUpsert) ClearRevokedAt() *InvoiceUpsert
ClearRevokedAt clears the value of the "revoked_at" field.
func (*InvoiceUpsert) ClearSubscriptionID ¶
func (u *InvoiceUpsert) ClearSubscriptionID() *InvoiceUpsert
ClearSubscriptionID clears the value of the "subscription_id" field.
func (*InvoiceUpsert) ClearTtpSubscriptionID ¶
func (u *InvoiceUpsert) ClearTtpSubscriptionID() *InvoiceUpsert
ClearTtpSubscriptionID clears the value of the "ttp_subscription_id" field.
func (*InvoiceUpsert) SetCurrency ¶
func (u *InvoiceUpsert) SetCurrency(v string) *InvoiceUpsert
SetCurrency sets the "currency" field.
func (*InvoiceUpsert) SetExternalTransactionID ¶
func (u *InvoiceUpsert) SetExternalTransactionID(v string) *InvoiceUpsert
SetExternalTransactionID sets the "external_transaction_id" field.
func (*InvoiceUpsert) SetIsPaidAtProcessed ¶
func (u *InvoiceUpsert) SetIsPaidAtProcessed(v bool) *InvoiceUpsert
SetIsPaidAtProcessed sets the "is_paid_at_processed" field.
func (*InvoiceUpsert) SetIsPaidTillProcessed ¶
func (u *InvoiceUpsert) SetIsPaidTillProcessed(v bool) *InvoiceUpsert
SetIsPaidTillProcessed sets the "is_paid_till_processed" field.
func (*InvoiceUpsert) SetIsRevoked ¶
func (u *InvoiceUpsert) SetIsRevoked(v bool) *InvoiceUpsert
SetIsRevoked sets the "is_revoked" field.
func (*InvoiceUpsert) SetIsRevokedProcessed ¶
func (u *InvoiceUpsert) SetIsRevokedProcessed(v bool) *InvoiceUpsert
SetIsRevokedProcessed sets the "is_revoked_processed" field.
func (*InvoiceUpsert) SetIsTrial ¶
func (u *InvoiceUpsert) SetIsTrial(v bool) *InvoiceUpsert
SetIsTrial sets the "is_trial" field.
func (*InvoiceUpsert) SetPaidAt ¶
func (u *InvoiceUpsert) SetPaidAt(v time.Time) *InvoiceUpsert
SetPaidAt sets the "paid_at" field.
func (*InvoiceUpsert) SetPaidTill ¶
func (u *InvoiceUpsert) SetPaidTill(v time.Time) *InvoiceUpsert
SetPaidTill sets the "paid_till" field.
func (*InvoiceUpsert) SetPaymentProfileID ¶
func (u *InvoiceUpsert) SetPaymentProfileID(v int64) *InvoiceUpsert
SetPaymentProfileID sets the "payment_profile_id" field.
func (*InvoiceUpsert) SetPaymentProvider ¶
func (u *InvoiceUpsert) SetPaymentProvider(v enum.PaymentProvider) *InvoiceUpsert
SetPaymentProvider sets the "payment_provider" field.
func (*InvoiceUpsert) SetPrice ¶
func (u *InvoiceUpsert) SetPrice(v decimal.Decimal) *InvoiceUpsert
SetPrice sets the "price" field.
func (*InvoiceUpsert) SetRevokedAt ¶
func (u *InvoiceUpsert) SetRevokedAt(v time.Time) *InvoiceUpsert
SetRevokedAt sets the "revoked_at" field.
func (*InvoiceUpsert) SetStatus ¶
func (u *InvoiceUpsert) SetStatus(v enum.InvoiceStatus) *InvoiceUpsert
SetStatus sets the "status" field.
func (*InvoiceUpsert) SetSubscriptionID ¶
func (u *InvoiceUpsert) SetSubscriptionID(v int64) *InvoiceUpsert
SetSubscriptionID sets the "subscription_id" field.
func (*InvoiceUpsert) SetTtpSubscriptionID ¶
func (u *InvoiceUpsert) SetTtpSubscriptionID(v string) *InvoiceUpsert
SetTtpSubscriptionID sets the "ttp_subscription_id" field.
func (*InvoiceUpsert) UpdateCurrency ¶
func (u *InvoiceUpsert) UpdateCurrency() *InvoiceUpsert
UpdateCurrency sets the "currency" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateExternalTransactionID ¶
func (u *InvoiceUpsert) UpdateExternalTransactionID() *InvoiceUpsert
UpdateExternalTransactionID sets the "external_transaction_id" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateIsPaidAtProcessed ¶
func (u *InvoiceUpsert) UpdateIsPaidAtProcessed() *InvoiceUpsert
UpdateIsPaidAtProcessed sets the "is_paid_at_processed" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateIsPaidTillProcessed ¶
func (u *InvoiceUpsert) UpdateIsPaidTillProcessed() *InvoiceUpsert
UpdateIsPaidTillProcessed sets the "is_paid_till_processed" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateIsRevoked ¶
func (u *InvoiceUpsert) UpdateIsRevoked() *InvoiceUpsert
UpdateIsRevoked sets the "is_revoked" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateIsRevokedProcessed ¶
func (u *InvoiceUpsert) UpdateIsRevokedProcessed() *InvoiceUpsert
UpdateIsRevokedProcessed sets the "is_revoked_processed" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateIsTrial ¶
func (u *InvoiceUpsert) UpdateIsTrial() *InvoiceUpsert
UpdateIsTrial sets the "is_trial" field to the value that was provided on create.
func (*InvoiceUpsert) UpdatePaidAt ¶
func (u *InvoiceUpsert) UpdatePaidAt() *InvoiceUpsert
UpdatePaidAt sets the "paid_at" field to the value that was provided on create.
func (*InvoiceUpsert) UpdatePaidTill ¶
func (u *InvoiceUpsert) UpdatePaidTill() *InvoiceUpsert
UpdatePaidTill sets the "paid_till" field to the value that was provided on create.
func (*InvoiceUpsert) UpdatePaymentProfileID ¶
func (u *InvoiceUpsert) UpdatePaymentProfileID() *InvoiceUpsert
UpdatePaymentProfileID sets the "payment_profile_id" field to the value that was provided on create.
func (*InvoiceUpsert) UpdatePaymentProvider ¶
func (u *InvoiceUpsert) UpdatePaymentProvider() *InvoiceUpsert
UpdatePaymentProvider sets the "payment_provider" field to the value that was provided on create.
func (*InvoiceUpsert) UpdatePrice ¶
func (u *InvoiceUpsert) UpdatePrice() *InvoiceUpsert
UpdatePrice sets the "price" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateRevokedAt ¶
func (u *InvoiceUpsert) UpdateRevokedAt() *InvoiceUpsert
UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateStatus ¶
func (u *InvoiceUpsert) UpdateStatus() *InvoiceUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateSubscriptionID ¶
func (u *InvoiceUpsert) UpdateSubscriptionID() *InvoiceUpsert
UpdateSubscriptionID sets the "subscription_id" field to the value that was provided on create.
func (*InvoiceUpsert) UpdateTtpSubscriptionID ¶
func (u *InvoiceUpsert) UpdateTtpSubscriptionID() *InvoiceUpsert
UpdateTtpSubscriptionID sets the "ttp_subscription_id" field to the value that was provided on create.
type InvoiceUpsertBulk ¶
type InvoiceUpsertBulk struct {
// contains filtered or unexported fields
}
InvoiceUpsertBulk is the builder for "upsert"-ing a bulk of Invoice nodes.
func (*InvoiceUpsertBulk) AddPrice ¶
func (u *InvoiceUpsertBulk) AddPrice(v decimal.Decimal) *InvoiceUpsertBulk
AddPrice adds v to the "price" field.
func (*InvoiceUpsertBulk) ClearExternalTransactionID ¶
func (u *InvoiceUpsertBulk) ClearExternalTransactionID() *InvoiceUpsertBulk
ClearExternalTransactionID clears the value of the "external_transaction_id" field.
func (*InvoiceUpsertBulk) ClearPaidAt ¶
func (u *InvoiceUpsertBulk) ClearPaidAt() *InvoiceUpsertBulk
ClearPaidAt clears the value of the "paid_at" field.
func (*InvoiceUpsertBulk) ClearPaidTill ¶
func (u *InvoiceUpsertBulk) ClearPaidTill() *InvoiceUpsertBulk
ClearPaidTill clears the value of the "paid_till" field.
func (*InvoiceUpsertBulk) ClearPaymentProfileID ¶
func (u *InvoiceUpsertBulk) ClearPaymentProfileID() *InvoiceUpsertBulk
ClearPaymentProfileID clears the value of the "payment_profile_id" field.
func (*InvoiceUpsertBulk) ClearRevokedAt ¶
func (u *InvoiceUpsertBulk) ClearRevokedAt() *InvoiceUpsertBulk
ClearRevokedAt clears the value of the "revoked_at" field.
func (*InvoiceUpsertBulk) ClearSubscriptionID ¶
func (u *InvoiceUpsertBulk) ClearSubscriptionID() *InvoiceUpsertBulk
ClearSubscriptionID clears the value of the "subscription_id" field.
func (*InvoiceUpsertBulk) ClearTtpSubscriptionID ¶
func (u *InvoiceUpsertBulk) ClearTtpSubscriptionID() *InvoiceUpsertBulk
ClearTtpSubscriptionID clears the value of the "ttp_subscription_id" field.
func (*InvoiceUpsertBulk) DoNothing ¶
func (u *InvoiceUpsertBulk) DoNothing() *InvoiceUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*InvoiceUpsertBulk) Exec ¶
func (u *InvoiceUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceUpsertBulk) ExecX ¶
func (u *InvoiceUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceUpsertBulk) Ignore ¶
func (u *InvoiceUpsertBulk) Ignore() *InvoiceUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Invoice.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*InvoiceUpsertBulk) SetCurrency ¶
func (u *InvoiceUpsertBulk) SetCurrency(v string) *InvoiceUpsertBulk
SetCurrency sets the "currency" field.
func (*InvoiceUpsertBulk) SetExternalTransactionID ¶
func (u *InvoiceUpsertBulk) SetExternalTransactionID(v string) *InvoiceUpsertBulk
SetExternalTransactionID sets the "external_transaction_id" field.
func (*InvoiceUpsertBulk) SetIsPaidAtProcessed ¶
func (u *InvoiceUpsertBulk) SetIsPaidAtProcessed(v bool) *InvoiceUpsertBulk
SetIsPaidAtProcessed sets the "is_paid_at_processed" field.
func (*InvoiceUpsertBulk) SetIsPaidTillProcessed ¶
func (u *InvoiceUpsertBulk) SetIsPaidTillProcessed(v bool) *InvoiceUpsertBulk
SetIsPaidTillProcessed sets the "is_paid_till_processed" field.
func (*InvoiceUpsertBulk) SetIsRevoked ¶
func (u *InvoiceUpsertBulk) SetIsRevoked(v bool) *InvoiceUpsertBulk
SetIsRevoked sets the "is_revoked" field.
func (*InvoiceUpsertBulk) SetIsRevokedProcessed ¶
func (u *InvoiceUpsertBulk) SetIsRevokedProcessed(v bool) *InvoiceUpsertBulk
SetIsRevokedProcessed sets the "is_revoked_processed" field.
func (*InvoiceUpsertBulk) SetIsTrial ¶
func (u *InvoiceUpsertBulk) SetIsTrial(v bool) *InvoiceUpsertBulk
SetIsTrial sets the "is_trial" field.
func (*InvoiceUpsertBulk) SetPaidAt ¶
func (u *InvoiceUpsertBulk) SetPaidAt(v time.Time) *InvoiceUpsertBulk
SetPaidAt sets the "paid_at" field.
func (*InvoiceUpsertBulk) SetPaidTill ¶
func (u *InvoiceUpsertBulk) SetPaidTill(v time.Time) *InvoiceUpsertBulk
SetPaidTill sets the "paid_till" field.
func (*InvoiceUpsertBulk) SetPaymentProfileID ¶
func (u *InvoiceUpsertBulk) SetPaymentProfileID(v int64) *InvoiceUpsertBulk
SetPaymentProfileID sets the "payment_profile_id" field.
func (*InvoiceUpsertBulk) SetPaymentProvider ¶
func (u *InvoiceUpsertBulk) SetPaymentProvider(v enum.PaymentProvider) *InvoiceUpsertBulk
SetPaymentProvider sets the "payment_provider" field.
func (*InvoiceUpsertBulk) SetPrice ¶
func (u *InvoiceUpsertBulk) SetPrice(v decimal.Decimal) *InvoiceUpsertBulk
SetPrice sets the "price" field.
func (*InvoiceUpsertBulk) SetRevokedAt ¶
func (u *InvoiceUpsertBulk) SetRevokedAt(v time.Time) *InvoiceUpsertBulk
SetRevokedAt sets the "revoked_at" field.
func (*InvoiceUpsertBulk) SetStatus ¶
func (u *InvoiceUpsertBulk) SetStatus(v enum.InvoiceStatus) *InvoiceUpsertBulk
SetStatus sets the "status" field.
func (*InvoiceUpsertBulk) SetSubscriptionID ¶
func (u *InvoiceUpsertBulk) SetSubscriptionID(v int64) *InvoiceUpsertBulk
SetSubscriptionID sets the "subscription_id" field.
func (*InvoiceUpsertBulk) SetTtpSubscriptionID ¶
func (u *InvoiceUpsertBulk) SetTtpSubscriptionID(v string) *InvoiceUpsertBulk
SetTtpSubscriptionID sets the "ttp_subscription_id" field.
func (*InvoiceUpsertBulk) Update ¶
func (u *InvoiceUpsertBulk) Update(set func(*InvoiceUpsert)) *InvoiceUpsertBulk
Update allows overriding fields `UPDATE` values. See the InvoiceCreateBulk.OnConflict documentation for more info.
func (*InvoiceUpsertBulk) UpdateCurrency ¶
func (u *InvoiceUpsertBulk) UpdateCurrency() *InvoiceUpsertBulk
UpdateCurrency sets the "currency" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateExternalTransactionID ¶
func (u *InvoiceUpsertBulk) UpdateExternalTransactionID() *InvoiceUpsertBulk
UpdateExternalTransactionID sets the "external_transaction_id" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateIsPaidAtProcessed ¶
func (u *InvoiceUpsertBulk) UpdateIsPaidAtProcessed() *InvoiceUpsertBulk
UpdateIsPaidAtProcessed sets the "is_paid_at_processed" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateIsPaidTillProcessed ¶
func (u *InvoiceUpsertBulk) UpdateIsPaidTillProcessed() *InvoiceUpsertBulk
UpdateIsPaidTillProcessed sets the "is_paid_till_processed" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateIsRevoked ¶
func (u *InvoiceUpsertBulk) UpdateIsRevoked() *InvoiceUpsertBulk
UpdateIsRevoked sets the "is_revoked" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateIsRevokedProcessed ¶
func (u *InvoiceUpsertBulk) UpdateIsRevokedProcessed() *InvoiceUpsertBulk
UpdateIsRevokedProcessed sets the "is_revoked_processed" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateIsTrial ¶
func (u *InvoiceUpsertBulk) UpdateIsTrial() *InvoiceUpsertBulk
UpdateIsTrial sets the "is_trial" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateNewValues ¶
func (u *InvoiceUpsertBulk) UpdateNewValues() *InvoiceUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Invoice.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(invoice.FieldID)
}),
).
Exec(ctx)
func (*InvoiceUpsertBulk) UpdatePaidAt ¶
func (u *InvoiceUpsertBulk) UpdatePaidAt() *InvoiceUpsertBulk
UpdatePaidAt sets the "paid_at" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdatePaidTill ¶
func (u *InvoiceUpsertBulk) UpdatePaidTill() *InvoiceUpsertBulk
UpdatePaidTill sets the "paid_till" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdatePaymentProfileID ¶
func (u *InvoiceUpsertBulk) UpdatePaymentProfileID() *InvoiceUpsertBulk
UpdatePaymentProfileID sets the "payment_profile_id" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdatePaymentProvider ¶
func (u *InvoiceUpsertBulk) UpdatePaymentProvider() *InvoiceUpsertBulk
UpdatePaymentProvider sets the "payment_provider" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdatePrice ¶
func (u *InvoiceUpsertBulk) UpdatePrice() *InvoiceUpsertBulk
UpdatePrice sets the "price" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateRevokedAt ¶
func (u *InvoiceUpsertBulk) UpdateRevokedAt() *InvoiceUpsertBulk
UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateStatus ¶
func (u *InvoiceUpsertBulk) UpdateStatus() *InvoiceUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateSubscriptionID ¶
func (u *InvoiceUpsertBulk) UpdateSubscriptionID() *InvoiceUpsertBulk
UpdateSubscriptionID sets the "subscription_id" field to the value that was provided on create.
func (*InvoiceUpsertBulk) UpdateTtpSubscriptionID ¶
func (u *InvoiceUpsertBulk) UpdateTtpSubscriptionID() *InvoiceUpsertBulk
UpdateTtpSubscriptionID sets the "ttp_subscription_id" field to the value that was provided on create.
type InvoiceUpsertOne ¶
type InvoiceUpsertOne struct {
// contains filtered or unexported fields
}
InvoiceUpsertOne is the builder for "upsert"-ing
one Invoice node.
func (*InvoiceUpsertOne) AddPrice ¶
func (u *InvoiceUpsertOne) AddPrice(v decimal.Decimal) *InvoiceUpsertOne
AddPrice adds v to the "price" field.
func (*InvoiceUpsertOne) ClearExternalTransactionID ¶
func (u *InvoiceUpsertOne) ClearExternalTransactionID() *InvoiceUpsertOne
ClearExternalTransactionID clears the value of the "external_transaction_id" field.
func (*InvoiceUpsertOne) ClearPaidAt ¶
func (u *InvoiceUpsertOne) ClearPaidAt() *InvoiceUpsertOne
ClearPaidAt clears the value of the "paid_at" field.
func (*InvoiceUpsertOne) ClearPaidTill ¶
func (u *InvoiceUpsertOne) ClearPaidTill() *InvoiceUpsertOne
ClearPaidTill clears the value of the "paid_till" field.
func (*InvoiceUpsertOne) ClearPaymentProfileID ¶
func (u *InvoiceUpsertOne) ClearPaymentProfileID() *InvoiceUpsertOne
ClearPaymentProfileID clears the value of the "payment_profile_id" field.
func (*InvoiceUpsertOne) ClearRevokedAt ¶
func (u *InvoiceUpsertOne) ClearRevokedAt() *InvoiceUpsertOne
ClearRevokedAt clears the value of the "revoked_at" field.
func (*InvoiceUpsertOne) ClearSubscriptionID ¶
func (u *InvoiceUpsertOne) ClearSubscriptionID() *InvoiceUpsertOne
ClearSubscriptionID clears the value of the "subscription_id" field.
func (*InvoiceUpsertOne) ClearTtpSubscriptionID ¶
func (u *InvoiceUpsertOne) ClearTtpSubscriptionID() *InvoiceUpsertOne
ClearTtpSubscriptionID clears the value of the "ttp_subscription_id" field.
func (*InvoiceUpsertOne) DoNothing ¶
func (u *InvoiceUpsertOne) DoNothing() *InvoiceUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*InvoiceUpsertOne) Exec ¶
func (u *InvoiceUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceUpsertOne) ExecX ¶
func (u *InvoiceUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceUpsertOne) ID ¶
func (u *InvoiceUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*InvoiceUpsertOne) IDX ¶
func (u *InvoiceUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*InvoiceUpsertOne) Ignore ¶
func (u *InvoiceUpsertOne) Ignore() *InvoiceUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Invoice.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*InvoiceUpsertOne) SetCurrency ¶
func (u *InvoiceUpsertOne) SetCurrency(v string) *InvoiceUpsertOne
SetCurrency sets the "currency" field.
func (*InvoiceUpsertOne) SetExternalTransactionID ¶
func (u *InvoiceUpsertOne) SetExternalTransactionID(v string) *InvoiceUpsertOne
SetExternalTransactionID sets the "external_transaction_id" field.
func (*InvoiceUpsertOne) SetIsPaidAtProcessed ¶
func (u *InvoiceUpsertOne) SetIsPaidAtProcessed(v bool) *InvoiceUpsertOne
SetIsPaidAtProcessed sets the "is_paid_at_processed" field.
func (*InvoiceUpsertOne) SetIsPaidTillProcessed ¶
func (u *InvoiceUpsertOne) SetIsPaidTillProcessed(v bool) *InvoiceUpsertOne
SetIsPaidTillProcessed sets the "is_paid_till_processed" field.
func (*InvoiceUpsertOne) SetIsRevoked ¶
func (u *InvoiceUpsertOne) SetIsRevoked(v bool) *InvoiceUpsertOne
SetIsRevoked sets the "is_revoked" field.
func (*InvoiceUpsertOne) SetIsRevokedProcessed ¶
func (u *InvoiceUpsertOne) SetIsRevokedProcessed(v bool) *InvoiceUpsertOne
SetIsRevokedProcessed sets the "is_revoked_processed" field.
func (*InvoiceUpsertOne) SetIsTrial ¶
func (u *InvoiceUpsertOne) SetIsTrial(v bool) *InvoiceUpsertOne
SetIsTrial sets the "is_trial" field.
func (*InvoiceUpsertOne) SetPaidAt ¶
func (u *InvoiceUpsertOne) SetPaidAt(v time.Time) *InvoiceUpsertOne
SetPaidAt sets the "paid_at" field.
func (*InvoiceUpsertOne) SetPaidTill ¶
func (u *InvoiceUpsertOne) SetPaidTill(v time.Time) *InvoiceUpsertOne
SetPaidTill sets the "paid_till" field.
func (*InvoiceUpsertOne) SetPaymentProfileID ¶
func (u *InvoiceUpsertOne) SetPaymentProfileID(v int64) *InvoiceUpsertOne
SetPaymentProfileID sets the "payment_profile_id" field.
func (*InvoiceUpsertOne) SetPaymentProvider ¶
func (u *InvoiceUpsertOne) SetPaymentProvider(v enum.PaymentProvider) *InvoiceUpsertOne
SetPaymentProvider sets the "payment_provider" field.
func (*InvoiceUpsertOne) SetPrice ¶
func (u *InvoiceUpsertOne) SetPrice(v decimal.Decimal) *InvoiceUpsertOne
SetPrice sets the "price" field.
func (*InvoiceUpsertOne) SetRevokedAt ¶
func (u *InvoiceUpsertOne) SetRevokedAt(v time.Time) *InvoiceUpsertOne
SetRevokedAt sets the "revoked_at" field.
func (*InvoiceUpsertOne) SetStatus ¶
func (u *InvoiceUpsertOne) SetStatus(v enum.InvoiceStatus) *InvoiceUpsertOne
SetStatus sets the "status" field.
func (*InvoiceUpsertOne) SetSubscriptionID ¶
func (u *InvoiceUpsertOne) SetSubscriptionID(v int64) *InvoiceUpsertOne
SetSubscriptionID sets the "subscription_id" field.
func (*InvoiceUpsertOne) SetTtpSubscriptionID ¶
func (u *InvoiceUpsertOne) SetTtpSubscriptionID(v string) *InvoiceUpsertOne
SetTtpSubscriptionID sets the "ttp_subscription_id" field.
func (*InvoiceUpsertOne) Update ¶
func (u *InvoiceUpsertOne) Update(set func(*InvoiceUpsert)) *InvoiceUpsertOne
Update allows overriding fields `UPDATE` values. See the InvoiceCreate.OnConflict documentation for more info.
func (*InvoiceUpsertOne) UpdateCurrency ¶
func (u *InvoiceUpsertOne) UpdateCurrency() *InvoiceUpsertOne
UpdateCurrency sets the "currency" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateExternalTransactionID ¶
func (u *InvoiceUpsertOne) UpdateExternalTransactionID() *InvoiceUpsertOne
UpdateExternalTransactionID sets the "external_transaction_id" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateIsPaidAtProcessed ¶
func (u *InvoiceUpsertOne) UpdateIsPaidAtProcessed() *InvoiceUpsertOne
UpdateIsPaidAtProcessed sets the "is_paid_at_processed" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateIsPaidTillProcessed ¶
func (u *InvoiceUpsertOne) UpdateIsPaidTillProcessed() *InvoiceUpsertOne
UpdateIsPaidTillProcessed sets the "is_paid_till_processed" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateIsRevoked ¶
func (u *InvoiceUpsertOne) UpdateIsRevoked() *InvoiceUpsertOne
UpdateIsRevoked sets the "is_revoked" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateIsRevokedProcessed ¶
func (u *InvoiceUpsertOne) UpdateIsRevokedProcessed() *InvoiceUpsertOne
UpdateIsRevokedProcessed sets the "is_revoked_processed" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateIsTrial ¶
func (u *InvoiceUpsertOne) UpdateIsTrial() *InvoiceUpsertOne
UpdateIsTrial sets the "is_trial" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateNewValues ¶
func (u *InvoiceUpsertOne) UpdateNewValues() *InvoiceUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Invoice.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(invoice.FieldID)
}),
).
Exec(ctx)
func (*InvoiceUpsertOne) UpdatePaidAt ¶
func (u *InvoiceUpsertOne) UpdatePaidAt() *InvoiceUpsertOne
UpdatePaidAt sets the "paid_at" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdatePaidTill ¶
func (u *InvoiceUpsertOne) UpdatePaidTill() *InvoiceUpsertOne
UpdatePaidTill sets the "paid_till" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdatePaymentProfileID ¶
func (u *InvoiceUpsertOne) UpdatePaymentProfileID() *InvoiceUpsertOne
UpdatePaymentProfileID sets the "payment_profile_id" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdatePaymentProvider ¶
func (u *InvoiceUpsertOne) UpdatePaymentProvider() *InvoiceUpsertOne
UpdatePaymentProvider sets the "payment_provider" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdatePrice ¶
func (u *InvoiceUpsertOne) UpdatePrice() *InvoiceUpsertOne
UpdatePrice sets the "price" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateRevokedAt ¶
func (u *InvoiceUpsertOne) UpdateRevokedAt() *InvoiceUpsertOne
UpdateRevokedAt sets the "revoked_at" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateStatus ¶
func (u *InvoiceUpsertOne) UpdateStatus() *InvoiceUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateSubscriptionID ¶
func (u *InvoiceUpsertOne) UpdateSubscriptionID() *InvoiceUpsertOne
UpdateSubscriptionID sets the "subscription_id" field to the value that was provided on create.
func (*InvoiceUpsertOne) UpdateTtpSubscriptionID ¶
func (u *InvoiceUpsertOne) UpdateTtpSubscriptionID() *InvoiceUpsertOne
UpdateTtpSubscriptionID sets the "ttp_subscription_id" field to the value that was provided on create.
type Item ¶
type Item struct {
// ID of the ent.
ID int64 `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"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_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"`
// TopicName holds the value of the "topic_name" field.
TopicName *string `json:"topic_name,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ItemQuery when eager-loading is set.
Edges ItemEdges `json:"edges"`
// contains filtered or unexported fields
}
Item is the model entity for the Item schema.
func (*Item) QueryBundles ¶
func (i *Item) QueryBundles() *BundleQuery
QueryBundles queries the "bundles" edge of the Item entity.
func (*Item) Unwrap ¶
Unwrap unwraps the Item 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 (*Item) Update ¶
func (i *Item) Update() *ItemUpdateOne
Update returns a builder for updating this Item. Note that you need to call Item.Unwrap() before calling this method if this Item was returned from a transaction, and the transaction was committed or rolled back.
type ItemClient ¶
type ItemClient struct {
// contains filtered or unexported fields
}
ItemClient is a client for the Item schema.
func NewItemClient ¶
func NewItemClient(c config) *ItemClient
NewItemClient returns a client for the Item from the given config.
func (*ItemClient) Create ¶
func (c *ItemClient) Create() *ItemCreate
Create returns a builder for creating a Item entity.
func (*ItemClient) CreateBulk ¶
func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk
CreateBulk returns a builder for creating a bulk of Item entities.
func (*ItemClient) Delete ¶
func (c *ItemClient) Delete() *ItemDelete
Delete returns a delete builder for Item.
func (*ItemClient) DeleteOne ¶
func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ItemClient) DeleteOneID ¶
func (c *ItemClient) DeleteOneID(id int64) *ItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ItemClient) GetX ¶
func (c *ItemClient) GetX(ctx context.Context, id int64) *Item
GetX is like Get, but panics if an error occurs.
func (*ItemClient) Intercept ¶
func (c *ItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `item.Intercept(f(g(h())))`.
func (*ItemClient) Interceptors ¶
func (c *ItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ItemClient) MapCreateBulk ¶
func (c *ItemClient) MapCreateBulk(slice any, setFunc func(*ItemCreate, int)) *ItemCreateBulk
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 (*ItemClient) Query ¶
func (c *ItemClient) Query() *ItemQuery
Query returns a query builder for Item.
func (*ItemClient) QueryBundles ¶
func (c *ItemClient) QueryBundles(i *Item) *BundleQuery
QueryBundles queries the bundles edge of a Item.
func (*ItemClient) Update ¶
func (c *ItemClient) Update() *ItemUpdate
Update returns an update builder for Item.
func (*ItemClient) UpdateOne ¶
func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ItemClient) UpdateOneID ¶
func (c *ItemClient) UpdateOneID(id int64) *ItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ItemClient) Use ¶
func (c *ItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `item.Hooks(f(g(h())))`.
type ItemCreate ¶
type ItemCreate struct {
// contains filtered or unexported fields
}
ItemCreate is the builder for creating a Item entity.
func (*ItemCreate) AddBundleIDs ¶
func (ic *ItemCreate) AddBundleIDs(ids ...int64) *ItemCreate
AddBundleIDs adds the "bundles" edge to the Bundle entity by IDs.
func (*ItemCreate) AddBundles ¶
func (ic *ItemCreate) AddBundles(b ...*Bundle) *ItemCreate
AddBundles adds the "bundles" edges to the Bundle entity.
func (*ItemCreate) Exec ¶
func (ic *ItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreate) ExecX ¶
func (ic *ItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemCreate) Mutation ¶
func (ic *ItemCreate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemCreate) OnConflict ¶
func (ic *ItemCreate) OnConflict(opts ...sql.ConflictOption) *ItemUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Item.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ItemUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ItemCreate) OnConflictColumns ¶
func (ic *ItemCreate) OnConflictColumns(columns ...string) *ItemUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Item.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ItemCreate) Save ¶
func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)
Save creates the Item in the database.
func (*ItemCreate) SaveX ¶
func (ic *ItemCreate) SaveX(ctx context.Context) *Item
SaveX calls Save and panics if Save returns an error.
func (*ItemCreate) SetCreatedAt ¶
func (ic *ItemCreate) SetCreatedAt(t time.Time) *ItemCreate
SetCreatedAt sets the "created_at" field.
func (*ItemCreate) SetDeletedAt ¶
func (ic *ItemCreate) SetDeletedAt(t time.Time) *ItemCreate
SetDeletedAt sets the "deleted_at" field.
func (*ItemCreate) SetDescription ¶
func (ic *ItemCreate) SetDescription(s string) *ItemCreate
SetDescription sets the "description" field.
func (*ItemCreate) SetID ¶
func (ic *ItemCreate) SetID(i int64) *ItemCreate
SetID sets the "id" field.
func (*ItemCreate) SetName ¶
func (ic *ItemCreate) SetName(s string) *ItemCreate
SetName sets the "name" field.
func (*ItemCreate) SetNillableCreatedAt ¶
func (ic *ItemCreate) SetNillableCreatedAt(t *time.Time) *ItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ItemCreate) SetNillableDeletedAt ¶
func (ic *ItemCreate) SetNillableDeletedAt(t *time.Time) *ItemCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ItemCreate) SetNillableTopicName ¶
func (ic *ItemCreate) SetNillableTopicName(s *string) *ItemCreate
SetNillableTopicName sets the "topic_name" field if the given value is not nil.
func (*ItemCreate) SetNillableUpdatedAt ¶
func (ic *ItemCreate) SetNillableUpdatedAt(t *time.Time) *ItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ItemCreate) SetTopicName ¶
func (ic *ItemCreate) SetTopicName(s string) *ItemCreate
SetTopicName sets the "topic_name" field.
func (*ItemCreate) SetUpdatedAt ¶
func (ic *ItemCreate) SetUpdatedAt(t time.Time) *ItemCreate
SetUpdatedAt sets the "updated_at" field.
type ItemCreateBulk ¶
type ItemCreateBulk struct {
// contains filtered or unexported fields
}
ItemCreateBulk is the builder for creating many Item entities in bulk.
func (*ItemCreateBulk) Exec ¶
func (icb *ItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemCreateBulk) ExecX ¶
func (icb *ItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemCreateBulk) OnConflict ¶
func (icb *ItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *ItemUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Item.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ItemUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ItemCreateBulk) OnConflictColumns ¶
func (icb *ItemCreateBulk) OnConflictColumns(columns ...string) *ItemUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Item.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ItemDelete ¶
type ItemDelete struct {
// contains filtered or unexported fields
}
ItemDelete is the builder for deleting a Item entity.
func (*ItemDelete) Exec ¶
func (id *ItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ItemDelete) ExecX ¶
func (id *ItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ItemDelete) Where ¶
func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete
Where appends a list predicates to the ItemDelete builder.
type ItemDeleteOne ¶
type ItemDeleteOne struct {
// contains filtered or unexported fields
}
ItemDeleteOne is the builder for deleting a single Item entity.
func (*ItemDeleteOne) Exec ¶
func (ido *ItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ItemDeleteOne) ExecX ¶
func (ido *ItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemDeleteOne) Where ¶
func (ido *ItemDeleteOne) Where(ps ...predicate.Item) *ItemDeleteOne
Where appends a list predicates to the ItemDelete builder.
type ItemEdges ¶
type ItemEdges struct {
// Bundles holds the value of the bundles edge.
Bundles []*Bundle `json:"bundles,omitempty"`
// contains filtered or unexported fields
}
ItemEdges holds the relations/edges for other nodes in the graph.
func (ItemEdges) BundlesOrErr ¶
BundlesOrErr returns the Bundles value or an error if the edge was not loaded in eager-loading.
type ItemFilter ¶
type ItemFilter struct {
// contains filtered or unexported fields
}
ItemFilter provides a generic filtering capability at runtime for ItemQuery.
func (*ItemFilter) Where ¶
func (f *ItemFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ItemFilter) WhereCreatedAt ¶
func (f *ItemFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*ItemFilter) WhereDeletedAt ¶
func (f *ItemFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*ItemFilter) WhereDescription ¶
func (f *ItemFilter) WhereDescription(p entql.StringP)
WhereDescription applies the entql string predicate on the description field.
func (*ItemFilter) WhereHasBundles ¶
func (f *ItemFilter) WhereHasBundles()
WhereHasBundles applies a predicate to check if query has an edge bundles.
func (*ItemFilter) WhereHasBundlesWith ¶
func (f *ItemFilter) WhereHasBundlesWith(preds ...predicate.Bundle)
WhereHasBundlesWith applies a predicate to check if query has an edge bundles with a given conditions (other predicates).
func (*ItemFilter) WhereID ¶
func (f *ItemFilter) WhereID(p entql.Int64P)
WhereID applies the entql int64 predicate on the id field.
func (*ItemFilter) WhereName ¶
func (f *ItemFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*ItemFilter) WhereTopicName ¶
func (f *ItemFilter) WhereTopicName(p entql.StringP)
WhereTopicName applies the entql string predicate on the topic_name field.
func (*ItemFilter) WhereUpdatedAt ¶
func (f *ItemFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type ItemGroupBy ¶
type ItemGroupBy struct {
// contains filtered or unexported fields
}
ItemGroupBy is the group-by builder for Item entities.
func (*ItemGroupBy) Aggregate ¶
func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemGroupBy) Scan ¶
func (igb *ItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemMutation ¶
type ItemMutation struct {
// contains filtered or unexported fields
}
ItemMutation represents an operation that mutates the Item nodes in the graph.
func (*ItemMutation) AddBundleIDs ¶
func (m *ItemMutation) AddBundleIDs(ids ...int64)
AddBundleIDs adds the "bundles" edge to the Bundle entity by ids.
func (*ItemMutation) AddField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddedEdges ¶
func (m *ItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ItemMutation) AddedField ¶
func (m *ItemMutation) 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 (*ItemMutation) AddedFields ¶
func (m *ItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ItemMutation) AddedIDs ¶
func (m *ItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ItemMutation) BundlesCleared ¶
func (m *ItemMutation) BundlesCleared() bool
BundlesCleared reports if the "bundles" edge to the Bundle entity was cleared.
func (*ItemMutation) BundlesIDs ¶
func (m *ItemMutation) BundlesIDs() (ids []int64)
BundlesIDs returns the "bundles" edge IDs in the mutation.
func (*ItemMutation) ClearBundles ¶
func (m *ItemMutation) ClearBundles()
ClearBundles clears the "bundles" edge to the Bundle entity.
func (*ItemMutation) ClearDeletedAt ¶
func (m *ItemMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ItemMutation) ClearEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearField ¶
func (m *ItemMutation) 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 (*ItemMutation) ClearTopicName ¶
func (m *ItemMutation) ClearTopicName()
ClearTopicName clears the value of the "topic_name" field.
func (*ItemMutation) ClearedEdges ¶
func (m *ItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ItemMutation) ClearedFields ¶
func (m *ItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ItemMutation) Client ¶
func (m ItemMutation) 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 (*ItemMutation) CreatedAt ¶
func (m *ItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ItemMutation) DeletedAt ¶
func (m *ItemMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*ItemMutation) DeletedAtCleared ¶
func (m *ItemMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*ItemMutation) Description ¶
func (m *ItemMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ItemMutation) EdgeCleared ¶
func (m *ItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ItemMutation) Field ¶
func (m *ItemMutation) 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 (*ItemMutation) FieldCleared ¶
func (m *ItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ItemMutation) Fields ¶
func (m *ItemMutation) 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 (*ItemMutation) Filter ¶
func (m *ItemMutation) Filter() *ItemFilter
Filter returns an entql.Where implementation to apply filters on the ItemMutation builder.
func (*ItemMutation) ID ¶
func (m *ItemMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ItemMutation) IDs ¶
func (m *ItemMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ItemMutation) Name ¶
func (m *ItemMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Item entity. If the Item 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 (*ItemMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Item entity. If the Item 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 (*ItemMutation) OldDescription ¶
func (m *ItemMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Item entity. If the Item 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 (*ItemMutation) 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 (*ItemMutation) OldName ¶
func (m *ItemMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Item entity. If the Item 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 (*ItemMutation) OldTopicName ¶
func (m *ItemMutation) OldTopicName(ctx context.Context) (v *string, err error)
OldTopicName returns the old "topic_name" field's value of the Item entity. If the Item 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 (*ItemMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Item entity. If the Item 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 (*ItemMutation) RemoveBundleIDs ¶
func (m *ItemMutation) RemoveBundleIDs(ids ...int64)
RemoveBundleIDs removes the "bundles" edge to the Bundle entity by IDs.
func (*ItemMutation) RemovedBundlesIDs ¶
func (m *ItemMutation) RemovedBundlesIDs() (ids []int64)
RemovedBundles returns the removed IDs of the "bundles" edge to the Bundle entity.
func (*ItemMutation) RemovedEdges ¶
func (m *ItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ItemMutation) RemovedIDs ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetBundles ¶
func (m *ItemMutation) ResetBundles()
ResetBundles resets all changes to the "bundles" edge.
func (*ItemMutation) ResetCreatedAt ¶
func (m *ItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ItemMutation) ResetDeletedAt ¶
func (m *ItemMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*ItemMutation) ResetDescription ¶
func (m *ItemMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ItemMutation) ResetEdge ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetField ¶
func (m *ItemMutation) 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 (*ItemMutation) ResetName ¶
func (m *ItemMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ItemMutation) ResetTopicName ¶
func (m *ItemMutation) ResetTopicName()
ResetTopicName resets all changes to the "topic_name" field.
func (*ItemMutation) ResetUpdatedAt ¶
func (m *ItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ItemMutation) SetCreatedAt ¶
func (m *ItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ItemMutation) SetDeletedAt ¶
func (m *ItemMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*ItemMutation) SetDescription ¶
func (m *ItemMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ItemMutation) SetField ¶
func (m *ItemMutation) 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 (*ItemMutation) SetID ¶
func (m *ItemMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Item entities.
func (*ItemMutation) SetName ¶
func (m *ItemMutation) SetName(s string)
SetName sets the "name" field.
func (*ItemMutation) SetOp ¶
func (m *ItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ItemMutation) SetTopicName ¶
func (m *ItemMutation) SetTopicName(s string)
SetTopicName sets the "topic_name" field.
func (*ItemMutation) SetUpdatedAt ¶
func (m *ItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ItemMutation) TopicName ¶
func (m *ItemMutation) TopicName() (r string, exists bool)
TopicName returns the value of the "topic_name" field in the mutation.
func (*ItemMutation) TopicNameCleared ¶
func (m *ItemMutation) TopicNameCleared() bool
TopicNameCleared returns if the "topic_name" field was cleared in this mutation.
func (ItemMutation) Tx ¶
func (m ItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ItemMutation) Type ¶
func (m *ItemMutation) Type() string
Type returns the node type of this mutation (Item).
func (*ItemMutation) UpdatedAt ¶
func (m *ItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ItemMutation) Where ¶
func (m *ItemMutation) Where(ps ...predicate.Item)
Where appends a list predicates to the ItemMutation builder.
func (*ItemMutation) WhereP ¶
func (m *ItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ItemQuery ¶
type ItemQuery struct {
// contains filtered or unexported fields
}
ItemQuery is the builder for querying Item entities.
func (*ItemQuery) Aggregate ¶
func (iq *ItemQuery) Aggregate(fns ...AggregateFunc) *ItemSelect
Aggregate returns a ItemSelect configured with the given aggregations.
func (*ItemQuery) Clone ¶
Clone returns a duplicate of the ItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ItemQuery) Filter ¶
func (iq *ItemQuery) Filter() *ItemFilter
Filter returns a Filter implementation to apply filters on the ItemQuery builder.
func (*ItemQuery) First ¶
First returns the first Item entity from the query. Returns a *NotFoundError when no Item was found.
func (*ItemQuery) FirstID ¶
FirstID returns the first Item ID from the query. Returns a *NotFoundError when no Item ID was found.
func (*ItemQuery) GroupBy ¶
func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy
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.Item.Query().
GroupBy(item.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ItemQuery) Modify ¶
func (iq *ItemQuery) Modify(modifiers ...func(s *sql.Selector)) *ItemSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ItemQuery) Only ¶
Only returns a single Item entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Item entity is found. Returns a *NotFoundError when no Item entities are found.
func (*ItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only Item ID in the query. Returns a *NotSingularError when more than one Item ID is found. Returns a *NotFoundError when no entities are found.
func (*ItemQuery) Order ¶
func (iq *ItemQuery) Order(o ...item.OrderOption) *ItemQuery
Order specifies how the records should be ordered.
func (*ItemQuery) QueryBundles ¶
func (iq *ItemQuery) QueryBundles() *BundleQuery
QueryBundles chains the current query on the "bundles" edge.
func (*ItemQuery) Select ¶
func (iq *ItemQuery) Select(fields ...string) *ItemSelect
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.Item.Query().
Select(item.FieldCreatedAt).
Scan(ctx, &v)
func (*ItemQuery) 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 (*ItemQuery) WithBundles ¶
func (iq *ItemQuery) WithBundles(opts ...func(*BundleQuery)) *ItemQuery
WithBundles tells the query-builder to eager-load the nodes that are connected to the "bundles" edge. The optional arguments are used to configure the query builder of the edge.
type ItemSelect ¶
type ItemSelect struct {
*ItemQuery
// contains filtered or unexported fields
}
ItemSelect is the builder for selecting fields of Item entities.
func (*ItemSelect) Aggregate ¶
func (is *ItemSelect) Aggregate(fns ...AggregateFunc) *ItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ItemSelect) Modify ¶
func (is *ItemSelect) Modify(modifiers ...func(s *sql.Selector)) *ItemSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ItemSelect) Scan ¶
func (is *ItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ItemUpdate ¶
type ItemUpdate struct {
// contains filtered or unexported fields
}
ItemUpdate is the builder for updating Item entities.
func (*ItemUpdate) AddBundleIDs ¶
func (iu *ItemUpdate) AddBundleIDs(ids ...int64) *ItemUpdate
AddBundleIDs adds the "bundles" edge to the Bundle entity by IDs.
func (*ItemUpdate) AddBundles ¶
func (iu *ItemUpdate) AddBundles(b ...*Bundle) *ItemUpdate
AddBundles adds the "bundles" edges to the Bundle entity.
func (*ItemUpdate) ClearBundles ¶
func (iu *ItemUpdate) ClearBundles() *ItemUpdate
ClearBundles clears all "bundles" edges to the Bundle entity.
func (*ItemUpdate) ClearDeletedAt ¶
func (iu *ItemUpdate) ClearDeletedAt() *ItemUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ItemUpdate) ClearTopicName ¶
func (iu *ItemUpdate) ClearTopicName() *ItemUpdate
ClearTopicName clears the value of the "topic_name" field.
func (*ItemUpdate) Exec ¶
func (iu *ItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpdate) ExecX ¶
func (iu *ItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdate) Modify ¶
func (iu *ItemUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ItemUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ItemUpdate) Mutation ¶
func (iu *ItemUpdate) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdate) RemoveBundleIDs ¶
func (iu *ItemUpdate) RemoveBundleIDs(ids ...int64) *ItemUpdate
RemoveBundleIDs removes the "bundles" edge to Bundle entities by IDs.
func (*ItemUpdate) RemoveBundles ¶
func (iu *ItemUpdate) RemoveBundles(b ...*Bundle) *ItemUpdate
RemoveBundles removes "bundles" edges to Bundle entities.
func (*ItemUpdate) Save ¶
func (iu *ItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ItemUpdate) SaveX ¶
func (iu *ItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdate) SetDeletedAt ¶
func (iu *ItemUpdate) SetDeletedAt(t time.Time) *ItemUpdate
SetDeletedAt sets the "deleted_at" field.
func (*ItemUpdate) SetDescription ¶
func (iu *ItemUpdate) SetDescription(s string) *ItemUpdate
SetDescription sets the "description" field.
func (*ItemUpdate) SetName ¶
func (iu *ItemUpdate) SetName(s string) *ItemUpdate
SetName sets the "name" field.
func (*ItemUpdate) SetNillableDeletedAt ¶
func (iu *ItemUpdate) SetNillableDeletedAt(t *time.Time) *ItemUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ItemUpdate) SetNillableDescription ¶
func (iu *ItemUpdate) SetNillableDescription(s *string) *ItemUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemUpdate) SetNillableName ¶
func (iu *ItemUpdate) SetNillableName(s *string) *ItemUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ItemUpdate) SetNillableTopicName ¶
func (iu *ItemUpdate) SetNillableTopicName(s *string) *ItemUpdate
SetNillableTopicName sets the "topic_name" field if the given value is not nil.
func (*ItemUpdate) SetTopicName ¶
func (iu *ItemUpdate) SetTopicName(s string) *ItemUpdate
SetTopicName sets the "topic_name" field.
func (*ItemUpdate) SetUpdatedAt ¶
func (iu *ItemUpdate) SetUpdatedAt(t time.Time) *ItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ItemUpdate) Where ¶
func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate
Where appends a list predicates to the ItemUpdate builder.
type ItemUpdateOne ¶
type ItemUpdateOne struct {
// contains filtered or unexported fields
}
ItemUpdateOne is the builder for updating a single Item entity.
func (*ItemUpdateOne) AddBundleIDs ¶
func (iuo *ItemUpdateOne) AddBundleIDs(ids ...int64) *ItemUpdateOne
AddBundleIDs adds the "bundles" edge to the Bundle entity by IDs.
func (*ItemUpdateOne) AddBundles ¶
func (iuo *ItemUpdateOne) AddBundles(b ...*Bundle) *ItemUpdateOne
AddBundles adds the "bundles" edges to the Bundle entity.
func (*ItemUpdateOne) ClearBundles ¶
func (iuo *ItemUpdateOne) ClearBundles() *ItemUpdateOne
ClearBundles clears all "bundles" edges to the Bundle entity.
func (*ItemUpdateOne) ClearDeletedAt ¶
func (iuo *ItemUpdateOne) ClearDeletedAt() *ItemUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ItemUpdateOne) ClearTopicName ¶
func (iuo *ItemUpdateOne) ClearTopicName() *ItemUpdateOne
ClearTopicName clears the value of the "topic_name" field.
func (*ItemUpdateOne) Exec ¶
func (iuo *ItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ItemUpdateOne) ExecX ¶
func (iuo *ItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpdateOne) Modify ¶
func (iuo *ItemUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ItemUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ItemUpdateOne) Mutation ¶
func (iuo *ItemUpdateOne) Mutation() *ItemMutation
Mutation returns the ItemMutation object of the builder.
func (*ItemUpdateOne) RemoveBundleIDs ¶
func (iuo *ItemUpdateOne) RemoveBundleIDs(ids ...int64) *ItemUpdateOne
RemoveBundleIDs removes the "bundles" edge to Bundle entities by IDs.
func (*ItemUpdateOne) RemoveBundles ¶
func (iuo *ItemUpdateOne) RemoveBundles(b ...*Bundle) *ItemUpdateOne
RemoveBundles removes "bundles" edges to Bundle entities.
func (*ItemUpdateOne) Save ¶
func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)
Save executes the query and returns the updated Item entity.
func (*ItemUpdateOne) SaveX ¶
func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item
SaveX is like Save, but panics if an error occurs.
func (*ItemUpdateOne) Select ¶
func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ItemUpdateOne) SetDeletedAt ¶
func (iuo *ItemUpdateOne) SetDeletedAt(t time.Time) *ItemUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*ItemUpdateOne) SetDescription ¶
func (iuo *ItemUpdateOne) SetDescription(s string) *ItemUpdateOne
SetDescription sets the "description" field.
func (*ItemUpdateOne) SetName ¶
func (iuo *ItemUpdateOne) SetName(s string) *ItemUpdateOne
SetName sets the "name" field.
func (*ItemUpdateOne) SetNillableDeletedAt ¶
func (iuo *ItemUpdateOne) SetNillableDeletedAt(t *time.Time) *ItemUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableDescription ¶
func (iuo *ItemUpdateOne) SetNillableDescription(s *string) *ItemUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableName ¶
func (iuo *ItemUpdateOne) SetNillableName(s *string) *ItemUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ItemUpdateOne) SetNillableTopicName ¶
func (iuo *ItemUpdateOne) SetNillableTopicName(s *string) *ItemUpdateOne
SetNillableTopicName sets the "topic_name" field if the given value is not nil.
func (*ItemUpdateOne) SetTopicName ¶
func (iuo *ItemUpdateOne) SetTopicName(s string) *ItemUpdateOne
SetTopicName sets the "topic_name" field.
func (*ItemUpdateOne) SetUpdatedAt ¶
func (iuo *ItemUpdateOne) SetUpdatedAt(t time.Time) *ItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ItemUpdateOne) Where ¶
func (iuo *ItemUpdateOne) Where(ps ...predicate.Item) *ItemUpdateOne
Where appends a list predicates to the ItemUpdate builder.
type ItemUpsert ¶
ItemUpsert is the "OnConflict" setter.
func (*ItemUpsert) ClearDeletedAt ¶
func (u *ItemUpsert) ClearDeletedAt() *ItemUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ItemUpsert) ClearTopicName ¶
func (u *ItemUpsert) ClearTopicName() *ItemUpsert
ClearTopicName clears the value of the "topic_name" field.
func (*ItemUpsert) SetDeletedAt ¶
func (u *ItemUpsert) SetDeletedAt(v time.Time) *ItemUpsert
SetDeletedAt sets the "deleted_at" field.
func (*ItemUpsert) SetDescription ¶
func (u *ItemUpsert) SetDescription(v string) *ItemUpsert
SetDescription sets the "description" field.
func (*ItemUpsert) SetName ¶
func (u *ItemUpsert) SetName(v string) *ItemUpsert
SetName sets the "name" field.
func (*ItemUpsert) SetTopicName ¶
func (u *ItemUpsert) SetTopicName(v string) *ItemUpsert
SetTopicName sets the "topic_name" field.
func (*ItemUpsert) SetUpdatedAt ¶
func (u *ItemUpsert) SetUpdatedAt(v time.Time) *ItemUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ItemUpsert) UpdateDeletedAt ¶
func (u *ItemUpsert) UpdateDeletedAt() *ItemUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ItemUpsert) UpdateDescription ¶
func (u *ItemUpsert) UpdateDescription() *ItemUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ItemUpsert) UpdateName ¶
func (u *ItemUpsert) UpdateName() *ItemUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*ItemUpsert) UpdateTopicName ¶
func (u *ItemUpsert) UpdateTopicName() *ItemUpsert
UpdateTopicName sets the "topic_name" field to the value that was provided on create.
func (*ItemUpsert) UpdateUpdatedAt ¶
func (u *ItemUpsert) UpdateUpdatedAt() *ItemUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ItemUpsertBulk ¶
type ItemUpsertBulk struct {
// contains filtered or unexported fields
}
ItemUpsertBulk is the builder for "upsert"-ing a bulk of Item nodes.
func (*ItemUpsertBulk) ClearDeletedAt ¶
func (u *ItemUpsertBulk) ClearDeletedAt() *ItemUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ItemUpsertBulk) ClearTopicName ¶
func (u *ItemUpsertBulk) ClearTopicName() *ItemUpsertBulk
ClearTopicName clears the value of the "topic_name" field.
func (*ItemUpsertBulk) DoNothing ¶
func (u *ItemUpsertBulk) DoNothing() *ItemUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ItemUpsertBulk) Exec ¶
func (u *ItemUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpsertBulk) ExecX ¶
func (u *ItemUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpsertBulk) Ignore ¶
func (u *ItemUpsertBulk) Ignore() *ItemUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Item.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ItemUpsertBulk) SetDeletedAt ¶
func (u *ItemUpsertBulk) SetDeletedAt(v time.Time) *ItemUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*ItemUpsertBulk) SetDescription ¶
func (u *ItemUpsertBulk) SetDescription(v string) *ItemUpsertBulk
SetDescription sets the "description" field.
func (*ItemUpsertBulk) SetName ¶
func (u *ItemUpsertBulk) SetName(v string) *ItemUpsertBulk
SetName sets the "name" field.
func (*ItemUpsertBulk) SetTopicName ¶
func (u *ItemUpsertBulk) SetTopicName(v string) *ItemUpsertBulk
SetTopicName sets the "topic_name" field.
func (*ItemUpsertBulk) SetUpdatedAt ¶
func (u *ItemUpsertBulk) SetUpdatedAt(v time.Time) *ItemUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ItemUpsertBulk) Update ¶
func (u *ItemUpsertBulk) Update(set func(*ItemUpsert)) *ItemUpsertBulk
Update allows overriding fields `UPDATE` values. See the ItemCreateBulk.OnConflict documentation for more info.
func (*ItemUpsertBulk) UpdateDeletedAt ¶
func (u *ItemUpsertBulk) UpdateDeletedAt() *ItemUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ItemUpsertBulk) UpdateDescription ¶
func (u *ItemUpsertBulk) UpdateDescription() *ItemUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ItemUpsertBulk) UpdateName ¶
func (u *ItemUpsertBulk) UpdateName() *ItemUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*ItemUpsertBulk) UpdateNewValues ¶
func (u *ItemUpsertBulk) UpdateNewValues() *ItemUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Item.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(item.FieldID)
}),
).
Exec(ctx)
func (*ItemUpsertBulk) UpdateTopicName ¶
func (u *ItemUpsertBulk) UpdateTopicName() *ItemUpsertBulk
UpdateTopicName sets the "topic_name" field to the value that was provided on create.
func (*ItemUpsertBulk) UpdateUpdatedAt ¶
func (u *ItemUpsertBulk) UpdateUpdatedAt() *ItemUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ItemUpsertOne ¶
type ItemUpsertOne struct {
// contains filtered or unexported fields
}
ItemUpsertOne is the builder for "upsert"-ing
one Item node.
func (*ItemUpsertOne) ClearDeletedAt ¶
func (u *ItemUpsertOne) ClearDeletedAt() *ItemUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ItemUpsertOne) ClearTopicName ¶
func (u *ItemUpsertOne) ClearTopicName() *ItemUpsertOne
ClearTopicName clears the value of the "topic_name" field.
func (*ItemUpsertOne) DoNothing ¶
func (u *ItemUpsertOne) DoNothing() *ItemUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ItemUpsertOne) Exec ¶
func (u *ItemUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ItemUpsertOne) ExecX ¶
func (u *ItemUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ItemUpsertOne) ID ¶
func (u *ItemUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ItemUpsertOne) IDX ¶
func (u *ItemUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*ItemUpsertOne) Ignore ¶
func (u *ItemUpsertOne) Ignore() *ItemUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Item.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ItemUpsertOne) SetDeletedAt ¶
func (u *ItemUpsertOne) SetDeletedAt(v time.Time) *ItemUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*ItemUpsertOne) SetDescription ¶
func (u *ItemUpsertOne) SetDescription(v string) *ItemUpsertOne
SetDescription sets the "description" field.
func (*ItemUpsertOne) SetName ¶
func (u *ItemUpsertOne) SetName(v string) *ItemUpsertOne
SetName sets the "name" field.
func (*ItemUpsertOne) SetTopicName ¶
func (u *ItemUpsertOne) SetTopicName(v string) *ItemUpsertOne
SetTopicName sets the "topic_name" field.
func (*ItemUpsertOne) SetUpdatedAt ¶
func (u *ItemUpsertOne) SetUpdatedAt(v time.Time) *ItemUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ItemUpsertOne) Update ¶
func (u *ItemUpsertOne) Update(set func(*ItemUpsert)) *ItemUpsertOne
Update allows overriding fields `UPDATE` values. See the ItemCreate.OnConflict documentation for more info.
func (*ItemUpsertOne) UpdateDeletedAt ¶
func (u *ItemUpsertOne) UpdateDeletedAt() *ItemUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ItemUpsertOne) UpdateDescription ¶
func (u *ItemUpsertOne) UpdateDescription() *ItemUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ItemUpsertOne) UpdateName ¶
func (u *ItemUpsertOne) UpdateName() *ItemUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*ItemUpsertOne) UpdateNewValues ¶
func (u *ItemUpsertOne) UpdateNewValues() *ItemUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Item.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(item.FieldID)
}),
).
Exec(ctx)
func (*ItemUpsertOne) UpdateTopicName ¶
func (u *ItemUpsertOne) UpdateTopicName() *ItemUpsertOne
UpdateTopicName sets the "topic_name" field to the value that was provided on create.
func (*ItemUpsertOne) UpdateUpdatedAt ¶
func (u *ItemUpsertOne) UpdateUpdatedAt() *ItemUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PaymentProfile ¶
type PaymentProfile struct {
// ID of the ent.
ID int64 `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"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// UserID holds the value of the "user_id" field.
UserID int64 `json:"user_id,omitempty"`
// PanMasked holds the value of the "pan_masked" field.
PanMasked string `json:"pan_masked,omitempty"`
// Holder holds the value of the "holder" field.
Holder string `json:"holder,omitempty"`
// Email holds the value of the "email" field.
Email string `json:"email,omitempty"`
// Phone holds the value of the "phone" field.
Phone string `json:"phone,omitempty"`
// UserToken holds the value of the "user_token" field.
UserToken string `json:"user_token,omitempty"`
// RecurrentToken holds the value of the "recurrent_token" field.
RecurrentToken *string `json:"recurrent_token,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the PaymentProfileQuery when eager-loading is set.
Edges PaymentProfileEdges `json:"edges"`
// contains filtered or unexported fields
}
PaymentProfile is the model entity for the PaymentProfile schema.
func (*PaymentProfile) QueryInvoices ¶
func (pp *PaymentProfile) QueryInvoices() *InvoiceQuery
QueryInvoices queries the "invoices" edge of the PaymentProfile entity.
func (*PaymentProfile) String ¶
func (pp *PaymentProfile) String() string
String implements the fmt.Stringer.
func (*PaymentProfile) Unwrap ¶
func (pp *PaymentProfile) Unwrap() *PaymentProfile
Unwrap unwraps the PaymentProfile 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 (*PaymentProfile) Update ¶
func (pp *PaymentProfile) Update() *PaymentProfileUpdateOne
Update returns a builder for updating this PaymentProfile. Note that you need to call PaymentProfile.Unwrap() before calling this method if this PaymentProfile was returned from a transaction, and the transaction was committed or rolled back.
type PaymentProfileClient ¶
type PaymentProfileClient struct {
// contains filtered or unexported fields
}
PaymentProfileClient is a client for the PaymentProfile schema.
func NewPaymentProfileClient ¶
func NewPaymentProfileClient(c config) *PaymentProfileClient
NewPaymentProfileClient returns a client for the PaymentProfile from the given config.
func (*PaymentProfileClient) Create ¶
func (c *PaymentProfileClient) Create() *PaymentProfileCreate
Create returns a builder for creating a PaymentProfile entity.
func (*PaymentProfileClient) CreateBulk ¶
func (c *PaymentProfileClient) CreateBulk(builders ...*PaymentProfileCreate) *PaymentProfileCreateBulk
CreateBulk returns a builder for creating a bulk of PaymentProfile entities.
func (*PaymentProfileClient) Delete ¶
func (c *PaymentProfileClient) Delete() *PaymentProfileDelete
Delete returns a delete builder for PaymentProfile.
func (*PaymentProfileClient) DeleteOne ¶
func (c *PaymentProfileClient) DeleteOne(pp *PaymentProfile) *PaymentProfileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PaymentProfileClient) DeleteOneID ¶
func (c *PaymentProfileClient) DeleteOneID(id int64) *PaymentProfileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PaymentProfileClient) Get ¶
func (c *PaymentProfileClient) Get(ctx context.Context, id int64) (*PaymentProfile, error)
Get returns a PaymentProfile entity by its id.
func (*PaymentProfileClient) GetX ¶
func (c *PaymentProfileClient) GetX(ctx context.Context, id int64) *PaymentProfile
GetX is like Get, but panics if an error occurs.
func (*PaymentProfileClient) Hooks ¶
func (c *PaymentProfileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PaymentProfileClient) Intercept ¶
func (c *PaymentProfileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `paymentprofile.Intercept(f(g(h())))`.
func (*PaymentProfileClient) Interceptors ¶
func (c *PaymentProfileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PaymentProfileClient) MapCreateBulk ¶
func (c *PaymentProfileClient) MapCreateBulk(slice any, setFunc func(*PaymentProfileCreate, int)) *PaymentProfileCreateBulk
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 (*PaymentProfileClient) Query ¶
func (c *PaymentProfileClient) Query() *PaymentProfileQuery
Query returns a query builder for PaymentProfile.
func (*PaymentProfileClient) QueryInvoices ¶
func (c *PaymentProfileClient) QueryInvoices(pp *PaymentProfile) *InvoiceQuery
QueryInvoices queries the invoices edge of a PaymentProfile.
func (*PaymentProfileClient) Update ¶
func (c *PaymentProfileClient) Update() *PaymentProfileUpdate
Update returns an update builder for PaymentProfile.
func (*PaymentProfileClient) UpdateOne ¶
func (c *PaymentProfileClient) UpdateOne(pp *PaymentProfile) *PaymentProfileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PaymentProfileClient) UpdateOneID ¶
func (c *PaymentProfileClient) UpdateOneID(id int64) *PaymentProfileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PaymentProfileClient) Use ¶
func (c *PaymentProfileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `paymentprofile.Hooks(f(g(h())))`.
type PaymentProfileCreate ¶
type PaymentProfileCreate struct {
// contains filtered or unexported fields
}
PaymentProfileCreate is the builder for creating a PaymentProfile entity.
func (*PaymentProfileCreate) AddInvoiceIDs ¶
func (ppc *PaymentProfileCreate) AddInvoiceIDs(ids ...int64) *PaymentProfileCreate
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*PaymentProfileCreate) AddInvoices ¶
func (ppc *PaymentProfileCreate) AddInvoices(i ...*Invoice) *PaymentProfileCreate
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*PaymentProfileCreate) Exec ¶
func (ppc *PaymentProfileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentProfileCreate) ExecX ¶
func (ppc *PaymentProfileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileCreate) Mutation ¶
func (ppc *PaymentProfileCreate) Mutation() *PaymentProfileMutation
Mutation returns the PaymentProfileMutation object of the builder.
func (*PaymentProfileCreate) OnConflict ¶
func (ppc *PaymentProfileCreate) OnConflict(opts ...sql.ConflictOption) *PaymentProfileUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.PaymentProfile.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.PaymentProfileUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*PaymentProfileCreate) OnConflictColumns ¶
func (ppc *PaymentProfileCreate) OnConflictColumns(columns ...string) *PaymentProfileUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.PaymentProfile.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PaymentProfileCreate) Save ¶
func (ppc *PaymentProfileCreate) Save(ctx context.Context) (*PaymentProfile, error)
Save creates the PaymentProfile in the database.
func (*PaymentProfileCreate) SaveX ¶
func (ppc *PaymentProfileCreate) SaveX(ctx context.Context) *PaymentProfile
SaveX calls Save and panics if Save returns an error.
func (*PaymentProfileCreate) SetCreatedAt ¶
func (ppc *PaymentProfileCreate) SetCreatedAt(t time.Time) *PaymentProfileCreate
SetCreatedAt sets the "created_at" field.
func (*PaymentProfileCreate) SetDeletedAt ¶
func (ppc *PaymentProfileCreate) SetDeletedAt(t time.Time) *PaymentProfileCreate
SetDeletedAt sets the "deleted_at" field.
func (*PaymentProfileCreate) SetEmail ¶
func (ppc *PaymentProfileCreate) SetEmail(s string) *PaymentProfileCreate
SetEmail sets the "email" field.
func (*PaymentProfileCreate) SetHolder ¶
func (ppc *PaymentProfileCreate) SetHolder(s string) *PaymentProfileCreate
SetHolder sets the "holder" field.
func (*PaymentProfileCreate) SetID ¶
func (ppc *PaymentProfileCreate) SetID(i int64) *PaymentProfileCreate
SetID sets the "id" field.
func (*PaymentProfileCreate) SetNillableCreatedAt ¶
func (ppc *PaymentProfileCreate) SetNillableCreatedAt(t *time.Time) *PaymentProfileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PaymentProfileCreate) SetNillableDeletedAt ¶
func (ppc *PaymentProfileCreate) SetNillableDeletedAt(t *time.Time) *PaymentProfileCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PaymentProfileCreate) SetNillableEmail ¶
func (ppc *PaymentProfileCreate) SetNillableEmail(s *string) *PaymentProfileCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PaymentProfileCreate) SetNillablePhone ¶
func (ppc *PaymentProfileCreate) SetNillablePhone(s *string) *PaymentProfileCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PaymentProfileCreate) SetNillableRecurrentToken ¶
func (ppc *PaymentProfileCreate) SetNillableRecurrentToken(s *string) *PaymentProfileCreate
SetNillableRecurrentToken sets the "recurrent_token" field if the given value is not nil.
func (*PaymentProfileCreate) SetNillableUpdatedAt ¶
func (ppc *PaymentProfileCreate) SetNillableUpdatedAt(t *time.Time) *PaymentProfileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PaymentProfileCreate) SetNillableUserToken ¶
func (ppc *PaymentProfileCreate) SetNillableUserToken(s *string) *PaymentProfileCreate
SetNillableUserToken sets the "user_token" field if the given value is not nil.
func (*PaymentProfileCreate) SetPanMasked ¶
func (ppc *PaymentProfileCreate) SetPanMasked(s string) *PaymentProfileCreate
SetPanMasked sets the "pan_masked" field.
func (*PaymentProfileCreate) SetPhone ¶
func (ppc *PaymentProfileCreate) SetPhone(s string) *PaymentProfileCreate
SetPhone sets the "phone" field.
func (*PaymentProfileCreate) SetRecurrentToken ¶
func (ppc *PaymentProfileCreate) SetRecurrentToken(s string) *PaymentProfileCreate
SetRecurrentToken sets the "recurrent_token" field.
func (*PaymentProfileCreate) SetUpdatedAt ¶
func (ppc *PaymentProfileCreate) SetUpdatedAt(t time.Time) *PaymentProfileCreate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentProfileCreate) SetUserID ¶
func (ppc *PaymentProfileCreate) SetUserID(i int64) *PaymentProfileCreate
SetUserID sets the "user_id" field.
func (*PaymentProfileCreate) SetUserToken ¶
func (ppc *PaymentProfileCreate) SetUserToken(s string) *PaymentProfileCreate
SetUserToken sets the "user_token" field.
type PaymentProfileCreateBulk ¶
type PaymentProfileCreateBulk struct {
// contains filtered or unexported fields
}
PaymentProfileCreateBulk is the builder for creating many PaymentProfile entities in bulk.
func (*PaymentProfileCreateBulk) Exec ¶
func (ppcb *PaymentProfileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentProfileCreateBulk) ExecX ¶
func (ppcb *PaymentProfileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileCreateBulk) OnConflict ¶
func (ppcb *PaymentProfileCreateBulk) OnConflict(opts ...sql.ConflictOption) *PaymentProfileUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.PaymentProfile.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.PaymentProfileUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*PaymentProfileCreateBulk) OnConflictColumns ¶
func (ppcb *PaymentProfileCreateBulk) OnConflictColumns(columns ...string) *PaymentProfileUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.PaymentProfile.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PaymentProfileCreateBulk) Save ¶
func (ppcb *PaymentProfileCreateBulk) Save(ctx context.Context) ([]*PaymentProfile, error)
Save creates the PaymentProfile entities in the database.
func (*PaymentProfileCreateBulk) SaveX ¶
func (ppcb *PaymentProfileCreateBulk) SaveX(ctx context.Context) []*PaymentProfile
SaveX is like Save, but panics if an error occurs.
type PaymentProfileDelete ¶
type PaymentProfileDelete struct {
// contains filtered or unexported fields
}
PaymentProfileDelete is the builder for deleting a PaymentProfile entity.
func (*PaymentProfileDelete) Exec ¶
func (ppd *PaymentProfileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PaymentProfileDelete) ExecX ¶
func (ppd *PaymentProfileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileDelete) Where ¶
func (ppd *PaymentProfileDelete) Where(ps ...predicate.PaymentProfile) *PaymentProfileDelete
Where appends a list predicates to the PaymentProfileDelete builder.
type PaymentProfileDeleteOne ¶
type PaymentProfileDeleteOne struct {
// contains filtered or unexported fields
}
PaymentProfileDeleteOne is the builder for deleting a single PaymentProfile entity.
func (*PaymentProfileDeleteOne) Exec ¶
func (ppdo *PaymentProfileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PaymentProfileDeleteOne) ExecX ¶
func (ppdo *PaymentProfileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileDeleteOne) Where ¶
func (ppdo *PaymentProfileDeleteOne) Where(ps ...predicate.PaymentProfile) *PaymentProfileDeleteOne
Where appends a list predicates to the PaymentProfileDelete builder.
type PaymentProfileEdges ¶
type PaymentProfileEdges struct {
// Invoices holds the value of the invoices edge.
Invoices []*Invoice `json:"invoices,omitempty"`
// contains filtered or unexported fields
}
PaymentProfileEdges holds the relations/edges for other nodes in the graph.
func (PaymentProfileEdges) InvoicesOrErr ¶
func (e PaymentProfileEdges) InvoicesOrErr() ([]*Invoice, error)
InvoicesOrErr returns the Invoices value or an error if the edge was not loaded in eager-loading.
type PaymentProfileFilter ¶
type PaymentProfileFilter struct {
// contains filtered or unexported fields
}
PaymentProfileFilter provides a generic filtering capability at runtime for PaymentProfileQuery.
func (*PaymentProfileFilter) Where ¶
func (f *PaymentProfileFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*PaymentProfileFilter) WhereCreatedAt ¶
func (f *PaymentProfileFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*PaymentProfileFilter) WhereDeletedAt ¶
func (f *PaymentProfileFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*PaymentProfileFilter) WhereEmail ¶
func (f *PaymentProfileFilter) WhereEmail(p entql.StringP)
WhereEmail applies the entql string predicate on the email field.
func (*PaymentProfileFilter) WhereHasInvoices ¶
func (f *PaymentProfileFilter) WhereHasInvoices()
WhereHasInvoices applies a predicate to check if query has an edge invoices.
func (*PaymentProfileFilter) WhereHasInvoicesWith ¶
func (f *PaymentProfileFilter) WhereHasInvoicesWith(preds ...predicate.Invoice)
WhereHasInvoicesWith applies a predicate to check if query has an edge invoices with a given conditions (other predicates).
func (*PaymentProfileFilter) WhereHolder ¶
func (f *PaymentProfileFilter) WhereHolder(p entql.StringP)
WhereHolder applies the entql string predicate on the holder field.
func (*PaymentProfileFilter) WhereID ¶
func (f *PaymentProfileFilter) WhereID(p entql.Int64P)
WhereID applies the entql int64 predicate on the id field.
func (*PaymentProfileFilter) WherePanMasked ¶
func (f *PaymentProfileFilter) WherePanMasked(p entql.StringP)
WherePanMasked applies the entql string predicate on the pan_masked field.
func (*PaymentProfileFilter) WherePhone ¶
func (f *PaymentProfileFilter) WherePhone(p entql.StringP)
WherePhone applies the entql string predicate on the phone field.
func (*PaymentProfileFilter) WhereRecurrentToken ¶
func (f *PaymentProfileFilter) WhereRecurrentToken(p entql.StringP)
WhereRecurrentToken applies the entql string predicate on the recurrent_token field.
func (*PaymentProfileFilter) WhereUpdatedAt ¶
func (f *PaymentProfileFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (*PaymentProfileFilter) WhereUserID ¶
func (f *PaymentProfileFilter) WhereUserID(p entql.Int64P)
WhereUserID applies the entql int64 predicate on the user_id field.
func (*PaymentProfileFilter) WhereUserToken ¶
func (f *PaymentProfileFilter) WhereUserToken(p entql.StringP)
WhereUserToken applies the entql string predicate on the user_token field.
type PaymentProfileGroupBy ¶
type PaymentProfileGroupBy struct {
// contains filtered or unexported fields
}
PaymentProfileGroupBy is the group-by builder for PaymentProfile entities.
func (*PaymentProfileGroupBy) Aggregate ¶
func (ppgb *PaymentProfileGroupBy) Aggregate(fns ...AggregateFunc) *PaymentProfileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PaymentProfileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentProfileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentProfileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentProfileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentProfileGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PaymentProfileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentProfileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentProfileGroupBy) Scan ¶
func (ppgb *PaymentProfileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentProfileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentProfileMutation ¶
type PaymentProfileMutation struct {
// contains filtered or unexported fields
}
PaymentProfileMutation represents an operation that mutates the PaymentProfile nodes in the graph.
func (*PaymentProfileMutation) AddField ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) AddInvoiceIDs ¶
func (m *PaymentProfileMutation) AddInvoiceIDs(ids ...int64)
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by ids.
func (*PaymentProfileMutation) AddUserID ¶
func (m *PaymentProfileMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*PaymentProfileMutation) AddedEdges ¶
func (m *PaymentProfileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PaymentProfileMutation) AddedField ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) AddedFields ¶
func (m *PaymentProfileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PaymentProfileMutation) AddedIDs ¶
func (m *PaymentProfileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PaymentProfileMutation) AddedUserID ¶
func (m *PaymentProfileMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*PaymentProfileMutation) ClearDeletedAt ¶
func (m *PaymentProfileMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PaymentProfileMutation) ClearEdge ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) ClearEmail ¶
func (m *PaymentProfileMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*PaymentProfileMutation) ClearField ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) ClearInvoices ¶
func (m *PaymentProfileMutation) ClearInvoices()
ClearInvoices clears the "invoices" edge to the Invoice entity.
func (*PaymentProfileMutation) ClearPhone ¶
func (m *PaymentProfileMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*PaymentProfileMutation) ClearRecurrentToken ¶
func (m *PaymentProfileMutation) ClearRecurrentToken()
ClearRecurrentToken clears the value of the "recurrent_token" field.
func (*PaymentProfileMutation) ClearUserToken ¶
func (m *PaymentProfileMutation) ClearUserToken()
ClearUserToken clears the value of the "user_token" field.
func (*PaymentProfileMutation) ClearedEdges ¶
func (m *PaymentProfileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PaymentProfileMutation) ClearedFields ¶
func (m *PaymentProfileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PaymentProfileMutation) Client ¶
func (m PaymentProfileMutation) 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 (*PaymentProfileMutation) CreatedAt ¶
func (m *PaymentProfileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PaymentProfileMutation) DeletedAt ¶
func (m *PaymentProfileMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*PaymentProfileMutation) DeletedAtCleared ¶
func (m *PaymentProfileMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*PaymentProfileMutation) EdgeCleared ¶
func (m *PaymentProfileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PaymentProfileMutation) Email ¶
func (m *PaymentProfileMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*PaymentProfileMutation) EmailCleared ¶
func (m *PaymentProfileMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*PaymentProfileMutation) Field ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) FieldCleared ¶
func (m *PaymentProfileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PaymentProfileMutation) Fields ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) Filter ¶
func (m *PaymentProfileMutation) Filter() *PaymentProfileFilter
Filter returns an entql.Where implementation to apply filters on the PaymentProfileMutation builder.
func (*PaymentProfileMutation) Holder ¶
func (m *PaymentProfileMutation) Holder() (r string, exists bool)
Holder returns the value of the "holder" field in the mutation.
func (*PaymentProfileMutation) ID ¶
func (m *PaymentProfileMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PaymentProfileMutation) IDs ¶
func (m *PaymentProfileMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PaymentProfileMutation) InvoicesCleared ¶
func (m *PaymentProfileMutation) InvoicesCleared() bool
InvoicesCleared reports if the "invoices" edge to the Invoice entity was cleared.
func (*PaymentProfileMutation) InvoicesIDs ¶
func (m *PaymentProfileMutation) InvoicesIDs() (ids []int64)
InvoicesIDs returns the "invoices" edge IDs in the mutation.
func (*PaymentProfileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldEmail ¶
func (m *PaymentProfileMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) 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 (*PaymentProfileMutation) OldHolder ¶
func (m *PaymentProfileMutation) OldHolder(ctx context.Context) (v string, err error)
OldHolder returns the old "holder" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldPanMasked ¶
func (m *PaymentProfileMutation) OldPanMasked(ctx context.Context) (v string, err error)
OldPanMasked returns the old "pan_masked" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldPhone ¶
func (m *PaymentProfileMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldRecurrentToken ¶
func (m *PaymentProfileMutation) OldRecurrentToken(ctx context.Context) (v *string, err error)
OldRecurrentToken returns the old "recurrent_token" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldUserID ¶
func (m *PaymentProfileMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) OldUserToken ¶
func (m *PaymentProfileMutation) OldUserToken(ctx context.Context) (v string, err error)
OldUserToken returns the old "user_token" field's value of the PaymentProfile entity. If the PaymentProfile 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 (*PaymentProfileMutation) Op ¶
func (m *PaymentProfileMutation) Op() Op
Op returns the operation name.
func (*PaymentProfileMutation) PanMasked ¶
func (m *PaymentProfileMutation) PanMasked() (r string, exists bool)
PanMasked returns the value of the "pan_masked" field in the mutation.
func (*PaymentProfileMutation) Phone ¶
func (m *PaymentProfileMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*PaymentProfileMutation) PhoneCleared ¶
func (m *PaymentProfileMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*PaymentProfileMutation) RecurrentToken ¶
func (m *PaymentProfileMutation) RecurrentToken() (r string, exists bool)
RecurrentToken returns the value of the "recurrent_token" field in the mutation.
func (*PaymentProfileMutation) RecurrentTokenCleared ¶
func (m *PaymentProfileMutation) RecurrentTokenCleared() bool
RecurrentTokenCleared returns if the "recurrent_token" field was cleared in this mutation.
func (*PaymentProfileMutation) RemoveInvoiceIDs ¶
func (m *PaymentProfileMutation) RemoveInvoiceIDs(ids ...int64)
RemoveInvoiceIDs removes the "invoices" edge to the Invoice entity by IDs.
func (*PaymentProfileMutation) RemovedEdges ¶
func (m *PaymentProfileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PaymentProfileMutation) RemovedIDs ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) RemovedInvoicesIDs ¶
func (m *PaymentProfileMutation) RemovedInvoicesIDs() (ids []int64)
RemovedInvoices returns the removed IDs of the "invoices" edge to the Invoice entity.
func (*PaymentProfileMutation) ResetCreatedAt ¶
func (m *PaymentProfileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PaymentProfileMutation) ResetDeletedAt ¶
func (m *PaymentProfileMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*PaymentProfileMutation) ResetEdge ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) ResetEmail ¶
func (m *PaymentProfileMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*PaymentProfileMutation) ResetField ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) ResetHolder ¶
func (m *PaymentProfileMutation) ResetHolder()
ResetHolder resets all changes to the "holder" field.
func (*PaymentProfileMutation) ResetInvoices ¶
func (m *PaymentProfileMutation) ResetInvoices()
ResetInvoices resets all changes to the "invoices" edge.
func (*PaymentProfileMutation) ResetPanMasked ¶
func (m *PaymentProfileMutation) ResetPanMasked()
ResetPanMasked resets all changes to the "pan_masked" field.
func (*PaymentProfileMutation) ResetPhone ¶
func (m *PaymentProfileMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*PaymentProfileMutation) ResetRecurrentToken ¶
func (m *PaymentProfileMutation) ResetRecurrentToken()
ResetRecurrentToken resets all changes to the "recurrent_token" field.
func (*PaymentProfileMutation) ResetUpdatedAt ¶
func (m *PaymentProfileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PaymentProfileMutation) ResetUserID ¶
func (m *PaymentProfileMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*PaymentProfileMutation) ResetUserToken ¶
func (m *PaymentProfileMutation) ResetUserToken()
ResetUserToken resets all changes to the "user_token" field.
func (*PaymentProfileMutation) SetCreatedAt ¶
func (m *PaymentProfileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PaymentProfileMutation) SetDeletedAt ¶
func (m *PaymentProfileMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*PaymentProfileMutation) SetEmail ¶
func (m *PaymentProfileMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*PaymentProfileMutation) SetField ¶
func (m *PaymentProfileMutation) 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 (*PaymentProfileMutation) SetHolder ¶
func (m *PaymentProfileMutation) SetHolder(s string)
SetHolder sets the "holder" field.
func (*PaymentProfileMutation) SetID ¶
func (m *PaymentProfileMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of PaymentProfile entities.
func (*PaymentProfileMutation) SetOp ¶
func (m *PaymentProfileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PaymentProfileMutation) SetPanMasked ¶
func (m *PaymentProfileMutation) SetPanMasked(s string)
SetPanMasked sets the "pan_masked" field.
func (*PaymentProfileMutation) SetPhone ¶
func (m *PaymentProfileMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*PaymentProfileMutation) SetRecurrentToken ¶
func (m *PaymentProfileMutation) SetRecurrentToken(s string)
SetRecurrentToken sets the "recurrent_token" field.
func (*PaymentProfileMutation) SetUpdatedAt ¶
func (m *PaymentProfileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PaymentProfileMutation) SetUserID ¶
func (m *PaymentProfileMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*PaymentProfileMutation) SetUserToken ¶
func (m *PaymentProfileMutation) SetUserToken(s string)
SetUserToken sets the "user_token" field.
func (PaymentProfileMutation) Tx ¶
func (m PaymentProfileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PaymentProfileMutation) Type ¶
func (m *PaymentProfileMutation) Type() string
Type returns the node type of this mutation (PaymentProfile).
func (*PaymentProfileMutation) UpdatedAt ¶
func (m *PaymentProfileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PaymentProfileMutation) UserID ¶
func (m *PaymentProfileMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*PaymentProfileMutation) UserToken ¶
func (m *PaymentProfileMutation) UserToken() (r string, exists bool)
UserToken returns the value of the "user_token" field in the mutation.
func (*PaymentProfileMutation) UserTokenCleared ¶
func (m *PaymentProfileMutation) UserTokenCleared() bool
UserTokenCleared returns if the "user_token" field was cleared in this mutation.
func (*PaymentProfileMutation) Where ¶
func (m *PaymentProfileMutation) Where(ps ...predicate.PaymentProfile)
Where appends a list predicates to the PaymentProfileMutation builder.
func (*PaymentProfileMutation) WhereP ¶
func (m *PaymentProfileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PaymentProfileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PaymentProfileQuery ¶
type PaymentProfileQuery struct {
// contains filtered or unexported fields
}
PaymentProfileQuery is the builder for querying PaymentProfile entities.
func (*PaymentProfileQuery) Aggregate ¶
func (ppq *PaymentProfileQuery) Aggregate(fns ...AggregateFunc) *PaymentProfileSelect
Aggregate returns a PaymentProfileSelect configured with the given aggregations.
func (*PaymentProfileQuery) All ¶
func (ppq *PaymentProfileQuery) All(ctx context.Context) ([]*PaymentProfile, error)
All executes the query and returns a list of PaymentProfiles.
func (*PaymentProfileQuery) AllX ¶
func (ppq *PaymentProfileQuery) AllX(ctx context.Context) []*PaymentProfile
AllX is like All, but panics if an error occurs.
func (*PaymentProfileQuery) Clone ¶
func (ppq *PaymentProfileQuery) Clone() *PaymentProfileQuery
Clone returns a duplicate of the PaymentProfileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PaymentProfileQuery) Count ¶
func (ppq *PaymentProfileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PaymentProfileQuery) CountX ¶
func (ppq *PaymentProfileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PaymentProfileQuery) Exist ¶
func (ppq *PaymentProfileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PaymentProfileQuery) ExistX ¶
func (ppq *PaymentProfileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PaymentProfileQuery) Filter ¶
func (ppq *PaymentProfileQuery) Filter() *PaymentProfileFilter
Filter returns a Filter implementation to apply filters on the PaymentProfileQuery builder.
func (*PaymentProfileQuery) First ¶
func (ppq *PaymentProfileQuery) First(ctx context.Context) (*PaymentProfile, error)
First returns the first PaymentProfile entity from the query. Returns a *NotFoundError when no PaymentProfile was found.
func (*PaymentProfileQuery) FirstID ¶
func (ppq *PaymentProfileQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first PaymentProfile ID from the query. Returns a *NotFoundError when no PaymentProfile ID was found.
func (*PaymentProfileQuery) FirstIDX ¶
func (ppq *PaymentProfileQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*PaymentProfileQuery) FirstX ¶
func (ppq *PaymentProfileQuery) FirstX(ctx context.Context) *PaymentProfile
FirstX is like First, but panics if an error occurs.
func (*PaymentProfileQuery) GroupBy ¶
func (ppq *PaymentProfileQuery) GroupBy(field string, fields ...string) *PaymentProfileGroupBy
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.PaymentProfile.Query().
GroupBy(paymentprofile.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PaymentProfileQuery) IDs ¶
func (ppq *PaymentProfileQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of PaymentProfile IDs.
func (*PaymentProfileQuery) IDsX ¶
func (ppq *PaymentProfileQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*PaymentProfileQuery) Limit ¶
func (ppq *PaymentProfileQuery) Limit(limit int) *PaymentProfileQuery
Limit the number of records to be returned by this query.
func (*PaymentProfileQuery) Modify ¶
func (ppq *PaymentProfileQuery) Modify(modifiers ...func(s *sql.Selector)) *PaymentProfileSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*PaymentProfileQuery) Offset ¶
func (ppq *PaymentProfileQuery) Offset(offset int) *PaymentProfileQuery
Offset to start from.
func (*PaymentProfileQuery) Only ¶
func (ppq *PaymentProfileQuery) Only(ctx context.Context) (*PaymentProfile, error)
Only returns a single PaymentProfile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PaymentProfile entity is found. Returns a *NotFoundError when no PaymentProfile entities are found.
func (*PaymentProfileQuery) OnlyID ¶
func (ppq *PaymentProfileQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only PaymentProfile ID in the query. Returns a *NotSingularError when more than one PaymentProfile ID is found. Returns a *NotFoundError when no entities are found.
func (*PaymentProfileQuery) OnlyIDX ¶
func (ppq *PaymentProfileQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PaymentProfileQuery) OnlyX ¶
func (ppq *PaymentProfileQuery) OnlyX(ctx context.Context) *PaymentProfile
OnlyX is like Only, but panics if an error occurs.
func (*PaymentProfileQuery) Order ¶
func (ppq *PaymentProfileQuery) Order(o ...paymentprofile.OrderOption) *PaymentProfileQuery
Order specifies how the records should be ordered.
func (*PaymentProfileQuery) QueryInvoices ¶
func (ppq *PaymentProfileQuery) QueryInvoices() *InvoiceQuery
QueryInvoices chains the current query on the "invoices" edge.
func (*PaymentProfileQuery) Select ¶
func (ppq *PaymentProfileQuery) Select(fields ...string) *PaymentProfileSelect
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.PaymentProfile.Query().
Select(paymentprofile.FieldCreatedAt).
Scan(ctx, &v)
func (*PaymentProfileQuery) Unique ¶
func (ppq *PaymentProfileQuery) Unique(unique bool) *PaymentProfileQuery
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 (*PaymentProfileQuery) Where ¶
func (ppq *PaymentProfileQuery) Where(ps ...predicate.PaymentProfile) *PaymentProfileQuery
Where adds a new predicate for the PaymentProfileQuery builder.
func (*PaymentProfileQuery) WithInvoices ¶
func (ppq *PaymentProfileQuery) WithInvoices(opts ...func(*InvoiceQuery)) *PaymentProfileQuery
WithInvoices tells the query-builder to eager-load the nodes that are connected to the "invoices" edge. The optional arguments are used to configure the query builder of the edge.
type PaymentProfileSelect ¶
type PaymentProfileSelect struct {
*PaymentProfileQuery
// contains filtered or unexported fields
}
PaymentProfileSelect is the builder for selecting fields of PaymentProfile entities.
func (*PaymentProfileSelect) Aggregate ¶
func (pps *PaymentProfileSelect) Aggregate(fns ...AggregateFunc) *PaymentProfileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PaymentProfileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentProfileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentProfileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentProfileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentProfileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentProfileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentProfileSelect) Modify ¶
func (pps *PaymentProfileSelect) Modify(modifiers ...func(s *sql.Selector)) *PaymentProfileSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*PaymentProfileSelect) Scan ¶
func (pps *PaymentProfileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentProfileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentProfileUpdate ¶
type PaymentProfileUpdate struct {
// contains filtered or unexported fields
}
PaymentProfileUpdate is the builder for updating PaymentProfile entities.
func (*PaymentProfileUpdate) AddInvoiceIDs ¶
func (ppu *PaymentProfileUpdate) AddInvoiceIDs(ids ...int64) *PaymentProfileUpdate
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*PaymentProfileUpdate) AddInvoices ¶
func (ppu *PaymentProfileUpdate) AddInvoices(i ...*Invoice) *PaymentProfileUpdate
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*PaymentProfileUpdate) ClearDeletedAt ¶
func (ppu *PaymentProfileUpdate) ClearDeletedAt() *PaymentProfileUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PaymentProfileUpdate) ClearEmail ¶
func (ppu *PaymentProfileUpdate) ClearEmail() *PaymentProfileUpdate
ClearEmail clears the value of the "email" field.
func (*PaymentProfileUpdate) ClearInvoices ¶
func (ppu *PaymentProfileUpdate) ClearInvoices() *PaymentProfileUpdate
ClearInvoices clears all "invoices" edges to the Invoice entity.
func (*PaymentProfileUpdate) ClearPhone ¶
func (ppu *PaymentProfileUpdate) ClearPhone() *PaymentProfileUpdate
ClearPhone clears the value of the "phone" field.
func (*PaymentProfileUpdate) ClearRecurrentToken ¶
func (ppu *PaymentProfileUpdate) ClearRecurrentToken() *PaymentProfileUpdate
ClearRecurrentToken clears the value of the "recurrent_token" field.
func (*PaymentProfileUpdate) ClearUserToken ¶
func (ppu *PaymentProfileUpdate) ClearUserToken() *PaymentProfileUpdate
ClearUserToken clears the value of the "user_token" field.
func (*PaymentProfileUpdate) Exec ¶
func (ppu *PaymentProfileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentProfileUpdate) ExecX ¶
func (ppu *PaymentProfileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileUpdate) Modify ¶
func (ppu *PaymentProfileUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PaymentProfileUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PaymentProfileUpdate) Mutation ¶
func (ppu *PaymentProfileUpdate) Mutation() *PaymentProfileMutation
Mutation returns the PaymentProfileMutation object of the builder.
func (*PaymentProfileUpdate) RemoveInvoiceIDs ¶
func (ppu *PaymentProfileUpdate) RemoveInvoiceIDs(ids ...int64) *PaymentProfileUpdate
RemoveInvoiceIDs removes the "invoices" edge to Invoice entities by IDs.
func (*PaymentProfileUpdate) RemoveInvoices ¶
func (ppu *PaymentProfileUpdate) RemoveInvoices(i ...*Invoice) *PaymentProfileUpdate
RemoveInvoices removes "invoices" edges to Invoice entities.
func (*PaymentProfileUpdate) Save ¶
func (ppu *PaymentProfileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PaymentProfileUpdate) SaveX ¶
func (ppu *PaymentProfileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PaymentProfileUpdate) SetDeletedAt ¶
func (ppu *PaymentProfileUpdate) SetDeletedAt(t time.Time) *PaymentProfileUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PaymentProfileUpdate) SetEmail ¶
func (ppu *PaymentProfileUpdate) SetEmail(s string) *PaymentProfileUpdate
SetEmail sets the "email" field.
func (*PaymentProfileUpdate) SetNillableDeletedAt ¶
func (ppu *PaymentProfileUpdate) SetNillableDeletedAt(t *time.Time) *PaymentProfileUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PaymentProfileUpdate) SetNillableEmail ¶
func (ppu *PaymentProfileUpdate) SetNillableEmail(s *string) *PaymentProfileUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PaymentProfileUpdate) SetNillablePhone ¶
func (ppu *PaymentProfileUpdate) SetNillablePhone(s *string) *PaymentProfileUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PaymentProfileUpdate) SetNillableRecurrentToken ¶
func (ppu *PaymentProfileUpdate) SetNillableRecurrentToken(s *string) *PaymentProfileUpdate
SetNillableRecurrentToken sets the "recurrent_token" field if the given value is not nil.
func (*PaymentProfileUpdate) SetNillableUserToken ¶
func (ppu *PaymentProfileUpdate) SetNillableUserToken(s *string) *PaymentProfileUpdate
SetNillableUserToken sets the "user_token" field if the given value is not nil.
func (*PaymentProfileUpdate) SetPhone ¶
func (ppu *PaymentProfileUpdate) SetPhone(s string) *PaymentProfileUpdate
SetPhone sets the "phone" field.
func (*PaymentProfileUpdate) SetRecurrentToken ¶
func (ppu *PaymentProfileUpdate) SetRecurrentToken(s string) *PaymentProfileUpdate
SetRecurrentToken sets the "recurrent_token" field.
func (*PaymentProfileUpdate) SetUpdatedAt ¶
func (ppu *PaymentProfileUpdate) SetUpdatedAt(t time.Time) *PaymentProfileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentProfileUpdate) SetUserToken ¶
func (ppu *PaymentProfileUpdate) SetUserToken(s string) *PaymentProfileUpdate
SetUserToken sets the "user_token" field.
func (*PaymentProfileUpdate) Where ¶
func (ppu *PaymentProfileUpdate) Where(ps ...predicate.PaymentProfile) *PaymentProfileUpdate
Where appends a list predicates to the PaymentProfileUpdate builder.
type PaymentProfileUpdateOne ¶
type PaymentProfileUpdateOne struct {
// contains filtered or unexported fields
}
PaymentProfileUpdateOne is the builder for updating a single PaymentProfile entity.
func (*PaymentProfileUpdateOne) AddInvoiceIDs ¶
func (ppuo *PaymentProfileUpdateOne) AddInvoiceIDs(ids ...int64) *PaymentProfileUpdateOne
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*PaymentProfileUpdateOne) AddInvoices ¶
func (ppuo *PaymentProfileUpdateOne) AddInvoices(i ...*Invoice) *PaymentProfileUpdateOne
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*PaymentProfileUpdateOne) ClearDeletedAt ¶
func (ppuo *PaymentProfileUpdateOne) ClearDeletedAt() *PaymentProfileUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PaymentProfileUpdateOne) ClearEmail ¶
func (ppuo *PaymentProfileUpdateOne) ClearEmail() *PaymentProfileUpdateOne
ClearEmail clears the value of the "email" field.
func (*PaymentProfileUpdateOne) ClearInvoices ¶
func (ppuo *PaymentProfileUpdateOne) ClearInvoices() *PaymentProfileUpdateOne
ClearInvoices clears all "invoices" edges to the Invoice entity.
func (*PaymentProfileUpdateOne) ClearPhone ¶
func (ppuo *PaymentProfileUpdateOne) ClearPhone() *PaymentProfileUpdateOne
ClearPhone clears the value of the "phone" field.
func (*PaymentProfileUpdateOne) ClearRecurrentToken ¶
func (ppuo *PaymentProfileUpdateOne) ClearRecurrentToken() *PaymentProfileUpdateOne
ClearRecurrentToken clears the value of the "recurrent_token" field.
func (*PaymentProfileUpdateOne) ClearUserToken ¶
func (ppuo *PaymentProfileUpdateOne) ClearUserToken() *PaymentProfileUpdateOne
ClearUserToken clears the value of the "user_token" field.
func (*PaymentProfileUpdateOne) Exec ¶
func (ppuo *PaymentProfileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PaymentProfileUpdateOne) ExecX ¶
func (ppuo *PaymentProfileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileUpdateOne) Modify ¶
func (ppuo *PaymentProfileUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PaymentProfileUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PaymentProfileUpdateOne) Mutation ¶
func (ppuo *PaymentProfileUpdateOne) Mutation() *PaymentProfileMutation
Mutation returns the PaymentProfileMutation object of the builder.
func (*PaymentProfileUpdateOne) RemoveInvoiceIDs ¶
func (ppuo *PaymentProfileUpdateOne) RemoveInvoiceIDs(ids ...int64) *PaymentProfileUpdateOne
RemoveInvoiceIDs removes the "invoices" edge to Invoice entities by IDs.
func (*PaymentProfileUpdateOne) RemoveInvoices ¶
func (ppuo *PaymentProfileUpdateOne) RemoveInvoices(i ...*Invoice) *PaymentProfileUpdateOne
RemoveInvoices removes "invoices" edges to Invoice entities.
func (*PaymentProfileUpdateOne) Save ¶
func (ppuo *PaymentProfileUpdateOne) Save(ctx context.Context) (*PaymentProfile, error)
Save executes the query and returns the updated PaymentProfile entity.
func (*PaymentProfileUpdateOne) SaveX ¶
func (ppuo *PaymentProfileUpdateOne) SaveX(ctx context.Context) *PaymentProfile
SaveX is like Save, but panics if an error occurs.
func (*PaymentProfileUpdateOne) Select ¶
func (ppuo *PaymentProfileUpdateOne) Select(field string, fields ...string) *PaymentProfileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PaymentProfileUpdateOne) SetDeletedAt ¶
func (ppuo *PaymentProfileUpdateOne) SetDeletedAt(t time.Time) *PaymentProfileUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PaymentProfileUpdateOne) SetEmail ¶
func (ppuo *PaymentProfileUpdateOne) SetEmail(s string) *PaymentProfileUpdateOne
SetEmail sets the "email" field.
func (*PaymentProfileUpdateOne) SetNillableDeletedAt ¶
func (ppuo *PaymentProfileUpdateOne) SetNillableDeletedAt(t *time.Time) *PaymentProfileUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PaymentProfileUpdateOne) SetNillableEmail ¶
func (ppuo *PaymentProfileUpdateOne) SetNillableEmail(s *string) *PaymentProfileUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PaymentProfileUpdateOne) SetNillablePhone ¶
func (ppuo *PaymentProfileUpdateOne) SetNillablePhone(s *string) *PaymentProfileUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PaymentProfileUpdateOne) SetNillableRecurrentToken ¶
func (ppuo *PaymentProfileUpdateOne) SetNillableRecurrentToken(s *string) *PaymentProfileUpdateOne
SetNillableRecurrentToken sets the "recurrent_token" field if the given value is not nil.
func (*PaymentProfileUpdateOne) SetNillableUserToken ¶
func (ppuo *PaymentProfileUpdateOne) SetNillableUserToken(s *string) *PaymentProfileUpdateOne
SetNillableUserToken sets the "user_token" field if the given value is not nil.
func (*PaymentProfileUpdateOne) SetPhone ¶
func (ppuo *PaymentProfileUpdateOne) SetPhone(s string) *PaymentProfileUpdateOne
SetPhone sets the "phone" field.
func (*PaymentProfileUpdateOne) SetRecurrentToken ¶
func (ppuo *PaymentProfileUpdateOne) SetRecurrentToken(s string) *PaymentProfileUpdateOne
SetRecurrentToken sets the "recurrent_token" field.
func (*PaymentProfileUpdateOne) SetUpdatedAt ¶
func (ppuo *PaymentProfileUpdateOne) SetUpdatedAt(t time.Time) *PaymentProfileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PaymentProfileUpdateOne) SetUserToken ¶
func (ppuo *PaymentProfileUpdateOne) SetUserToken(s string) *PaymentProfileUpdateOne
SetUserToken sets the "user_token" field.
func (*PaymentProfileUpdateOne) Where ¶
func (ppuo *PaymentProfileUpdateOne) Where(ps ...predicate.PaymentProfile) *PaymentProfileUpdateOne
Where appends a list predicates to the PaymentProfileUpdate builder.
type PaymentProfileUpsert ¶
PaymentProfileUpsert is the "OnConflict" setter.
func (*PaymentProfileUpsert) ClearDeletedAt ¶
func (u *PaymentProfileUpsert) ClearDeletedAt() *PaymentProfileUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PaymentProfileUpsert) ClearEmail ¶
func (u *PaymentProfileUpsert) ClearEmail() *PaymentProfileUpsert
ClearEmail clears the value of the "email" field.
func (*PaymentProfileUpsert) ClearPhone ¶
func (u *PaymentProfileUpsert) ClearPhone() *PaymentProfileUpsert
ClearPhone clears the value of the "phone" field.
func (*PaymentProfileUpsert) ClearRecurrentToken ¶
func (u *PaymentProfileUpsert) ClearRecurrentToken() *PaymentProfileUpsert
ClearRecurrentToken clears the value of the "recurrent_token" field.
func (*PaymentProfileUpsert) ClearUserToken ¶
func (u *PaymentProfileUpsert) ClearUserToken() *PaymentProfileUpsert
ClearUserToken clears the value of the "user_token" field.
func (*PaymentProfileUpsert) SetDeletedAt ¶
func (u *PaymentProfileUpsert) SetDeletedAt(v time.Time) *PaymentProfileUpsert
SetDeletedAt sets the "deleted_at" field.
func (*PaymentProfileUpsert) SetEmail ¶
func (u *PaymentProfileUpsert) SetEmail(v string) *PaymentProfileUpsert
SetEmail sets the "email" field.
func (*PaymentProfileUpsert) SetPhone ¶
func (u *PaymentProfileUpsert) SetPhone(v string) *PaymentProfileUpsert
SetPhone sets the "phone" field.
func (*PaymentProfileUpsert) SetRecurrentToken ¶
func (u *PaymentProfileUpsert) SetRecurrentToken(v string) *PaymentProfileUpsert
SetRecurrentToken sets the "recurrent_token" field.
func (*PaymentProfileUpsert) SetUpdatedAt ¶
func (u *PaymentProfileUpsert) SetUpdatedAt(v time.Time) *PaymentProfileUpsert
SetUpdatedAt sets the "updated_at" field.
func (*PaymentProfileUpsert) SetUserToken ¶
func (u *PaymentProfileUpsert) SetUserToken(v string) *PaymentProfileUpsert
SetUserToken sets the "user_token" field.
func (*PaymentProfileUpsert) UpdateDeletedAt ¶
func (u *PaymentProfileUpsert) UpdateDeletedAt() *PaymentProfileUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PaymentProfileUpsert) UpdateEmail ¶
func (u *PaymentProfileUpsert) UpdateEmail() *PaymentProfileUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*PaymentProfileUpsert) UpdatePhone ¶
func (u *PaymentProfileUpsert) UpdatePhone() *PaymentProfileUpsert
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*PaymentProfileUpsert) UpdateRecurrentToken ¶
func (u *PaymentProfileUpsert) UpdateRecurrentToken() *PaymentProfileUpsert
UpdateRecurrentToken sets the "recurrent_token" field to the value that was provided on create.
func (*PaymentProfileUpsert) UpdateUpdatedAt ¶
func (u *PaymentProfileUpsert) UpdateUpdatedAt() *PaymentProfileUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PaymentProfileUpsert) UpdateUserToken ¶
func (u *PaymentProfileUpsert) UpdateUserToken() *PaymentProfileUpsert
UpdateUserToken sets the "user_token" field to the value that was provided on create.
type PaymentProfileUpsertBulk ¶
type PaymentProfileUpsertBulk struct {
// contains filtered or unexported fields
}
PaymentProfileUpsertBulk is the builder for "upsert"-ing a bulk of PaymentProfile nodes.
func (*PaymentProfileUpsertBulk) ClearDeletedAt ¶
func (u *PaymentProfileUpsertBulk) ClearDeletedAt() *PaymentProfileUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PaymentProfileUpsertBulk) ClearEmail ¶
func (u *PaymentProfileUpsertBulk) ClearEmail() *PaymentProfileUpsertBulk
ClearEmail clears the value of the "email" field.
func (*PaymentProfileUpsertBulk) ClearPhone ¶
func (u *PaymentProfileUpsertBulk) ClearPhone() *PaymentProfileUpsertBulk
ClearPhone clears the value of the "phone" field.
func (*PaymentProfileUpsertBulk) ClearRecurrentToken ¶
func (u *PaymentProfileUpsertBulk) ClearRecurrentToken() *PaymentProfileUpsertBulk
ClearRecurrentToken clears the value of the "recurrent_token" field.
func (*PaymentProfileUpsertBulk) ClearUserToken ¶
func (u *PaymentProfileUpsertBulk) ClearUserToken() *PaymentProfileUpsertBulk
ClearUserToken clears the value of the "user_token" field.
func (*PaymentProfileUpsertBulk) DoNothing ¶
func (u *PaymentProfileUpsertBulk) DoNothing() *PaymentProfileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PaymentProfileUpsertBulk) Exec ¶
func (u *PaymentProfileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentProfileUpsertBulk) ExecX ¶
func (u *PaymentProfileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileUpsertBulk) Ignore ¶
func (u *PaymentProfileUpsertBulk) Ignore() *PaymentProfileUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.PaymentProfile.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PaymentProfileUpsertBulk) SetDeletedAt ¶
func (u *PaymentProfileUpsertBulk) SetDeletedAt(v time.Time) *PaymentProfileUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*PaymentProfileUpsertBulk) SetEmail ¶
func (u *PaymentProfileUpsertBulk) SetEmail(v string) *PaymentProfileUpsertBulk
SetEmail sets the "email" field.
func (*PaymentProfileUpsertBulk) SetPhone ¶
func (u *PaymentProfileUpsertBulk) SetPhone(v string) *PaymentProfileUpsertBulk
SetPhone sets the "phone" field.
func (*PaymentProfileUpsertBulk) SetRecurrentToken ¶
func (u *PaymentProfileUpsertBulk) SetRecurrentToken(v string) *PaymentProfileUpsertBulk
SetRecurrentToken sets the "recurrent_token" field.
func (*PaymentProfileUpsertBulk) SetUpdatedAt ¶
func (u *PaymentProfileUpsertBulk) SetUpdatedAt(v time.Time) *PaymentProfileUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*PaymentProfileUpsertBulk) SetUserToken ¶
func (u *PaymentProfileUpsertBulk) SetUserToken(v string) *PaymentProfileUpsertBulk
SetUserToken sets the "user_token" field.
func (*PaymentProfileUpsertBulk) Update ¶
func (u *PaymentProfileUpsertBulk) Update(set func(*PaymentProfileUpsert)) *PaymentProfileUpsertBulk
Update allows overriding fields `UPDATE` values. See the PaymentProfileCreateBulk.OnConflict documentation for more info.
func (*PaymentProfileUpsertBulk) UpdateDeletedAt ¶
func (u *PaymentProfileUpsertBulk) UpdateDeletedAt() *PaymentProfileUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PaymentProfileUpsertBulk) UpdateEmail ¶
func (u *PaymentProfileUpsertBulk) UpdateEmail() *PaymentProfileUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*PaymentProfileUpsertBulk) UpdateNewValues ¶
func (u *PaymentProfileUpsertBulk) UpdateNewValues() *PaymentProfileUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.PaymentProfile.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(paymentprofile.FieldID)
}),
).
Exec(ctx)
func (*PaymentProfileUpsertBulk) UpdatePhone ¶
func (u *PaymentProfileUpsertBulk) UpdatePhone() *PaymentProfileUpsertBulk
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*PaymentProfileUpsertBulk) UpdateRecurrentToken ¶
func (u *PaymentProfileUpsertBulk) UpdateRecurrentToken() *PaymentProfileUpsertBulk
UpdateRecurrentToken sets the "recurrent_token" field to the value that was provided on create.
func (*PaymentProfileUpsertBulk) UpdateUpdatedAt ¶
func (u *PaymentProfileUpsertBulk) UpdateUpdatedAt() *PaymentProfileUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PaymentProfileUpsertBulk) UpdateUserToken ¶
func (u *PaymentProfileUpsertBulk) UpdateUserToken() *PaymentProfileUpsertBulk
UpdateUserToken sets the "user_token" field to the value that was provided on create.
type PaymentProfileUpsertOne ¶
type PaymentProfileUpsertOne struct {
// contains filtered or unexported fields
}
PaymentProfileUpsertOne is the builder for "upsert"-ing
one PaymentProfile node.
func (*PaymentProfileUpsertOne) ClearDeletedAt ¶
func (u *PaymentProfileUpsertOne) ClearDeletedAt() *PaymentProfileUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PaymentProfileUpsertOne) ClearEmail ¶
func (u *PaymentProfileUpsertOne) ClearEmail() *PaymentProfileUpsertOne
ClearEmail clears the value of the "email" field.
func (*PaymentProfileUpsertOne) ClearPhone ¶
func (u *PaymentProfileUpsertOne) ClearPhone() *PaymentProfileUpsertOne
ClearPhone clears the value of the "phone" field.
func (*PaymentProfileUpsertOne) ClearRecurrentToken ¶
func (u *PaymentProfileUpsertOne) ClearRecurrentToken() *PaymentProfileUpsertOne
ClearRecurrentToken clears the value of the "recurrent_token" field.
func (*PaymentProfileUpsertOne) ClearUserToken ¶
func (u *PaymentProfileUpsertOne) ClearUserToken() *PaymentProfileUpsertOne
ClearUserToken clears the value of the "user_token" field.
func (*PaymentProfileUpsertOne) DoNothing ¶
func (u *PaymentProfileUpsertOne) DoNothing() *PaymentProfileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PaymentProfileUpsertOne) Exec ¶
func (u *PaymentProfileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentProfileUpsertOne) ExecX ¶
func (u *PaymentProfileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentProfileUpsertOne) ID ¶
func (u *PaymentProfileUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*PaymentProfileUpsertOne) IDX ¶
func (u *PaymentProfileUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*PaymentProfileUpsertOne) Ignore ¶
func (u *PaymentProfileUpsertOne) Ignore() *PaymentProfileUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.PaymentProfile.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*PaymentProfileUpsertOne) SetDeletedAt ¶
func (u *PaymentProfileUpsertOne) SetDeletedAt(v time.Time) *PaymentProfileUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*PaymentProfileUpsertOne) SetEmail ¶
func (u *PaymentProfileUpsertOne) SetEmail(v string) *PaymentProfileUpsertOne
SetEmail sets the "email" field.
func (*PaymentProfileUpsertOne) SetPhone ¶
func (u *PaymentProfileUpsertOne) SetPhone(v string) *PaymentProfileUpsertOne
SetPhone sets the "phone" field.
func (*PaymentProfileUpsertOne) SetRecurrentToken ¶
func (u *PaymentProfileUpsertOne) SetRecurrentToken(v string) *PaymentProfileUpsertOne
SetRecurrentToken sets the "recurrent_token" field.
func (*PaymentProfileUpsertOne) SetUpdatedAt ¶
func (u *PaymentProfileUpsertOne) SetUpdatedAt(v time.Time) *PaymentProfileUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*PaymentProfileUpsertOne) SetUserToken ¶
func (u *PaymentProfileUpsertOne) SetUserToken(v string) *PaymentProfileUpsertOne
SetUserToken sets the "user_token" field.
func (*PaymentProfileUpsertOne) Update ¶
func (u *PaymentProfileUpsertOne) Update(set func(*PaymentProfileUpsert)) *PaymentProfileUpsertOne
Update allows overriding fields `UPDATE` values. See the PaymentProfileCreate.OnConflict documentation for more info.
func (*PaymentProfileUpsertOne) UpdateDeletedAt ¶
func (u *PaymentProfileUpsertOne) UpdateDeletedAt() *PaymentProfileUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PaymentProfileUpsertOne) UpdateEmail ¶
func (u *PaymentProfileUpsertOne) UpdateEmail() *PaymentProfileUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*PaymentProfileUpsertOne) UpdateNewValues ¶
func (u *PaymentProfileUpsertOne) UpdateNewValues() *PaymentProfileUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.PaymentProfile.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(paymentprofile.FieldID)
}),
).
Exec(ctx)
func (*PaymentProfileUpsertOne) UpdatePhone ¶
func (u *PaymentProfileUpsertOne) UpdatePhone() *PaymentProfileUpsertOne
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*PaymentProfileUpsertOne) UpdateRecurrentToken ¶
func (u *PaymentProfileUpsertOne) UpdateRecurrentToken() *PaymentProfileUpsertOne
UpdateRecurrentToken sets the "recurrent_token" field to the value that was provided on create.
func (*PaymentProfileUpsertOne) UpdateUpdatedAt ¶
func (u *PaymentProfileUpsertOne) UpdateUpdatedAt() *PaymentProfileUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*PaymentProfileUpsertOne) UpdateUserToken ¶
func (u *PaymentProfileUpsertOne) UpdateUserToken() *PaymentProfileUpsertOne
UpdateUserToken sets the "user_token" field to the value that was provided on create.
type PaymentProfiles ¶
type PaymentProfiles []*PaymentProfile
PaymentProfiles is a parsable slice of PaymentProfile.
type Product ¶
type Product struct {
// ID of the ent.
ID int64 `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"`
// DeletedAt holds the value of the "deleted_at" field.
DeletedAt *time.Time `json:"deleted_at,omitempty"`
// AppID holds the value of the "app_id" field.
AppID string `json:"app_id,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"`
// Price holds the value of the "price" field.
Price decimal.Decimal `json:"price,omitempty"`
// Currency holds the value of the "currency" field.
Currency string `json:"currency,omitempty"`
// Indicates that this product is active.
IsActive bool `json:"is_active,omitempty"`
// Indicates that this product is limited.
IsLimited bool `json:"is_limited,omitempty"`
// End of limited period.
LimitedTill *time.Time `json:"limited_till,omitempty"`
// Number of items left in stock.
Left int64 `json:"left,omitempty"`
// Indicates that this product can only be limited amount of times.
IsUnique bool `json:"is_unique,omitempty"`
// Number of times this product can be purchased.
UniqueLimit int64 `json:"unique_limit,omitempty"`
// Indicates that this product requires renewal.
IsExpiring bool `json:"is_expiring,omitempty"`
// Time when this product expires.
ExpiringTime *time.Time `json:"expiring_time,omitempty"`
// Payment model for this product.
PaymentModel enum.PaymentModel `json:"payment_model,omitempty"`
// Period of product.
ProductPeriod enum.ProductPeriod `json:"product_period,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) QueryBundles ¶
func (pr *Product) QueryBundles() *BundleQuery
QueryBundles queries the "bundles" edge of the Product entity.
func (*Product) QueryInvoices ¶
func (pr *Product) QueryInvoices() *InvoiceQuery
QueryInvoices queries the "invoices" edge of the Product entity.
func (*Product) QueryReservations ¶
func (pr *Product) QueryReservations() *ProductReservationQuery
QueryReservations queries the "reservations" edge of the Product entity.
func (*Product) QuerySubscriptions ¶
func (pr *Product) QuerySubscriptions() *SubscriptionsQuery
QuerySubscriptions queries the "subscriptions" 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 int64) *ProductDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductClient) GetX ¶
func (c *ProductClient) GetX(ctx context.Context, id int64) *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) QueryBundles ¶
func (c *ProductClient) QueryBundles(pr *Product) *BundleQuery
QueryBundles queries the bundles edge of a Product.
func (*ProductClient) QueryInvoices ¶
func (c *ProductClient) QueryInvoices(pr *Product) *InvoiceQuery
QueryInvoices queries the invoices edge of a Product.
func (*ProductClient) QueryReservations ¶
func (c *ProductClient) QueryReservations(pr *Product) *ProductReservationQuery
QueryReservations queries the reservations edge of a Product.
func (*ProductClient) QuerySubscriptions ¶
func (c *ProductClient) QuerySubscriptions(pr *Product) *SubscriptionsQuery
QuerySubscriptions queries the subscriptions 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 int64) *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) AddBundleIDs ¶
func (pc *ProductCreate) AddBundleIDs(ids ...int64) *ProductCreate
AddBundleIDs adds the "bundles" edge to the Bundle entity by IDs.
func (*ProductCreate) AddBundles ¶
func (pc *ProductCreate) AddBundles(b ...*Bundle) *ProductCreate
AddBundles adds the "bundles" edges to the Bundle entity.
func (*ProductCreate) AddInvoiceIDs ¶
func (pc *ProductCreate) AddInvoiceIDs(ids ...int64) *ProductCreate
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*ProductCreate) AddInvoices ¶
func (pc *ProductCreate) AddInvoices(i ...*Invoice) *ProductCreate
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*ProductCreate) AddReservationIDs ¶
func (pc *ProductCreate) AddReservationIDs(ids ...int64) *ProductCreate
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by IDs.
func (*ProductCreate) AddReservations ¶
func (pc *ProductCreate) AddReservations(p ...*ProductReservation) *ProductCreate
AddReservations adds the "reservations" edges to the ProductReservation entity.
func (*ProductCreate) AddSubscriptionIDs ¶
func (pc *ProductCreate) AddSubscriptionIDs(ids ...int64) *ProductCreate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscriptions entity by IDs.
func (*ProductCreate) AddSubscriptions ¶
func (pc *ProductCreate) AddSubscriptions(s ...*Subscriptions) *ProductCreate
AddSubscriptions adds the "subscriptions" edges to the Subscriptions 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) OnConflict ¶
func (pc *ProductCreate) OnConflict(opts ...sql.ConflictOption) *ProductUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Product.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ProductUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ProductCreate) OnConflictColumns ¶
func (pc *ProductCreate) OnConflictColumns(columns ...string) *ProductUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Product.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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) SetAppID ¶
func (pc *ProductCreate) SetAppID(s string) *ProductCreate
SetAppID sets the "app_id" field.
func (*ProductCreate) SetCreatedAt ¶
func (pc *ProductCreate) SetCreatedAt(t time.Time) *ProductCreate
SetCreatedAt sets the "created_at" field.
func (*ProductCreate) SetCurrency ¶
func (pc *ProductCreate) SetCurrency(s string) *ProductCreate
SetCurrency sets the "currency" field.
func (*ProductCreate) SetDeletedAt ¶
func (pc *ProductCreate) SetDeletedAt(t time.Time) *ProductCreate
SetDeletedAt sets the "deleted_at" field.
func (*ProductCreate) SetDescription ¶
func (pc *ProductCreate) SetDescription(s string) *ProductCreate
SetDescription sets the "description" field.
func (*ProductCreate) SetExpiringTime ¶
func (pc *ProductCreate) SetExpiringTime(t time.Time) *ProductCreate
SetExpiringTime sets the "expiring_time" field.
func (*ProductCreate) SetID ¶
func (pc *ProductCreate) SetID(i int64) *ProductCreate
SetID sets the "id" field.
func (*ProductCreate) SetIsActive ¶
func (pc *ProductCreate) SetIsActive(b bool) *ProductCreate
SetIsActive sets the "is_active" field.
func (*ProductCreate) SetIsExpiring ¶
func (pc *ProductCreate) SetIsExpiring(b bool) *ProductCreate
SetIsExpiring sets the "is_expiring" field.
func (*ProductCreate) SetIsLimited ¶
func (pc *ProductCreate) SetIsLimited(b bool) *ProductCreate
SetIsLimited sets the "is_limited" field.
func (*ProductCreate) SetIsUnique ¶
func (pc *ProductCreate) SetIsUnique(b bool) *ProductCreate
SetIsUnique sets the "is_unique" field.
func (*ProductCreate) SetLeft ¶
func (pc *ProductCreate) SetLeft(i int64) *ProductCreate
SetLeft sets the "left" field.
func (*ProductCreate) SetLimitedTill ¶
func (pc *ProductCreate) SetLimitedTill(t time.Time) *ProductCreate
SetLimitedTill sets the "limited_till" 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) SetNillableCurrency ¶
func (pc *ProductCreate) SetNillableCurrency(s *string) *ProductCreate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*ProductCreate) SetNillableDeletedAt ¶
func (pc *ProductCreate) SetNillableDeletedAt(t *time.Time) *ProductCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ProductCreate) SetNillableExpiringTime ¶
func (pc *ProductCreate) SetNillableExpiringTime(t *time.Time) *ProductCreate
SetNillableExpiringTime sets the "expiring_time" field if the given value is not nil.
func (*ProductCreate) SetNillableIsActive ¶
func (pc *ProductCreate) SetNillableIsActive(b *bool) *ProductCreate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*ProductCreate) SetNillableIsExpiring ¶
func (pc *ProductCreate) SetNillableIsExpiring(b *bool) *ProductCreate
SetNillableIsExpiring sets the "is_expiring" field if the given value is not nil.
func (*ProductCreate) SetNillableIsLimited ¶
func (pc *ProductCreate) SetNillableIsLimited(b *bool) *ProductCreate
SetNillableIsLimited sets the "is_limited" field if the given value is not nil.
func (*ProductCreate) SetNillableIsUnique ¶
func (pc *ProductCreate) SetNillableIsUnique(b *bool) *ProductCreate
SetNillableIsUnique sets the "is_unique" field if the given value is not nil.
func (*ProductCreate) SetNillableLeft ¶
func (pc *ProductCreate) SetNillableLeft(i *int64) *ProductCreate
SetNillableLeft sets the "left" field if the given value is not nil.
func (*ProductCreate) SetNillableLimitedTill ¶
func (pc *ProductCreate) SetNillableLimitedTill(t *time.Time) *ProductCreate
SetNillableLimitedTill sets the "limited_till" field if the given value is not nil.
func (*ProductCreate) SetNillablePaymentModel ¶
func (pc *ProductCreate) SetNillablePaymentModel(em *enum.PaymentModel) *ProductCreate
SetNillablePaymentModel sets the "payment_model" field if the given value is not nil.
func (*ProductCreate) SetNillableProductPeriod ¶
func (pc *ProductCreate) SetNillableProductPeriod(ep *enum.ProductPeriod) *ProductCreate
SetNillableProductPeriod sets the "product_period" field if the given value is not nil.
func (*ProductCreate) SetNillableUniqueLimit ¶
func (pc *ProductCreate) SetNillableUniqueLimit(i *int64) *ProductCreate
SetNillableUniqueLimit sets the "unique_limit" 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) SetPaymentModel ¶
func (pc *ProductCreate) SetPaymentModel(em enum.PaymentModel) *ProductCreate
SetPaymentModel sets the "payment_model" field.
func (*ProductCreate) SetPrice ¶
func (pc *ProductCreate) SetPrice(d decimal.Decimal) *ProductCreate
SetPrice sets the "price" field.
func (*ProductCreate) SetProductPeriod ¶
func (pc *ProductCreate) SetProductPeriod(ep enum.ProductPeriod) *ProductCreate
SetProductPeriod sets the "product_period" field.
func (*ProductCreate) SetUniqueLimit ¶
func (pc *ProductCreate) SetUniqueLimit(i int64) *ProductCreate
SetUniqueLimit sets the "unique_limit" field.
func (*ProductCreate) SetUpdatedAt ¶
func (pc *ProductCreate) SetUpdatedAt(t time.Time) *ProductCreate
SetUpdatedAt sets the "updated_at" 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.
func (*ProductCreateBulk) OnConflict ¶
func (pcb *ProductCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProductUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Product.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ProductUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ProductCreateBulk) OnConflictColumns ¶
func (pcb *ProductCreateBulk) OnConflictColumns(columns ...string) *ProductUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Product.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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 {
// Invoices holds the value of the invoices edge.
Invoices []*Invoice `json:"invoices,omitempty"`
// Subscriptions holds the value of the subscriptions edge.
Subscriptions []*Subscriptions `json:"subscriptions,omitempty"`
// Bundles holds the value of the bundles edge.
Bundles []*Bundle `json:"bundles,omitempty"`
// Reservations holds the value of the reservations edge.
Reservations []*ProductReservation `json:"reservations,omitempty"`
// contains filtered or unexported fields
}
ProductEdges holds the relations/edges for other nodes in the graph.
func (ProductEdges) BundlesOrErr ¶
func (e ProductEdges) BundlesOrErr() ([]*Bundle, error)
BundlesOrErr returns the Bundles value or an error if the edge was not loaded in eager-loading.
func (ProductEdges) InvoicesOrErr ¶
func (e ProductEdges) InvoicesOrErr() ([]*Invoice, error)
InvoicesOrErr returns the Invoices value or an error if the edge was not loaded in eager-loading.
func (ProductEdges) ReservationsOrErr ¶
func (e ProductEdges) ReservationsOrErr() ([]*ProductReservation, error)
ReservationsOrErr returns the Reservations value or an error if the edge was not loaded in eager-loading.
func (ProductEdges) SubscriptionsOrErr ¶
func (e ProductEdges) SubscriptionsOrErr() ([]*Subscriptions, error)
SubscriptionsOrErr returns the Subscriptions value or an error if the edge was not loaded in eager-loading.
type ProductFilter ¶
type ProductFilter struct {
// contains filtered or unexported fields
}
ProductFilter provides a generic filtering capability at runtime for ProductQuery.
func (*ProductFilter) Where ¶
func (f *ProductFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ProductFilter) WhereAppID ¶
func (f *ProductFilter) WhereAppID(p entql.StringP)
WhereAppID applies the entql string predicate on the app_id field.
func (*ProductFilter) WhereCreatedAt ¶
func (f *ProductFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*ProductFilter) WhereCurrency ¶
func (f *ProductFilter) WhereCurrency(p entql.StringP)
WhereCurrency applies the entql string predicate on the currency field.
func (*ProductFilter) WhereDeletedAt ¶
func (f *ProductFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*ProductFilter) WhereDescription ¶
func (f *ProductFilter) WhereDescription(p entql.StringP)
WhereDescription applies the entql string predicate on the description field.
func (*ProductFilter) WhereExpiringTime ¶
func (f *ProductFilter) WhereExpiringTime(p entql.TimeP)
WhereExpiringTime applies the entql time.Time predicate on the expiring_time field.
func (*ProductFilter) WhereHasBundles ¶
func (f *ProductFilter) WhereHasBundles()
WhereHasBundles applies a predicate to check if query has an edge bundles.
func (*ProductFilter) WhereHasBundlesWith ¶
func (f *ProductFilter) WhereHasBundlesWith(preds ...predicate.Bundle)
WhereHasBundlesWith applies a predicate to check if query has an edge bundles with a given conditions (other predicates).
func (*ProductFilter) WhereHasInvoices ¶
func (f *ProductFilter) WhereHasInvoices()
WhereHasInvoices applies a predicate to check if query has an edge invoices.
func (*ProductFilter) WhereHasInvoicesWith ¶
func (f *ProductFilter) WhereHasInvoicesWith(preds ...predicate.Invoice)
WhereHasInvoicesWith applies a predicate to check if query has an edge invoices with a given conditions (other predicates).
func (*ProductFilter) WhereHasReservations ¶
func (f *ProductFilter) WhereHasReservations()
WhereHasReservations applies a predicate to check if query has an edge reservations.
func (*ProductFilter) WhereHasReservationsWith ¶
func (f *ProductFilter) WhereHasReservationsWith(preds ...predicate.ProductReservation)
WhereHasReservationsWith applies a predicate to check if query has an edge reservations with a given conditions (other predicates).
func (*ProductFilter) WhereHasSubscriptions ¶
func (f *ProductFilter) WhereHasSubscriptions()
WhereHasSubscriptions applies a predicate to check if query has an edge subscriptions.
func (*ProductFilter) WhereHasSubscriptionsWith ¶
func (f *ProductFilter) WhereHasSubscriptionsWith(preds ...predicate.Subscriptions)
WhereHasSubscriptionsWith applies a predicate to check if query has an edge subscriptions with a given conditions (other predicates).
func (*ProductFilter) WhereID ¶
func (f *ProductFilter) WhereID(p entql.Int64P)
WhereID applies the entql int64 predicate on the id field.
func (*ProductFilter) WhereIsActive ¶
func (f *ProductFilter) WhereIsActive(p entql.BoolP)
WhereIsActive applies the entql bool predicate on the is_active field.
func (*ProductFilter) WhereIsExpiring ¶
func (f *ProductFilter) WhereIsExpiring(p entql.BoolP)
WhereIsExpiring applies the entql bool predicate on the is_expiring field.
func (*ProductFilter) WhereIsLimited ¶
func (f *ProductFilter) WhereIsLimited(p entql.BoolP)
WhereIsLimited applies the entql bool predicate on the is_limited field.
func (*ProductFilter) WhereIsUnique ¶
func (f *ProductFilter) WhereIsUnique(p entql.BoolP)
WhereIsUnique applies the entql bool predicate on the is_unique field.
func (*ProductFilter) WhereLeft ¶
func (f *ProductFilter) WhereLeft(p entql.Int64P)
WhereLeft applies the entql int64 predicate on the left field.
func (*ProductFilter) WhereLimitedTill ¶
func (f *ProductFilter) WhereLimitedTill(p entql.TimeP)
WhereLimitedTill applies the entql time.Time predicate on the limited_till field.
func (*ProductFilter) WhereName ¶
func (f *ProductFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*ProductFilter) WherePaymentModel ¶
func (f *ProductFilter) WherePaymentModel(p entql.StringP)
WherePaymentModel applies the entql string predicate on the payment_model field.
func (*ProductFilter) WherePrice ¶
func (f *ProductFilter) WherePrice(p entql.Float64P)
WherePrice applies the entql float64 predicate on the price field.
func (*ProductFilter) WhereProductPeriod ¶
func (f *ProductFilter) WhereProductPeriod(p entql.StringP)
WhereProductPeriod applies the entql string predicate on the product_period field.
func (*ProductFilter) WhereUniqueLimit ¶
func (f *ProductFilter) WhereUniqueLimit(p entql.Int64P)
WhereUniqueLimit applies the entql int64 predicate on the unique_limit field.
func (*ProductFilter) WhereUpdatedAt ¶
func (f *ProductFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
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 ProductMutation ¶
type ProductMutation struct {
// contains filtered or unexported fields
}
ProductMutation represents an operation that mutates the Product nodes in the graph.
func (*ProductMutation) AddBundleIDs ¶
func (m *ProductMutation) AddBundleIDs(ids ...int64)
AddBundleIDs adds the "bundles" edge to the Bundle entity by ids.
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) AddInvoiceIDs ¶
func (m *ProductMutation) AddInvoiceIDs(ids ...int64)
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by ids.
func (*ProductMutation) AddLeft ¶
func (m *ProductMutation) AddLeft(i int64)
AddLeft adds i to the "left" field.
func (*ProductMutation) AddPrice ¶
func (m *ProductMutation) AddPrice(d decimal.Decimal)
AddPrice adds d to the "price" field.
func (*ProductMutation) AddReservationIDs ¶
func (m *ProductMutation) AddReservationIDs(ids ...int64)
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by ids.
func (*ProductMutation) AddSubscriptionIDs ¶
func (m *ProductMutation) AddSubscriptionIDs(ids ...int64)
AddSubscriptionIDs adds the "subscriptions" edge to the Subscriptions entity by ids.
func (*ProductMutation) AddUniqueLimit ¶
func (m *ProductMutation) AddUniqueLimit(i int64)
AddUniqueLimit adds i to the "unique_limit" 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) AddedLeft ¶
func (m *ProductMutation) AddedLeft() (r int64, exists bool)
AddedLeft returns the value that was added to the "left" field 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) AddedUniqueLimit ¶
func (m *ProductMutation) AddedUniqueLimit() (r int64, exists bool)
AddedUniqueLimit returns the value that was added to the "unique_limit" field in this mutation.
func (*ProductMutation) AppID ¶
func (m *ProductMutation) AppID() (r string, exists bool)
AppID returns the value of the "app_id" field in the mutation.
func (*ProductMutation) BundlesCleared ¶
func (m *ProductMutation) BundlesCleared() bool
BundlesCleared reports if the "bundles" edge to the Bundle entity was cleared.
func (*ProductMutation) BundlesIDs ¶
func (m *ProductMutation) BundlesIDs() (ids []int64)
BundlesIDs returns the "bundles" edge IDs in the mutation.
func (*ProductMutation) ClearBundles ¶
func (m *ProductMutation) ClearBundles()
ClearBundles clears the "bundles" edge to the Bundle entity.
func (*ProductMutation) ClearDeletedAt ¶
func (m *ProductMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" 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) ClearExpiringTime ¶
func (m *ProductMutation) ClearExpiringTime()
ClearExpiringTime clears the value of the "expiring_time" field.
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) ClearInvoices ¶
func (m *ProductMutation) ClearInvoices()
ClearInvoices clears the "invoices" edge to the Invoice entity.
func (*ProductMutation) ClearIsExpiring ¶
func (m *ProductMutation) ClearIsExpiring()
ClearIsExpiring clears the value of the "is_expiring" field.
func (*ProductMutation) ClearIsUnique ¶
func (m *ProductMutation) ClearIsUnique()
ClearIsUnique clears the value of the "is_unique" field.
func (*ProductMutation) ClearLimitedTill ¶
func (m *ProductMutation) ClearLimitedTill()
ClearLimitedTill clears the value of the "limited_till" field.
func (*ProductMutation) ClearReservations ¶
func (m *ProductMutation) ClearReservations()
ClearReservations clears the "reservations" edge to the ProductReservation entity.
func (*ProductMutation) ClearSubscriptions ¶
func (m *ProductMutation) ClearSubscriptions()
ClearSubscriptions clears the "subscriptions" edge to the Subscriptions entity.
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) CreatedAt ¶
func (m *ProductMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductMutation) Currency ¶
func (m *ProductMutation) Currency() (r string, exists bool)
Currency returns the value of the "currency" field in the mutation.
func (*ProductMutation) DeletedAt ¶
func (m *ProductMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*ProductMutation) DeletedAtCleared ¶
func (m *ProductMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this 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) 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) ExpiringTime ¶
func (m *ProductMutation) ExpiringTime() (r time.Time, exists bool)
ExpiringTime returns the value of the "expiring_time" field in the mutation.
func (*ProductMutation) ExpiringTimeCleared ¶
func (m *ProductMutation) ExpiringTimeCleared() bool
ExpiringTimeCleared returns if the "expiring_time" field 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) Filter ¶
func (m *ProductMutation) Filter() *ProductFilter
Filter returns an entql.Where implementation to apply filters on the ProductMutation builder.
func (*ProductMutation) ID ¶
func (m *ProductMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProductMutation) IDs ¶
func (m *ProductMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProductMutation) InvoicesCleared ¶
func (m *ProductMutation) InvoicesCleared() bool
InvoicesCleared reports if the "invoices" edge to the Invoice entity was cleared.
func (*ProductMutation) InvoicesIDs ¶
func (m *ProductMutation) InvoicesIDs() (ids []int64)
InvoicesIDs returns the "invoices" edge IDs in the mutation.
func (*ProductMutation) IsActive ¶
func (m *ProductMutation) IsActive() (r bool, exists bool)
IsActive returns the value of the "is_active" field in the mutation.
func (*ProductMutation) IsExpiring ¶
func (m *ProductMutation) IsExpiring() (r bool, exists bool)
IsExpiring returns the value of the "is_expiring" field in the mutation.
func (*ProductMutation) IsExpiringCleared ¶
func (m *ProductMutation) IsExpiringCleared() bool
IsExpiringCleared returns if the "is_expiring" field was cleared in this mutation.
func (*ProductMutation) IsLimited ¶
func (m *ProductMutation) IsLimited() (r bool, exists bool)
IsLimited returns the value of the "is_limited" field in the mutation.
func (*ProductMutation) IsUnique ¶
func (m *ProductMutation) IsUnique() (r bool, exists bool)
IsUnique returns the value of the "is_unique" field in the mutation.
func (*ProductMutation) IsUniqueCleared ¶
func (m *ProductMutation) IsUniqueCleared() bool
IsUniqueCleared returns if the "is_unique" field was cleared in this mutation.
func (*ProductMutation) Left ¶
func (m *ProductMutation) Left() (r int64, exists bool)
Left returns the value of the "left" field in the mutation.
func (*ProductMutation) LimitedTill ¶
func (m *ProductMutation) LimitedTill() (r time.Time, exists bool)
LimitedTill returns the value of the "limited_till" field in the mutation.
func (*ProductMutation) LimitedTillCleared ¶
func (m *ProductMutation) LimitedTillCleared() bool
LimitedTillCleared returns if the "limited_till" field was cleared in this 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) OldAppID ¶
func (m *ProductMutation) OldAppID(ctx context.Context) (v string, err error)
OldAppID returns the old "app_id" 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) OldCurrency ¶
func (m *ProductMutation) OldCurrency(ctx context.Context) (v string, err error)
OldCurrency returns the old "currency" 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) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_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) OldExpiringTime ¶
OldExpiringTime returns the old "expiring_time" 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) OldIsActive ¶
func (m *ProductMutation) OldIsActive(ctx context.Context) (v bool, err error)
OldIsActive returns the old "is_active" 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) OldIsExpiring ¶
func (m *ProductMutation) OldIsExpiring(ctx context.Context) (v bool, err error)
OldIsExpiring returns the old "is_expiring" 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) OldIsLimited ¶
func (m *ProductMutation) OldIsLimited(ctx context.Context) (v bool, err error)
OldIsLimited returns the old "is_limited" 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) OldIsUnique ¶
func (m *ProductMutation) OldIsUnique(ctx context.Context) (v bool, err error)
OldIsUnique returns the old "is_unique" 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) OldLeft ¶
func (m *ProductMutation) OldLeft(ctx context.Context) (v int64, err error)
OldLeft returns the old "left" 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) OldLimitedTill ¶
OldLimitedTill returns the old "limited_till" 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) 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) OldPaymentModel ¶
func (m *ProductMutation) OldPaymentModel(ctx context.Context) (v enum.PaymentModel, err error)
OldPaymentModel returns the old "payment_model" 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) OldProductPeriod ¶
func (m *ProductMutation) OldProductPeriod(ctx context.Context) (v enum.ProductPeriod, err error)
OldProductPeriod returns the old "product_period" 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) OldUniqueLimit ¶
func (m *ProductMutation) OldUniqueLimit(ctx context.Context) (v int64, err error)
OldUniqueLimit returns the old "unique_limit" 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) PaymentModel ¶
func (m *ProductMutation) PaymentModel() (r enum.PaymentModel, exists bool)
PaymentModel returns the value of the "payment_model" field in the mutation.
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) ProductPeriod ¶
func (m *ProductMutation) ProductPeriod() (r enum.ProductPeriod, exists bool)
ProductPeriod returns the value of the "product_period" field in the mutation.
func (*ProductMutation) RemoveBundleIDs ¶
func (m *ProductMutation) RemoveBundleIDs(ids ...int64)
RemoveBundleIDs removes the "bundles" edge to the Bundle entity by IDs.
func (*ProductMutation) RemoveInvoiceIDs ¶
func (m *ProductMutation) RemoveInvoiceIDs(ids ...int64)
RemoveInvoiceIDs removes the "invoices" edge to the Invoice entity by IDs.
func (*ProductMutation) RemoveReservationIDs ¶
func (m *ProductMutation) RemoveReservationIDs(ids ...int64)
RemoveReservationIDs removes the "reservations" edge to the ProductReservation entity by IDs.
func (*ProductMutation) RemoveSubscriptionIDs ¶
func (m *ProductMutation) RemoveSubscriptionIDs(ids ...int64)
RemoveSubscriptionIDs removes the "subscriptions" edge to the Subscriptions entity by IDs.
func (*ProductMutation) RemovedBundlesIDs ¶
func (m *ProductMutation) RemovedBundlesIDs() (ids []int64)
RemovedBundles returns the removed IDs of the "bundles" edge to the Bundle entity.
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) RemovedInvoicesIDs ¶
func (m *ProductMutation) RemovedInvoicesIDs() (ids []int64)
RemovedInvoices returns the removed IDs of the "invoices" edge to the Invoice entity.
func (*ProductMutation) RemovedReservationsIDs ¶
func (m *ProductMutation) RemovedReservationsIDs() (ids []int64)
RemovedReservations returns the removed IDs of the "reservations" edge to the ProductReservation entity.
func (*ProductMutation) RemovedSubscriptionsIDs ¶
func (m *ProductMutation) RemovedSubscriptionsIDs() (ids []int64)
RemovedSubscriptions returns the removed IDs of the "subscriptions" edge to the Subscriptions entity.
func (*ProductMutation) ReservationsCleared ¶
func (m *ProductMutation) ReservationsCleared() bool
ReservationsCleared reports if the "reservations" edge to the ProductReservation entity was cleared.
func (*ProductMutation) ReservationsIDs ¶
func (m *ProductMutation) ReservationsIDs() (ids []int64)
ReservationsIDs returns the "reservations" edge IDs in the mutation.
func (*ProductMutation) ResetAppID ¶
func (m *ProductMutation) ResetAppID()
ResetAppID resets all changes to the "app_id" field.
func (*ProductMutation) ResetBundles ¶
func (m *ProductMutation) ResetBundles()
ResetBundles resets all changes to the "bundles" edge.
func (*ProductMutation) ResetCreatedAt ¶
func (m *ProductMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductMutation) ResetCurrency ¶
func (m *ProductMutation) ResetCurrency()
ResetCurrency resets all changes to the "currency" field.
func (*ProductMutation) ResetDeletedAt ¶
func (m *ProductMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_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) ResetExpiringTime ¶
func (m *ProductMutation) ResetExpiringTime()
ResetExpiringTime resets all changes to the "expiring_time" field.
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) ResetInvoices ¶
func (m *ProductMutation) ResetInvoices()
ResetInvoices resets all changes to the "invoices" edge.
func (*ProductMutation) ResetIsActive ¶
func (m *ProductMutation) ResetIsActive()
ResetIsActive resets all changes to the "is_active" field.
func (*ProductMutation) ResetIsExpiring ¶
func (m *ProductMutation) ResetIsExpiring()
ResetIsExpiring resets all changes to the "is_expiring" field.
func (*ProductMutation) ResetIsLimited ¶
func (m *ProductMutation) ResetIsLimited()
ResetIsLimited resets all changes to the "is_limited" field.
func (*ProductMutation) ResetIsUnique ¶
func (m *ProductMutation) ResetIsUnique()
ResetIsUnique resets all changes to the "is_unique" field.
func (*ProductMutation) ResetLeft ¶
func (m *ProductMutation) ResetLeft()
ResetLeft resets all changes to the "left" field.
func (*ProductMutation) ResetLimitedTill ¶
func (m *ProductMutation) ResetLimitedTill()
ResetLimitedTill resets all changes to the "limited_till" field.
func (*ProductMutation) ResetName ¶
func (m *ProductMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProductMutation) ResetPaymentModel ¶
func (m *ProductMutation) ResetPaymentModel()
ResetPaymentModel resets all changes to the "payment_model" field.
func (*ProductMutation) ResetPrice ¶
func (m *ProductMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*ProductMutation) ResetProductPeriod ¶
func (m *ProductMutation) ResetProductPeriod()
ResetProductPeriod resets all changes to the "product_period" field.
func (*ProductMutation) ResetReservations ¶
func (m *ProductMutation) ResetReservations()
ResetReservations resets all changes to the "reservations" edge.
func (*ProductMutation) ResetSubscriptions ¶
func (m *ProductMutation) ResetSubscriptions()
ResetSubscriptions resets all changes to the "subscriptions" edge.
func (*ProductMutation) ResetUniqueLimit ¶
func (m *ProductMutation) ResetUniqueLimit()
ResetUniqueLimit resets all changes to the "unique_limit" field.
func (*ProductMutation) ResetUpdatedAt ¶
func (m *ProductMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductMutation) SetAppID ¶
func (m *ProductMutation) SetAppID(s string)
SetAppID sets the "app_id" field.
func (*ProductMutation) SetCreatedAt ¶
func (m *ProductMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductMutation) SetCurrency ¶
func (m *ProductMutation) SetCurrency(s string)
SetCurrency sets the "currency" field.
func (*ProductMutation) SetDeletedAt ¶
func (m *ProductMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*ProductMutation) SetDescription ¶
func (m *ProductMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ProductMutation) SetExpiringTime ¶
func (m *ProductMutation) SetExpiringTime(t time.Time)
SetExpiringTime sets the "expiring_time" 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 int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Product entities.
func (*ProductMutation) SetIsActive ¶
func (m *ProductMutation) SetIsActive(b bool)
SetIsActive sets the "is_active" field.
func (*ProductMutation) SetIsExpiring ¶
func (m *ProductMutation) SetIsExpiring(b bool)
SetIsExpiring sets the "is_expiring" field.
func (*ProductMutation) SetIsLimited ¶
func (m *ProductMutation) SetIsLimited(b bool)
SetIsLimited sets the "is_limited" field.
func (*ProductMutation) SetIsUnique ¶
func (m *ProductMutation) SetIsUnique(b bool)
SetIsUnique sets the "is_unique" field.
func (*ProductMutation) SetLeft ¶
func (m *ProductMutation) SetLeft(i int64)
SetLeft sets the "left" field.
func (*ProductMutation) SetLimitedTill ¶
func (m *ProductMutation) SetLimitedTill(t time.Time)
SetLimitedTill sets the "limited_till" field.
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) SetPaymentModel ¶
func (m *ProductMutation) SetPaymentModel(em enum.PaymentModel)
SetPaymentModel sets the "payment_model" field.
func (*ProductMutation) SetPrice ¶
func (m *ProductMutation) SetPrice(d decimal.Decimal)
SetPrice sets the "price" field.
func (*ProductMutation) SetProductPeriod ¶
func (m *ProductMutation) SetProductPeriod(ep enum.ProductPeriod)
SetProductPeriod sets the "product_period" field.
func (*ProductMutation) SetUniqueLimit ¶
func (m *ProductMutation) SetUniqueLimit(i int64)
SetUniqueLimit sets the "unique_limit" field.
func (*ProductMutation) SetUpdatedAt ¶
func (m *ProductMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ProductMutation) SubscriptionsCleared ¶
func (m *ProductMutation) SubscriptionsCleared() bool
SubscriptionsCleared reports if the "subscriptions" edge to the Subscriptions entity was cleared.
func (*ProductMutation) SubscriptionsIDs ¶
func (m *ProductMutation) SubscriptionsIDs() (ids []int64)
SubscriptionsIDs returns the "subscriptions" 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) UniqueLimit ¶
func (m *ProductMutation) UniqueLimit() (r int64, exists bool)
UniqueLimit returns the value of the "unique_limit" field in the mutation.
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.
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) Filter ¶
func (pq *ProductQuery) Filter() *ProductFilter
Filter returns a Filter implementation to apply filters on the ProductQuery builder.
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 int64, 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) int64
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 []int64, err error)
IDs executes the query and returns a list of Product IDs.
func (*ProductQuery) IDsX ¶
func (pq *ProductQuery) IDsX(ctx context.Context) []int64
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) Modify ¶
func (pq *ProductQuery) Modify(modifiers ...func(s *sql.Selector)) *ProductSelect
Modify adds a query modifier for attaching custom logic to queries.
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 int64, 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) int64
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) QueryBundles ¶
func (pq *ProductQuery) QueryBundles() *BundleQuery
QueryBundles chains the current query on the "bundles" edge.
func (*ProductQuery) QueryInvoices ¶
func (pq *ProductQuery) QueryInvoices() *InvoiceQuery
QueryInvoices chains the current query on the "invoices" edge.
func (*ProductQuery) QueryReservations ¶
func (pq *ProductQuery) QueryReservations() *ProductReservationQuery
QueryReservations chains the current query on the "reservations" edge.
func (*ProductQuery) QuerySubscriptions ¶
func (pq *ProductQuery) QuerySubscriptions() *SubscriptionsQuery
QuerySubscriptions chains the current query on the "subscriptions" 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) WithBundles ¶
func (pq *ProductQuery) WithBundles(opts ...func(*BundleQuery)) *ProductQuery
WithBundles tells the query-builder to eager-load the nodes that are connected to the "bundles" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductQuery) WithInvoices ¶
func (pq *ProductQuery) WithInvoices(opts ...func(*InvoiceQuery)) *ProductQuery
WithInvoices tells the query-builder to eager-load the nodes that are connected to the "invoices" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductQuery) WithReservations ¶
func (pq *ProductQuery) WithReservations(opts ...func(*ProductReservationQuery)) *ProductQuery
WithReservations tells the query-builder to eager-load the nodes that are connected to the "reservations" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductQuery) WithSubscriptions ¶
func (pq *ProductQuery) WithSubscriptions(opts ...func(*SubscriptionsQuery)) *ProductQuery
WithSubscriptions tells the query-builder to eager-load the nodes that are connected to the "subscriptions" edge. The optional arguments are used to configure the query builder of the edge.
type ProductReservation ¶
type ProductReservation struct {
// ID of the ent.
ID int64 `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"`
// References the product being reserved.
ProductID int64 `json:"product_id,omitempty"`
// References the invoice associated with the reservation.
InvoiceID int64 `json:"invoice_id,omitempty"`
// References the user who created the reservation.
UserID int64 `json:"user_id,omitempty"`
// The quantity of the product reserved.
ReservedQuantity int64 `json:"reserved_quantity,omitempty"`
// The status of the reservation.
Status enum.ReservationStatus `json:"status,omitempty"`
// The time until the reservation expires.
ExpirationTime time.Time `json:"expiration_time,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the ProductReservationQuery when eager-loading is set.
Edges ProductReservationEdges `json:"edges"`
// contains filtered or unexported fields
}
ProductReservation is the model entity for the ProductReservation schema.
func (*ProductReservation) QueryInvoice ¶
func (pr *ProductReservation) QueryInvoice() *InvoiceQuery
QueryInvoice queries the "invoice" edge of the ProductReservation entity.
func (*ProductReservation) QueryProduct ¶
func (pr *ProductReservation) QueryProduct() *ProductQuery
QueryProduct queries the "product" edge of the ProductReservation entity.
func (*ProductReservation) String ¶
func (pr *ProductReservation) String() string
String implements the fmt.Stringer.
func (*ProductReservation) Unwrap ¶
func (pr *ProductReservation) Unwrap() *ProductReservation
Unwrap unwraps the ProductReservation 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 (*ProductReservation) Update ¶
func (pr *ProductReservation) Update() *ProductReservationUpdateOne
Update returns a builder for updating this ProductReservation. Note that you need to call ProductReservation.Unwrap() before calling this method if this ProductReservation was returned from a transaction, and the transaction was committed or rolled back.
type ProductReservationClient ¶
type ProductReservationClient struct {
// contains filtered or unexported fields
}
ProductReservationClient is a client for the ProductReservation schema.
func NewProductReservationClient ¶
func NewProductReservationClient(c config) *ProductReservationClient
NewProductReservationClient returns a client for the ProductReservation from the given config.
func (*ProductReservationClient) Create ¶
func (c *ProductReservationClient) Create() *ProductReservationCreate
Create returns a builder for creating a ProductReservation entity.
func (*ProductReservationClient) CreateBulk ¶
func (c *ProductReservationClient) CreateBulk(builders ...*ProductReservationCreate) *ProductReservationCreateBulk
CreateBulk returns a builder for creating a bulk of ProductReservation entities.
func (*ProductReservationClient) Delete ¶
func (c *ProductReservationClient) Delete() *ProductReservationDelete
Delete returns a delete builder for ProductReservation.
func (*ProductReservationClient) DeleteOne ¶
func (c *ProductReservationClient) DeleteOne(pr *ProductReservation) *ProductReservationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductReservationClient) DeleteOneID ¶
func (c *ProductReservationClient) DeleteOneID(id int64) *ProductReservationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductReservationClient) Get ¶
func (c *ProductReservationClient) Get(ctx context.Context, id int64) (*ProductReservation, error)
Get returns a ProductReservation entity by its id.
func (*ProductReservationClient) GetX ¶
func (c *ProductReservationClient) GetX(ctx context.Context, id int64) *ProductReservation
GetX is like Get, but panics if an error occurs.
func (*ProductReservationClient) Hooks ¶
func (c *ProductReservationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductReservationClient) Intercept ¶
func (c *ProductReservationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `productreservation.Intercept(f(g(h())))`.
func (*ProductReservationClient) Interceptors ¶
func (c *ProductReservationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductReservationClient) MapCreateBulk ¶
func (c *ProductReservationClient) MapCreateBulk(slice any, setFunc func(*ProductReservationCreate, int)) *ProductReservationCreateBulk
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 (*ProductReservationClient) Query ¶
func (c *ProductReservationClient) Query() *ProductReservationQuery
Query returns a query builder for ProductReservation.
func (*ProductReservationClient) QueryInvoice ¶
func (c *ProductReservationClient) QueryInvoice(pr *ProductReservation) *InvoiceQuery
QueryInvoice queries the invoice edge of a ProductReservation.
func (*ProductReservationClient) QueryProduct ¶
func (c *ProductReservationClient) QueryProduct(pr *ProductReservation) *ProductQuery
QueryProduct queries the product edge of a ProductReservation.
func (*ProductReservationClient) Update ¶
func (c *ProductReservationClient) Update() *ProductReservationUpdate
Update returns an update builder for ProductReservation.
func (*ProductReservationClient) UpdateOne ¶
func (c *ProductReservationClient) UpdateOne(pr *ProductReservation) *ProductReservationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductReservationClient) UpdateOneID ¶
func (c *ProductReservationClient) UpdateOneID(id int64) *ProductReservationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductReservationClient) Use ¶
func (c *ProductReservationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `productreservation.Hooks(f(g(h())))`.
type ProductReservationCreate ¶
type ProductReservationCreate struct {
// contains filtered or unexported fields
}
ProductReservationCreate is the builder for creating a ProductReservation entity.
func (*ProductReservationCreate) Exec ¶
func (prc *ProductReservationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductReservationCreate) ExecX ¶
func (prc *ProductReservationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationCreate) Mutation ¶
func (prc *ProductReservationCreate) Mutation() *ProductReservationMutation
Mutation returns the ProductReservationMutation object of the builder.
func (*ProductReservationCreate) OnConflict ¶
func (prc *ProductReservationCreate) OnConflict(opts ...sql.ConflictOption) *ProductReservationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.ProductReservation.Create().
SetCreatedAt(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ProductReservationUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ProductReservationCreate) OnConflictColumns ¶
func (prc *ProductReservationCreate) OnConflictColumns(columns ...string) *ProductReservationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.ProductReservation.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ProductReservationCreate) Save ¶
func (prc *ProductReservationCreate) Save(ctx context.Context) (*ProductReservation, error)
Save creates the ProductReservation in the database.
func (*ProductReservationCreate) SaveX ¶
func (prc *ProductReservationCreate) SaveX(ctx context.Context) *ProductReservation
SaveX calls Save and panics if Save returns an error.
func (*ProductReservationCreate) SetCreatedAt ¶
func (prc *ProductReservationCreate) SetCreatedAt(t time.Time) *ProductReservationCreate
SetCreatedAt sets the "created_at" field.
func (*ProductReservationCreate) SetExpirationTime ¶
func (prc *ProductReservationCreate) SetExpirationTime(t time.Time) *ProductReservationCreate
SetExpirationTime sets the "expiration_time" field.
func (*ProductReservationCreate) SetID ¶
func (prc *ProductReservationCreate) SetID(i int64) *ProductReservationCreate
SetID sets the "id" field.
func (*ProductReservationCreate) SetInvoice ¶
func (prc *ProductReservationCreate) SetInvoice(i *Invoice) *ProductReservationCreate
SetInvoice sets the "invoice" edge to the Invoice entity.
func (*ProductReservationCreate) SetInvoiceID ¶
func (prc *ProductReservationCreate) SetInvoiceID(i int64) *ProductReservationCreate
SetInvoiceID sets the "invoice_id" field.
func (*ProductReservationCreate) SetNillableCreatedAt ¶
func (prc *ProductReservationCreate) SetNillableCreatedAt(t *time.Time) *ProductReservationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProductReservationCreate) SetNillableExpirationTime ¶
func (prc *ProductReservationCreate) SetNillableExpirationTime(t *time.Time) *ProductReservationCreate
SetNillableExpirationTime sets the "expiration_time" field if the given value is not nil.
func (*ProductReservationCreate) SetNillableReservedQuantity ¶
func (prc *ProductReservationCreate) SetNillableReservedQuantity(i *int64) *ProductReservationCreate
SetNillableReservedQuantity sets the "reserved_quantity" field if the given value is not nil.
func (*ProductReservationCreate) SetNillableStatus ¶
func (prc *ProductReservationCreate) SetNillableStatus(es *enum.ReservationStatus) *ProductReservationCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ProductReservationCreate) SetNillableUpdatedAt ¶
func (prc *ProductReservationCreate) SetNillableUpdatedAt(t *time.Time) *ProductReservationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProductReservationCreate) SetProduct ¶
func (prc *ProductReservationCreate) SetProduct(p *Product) *ProductReservationCreate
SetProduct sets the "product" edge to the Product entity.
func (*ProductReservationCreate) SetProductID ¶
func (prc *ProductReservationCreate) SetProductID(i int64) *ProductReservationCreate
SetProductID sets the "product_id" field.
func (*ProductReservationCreate) SetReservedQuantity ¶
func (prc *ProductReservationCreate) SetReservedQuantity(i int64) *ProductReservationCreate
SetReservedQuantity sets the "reserved_quantity" field.
func (*ProductReservationCreate) SetStatus ¶
func (prc *ProductReservationCreate) SetStatus(es enum.ReservationStatus) *ProductReservationCreate
SetStatus sets the "status" field.
func (*ProductReservationCreate) SetUpdatedAt ¶
func (prc *ProductReservationCreate) SetUpdatedAt(t time.Time) *ProductReservationCreate
SetUpdatedAt sets the "updated_at" field.
func (*ProductReservationCreate) SetUserID ¶
func (prc *ProductReservationCreate) SetUserID(i int64) *ProductReservationCreate
SetUserID sets the "user_id" field.
type ProductReservationCreateBulk ¶
type ProductReservationCreateBulk struct {
// contains filtered or unexported fields
}
ProductReservationCreateBulk is the builder for creating many ProductReservation entities in bulk.
func (*ProductReservationCreateBulk) Exec ¶
func (prcb *ProductReservationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductReservationCreateBulk) ExecX ¶
func (prcb *ProductReservationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationCreateBulk) OnConflict ¶
func (prcb *ProductReservationCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProductReservationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.ProductReservation.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.ProductReservationUpsert) {
SetCreatedAt(v+v).
}).
Exec(ctx)
func (*ProductReservationCreateBulk) OnConflictColumns ¶
func (prcb *ProductReservationCreateBulk) OnConflictColumns(columns ...string) *ProductReservationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.ProductReservation.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ProductReservationCreateBulk) Save ¶
func (prcb *ProductReservationCreateBulk) Save(ctx context.Context) ([]*ProductReservation, error)
Save creates the ProductReservation entities in the database.
func (*ProductReservationCreateBulk) SaveX ¶
func (prcb *ProductReservationCreateBulk) SaveX(ctx context.Context) []*ProductReservation
SaveX is like Save, but panics if an error occurs.
type ProductReservationDelete ¶
type ProductReservationDelete struct {
// contains filtered or unexported fields
}
ProductReservationDelete is the builder for deleting a ProductReservation entity.
func (*ProductReservationDelete) Exec ¶
func (prd *ProductReservationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductReservationDelete) ExecX ¶
func (prd *ProductReservationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationDelete) Where ¶
func (prd *ProductReservationDelete) Where(ps ...predicate.ProductReservation) *ProductReservationDelete
Where appends a list predicates to the ProductReservationDelete builder.
type ProductReservationDeleteOne ¶
type ProductReservationDeleteOne struct {
// contains filtered or unexported fields
}
ProductReservationDeleteOne is the builder for deleting a single ProductReservation entity.
func (*ProductReservationDeleteOne) Exec ¶
func (prdo *ProductReservationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductReservationDeleteOne) ExecX ¶
func (prdo *ProductReservationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationDeleteOne) Where ¶
func (prdo *ProductReservationDeleteOne) Where(ps ...predicate.ProductReservation) *ProductReservationDeleteOne
Where appends a list predicates to the ProductReservationDelete builder.
type ProductReservationEdges ¶
type ProductReservationEdges struct {
// Product holds the value of the product edge.
Product *Product `json:"product,omitempty"`
// Invoice holds the value of the invoice edge.
Invoice *Invoice `json:"invoice,omitempty"`
// contains filtered or unexported fields
}
ProductReservationEdges holds the relations/edges for other nodes in the graph.
func (ProductReservationEdges) InvoiceOrErr ¶
func (e ProductReservationEdges) 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 (ProductReservationEdges) ProductOrErr ¶
func (e ProductReservationEdges) 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 ProductReservationFilter ¶
type ProductReservationFilter struct {
// contains filtered or unexported fields
}
ProductReservationFilter provides a generic filtering capability at runtime for ProductReservationQuery.
func (*ProductReservationFilter) Where ¶
func (f *ProductReservationFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ProductReservationFilter) WhereCreatedAt ¶
func (f *ProductReservationFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*ProductReservationFilter) WhereExpirationTime ¶
func (f *ProductReservationFilter) WhereExpirationTime(p entql.TimeP)
WhereExpirationTime applies the entql time.Time predicate on the expiration_time field.
func (*ProductReservationFilter) WhereHasInvoice ¶
func (f *ProductReservationFilter) WhereHasInvoice()
WhereHasInvoice applies a predicate to check if query has an edge invoice.
func (*ProductReservationFilter) WhereHasInvoiceWith ¶
func (f *ProductReservationFilter) WhereHasInvoiceWith(preds ...predicate.Invoice)
WhereHasInvoiceWith applies a predicate to check if query has an edge invoice with a given conditions (other predicates).
func (*ProductReservationFilter) WhereHasProduct ¶
func (f *ProductReservationFilter) WhereHasProduct()
WhereHasProduct applies a predicate to check if query has an edge product.
func (*ProductReservationFilter) WhereHasProductWith ¶
func (f *ProductReservationFilter) WhereHasProductWith(preds ...predicate.Product)
WhereHasProductWith applies a predicate to check if query has an edge product with a given conditions (other predicates).
func (*ProductReservationFilter) WhereID ¶
func (f *ProductReservationFilter) WhereID(p entql.Int64P)
WhereID applies the entql int64 predicate on the id field.
func (*ProductReservationFilter) WhereInvoiceID ¶
func (f *ProductReservationFilter) WhereInvoiceID(p entql.Int64P)
WhereInvoiceID applies the entql int64 predicate on the invoice_id field.
func (*ProductReservationFilter) WhereProductID ¶
func (f *ProductReservationFilter) WhereProductID(p entql.Int64P)
WhereProductID applies the entql int64 predicate on the product_id field.
func (*ProductReservationFilter) WhereReservedQuantity ¶
func (f *ProductReservationFilter) WhereReservedQuantity(p entql.Int64P)
WhereReservedQuantity applies the entql int64 predicate on the reserved_quantity field.
func (*ProductReservationFilter) WhereStatus ¶
func (f *ProductReservationFilter) WhereStatus(p entql.StringP)
WhereStatus applies the entql string predicate on the status field.
func (*ProductReservationFilter) WhereUpdatedAt ¶
func (f *ProductReservationFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (*ProductReservationFilter) WhereUserID ¶
func (f *ProductReservationFilter) WhereUserID(p entql.Int64P)
WhereUserID applies the entql int64 predicate on the user_id field.
type ProductReservationGroupBy ¶
type ProductReservationGroupBy struct {
// contains filtered or unexported fields
}
ProductReservationGroupBy is the group-by builder for ProductReservation entities.
func (*ProductReservationGroupBy) Aggregate ¶
func (prgb *ProductReservationGroupBy) Aggregate(fns ...AggregateFunc) *ProductReservationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductReservationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductReservationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductReservationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductReservationGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*ProductReservationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductReservationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ProductReservationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductReservationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductReservationGroupBy) Scan ¶
func (prgb *ProductReservationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductReservationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductReservationMutation ¶
type ProductReservationMutation struct {
// contains filtered or unexported fields
}
ProductReservationMutation represents an operation that mutates the ProductReservation nodes in the graph.
func (*ProductReservationMutation) AddField ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) AddReservedQuantity ¶
func (m *ProductReservationMutation) AddReservedQuantity(i int64)
AddReservedQuantity adds i to the "reserved_quantity" field.
func (*ProductReservationMutation) AddUserID ¶
func (m *ProductReservationMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*ProductReservationMutation) AddedEdges ¶
func (m *ProductReservationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductReservationMutation) AddedField ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) AddedFields ¶
func (m *ProductReservationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductReservationMutation) AddedIDs ¶
func (m *ProductReservationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductReservationMutation) AddedReservedQuantity ¶
func (m *ProductReservationMutation) AddedReservedQuantity() (r int64, exists bool)
AddedReservedQuantity returns the value that was added to the "reserved_quantity" field in this mutation.
func (*ProductReservationMutation) AddedUserID ¶
func (m *ProductReservationMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*ProductReservationMutation) ClearEdge ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) ClearField ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) ClearInvoice ¶
func (m *ProductReservationMutation) ClearInvoice()
ClearInvoice clears the "invoice" edge to the Invoice entity.
func (*ProductReservationMutation) ClearProduct ¶
func (m *ProductReservationMutation) ClearProduct()
ClearProduct clears the "product" edge to the Product entity.
func (*ProductReservationMutation) ClearedEdges ¶
func (m *ProductReservationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductReservationMutation) ClearedFields ¶
func (m *ProductReservationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductReservationMutation) Client ¶
func (m ProductReservationMutation) 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 (*ProductReservationMutation) CreatedAt ¶
func (m *ProductReservationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductReservationMutation) EdgeCleared ¶
func (m *ProductReservationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductReservationMutation) ExpirationTime ¶
func (m *ProductReservationMutation) ExpirationTime() (r time.Time, exists bool)
ExpirationTime returns the value of the "expiration_time" field in the mutation.
func (*ProductReservationMutation) Field ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) FieldCleared ¶
func (m *ProductReservationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductReservationMutation) Fields ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) Filter ¶
func (m *ProductReservationMutation) Filter() *ProductReservationFilter
Filter returns an entql.Where implementation to apply filters on the ProductReservationMutation builder.
func (*ProductReservationMutation) ID ¶
func (m *ProductReservationMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProductReservationMutation) IDs ¶
func (m *ProductReservationMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProductReservationMutation) InvoiceCleared ¶
func (m *ProductReservationMutation) InvoiceCleared() bool
InvoiceCleared reports if the "invoice" edge to the Invoice entity was cleared.
func (*ProductReservationMutation) InvoiceID ¶
func (m *ProductReservationMutation) InvoiceID() (r int64, exists bool)
InvoiceID returns the value of the "invoice_id" field in the mutation.
func (*ProductReservationMutation) InvoiceIDs ¶
func (m *ProductReservationMutation) InvoiceIDs() (ids []int64)
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 (*ProductReservationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) OldExpirationTime ¶
func (m *ProductReservationMutation) OldExpirationTime(ctx context.Context) (v time.Time, err error)
OldExpirationTime returns the old "expiration_time" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) 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 (*ProductReservationMutation) OldInvoiceID ¶
func (m *ProductReservationMutation) OldInvoiceID(ctx context.Context) (v int64, err error)
OldInvoiceID returns the old "invoice_id" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) OldProductID ¶
func (m *ProductReservationMutation) OldProductID(ctx context.Context) (v int64, err error)
OldProductID returns the old "product_id" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) OldReservedQuantity ¶
func (m *ProductReservationMutation) OldReservedQuantity(ctx context.Context) (v int64, err error)
OldReservedQuantity returns the old "reserved_quantity" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) OldStatus ¶
func (m *ProductReservationMutation) OldStatus(ctx context.Context) (v enum.ReservationStatus, err error)
OldStatus returns the old "status" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) OldUserID ¶
func (m *ProductReservationMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the ProductReservation entity. If the ProductReservation 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 (*ProductReservationMutation) Op ¶
func (m *ProductReservationMutation) Op() Op
Op returns the operation name.
func (*ProductReservationMutation) ProductCleared ¶
func (m *ProductReservationMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the Product entity was cleared.
func (*ProductReservationMutation) ProductID ¶
func (m *ProductReservationMutation) ProductID() (r int64, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*ProductReservationMutation) ProductIDs ¶
func (m *ProductReservationMutation) ProductIDs() (ids []int64)
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 (*ProductReservationMutation) RemovedEdges ¶
func (m *ProductReservationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductReservationMutation) RemovedIDs ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) ReservedQuantity ¶
func (m *ProductReservationMutation) ReservedQuantity() (r int64, exists bool)
ReservedQuantity returns the value of the "reserved_quantity" field in the mutation.
func (*ProductReservationMutation) ResetCreatedAt ¶
func (m *ProductReservationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductReservationMutation) ResetEdge ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) ResetExpirationTime ¶
func (m *ProductReservationMutation) ResetExpirationTime()
ResetExpirationTime resets all changes to the "expiration_time" field.
func (*ProductReservationMutation) ResetField ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) ResetInvoice ¶
func (m *ProductReservationMutation) ResetInvoice()
ResetInvoice resets all changes to the "invoice" edge.
func (*ProductReservationMutation) ResetInvoiceID ¶
func (m *ProductReservationMutation) ResetInvoiceID()
ResetInvoiceID resets all changes to the "invoice_id" field.
func (*ProductReservationMutation) ResetProduct ¶
func (m *ProductReservationMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*ProductReservationMutation) ResetProductID ¶
func (m *ProductReservationMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*ProductReservationMutation) ResetReservedQuantity ¶
func (m *ProductReservationMutation) ResetReservedQuantity()
ResetReservedQuantity resets all changes to the "reserved_quantity" field.
func (*ProductReservationMutation) ResetStatus ¶
func (m *ProductReservationMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*ProductReservationMutation) ResetUpdatedAt ¶
func (m *ProductReservationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductReservationMutation) ResetUserID ¶
func (m *ProductReservationMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ProductReservationMutation) SetCreatedAt ¶
func (m *ProductReservationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductReservationMutation) SetExpirationTime ¶
func (m *ProductReservationMutation) SetExpirationTime(t time.Time)
SetExpirationTime sets the "expiration_time" field.
func (*ProductReservationMutation) SetField ¶
func (m *ProductReservationMutation) 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 (*ProductReservationMutation) SetID ¶
func (m *ProductReservationMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ProductReservation entities.
func (*ProductReservationMutation) SetInvoiceID ¶
func (m *ProductReservationMutation) SetInvoiceID(i int64)
SetInvoiceID sets the "invoice_id" field.
func (*ProductReservationMutation) SetOp ¶
func (m *ProductReservationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductReservationMutation) SetProductID ¶
func (m *ProductReservationMutation) SetProductID(i int64)
SetProductID sets the "product_id" field.
func (*ProductReservationMutation) SetReservedQuantity ¶
func (m *ProductReservationMutation) SetReservedQuantity(i int64)
SetReservedQuantity sets the "reserved_quantity" field.
func (*ProductReservationMutation) SetStatus ¶
func (m *ProductReservationMutation) SetStatus(es enum.ReservationStatus)
SetStatus sets the "status" field.
func (*ProductReservationMutation) SetUpdatedAt ¶
func (m *ProductReservationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ProductReservationMutation) SetUserID ¶
func (m *ProductReservationMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*ProductReservationMutation) Status ¶
func (m *ProductReservationMutation) Status() (r enum.ReservationStatus, exists bool)
Status returns the value of the "status" field in the mutation.
func (ProductReservationMutation) Tx ¶
func (m ProductReservationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductReservationMutation) Type ¶
func (m *ProductReservationMutation) Type() string
Type returns the node type of this mutation (ProductReservation).
func (*ProductReservationMutation) UpdatedAt ¶
func (m *ProductReservationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProductReservationMutation) UserID ¶
func (m *ProductReservationMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ProductReservationMutation) Where ¶
func (m *ProductReservationMutation) Where(ps ...predicate.ProductReservation)
Where appends a list predicates to the ProductReservationMutation builder.
func (*ProductReservationMutation) WhereP ¶
func (m *ProductReservationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductReservationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductReservationQuery ¶
type ProductReservationQuery struct {
// contains filtered or unexported fields
}
ProductReservationQuery is the builder for querying ProductReservation entities.
func (*ProductReservationQuery) Aggregate ¶
func (prq *ProductReservationQuery) Aggregate(fns ...AggregateFunc) *ProductReservationSelect
Aggregate returns a ProductReservationSelect configured with the given aggregations.
func (*ProductReservationQuery) All ¶
func (prq *ProductReservationQuery) All(ctx context.Context) ([]*ProductReservation, error)
All executes the query and returns a list of ProductReservations.
func (*ProductReservationQuery) AllX ¶
func (prq *ProductReservationQuery) AllX(ctx context.Context) []*ProductReservation
AllX is like All, but panics if an error occurs.
func (*ProductReservationQuery) Clone ¶
func (prq *ProductReservationQuery) Clone() *ProductReservationQuery
Clone returns a duplicate of the ProductReservationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductReservationQuery) Count ¶
func (prq *ProductReservationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductReservationQuery) CountX ¶
func (prq *ProductReservationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductReservationQuery) Exist ¶
func (prq *ProductReservationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductReservationQuery) ExistX ¶
func (prq *ProductReservationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductReservationQuery) Filter ¶
func (prq *ProductReservationQuery) Filter() *ProductReservationFilter
Filter returns a Filter implementation to apply filters on the ProductReservationQuery builder.
func (*ProductReservationQuery) First ¶
func (prq *ProductReservationQuery) First(ctx context.Context) (*ProductReservation, error)
First returns the first ProductReservation entity from the query. Returns a *NotFoundError when no ProductReservation was found.
func (*ProductReservationQuery) FirstID ¶
func (prq *ProductReservationQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first ProductReservation ID from the query. Returns a *NotFoundError when no ProductReservation ID was found.
func (*ProductReservationQuery) FirstIDX ¶
func (prq *ProductReservationQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductReservationQuery) FirstX ¶
func (prq *ProductReservationQuery) FirstX(ctx context.Context) *ProductReservation
FirstX is like First, but panics if an error occurs.
func (*ProductReservationQuery) GroupBy ¶
func (prq *ProductReservationQuery) GroupBy(field string, fields ...string) *ProductReservationGroupBy
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.ProductReservation.Query().
GroupBy(productreservation.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ProductReservationQuery) IDs ¶
func (prq *ProductReservationQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of ProductReservation IDs.
func (*ProductReservationQuery) IDsX ¶
func (prq *ProductReservationQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*ProductReservationQuery) Limit ¶
func (prq *ProductReservationQuery) Limit(limit int) *ProductReservationQuery
Limit the number of records to be returned by this query.
func (*ProductReservationQuery) Modify ¶
func (prq *ProductReservationQuery) Modify(modifiers ...func(s *sql.Selector)) *ProductReservationSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ProductReservationQuery) Offset ¶
func (prq *ProductReservationQuery) Offset(offset int) *ProductReservationQuery
Offset to start from.
func (*ProductReservationQuery) Only ¶
func (prq *ProductReservationQuery) Only(ctx context.Context) (*ProductReservation, error)
Only returns a single ProductReservation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductReservation entity is found. Returns a *NotFoundError when no ProductReservation entities are found.
func (*ProductReservationQuery) OnlyID ¶
func (prq *ProductReservationQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only ProductReservation ID in the query. Returns a *NotSingularError when more than one ProductReservation ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductReservationQuery) OnlyIDX ¶
func (prq *ProductReservationQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductReservationQuery) OnlyX ¶
func (prq *ProductReservationQuery) OnlyX(ctx context.Context) *ProductReservation
OnlyX is like Only, but panics if an error occurs.
func (*ProductReservationQuery) Order ¶
func (prq *ProductReservationQuery) Order(o ...productreservation.OrderOption) *ProductReservationQuery
Order specifies how the records should be ordered.
func (*ProductReservationQuery) QueryInvoice ¶
func (prq *ProductReservationQuery) QueryInvoice() *InvoiceQuery
QueryInvoice chains the current query on the "invoice" edge.
func (*ProductReservationQuery) QueryProduct ¶
func (prq *ProductReservationQuery) QueryProduct() *ProductQuery
QueryProduct chains the current query on the "product" edge.
func (*ProductReservationQuery) Select ¶
func (prq *ProductReservationQuery) Select(fields ...string) *ProductReservationSelect
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.ProductReservation.Query().
Select(productreservation.FieldCreatedAt).
Scan(ctx, &v)
func (*ProductReservationQuery) Unique ¶
func (prq *ProductReservationQuery) Unique(unique bool) *ProductReservationQuery
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 (*ProductReservationQuery) Where ¶
func (prq *ProductReservationQuery) Where(ps ...predicate.ProductReservation) *ProductReservationQuery
Where adds a new predicate for the ProductReservationQuery builder.
func (*ProductReservationQuery) WithInvoice ¶
func (prq *ProductReservationQuery) WithInvoice(opts ...func(*InvoiceQuery)) *ProductReservationQuery
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 (*ProductReservationQuery) WithProduct ¶
func (prq *ProductReservationQuery) WithProduct(opts ...func(*ProductQuery)) *ProductReservationQuery
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 ProductReservationSelect ¶
type ProductReservationSelect struct {
*ProductReservationQuery
// contains filtered or unexported fields
}
ProductReservationSelect is the builder for selecting fields of ProductReservation entities.
func (*ProductReservationSelect) Aggregate ¶
func (prs *ProductReservationSelect) Aggregate(fns ...AggregateFunc) *ProductReservationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductReservationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductReservationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductReservationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductReservationSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*ProductReservationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductReservationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ProductReservationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductReservationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductReservationSelect) Modify ¶
func (prs *ProductReservationSelect) Modify(modifiers ...func(s *sql.Selector)) *ProductReservationSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*ProductReservationSelect) Scan ¶
func (prs *ProductReservationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductReservationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductReservationUpdate ¶
type ProductReservationUpdate struct {
// contains filtered or unexported fields
}
ProductReservationUpdate is the builder for updating ProductReservation entities.
func (*ProductReservationUpdate) AddReservedQuantity ¶
func (pru *ProductReservationUpdate) AddReservedQuantity(i int64) *ProductReservationUpdate
AddReservedQuantity adds i to the "reserved_quantity" field.
func (*ProductReservationUpdate) Exec ¶
func (pru *ProductReservationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductReservationUpdate) ExecX ¶
func (pru *ProductReservationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationUpdate) Modify ¶
func (pru *ProductReservationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductReservationUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ProductReservationUpdate) Mutation ¶
func (pru *ProductReservationUpdate) Mutation() *ProductReservationMutation
Mutation returns the ProductReservationMutation object of the builder.
func (*ProductReservationUpdate) Save ¶
func (pru *ProductReservationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductReservationUpdate) SaveX ¶
func (pru *ProductReservationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductReservationUpdate) SetExpirationTime ¶
func (pru *ProductReservationUpdate) SetExpirationTime(t time.Time) *ProductReservationUpdate
SetExpirationTime sets the "expiration_time" field.
func (*ProductReservationUpdate) SetNillableExpirationTime ¶
func (pru *ProductReservationUpdate) SetNillableExpirationTime(t *time.Time) *ProductReservationUpdate
SetNillableExpirationTime sets the "expiration_time" field if the given value is not nil.
func (*ProductReservationUpdate) SetNillableReservedQuantity ¶
func (pru *ProductReservationUpdate) SetNillableReservedQuantity(i *int64) *ProductReservationUpdate
SetNillableReservedQuantity sets the "reserved_quantity" field if the given value is not nil.
func (*ProductReservationUpdate) SetNillableStatus ¶
func (pru *ProductReservationUpdate) SetNillableStatus(es *enum.ReservationStatus) *ProductReservationUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ProductReservationUpdate) SetReservedQuantity ¶
func (pru *ProductReservationUpdate) SetReservedQuantity(i int64) *ProductReservationUpdate
SetReservedQuantity sets the "reserved_quantity" field.
func (*ProductReservationUpdate) SetStatus ¶
func (pru *ProductReservationUpdate) SetStatus(es enum.ReservationStatus) *ProductReservationUpdate
SetStatus sets the "status" field.
func (*ProductReservationUpdate) SetUpdatedAt ¶
func (pru *ProductReservationUpdate) SetUpdatedAt(t time.Time) *ProductReservationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProductReservationUpdate) Where ¶
func (pru *ProductReservationUpdate) Where(ps ...predicate.ProductReservation) *ProductReservationUpdate
Where appends a list predicates to the ProductReservationUpdate builder.
type ProductReservationUpdateOne ¶
type ProductReservationUpdateOne struct {
// contains filtered or unexported fields
}
ProductReservationUpdateOne is the builder for updating a single ProductReservation entity.
func (*ProductReservationUpdateOne) AddReservedQuantity ¶
func (pruo *ProductReservationUpdateOne) AddReservedQuantity(i int64) *ProductReservationUpdateOne
AddReservedQuantity adds i to the "reserved_quantity" field.
func (*ProductReservationUpdateOne) Exec ¶
func (pruo *ProductReservationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductReservationUpdateOne) ExecX ¶
func (pruo *ProductReservationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationUpdateOne) Modify ¶
func (pruo *ProductReservationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductReservationUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ProductReservationUpdateOne) Mutation ¶
func (pruo *ProductReservationUpdateOne) Mutation() *ProductReservationMutation
Mutation returns the ProductReservationMutation object of the builder.
func (*ProductReservationUpdateOne) Save ¶
func (pruo *ProductReservationUpdateOne) Save(ctx context.Context) (*ProductReservation, error)
Save executes the query and returns the updated ProductReservation entity.
func (*ProductReservationUpdateOne) SaveX ¶
func (pruo *ProductReservationUpdateOne) SaveX(ctx context.Context) *ProductReservation
SaveX is like Save, but panics if an error occurs.
func (*ProductReservationUpdateOne) Select ¶
func (pruo *ProductReservationUpdateOne) Select(field string, fields ...string) *ProductReservationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductReservationUpdateOne) SetExpirationTime ¶
func (pruo *ProductReservationUpdateOne) SetExpirationTime(t time.Time) *ProductReservationUpdateOne
SetExpirationTime sets the "expiration_time" field.
func (*ProductReservationUpdateOne) SetNillableExpirationTime ¶
func (pruo *ProductReservationUpdateOne) SetNillableExpirationTime(t *time.Time) *ProductReservationUpdateOne
SetNillableExpirationTime sets the "expiration_time" field if the given value is not nil.
func (*ProductReservationUpdateOne) SetNillableReservedQuantity ¶
func (pruo *ProductReservationUpdateOne) SetNillableReservedQuantity(i *int64) *ProductReservationUpdateOne
SetNillableReservedQuantity sets the "reserved_quantity" field if the given value is not nil.
func (*ProductReservationUpdateOne) SetNillableStatus ¶
func (pruo *ProductReservationUpdateOne) SetNillableStatus(es *enum.ReservationStatus) *ProductReservationUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ProductReservationUpdateOne) SetReservedQuantity ¶
func (pruo *ProductReservationUpdateOne) SetReservedQuantity(i int64) *ProductReservationUpdateOne
SetReservedQuantity sets the "reserved_quantity" field.
func (*ProductReservationUpdateOne) SetStatus ¶
func (pruo *ProductReservationUpdateOne) SetStatus(es enum.ReservationStatus) *ProductReservationUpdateOne
SetStatus sets the "status" field.
func (*ProductReservationUpdateOne) SetUpdatedAt ¶
func (pruo *ProductReservationUpdateOne) SetUpdatedAt(t time.Time) *ProductReservationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductReservationUpdateOne) Where ¶
func (pruo *ProductReservationUpdateOne) Where(ps ...predicate.ProductReservation) *ProductReservationUpdateOne
Where appends a list predicates to the ProductReservationUpdate builder.
type ProductReservationUpsert ¶
ProductReservationUpsert is the "OnConflict" setter.
func (*ProductReservationUpsert) AddReservedQuantity ¶
func (u *ProductReservationUpsert) AddReservedQuantity(v int64) *ProductReservationUpsert
AddReservedQuantity adds v to the "reserved_quantity" field.
func (*ProductReservationUpsert) SetExpirationTime ¶
func (u *ProductReservationUpsert) SetExpirationTime(v time.Time) *ProductReservationUpsert
SetExpirationTime sets the "expiration_time" field.
func (*ProductReservationUpsert) SetReservedQuantity ¶
func (u *ProductReservationUpsert) SetReservedQuantity(v int64) *ProductReservationUpsert
SetReservedQuantity sets the "reserved_quantity" field.
func (*ProductReservationUpsert) SetStatus ¶
func (u *ProductReservationUpsert) SetStatus(v enum.ReservationStatus) *ProductReservationUpsert
SetStatus sets the "status" field.
func (*ProductReservationUpsert) SetUpdatedAt ¶
func (u *ProductReservationUpsert) SetUpdatedAt(v time.Time) *ProductReservationUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ProductReservationUpsert) UpdateExpirationTime ¶
func (u *ProductReservationUpsert) UpdateExpirationTime() *ProductReservationUpsert
UpdateExpirationTime sets the "expiration_time" field to the value that was provided on create.
func (*ProductReservationUpsert) UpdateReservedQuantity ¶
func (u *ProductReservationUpsert) UpdateReservedQuantity() *ProductReservationUpsert
UpdateReservedQuantity sets the "reserved_quantity" field to the value that was provided on create.
func (*ProductReservationUpsert) UpdateStatus ¶
func (u *ProductReservationUpsert) UpdateStatus() *ProductReservationUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*ProductReservationUpsert) UpdateUpdatedAt ¶
func (u *ProductReservationUpsert) UpdateUpdatedAt() *ProductReservationUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ProductReservationUpsertBulk ¶
type ProductReservationUpsertBulk struct {
// contains filtered or unexported fields
}
ProductReservationUpsertBulk is the builder for "upsert"-ing a bulk of ProductReservation nodes.
func (*ProductReservationUpsertBulk) AddReservedQuantity ¶
func (u *ProductReservationUpsertBulk) AddReservedQuantity(v int64) *ProductReservationUpsertBulk
AddReservedQuantity adds v to the "reserved_quantity" field.
func (*ProductReservationUpsertBulk) DoNothing ¶
func (u *ProductReservationUpsertBulk) DoNothing() *ProductReservationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProductReservationUpsertBulk) Exec ¶
func (u *ProductReservationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductReservationUpsertBulk) ExecX ¶
func (u *ProductReservationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationUpsertBulk) Ignore ¶
func (u *ProductReservationUpsertBulk) Ignore() *ProductReservationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.ProductReservation.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ProductReservationUpsertBulk) SetExpirationTime ¶
func (u *ProductReservationUpsertBulk) SetExpirationTime(v time.Time) *ProductReservationUpsertBulk
SetExpirationTime sets the "expiration_time" field.
func (*ProductReservationUpsertBulk) SetReservedQuantity ¶
func (u *ProductReservationUpsertBulk) SetReservedQuantity(v int64) *ProductReservationUpsertBulk
SetReservedQuantity sets the "reserved_quantity" field.
func (*ProductReservationUpsertBulk) SetStatus ¶
func (u *ProductReservationUpsertBulk) SetStatus(v enum.ReservationStatus) *ProductReservationUpsertBulk
SetStatus sets the "status" field.
func (*ProductReservationUpsertBulk) SetUpdatedAt ¶
func (u *ProductReservationUpsertBulk) SetUpdatedAt(v time.Time) *ProductReservationUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ProductReservationUpsertBulk) Update ¶
func (u *ProductReservationUpsertBulk) Update(set func(*ProductReservationUpsert)) *ProductReservationUpsertBulk
Update allows overriding fields `UPDATE` values. See the ProductReservationCreateBulk.OnConflict documentation for more info.
func (*ProductReservationUpsertBulk) UpdateExpirationTime ¶
func (u *ProductReservationUpsertBulk) UpdateExpirationTime() *ProductReservationUpsertBulk
UpdateExpirationTime sets the "expiration_time" field to the value that was provided on create.
func (*ProductReservationUpsertBulk) UpdateNewValues ¶
func (u *ProductReservationUpsertBulk) UpdateNewValues() *ProductReservationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.ProductReservation.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(productreservation.FieldID)
}),
).
Exec(ctx)
func (*ProductReservationUpsertBulk) UpdateReservedQuantity ¶
func (u *ProductReservationUpsertBulk) UpdateReservedQuantity() *ProductReservationUpsertBulk
UpdateReservedQuantity sets the "reserved_quantity" field to the value that was provided on create.
func (*ProductReservationUpsertBulk) UpdateStatus ¶
func (u *ProductReservationUpsertBulk) UpdateStatus() *ProductReservationUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*ProductReservationUpsertBulk) UpdateUpdatedAt ¶
func (u *ProductReservationUpsertBulk) UpdateUpdatedAt() *ProductReservationUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ProductReservationUpsertOne ¶
type ProductReservationUpsertOne struct {
// contains filtered or unexported fields
}
ProductReservationUpsertOne is the builder for "upsert"-ing
one ProductReservation node.
func (*ProductReservationUpsertOne) AddReservedQuantity ¶
func (u *ProductReservationUpsertOne) AddReservedQuantity(v int64) *ProductReservationUpsertOne
AddReservedQuantity adds v to the "reserved_quantity" field.
func (*ProductReservationUpsertOne) DoNothing ¶
func (u *ProductReservationUpsertOne) DoNothing() *ProductReservationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProductReservationUpsertOne) Exec ¶
func (u *ProductReservationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductReservationUpsertOne) ExecX ¶
func (u *ProductReservationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductReservationUpsertOne) ID ¶
func (u *ProductReservationUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ProductReservationUpsertOne) IDX ¶
func (u *ProductReservationUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*ProductReservationUpsertOne) Ignore ¶
func (u *ProductReservationUpsertOne) Ignore() *ProductReservationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.ProductReservation.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ProductReservationUpsertOne) SetExpirationTime ¶
func (u *ProductReservationUpsertOne) SetExpirationTime(v time.Time) *ProductReservationUpsertOne
SetExpirationTime sets the "expiration_time" field.
func (*ProductReservationUpsertOne) SetReservedQuantity ¶
func (u *ProductReservationUpsertOne) SetReservedQuantity(v int64) *ProductReservationUpsertOne
SetReservedQuantity sets the "reserved_quantity" field.
func (*ProductReservationUpsertOne) SetStatus ¶
func (u *ProductReservationUpsertOne) SetStatus(v enum.ReservationStatus) *ProductReservationUpsertOne
SetStatus sets the "status" field.
func (*ProductReservationUpsertOne) SetUpdatedAt ¶
func (u *ProductReservationUpsertOne) SetUpdatedAt(v time.Time) *ProductReservationUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductReservationUpsertOne) Update ¶
func (u *ProductReservationUpsertOne) Update(set func(*ProductReservationUpsert)) *ProductReservationUpsertOne
Update allows overriding fields `UPDATE` values. See the ProductReservationCreate.OnConflict documentation for more info.
func (*ProductReservationUpsertOne) UpdateExpirationTime ¶
func (u *ProductReservationUpsertOne) UpdateExpirationTime() *ProductReservationUpsertOne
UpdateExpirationTime sets the "expiration_time" field to the value that was provided on create.
func (*ProductReservationUpsertOne) UpdateNewValues ¶
func (u *ProductReservationUpsertOne) UpdateNewValues() *ProductReservationUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.ProductReservation.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(productreservation.FieldID)
}),
).
Exec(ctx)
func (*ProductReservationUpsertOne) UpdateReservedQuantity ¶
func (u *ProductReservationUpsertOne) UpdateReservedQuantity() *ProductReservationUpsertOne
UpdateReservedQuantity sets the "reserved_quantity" field to the value that was provided on create.
func (*ProductReservationUpsertOne) UpdateStatus ¶
func (u *ProductReservationUpsertOne) UpdateStatus() *ProductReservationUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*ProductReservationUpsertOne) UpdateUpdatedAt ¶
func (u *ProductReservationUpsertOne) UpdateUpdatedAt() *ProductReservationUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ProductReservations ¶
type ProductReservations []*ProductReservation
ProductReservations is a parsable slice of ProductReservation.
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) Modify ¶
func (ps *ProductSelect) Modify(modifiers ...func(s *sql.Selector)) *ProductSelect
Modify adds a query modifier for attaching custom logic to queries.
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 ProductUpdate ¶
type ProductUpdate struct {
// contains filtered or unexported fields
}
ProductUpdate is the builder for updating Product entities.
func (*ProductUpdate) AddBundleIDs ¶
func (pu *ProductUpdate) AddBundleIDs(ids ...int64) *ProductUpdate
AddBundleIDs adds the "bundles" edge to the Bundle entity by IDs.
func (*ProductUpdate) AddBundles ¶
func (pu *ProductUpdate) AddBundles(b ...*Bundle) *ProductUpdate
AddBundles adds the "bundles" edges to the Bundle entity.
func (*ProductUpdate) AddInvoiceIDs ¶
func (pu *ProductUpdate) AddInvoiceIDs(ids ...int64) *ProductUpdate
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*ProductUpdate) AddInvoices ¶
func (pu *ProductUpdate) AddInvoices(i ...*Invoice) *ProductUpdate
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*ProductUpdate) AddLeft ¶
func (pu *ProductUpdate) AddLeft(i int64) *ProductUpdate
AddLeft adds i to the "left" field.
func (*ProductUpdate) AddPrice ¶
func (pu *ProductUpdate) AddPrice(d decimal.Decimal) *ProductUpdate
AddPrice adds d to the "price" field.
func (*ProductUpdate) AddReservationIDs ¶
func (pu *ProductUpdate) AddReservationIDs(ids ...int64) *ProductUpdate
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by IDs.
func (*ProductUpdate) AddReservations ¶
func (pu *ProductUpdate) AddReservations(p ...*ProductReservation) *ProductUpdate
AddReservations adds the "reservations" edges to the ProductReservation entity.
func (*ProductUpdate) AddSubscriptionIDs ¶
func (pu *ProductUpdate) AddSubscriptionIDs(ids ...int64) *ProductUpdate
AddSubscriptionIDs adds the "subscriptions" edge to the Subscriptions entity by IDs.
func (*ProductUpdate) AddSubscriptions ¶
func (pu *ProductUpdate) AddSubscriptions(s ...*Subscriptions) *ProductUpdate
AddSubscriptions adds the "subscriptions" edges to the Subscriptions entity.
func (*ProductUpdate) AddUniqueLimit ¶
func (pu *ProductUpdate) AddUniqueLimit(i int64) *ProductUpdate
AddUniqueLimit adds i to the "unique_limit" field.
func (*ProductUpdate) ClearBundles ¶
func (pu *ProductUpdate) ClearBundles() *ProductUpdate
ClearBundles clears all "bundles" edges to the Bundle entity.
func (*ProductUpdate) ClearDeletedAt ¶
func (pu *ProductUpdate) ClearDeletedAt() *ProductUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ProductUpdate) ClearExpiringTime ¶
func (pu *ProductUpdate) ClearExpiringTime() *ProductUpdate
ClearExpiringTime clears the value of the "expiring_time" field.
func (*ProductUpdate) ClearInvoices ¶
func (pu *ProductUpdate) ClearInvoices() *ProductUpdate
ClearInvoices clears all "invoices" edges to the Invoice entity.
func (*ProductUpdate) ClearIsExpiring ¶
func (pu *ProductUpdate) ClearIsExpiring() *ProductUpdate
ClearIsExpiring clears the value of the "is_expiring" field.
func (*ProductUpdate) ClearIsUnique ¶
func (pu *ProductUpdate) ClearIsUnique() *ProductUpdate
ClearIsUnique clears the value of the "is_unique" field.
func (*ProductUpdate) ClearLimitedTill ¶
func (pu *ProductUpdate) ClearLimitedTill() *ProductUpdate
ClearLimitedTill clears the value of the "limited_till" field.
func (*ProductUpdate) ClearReservations ¶
func (pu *ProductUpdate) ClearReservations() *ProductUpdate
ClearReservations clears all "reservations" edges to the ProductReservation entity.
func (*ProductUpdate) ClearSubscriptions ¶
func (pu *ProductUpdate) ClearSubscriptions() *ProductUpdate
ClearSubscriptions clears all "subscriptions" edges to the Subscriptions entity.
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) Modify ¶
func (pu *ProductUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ProductUpdate) Mutation ¶
func (pu *ProductUpdate) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdate) RemoveBundleIDs ¶
func (pu *ProductUpdate) RemoveBundleIDs(ids ...int64) *ProductUpdate
RemoveBundleIDs removes the "bundles" edge to Bundle entities by IDs.
func (*ProductUpdate) RemoveBundles ¶
func (pu *ProductUpdate) RemoveBundles(b ...*Bundle) *ProductUpdate
RemoveBundles removes "bundles" edges to Bundle entities.
func (*ProductUpdate) RemoveInvoiceIDs ¶
func (pu *ProductUpdate) RemoveInvoiceIDs(ids ...int64) *ProductUpdate
RemoveInvoiceIDs removes the "invoices" edge to Invoice entities by IDs.
func (*ProductUpdate) RemoveInvoices ¶
func (pu *ProductUpdate) RemoveInvoices(i ...*Invoice) *ProductUpdate
RemoveInvoices removes "invoices" edges to Invoice entities.
func (*ProductUpdate) RemoveReservationIDs ¶
func (pu *ProductUpdate) RemoveReservationIDs(ids ...int64) *ProductUpdate
RemoveReservationIDs removes the "reservations" edge to ProductReservation entities by IDs.
func (*ProductUpdate) RemoveReservations ¶
func (pu *ProductUpdate) RemoveReservations(p ...*ProductReservation) *ProductUpdate
RemoveReservations removes "reservations" edges to ProductReservation entities.
func (*ProductUpdate) RemoveSubscriptionIDs ¶
func (pu *ProductUpdate) RemoveSubscriptionIDs(ids ...int64) *ProductUpdate
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscriptions entities by IDs.
func (*ProductUpdate) RemoveSubscriptions ¶
func (pu *ProductUpdate) RemoveSubscriptions(s ...*Subscriptions) *ProductUpdate
RemoveSubscriptions removes "subscriptions" edges to Subscriptions 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) SetAppID ¶
func (pu *ProductUpdate) SetAppID(s string) *ProductUpdate
SetAppID sets the "app_id" field.
func (*ProductUpdate) SetCurrency ¶
func (pu *ProductUpdate) SetCurrency(s string) *ProductUpdate
SetCurrency sets the "currency" field.
func (*ProductUpdate) SetDeletedAt ¶
func (pu *ProductUpdate) SetDeletedAt(t time.Time) *ProductUpdate
SetDeletedAt sets the "deleted_at" field.
func (*ProductUpdate) SetDescription ¶
func (pu *ProductUpdate) SetDescription(s string) *ProductUpdate
SetDescription sets the "description" field.
func (*ProductUpdate) SetExpiringTime ¶
func (pu *ProductUpdate) SetExpiringTime(t time.Time) *ProductUpdate
SetExpiringTime sets the "expiring_time" field.
func (*ProductUpdate) SetIsActive ¶
func (pu *ProductUpdate) SetIsActive(b bool) *ProductUpdate
SetIsActive sets the "is_active" field.
func (*ProductUpdate) SetIsExpiring ¶
func (pu *ProductUpdate) SetIsExpiring(b bool) *ProductUpdate
SetIsExpiring sets the "is_expiring" field.
func (*ProductUpdate) SetIsLimited ¶
func (pu *ProductUpdate) SetIsLimited(b bool) *ProductUpdate
SetIsLimited sets the "is_limited" field.
func (*ProductUpdate) SetIsUnique ¶
func (pu *ProductUpdate) SetIsUnique(b bool) *ProductUpdate
SetIsUnique sets the "is_unique" field.
func (*ProductUpdate) SetLeft ¶
func (pu *ProductUpdate) SetLeft(i int64) *ProductUpdate
SetLeft sets the "left" field.
func (*ProductUpdate) SetLimitedTill ¶
func (pu *ProductUpdate) SetLimitedTill(t time.Time) *ProductUpdate
SetLimitedTill sets the "limited_till" field.
func (*ProductUpdate) SetName ¶
func (pu *ProductUpdate) SetName(s string) *ProductUpdate
SetName sets the "name" field.
func (*ProductUpdate) SetNillableAppID ¶
func (pu *ProductUpdate) SetNillableAppID(s *string) *ProductUpdate
SetNillableAppID sets the "app_id" field if the given value is not nil.
func (*ProductUpdate) SetNillableCurrency ¶
func (pu *ProductUpdate) SetNillableCurrency(s *string) *ProductUpdate
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*ProductUpdate) SetNillableDeletedAt ¶
func (pu *ProductUpdate) SetNillableDeletedAt(t *time.Time) *ProductUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ProductUpdate) SetNillableDescription ¶
func (pu *ProductUpdate) SetNillableDescription(s *string) *ProductUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductUpdate) SetNillableExpiringTime ¶
func (pu *ProductUpdate) SetNillableExpiringTime(t *time.Time) *ProductUpdate
SetNillableExpiringTime sets the "expiring_time" field if the given value is not nil.
func (*ProductUpdate) SetNillableIsActive ¶
func (pu *ProductUpdate) SetNillableIsActive(b *bool) *ProductUpdate
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*ProductUpdate) SetNillableIsExpiring ¶
func (pu *ProductUpdate) SetNillableIsExpiring(b *bool) *ProductUpdate
SetNillableIsExpiring sets the "is_expiring" field if the given value is not nil.
func (*ProductUpdate) SetNillableIsLimited ¶
func (pu *ProductUpdate) SetNillableIsLimited(b *bool) *ProductUpdate
SetNillableIsLimited sets the "is_limited" field if the given value is not nil.
func (*ProductUpdate) SetNillableIsUnique ¶
func (pu *ProductUpdate) SetNillableIsUnique(b *bool) *ProductUpdate
SetNillableIsUnique sets the "is_unique" field if the given value is not nil.
func (*ProductUpdate) SetNillableLeft ¶
func (pu *ProductUpdate) SetNillableLeft(i *int64) *ProductUpdate
SetNillableLeft sets the "left" field if the given value is not nil.
func (*ProductUpdate) SetNillableLimitedTill ¶
func (pu *ProductUpdate) SetNillableLimitedTill(t *time.Time) *ProductUpdate
SetNillableLimitedTill sets the "limited_till" 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) SetNillablePaymentModel ¶
func (pu *ProductUpdate) SetNillablePaymentModel(em *enum.PaymentModel) *ProductUpdate
SetNillablePaymentModel sets the "payment_model" 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) SetNillableProductPeriod ¶
func (pu *ProductUpdate) SetNillableProductPeriod(ep *enum.ProductPeriod) *ProductUpdate
SetNillableProductPeriod sets the "product_period" field if the given value is not nil.
func (*ProductUpdate) SetNillableUniqueLimit ¶
func (pu *ProductUpdate) SetNillableUniqueLimit(i *int64) *ProductUpdate
SetNillableUniqueLimit sets the "unique_limit" field if the given value is not nil.
func (*ProductUpdate) SetPaymentModel ¶
func (pu *ProductUpdate) SetPaymentModel(em enum.PaymentModel) *ProductUpdate
SetPaymentModel sets the "payment_model" field.
func (*ProductUpdate) SetPrice ¶
func (pu *ProductUpdate) SetPrice(d decimal.Decimal) *ProductUpdate
SetPrice sets the "price" field.
func (*ProductUpdate) SetProductPeriod ¶
func (pu *ProductUpdate) SetProductPeriod(ep enum.ProductPeriod) *ProductUpdate
SetProductPeriod sets the "product_period" field.
func (*ProductUpdate) SetUniqueLimit ¶
func (pu *ProductUpdate) SetUniqueLimit(i int64) *ProductUpdate
SetUniqueLimit sets the "unique_limit" field.
func (*ProductUpdate) SetUpdatedAt ¶
func (pu *ProductUpdate) SetUpdatedAt(t time.Time) *ProductUpdate
SetUpdatedAt sets the "updated_at" 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) AddBundleIDs ¶
func (puo *ProductUpdateOne) AddBundleIDs(ids ...int64) *ProductUpdateOne
AddBundleIDs adds the "bundles" edge to the Bundle entity by IDs.
func (*ProductUpdateOne) AddBundles ¶
func (puo *ProductUpdateOne) AddBundles(b ...*Bundle) *ProductUpdateOne
AddBundles adds the "bundles" edges to the Bundle entity.
func (*ProductUpdateOne) AddInvoiceIDs ¶
func (puo *ProductUpdateOne) AddInvoiceIDs(ids ...int64) *ProductUpdateOne
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*ProductUpdateOne) AddInvoices ¶
func (puo *ProductUpdateOne) AddInvoices(i ...*Invoice) *ProductUpdateOne
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*ProductUpdateOne) AddLeft ¶
func (puo *ProductUpdateOne) AddLeft(i int64) *ProductUpdateOne
AddLeft adds i to the "left" field.
func (*ProductUpdateOne) AddPrice ¶
func (puo *ProductUpdateOne) AddPrice(d decimal.Decimal) *ProductUpdateOne
AddPrice adds d to the "price" field.
func (*ProductUpdateOne) AddReservationIDs ¶
func (puo *ProductUpdateOne) AddReservationIDs(ids ...int64) *ProductUpdateOne
AddReservationIDs adds the "reservations" edge to the ProductReservation entity by IDs.
func (*ProductUpdateOne) AddReservations ¶
func (puo *ProductUpdateOne) AddReservations(p ...*ProductReservation) *ProductUpdateOne
AddReservations adds the "reservations" edges to the ProductReservation entity.
func (*ProductUpdateOne) AddSubscriptionIDs ¶
func (puo *ProductUpdateOne) AddSubscriptionIDs(ids ...int64) *ProductUpdateOne
AddSubscriptionIDs adds the "subscriptions" edge to the Subscriptions entity by IDs.
func (*ProductUpdateOne) AddSubscriptions ¶
func (puo *ProductUpdateOne) AddSubscriptions(s ...*Subscriptions) *ProductUpdateOne
AddSubscriptions adds the "subscriptions" edges to the Subscriptions entity.
func (*ProductUpdateOne) AddUniqueLimit ¶
func (puo *ProductUpdateOne) AddUniqueLimit(i int64) *ProductUpdateOne
AddUniqueLimit adds i to the "unique_limit" field.
func (*ProductUpdateOne) ClearBundles ¶
func (puo *ProductUpdateOne) ClearBundles() *ProductUpdateOne
ClearBundles clears all "bundles" edges to the Bundle entity.
func (*ProductUpdateOne) ClearDeletedAt ¶
func (puo *ProductUpdateOne) ClearDeletedAt() *ProductUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ProductUpdateOne) ClearExpiringTime ¶
func (puo *ProductUpdateOne) ClearExpiringTime() *ProductUpdateOne
ClearExpiringTime clears the value of the "expiring_time" field.
func (*ProductUpdateOne) ClearInvoices ¶
func (puo *ProductUpdateOne) ClearInvoices() *ProductUpdateOne
ClearInvoices clears all "invoices" edges to the Invoice entity.
func (*ProductUpdateOne) ClearIsExpiring ¶
func (puo *ProductUpdateOne) ClearIsExpiring() *ProductUpdateOne
ClearIsExpiring clears the value of the "is_expiring" field.
func (*ProductUpdateOne) ClearIsUnique ¶
func (puo *ProductUpdateOne) ClearIsUnique() *ProductUpdateOne
ClearIsUnique clears the value of the "is_unique" field.
func (*ProductUpdateOne) ClearLimitedTill ¶
func (puo *ProductUpdateOne) ClearLimitedTill() *ProductUpdateOne
ClearLimitedTill clears the value of the "limited_till" field.
func (*ProductUpdateOne) ClearReservations ¶
func (puo *ProductUpdateOne) ClearReservations() *ProductUpdateOne
ClearReservations clears all "reservations" edges to the ProductReservation entity.
func (*ProductUpdateOne) ClearSubscriptions ¶
func (puo *ProductUpdateOne) ClearSubscriptions() *ProductUpdateOne
ClearSubscriptions clears all "subscriptions" edges to the Subscriptions entity.
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) Modify ¶
func (puo *ProductUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ProductUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*ProductUpdateOne) Mutation ¶
func (puo *ProductUpdateOne) Mutation() *ProductMutation
Mutation returns the ProductMutation object of the builder.
func (*ProductUpdateOne) RemoveBundleIDs ¶
func (puo *ProductUpdateOne) RemoveBundleIDs(ids ...int64) *ProductUpdateOne
RemoveBundleIDs removes the "bundles" edge to Bundle entities by IDs.
func (*ProductUpdateOne) RemoveBundles ¶
func (puo *ProductUpdateOne) RemoveBundles(b ...*Bundle) *ProductUpdateOne
RemoveBundles removes "bundles" edges to Bundle entities.
func (*ProductUpdateOne) RemoveInvoiceIDs ¶
func (puo *ProductUpdateOne) RemoveInvoiceIDs(ids ...int64) *ProductUpdateOne
RemoveInvoiceIDs removes the "invoices" edge to Invoice entities by IDs.
func (*ProductUpdateOne) RemoveInvoices ¶
func (puo *ProductUpdateOne) RemoveInvoices(i ...*Invoice) *ProductUpdateOne
RemoveInvoices removes "invoices" edges to Invoice entities.
func (*ProductUpdateOne) RemoveReservationIDs ¶
func (puo *ProductUpdateOne) RemoveReservationIDs(ids ...int64) *ProductUpdateOne
RemoveReservationIDs removes the "reservations" edge to ProductReservation entities by IDs.
func (*ProductUpdateOne) RemoveReservations ¶
func (puo *ProductUpdateOne) RemoveReservations(p ...*ProductReservation) *ProductUpdateOne
RemoveReservations removes "reservations" edges to ProductReservation entities.
func (*ProductUpdateOne) RemoveSubscriptionIDs ¶
func (puo *ProductUpdateOne) RemoveSubscriptionIDs(ids ...int64) *ProductUpdateOne
RemoveSubscriptionIDs removes the "subscriptions" edge to Subscriptions entities by IDs.
func (*ProductUpdateOne) RemoveSubscriptions ¶
func (puo *ProductUpdateOne) RemoveSubscriptions(s ...*Subscriptions) *ProductUpdateOne
RemoveSubscriptions removes "subscriptions" edges to Subscriptions 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) SetAppID ¶
func (puo *ProductUpdateOne) SetAppID(s string) *ProductUpdateOne
SetAppID sets the "app_id" field.
func (*ProductUpdateOne) SetCurrency ¶
func (puo *ProductUpdateOne) SetCurrency(s string) *ProductUpdateOne
SetCurrency sets the "currency" field.
func (*ProductUpdateOne) SetDeletedAt ¶
func (puo *ProductUpdateOne) SetDeletedAt(t time.Time) *ProductUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*ProductUpdateOne) SetDescription ¶
func (puo *ProductUpdateOne) SetDescription(s string) *ProductUpdateOne
SetDescription sets the "description" field.
func (*ProductUpdateOne) SetExpiringTime ¶
func (puo *ProductUpdateOne) SetExpiringTime(t time.Time) *ProductUpdateOne
SetExpiringTime sets the "expiring_time" field.
func (*ProductUpdateOne) SetIsActive ¶
func (puo *ProductUpdateOne) SetIsActive(b bool) *ProductUpdateOne
SetIsActive sets the "is_active" field.
func (*ProductUpdateOne) SetIsExpiring ¶
func (puo *ProductUpdateOne) SetIsExpiring(b bool) *ProductUpdateOne
SetIsExpiring sets the "is_expiring" field.
func (*ProductUpdateOne) SetIsLimited ¶
func (puo *ProductUpdateOne) SetIsLimited(b bool) *ProductUpdateOne
SetIsLimited sets the "is_limited" field.
func (*ProductUpdateOne) SetIsUnique ¶
func (puo *ProductUpdateOne) SetIsUnique(b bool) *ProductUpdateOne
SetIsUnique sets the "is_unique" field.
func (*ProductUpdateOne) SetLeft ¶
func (puo *ProductUpdateOne) SetLeft(i int64) *ProductUpdateOne
SetLeft sets the "left" field.
func (*ProductUpdateOne) SetLimitedTill ¶
func (puo *ProductUpdateOne) SetLimitedTill(t time.Time) *ProductUpdateOne
SetLimitedTill sets the "limited_till" field.
func (*ProductUpdateOne) SetName ¶
func (puo *ProductUpdateOne) SetName(s string) *ProductUpdateOne
SetName sets the "name" field.
func (*ProductUpdateOne) SetNillableAppID ¶
func (puo *ProductUpdateOne) SetNillableAppID(s *string) *ProductUpdateOne
SetNillableAppID sets the "app_id" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableCurrency ¶
func (puo *ProductUpdateOne) SetNillableCurrency(s *string) *ProductUpdateOne
SetNillableCurrency sets the "currency" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableDeletedAt ¶
func (puo *ProductUpdateOne) SetNillableDeletedAt(t *time.Time) *ProductUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableDescription ¶
func (puo *ProductUpdateOne) SetNillableDescription(s *string) *ProductUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableExpiringTime ¶
func (puo *ProductUpdateOne) SetNillableExpiringTime(t *time.Time) *ProductUpdateOne
SetNillableExpiringTime sets the "expiring_time" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableIsActive ¶
func (puo *ProductUpdateOne) SetNillableIsActive(b *bool) *ProductUpdateOne
SetNillableIsActive sets the "is_active" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableIsExpiring ¶
func (puo *ProductUpdateOne) SetNillableIsExpiring(b *bool) *ProductUpdateOne
SetNillableIsExpiring sets the "is_expiring" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableIsLimited ¶
func (puo *ProductUpdateOne) SetNillableIsLimited(b *bool) *ProductUpdateOne
SetNillableIsLimited sets the "is_limited" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableIsUnique ¶
func (puo *ProductUpdateOne) SetNillableIsUnique(b *bool) *ProductUpdateOne
SetNillableIsUnique sets the "is_unique" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableLeft ¶
func (puo *ProductUpdateOne) SetNillableLeft(i *int64) *ProductUpdateOne
SetNillableLeft sets the "left" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableLimitedTill ¶
func (puo *ProductUpdateOne) SetNillableLimitedTill(t *time.Time) *ProductUpdateOne
SetNillableLimitedTill sets the "limited_till" 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) SetNillablePaymentModel ¶
func (puo *ProductUpdateOne) SetNillablePaymentModel(em *enum.PaymentModel) *ProductUpdateOne
SetNillablePaymentModel sets the "payment_model" 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) SetNillableProductPeriod ¶
func (puo *ProductUpdateOne) SetNillableProductPeriod(ep *enum.ProductPeriod) *ProductUpdateOne
SetNillableProductPeriod sets the "product_period" field if the given value is not nil.
func (*ProductUpdateOne) SetNillableUniqueLimit ¶
func (puo *ProductUpdateOne) SetNillableUniqueLimit(i *int64) *ProductUpdateOne
SetNillableUniqueLimit sets the "unique_limit" field if the given value is not nil.
func (*ProductUpdateOne) SetPaymentModel ¶
func (puo *ProductUpdateOne) SetPaymentModel(em enum.PaymentModel) *ProductUpdateOne
SetPaymentModel sets the "payment_model" field.
func (*ProductUpdateOne) SetPrice ¶
func (puo *ProductUpdateOne) SetPrice(d decimal.Decimal) *ProductUpdateOne
SetPrice sets the "price" field.
func (*ProductUpdateOne) SetProductPeriod ¶
func (puo *ProductUpdateOne) SetProductPeriod(ep enum.ProductPeriod) *ProductUpdateOne
SetProductPeriod sets the "product_period" field.
func (*ProductUpdateOne) SetUniqueLimit ¶
func (puo *ProductUpdateOne) SetUniqueLimit(i int64) *ProductUpdateOne
SetUniqueLimit sets the "unique_limit" field.
func (*ProductUpdateOne) SetUpdatedAt ¶
func (puo *ProductUpdateOne) SetUpdatedAt(t time.Time) *ProductUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductUpdateOne) Where ¶
func (puo *ProductUpdateOne) Where(ps ...predicate.Product) *ProductUpdateOne
Where appends a list predicates to the ProductUpdate builder.
type ProductUpsert ¶
ProductUpsert is the "OnConflict" setter.
func (*ProductUpsert) AddLeft ¶
func (u *ProductUpsert) AddLeft(v int64) *ProductUpsert
AddLeft adds v to the "left" field.
func (*ProductUpsert) AddPrice ¶
func (u *ProductUpsert) AddPrice(v decimal.Decimal) *ProductUpsert
AddPrice adds v to the "price" field.
func (*ProductUpsert) AddUniqueLimit ¶
func (u *ProductUpsert) AddUniqueLimit(v int64) *ProductUpsert
AddUniqueLimit adds v to the "unique_limit" field.
func (*ProductUpsert) ClearDeletedAt ¶
func (u *ProductUpsert) ClearDeletedAt() *ProductUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ProductUpsert) ClearExpiringTime ¶
func (u *ProductUpsert) ClearExpiringTime() *ProductUpsert
ClearExpiringTime clears the value of the "expiring_time" field.
func (*ProductUpsert) ClearIsExpiring ¶
func (u *ProductUpsert) ClearIsExpiring() *ProductUpsert
ClearIsExpiring clears the value of the "is_expiring" field.
func (*ProductUpsert) ClearIsUnique ¶
func (u *ProductUpsert) ClearIsUnique() *ProductUpsert
ClearIsUnique clears the value of the "is_unique" field.
func (*ProductUpsert) ClearLimitedTill ¶
func (u *ProductUpsert) ClearLimitedTill() *ProductUpsert
ClearLimitedTill clears the value of the "limited_till" field.
func (*ProductUpsert) SetAppID ¶
func (u *ProductUpsert) SetAppID(v string) *ProductUpsert
SetAppID sets the "app_id" field.
func (*ProductUpsert) SetCurrency ¶
func (u *ProductUpsert) SetCurrency(v string) *ProductUpsert
SetCurrency sets the "currency" field.
func (*ProductUpsert) SetDeletedAt ¶
func (u *ProductUpsert) SetDeletedAt(v time.Time) *ProductUpsert
SetDeletedAt sets the "deleted_at" field.
func (*ProductUpsert) SetDescription ¶
func (u *ProductUpsert) SetDescription(v string) *ProductUpsert
SetDescription sets the "description" field.
func (*ProductUpsert) SetExpiringTime ¶
func (u *ProductUpsert) SetExpiringTime(v time.Time) *ProductUpsert
SetExpiringTime sets the "expiring_time" field.
func (*ProductUpsert) SetIsActive ¶
func (u *ProductUpsert) SetIsActive(v bool) *ProductUpsert
SetIsActive sets the "is_active" field.
func (*ProductUpsert) SetIsExpiring ¶
func (u *ProductUpsert) SetIsExpiring(v bool) *ProductUpsert
SetIsExpiring sets the "is_expiring" field.
func (*ProductUpsert) SetIsLimited ¶
func (u *ProductUpsert) SetIsLimited(v bool) *ProductUpsert
SetIsLimited sets the "is_limited" field.
func (*ProductUpsert) SetIsUnique ¶
func (u *ProductUpsert) SetIsUnique(v bool) *ProductUpsert
SetIsUnique sets the "is_unique" field.
func (*ProductUpsert) SetLeft ¶
func (u *ProductUpsert) SetLeft(v int64) *ProductUpsert
SetLeft sets the "left" field.
func (*ProductUpsert) SetLimitedTill ¶
func (u *ProductUpsert) SetLimitedTill(v time.Time) *ProductUpsert
SetLimitedTill sets the "limited_till" field.
func (*ProductUpsert) SetName ¶
func (u *ProductUpsert) SetName(v string) *ProductUpsert
SetName sets the "name" field.
func (*ProductUpsert) SetPaymentModel ¶
func (u *ProductUpsert) SetPaymentModel(v enum.PaymentModel) *ProductUpsert
SetPaymentModel sets the "payment_model" field.
func (*ProductUpsert) SetPrice ¶
func (u *ProductUpsert) SetPrice(v decimal.Decimal) *ProductUpsert
SetPrice sets the "price" field.
func (*ProductUpsert) SetProductPeriod ¶
func (u *ProductUpsert) SetProductPeriod(v enum.ProductPeriod) *ProductUpsert
SetProductPeriod sets the "product_period" field.
func (*ProductUpsert) SetUniqueLimit ¶
func (u *ProductUpsert) SetUniqueLimit(v int64) *ProductUpsert
SetUniqueLimit sets the "unique_limit" field.
func (*ProductUpsert) SetUpdatedAt ¶
func (u *ProductUpsert) SetUpdatedAt(v time.Time) *ProductUpsert
SetUpdatedAt sets the "updated_at" field.
func (*ProductUpsert) UpdateAppID ¶
func (u *ProductUpsert) UpdateAppID() *ProductUpsert
UpdateAppID sets the "app_id" field to the value that was provided on create.
func (*ProductUpsert) UpdateCurrency ¶
func (u *ProductUpsert) UpdateCurrency() *ProductUpsert
UpdateCurrency sets the "currency" field to the value that was provided on create.
func (*ProductUpsert) UpdateDeletedAt ¶
func (u *ProductUpsert) UpdateDeletedAt() *ProductUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ProductUpsert) UpdateDescription ¶
func (u *ProductUpsert) UpdateDescription() *ProductUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ProductUpsert) UpdateExpiringTime ¶
func (u *ProductUpsert) UpdateExpiringTime() *ProductUpsert
UpdateExpiringTime sets the "expiring_time" field to the value that was provided on create.
func (*ProductUpsert) UpdateIsActive ¶
func (u *ProductUpsert) UpdateIsActive() *ProductUpsert
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*ProductUpsert) UpdateIsExpiring ¶
func (u *ProductUpsert) UpdateIsExpiring() *ProductUpsert
UpdateIsExpiring sets the "is_expiring" field to the value that was provided on create.
func (*ProductUpsert) UpdateIsLimited ¶
func (u *ProductUpsert) UpdateIsLimited() *ProductUpsert
UpdateIsLimited sets the "is_limited" field to the value that was provided on create.
func (*ProductUpsert) UpdateIsUnique ¶
func (u *ProductUpsert) UpdateIsUnique() *ProductUpsert
UpdateIsUnique sets the "is_unique" field to the value that was provided on create.
func (*ProductUpsert) UpdateLeft ¶
func (u *ProductUpsert) UpdateLeft() *ProductUpsert
UpdateLeft sets the "left" field to the value that was provided on create.
func (*ProductUpsert) UpdateLimitedTill ¶
func (u *ProductUpsert) UpdateLimitedTill() *ProductUpsert
UpdateLimitedTill sets the "limited_till" field to the value that was provided on create.
func (*ProductUpsert) UpdateName ¶
func (u *ProductUpsert) UpdateName() *ProductUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*ProductUpsert) UpdatePaymentModel ¶
func (u *ProductUpsert) UpdatePaymentModel() *ProductUpsert
UpdatePaymentModel sets the "payment_model" field to the value that was provided on create.
func (*ProductUpsert) UpdatePrice ¶
func (u *ProductUpsert) UpdatePrice() *ProductUpsert
UpdatePrice sets the "price" field to the value that was provided on create.
func (*ProductUpsert) UpdateProductPeriod ¶
func (u *ProductUpsert) UpdateProductPeriod() *ProductUpsert
UpdateProductPeriod sets the "product_period" field to the value that was provided on create.
func (*ProductUpsert) UpdateUniqueLimit ¶
func (u *ProductUpsert) UpdateUniqueLimit() *ProductUpsert
UpdateUniqueLimit sets the "unique_limit" field to the value that was provided on create.
func (*ProductUpsert) UpdateUpdatedAt ¶
func (u *ProductUpsert) UpdateUpdatedAt() *ProductUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ProductUpsertBulk ¶
type ProductUpsertBulk struct {
// contains filtered or unexported fields
}
ProductUpsertBulk is the builder for "upsert"-ing a bulk of Product nodes.
func (*ProductUpsertBulk) AddLeft ¶
func (u *ProductUpsertBulk) AddLeft(v int64) *ProductUpsertBulk
AddLeft adds v to the "left" field.
func (*ProductUpsertBulk) AddPrice ¶
func (u *ProductUpsertBulk) AddPrice(v decimal.Decimal) *ProductUpsertBulk
AddPrice adds v to the "price" field.
func (*ProductUpsertBulk) AddUniqueLimit ¶
func (u *ProductUpsertBulk) AddUniqueLimit(v int64) *ProductUpsertBulk
AddUniqueLimit adds v to the "unique_limit" field.
func (*ProductUpsertBulk) ClearDeletedAt ¶
func (u *ProductUpsertBulk) ClearDeletedAt() *ProductUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ProductUpsertBulk) ClearExpiringTime ¶
func (u *ProductUpsertBulk) ClearExpiringTime() *ProductUpsertBulk
ClearExpiringTime clears the value of the "expiring_time" field.
func (*ProductUpsertBulk) ClearIsExpiring ¶
func (u *ProductUpsertBulk) ClearIsExpiring() *ProductUpsertBulk
ClearIsExpiring clears the value of the "is_expiring" field.
func (*ProductUpsertBulk) ClearIsUnique ¶
func (u *ProductUpsertBulk) ClearIsUnique() *ProductUpsertBulk
ClearIsUnique clears the value of the "is_unique" field.
func (*ProductUpsertBulk) ClearLimitedTill ¶
func (u *ProductUpsertBulk) ClearLimitedTill() *ProductUpsertBulk
ClearLimitedTill clears the value of the "limited_till" field.
func (*ProductUpsertBulk) DoNothing ¶
func (u *ProductUpsertBulk) DoNothing() *ProductUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProductUpsertBulk) Exec ¶
func (u *ProductUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductUpsertBulk) ExecX ¶
func (u *ProductUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpsertBulk) Ignore ¶
func (u *ProductUpsertBulk) Ignore() *ProductUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Product.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ProductUpsertBulk) SetAppID ¶
func (u *ProductUpsertBulk) SetAppID(v string) *ProductUpsertBulk
SetAppID sets the "app_id" field.
func (*ProductUpsertBulk) SetCurrency ¶
func (u *ProductUpsertBulk) SetCurrency(v string) *ProductUpsertBulk
SetCurrency sets the "currency" field.
func (*ProductUpsertBulk) SetDeletedAt ¶
func (u *ProductUpsertBulk) SetDeletedAt(v time.Time) *ProductUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*ProductUpsertBulk) SetDescription ¶
func (u *ProductUpsertBulk) SetDescription(v string) *ProductUpsertBulk
SetDescription sets the "description" field.
func (*ProductUpsertBulk) SetExpiringTime ¶
func (u *ProductUpsertBulk) SetExpiringTime(v time.Time) *ProductUpsertBulk
SetExpiringTime sets the "expiring_time" field.
func (*ProductUpsertBulk) SetIsActive ¶
func (u *ProductUpsertBulk) SetIsActive(v bool) *ProductUpsertBulk
SetIsActive sets the "is_active" field.
func (*ProductUpsertBulk) SetIsExpiring ¶
func (u *ProductUpsertBulk) SetIsExpiring(v bool) *ProductUpsertBulk
SetIsExpiring sets the "is_expiring" field.
func (*ProductUpsertBulk) SetIsLimited ¶
func (u *ProductUpsertBulk) SetIsLimited(v bool) *ProductUpsertBulk
SetIsLimited sets the "is_limited" field.
func (*ProductUpsertBulk) SetIsUnique ¶
func (u *ProductUpsertBulk) SetIsUnique(v bool) *ProductUpsertBulk
SetIsUnique sets the "is_unique" field.
func (*ProductUpsertBulk) SetLeft ¶
func (u *ProductUpsertBulk) SetLeft(v int64) *ProductUpsertBulk
SetLeft sets the "left" field.
func (*ProductUpsertBulk) SetLimitedTill ¶
func (u *ProductUpsertBulk) SetLimitedTill(v time.Time) *ProductUpsertBulk
SetLimitedTill sets the "limited_till" field.
func (*ProductUpsertBulk) SetName ¶
func (u *ProductUpsertBulk) SetName(v string) *ProductUpsertBulk
SetName sets the "name" field.
func (*ProductUpsertBulk) SetPaymentModel ¶
func (u *ProductUpsertBulk) SetPaymentModel(v enum.PaymentModel) *ProductUpsertBulk
SetPaymentModel sets the "payment_model" field.
func (*ProductUpsertBulk) SetPrice ¶
func (u *ProductUpsertBulk) SetPrice(v decimal.Decimal) *ProductUpsertBulk
SetPrice sets the "price" field.
func (*ProductUpsertBulk) SetProductPeriod ¶
func (u *ProductUpsertBulk) SetProductPeriod(v enum.ProductPeriod) *ProductUpsertBulk
SetProductPeriod sets the "product_period" field.
func (*ProductUpsertBulk) SetUniqueLimit ¶
func (u *ProductUpsertBulk) SetUniqueLimit(v int64) *ProductUpsertBulk
SetUniqueLimit sets the "unique_limit" field.
func (*ProductUpsertBulk) SetUpdatedAt ¶
func (u *ProductUpsertBulk) SetUpdatedAt(v time.Time) *ProductUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*ProductUpsertBulk) Update ¶
func (u *ProductUpsertBulk) Update(set func(*ProductUpsert)) *ProductUpsertBulk
Update allows overriding fields `UPDATE` values. See the ProductCreateBulk.OnConflict documentation for more info.
func (*ProductUpsertBulk) UpdateAppID ¶
func (u *ProductUpsertBulk) UpdateAppID() *ProductUpsertBulk
UpdateAppID sets the "app_id" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateCurrency ¶
func (u *ProductUpsertBulk) UpdateCurrency() *ProductUpsertBulk
UpdateCurrency sets the "currency" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateDeletedAt ¶
func (u *ProductUpsertBulk) UpdateDeletedAt() *ProductUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateDescription ¶
func (u *ProductUpsertBulk) UpdateDescription() *ProductUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateExpiringTime ¶
func (u *ProductUpsertBulk) UpdateExpiringTime() *ProductUpsertBulk
UpdateExpiringTime sets the "expiring_time" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateIsActive ¶
func (u *ProductUpsertBulk) UpdateIsActive() *ProductUpsertBulk
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateIsExpiring ¶
func (u *ProductUpsertBulk) UpdateIsExpiring() *ProductUpsertBulk
UpdateIsExpiring sets the "is_expiring" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateIsLimited ¶
func (u *ProductUpsertBulk) UpdateIsLimited() *ProductUpsertBulk
UpdateIsLimited sets the "is_limited" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateIsUnique ¶
func (u *ProductUpsertBulk) UpdateIsUnique() *ProductUpsertBulk
UpdateIsUnique sets the "is_unique" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateLeft ¶
func (u *ProductUpsertBulk) UpdateLeft() *ProductUpsertBulk
UpdateLeft sets the "left" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateLimitedTill ¶
func (u *ProductUpsertBulk) UpdateLimitedTill() *ProductUpsertBulk
UpdateLimitedTill sets the "limited_till" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateName ¶
func (u *ProductUpsertBulk) UpdateName() *ProductUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateNewValues ¶
func (u *ProductUpsertBulk) UpdateNewValues() *ProductUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Product.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(product.FieldID)
}),
).
Exec(ctx)
func (*ProductUpsertBulk) UpdatePaymentModel ¶
func (u *ProductUpsertBulk) UpdatePaymentModel() *ProductUpsertBulk
UpdatePaymentModel sets the "payment_model" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdatePrice ¶
func (u *ProductUpsertBulk) UpdatePrice() *ProductUpsertBulk
UpdatePrice sets the "price" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateProductPeriod ¶
func (u *ProductUpsertBulk) UpdateProductPeriod() *ProductUpsertBulk
UpdateProductPeriod sets the "product_period" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateUniqueLimit ¶
func (u *ProductUpsertBulk) UpdateUniqueLimit() *ProductUpsertBulk
UpdateUniqueLimit sets the "unique_limit" field to the value that was provided on create.
func (*ProductUpsertBulk) UpdateUpdatedAt ¶
func (u *ProductUpsertBulk) UpdateUpdatedAt() *ProductUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ProductUpsertOne ¶
type ProductUpsertOne struct {
// contains filtered or unexported fields
}
ProductUpsertOne is the builder for "upsert"-ing
one Product node.
func (*ProductUpsertOne) AddLeft ¶
func (u *ProductUpsertOne) AddLeft(v int64) *ProductUpsertOne
AddLeft adds v to the "left" field.
func (*ProductUpsertOne) AddPrice ¶
func (u *ProductUpsertOne) AddPrice(v decimal.Decimal) *ProductUpsertOne
AddPrice adds v to the "price" field.
func (*ProductUpsertOne) AddUniqueLimit ¶
func (u *ProductUpsertOne) AddUniqueLimit(v int64) *ProductUpsertOne
AddUniqueLimit adds v to the "unique_limit" field.
func (*ProductUpsertOne) ClearDeletedAt ¶
func (u *ProductUpsertOne) ClearDeletedAt() *ProductUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*ProductUpsertOne) ClearExpiringTime ¶
func (u *ProductUpsertOne) ClearExpiringTime() *ProductUpsertOne
ClearExpiringTime clears the value of the "expiring_time" field.
func (*ProductUpsertOne) ClearIsExpiring ¶
func (u *ProductUpsertOne) ClearIsExpiring() *ProductUpsertOne
ClearIsExpiring clears the value of the "is_expiring" field.
func (*ProductUpsertOne) ClearIsUnique ¶
func (u *ProductUpsertOne) ClearIsUnique() *ProductUpsertOne
ClearIsUnique clears the value of the "is_unique" field.
func (*ProductUpsertOne) ClearLimitedTill ¶
func (u *ProductUpsertOne) ClearLimitedTill() *ProductUpsertOne
ClearLimitedTill clears the value of the "limited_till" field.
func (*ProductUpsertOne) DoNothing ¶
func (u *ProductUpsertOne) DoNothing() *ProductUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProductUpsertOne) Exec ¶
func (u *ProductUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductUpsertOne) ExecX ¶
func (u *ProductUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductUpsertOne) ID ¶
func (u *ProductUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ProductUpsertOne) IDX ¶
func (u *ProductUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*ProductUpsertOne) Ignore ¶
func (u *ProductUpsertOne) Ignore() *ProductUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Product.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*ProductUpsertOne) SetAppID ¶
func (u *ProductUpsertOne) SetAppID(v string) *ProductUpsertOne
SetAppID sets the "app_id" field.
func (*ProductUpsertOne) SetCurrency ¶
func (u *ProductUpsertOne) SetCurrency(v string) *ProductUpsertOne
SetCurrency sets the "currency" field.
func (*ProductUpsertOne) SetDeletedAt ¶
func (u *ProductUpsertOne) SetDeletedAt(v time.Time) *ProductUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*ProductUpsertOne) SetDescription ¶
func (u *ProductUpsertOne) SetDescription(v string) *ProductUpsertOne
SetDescription sets the "description" field.
func (*ProductUpsertOne) SetExpiringTime ¶
func (u *ProductUpsertOne) SetExpiringTime(v time.Time) *ProductUpsertOne
SetExpiringTime sets the "expiring_time" field.
func (*ProductUpsertOne) SetIsActive ¶
func (u *ProductUpsertOne) SetIsActive(v bool) *ProductUpsertOne
SetIsActive sets the "is_active" field.
func (*ProductUpsertOne) SetIsExpiring ¶
func (u *ProductUpsertOne) SetIsExpiring(v bool) *ProductUpsertOne
SetIsExpiring sets the "is_expiring" field.
func (*ProductUpsertOne) SetIsLimited ¶
func (u *ProductUpsertOne) SetIsLimited(v bool) *ProductUpsertOne
SetIsLimited sets the "is_limited" field.
func (*ProductUpsertOne) SetIsUnique ¶
func (u *ProductUpsertOne) SetIsUnique(v bool) *ProductUpsertOne
SetIsUnique sets the "is_unique" field.
func (*ProductUpsertOne) SetLeft ¶
func (u *ProductUpsertOne) SetLeft(v int64) *ProductUpsertOne
SetLeft sets the "left" field.
func (*ProductUpsertOne) SetLimitedTill ¶
func (u *ProductUpsertOne) SetLimitedTill(v time.Time) *ProductUpsertOne
SetLimitedTill sets the "limited_till" field.
func (*ProductUpsertOne) SetName ¶
func (u *ProductUpsertOne) SetName(v string) *ProductUpsertOne
SetName sets the "name" field.
func (*ProductUpsertOne) SetPaymentModel ¶
func (u *ProductUpsertOne) SetPaymentModel(v enum.PaymentModel) *ProductUpsertOne
SetPaymentModel sets the "payment_model" field.
func (*ProductUpsertOne) SetPrice ¶
func (u *ProductUpsertOne) SetPrice(v decimal.Decimal) *ProductUpsertOne
SetPrice sets the "price" field.
func (*ProductUpsertOne) SetProductPeriod ¶
func (u *ProductUpsertOne) SetProductPeriod(v enum.ProductPeriod) *ProductUpsertOne
SetProductPeriod sets the "product_period" field.
func (*ProductUpsertOne) SetUniqueLimit ¶
func (u *ProductUpsertOne) SetUniqueLimit(v int64) *ProductUpsertOne
SetUniqueLimit sets the "unique_limit" field.
func (*ProductUpsertOne) SetUpdatedAt ¶
func (u *ProductUpsertOne) SetUpdatedAt(v time.Time) *ProductUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductUpsertOne) Update ¶
func (u *ProductUpsertOne) Update(set func(*ProductUpsert)) *ProductUpsertOne
Update allows overriding fields `UPDATE` values. See the ProductCreate.OnConflict documentation for more info.
func (*ProductUpsertOne) UpdateAppID ¶
func (u *ProductUpsertOne) UpdateAppID() *ProductUpsertOne
UpdateAppID sets the "app_id" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateCurrency ¶
func (u *ProductUpsertOne) UpdateCurrency() *ProductUpsertOne
UpdateCurrency sets the "currency" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateDeletedAt ¶
func (u *ProductUpsertOne) UpdateDeletedAt() *ProductUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateDescription ¶
func (u *ProductUpsertOne) UpdateDescription() *ProductUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateExpiringTime ¶
func (u *ProductUpsertOne) UpdateExpiringTime() *ProductUpsertOne
UpdateExpiringTime sets the "expiring_time" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateIsActive ¶
func (u *ProductUpsertOne) UpdateIsActive() *ProductUpsertOne
UpdateIsActive sets the "is_active" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateIsExpiring ¶
func (u *ProductUpsertOne) UpdateIsExpiring() *ProductUpsertOne
UpdateIsExpiring sets the "is_expiring" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateIsLimited ¶
func (u *ProductUpsertOne) UpdateIsLimited() *ProductUpsertOne
UpdateIsLimited sets the "is_limited" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateIsUnique ¶
func (u *ProductUpsertOne) UpdateIsUnique() *ProductUpsertOne
UpdateIsUnique sets the "is_unique" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateLeft ¶
func (u *ProductUpsertOne) UpdateLeft() *ProductUpsertOne
UpdateLeft sets the "left" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateLimitedTill ¶
func (u *ProductUpsertOne) UpdateLimitedTill() *ProductUpsertOne
UpdateLimitedTill sets the "limited_till" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateName ¶
func (u *ProductUpsertOne) UpdateName() *ProductUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateNewValues ¶
func (u *ProductUpsertOne) UpdateNewValues() *ProductUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Product.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(product.FieldID)
}),
).
Exec(ctx)
func (*ProductUpsertOne) UpdatePaymentModel ¶
func (u *ProductUpsertOne) UpdatePaymentModel() *ProductUpsertOne
UpdatePaymentModel sets the "payment_model" field to the value that was provided on create.
func (*ProductUpsertOne) UpdatePrice ¶
func (u *ProductUpsertOne) UpdatePrice() *ProductUpsertOne
UpdatePrice sets the "price" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateProductPeriod ¶
func (u *ProductUpsertOne) UpdateProductPeriod() *ProductUpsertOne
UpdateProductPeriod sets the "product_period" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateUniqueLimit ¶
func (u *ProductUpsertOne) UpdateUniqueLimit() *ProductUpsertOne
UpdateUniqueLimit sets the "unique_limit" field to the value that was provided on create.
func (*ProductUpsertOne) UpdateUpdatedAt ¶
func (u *ProductUpsertOne) UpdateUpdatedAt() *ProductUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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 Subscriptions ¶
type Subscriptions struct {
// ID of the ent.
ID int64 `json:"id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID int64 `json:"user_id,omitempty"`
// TenantID holds the value of the "tenant_id" field.
TenantID int64 `json:"tenant_id,omitempty"`
// AppID holds the value of the "app_id" field.
AppID string `json:"app_id,omitempty"`
// ProductID holds the value of the "product_id" field.
ProductID int64 `json:"product_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the SubscriptionsQuery when eager-loading is set.
Edges SubscriptionsEdges `json:"edges"`
// contains filtered or unexported fields
}
Subscriptions is the model entity for the Subscriptions schema.
func (*Subscriptions) QueryInvoices ¶
func (s *Subscriptions) QueryInvoices() *InvoiceQuery
QueryInvoices queries the "invoices" edge of the Subscriptions entity.
func (*Subscriptions) QueryProduct ¶
func (s *Subscriptions) QueryProduct() *ProductQuery
QueryProduct queries the "product" edge of the Subscriptions entity.
func (*Subscriptions) String ¶
func (s *Subscriptions) String() string
String implements the fmt.Stringer.
func (*Subscriptions) Unwrap ¶
func (s *Subscriptions) Unwrap() *Subscriptions
Unwrap unwraps the Subscriptions 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 (*Subscriptions) Update ¶
func (s *Subscriptions) Update() *SubscriptionsUpdateOne
Update returns a builder for updating this Subscriptions. Note that you need to call Subscriptions.Unwrap() before calling this method if this Subscriptions was returned from a transaction, and the transaction was committed or rolled back.
type SubscriptionsClient ¶
type SubscriptionsClient struct {
// contains filtered or unexported fields
}
SubscriptionsClient is a client for the Subscriptions schema.
func NewSubscriptionsClient ¶
func NewSubscriptionsClient(c config) *SubscriptionsClient
NewSubscriptionsClient returns a client for the Subscriptions from the given config.
func (*SubscriptionsClient) Create ¶
func (c *SubscriptionsClient) Create() *SubscriptionsCreate
Create returns a builder for creating a Subscriptions entity.
func (*SubscriptionsClient) CreateBulk ¶
func (c *SubscriptionsClient) CreateBulk(builders ...*SubscriptionsCreate) *SubscriptionsCreateBulk
CreateBulk returns a builder for creating a bulk of Subscriptions entities.
func (*SubscriptionsClient) Delete ¶
func (c *SubscriptionsClient) Delete() *SubscriptionsDelete
Delete returns a delete builder for Subscriptions.
func (*SubscriptionsClient) DeleteOne ¶
func (c *SubscriptionsClient) DeleteOne(s *Subscriptions) *SubscriptionsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SubscriptionsClient) DeleteOneID ¶
func (c *SubscriptionsClient) DeleteOneID(id int64) *SubscriptionsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SubscriptionsClient) Get ¶
func (c *SubscriptionsClient) Get(ctx context.Context, id int64) (*Subscriptions, error)
Get returns a Subscriptions entity by its id.
func (*SubscriptionsClient) GetX ¶
func (c *SubscriptionsClient) GetX(ctx context.Context, id int64) *Subscriptions
GetX is like Get, but panics if an error occurs.
func (*SubscriptionsClient) Hooks ¶
func (c *SubscriptionsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SubscriptionsClient) Intercept ¶
func (c *SubscriptionsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subscriptions.Intercept(f(g(h())))`.
func (*SubscriptionsClient) Interceptors ¶
func (c *SubscriptionsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SubscriptionsClient) MapCreateBulk ¶
func (c *SubscriptionsClient) MapCreateBulk(slice any, setFunc func(*SubscriptionsCreate, int)) *SubscriptionsCreateBulk
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 (*SubscriptionsClient) Query ¶
func (c *SubscriptionsClient) Query() *SubscriptionsQuery
Query returns a query builder for Subscriptions.
func (*SubscriptionsClient) QueryInvoices ¶
func (c *SubscriptionsClient) QueryInvoices(s *Subscriptions) *InvoiceQuery
QueryInvoices queries the invoices edge of a Subscriptions.
func (*SubscriptionsClient) QueryProduct ¶
func (c *SubscriptionsClient) QueryProduct(s *Subscriptions) *ProductQuery
QueryProduct queries the product edge of a Subscriptions.
func (*SubscriptionsClient) Update ¶
func (c *SubscriptionsClient) Update() *SubscriptionsUpdate
Update returns an update builder for Subscriptions.
func (*SubscriptionsClient) UpdateOne ¶
func (c *SubscriptionsClient) UpdateOne(s *Subscriptions) *SubscriptionsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SubscriptionsClient) UpdateOneID ¶
func (c *SubscriptionsClient) UpdateOneID(id int64) *SubscriptionsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SubscriptionsClient) Use ¶
func (c *SubscriptionsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subscriptions.Hooks(f(g(h())))`.
type SubscriptionsCreate ¶
type SubscriptionsCreate struct {
// contains filtered or unexported fields
}
SubscriptionsCreate is the builder for creating a Subscriptions entity.
func (*SubscriptionsCreate) AddInvoiceIDs ¶
func (sc *SubscriptionsCreate) AddInvoiceIDs(ids ...int64) *SubscriptionsCreate
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*SubscriptionsCreate) AddInvoices ¶
func (sc *SubscriptionsCreate) AddInvoices(i ...*Invoice) *SubscriptionsCreate
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*SubscriptionsCreate) Exec ¶
func (sc *SubscriptionsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionsCreate) ExecX ¶
func (sc *SubscriptionsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsCreate) Mutation ¶
func (sc *SubscriptionsCreate) Mutation() *SubscriptionsMutation
Mutation returns the SubscriptionsMutation object of the builder.
func (*SubscriptionsCreate) OnConflict ¶
func (sc *SubscriptionsCreate) OnConflict(opts ...sql.ConflictOption) *SubscriptionsUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Subscriptions.Create().
SetUserID(v).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SubscriptionsUpsert) {
SetUserID(v+v).
}).
Exec(ctx)
func (*SubscriptionsCreate) OnConflictColumns ¶
func (sc *SubscriptionsCreate) OnConflictColumns(columns ...string) *SubscriptionsUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Subscriptions.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SubscriptionsCreate) Save ¶
func (sc *SubscriptionsCreate) Save(ctx context.Context) (*Subscriptions, error)
Save creates the Subscriptions in the database.
func (*SubscriptionsCreate) SaveX ¶
func (sc *SubscriptionsCreate) SaveX(ctx context.Context) *Subscriptions
SaveX calls Save and panics if Save returns an error.
func (*SubscriptionsCreate) SetAppID ¶
func (sc *SubscriptionsCreate) SetAppID(s string) *SubscriptionsCreate
SetAppID sets the "app_id" field.
func (*SubscriptionsCreate) SetID ¶
func (sc *SubscriptionsCreate) SetID(i int64) *SubscriptionsCreate
SetID sets the "id" field.
func (*SubscriptionsCreate) SetProduct ¶
func (sc *SubscriptionsCreate) SetProduct(p *Product) *SubscriptionsCreate
SetProduct sets the "product" edge to the Product entity.
func (*SubscriptionsCreate) SetProductID ¶
func (sc *SubscriptionsCreate) SetProductID(i int64) *SubscriptionsCreate
SetProductID sets the "product_id" field.
func (*SubscriptionsCreate) SetTenantID ¶
func (sc *SubscriptionsCreate) SetTenantID(i int64) *SubscriptionsCreate
SetTenantID sets the "tenant_id" field.
func (*SubscriptionsCreate) SetUserID ¶
func (sc *SubscriptionsCreate) SetUserID(i int64) *SubscriptionsCreate
SetUserID sets the "user_id" field.
type SubscriptionsCreateBulk ¶
type SubscriptionsCreateBulk struct {
// contains filtered or unexported fields
}
SubscriptionsCreateBulk is the builder for creating many Subscriptions entities in bulk.
func (*SubscriptionsCreateBulk) Exec ¶
func (scb *SubscriptionsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionsCreateBulk) ExecX ¶
func (scb *SubscriptionsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsCreateBulk) OnConflict ¶
func (scb *SubscriptionsCreateBulk) OnConflict(opts ...sql.ConflictOption) *SubscriptionsUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Subscriptions.CreateBulk(builders...).
OnConflict(
// Update the row with the new values
// the was proposed for insertion.
sql.ResolveWithNewValues(),
).
// Override some of the fields with custom
// update values.
Update(func(u *ent.SubscriptionsUpsert) {
SetUserID(v+v).
}).
Exec(ctx)
func (*SubscriptionsCreateBulk) OnConflictColumns ¶
func (scb *SubscriptionsCreateBulk) OnConflictColumns(columns ...string) *SubscriptionsUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Subscriptions.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*SubscriptionsCreateBulk) Save ¶
func (scb *SubscriptionsCreateBulk) Save(ctx context.Context) ([]*Subscriptions, error)
Save creates the Subscriptions entities in the database.
func (*SubscriptionsCreateBulk) SaveX ¶
func (scb *SubscriptionsCreateBulk) SaveX(ctx context.Context) []*Subscriptions
SaveX is like Save, but panics if an error occurs.
type SubscriptionsDelete ¶
type SubscriptionsDelete struct {
// contains filtered or unexported fields
}
SubscriptionsDelete is the builder for deleting a Subscriptions entity.
func (*SubscriptionsDelete) Exec ¶
func (sd *SubscriptionsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SubscriptionsDelete) ExecX ¶
func (sd *SubscriptionsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsDelete) Where ¶
func (sd *SubscriptionsDelete) Where(ps ...predicate.Subscriptions) *SubscriptionsDelete
Where appends a list predicates to the SubscriptionsDelete builder.
type SubscriptionsDeleteOne ¶
type SubscriptionsDeleteOne struct {
// contains filtered or unexported fields
}
SubscriptionsDeleteOne is the builder for deleting a single Subscriptions entity.
func (*SubscriptionsDeleteOne) Exec ¶
func (sdo *SubscriptionsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SubscriptionsDeleteOne) ExecX ¶
func (sdo *SubscriptionsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsDeleteOne) Where ¶
func (sdo *SubscriptionsDeleteOne) Where(ps ...predicate.Subscriptions) *SubscriptionsDeleteOne
Where appends a list predicates to the SubscriptionsDelete builder.
type SubscriptionsEdges ¶
type SubscriptionsEdges struct {
// Invoices holds the value of the invoices edge.
Invoices []*Invoice `json:"invoices,omitempty"`
// Product holds the value of the product edge.
Product *Product `json:"product,omitempty"`
// contains filtered or unexported fields
}
SubscriptionsEdges holds the relations/edges for other nodes in the graph.
func (SubscriptionsEdges) InvoicesOrErr ¶
func (e SubscriptionsEdges) InvoicesOrErr() ([]*Invoice, error)
InvoicesOrErr returns the Invoices value or an error if the edge was not loaded in eager-loading.
func (SubscriptionsEdges) ProductOrErr ¶
func (e SubscriptionsEdges) 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 SubscriptionsFilter ¶
type SubscriptionsFilter struct {
// contains filtered or unexported fields
}
SubscriptionsFilter provides a generic filtering capability at runtime for SubscriptionsQuery.
func (*SubscriptionsFilter) Where ¶
func (f *SubscriptionsFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*SubscriptionsFilter) WhereAppID ¶
func (f *SubscriptionsFilter) WhereAppID(p entql.StringP)
WhereAppID applies the entql string predicate on the app_id field.
func (*SubscriptionsFilter) WhereHasInvoices ¶
func (f *SubscriptionsFilter) WhereHasInvoices()
WhereHasInvoices applies a predicate to check if query has an edge invoices.
func (*SubscriptionsFilter) WhereHasInvoicesWith ¶
func (f *SubscriptionsFilter) WhereHasInvoicesWith(preds ...predicate.Invoice)
WhereHasInvoicesWith applies a predicate to check if query has an edge invoices with a given conditions (other predicates).
func (*SubscriptionsFilter) WhereHasProduct ¶
func (f *SubscriptionsFilter) WhereHasProduct()
WhereHasProduct applies a predicate to check if query has an edge product.
func (*SubscriptionsFilter) WhereHasProductWith ¶
func (f *SubscriptionsFilter) WhereHasProductWith(preds ...predicate.Product)
WhereHasProductWith applies a predicate to check if query has an edge product with a given conditions (other predicates).
func (*SubscriptionsFilter) WhereID ¶
func (f *SubscriptionsFilter) WhereID(p entql.Int64P)
WhereID applies the entql int64 predicate on the id field.
func (*SubscriptionsFilter) WhereProductID ¶
func (f *SubscriptionsFilter) WhereProductID(p entql.Int64P)
WhereProductID applies the entql int64 predicate on the product_id field.
func (*SubscriptionsFilter) WhereTenantID ¶
func (f *SubscriptionsFilter) WhereTenantID(p entql.Int64P)
WhereTenantID applies the entql int64 predicate on the tenant_id field.
func (*SubscriptionsFilter) WhereUserID ¶
func (f *SubscriptionsFilter) WhereUserID(p entql.Int64P)
WhereUserID applies the entql int64 predicate on the user_id field.
type SubscriptionsGroupBy ¶
type SubscriptionsGroupBy struct {
// contains filtered or unexported fields
}
SubscriptionsGroupBy is the group-by builder for Subscriptions entities.
func (*SubscriptionsGroupBy) Aggregate ¶
func (sgb *SubscriptionsGroupBy) Aggregate(fns ...AggregateFunc) *SubscriptionsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SubscriptionsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionsGroupBy) Scan ¶
func (sgb *SubscriptionsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SubscriptionsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionsMutation ¶
type SubscriptionsMutation struct {
// contains filtered or unexported fields
}
SubscriptionsMutation represents an operation that mutates the Subscriptions nodes in the graph.
func (*SubscriptionsMutation) AddField ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) AddInvoiceIDs ¶
func (m *SubscriptionsMutation) AddInvoiceIDs(ids ...int64)
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by ids.
func (*SubscriptionsMutation) AddTenantID ¶
func (m *SubscriptionsMutation) AddTenantID(i int64)
AddTenantID adds i to the "tenant_id" field.
func (*SubscriptionsMutation) AddUserID ¶
func (m *SubscriptionsMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*SubscriptionsMutation) AddedEdges ¶
func (m *SubscriptionsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SubscriptionsMutation) AddedField ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) AddedFields ¶
func (m *SubscriptionsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SubscriptionsMutation) AddedIDs ¶
func (m *SubscriptionsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SubscriptionsMutation) AddedTenantID ¶
func (m *SubscriptionsMutation) AddedTenantID() (r int64, exists bool)
AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.
func (*SubscriptionsMutation) AddedUserID ¶
func (m *SubscriptionsMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*SubscriptionsMutation) AppID ¶
func (m *SubscriptionsMutation) AppID() (r string, exists bool)
AppID returns the value of the "app_id" field in the mutation.
func (*SubscriptionsMutation) ClearEdge ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) ClearField ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) ClearInvoices ¶
func (m *SubscriptionsMutation) ClearInvoices()
ClearInvoices clears the "invoices" edge to the Invoice entity.
func (*SubscriptionsMutation) ClearProduct ¶
func (m *SubscriptionsMutation) ClearProduct()
ClearProduct clears the "product" edge to the Product entity.
func (*SubscriptionsMutation) ClearedEdges ¶
func (m *SubscriptionsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SubscriptionsMutation) ClearedFields ¶
func (m *SubscriptionsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SubscriptionsMutation) Client ¶
func (m SubscriptionsMutation) 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 (*SubscriptionsMutation) EdgeCleared ¶
func (m *SubscriptionsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SubscriptionsMutation) Field ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) FieldCleared ¶
func (m *SubscriptionsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SubscriptionsMutation) Fields ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) Filter ¶
func (m *SubscriptionsMutation) Filter() *SubscriptionsFilter
Filter returns an entql.Where implementation to apply filters on the SubscriptionsMutation builder.
func (*SubscriptionsMutation) ID ¶
func (m *SubscriptionsMutation) ID() (id int64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SubscriptionsMutation) IDs ¶
func (m *SubscriptionsMutation) IDs(ctx context.Context) ([]int64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SubscriptionsMutation) InvoicesCleared ¶
func (m *SubscriptionsMutation) InvoicesCleared() bool
InvoicesCleared reports if the "invoices" edge to the Invoice entity was cleared.
func (*SubscriptionsMutation) InvoicesIDs ¶
func (m *SubscriptionsMutation) InvoicesIDs() (ids []int64)
InvoicesIDs returns the "invoices" edge IDs in the mutation.
func (*SubscriptionsMutation) OldAppID ¶
func (m *SubscriptionsMutation) OldAppID(ctx context.Context) (v string, err error)
OldAppID returns the old "app_id" field's value of the Subscriptions entity. If the Subscriptions 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 (*SubscriptionsMutation) 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 (*SubscriptionsMutation) OldProductID ¶
func (m *SubscriptionsMutation) OldProductID(ctx context.Context) (v int64, err error)
OldProductID returns the old "product_id" field's value of the Subscriptions entity. If the Subscriptions 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 (*SubscriptionsMutation) OldTenantID ¶
func (m *SubscriptionsMutation) OldTenantID(ctx context.Context) (v int64, err error)
OldTenantID returns the old "tenant_id" field's value of the Subscriptions entity. If the Subscriptions 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 (*SubscriptionsMutation) OldUserID ¶
func (m *SubscriptionsMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the Subscriptions entity. If the Subscriptions 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 (*SubscriptionsMutation) Op ¶
func (m *SubscriptionsMutation) Op() Op
Op returns the operation name.
func (*SubscriptionsMutation) ProductCleared ¶
func (m *SubscriptionsMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the Product entity was cleared.
func (*SubscriptionsMutation) ProductID ¶
func (m *SubscriptionsMutation) ProductID() (r int64, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*SubscriptionsMutation) ProductIDs ¶
func (m *SubscriptionsMutation) ProductIDs() (ids []int64)
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 (*SubscriptionsMutation) RemoveInvoiceIDs ¶
func (m *SubscriptionsMutation) RemoveInvoiceIDs(ids ...int64)
RemoveInvoiceIDs removes the "invoices" edge to the Invoice entity by IDs.
func (*SubscriptionsMutation) RemovedEdges ¶
func (m *SubscriptionsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SubscriptionsMutation) RemovedIDs ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) RemovedInvoicesIDs ¶
func (m *SubscriptionsMutation) RemovedInvoicesIDs() (ids []int64)
RemovedInvoices returns the removed IDs of the "invoices" edge to the Invoice entity.
func (*SubscriptionsMutation) ResetAppID ¶
func (m *SubscriptionsMutation) ResetAppID()
ResetAppID resets all changes to the "app_id" field.
func (*SubscriptionsMutation) ResetEdge ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) ResetField ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) ResetInvoices ¶
func (m *SubscriptionsMutation) ResetInvoices()
ResetInvoices resets all changes to the "invoices" edge.
func (*SubscriptionsMutation) ResetProduct ¶
func (m *SubscriptionsMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*SubscriptionsMutation) ResetProductID ¶
func (m *SubscriptionsMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*SubscriptionsMutation) ResetTenantID ¶
func (m *SubscriptionsMutation) ResetTenantID()
ResetTenantID resets all changes to the "tenant_id" field.
func (*SubscriptionsMutation) ResetUserID ¶
func (m *SubscriptionsMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*SubscriptionsMutation) SetAppID ¶
func (m *SubscriptionsMutation) SetAppID(s string)
SetAppID sets the "app_id" field.
func (*SubscriptionsMutation) SetField ¶
func (m *SubscriptionsMutation) 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 (*SubscriptionsMutation) SetID ¶
func (m *SubscriptionsMutation) SetID(id int64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Subscriptions entities.
func (*SubscriptionsMutation) SetOp ¶
func (m *SubscriptionsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SubscriptionsMutation) SetProductID ¶
func (m *SubscriptionsMutation) SetProductID(i int64)
SetProductID sets the "product_id" field.
func (*SubscriptionsMutation) SetTenantID ¶
func (m *SubscriptionsMutation) SetTenantID(i int64)
SetTenantID sets the "tenant_id" field.
func (*SubscriptionsMutation) SetUserID ¶
func (m *SubscriptionsMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (*SubscriptionsMutation) TenantID ¶
func (m *SubscriptionsMutation) TenantID() (r int64, exists bool)
TenantID returns the value of the "tenant_id" field in the mutation.
func (SubscriptionsMutation) Tx ¶
func (m SubscriptionsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SubscriptionsMutation) Type ¶
func (m *SubscriptionsMutation) Type() string
Type returns the node type of this mutation (Subscriptions).
func (*SubscriptionsMutation) UserID ¶
func (m *SubscriptionsMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*SubscriptionsMutation) Where ¶
func (m *SubscriptionsMutation) Where(ps ...predicate.Subscriptions)
Where appends a list predicates to the SubscriptionsMutation builder.
func (*SubscriptionsMutation) WhereP ¶
func (m *SubscriptionsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SubscriptionsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SubscriptionsQuery ¶
type SubscriptionsQuery struct {
// contains filtered or unexported fields
}
SubscriptionsQuery is the builder for querying Subscriptions entities.
func (*SubscriptionsQuery) Aggregate ¶
func (sq *SubscriptionsQuery) Aggregate(fns ...AggregateFunc) *SubscriptionsSelect
Aggregate returns a SubscriptionsSelect configured with the given aggregations.
func (*SubscriptionsQuery) All ¶
func (sq *SubscriptionsQuery) All(ctx context.Context) ([]*Subscriptions, error)
All executes the query and returns a list of SubscriptionsSlice.
func (*SubscriptionsQuery) AllX ¶
func (sq *SubscriptionsQuery) AllX(ctx context.Context) []*Subscriptions
AllX is like All, but panics if an error occurs.
func (*SubscriptionsQuery) Clone ¶
func (sq *SubscriptionsQuery) Clone() *SubscriptionsQuery
Clone returns a duplicate of the SubscriptionsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SubscriptionsQuery) Count ¶
func (sq *SubscriptionsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SubscriptionsQuery) CountX ¶
func (sq *SubscriptionsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SubscriptionsQuery) Exist ¶
func (sq *SubscriptionsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SubscriptionsQuery) ExistX ¶
func (sq *SubscriptionsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SubscriptionsQuery) Filter ¶
func (sq *SubscriptionsQuery) Filter() *SubscriptionsFilter
Filter returns a Filter implementation to apply filters on the SubscriptionsQuery builder.
func (*SubscriptionsQuery) First ¶
func (sq *SubscriptionsQuery) First(ctx context.Context) (*Subscriptions, error)
First returns the first Subscriptions entity from the query. Returns a *NotFoundError when no Subscriptions was found.
func (*SubscriptionsQuery) FirstID ¶
func (sq *SubscriptionsQuery) FirstID(ctx context.Context) (id int64, err error)
FirstID returns the first Subscriptions ID from the query. Returns a *NotFoundError when no Subscriptions ID was found.
func (*SubscriptionsQuery) FirstIDX ¶
func (sq *SubscriptionsQuery) FirstIDX(ctx context.Context) int64
FirstIDX is like FirstID, but panics if an error occurs.
func (*SubscriptionsQuery) FirstX ¶
func (sq *SubscriptionsQuery) FirstX(ctx context.Context) *Subscriptions
FirstX is like First, but panics if an error occurs.
func (*SubscriptionsQuery) GroupBy ¶
func (sq *SubscriptionsQuery) GroupBy(field string, fields ...string) *SubscriptionsGroupBy
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 {
UserID int64 `json:"user_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Subscriptions.Query().
GroupBy(subscriptions.FieldUserID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SubscriptionsQuery) IDs ¶
func (sq *SubscriptionsQuery) IDs(ctx context.Context) (ids []int64, err error)
IDs executes the query and returns a list of Subscriptions IDs.
func (*SubscriptionsQuery) IDsX ¶
func (sq *SubscriptionsQuery) IDsX(ctx context.Context) []int64
IDsX is like IDs, but panics if an error occurs.
func (*SubscriptionsQuery) Limit ¶
func (sq *SubscriptionsQuery) Limit(limit int) *SubscriptionsQuery
Limit the number of records to be returned by this query.
func (*SubscriptionsQuery) Modify ¶
func (sq *SubscriptionsQuery) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionsSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*SubscriptionsQuery) Offset ¶
func (sq *SubscriptionsQuery) Offset(offset int) *SubscriptionsQuery
Offset to start from.
func (*SubscriptionsQuery) Only ¶
func (sq *SubscriptionsQuery) Only(ctx context.Context) (*Subscriptions, error)
Only returns a single Subscriptions entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subscriptions entity is found. Returns a *NotFoundError when no Subscriptions entities are found.
func (*SubscriptionsQuery) OnlyID ¶
func (sq *SubscriptionsQuery) OnlyID(ctx context.Context) (id int64, err error)
OnlyID is like Only, but returns the only Subscriptions ID in the query. Returns a *NotSingularError when more than one Subscriptions ID is found. Returns a *NotFoundError when no entities are found.
func (*SubscriptionsQuery) OnlyIDX ¶
func (sq *SubscriptionsQuery) OnlyIDX(ctx context.Context) int64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SubscriptionsQuery) OnlyX ¶
func (sq *SubscriptionsQuery) OnlyX(ctx context.Context) *Subscriptions
OnlyX is like Only, but panics if an error occurs.
func (*SubscriptionsQuery) Order ¶
func (sq *SubscriptionsQuery) Order(o ...subscriptions.OrderOption) *SubscriptionsQuery
Order specifies how the records should be ordered.
func (*SubscriptionsQuery) QueryInvoices ¶
func (sq *SubscriptionsQuery) QueryInvoices() *InvoiceQuery
QueryInvoices chains the current query on the "invoices" edge.
func (*SubscriptionsQuery) QueryProduct ¶
func (sq *SubscriptionsQuery) QueryProduct() *ProductQuery
QueryProduct chains the current query on the "product" edge.
func (*SubscriptionsQuery) Select ¶
func (sq *SubscriptionsQuery) Select(fields ...string) *SubscriptionsSelect
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 {
UserID int64 `json:"user_id,omitempty"`
}
client.Subscriptions.Query().
Select(subscriptions.FieldUserID).
Scan(ctx, &v)
func (*SubscriptionsQuery) Unique ¶
func (sq *SubscriptionsQuery) Unique(unique bool) *SubscriptionsQuery
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 (*SubscriptionsQuery) Where ¶
func (sq *SubscriptionsQuery) Where(ps ...predicate.Subscriptions) *SubscriptionsQuery
Where adds a new predicate for the SubscriptionsQuery builder.
func (*SubscriptionsQuery) WithInvoices ¶
func (sq *SubscriptionsQuery) WithInvoices(opts ...func(*InvoiceQuery)) *SubscriptionsQuery
WithInvoices tells the query-builder to eager-load the nodes that are connected to the "invoices" edge. The optional arguments are used to configure the query builder of the edge.
func (*SubscriptionsQuery) WithProduct ¶
func (sq *SubscriptionsQuery) WithProduct(opts ...func(*ProductQuery)) *SubscriptionsQuery
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 SubscriptionsSelect ¶
type SubscriptionsSelect struct {
*SubscriptionsQuery
// contains filtered or unexported fields
}
SubscriptionsSelect is the builder for selecting fields of Subscriptions entities.
func (*SubscriptionsSelect) Aggregate ¶
func (ss *SubscriptionsSelect) Aggregate(fns ...AggregateFunc) *SubscriptionsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SubscriptionsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscriptionsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscriptionsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscriptionsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscriptionsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscriptionsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscriptionsSelect) Modify ¶
func (ss *SubscriptionsSelect) Modify(modifiers ...func(s *sql.Selector)) *SubscriptionsSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*SubscriptionsSelect) Scan ¶
func (ss *SubscriptionsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SubscriptionsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscriptionsSlice ¶
type SubscriptionsSlice []*Subscriptions
SubscriptionsSlice is a parsable slice of Subscriptions.
type SubscriptionsUpdate ¶
type SubscriptionsUpdate struct {
// contains filtered or unexported fields
}
SubscriptionsUpdate is the builder for updating Subscriptions entities.
func (*SubscriptionsUpdate) AddInvoiceIDs ¶
func (su *SubscriptionsUpdate) AddInvoiceIDs(ids ...int64) *SubscriptionsUpdate
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*SubscriptionsUpdate) AddInvoices ¶
func (su *SubscriptionsUpdate) AddInvoices(i ...*Invoice) *SubscriptionsUpdate
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*SubscriptionsUpdate) ClearInvoices ¶
func (su *SubscriptionsUpdate) ClearInvoices() *SubscriptionsUpdate
ClearInvoices clears all "invoices" edges to the Invoice entity.
func (*SubscriptionsUpdate) Exec ¶
func (su *SubscriptionsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionsUpdate) ExecX ¶
func (su *SubscriptionsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsUpdate) Modify ¶
func (su *SubscriptionsUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionsUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*SubscriptionsUpdate) Mutation ¶
func (su *SubscriptionsUpdate) Mutation() *SubscriptionsMutation
Mutation returns the SubscriptionsMutation object of the builder.
func (*SubscriptionsUpdate) RemoveInvoiceIDs ¶
func (su *SubscriptionsUpdate) RemoveInvoiceIDs(ids ...int64) *SubscriptionsUpdate
RemoveInvoiceIDs removes the "invoices" edge to Invoice entities by IDs.
func (*SubscriptionsUpdate) RemoveInvoices ¶
func (su *SubscriptionsUpdate) RemoveInvoices(i ...*Invoice) *SubscriptionsUpdate
RemoveInvoices removes "invoices" edges to Invoice entities.
func (*SubscriptionsUpdate) Save ¶
func (su *SubscriptionsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SubscriptionsUpdate) SaveX ¶
func (su *SubscriptionsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionsUpdate) Where ¶
func (su *SubscriptionsUpdate) Where(ps ...predicate.Subscriptions) *SubscriptionsUpdate
Where appends a list predicates to the SubscriptionsUpdate builder.
type SubscriptionsUpdateOne ¶
type SubscriptionsUpdateOne struct {
// contains filtered or unexported fields
}
SubscriptionsUpdateOne is the builder for updating a single Subscriptions entity.
func (*SubscriptionsUpdateOne) AddInvoiceIDs ¶
func (suo *SubscriptionsUpdateOne) AddInvoiceIDs(ids ...int64) *SubscriptionsUpdateOne
AddInvoiceIDs adds the "invoices" edge to the Invoice entity by IDs.
func (*SubscriptionsUpdateOne) AddInvoices ¶
func (suo *SubscriptionsUpdateOne) AddInvoices(i ...*Invoice) *SubscriptionsUpdateOne
AddInvoices adds the "invoices" edges to the Invoice entity.
func (*SubscriptionsUpdateOne) ClearInvoices ¶
func (suo *SubscriptionsUpdateOne) ClearInvoices() *SubscriptionsUpdateOne
ClearInvoices clears all "invoices" edges to the Invoice entity.
func (*SubscriptionsUpdateOne) Exec ¶
func (suo *SubscriptionsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SubscriptionsUpdateOne) ExecX ¶
func (suo *SubscriptionsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsUpdateOne) Modify ¶
func (suo *SubscriptionsUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SubscriptionsUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*SubscriptionsUpdateOne) Mutation ¶
func (suo *SubscriptionsUpdateOne) Mutation() *SubscriptionsMutation
Mutation returns the SubscriptionsMutation object of the builder.
func (*SubscriptionsUpdateOne) RemoveInvoiceIDs ¶
func (suo *SubscriptionsUpdateOne) RemoveInvoiceIDs(ids ...int64) *SubscriptionsUpdateOne
RemoveInvoiceIDs removes the "invoices" edge to Invoice entities by IDs.
func (*SubscriptionsUpdateOne) RemoveInvoices ¶
func (suo *SubscriptionsUpdateOne) RemoveInvoices(i ...*Invoice) *SubscriptionsUpdateOne
RemoveInvoices removes "invoices" edges to Invoice entities.
func (*SubscriptionsUpdateOne) Save ¶
func (suo *SubscriptionsUpdateOne) Save(ctx context.Context) (*Subscriptions, error)
Save executes the query and returns the updated Subscriptions entity.
func (*SubscriptionsUpdateOne) SaveX ¶
func (suo *SubscriptionsUpdateOne) SaveX(ctx context.Context) *Subscriptions
SaveX is like Save, but panics if an error occurs.
func (*SubscriptionsUpdateOne) Select ¶
func (suo *SubscriptionsUpdateOne) Select(field string, fields ...string) *SubscriptionsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SubscriptionsUpdateOne) Where ¶
func (suo *SubscriptionsUpdateOne) Where(ps ...predicate.Subscriptions) *SubscriptionsUpdateOne
Where appends a list predicates to the SubscriptionsUpdate builder.
type SubscriptionsUpsert ¶
SubscriptionsUpsert is the "OnConflict" setter.
type SubscriptionsUpsertBulk ¶
type SubscriptionsUpsertBulk struct {
// contains filtered or unexported fields
}
SubscriptionsUpsertBulk is the builder for "upsert"-ing a bulk of Subscriptions nodes.
func (*SubscriptionsUpsertBulk) DoNothing ¶
func (u *SubscriptionsUpsertBulk) DoNothing() *SubscriptionsUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SubscriptionsUpsertBulk) Exec ¶
func (u *SubscriptionsUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionsUpsertBulk) ExecX ¶
func (u *SubscriptionsUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsUpsertBulk) Ignore ¶
func (u *SubscriptionsUpsertBulk) Ignore() *SubscriptionsUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Subscriptions.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*SubscriptionsUpsertBulk) Update ¶
func (u *SubscriptionsUpsertBulk) Update(set func(*SubscriptionsUpsert)) *SubscriptionsUpsertBulk
Update allows overriding fields `UPDATE` values. See the SubscriptionsCreateBulk.OnConflict documentation for more info.
func (*SubscriptionsUpsertBulk) UpdateNewValues ¶
func (u *SubscriptionsUpsertBulk) UpdateNewValues() *SubscriptionsUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Subscriptions.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(subscriptions.FieldID)
}),
).
Exec(ctx)
type SubscriptionsUpsertOne ¶
type SubscriptionsUpsertOne struct {
// contains filtered or unexported fields
}
SubscriptionsUpsertOne is the builder for "upsert"-ing
one Subscriptions node.
func (*SubscriptionsUpsertOne) DoNothing ¶
func (u *SubscriptionsUpsertOne) DoNothing() *SubscriptionsUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*SubscriptionsUpsertOne) Exec ¶
func (u *SubscriptionsUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscriptionsUpsertOne) ExecX ¶
func (u *SubscriptionsUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscriptionsUpsertOne) ID ¶
func (u *SubscriptionsUpsertOne) ID(ctx context.Context) (id int64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*SubscriptionsUpsertOne) IDX ¶
func (u *SubscriptionsUpsertOne) IDX(ctx context.Context) int64
IDX is like ID, but panics if an error occurs.
func (*SubscriptionsUpsertOne) Ignore ¶
func (u *SubscriptionsUpsertOne) Ignore() *SubscriptionsUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Subscriptions.Create().
OnConflict(sql.ResolveWithIgnore()).
Exec(ctx)
func (*SubscriptionsUpsertOne) Update ¶
func (u *SubscriptionsUpsertOne) Update(set func(*SubscriptionsUpsert)) *SubscriptionsUpsertOne
Update allows overriding fields `UPDATE` values. See the SubscriptionsCreate.OnConflict documentation for more info.
func (*SubscriptionsUpsertOne) UpdateNewValues ¶
func (u *SubscriptionsUpsertOne) UpdateNewValues() *SubscriptionsUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Subscriptions.Create().
OnConflict(
sql.ResolveWithNewValues(),
sql.ResolveWith(func(u *sql.UpdateSet) {
u.SetIgnore(subscriptions.FieldID)
}),
).
Exec(ctx)
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// Bundle is the client for interacting with the Bundle builders.
Bundle *BundleClient
// Invoice is the client for interacting with the Invoice builders.
Invoice *InvoiceClient
// Item is the client for interacting with the Item builders.
Item *ItemClient
// PaymentProfile is the client for interacting with the PaymentProfile builders.
PaymentProfile *PaymentProfileClient
// Product is the client for interacting with the Product builders.
Product *ProductClient
// ProductReservation is the client for interacting with the ProductReservation builders.
ProductReservation *ProductReservationClient
// Subscriptions is the client for interacting with the Subscriptions builders.
Subscriptions *SubscriptionsClient
// 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
¶
- bundle.go
- bundle_create.go
- bundle_delete.go
- bundle_query.go
- bundle_update.go
- client.go
- ent.go
- entql.go
- generate.go
- invoice.go
- invoice_create.go
- invoice_delete.go
- invoice_query.go
- invoice_update.go
- item.go
- item_create.go
- item_delete.go
- item_query.go
- item_update.go
- mutation.go
- paymentprofile.go
- paymentprofile_create.go
- paymentprofile_delete.go
- paymentprofile_query.go
- paymentprofile_update.go
- product.go
- product_create.go
- product_delete.go
- product_query.go
- product_update.go
- productreservation.go
- productreservation_create.go
- productreservation_delete.go
- productreservation_query.go
- productreservation_update.go
- runtime.go
- subscriptions.go
- subscriptions_create.go
- subscriptions_delete.go
- subscriptions_query.go
- subscriptions_update.go
- tx.go