Documentation ¶
Index ¶
- Constants
- Variables
- 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
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, 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 Cursor
- type EntgoClient
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type Order
- func (c *Order) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (n *Order) IsNode()
- func (c *Order) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (o *Order) String() string
- func (o *Order) ToEdge(order *OrderOrder) *OrderEdge
- func (o *Order) Unwrap() *Order
- func (o *Order) Update() *OrderUpdateOne
- type OrderClient
- func (c *OrderClient) Create() *OrderCreate
- func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
- func (c *OrderClient) Delete() *OrderDelete
- func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
- func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne
- func (c *OrderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OrderClient) Get(ctx context.Context, id int) (*Order, error)
- func (c *OrderClient) GetX(ctx context.Context, id int) *Order
- func (c *OrderClient) Hooks() []Hook
- func (c *OrderClient) Intercept(interceptors ...Interceptor)
- func (c *OrderClient) Interceptors() []Interceptor
- func (c *OrderClient) Query() *OrderQuery
- func (c *OrderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *OrderClient) Update() *OrderUpdate
- func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
- func (c *OrderClient) UpdateOneID(id int) *OrderUpdateOne
- func (c *OrderClient) Use(hooks ...Hook)
- type OrderConnection
- type OrderCreate
- func (oc *OrderCreate) Exec(ctx context.Context) error
- func (c *OrderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (oc *OrderCreate) ExecX(ctx context.Context)
- func (oc *OrderCreate) Mutation() *OrderMutation
- func (oc *OrderCreate) OnConflict(opts ...sql.ConflictOption) *OrderUpsertOne
- func (oc *OrderCreate) OnConflictColumns(columns ...string) *OrderUpsertOne
- func (c *OrderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
- func (oc *OrderCreate) SaveX(ctx context.Context) *Order
- func (oc *OrderCreate) SetOrderDetails(md models.OrderDetails) *OrderCreate
- func (oc *OrderCreate) SetPreferredExchanges(m []models.Exchange) *OrderCreate
- type OrderCreateBulk
- func (ocb *OrderCreateBulk) Exec(ctx context.Context) error
- func (c *OrderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ocb *OrderCreateBulk) ExecX(ctx context.Context)
- func (ocb *OrderCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrderUpsertBulk
- func (ocb *OrderCreateBulk) OnConflictColumns(columns ...string) *OrderUpsertBulk
- func (c *OrderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ocb *OrderCreateBulk) Save(ctx context.Context) ([]*Order, error)
- func (ocb *OrderCreateBulk) SaveX(ctx context.Context) []*Order
- type OrderDelete
- func (od *OrderDelete) Exec(ctx context.Context) (int, error)
- func (c *OrderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (od *OrderDelete) ExecX(ctx context.Context) int
- func (c *OrderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (od *OrderDelete) Where(ps ...predicate.Order) *OrderDelete
- type OrderDeleteOne
- type OrderDirection
- type OrderEdge
- type OrderFilter
- func (c *OrderFilter) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OrderFilter) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (f *OrderFilter) Where(p entql.P)
- func (f *OrderFilter) WhereID(p entql.IntP)
- func (f *OrderFilter) WhereOrderDetails(p entql.BytesP)
- func (f *OrderFilter) WherePreferredExchanges(p entql.BytesP)
- type OrderFunc
- type OrderGroupBy
- func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
- func (s *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderGroupBy) IntX(ctx context.Context) int
- func (s *OrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderGroupBy) StringX(ctx context.Context) string
- func (s *OrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderGroupBy) StringsX(ctx context.Context) []string
- type OrderMutation
- func (m *OrderMutation) AddField(name string, value ent.Value) error
- func (m *OrderMutation) AddedEdges() []string
- func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderMutation) AddedFields() []string
- func (m *OrderMutation) AddedIDs(name string) []ent.Value
- func (m *OrderMutation) AppendPreferredExchanges(value []models.Exchange)
- func (m *OrderMutation) AppendedPreferredExchanges() ([]models.Exchange, bool)
- func (m *OrderMutation) ClearEdge(name string) error
- func (m *OrderMutation) ClearField(name string) error
- func (m *OrderMutation) ClearedEdges() []string
- func (m *OrderMutation) ClearedFields() []string
- func (m OrderMutation) Client() *Client
- func (m *OrderMutation) EdgeCleared(name string) bool
- func (c *OrderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *OrderMutation) Field(name string) (ent.Value, bool)
- func (m *OrderMutation) FieldCleared(name string) bool
- func (m *OrderMutation) Fields() []string
- func (m *OrderMutation) Filter() *OrderFilter
- func (m *OrderMutation) ID() (id int, exists bool)
- func (m *OrderMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderMutation) OldOrderDetails(ctx context.Context) (v models.OrderDetails, err error)
- func (m *OrderMutation) OldPreferredExchanges(ctx context.Context) (v []models.Exchange, err error)
- func (m *OrderMutation) Op() Op
- func (m *OrderMutation) OrderDetails() (r models.OrderDetails, exists bool)
- func (m *OrderMutation) PreferredExchanges() (r []models.Exchange, exists bool)
- func (c *OrderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *OrderMutation) RemovedEdges() []string
- func (m *OrderMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderMutation) ResetEdge(name string) error
- func (m *OrderMutation) ResetField(name string) error
- func (m *OrderMutation) ResetOrderDetails()
- func (m *OrderMutation) ResetPreferredExchanges()
- func (m *OrderMutation) SetField(name string, value ent.Value) error
- func (m *OrderMutation) SetOp(op Op)
- func (m *OrderMutation) SetOrderDetails(md models.OrderDetails)
- func (m *OrderMutation) SetPreferredExchanges(value []models.Exchange)
- func (m OrderMutation) Tx() (*Tx, error)
- func (m *OrderMutation) Type() string
- func (m *OrderMutation) Where(ps ...predicate.Order)
- func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
- type OrderOrder
- type OrderOrderField
- type OrderPaginateOption
- type OrderQuery
- func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
- func (oq *OrderQuery) AllX(ctx context.Context) []*Order
- func (oq *OrderQuery) Clone() *OrderQuery
- func (o *OrderQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrderQuery, error)
- func (oq *OrderQuery) Count(ctx context.Context) (int, error)
- func (oq *OrderQuery) CountX(ctx context.Context) int
- func (c *OrderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OrderQuery) ExistX(ctx context.Context) bool
- func (oq *OrderQuery) Filter() *OrderFilter
- func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) FirstID(ctx context.Context) (id int, err error)
- func (oq *OrderQuery) FirstIDX(ctx context.Context) int
- func (oq *OrderQuery) FirstX(ctx context.Context) *Order
- func (oq *OrderQuery) ForShare(opts ...sql.LockOption) *OrderQuery
- func (oq *OrderQuery) ForUpdate(opts ...sql.LockOption) *OrderQuery
- func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
- func (oq *OrderQuery) IDs(ctx context.Context) ([]int, error)
- func (oq *OrderQuery) IDsX(ctx context.Context) []int
- func (oq *OrderQuery) Limit(limit int) *OrderQuery
- func (oq *OrderQuery) Modify(modifiers ...func(s *sql.Selector)) *OrderSelect
- func (oq *OrderQuery) Offset(offset int) *OrderQuery
- func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) OnlyID(ctx context.Context) (id int, err error)
- func (oq *OrderQuery) OnlyIDX(ctx context.Context) int
- func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
- func (oq *OrderQuery) Order(o ...OrderFunc) *OrderQuery
- func (o *OrderQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*OrderConnection, error)
- func (c *OrderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (oq *OrderQuery) Select(fields ...string) *OrderSelect
- func (oq *OrderQuery) Unique(unique bool) *OrderQuery
- func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
- type OrderSelect
- func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (s *OrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderSelect) BoolX(ctx context.Context) bool
- func (s *OrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderSelect) BoolsX(ctx context.Context) []bool
- func (c OrderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *OrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderSelect) Float64X(ctx context.Context) float64
- func (s *OrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderSelect) IntX(ctx context.Context) int
- func (s *OrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderSelect) IntsX(ctx context.Context) []int
- func (os *OrderSelect) Modify(modifiers ...func(s *sql.Selector)) *OrderSelect
- func (c OrderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (os *OrderSelect) Scan(ctx context.Context, v any) error
- func (s *OrderSelect) ScanX(ctx context.Context, v any)
- func (s *OrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderSelect) StringX(ctx context.Context) string
- func (s *OrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderSelect) StringsX(ctx context.Context) []string
- type OrderUpdate
- func (ou *OrderUpdate) AppendPreferredExchanges(m []models.Exchange) *OrderUpdate
- func (ou *OrderUpdate) Exec(ctx context.Context) error
- func (c *OrderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ou *OrderUpdate) ExecX(ctx context.Context)
- func (ou *OrderUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrderUpdate
- func (ou *OrderUpdate) Mutation() *OrderMutation
- func (c *OrderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrderUpdate) SaveX(ctx context.Context) int
- func (ou *OrderUpdate) SetOrderDetails(md models.OrderDetails) *OrderUpdate
- func (ou *OrderUpdate) SetPreferredExchanges(m []models.Exchange) *OrderUpdate
- func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
- type OrderUpdateOne
- func (ouo *OrderUpdateOne) AppendPreferredExchanges(m []models.Exchange) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
- func (c *OrderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrderUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Mutation() *OrderMutation
- func (c *OrderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
- func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
- func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderDetails(md models.OrderDetails) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetPreferredExchanges(m []models.Exchange) *OrderUpdateOne
- type OrderUpsert
- type OrderUpsertBulk
- func (u *OrderUpsertBulk) DoNothing() *OrderUpsertBulk
- func (u *OrderUpsertBulk) Exec(ctx context.Context) error
- func (u *OrderUpsertBulk) ExecX(ctx context.Context)
- func (u *OrderUpsertBulk) Ignore() *OrderUpsertBulk
- func (u *OrderUpsertBulk) SetOrderDetails(v models.OrderDetails) *OrderUpsertBulk
- func (u *OrderUpsertBulk) SetPreferredExchanges(v []models.Exchange) *OrderUpsertBulk
- func (u *OrderUpsertBulk) Update(set func(*OrderUpsert)) *OrderUpsertBulk
- func (u *OrderUpsertBulk) UpdateNewValues() *OrderUpsertBulk
- func (u *OrderUpsertBulk) UpdateOrderDetails() *OrderUpsertBulk
- func (u *OrderUpsertBulk) UpdatePreferredExchanges() *OrderUpsertBulk
- type OrderUpsertOne
- func (u *OrderUpsertOne) DoNothing() *OrderUpsertOne
- func (u *OrderUpsertOne) Exec(ctx context.Context) error
- func (u *OrderUpsertOne) ExecX(ctx context.Context)
- func (u *OrderUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *OrderUpsertOne) IDX(ctx context.Context) int
- func (u *OrderUpsertOne) Ignore() *OrderUpsertOne
- func (u *OrderUpsertOne) SetOrderDetails(v models.OrderDetails) *OrderUpsertOne
- func (u *OrderUpsertOne) SetPreferredExchanges(v []models.Exchange) *OrderUpsertOne
- func (u *OrderUpsertOne) Update(set func(*OrderUpsert)) *OrderUpsertOne
- func (u *OrderUpsertOne) UpdateNewValues() *OrderUpsertOne
- func (u *OrderUpsertOne) UpdateOrderDetails() *OrderUpsertOne
- func (u *OrderUpsertOne) UpdatePreferredExchanges() *OrderUpsertOne
- type OrderWhereInput
- type Orders
- type Outbox
- func (c *Outbox) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (n *Outbox) IsNode()
- func (c *Outbox) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (o *Outbox) String() string
- func (o *Outbox) ToEdge(order *OutboxOrder) *OutboxEdge
- func (o *Outbox) Unwrap() *Outbox
- func (o *Outbox) Update() *OutboxUpdateOne
- type OutboxClient
- func (c *OutboxClient) Create() *OutboxCreate
- func (c *OutboxClient) CreateBulk(builders ...*OutboxCreate) *OutboxCreateBulk
- func (c *OutboxClient) Delete() *OutboxDelete
- func (c *OutboxClient) DeleteOne(o *Outbox) *OutboxDeleteOne
- func (c *OutboxClient) DeleteOneID(id int) *OutboxDeleteOne
- func (c *OutboxClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OutboxClient) Get(ctx context.Context, id int) (*Outbox, error)
- func (c *OutboxClient) GetX(ctx context.Context, id int) *Outbox
- func (c *OutboxClient) Hooks() []Hook
- func (c *OutboxClient) Intercept(interceptors ...Interceptor)
- func (c *OutboxClient) Interceptors() []Interceptor
- func (c *OutboxClient) Query() *OutboxQuery
- func (c *OutboxClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *OutboxClient) Update() *OutboxUpdate
- func (c *OutboxClient) UpdateOne(o *Outbox) *OutboxUpdateOne
- func (c *OutboxClient) UpdateOneID(id int) *OutboxUpdateOne
- func (c *OutboxClient) Use(hooks ...Hook)
- type OutboxConnection
- type OutboxCreate
- func (oc *OutboxCreate) Exec(ctx context.Context) error
- func (c *OutboxCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (oc *OutboxCreate) ExecX(ctx context.Context)
- func (oc *OutboxCreate) Mutation() *OutboxMutation
- func (oc *OutboxCreate) OnConflict(opts ...sql.ConflictOption) *OutboxUpsertOne
- func (oc *OutboxCreate) OnConflictColumns(columns ...string) *OutboxUpsertOne
- func (c *OutboxCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (oc *OutboxCreate) Save(ctx context.Context) (*Outbox, error)
- func (oc *OutboxCreate) SaveX(ctx context.Context) *Outbox
- func (oc *OutboxCreate) SetHeaders(m map[string]string) *OutboxCreate
- func (oc *OutboxCreate) SetKey(s string) *OutboxCreate
- func (oc *OutboxCreate) SetLastRetry(t time.Time) *OutboxCreate
- func (oc *OutboxCreate) SetNillableLastRetry(t *time.Time) *OutboxCreate
- func (oc *OutboxCreate) SetPayload(b []byte) *OutboxCreate
- func (oc *OutboxCreate) SetProcessingErrors(s []string) *OutboxCreate
- func (oc *OutboxCreate) SetRetryCount(i int) *OutboxCreate
- func (oc *OutboxCreate) SetStatus(o outbox.Status) *OutboxCreate
- func (oc *OutboxCreate) SetTimestamp(t time.Time) *OutboxCreate
- func (oc *OutboxCreate) SetTopic(s string) *OutboxCreate
- type OutboxCreateBulk
- func (ocb *OutboxCreateBulk) Exec(ctx context.Context) error
- func (c *OutboxCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ocb *OutboxCreateBulk) ExecX(ctx context.Context)
- func (ocb *OutboxCreateBulk) OnConflict(opts ...sql.ConflictOption) *OutboxUpsertBulk
- func (ocb *OutboxCreateBulk) OnConflictColumns(columns ...string) *OutboxUpsertBulk
- func (c *OutboxCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ocb *OutboxCreateBulk) Save(ctx context.Context) ([]*Outbox, error)
- func (ocb *OutboxCreateBulk) SaveX(ctx context.Context) []*Outbox
- type OutboxDelete
- func (od *OutboxDelete) Exec(ctx context.Context) (int, error)
- func (c *OutboxDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (od *OutboxDelete) ExecX(ctx context.Context) int
- func (c *OutboxDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (od *OutboxDelete) Where(ps ...predicate.Outbox) *OutboxDelete
- type OutboxDeleteOne
- type OutboxEdge
- type OutboxFilter
- func (c *OutboxFilter) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OutboxFilter) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (f *OutboxFilter) Where(p entql.P)
- func (f *OutboxFilter) WhereHeaders(p entql.BytesP)
- func (f *OutboxFilter) WhereID(p entql.IntP)
- func (f *OutboxFilter) WhereKey(p entql.StringP)
- func (f *OutboxFilter) WhereLastRetry(p entql.TimeP)
- func (f *OutboxFilter) WherePayload(p entql.BytesP)
- func (f *OutboxFilter) WhereProcessingErrors(p entql.BytesP)
- func (f *OutboxFilter) WhereRetryCount(p entql.IntP)
- func (f *OutboxFilter) WhereStatus(p entql.StringP)
- func (f *OutboxFilter) WhereTimestamp(p entql.TimeP)
- func (f *OutboxFilter) WhereTopic(p entql.StringP)
- type OutboxGroupBy
- func (ogb *OutboxGroupBy) Aggregate(fns ...AggregateFunc) *OutboxGroupBy
- func (s *OutboxGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OutboxGroupBy) BoolX(ctx context.Context) bool
- func (s *OutboxGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OutboxGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OutboxGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OutboxGroupBy) Float64X(ctx context.Context) float64
- func (s *OutboxGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OutboxGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OutboxGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OutboxGroupBy) IntX(ctx context.Context) int
- func (s *OutboxGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OutboxGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OutboxGroupBy) Scan(ctx context.Context, v any) error
- func (s *OutboxGroupBy) ScanX(ctx context.Context, v any)
- func (s *OutboxGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OutboxGroupBy) StringX(ctx context.Context) string
- func (s *OutboxGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OutboxGroupBy) StringsX(ctx context.Context) []string
- type OutboxMutation
- func (m *OutboxMutation) AddField(name string, value ent.Value) error
- func (m *OutboxMutation) AddRetryCount(i int)
- func (m *OutboxMutation) AddedEdges() []string
- func (m *OutboxMutation) AddedField(name string) (ent.Value, bool)
- func (m *OutboxMutation) AddedFields() []string
- func (m *OutboxMutation) AddedIDs(name string) []ent.Value
- func (m *OutboxMutation) AddedRetryCount() (r int, exists bool)
- func (m *OutboxMutation) AppendProcessingErrors(s []string)
- func (m *OutboxMutation) AppendedProcessingErrors() ([]string, bool)
- func (m *OutboxMutation) ClearEdge(name string) error
- func (m *OutboxMutation) ClearField(name string) error
- func (m *OutboxMutation) ClearLastRetry()
- func (m *OutboxMutation) ClearProcessingErrors()
- func (m *OutboxMutation) ClearedEdges() []string
- func (m *OutboxMutation) ClearedFields() []string
- func (m OutboxMutation) Client() *Client
- func (m *OutboxMutation) EdgeCleared(name string) bool
- func (c *OutboxMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *OutboxMutation) Field(name string) (ent.Value, bool)
- func (m *OutboxMutation) FieldCleared(name string) bool
- func (m *OutboxMutation) Fields() []string
- func (m *OutboxMutation) Filter() *OutboxFilter
- func (m *OutboxMutation) Headers() (r map[string]string, exists bool)
- func (m *OutboxMutation) ID() (id int, exists bool)
- func (m *OutboxMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OutboxMutation) Key() (r string, exists bool)
- func (m *OutboxMutation) LastRetry() (r time.Time, exists bool)
- func (m *OutboxMutation) LastRetryCleared() bool
- func (m *OutboxMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OutboxMutation) OldHeaders(ctx context.Context) (v map[string]string, err error)
- func (m *OutboxMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *OutboxMutation) OldLastRetry(ctx context.Context) (v time.Time, err error)
- func (m *OutboxMutation) OldPayload(ctx context.Context) (v []byte, err error)
- func (m *OutboxMutation) OldProcessingErrors(ctx context.Context) (v []string, err error)
- func (m *OutboxMutation) OldRetryCount(ctx context.Context) (v int, err error)
- func (m *OutboxMutation) OldStatus(ctx context.Context) (v outbox.Status, err error)
- func (m *OutboxMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *OutboxMutation) OldTopic(ctx context.Context) (v string, err error)
- func (m *OutboxMutation) Op() Op
- func (m *OutboxMutation) Payload() (r []byte, exists bool)
- func (m *OutboxMutation) ProcessingErrors() (r []string, exists bool)
- func (m *OutboxMutation) ProcessingErrorsCleared() bool
- func (c *OutboxMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *OutboxMutation) RemovedEdges() []string
- func (m *OutboxMutation) RemovedIDs(name string) []ent.Value
- func (m *OutboxMutation) ResetEdge(name string) error
- func (m *OutboxMutation) ResetField(name string) error
- func (m *OutboxMutation) ResetHeaders()
- func (m *OutboxMutation) ResetKey()
- func (m *OutboxMutation) ResetLastRetry()
- func (m *OutboxMutation) ResetPayload()
- func (m *OutboxMutation) ResetProcessingErrors()
- func (m *OutboxMutation) ResetRetryCount()
- func (m *OutboxMutation) ResetStatus()
- func (m *OutboxMutation) ResetTimestamp()
- func (m *OutboxMutation) ResetTopic()
- func (m *OutboxMutation) RetryCount() (r int, exists bool)
- func (m *OutboxMutation) SetField(name string, value ent.Value) error
- func (m *OutboxMutation) SetHeaders(value map[string]string)
- func (m *OutboxMutation) SetKey(s string)
- func (m *OutboxMutation) SetLastRetry(t time.Time)
- func (m *OutboxMutation) SetOp(op Op)
- func (m *OutboxMutation) SetPayload(b []byte)
- func (m *OutboxMutation) SetProcessingErrors(s []string)
- func (m *OutboxMutation) SetRetryCount(i int)
- func (m *OutboxMutation) SetStatus(o outbox.Status)
- func (m *OutboxMutation) SetTimestamp(t time.Time)
- func (m *OutboxMutation) SetTopic(s string)
- func (m *OutboxMutation) Status() (r outbox.Status, exists bool)
- func (m *OutboxMutation) Timestamp() (r time.Time, exists bool)
- func (m *OutboxMutation) Topic() (r string, exists bool)
- func (m OutboxMutation) Tx() (*Tx, error)
- func (m *OutboxMutation) Type() string
- func (m *OutboxMutation) Where(ps ...predicate.Outbox)
- func (m *OutboxMutation) WhereP(ps ...func(*sql.Selector))
- type OutboxOrder
- type OutboxOrderField
- type OutboxPaginateOption
- type OutboxQuery
- func (oq *OutboxQuery) Aggregate(fns ...AggregateFunc) *OutboxSelect
- func (oq *OutboxQuery) All(ctx context.Context) ([]*Outbox, error)
- func (oq *OutboxQuery) AllX(ctx context.Context) []*Outbox
- func (oq *OutboxQuery) Clone() *OutboxQuery
- func (o *OutboxQuery) CollectFields(ctx context.Context, satisfies ...string) (*OutboxQuery, error)
- func (oq *OutboxQuery) Count(ctx context.Context) (int, error)
- func (oq *OutboxQuery) CountX(ctx context.Context) int
- func (c *OutboxQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (oq *OutboxQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OutboxQuery) ExistX(ctx context.Context) bool
- func (oq *OutboxQuery) Filter() *OutboxFilter
- func (oq *OutboxQuery) First(ctx context.Context) (*Outbox, error)
- func (oq *OutboxQuery) FirstID(ctx context.Context) (id int, err error)
- func (oq *OutboxQuery) FirstIDX(ctx context.Context) int
- func (oq *OutboxQuery) FirstX(ctx context.Context) *Outbox
- func (oq *OutboxQuery) ForShare(opts ...sql.LockOption) *OutboxQuery
- func (oq *OutboxQuery) ForUpdate(opts ...sql.LockOption) *OutboxQuery
- func (oq *OutboxQuery) GroupBy(field string, fields ...string) *OutboxGroupBy
- func (oq *OutboxQuery) IDs(ctx context.Context) ([]int, error)
- func (oq *OutboxQuery) IDsX(ctx context.Context) []int
- func (oq *OutboxQuery) Limit(limit int) *OutboxQuery
- func (oq *OutboxQuery) Modify(modifiers ...func(s *sql.Selector)) *OutboxSelect
- func (oq *OutboxQuery) Offset(offset int) *OutboxQuery
- func (oq *OutboxQuery) Only(ctx context.Context) (*Outbox, error)
- func (oq *OutboxQuery) OnlyID(ctx context.Context) (id int, err error)
- func (oq *OutboxQuery) OnlyIDX(ctx context.Context) int
- func (oq *OutboxQuery) OnlyX(ctx context.Context) *Outbox
- func (oq *OutboxQuery) Order(o ...OrderFunc) *OutboxQuery
- func (o *OutboxQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*OutboxConnection, error)
- func (c *OutboxQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (oq *OutboxQuery) Select(fields ...string) *OutboxSelect
- func (oq *OutboxQuery) Unique(unique bool) *OutboxQuery
- func (oq *OutboxQuery) Where(ps ...predicate.Outbox) *OutboxQuery
- type OutboxSelect
- func (os *OutboxSelect) Aggregate(fns ...AggregateFunc) *OutboxSelect
- func (s *OutboxSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OutboxSelect) BoolX(ctx context.Context) bool
- func (s *OutboxSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OutboxSelect) BoolsX(ctx context.Context) []bool
- func (c OutboxSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *OutboxSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OutboxSelect) Float64X(ctx context.Context) float64
- func (s *OutboxSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OutboxSelect) Float64sX(ctx context.Context) []float64
- func (s *OutboxSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OutboxSelect) IntX(ctx context.Context) int
- func (s *OutboxSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OutboxSelect) IntsX(ctx context.Context) []int
- func (os *OutboxSelect) Modify(modifiers ...func(s *sql.Selector)) *OutboxSelect
- func (c OutboxSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (os *OutboxSelect) Scan(ctx context.Context, v any) error
- func (s *OutboxSelect) ScanX(ctx context.Context, v any)
- func (s *OutboxSelect) String(ctx context.Context) (_ string, err error)
- func (s *OutboxSelect) StringX(ctx context.Context) string
- func (s *OutboxSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OutboxSelect) StringsX(ctx context.Context) []string
- type OutboxUpdate
- func (ou *OutboxUpdate) AddRetryCount(i int) *OutboxUpdate
- func (ou *OutboxUpdate) AppendProcessingErrors(s []string) *OutboxUpdate
- func (ou *OutboxUpdate) ClearLastRetry() *OutboxUpdate
- func (ou *OutboxUpdate) ClearProcessingErrors() *OutboxUpdate
- func (ou *OutboxUpdate) Exec(ctx context.Context) error
- func (c *OutboxUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ou *OutboxUpdate) ExecX(ctx context.Context)
- func (ou *OutboxUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OutboxUpdate
- func (ou *OutboxUpdate) Mutation() *OutboxMutation
- func (c *OutboxUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ou *OutboxUpdate) Save(ctx context.Context) (int, error)
- func (ou *OutboxUpdate) SaveX(ctx context.Context) int
- func (ou *OutboxUpdate) SetHeaders(m map[string]string) *OutboxUpdate
- func (ou *OutboxUpdate) SetKey(s string) *OutboxUpdate
- func (ou *OutboxUpdate) SetLastRetry(t time.Time) *OutboxUpdate
- func (ou *OutboxUpdate) SetNillableLastRetry(t *time.Time) *OutboxUpdate
- func (ou *OutboxUpdate) SetPayload(b []byte) *OutboxUpdate
- func (ou *OutboxUpdate) SetProcessingErrors(s []string) *OutboxUpdate
- func (ou *OutboxUpdate) SetRetryCount(i int) *OutboxUpdate
- func (ou *OutboxUpdate) SetStatus(o outbox.Status) *OutboxUpdate
- func (ou *OutboxUpdate) SetTimestamp(t time.Time) *OutboxUpdate
- func (ou *OutboxUpdate) SetTopic(s string) *OutboxUpdate
- func (ou *OutboxUpdate) Where(ps ...predicate.Outbox) *OutboxUpdate
- type OutboxUpdateOne
- func (ouo *OutboxUpdateOne) AddRetryCount(i int) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) AppendProcessingErrors(s []string) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) ClearLastRetry() *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) ClearProcessingErrors() *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) Exec(ctx context.Context) error
- func (c *OutboxUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ouo *OutboxUpdateOne) ExecX(ctx context.Context)
- func (ouo *OutboxUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) Mutation() *OutboxMutation
- func (c *OutboxUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ouo *OutboxUpdateOne) Save(ctx context.Context) (*Outbox, error)
- func (ouo *OutboxUpdateOne) SaveX(ctx context.Context) *Outbox
- func (ouo *OutboxUpdateOne) Select(field string, fields ...string) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetHeaders(m map[string]string) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetKey(s string) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetLastRetry(t time.Time) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetNillableLastRetry(t *time.Time) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetPayload(b []byte) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetProcessingErrors(s []string) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetRetryCount(i int) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetStatus(o outbox.Status) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetTimestamp(t time.Time) *OutboxUpdateOne
- func (ouo *OutboxUpdateOne) SetTopic(s string) *OutboxUpdateOne
- type OutboxUpsert
- func (u *OutboxUpsert) AddRetryCount(v int) *OutboxUpsert
- func (u *OutboxUpsert) ClearLastRetry() *OutboxUpsert
- func (u *OutboxUpsert) ClearProcessingErrors() *OutboxUpsert
- func (u *OutboxUpsert) SetHeaders(v map[string]string) *OutboxUpsert
- func (u *OutboxUpsert) SetKey(v string) *OutboxUpsert
- func (u *OutboxUpsert) SetLastRetry(v time.Time) *OutboxUpsert
- func (u *OutboxUpsert) SetPayload(v []byte) *OutboxUpsert
- func (u *OutboxUpsert) SetProcessingErrors(v []string) *OutboxUpsert
- func (u *OutboxUpsert) SetRetryCount(v int) *OutboxUpsert
- func (u *OutboxUpsert) SetStatus(v outbox.Status) *OutboxUpsert
- func (u *OutboxUpsert) SetTimestamp(v time.Time) *OutboxUpsert
- func (u *OutboxUpsert) SetTopic(v string) *OutboxUpsert
- func (u *OutboxUpsert) UpdateHeaders() *OutboxUpsert
- func (u *OutboxUpsert) UpdateKey() *OutboxUpsert
- func (u *OutboxUpsert) UpdateLastRetry() *OutboxUpsert
- func (u *OutboxUpsert) UpdatePayload() *OutboxUpsert
- func (u *OutboxUpsert) UpdateProcessingErrors() *OutboxUpsert
- func (u *OutboxUpsert) UpdateRetryCount() *OutboxUpsert
- func (u *OutboxUpsert) UpdateStatus() *OutboxUpsert
- func (u *OutboxUpsert) UpdateTimestamp() *OutboxUpsert
- func (u *OutboxUpsert) UpdateTopic() *OutboxUpsert
- type OutboxUpsertBulk
- func (u *OutboxUpsertBulk) AddRetryCount(v int) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) ClearLastRetry() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) ClearProcessingErrors() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) DoNothing() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) Exec(ctx context.Context) error
- func (u *OutboxUpsertBulk) ExecX(ctx context.Context)
- func (u *OutboxUpsertBulk) Ignore() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetHeaders(v map[string]string) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetKey(v string) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetLastRetry(v time.Time) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetPayload(v []byte) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetProcessingErrors(v []string) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetRetryCount(v int) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetStatus(v outbox.Status) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetTimestamp(v time.Time) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) SetTopic(v string) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) Update(set func(*OutboxUpsert)) *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateHeaders() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateKey() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateLastRetry() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateNewValues() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdatePayload() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateProcessingErrors() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateRetryCount() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateStatus() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateTimestamp() *OutboxUpsertBulk
- func (u *OutboxUpsertBulk) UpdateTopic() *OutboxUpsertBulk
- type OutboxUpsertOne
- func (u *OutboxUpsertOne) AddRetryCount(v int) *OutboxUpsertOne
- func (u *OutboxUpsertOne) ClearLastRetry() *OutboxUpsertOne
- func (u *OutboxUpsertOne) ClearProcessingErrors() *OutboxUpsertOne
- func (u *OutboxUpsertOne) DoNothing() *OutboxUpsertOne
- func (u *OutboxUpsertOne) Exec(ctx context.Context) error
- func (u *OutboxUpsertOne) ExecX(ctx context.Context)
- func (u *OutboxUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *OutboxUpsertOne) IDX(ctx context.Context) int
- func (u *OutboxUpsertOne) Ignore() *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetHeaders(v map[string]string) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetKey(v string) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetLastRetry(v time.Time) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetPayload(v []byte) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetProcessingErrors(v []string) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetRetryCount(v int) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetStatus(v outbox.Status) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetTimestamp(v time.Time) *OutboxUpsertOne
- func (u *OutboxUpsertOne) SetTopic(v string) *OutboxUpsertOne
- func (u *OutboxUpsertOne) Update(set func(*OutboxUpsert)) *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateHeaders() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateKey() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateLastRetry() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateNewValues() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdatePayload() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateProcessingErrors() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateRetryCount() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateStatus() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateTimestamp() *OutboxUpsertOne
- func (u *OutboxUpsertOne) UpdateTopic() *OutboxUpsertOne
- type OutboxWhereInput
- type Outboxes
- type PageInfo
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type SchemaConfig
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeOrder = "Order" TypeOutbox = "Outbox" )
Variables ¶
var DefaultOrderOrder = &OrderOrder{ Direction: OrderDirectionAsc, Field: &OrderOrderField{ field: order.FieldID, toCursor: func(o *Order) Cursor { return Cursor{ID: o.ID} }, }, }
DefaultOrderOrder is the default ordering of Order.
var DefaultOutboxOrder = &OutboxOrder{ Direction: OrderDirectionAsc, Field: &OutboxOrderField{ field: outbox.FieldID, toCursor: func(o *Outbox) Cursor { return Cursor{ID: o.ID} }, }, }
DefaultOutboxOrder is the default ordering of Outbox.
var ErrEmptyOrderWhereInput = errors.New("entities: empty predicate OrderWhereInput")
ErrEmptyOrderWhereInput is returned in case the OrderWhereInput is empty.
var ErrEmptyOutboxWhereInput = errors.New("entities: empty predicate OutboxWhereInput")
ErrEmptyOutboxWhereInput is returned in case the OutboxWhereInput is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx 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(entities.As(entities.Sum(field1), "sum_field1"), (entities.As(entities.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Order is the client for interacting with the Order builders. Order *OrderClient // Outbox is the client for interacting with the Outbox builders. Outbox *OutboxClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Order. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
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(...)`.
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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 Cursor ¶
Cursor of an edge type.
func (Cursor) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Cursor) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.
type EntgoClient ¶
type EntgoClient interface { Close() GetClient() *Client CreateTransaction(ctx context.Context) (*Tx, error) RollbackTransaction(tx *Tx) error CommitTransaction(tx *Tx) error }
func NewEntgoClient ¶
func NewEntgoClient( logger *zap.SugaredLogger, database database.Database) (EntgoClient, error)
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
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 Option ¶
type Option func(*config)
Option function to configure the client.
func AlternateSchema ¶
func AlternateSchema(schemaConfig SchemaConfig) Option
AlternateSchemas allows alternate schema names to be passed into ent operations.
type Order ¶
type Order struct { // ID of the ent. ID int `json:"id,omitempty"` // OrderDetails holds the value of the "order_details" field. OrderDetails models.OrderDetails `json:"order_details,omitempty"` // PreferredExchanges holds the value of the "preferred_exchanges" field. PreferredExchanges []models.Exchange `json:"preferred_exchanges,omitempty"` // contains filtered or unexported fields }
Order is the model entity for the Order schema.
func (*Order) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Order) IsNode ¶
func (n *Order) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Order) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Order) ToEdge ¶
func (o *Order) ToEdge(order *OrderOrder) *OrderEdge
ToEdge converts Order into OrderEdge.
func (*Order) Unwrap ¶
Unwrap unwraps the Order entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Order) Update ¶
func (o *Order) Update() *OrderUpdateOne
Update returns a builder for updating this Order. Note that you need to call Order.Unwrap() before calling this method if this Order was returned from a transaction, and the transaction was committed or rolled back.
type OrderClient ¶
type OrderClient struct {
// contains filtered or unexported fields
}
OrderClient is a client for the Order schema.
func NewOrderClient ¶
func NewOrderClient(c config) *OrderClient
NewOrderClient returns a client for the Order from the given config.
func (*OrderClient) Create ¶
func (c *OrderClient) Create() *OrderCreate
Create returns a builder for creating a Order entity.
func (*OrderClient) CreateBulk ¶
func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
CreateBulk returns a builder for creating a bulk of Order entities.
func (*OrderClient) Delete ¶
func (c *OrderClient) Delete() *OrderDelete
Delete returns a delete builder for Order.
func (*OrderClient) DeleteOne ¶
func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderClient) DeleteOneID ¶
func (c *OrderClient) DeleteOneID(id int) *OrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderClient) ExecContext ¶
func (c *OrderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderClient) GetX ¶
func (c *OrderClient) GetX(ctx context.Context, id int) *Order
GetX is like Get, but panics if an error occurs.
func (*OrderClient) Intercept ¶
func (c *OrderClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `order.Intercept(f(g(h())))`.
func (*OrderClient) Interceptors ¶
func (c *OrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderClient) Query ¶
func (c *OrderClient) Query() *OrderQuery
Query returns a query builder for Order.
func (*OrderClient) QueryContext ¶
func (c *OrderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderClient) Update ¶
func (c *OrderClient) Update() *OrderUpdate
Update returns an update builder for Order.
func (*OrderClient) UpdateOne ¶
func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderClient) UpdateOneID ¶
func (c *OrderClient) UpdateOneID(id int) *OrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderClient) Use ¶
func (c *OrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `order.Hooks(f(g(h())))`.
type OrderConnection ¶
type OrderConnection struct { Edges []*OrderEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
OrderConnection is the connection containing edges to Order.
type OrderCreate ¶
type OrderCreate struct {
// contains filtered or unexported fields
}
OrderCreate is the builder for creating a Order entity.
func (*OrderCreate) Exec ¶
func (oc *OrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreate) ExecContext ¶
func (c *OrderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderCreate) ExecX ¶
func (oc *OrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderCreate) Mutation ¶
func (oc *OrderCreate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderCreate) OnConflict ¶
func (oc *OrderCreate) OnConflict(opts ...sql.ConflictOption) *OrderUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Order.Create(). SetOrderDetails(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.OrderUpsert) { SetOrderDetails(v+v). }). Exec(ctx)
func (*OrderCreate) OnConflictColumns ¶
func (oc *OrderCreate) OnConflictColumns(columns ...string) *OrderUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Order.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OrderCreate) QueryContext ¶
func (c *OrderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderCreate) Save ¶
func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
Save creates the Order in the database.
func (*OrderCreate) SaveX ¶
func (oc *OrderCreate) SaveX(ctx context.Context) *Order
SaveX calls Save and panics if Save returns an error.
func (*OrderCreate) SetOrderDetails ¶
func (oc *OrderCreate) SetOrderDetails(md models.OrderDetails) *OrderCreate
SetOrderDetails sets the "order_details" field.
func (*OrderCreate) SetPreferredExchanges ¶
func (oc *OrderCreate) SetPreferredExchanges(m []models.Exchange) *OrderCreate
SetPreferredExchanges sets the "preferred_exchanges" field.
type OrderCreateBulk ¶
type OrderCreateBulk struct {
// contains filtered or unexported fields
}
OrderCreateBulk is the builder for creating many Order entities in bulk.
func (*OrderCreateBulk) Exec ¶
func (ocb *OrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreateBulk) ExecContext ¶
func (c *OrderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderCreateBulk) ExecX ¶
func (ocb *OrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderCreateBulk) OnConflict ¶
func (ocb *OrderCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrderUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Order.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.OrderUpsert) { SetOrderDetails(v+v). }). Exec(ctx)
func (*OrderCreateBulk) OnConflictColumns ¶
func (ocb *OrderCreateBulk) OnConflictColumns(columns ...string) *OrderUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Order.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OrderCreateBulk) QueryContext ¶
func (c *OrderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type OrderDelete ¶
type OrderDelete struct {
// contains filtered or unexported fields
}
OrderDelete is the builder for deleting a Order entity.
func (*OrderDelete) Exec ¶
func (od *OrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderDelete) ExecContext ¶
func (c *OrderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderDelete) ExecX ¶
func (od *OrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderDelete) QueryContext ¶
func (c *OrderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderDelete) Where ¶
func (od *OrderDelete) Where(ps ...predicate.Order) *OrderDelete
Where appends a list predicates to the OrderDelete builder.
type OrderDeleteOne ¶
type OrderDeleteOne struct {
// contains filtered or unexported fields
}
OrderDeleteOne is the builder for deleting a single Order entity.
func (*OrderDeleteOne) Exec ¶
func (odo *OrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderDeleteOne) ExecX ¶
func (odo *OrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderDeleteOne) Where ¶
func (odo *OrderDeleteOne) Where(ps ...predicate.Order) *OrderDeleteOne
Where appends a list predicates to the OrderDelete builder.
type OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) MarshalGQL ¶
func (o OrderDirection) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (*OrderDirection) UnmarshalGQL ¶
func (o *OrderDirection) UnmarshalGQL(val interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type OrderFilter ¶
type OrderFilter struct {
// contains filtered or unexported fields
}
OrderFilter provides a generic filtering capability at runtime for OrderQuery.
func (*OrderFilter) ExecContext ¶
func (c *OrderFilter) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderFilter) QueryContext ¶
func (c *OrderFilter) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderFilter) Where ¶
func (f *OrderFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*OrderFilter) WhereID ¶
func (f *OrderFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*OrderFilter) WhereOrderDetails ¶
func (f *OrderFilter) WhereOrderDetails(p entql.BytesP)
WhereOrderDetails applies the entql json.RawMessage predicate on the order_details field.
func (*OrderFilter) WherePreferredExchanges ¶
func (f *OrderFilter) WherePreferredExchanges(p entql.BytesP)
WherePreferredExchanges applies the entql json.RawMessage predicate on the preferred_exchanges field.
type OrderGroupBy ¶
type OrderGroupBy struct {
// contains filtered or unexported fields
}
OrderGroupBy is the group-by builder for Order entities.
func (*OrderGroupBy) Aggregate ¶
func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Scan ¶
func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderMutation ¶
type OrderMutation struct {
// contains filtered or unexported fields
}
OrderMutation represents an operation that mutates the Order nodes in the graph.
func (*OrderMutation) AddField ¶
func (m *OrderMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*OrderMutation) AddedEdges ¶
func (m *OrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderMutation) AddedField ¶
func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*OrderMutation) AddedFields ¶
func (m *OrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderMutation) AddedIDs ¶
func (m *OrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderMutation) AppendPreferredExchanges ¶
func (m *OrderMutation) AppendPreferredExchanges(value []models.Exchange)
AppendPreferredExchanges adds value to the "preferred_exchanges" field.
func (*OrderMutation) AppendedPreferredExchanges ¶
func (m *OrderMutation) AppendedPreferredExchanges() ([]models.Exchange, bool)
AppendedPreferredExchanges returns the list of values that were appended to the "preferred_exchanges" field in this mutation.
func (*OrderMutation) ClearEdge ¶
func (m *OrderMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*OrderMutation) ClearField ¶
func (m *OrderMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*OrderMutation) ClearedEdges ¶
func (m *OrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderMutation) ClearedFields ¶
func (m *OrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderMutation) Client ¶
func (m OrderMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*OrderMutation) EdgeCleared ¶
func (m *OrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderMutation) ExecContext ¶
func (c *OrderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderMutation) Field ¶
func (m *OrderMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*OrderMutation) FieldCleared ¶
func (m *OrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderMutation) Fields ¶
func (m *OrderMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*OrderMutation) Filter ¶
func (m *OrderMutation) Filter() *OrderFilter
Filter returns an entql.Where implementation to apply filters on the OrderMutation builder.
func (*OrderMutation) ID ¶
func (m *OrderMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OrderMutation) IDs ¶
func (m *OrderMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OrderMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*OrderMutation) OldOrderDetails ¶
func (m *OrderMutation) OldOrderDetails(ctx context.Context) (v models.OrderDetails, err error)
OldOrderDetails returns the old "order_details" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldPreferredExchanges ¶
OldPreferredExchanges returns the old "preferred_exchanges" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OrderDetails ¶
func (m *OrderMutation) OrderDetails() (r models.OrderDetails, exists bool)
OrderDetails returns the value of the "order_details" field in the mutation.
func (*OrderMutation) PreferredExchanges ¶
func (m *OrderMutation) PreferredExchanges() (r []models.Exchange, exists bool)
PreferredExchanges returns the value of the "preferred_exchanges" field in the mutation.
func (*OrderMutation) QueryContext ¶
func (c *OrderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderMutation) RemovedEdges ¶
func (m *OrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderMutation) RemovedIDs ¶
func (m *OrderMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*OrderMutation) ResetEdge ¶
func (m *OrderMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*OrderMutation) ResetField ¶
func (m *OrderMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*OrderMutation) ResetOrderDetails ¶
func (m *OrderMutation) ResetOrderDetails()
ResetOrderDetails resets all changes to the "order_details" field.
func (*OrderMutation) ResetPreferredExchanges ¶
func (m *OrderMutation) ResetPreferredExchanges()
ResetPreferredExchanges resets all changes to the "preferred_exchanges" field.
func (*OrderMutation) SetField ¶
func (m *OrderMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*OrderMutation) SetOp ¶
func (m *OrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderMutation) SetOrderDetails ¶
func (m *OrderMutation) SetOrderDetails(md models.OrderDetails)
SetOrderDetails sets the "order_details" field.
func (*OrderMutation) SetPreferredExchanges ¶
func (m *OrderMutation) SetPreferredExchanges(value []models.Exchange)
SetPreferredExchanges sets the "preferred_exchanges" field.
func (OrderMutation) Tx ¶
func (m OrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderMutation) Type ¶
func (m *OrderMutation) Type() string
Type returns the node type of this mutation (Order).
func (*OrderMutation) Where ¶
func (m *OrderMutation) Where(ps ...predicate.Order)
Where appends a list predicates to the OrderMutation builder.
func (*OrderMutation) WhereP ¶
func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderOrder ¶
type OrderOrder struct { Direction OrderDirection `json:"direction"` Field *OrderOrderField `json:"field"` }
OrderOrder defines the ordering of Order.
type OrderOrderField ¶
type OrderOrderField struct {
// contains filtered or unexported fields
}
OrderOrderField defines the ordering field of Order.
type OrderPaginateOption ¶
type OrderPaginateOption func(*orderPager) error
OrderPaginateOption enables pagination customization.
func WithOrderFilter ¶
func WithOrderFilter(filter func(*OrderQuery) (*OrderQuery, error)) OrderPaginateOption
WithOrderFilter configures pagination filter.
func WithOrderOrder ¶
func WithOrderOrder(order *OrderOrder) OrderPaginateOption
WithOrderOrder configures pagination ordering.
type OrderQuery ¶
type OrderQuery struct {
// contains filtered or unexported fields
}
OrderQuery is the builder for querying Order entities.
func (*OrderQuery) Aggregate ¶
func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate returns a OrderSelect configured with the given aggregations.
func (*OrderQuery) All ¶
func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
All executes the query and returns a list of Orders.
func (*OrderQuery) AllX ¶
func (oq *OrderQuery) AllX(ctx context.Context) []*Order
AllX is like All, but panics if an error occurs.
func (*OrderQuery) Clone ¶
func (oq *OrderQuery) Clone() *OrderQuery
Clone returns a duplicate of the OrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderQuery) CollectFields ¶
func (o *OrderQuery) CollectFields(ctx context.Context, satisfies ...string) (*OrderQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*OrderQuery) Count ¶
func (oq *OrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderQuery) CountX ¶
func (oq *OrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderQuery) ExecContext ¶
func (c *OrderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderQuery) Exist ¶
func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderQuery) ExistX ¶
func (oq *OrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderQuery) Filter ¶
func (oq *OrderQuery) Filter() *OrderFilter
Filter returns a Filter implementation to apply filters on the OrderQuery builder.
func (*OrderQuery) First ¶
func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
First returns the first Order entity from the query. Returns a *NotFoundError when no Order was found.
func (*OrderQuery) FirstID ¶
func (oq *OrderQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Order ID from the query. Returns a *NotFoundError when no Order ID was found.
func (*OrderQuery) FirstIDX ¶
func (oq *OrderQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderQuery) FirstX ¶
func (oq *OrderQuery) FirstX(ctx context.Context) *Order
FirstX is like First, but panics if an error occurs.
func (*OrderQuery) ForShare ¶
func (oq *OrderQuery) ForShare(opts ...sql.LockOption) *OrderQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*OrderQuery) ForUpdate ¶
func (oq *OrderQuery) ForUpdate(opts ...sql.LockOption) *OrderQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*OrderQuery) GroupBy ¶
func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { OrderDetails models.OrderDetails `json:"order_details,omitempty"` Count int `json:"count,omitempty"` } client.Order.Query(). GroupBy(order.FieldOrderDetails). Aggregate(entities.Count()). Scan(ctx, &v)
func (*OrderQuery) IDs ¶
func (oq *OrderQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Order IDs.
func (*OrderQuery) IDsX ¶
func (oq *OrderQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OrderQuery) Limit ¶
func (oq *OrderQuery) Limit(limit int) *OrderQuery
Limit the number of records to be returned by this query.
func (*OrderQuery) Modify ¶
func (oq *OrderQuery) Modify(modifiers ...func(s *sql.Selector)) *OrderSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*OrderQuery) Offset ¶
func (oq *OrderQuery) Offset(offset int) *OrderQuery
Offset to start from.
func (*OrderQuery) Only ¶
func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
Only returns a single Order entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Order entity is found. Returns a *NotFoundError when no Order entities are found.
func (*OrderQuery) OnlyID ¶
func (oq *OrderQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Order ID in the query. Returns a *NotSingularError when more than one Order ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderQuery) OnlyIDX ¶
func (oq *OrderQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderQuery) OnlyX ¶
func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
OnlyX is like Only, but panics if an error occurs.
func (*OrderQuery) Order ¶
func (oq *OrderQuery) Order(o ...OrderFunc) *OrderQuery
Order specifies how the records should be ordered.
func (*OrderQuery) Paginate ¶
func (o *OrderQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...OrderPaginateOption, ) (*OrderConnection, error)
Paginate executes the query and returns a relay based cursor connection to Order.
func (*OrderQuery) QueryContext ¶
func (c *OrderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderQuery) Select ¶
func (oq *OrderQuery) Select(fields ...string) *OrderSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { OrderDetails models.OrderDetails `json:"order_details,omitempty"` } client.Order.Query(). Select(order.FieldOrderDetails). Scan(ctx, &v)
func (*OrderQuery) Unique ¶
func (oq *OrderQuery) Unique(unique bool) *OrderQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*OrderQuery) Where ¶
func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
Where adds a new predicate for the OrderQuery builder.
type OrderSelect ¶
type OrderSelect struct { *OrderQuery // contains filtered or unexported fields }
OrderSelect is the builder for selecting fields of Order entities.
func (*OrderSelect) Aggregate ¶
func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (OrderSelect) ExecContext ¶
func (c OrderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Modify ¶
func (os *OrderSelect) Modify(modifiers ...func(s *sql.Selector)) *OrderSelect
Modify adds a query modifier for attaching custom logic to queries.
func (OrderSelect) QueryContext ¶
func (c OrderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderSelect) Scan ¶
func (os *OrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderUpdate ¶
type OrderUpdate struct {
// contains filtered or unexported fields
}
OrderUpdate is the builder for updating Order entities.
func (*OrderUpdate) AppendPreferredExchanges ¶
func (ou *OrderUpdate) AppendPreferredExchanges(m []models.Exchange) *OrderUpdate
AppendPreferredExchanges appends m to the "preferred_exchanges" field.
func (*OrderUpdate) Exec ¶
func (ou *OrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpdate) ExecContext ¶
func (c *OrderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderUpdate) ExecX ¶
func (ou *OrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdate) Modify ¶
func (ou *OrderUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrderUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*OrderUpdate) Mutation ¶
func (ou *OrderUpdate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdate) QueryContext ¶
func (c *OrderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderUpdate) Save ¶
func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderUpdate) SaveX ¶
func (ou *OrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdate) SetOrderDetails ¶
func (ou *OrderUpdate) SetOrderDetails(md models.OrderDetails) *OrderUpdate
SetOrderDetails sets the "order_details" field.
func (*OrderUpdate) SetPreferredExchanges ¶
func (ou *OrderUpdate) SetPreferredExchanges(m []models.Exchange) *OrderUpdate
SetPreferredExchanges sets the "preferred_exchanges" field.
func (*OrderUpdate) Where ¶
func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
Where appends a list predicates to the OrderUpdate builder.
type OrderUpdateOne ¶
type OrderUpdateOne struct {
// contains filtered or unexported fields
}
OrderUpdateOne is the builder for updating a single Order entity.
func (*OrderUpdateOne) AppendPreferredExchanges ¶
func (ouo *OrderUpdateOne) AppendPreferredExchanges(m []models.Exchange) *OrderUpdateOne
AppendPreferredExchanges appends m to the "preferred_exchanges" field.
func (*OrderUpdateOne) Exec ¶
func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderUpdateOne) ExecContext ¶
func (c *OrderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OrderUpdateOne) ExecX ¶
func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdateOne) Modify ¶
func (ouo *OrderUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OrderUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*OrderUpdateOne) Mutation ¶
func (ouo *OrderUpdateOne) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdateOne) QueryContext ¶
func (c *OrderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OrderUpdateOne) Save ¶
func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
Save executes the query and returns the updated Order entity.
func (*OrderUpdateOne) SaveX ¶
func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdateOne) Select ¶
func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderUpdateOne) SetOrderDetails ¶
func (ouo *OrderUpdateOne) SetOrderDetails(md models.OrderDetails) *OrderUpdateOne
SetOrderDetails sets the "order_details" field.
func (*OrderUpdateOne) SetPreferredExchanges ¶
func (ouo *OrderUpdateOne) SetPreferredExchanges(m []models.Exchange) *OrderUpdateOne
SetPreferredExchanges sets the "preferred_exchanges" field.
type OrderUpsert ¶
OrderUpsert is the "OnConflict" setter.
func (*OrderUpsert) SetOrderDetails ¶
func (u *OrderUpsert) SetOrderDetails(v models.OrderDetails) *OrderUpsert
SetOrderDetails sets the "order_details" field.
func (*OrderUpsert) SetPreferredExchanges ¶
func (u *OrderUpsert) SetPreferredExchanges(v []models.Exchange) *OrderUpsert
SetPreferredExchanges sets the "preferred_exchanges" field.
func (*OrderUpsert) UpdateOrderDetails ¶
func (u *OrderUpsert) UpdateOrderDetails() *OrderUpsert
UpdateOrderDetails sets the "order_details" field to the value that was provided on create.
func (*OrderUpsert) UpdatePreferredExchanges ¶
func (u *OrderUpsert) UpdatePreferredExchanges() *OrderUpsert
UpdatePreferredExchanges sets the "preferred_exchanges" field to the value that was provided on create.
type OrderUpsertBulk ¶
type OrderUpsertBulk struct {
// contains filtered or unexported fields
}
OrderUpsertBulk is the builder for "upsert"-ing a bulk of Order nodes.
func (*OrderUpsertBulk) DoNothing ¶
func (u *OrderUpsertBulk) DoNothing() *OrderUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OrderUpsertBulk) Exec ¶
func (u *OrderUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpsertBulk) ExecX ¶
func (u *OrderUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpsertBulk) Ignore ¶
func (u *OrderUpsertBulk) Ignore() *OrderUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Order.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OrderUpsertBulk) SetOrderDetails ¶
func (u *OrderUpsertBulk) SetOrderDetails(v models.OrderDetails) *OrderUpsertBulk
SetOrderDetails sets the "order_details" field.
func (*OrderUpsertBulk) SetPreferredExchanges ¶
func (u *OrderUpsertBulk) SetPreferredExchanges(v []models.Exchange) *OrderUpsertBulk
SetPreferredExchanges sets the "preferred_exchanges" field.
func (*OrderUpsertBulk) Update ¶
func (u *OrderUpsertBulk) Update(set func(*OrderUpsert)) *OrderUpsertBulk
Update allows overriding fields `UPDATE` values. See the OrderCreateBulk.OnConflict documentation for more info.
func (*OrderUpsertBulk) UpdateNewValues ¶
func (u *OrderUpsertBulk) UpdateNewValues() *OrderUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Order.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OrderUpsertBulk) UpdateOrderDetails ¶
func (u *OrderUpsertBulk) UpdateOrderDetails() *OrderUpsertBulk
UpdateOrderDetails sets the "order_details" field to the value that was provided on create.
func (*OrderUpsertBulk) UpdatePreferredExchanges ¶
func (u *OrderUpsertBulk) UpdatePreferredExchanges() *OrderUpsertBulk
UpdatePreferredExchanges sets the "preferred_exchanges" field to the value that was provided on create.
type OrderUpsertOne ¶
type OrderUpsertOne struct {
// contains filtered or unexported fields
}
OrderUpsertOne is the builder for "upsert"-ing
one Order node.
func (*OrderUpsertOne) DoNothing ¶
func (u *OrderUpsertOne) DoNothing() *OrderUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OrderUpsertOne) Exec ¶
func (u *OrderUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpsertOne) ExecX ¶
func (u *OrderUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpsertOne) ID ¶
func (u *OrderUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*OrderUpsertOne) IDX ¶
func (u *OrderUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*OrderUpsertOne) Ignore ¶
func (u *OrderUpsertOne) Ignore() *OrderUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Order.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OrderUpsertOne) SetOrderDetails ¶
func (u *OrderUpsertOne) SetOrderDetails(v models.OrderDetails) *OrderUpsertOne
SetOrderDetails sets the "order_details" field.
func (*OrderUpsertOne) SetPreferredExchanges ¶
func (u *OrderUpsertOne) SetPreferredExchanges(v []models.Exchange) *OrderUpsertOne
SetPreferredExchanges sets the "preferred_exchanges" field.
func (*OrderUpsertOne) Update ¶
func (u *OrderUpsertOne) Update(set func(*OrderUpsert)) *OrderUpsertOne
Update allows overriding fields `UPDATE` values. See the OrderCreate.OnConflict documentation for more info.
func (*OrderUpsertOne) UpdateNewValues ¶
func (u *OrderUpsertOne) UpdateNewValues() *OrderUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Order.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OrderUpsertOne) UpdateOrderDetails ¶
func (u *OrderUpsertOne) UpdateOrderDetails() *OrderUpsertOne
UpdateOrderDetails sets the "order_details" field to the value that was provided on create.
func (*OrderUpsertOne) UpdatePreferredExchanges ¶
func (u *OrderUpsertOne) UpdatePreferredExchanges() *OrderUpsertOne
UpdatePreferredExchanges sets the "preferred_exchanges" field to the value that was provided on create.
type OrderWhereInput ¶
type OrderWhereInput struct { Predicates []predicate.Order `json:"-"` Not *OrderWhereInput `json:"not,omitempty"` Or []*OrderWhereInput `json:"or,omitempty"` And []*OrderWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` }
OrderWhereInput represents a where input for filtering Order queries.
func (*OrderWhereInput) AddPredicates ¶
func (i *OrderWhereInput) AddPredicates(predicates ...predicate.Order)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*OrderWhereInput) Filter ¶
func (i *OrderWhereInput) Filter(q *OrderQuery) (*OrderQuery, error)
Filter applies the OrderWhereInput filter on the OrderQuery builder.
type Outbox ¶
type Outbox struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,omitempty"` // Topic holds the value of the "topic" field. Topic string `json:"topic,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Payload holds the value of the "payload" field. Payload []byte `json:"payload,omitempty"` // Headers holds the value of the "headers" field. Headers map[string]string `json:"headers,omitempty"` // RetryCount holds the value of the "retry_count" field. RetryCount int `json:"retry_count,omitempty"` // Status holds the value of the "status" field. Status outbox.Status `json:"status,omitempty"` // LastRetry holds the value of the "last_retry" field. LastRetry time.Time `json:"last_retry,omitempty"` // ProcessingErrors holds the value of the "processing_errors" field. ProcessingErrors []string `json:"processing_errors,omitempty"` // contains filtered or unexported fields }
Outbox is the model entity for the Outbox schema.
func (*Outbox) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Outbox) IsNode ¶
func (n *Outbox) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Outbox) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Outbox) ToEdge ¶
func (o *Outbox) ToEdge(order *OutboxOrder) *OutboxEdge
ToEdge converts Outbox into OutboxEdge.
func (*Outbox) Unwrap ¶
Unwrap unwraps the Outbox 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 (*Outbox) Update ¶
func (o *Outbox) Update() *OutboxUpdateOne
Update returns a builder for updating this Outbox. Note that you need to call Outbox.Unwrap() before calling this method if this Outbox was returned from a transaction, and the transaction was committed or rolled back.
type OutboxClient ¶
type OutboxClient struct {
// contains filtered or unexported fields
}
OutboxClient is a client for the Outbox schema.
func NewOutboxClient ¶
func NewOutboxClient(c config) *OutboxClient
NewOutboxClient returns a client for the Outbox from the given config.
func (*OutboxClient) Create ¶
func (c *OutboxClient) Create() *OutboxCreate
Create returns a builder for creating a Outbox entity.
func (*OutboxClient) CreateBulk ¶
func (c *OutboxClient) CreateBulk(builders ...*OutboxCreate) *OutboxCreateBulk
CreateBulk returns a builder for creating a bulk of Outbox entities.
func (*OutboxClient) Delete ¶
func (c *OutboxClient) Delete() *OutboxDelete
Delete returns a delete builder for Outbox.
func (*OutboxClient) DeleteOne ¶
func (c *OutboxClient) DeleteOne(o *Outbox) *OutboxDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OutboxClient) DeleteOneID ¶
func (c *OutboxClient) DeleteOneID(id int) *OutboxDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OutboxClient) ExecContext ¶
func (c *OutboxClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxClient) GetX ¶
func (c *OutboxClient) GetX(ctx context.Context, id int) *Outbox
GetX is like Get, but panics if an error occurs.
func (*OutboxClient) Intercept ¶
func (c *OutboxClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `outbox.Intercept(f(g(h())))`.
func (*OutboxClient) Interceptors ¶
func (c *OutboxClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OutboxClient) Query ¶
func (c *OutboxClient) Query() *OutboxQuery
Query returns a query builder for Outbox.
func (*OutboxClient) QueryContext ¶
func (c *OutboxClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxClient) Update ¶
func (c *OutboxClient) Update() *OutboxUpdate
Update returns an update builder for Outbox.
func (*OutboxClient) UpdateOne ¶
func (c *OutboxClient) UpdateOne(o *Outbox) *OutboxUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OutboxClient) UpdateOneID ¶
func (c *OutboxClient) UpdateOneID(id int) *OutboxUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OutboxClient) Use ¶
func (c *OutboxClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `outbox.Hooks(f(g(h())))`.
type OutboxConnection ¶
type OutboxConnection struct { Edges []*OutboxEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
OutboxConnection is the connection containing edges to Outbox.
type OutboxCreate ¶
type OutboxCreate struct {
// contains filtered or unexported fields
}
OutboxCreate is the builder for creating a Outbox entity.
func (*OutboxCreate) Exec ¶
func (oc *OutboxCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OutboxCreate) ExecContext ¶
func (c *OutboxCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxCreate) ExecX ¶
func (oc *OutboxCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OutboxCreate) Mutation ¶
func (oc *OutboxCreate) Mutation() *OutboxMutation
Mutation returns the OutboxMutation object of the builder.
func (*OutboxCreate) OnConflict ¶
func (oc *OutboxCreate) OnConflict(opts ...sql.ConflictOption) *OutboxUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Outbox.Create(). SetTimestamp(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.OutboxUpsert) { SetTimestamp(v+v). }). Exec(ctx)
func (*OutboxCreate) OnConflictColumns ¶
func (oc *OutboxCreate) OnConflictColumns(columns ...string) *OutboxUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Outbox.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OutboxCreate) QueryContext ¶
func (c *OutboxCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxCreate) Save ¶
func (oc *OutboxCreate) Save(ctx context.Context) (*Outbox, error)
Save creates the Outbox in the database.
func (*OutboxCreate) SaveX ¶
func (oc *OutboxCreate) SaveX(ctx context.Context) *Outbox
SaveX calls Save and panics if Save returns an error.
func (*OutboxCreate) SetHeaders ¶
func (oc *OutboxCreate) SetHeaders(m map[string]string) *OutboxCreate
SetHeaders sets the "headers" field.
func (*OutboxCreate) SetKey ¶
func (oc *OutboxCreate) SetKey(s string) *OutboxCreate
SetKey sets the "key" field.
func (*OutboxCreate) SetLastRetry ¶
func (oc *OutboxCreate) SetLastRetry(t time.Time) *OutboxCreate
SetLastRetry sets the "last_retry" field.
func (*OutboxCreate) SetNillableLastRetry ¶
func (oc *OutboxCreate) SetNillableLastRetry(t *time.Time) *OutboxCreate
SetNillableLastRetry sets the "last_retry" field if the given value is not nil.
func (*OutboxCreate) SetPayload ¶
func (oc *OutboxCreate) SetPayload(b []byte) *OutboxCreate
SetPayload sets the "payload" field.
func (*OutboxCreate) SetProcessingErrors ¶
func (oc *OutboxCreate) SetProcessingErrors(s []string) *OutboxCreate
SetProcessingErrors sets the "processing_errors" field.
func (*OutboxCreate) SetRetryCount ¶
func (oc *OutboxCreate) SetRetryCount(i int) *OutboxCreate
SetRetryCount sets the "retry_count" field.
func (*OutboxCreate) SetStatus ¶
func (oc *OutboxCreate) SetStatus(o outbox.Status) *OutboxCreate
SetStatus sets the "status" field.
func (*OutboxCreate) SetTimestamp ¶
func (oc *OutboxCreate) SetTimestamp(t time.Time) *OutboxCreate
SetTimestamp sets the "timestamp" field.
func (*OutboxCreate) SetTopic ¶
func (oc *OutboxCreate) SetTopic(s string) *OutboxCreate
SetTopic sets the "topic" field.
type OutboxCreateBulk ¶
type OutboxCreateBulk struct {
// contains filtered or unexported fields
}
OutboxCreateBulk is the builder for creating many Outbox entities in bulk.
func (*OutboxCreateBulk) Exec ¶
func (ocb *OutboxCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OutboxCreateBulk) ExecContext ¶
func (c *OutboxCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxCreateBulk) ExecX ¶
func (ocb *OutboxCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OutboxCreateBulk) OnConflict ¶
func (ocb *OutboxCreateBulk) OnConflict(opts ...sql.ConflictOption) *OutboxUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Outbox.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.OutboxUpsert) { SetTimestamp(v+v). }). Exec(ctx)
func (*OutboxCreateBulk) OnConflictColumns ¶
func (ocb *OutboxCreateBulk) OnConflictColumns(columns ...string) *OutboxUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Outbox.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*OutboxCreateBulk) QueryContext ¶
func (c *OutboxCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type OutboxDelete ¶
type OutboxDelete struct {
// contains filtered or unexported fields
}
OutboxDelete is the builder for deleting a Outbox entity.
func (*OutboxDelete) Exec ¶
func (od *OutboxDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OutboxDelete) ExecContext ¶
func (c *OutboxDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxDelete) ExecX ¶
func (od *OutboxDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OutboxDelete) QueryContext ¶
func (c *OutboxDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxDelete) Where ¶
func (od *OutboxDelete) Where(ps ...predicate.Outbox) *OutboxDelete
Where appends a list predicates to the OutboxDelete builder.
type OutboxDeleteOne ¶
type OutboxDeleteOne struct {
// contains filtered or unexported fields
}
OutboxDeleteOne is the builder for deleting a single Outbox entity.
func (*OutboxDeleteOne) Exec ¶
func (odo *OutboxDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OutboxDeleteOne) ExecX ¶
func (odo *OutboxDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OutboxDeleteOne) Where ¶
func (odo *OutboxDeleteOne) Where(ps ...predicate.Outbox) *OutboxDeleteOne
Where appends a list predicates to the OutboxDelete builder.
type OutboxEdge ¶
OutboxEdge is the edge representation of Outbox.
type OutboxFilter ¶
type OutboxFilter struct {
// contains filtered or unexported fields
}
OutboxFilter provides a generic filtering capability at runtime for OutboxQuery.
func (*OutboxFilter) ExecContext ¶
func (c *OutboxFilter) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxFilter) QueryContext ¶
func (c *OutboxFilter) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxFilter) Where ¶
func (f *OutboxFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*OutboxFilter) WhereHeaders ¶
func (f *OutboxFilter) WhereHeaders(p entql.BytesP)
WhereHeaders applies the entql json.RawMessage predicate on the headers field.
func (*OutboxFilter) WhereID ¶
func (f *OutboxFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*OutboxFilter) WhereKey ¶
func (f *OutboxFilter) WhereKey(p entql.StringP)
WhereKey applies the entql string predicate on the key field.
func (*OutboxFilter) WhereLastRetry ¶
func (f *OutboxFilter) WhereLastRetry(p entql.TimeP)
WhereLastRetry applies the entql time.Time predicate on the last_retry field.
func (*OutboxFilter) WherePayload ¶
func (f *OutboxFilter) WherePayload(p entql.BytesP)
WherePayload applies the entql []byte predicate on the payload field.
func (*OutboxFilter) WhereProcessingErrors ¶
func (f *OutboxFilter) WhereProcessingErrors(p entql.BytesP)
WhereProcessingErrors applies the entql json.RawMessage predicate on the processing_errors field.
func (*OutboxFilter) WhereRetryCount ¶
func (f *OutboxFilter) WhereRetryCount(p entql.IntP)
WhereRetryCount applies the entql int predicate on the retry_count field.
func (*OutboxFilter) WhereStatus ¶
func (f *OutboxFilter) WhereStatus(p entql.StringP)
WhereStatus applies the entql string predicate on the status field.
func (*OutboxFilter) WhereTimestamp ¶
func (f *OutboxFilter) WhereTimestamp(p entql.TimeP)
WhereTimestamp applies the entql time.Time predicate on the timestamp field.
func (*OutboxFilter) WhereTopic ¶
func (f *OutboxFilter) WhereTopic(p entql.StringP)
WhereTopic applies the entql string predicate on the topic field.
type OutboxGroupBy ¶
type OutboxGroupBy struct {
// contains filtered or unexported fields
}
OutboxGroupBy is the group-by builder for Outbox entities.
func (*OutboxGroupBy) Aggregate ¶
func (ogb *OutboxGroupBy) Aggregate(fns ...AggregateFunc) *OutboxGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OutboxGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OutboxGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OutboxGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OutboxGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OutboxGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OutboxGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OutboxGroupBy) Scan ¶
func (ogb *OutboxGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OutboxGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OutboxMutation ¶
type OutboxMutation struct {
// contains filtered or unexported fields
}
OutboxMutation represents an operation that mutates the Outbox nodes in the graph.
func (*OutboxMutation) AddField ¶
func (m *OutboxMutation) 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 (*OutboxMutation) AddRetryCount ¶
func (m *OutboxMutation) AddRetryCount(i int)
AddRetryCount adds i to the "retry_count" field.
func (*OutboxMutation) AddedEdges ¶
func (m *OutboxMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OutboxMutation) AddedField ¶
func (m *OutboxMutation) 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 (*OutboxMutation) AddedFields ¶
func (m *OutboxMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OutboxMutation) AddedIDs ¶
func (m *OutboxMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OutboxMutation) AddedRetryCount ¶
func (m *OutboxMutation) AddedRetryCount() (r int, exists bool)
AddedRetryCount returns the value that was added to the "retry_count" field in this mutation.
func (*OutboxMutation) AppendProcessingErrors ¶
func (m *OutboxMutation) AppendProcessingErrors(s []string)
AppendProcessingErrors adds s to the "processing_errors" field.
func (*OutboxMutation) AppendedProcessingErrors ¶
func (m *OutboxMutation) AppendedProcessingErrors() ([]string, bool)
AppendedProcessingErrors returns the list of values that were appended to the "processing_errors" field in this mutation.
func (*OutboxMutation) ClearEdge ¶
func (m *OutboxMutation) 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 (*OutboxMutation) ClearField ¶
func (m *OutboxMutation) 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 (*OutboxMutation) ClearLastRetry ¶
func (m *OutboxMutation) ClearLastRetry()
ClearLastRetry clears the value of the "last_retry" field.
func (*OutboxMutation) ClearProcessingErrors ¶
func (m *OutboxMutation) ClearProcessingErrors()
ClearProcessingErrors clears the value of the "processing_errors" field.
func (*OutboxMutation) ClearedEdges ¶
func (m *OutboxMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OutboxMutation) ClearedFields ¶
func (m *OutboxMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OutboxMutation) Client ¶
func (m OutboxMutation) 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 (*OutboxMutation) EdgeCleared ¶
func (m *OutboxMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OutboxMutation) ExecContext ¶
func (c *OutboxMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxMutation) Field ¶
func (m *OutboxMutation) 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 (*OutboxMutation) FieldCleared ¶
func (m *OutboxMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OutboxMutation) Fields ¶
func (m *OutboxMutation) 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 (*OutboxMutation) Filter ¶
func (m *OutboxMutation) Filter() *OutboxFilter
Filter returns an entql.Where implementation to apply filters on the OutboxMutation builder.
func (*OutboxMutation) Headers ¶
func (m *OutboxMutation) Headers() (r map[string]string, exists bool)
Headers returns the value of the "headers" field in the mutation.
func (*OutboxMutation) ID ¶
func (m *OutboxMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OutboxMutation) IDs ¶
func (m *OutboxMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OutboxMutation) Key ¶
func (m *OutboxMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*OutboxMutation) LastRetry ¶
func (m *OutboxMutation) LastRetry() (r time.Time, exists bool)
LastRetry returns the value of the "last_retry" field in the mutation.
func (*OutboxMutation) LastRetryCleared ¶
func (m *OutboxMutation) LastRetryCleared() bool
LastRetryCleared returns if the "last_retry" field was cleared in this mutation.
func (*OutboxMutation) 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 (*OutboxMutation) OldHeaders ¶
OldHeaders returns the old "headers" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldKey ¶
func (m *OutboxMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldLastRetry ¶
OldLastRetry returns the old "last_retry" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldPayload ¶
func (m *OutboxMutation) OldPayload(ctx context.Context) (v []byte, err error)
OldPayload returns the old "payload" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldProcessingErrors ¶
func (m *OutboxMutation) OldProcessingErrors(ctx context.Context) (v []string, err error)
OldProcessingErrors returns the old "processing_errors" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldRetryCount ¶
func (m *OutboxMutation) OldRetryCount(ctx context.Context) (v int, err error)
OldRetryCount returns the old "retry_count" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) OldTopic ¶
func (m *OutboxMutation) OldTopic(ctx context.Context) (v string, err error)
OldTopic returns the old "topic" field's value of the Outbox entity. If the Outbox 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 (*OutboxMutation) Payload ¶
func (m *OutboxMutation) Payload() (r []byte, exists bool)
Payload returns the value of the "payload" field in the mutation.
func (*OutboxMutation) ProcessingErrors ¶
func (m *OutboxMutation) ProcessingErrors() (r []string, exists bool)
ProcessingErrors returns the value of the "processing_errors" field in the mutation.
func (*OutboxMutation) ProcessingErrorsCleared ¶
func (m *OutboxMutation) ProcessingErrorsCleared() bool
ProcessingErrorsCleared returns if the "processing_errors" field was cleared in this mutation.
func (*OutboxMutation) QueryContext ¶
func (c *OutboxMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxMutation) RemovedEdges ¶
func (m *OutboxMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OutboxMutation) RemovedIDs ¶
func (m *OutboxMutation) 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 (*OutboxMutation) ResetEdge ¶
func (m *OutboxMutation) 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 (*OutboxMutation) ResetField ¶
func (m *OutboxMutation) 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 (*OutboxMutation) ResetHeaders ¶
func (m *OutboxMutation) ResetHeaders()
ResetHeaders resets all changes to the "headers" field.
func (*OutboxMutation) ResetKey ¶
func (m *OutboxMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*OutboxMutation) ResetLastRetry ¶
func (m *OutboxMutation) ResetLastRetry()
ResetLastRetry resets all changes to the "last_retry" field.
func (*OutboxMutation) ResetPayload ¶
func (m *OutboxMutation) ResetPayload()
ResetPayload resets all changes to the "payload" field.
func (*OutboxMutation) ResetProcessingErrors ¶
func (m *OutboxMutation) ResetProcessingErrors()
ResetProcessingErrors resets all changes to the "processing_errors" field.
func (*OutboxMutation) ResetRetryCount ¶
func (m *OutboxMutation) ResetRetryCount()
ResetRetryCount resets all changes to the "retry_count" field.
func (*OutboxMutation) ResetStatus ¶
func (m *OutboxMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*OutboxMutation) ResetTimestamp ¶
func (m *OutboxMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*OutboxMutation) ResetTopic ¶
func (m *OutboxMutation) ResetTopic()
ResetTopic resets all changes to the "topic" field.
func (*OutboxMutation) RetryCount ¶
func (m *OutboxMutation) RetryCount() (r int, exists bool)
RetryCount returns the value of the "retry_count" field in the mutation.
func (*OutboxMutation) SetField ¶
func (m *OutboxMutation) 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 (*OutboxMutation) SetHeaders ¶
func (m *OutboxMutation) SetHeaders(value map[string]string)
SetHeaders sets the "headers" field.
func (*OutboxMutation) SetKey ¶
func (m *OutboxMutation) SetKey(s string)
SetKey sets the "key" field.
func (*OutboxMutation) SetLastRetry ¶
func (m *OutboxMutation) SetLastRetry(t time.Time)
SetLastRetry sets the "last_retry" field.
func (*OutboxMutation) SetOp ¶
func (m *OutboxMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OutboxMutation) SetPayload ¶
func (m *OutboxMutation) SetPayload(b []byte)
SetPayload sets the "payload" field.
func (*OutboxMutation) SetProcessingErrors ¶
func (m *OutboxMutation) SetProcessingErrors(s []string)
SetProcessingErrors sets the "processing_errors" field.
func (*OutboxMutation) SetRetryCount ¶
func (m *OutboxMutation) SetRetryCount(i int)
SetRetryCount sets the "retry_count" field.
func (*OutboxMutation) SetStatus ¶
func (m *OutboxMutation) SetStatus(o outbox.Status)
SetStatus sets the "status" field.
func (*OutboxMutation) SetTimestamp ¶
func (m *OutboxMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*OutboxMutation) SetTopic ¶
func (m *OutboxMutation) SetTopic(s string)
SetTopic sets the "topic" field.
func (*OutboxMutation) Status ¶
func (m *OutboxMutation) Status() (r outbox.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*OutboxMutation) Timestamp ¶
func (m *OutboxMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (*OutboxMutation) Topic ¶
func (m *OutboxMutation) Topic() (r string, exists bool)
Topic returns the value of the "topic" field in the mutation.
func (OutboxMutation) Tx ¶
func (m OutboxMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OutboxMutation) Type ¶
func (m *OutboxMutation) Type() string
Type returns the node type of this mutation (Outbox).
func (*OutboxMutation) Where ¶
func (m *OutboxMutation) Where(ps ...predicate.Outbox)
Where appends a list predicates to the OutboxMutation builder.
func (*OutboxMutation) WhereP ¶
func (m *OutboxMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OutboxMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OutboxOrder ¶
type OutboxOrder struct { Direction OrderDirection `json:"direction"` Field *OutboxOrderField `json:"field"` }
OutboxOrder defines the ordering of Outbox.
type OutboxOrderField ¶
type OutboxOrderField struct {
// contains filtered or unexported fields
}
OutboxOrderField defines the ordering field of Outbox.
type OutboxPaginateOption ¶
type OutboxPaginateOption func(*outboxPager) error
OutboxPaginateOption enables pagination customization.
func WithOutboxFilter ¶
func WithOutboxFilter(filter func(*OutboxQuery) (*OutboxQuery, error)) OutboxPaginateOption
WithOutboxFilter configures pagination filter.
func WithOutboxOrder ¶
func WithOutboxOrder(order *OutboxOrder) OutboxPaginateOption
WithOutboxOrder configures pagination ordering.
type OutboxQuery ¶
type OutboxQuery struct {
// contains filtered or unexported fields
}
OutboxQuery is the builder for querying Outbox entities.
func (*OutboxQuery) Aggregate ¶
func (oq *OutboxQuery) Aggregate(fns ...AggregateFunc) *OutboxSelect
Aggregate returns a OutboxSelect configured with the given aggregations.
func (*OutboxQuery) All ¶
func (oq *OutboxQuery) All(ctx context.Context) ([]*Outbox, error)
All executes the query and returns a list of Outboxes.
func (*OutboxQuery) AllX ¶
func (oq *OutboxQuery) AllX(ctx context.Context) []*Outbox
AllX is like All, but panics if an error occurs.
func (*OutboxQuery) Clone ¶
func (oq *OutboxQuery) Clone() *OutboxQuery
Clone returns a duplicate of the OutboxQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OutboxQuery) CollectFields ¶
func (o *OutboxQuery) CollectFields(ctx context.Context, satisfies ...string) (*OutboxQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*OutboxQuery) Count ¶
func (oq *OutboxQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OutboxQuery) CountX ¶
func (oq *OutboxQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OutboxQuery) ExecContext ¶
func (c *OutboxQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxQuery) Exist ¶
func (oq *OutboxQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OutboxQuery) ExistX ¶
func (oq *OutboxQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OutboxQuery) Filter ¶
func (oq *OutboxQuery) Filter() *OutboxFilter
Filter returns a Filter implementation to apply filters on the OutboxQuery builder.
func (*OutboxQuery) First ¶
func (oq *OutboxQuery) First(ctx context.Context) (*Outbox, error)
First returns the first Outbox entity from the query. Returns a *NotFoundError when no Outbox was found.
func (*OutboxQuery) FirstID ¶
func (oq *OutboxQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Outbox ID from the query. Returns a *NotFoundError when no Outbox ID was found.
func (*OutboxQuery) FirstIDX ¶
func (oq *OutboxQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OutboxQuery) FirstX ¶
func (oq *OutboxQuery) FirstX(ctx context.Context) *Outbox
FirstX is like First, but panics if an error occurs.
func (*OutboxQuery) ForShare ¶
func (oq *OutboxQuery) ForShare(opts ...sql.LockOption) *OutboxQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*OutboxQuery) ForUpdate ¶
func (oq *OutboxQuery) ForUpdate(opts ...sql.LockOption) *OutboxQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*OutboxQuery) GroupBy ¶
func (oq *OutboxQuery) GroupBy(field string, fields ...string) *OutboxGroupBy
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 { Timestamp time.Time `json:"timestamp,omitempty"` Count int `json:"count,omitempty"` } client.Outbox.Query(). GroupBy(outbox.FieldTimestamp). Aggregate(entities.Count()). Scan(ctx, &v)
func (*OutboxQuery) IDs ¶
func (oq *OutboxQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Outbox IDs.
func (*OutboxQuery) IDsX ¶
func (oq *OutboxQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OutboxQuery) Limit ¶
func (oq *OutboxQuery) Limit(limit int) *OutboxQuery
Limit the number of records to be returned by this query.
func (*OutboxQuery) Modify ¶
func (oq *OutboxQuery) Modify(modifiers ...func(s *sql.Selector)) *OutboxSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*OutboxQuery) Offset ¶
func (oq *OutboxQuery) Offset(offset int) *OutboxQuery
Offset to start from.
func (*OutboxQuery) Only ¶
func (oq *OutboxQuery) Only(ctx context.Context) (*Outbox, error)
Only returns a single Outbox entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Outbox entity is found. Returns a *NotFoundError when no Outbox entities are found.
func (*OutboxQuery) OnlyID ¶
func (oq *OutboxQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Outbox ID in the query. Returns a *NotSingularError when more than one Outbox ID is found. Returns a *NotFoundError when no entities are found.
func (*OutboxQuery) OnlyIDX ¶
func (oq *OutboxQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OutboxQuery) OnlyX ¶
func (oq *OutboxQuery) OnlyX(ctx context.Context) *Outbox
OnlyX is like Only, but panics if an error occurs.
func (*OutboxQuery) Order ¶
func (oq *OutboxQuery) Order(o ...OrderFunc) *OutboxQuery
Order specifies how the records should be ordered.
func (*OutboxQuery) Paginate ¶
func (o *OutboxQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...OutboxPaginateOption, ) (*OutboxConnection, error)
Paginate executes the query and returns a relay based cursor connection to Outbox.
func (*OutboxQuery) QueryContext ¶
func (c *OutboxQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxQuery) Select ¶
func (oq *OutboxQuery) Select(fields ...string) *OutboxSelect
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 { Timestamp time.Time `json:"timestamp,omitempty"` } client.Outbox.Query(). Select(outbox.FieldTimestamp). Scan(ctx, &v)
func (*OutboxQuery) Unique ¶
func (oq *OutboxQuery) Unique(unique bool) *OutboxQuery
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 (*OutboxQuery) Where ¶
func (oq *OutboxQuery) Where(ps ...predicate.Outbox) *OutboxQuery
Where adds a new predicate for the OutboxQuery builder.
type OutboxSelect ¶
type OutboxSelect struct { *OutboxQuery // contains filtered or unexported fields }
OutboxSelect is the builder for selecting fields of Outbox entities.
func (*OutboxSelect) Aggregate ¶
func (os *OutboxSelect) Aggregate(fns ...AggregateFunc) *OutboxSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OutboxSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OutboxSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (OutboxSelect) ExecContext ¶
func (c OutboxSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OutboxSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OutboxSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OutboxSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OutboxSelect) Modify ¶
func (os *OutboxSelect) Modify(modifiers ...func(s *sql.Selector)) *OutboxSelect
Modify adds a query modifier for attaching custom logic to queries.
func (OutboxSelect) QueryContext ¶
func (c OutboxSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxSelect) Scan ¶
func (os *OutboxSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OutboxSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OutboxUpdate ¶
type OutboxUpdate struct {
// contains filtered or unexported fields
}
OutboxUpdate is the builder for updating Outbox entities.
func (*OutboxUpdate) AddRetryCount ¶
func (ou *OutboxUpdate) AddRetryCount(i int) *OutboxUpdate
AddRetryCount adds i to the "retry_count" field.
func (*OutboxUpdate) AppendProcessingErrors ¶
func (ou *OutboxUpdate) AppendProcessingErrors(s []string) *OutboxUpdate
AppendProcessingErrors appends s to the "processing_errors" field.
func (*OutboxUpdate) ClearLastRetry ¶
func (ou *OutboxUpdate) ClearLastRetry() *OutboxUpdate
ClearLastRetry clears the value of the "last_retry" field.
func (*OutboxUpdate) ClearProcessingErrors ¶
func (ou *OutboxUpdate) ClearProcessingErrors() *OutboxUpdate
ClearProcessingErrors clears the value of the "processing_errors" field.
func (*OutboxUpdate) Exec ¶
func (ou *OutboxUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OutboxUpdate) ExecContext ¶
func (c *OutboxUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxUpdate) ExecX ¶
func (ou *OutboxUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OutboxUpdate) Modify ¶
func (ou *OutboxUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OutboxUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*OutboxUpdate) Mutation ¶
func (ou *OutboxUpdate) Mutation() *OutboxMutation
Mutation returns the OutboxMutation object of the builder.
func (*OutboxUpdate) QueryContext ¶
func (c *OutboxUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxUpdate) Save ¶
func (ou *OutboxUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OutboxUpdate) SaveX ¶
func (ou *OutboxUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OutboxUpdate) SetHeaders ¶
func (ou *OutboxUpdate) SetHeaders(m map[string]string) *OutboxUpdate
SetHeaders sets the "headers" field.
func (*OutboxUpdate) SetKey ¶
func (ou *OutboxUpdate) SetKey(s string) *OutboxUpdate
SetKey sets the "key" field.
func (*OutboxUpdate) SetLastRetry ¶
func (ou *OutboxUpdate) SetLastRetry(t time.Time) *OutboxUpdate
SetLastRetry sets the "last_retry" field.
func (*OutboxUpdate) SetNillableLastRetry ¶
func (ou *OutboxUpdate) SetNillableLastRetry(t *time.Time) *OutboxUpdate
SetNillableLastRetry sets the "last_retry" field if the given value is not nil.
func (*OutboxUpdate) SetPayload ¶
func (ou *OutboxUpdate) SetPayload(b []byte) *OutboxUpdate
SetPayload sets the "payload" field.
func (*OutboxUpdate) SetProcessingErrors ¶
func (ou *OutboxUpdate) SetProcessingErrors(s []string) *OutboxUpdate
SetProcessingErrors sets the "processing_errors" field.
func (*OutboxUpdate) SetRetryCount ¶
func (ou *OutboxUpdate) SetRetryCount(i int) *OutboxUpdate
SetRetryCount sets the "retry_count" field.
func (*OutboxUpdate) SetStatus ¶
func (ou *OutboxUpdate) SetStatus(o outbox.Status) *OutboxUpdate
SetStatus sets the "status" field.
func (*OutboxUpdate) SetTimestamp ¶
func (ou *OutboxUpdate) SetTimestamp(t time.Time) *OutboxUpdate
SetTimestamp sets the "timestamp" field.
func (*OutboxUpdate) SetTopic ¶
func (ou *OutboxUpdate) SetTopic(s string) *OutboxUpdate
SetTopic sets the "topic" field.
func (*OutboxUpdate) Where ¶
func (ou *OutboxUpdate) Where(ps ...predicate.Outbox) *OutboxUpdate
Where appends a list predicates to the OutboxUpdate builder.
type OutboxUpdateOne ¶
type OutboxUpdateOne struct {
// contains filtered or unexported fields
}
OutboxUpdateOne is the builder for updating a single Outbox entity.
func (*OutboxUpdateOne) AddRetryCount ¶
func (ouo *OutboxUpdateOne) AddRetryCount(i int) *OutboxUpdateOne
AddRetryCount adds i to the "retry_count" field.
func (*OutboxUpdateOne) AppendProcessingErrors ¶
func (ouo *OutboxUpdateOne) AppendProcessingErrors(s []string) *OutboxUpdateOne
AppendProcessingErrors appends s to the "processing_errors" field.
func (*OutboxUpdateOne) ClearLastRetry ¶
func (ouo *OutboxUpdateOne) ClearLastRetry() *OutboxUpdateOne
ClearLastRetry clears the value of the "last_retry" field.
func (*OutboxUpdateOne) ClearProcessingErrors ¶
func (ouo *OutboxUpdateOne) ClearProcessingErrors() *OutboxUpdateOne
ClearProcessingErrors clears the value of the "processing_errors" field.
func (*OutboxUpdateOne) Exec ¶
func (ouo *OutboxUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OutboxUpdateOne) ExecContext ¶
func (c *OutboxUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OutboxUpdateOne) ExecX ¶
func (ouo *OutboxUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OutboxUpdateOne) Modify ¶
func (ouo *OutboxUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *OutboxUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*OutboxUpdateOne) Mutation ¶
func (ouo *OutboxUpdateOne) Mutation() *OutboxMutation
Mutation returns the OutboxMutation object of the builder.
func (*OutboxUpdateOne) QueryContext ¶
func (c *OutboxUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OutboxUpdateOne) Save ¶
func (ouo *OutboxUpdateOne) Save(ctx context.Context) (*Outbox, error)
Save executes the query and returns the updated Outbox entity.
func (*OutboxUpdateOne) SaveX ¶
func (ouo *OutboxUpdateOne) SaveX(ctx context.Context) *Outbox
SaveX is like Save, but panics if an error occurs.
func (*OutboxUpdateOne) Select ¶
func (ouo *OutboxUpdateOne) Select(field string, fields ...string) *OutboxUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OutboxUpdateOne) SetHeaders ¶
func (ouo *OutboxUpdateOne) SetHeaders(m map[string]string) *OutboxUpdateOne
SetHeaders sets the "headers" field.
func (*OutboxUpdateOne) SetKey ¶
func (ouo *OutboxUpdateOne) SetKey(s string) *OutboxUpdateOne
SetKey sets the "key" field.
func (*OutboxUpdateOne) SetLastRetry ¶
func (ouo *OutboxUpdateOne) SetLastRetry(t time.Time) *OutboxUpdateOne
SetLastRetry sets the "last_retry" field.
func (*OutboxUpdateOne) SetNillableLastRetry ¶
func (ouo *OutboxUpdateOne) SetNillableLastRetry(t *time.Time) *OutboxUpdateOne
SetNillableLastRetry sets the "last_retry" field if the given value is not nil.
func (*OutboxUpdateOne) SetPayload ¶
func (ouo *OutboxUpdateOne) SetPayload(b []byte) *OutboxUpdateOne
SetPayload sets the "payload" field.
func (*OutboxUpdateOne) SetProcessingErrors ¶
func (ouo *OutboxUpdateOne) SetProcessingErrors(s []string) *OutboxUpdateOne
SetProcessingErrors sets the "processing_errors" field.
func (*OutboxUpdateOne) SetRetryCount ¶
func (ouo *OutboxUpdateOne) SetRetryCount(i int) *OutboxUpdateOne
SetRetryCount sets the "retry_count" field.
func (*OutboxUpdateOne) SetStatus ¶
func (ouo *OutboxUpdateOne) SetStatus(o outbox.Status) *OutboxUpdateOne
SetStatus sets the "status" field.
func (*OutboxUpdateOne) SetTimestamp ¶
func (ouo *OutboxUpdateOne) SetTimestamp(t time.Time) *OutboxUpdateOne
SetTimestamp sets the "timestamp" field.
func (*OutboxUpdateOne) SetTopic ¶
func (ouo *OutboxUpdateOne) SetTopic(s string) *OutboxUpdateOne
SetTopic sets the "topic" field.
type OutboxUpsert ¶
OutboxUpsert is the "OnConflict" setter.
func (*OutboxUpsert) AddRetryCount ¶
func (u *OutboxUpsert) AddRetryCount(v int) *OutboxUpsert
AddRetryCount adds v to the "retry_count" field.
func (*OutboxUpsert) ClearLastRetry ¶
func (u *OutboxUpsert) ClearLastRetry() *OutboxUpsert
ClearLastRetry clears the value of the "last_retry" field.
func (*OutboxUpsert) ClearProcessingErrors ¶
func (u *OutboxUpsert) ClearProcessingErrors() *OutboxUpsert
ClearProcessingErrors clears the value of the "processing_errors" field.
func (*OutboxUpsert) SetHeaders ¶
func (u *OutboxUpsert) SetHeaders(v map[string]string) *OutboxUpsert
SetHeaders sets the "headers" field.
func (*OutboxUpsert) SetKey ¶
func (u *OutboxUpsert) SetKey(v string) *OutboxUpsert
SetKey sets the "key" field.
func (*OutboxUpsert) SetLastRetry ¶
func (u *OutboxUpsert) SetLastRetry(v time.Time) *OutboxUpsert
SetLastRetry sets the "last_retry" field.
func (*OutboxUpsert) SetPayload ¶
func (u *OutboxUpsert) SetPayload(v []byte) *OutboxUpsert
SetPayload sets the "payload" field.
func (*OutboxUpsert) SetProcessingErrors ¶
func (u *OutboxUpsert) SetProcessingErrors(v []string) *OutboxUpsert
SetProcessingErrors sets the "processing_errors" field.
func (*OutboxUpsert) SetRetryCount ¶
func (u *OutboxUpsert) SetRetryCount(v int) *OutboxUpsert
SetRetryCount sets the "retry_count" field.
func (*OutboxUpsert) SetStatus ¶
func (u *OutboxUpsert) SetStatus(v outbox.Status) *OutboxUpsert
SetStatus sets the "status" field.
func (*OutboxUpsert) SetTimestamp ¶
func (u *OutboxUpsert) SetTimestamp(v time.Time) *OutboxUpsert
SetTimestamp sets the "timestamp" field.
func (*OutboxUpsert) SetTopic ¶
func (u *OutboxUpsert) SetTopic(v string) *OutboxUpsert
SetTopic sets the "topic" field.
func (*OutboxUpsert) UpdateHeaders ¶
func (u *OutboxUpsert) UpdateHeaders() *OutboxUpsert
UpdateHeaders sets the "headers" field to the value that was provided on create.
func (*OutboxUpsert) UpdateKey ¶
func (u *OutboxUpsert) UpdateKey() *OutboxUpsert
UpdateKey sets the "key" field to the value that was provided on create.
func (*OutboxUpsert) UpdateLastRetry ¶
func (u *OutboxUpsert) UpdateLastRetry() *OutboxUpsert
UpdateLastRetry sets the "last_retry" field to the value that was provided on create.
func (*OutboxUpsert) UpdatePayload ¶
func (u *OutboxUpsert) UpdatePayload() *OutboxUpsert
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*OutboxUpsert) UpdateProcessingErrors ¶
func (u *OutboxUpsert) UpdateProcessingErrors() *OutboxUpsert
UpdateProcessingErrors sets the "processing_errors" field to the value that was provided on create.
func (*OutboxUpsert) UpdateRetryCount ¶
func (u *OutboxUpsert) UpdateRetryCount() *OutboxUpsert
UpdateRetryCount sets the "retry_count" field to the value that was provided on create.
func (*OutboxUpsert) UpdateStatus ¶
func (u *OutboxUpsert) UpdateStatus() *OutboxUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*OutboxUpsert) UpdateTimestamp ¶
func (u *OutboxUpsert) UpdateTimestamp() *OutboxUpsert
UpdateTimestamp sets the "timestamp" field to the value that was provided on create.
func (*OutboxUpsert) UpdateTopic ¶
func (u *OutboxUpsert) UpdateTopic() *OutboxUpsert
UpdateTopic sets the "topic" field to the value that was provided on create.
type OutboxUpsertBulk ¶
type OutboxUpsertBulk struct {
// contains filtered or unexported fields
}
OutboxUpsertBulk is the builder for "upsert"-ing a bulk of Outbox nodes.
func (*OutboxUpsertBulk) AddRetryCount ¶
func (u *OutboxUpsertBulk) AddRetryCount(v int) *OutboxUpsertBulk
AddRetryCount adds v to the "retry_count" field.
func (*OutboxUpsertBulk) ClearLastRetry ¶
func (u *OutboxUpsertBulk) ClearLastRetry() *OutboxUpsertBulk
ClearLastRetry clears the value of the "last_retry" field.
func (*OutboxUpsertBulk) ClearProcessingErrors ¶
func (u *OutboxUpsertBulk) ClearProcessingErrors() *OutboxUpsertBulk
ClearProcessingErrors clears the value of the "processing_errors" field.
func (*OutboxUpsertBulk) DoNothing ¶
func (u *OutboxUpsertBulk) DoNothing() *OutboxUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OutboxUpsertBulk) Exec ¶
func (u *OutboxUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OutboxUpsertBulk) ExecX ¶
func (u *OutboxUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OutboxUpsertBulk) Ignore ¶
func (u *OutboxUpsertBulk) Ignore() *OutboxUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Outbox.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OutboxUpsertBulk) SetHeaders ¶
func (u *OutboxUpsertBulk) SetHeaders(v map[string]string) *OutboxUpsertBulk
SetHeaders sets the "headers" field.
func (*OutboxUpsertBulk) SetKey ¶
func (u *OutboxUpsertBulk) SetKey(v string) *OutboxUpsertBulk
SetKey sets the "key" field.
func (*OutboxUpsertBulk) SetLastRetry ¶
func (u *OutboxUpsertBulk) SetLastRetry(v time.Time) *OutboxUpsertBulk
SetLastRetry sets the "last_retry" field.
func (*OutboxUpsertBulk) SetPayload ¶
func (u *OutboxUpsertBulk) SetPayload(v []byte) *OutboxUpsertBulk
SetPayload sets the "payload" field.
func (*OutboxUpsertBulk) SetProcessingErrors ¶
func (u *OutboxUpsertBulk) SetProcessingErrors(v []string) *OutboxUpsertBulk
SetProcessingErrors sets the "processing_errors" field.
func (*OutboxUpsertBulk) SetRetryCount ¶
func (u *OutboxUpsertBulk) SetRetryCount(v int) *OutboxUpsertBulk
SetRetryCount sets the "retry_count" field.
func (*OutboxUpsertBulk) SetStatus ¶
func (u *OutboxUpsertBulk) SetStatus(v outbox.Status) *OutboxUpsertBulk
SetStatus sets the "status" field.
func (*OutboxUpsertBulk) SetTimestamp ¶
func (u *OutboxUpsertBulk) SetTimestamp(v time.Time) *OutboxUpsertBulk
SetTimestamp sets the "timestamp" field.
func (*OutboxUpsertBulk) SetTopic ¶
func (u *OutboxUpsertBulk) SetTopic(v string) *OutboxUpsertBulk
SetTopic sets the "topic" field.
func (*OutboxUpsertBulk) Update ¶
func (u *OutboxUpsertBulk) Update(set func(*OutboxUpsert)) *OutboxUpsertBulk
Update allows overriding fields `UPDATE` values. See the OutboxCreateBulk.OnConflict documentation for more info.
func (*OutboxUpsertBulk) UpdateHeaders ¶
func (u *OutboxUpsertBulk) UpdateHeaders() *OutboxUpsertBulk
UpdateHeaders sets the "headers" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateKey ¶
func (u *OutboxUpsertBulk) UpdateKey() *OutboxUpsertBulk
UpdateKey sets the "key" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateLastRetry ¶
func (u *OutboxUpsertBulk) UpdateLastRetry() *OutboxUpsertBulk
UpdateLastRetry sets the "last_retry" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateNewValues ¶
func (u *OutboxUpsertBulk) UpdateNewValues() *OutboxUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Outbox.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OutboxUpsertBulk) UpdatePayload ¶
func (u *OutboxUpsertBulk) UpdatePayload() *OutboxUpsertBulk
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateProcessingErrors ¶
func (u *OutboxUpsertBulk) UpdateProcessingErrors() *OutboxUpsertBulk
UpdateProcessingErrors sets the "processing_errors" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateRetryCount ¶
func (u *OutboxUpsertBulk) UpdateRetryCount() *OutboxUpsertBulk
UpdateRetryCount sets the "retry_count" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateStatus ¶
func (u *OutboxUpsertBulk) UpdateStatus() *OutboxUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateTimestamp ¶
func (u *OutboxUpsertBulk) UpdateTimestamp() *OutboxUpsertBulk
UpdateTimestamp sets the "timestamp" field to the value that was provided on create.
func (*OutboxUpsertBulk) UpdateTopic ¶
func (u *OutboxUpsertBulk) UpdateTopic() *OutboxUpsertBulk
UpdateTopic sets the "topic" field to the value that was provided on create.
type OutboxUpsertOne ¶
type OutboxUpsertOne struct {
// contains filtered or unexported fields
}
OutboxUpsertOne is the builder for "upsert"-ing
one Outbox node.
func (*OutboxUpsertOne) AddRetryCount ¶
func (u *OutboxUpsertOne) AddRetryCount(v int) *OutboxUpsertOne
AddRetryCount adds v to the "retry_count" field.
func (*OutboxUpsertOne) ClearLastRetry ¶
func (u *OutboxUpsertOne) ClearLastRetry() *OutboxUpsertOne
ClearLastRetry clears the value of the "last_retry" field.
func (*OutboxUpsertOne) ClearProcessingErrors ¶
func (u *OutboxUpsertOne) ClearProcessingErrors() *OutboxUpsertOne
ClearProcessingErrors clears the value of the "processing_errors" field.
func (*OutboxUpsertOne) DoNothing ¶
func (u *OutboxUpsertOne) DoNothing() *OutboxUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*OutboxUpsertOne) Exec ¶
func (u *OutboxUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*OutboxUpsertOne) ExecX ¶
func (u *OutboxUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OutboxUpsertOne) ID ¶
func (u *OutboxUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*OutboxUpsertOne) IDX ¶
func (u *OutboxUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*OutboxUpsertOne) Ignore ¶
func (u *OutboxUpsertOne) Ignore() *OutboxUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Outbox.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*OutboxUpsertOne) SetHeaders ¶
func (u *OutboxUpsertOne) SetHeaders(v map[string]string) *OutboxUpsertOne
SetHeaders sets the "headers" field.
func (*OutboxUpsertOne) SetKey ¶
func (u *OutboxUpsertOne) SetKey(v string) *OutboxUpsertOne
SetKey sets the "key" field.
func (*OutboxUpsertOne) SetLastRetry ¶
func (u *OutboxUpsertOne) SetLastRetry(v time.Time) *OutboxUpsertOne
SetLastRetry sets the "last_retry" field.
func (*OutboxUpsertOne) SetPayload ¶
func (u *OutboxUpsertOne) SetPayload(v []byte) *OutboxUpsertOne
SetPayload sets the "payload" field.
func (*OutboxUpsertOne) SetProcessingErrors ¶
func (u *OutboxUpsertOne) SetProcessingErrors(v []string) *OutboxUpsertOne
SetProcessingErrors sets the "processing_errors" field.
func (*OutboxUpsertOne) SetRetryCount ¶
func (u *OutboxUpsertOne) SetRetryCount(v int) *OutboxUpsertOne
SetRetryCount sets the "retry_count" field.
func (*OutboxUpsertOne) SetStatus ¶
func (u *OutboxUpsertOne) SetStatus(v outbox.Status) *OutboxUpsertOne
SetStatus sets the "status" field.
func (*OutboxUpsertOne) SetTimestamp ¶
func (u *OutboxUpsertOne) SetTimestamp(v time.Time) *OutboxUpsertOne
SetTimestamp sets the "timestamp" field.
func (*OutboxUpsertOne) SetTopic ¶
func (u *OutboxUpsertOne) SetTopic(v string) *OutboxUpsertOne
SetTopic sets the "topic" field.
func (*OutboxUpsertOne) Update ¶
func (u *OutboxUpsertOne) Update(set func(*OutboxUpsert)) *OutboxUpsertOne
Update allows overriding fields `UPDATE` values. See the OutboxCreate.OnConflict documentation for more info.
func (*OutboxUpsertOne) UpdateHeaders ¶
func (u *OutboxUpsertOne) UpdateHeaders() *OutboxUpsertOne
UpdateHeaders sets the "headers" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateKey ¶
func (u *OutboxUpsertOne) UpdateKey() *OutboxUpsertOne
UpdateKey sets the "key" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateLastRetry ¶
func (u *OutboxUpsertOne) UpdateLastRetry() *OutboxUpsertOne
UpdateLastRetry sets the "last_retry" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateNewValues ¶
func (u *OutboxUpsertOne) UpdateNewValues() *OutboxUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Outbox.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*OutboxUpsertOne) UpdatePayload ¶
func (u *OutboxUpsertOne) UpdatePayload() *OutboxUpsertOne
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateProcessingErrors ¶
func (u *OutboxUpsertOne) UpdateProcessingErrors() *OutboxUpsertOne
UpdateProcessingErrors sets the "processing_errors" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateRetryCount ¶
func (u *OutboxUpsertOne) UpdateRetryCount() *OutboxUpsertOne
UpdateRetryCount sets the "retry_count" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateStatus ¶
func (u *OutboxUpsertOne) UpdateStatus() *OutboxUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateTimestamp ¶
func (u *OutboxUpsertOne) UpdateTimestamp() *OutboxUpsertOne
UpdateTimestamp sets the "timestamp" field to the value that was provided on create.
func (*OutboxUpsertOne) UpdateTopic ¶
func (u *OutboxUpsertOne) UpdateTopic() *OutboxUpsertOne
UpdateTopic sets the "topic" field to the value that was provided on create.
type OutboxWhereInput ¶
type OutboxWhereInput struct { Predicates []predicate.Outbox `json:"-"` Not *OutboxWhereInput `json:"not,omitempty"` Or []*OutboxWhereInput `json:"or,omitempty"` And []*OutboxWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "timestamp" field predicates. Timestamp *time.Time `json:"timestamp,omitempty"` TimestampNEQ *time.Time `json:"timestampNEQ,omitempty"` TimestampIn []time.Time `json:"timestampIn,omitempty"` TimestampNotIn []time.Time `json:"timestampNotIn,omitempty"` TimestampGT *time.Time `json:"timestampGT,omitempty"` TimestampGTE *time.Time `json:"timestampGTE,omitempty"` TimestampLT *time.Time `json:"timestampLT,omitempty"` TimestampLTE *time.Time `json:"timestampLTE,omitempty"` // "topic" field predicates. Topic *string `json:"topic,omitempty"` TopicNEQ *string `json:"topicNEQ,omitempty"` TopicIn []string `json:"topicIn,omitempty"` TopicNotIn []string `json:"topicNotIn,omitempty"` TopicGT *string `json:"topicGT,omitempty"` TopicGTE *string `json:"topicGTE,omitempty"` TopicLT *string `json:"topicLT,omitempty"` TopicLTE *string `json:"topicLTE,omitempty"` TopicContains *string `json:"topicContains,omitempty"` TopicHasPrefix *string `json:"topicHasPrefix,omitempty"` TopicHasSuffix *string `json:"topicHasSuffix,omitempty"` TopicEqualFold *string `json:"topicEqualFold,omitempty"` TopicContainsFold *string `json:"topicContainsFold,omitempty"` // "key" field predicates. Key *string `json:"key,omitempty"` KeyNEQ *string `json:"keyNEQ,omitempty"` KeyIn []string `json:"keyIn,omitempty"` KeyNotIn []string `json:"keyNotIn,omitempty"` KeyGT *string `json:"keyGT,omitempty"` KeyGTE *string `json:"keyGTE,omitempty"` KeyLT *string `json:"keyLT,omitempty"` KeyLTE *string `json:"keyLTE,omitempty"` KeyContains *string `json:"keyContains,omitempty"` KeyHasPrefix *string `json:"keyHasPrefix,omitempty"` KeyHasSuffix *string `json:"keyHasSuffix,omitempty"` KeyEqualFold *string `json:"keyEqualFold,omitempty"` KeyContainsFold *string `json:"keyContainsFold,omitempty"` // "retry_count" field predicates. RetryCount *int `json:"retryCount,omitempty"` RetryCountNEQ *int `json:"retryCountNEQ,omitempty"` RetryCountIn []int `json:"retryCountIn,omitempty"` RetryCountNotIn []int `json:"retryCountNotIn,omitempty"` RetryCountGT *int `json:"retryCountGT,omitempty"` RetryCountGTE *int `json:"retryCountGTE,omitempty"` RetryCountLT *int `json:"retryCountLT,omitempty"` RetryCountLTE *int `json:"retryCountLTE,omitempty"` // "status" field predicates. Status *outbox.Status `json:"status,omitempty"` StatusNEQ *outbox.Status `json:"statusNEQ,omitempty"` StatusIn []outbox.Status `json:"statusIn,omitempty"` StatusNotIn []outbox.Status `json:"statusNotIn,omitempty"` // "last_retry" field predicates. LastRetry *time.Time `json:"lastRetry,omitempty"` LastRetryNEQ *time.Time `json:"lastRetryNEQ,omitempty"` LastRetryIn []time.Time `json:"lastRetryIn,omitempty"` LastRetryNotIn []time.Time `json:"lastRetryNotIn,omitempty"` LastRetryGT *time.Time `json:"lastRetryGT,omitempty"` LastRetryGTE *time.Time `json:"lastRetryGTE,omitempty"` LastRetryLT *time.Time `json:"lastRetryLT,omitempty"` LastRetryLTE *time.Time `json:"lastRetryLTE,omitempty"` LastRetryIsNil bool `json:"lastRetryIsNil,omitempty"` LastRetryNotNil bool `json:"lastRetryNotNil,omitempty"` }
OutboxWhereInput represents a where input for filtering Outbox queries.
func (*OutboxWhereInput) AddPredicates ¶
func (i *OutboxWhereInput) AddPredicates(predicates ...predicate.Outbox)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*OutboxWhereInput) Filter ¶
func (i *OutboxWhereInput) Filter(q *OutboxQuery) (*OutboxQuery, error)
Filter applies the OutboxWhereInput filter on the OutboxQuery builder.
type PageInfo ¶
type PageInfo struct { HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` StartCursor *Cursor `json:"startCursor"` EndCursor *Cursor `json:"endCursor"` }
PageInfo of a connection type.
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 SchemaConfig ¶
type SchemaConfig = internal.SchemaConfig
SchemaConfig represents alternative schema names for all tables that can be passed at runtime.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Order is the client for interacting with the Order builders. Order *OrderClient // Outbox is the client for interacting with the Outbox builders. Outbox *OutboxClient // 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) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- entgo-client.go
- entql.go
- generate.go
- gql_collection.go
- gql_edge.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- mutation.go
- order.go
- order_create.go
- order_delete.go
- order_query.go
- order_update.go
- outbox.go
- outbox_create.go
- outbox_delete.go
- outbox_query.go
- outbox_update.go
- runtime.go
- tx.go