Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type AuditLog
- type AuditLogClient
- func (c *AuditLogClient) Create() *AuditLogCreate
- func (c *AuditLogClient) CreateBulk(builders ...*AuditLogCreate) *AuditLogCreateBulk
- func (c *AuditLogClient) Delete() *AuditLogDelete
- func (c *AuditLogClient) DeleteOne(_m *AuditLog) *AuditLogDeleteOne
- func (c *AuditLogClient) DeleteOneID(id uuid.UUID) *AuditLogDeleteOne
- func (c *AuditLogClient) Get(ctx context.Context, id uuid.UUID) (*AuditLog, error)
- func (c *AuditLogClient) GetX(ctx context.Context, id uuid.UUID) *AuditLog
- func (c *AuditLogClient) Hooks() []Hook
- func (c *AuditLogClient) Intercept(interceptors ...Interceptor)
- func (c *AuditLogClient) Interceptors() []Interceptor
- func (c *AuditLogClient) MapCreateBulk(slice any, setFunc func(*AuditLogCreate, int)) *AuditLogCreateBulk
- func (c *AuditLogClient) Query() *AuditLogQuery
- func (c *AuditLogClient) Update() *AuditLogUpdate
- func (c *AuditLogClient) UpdateOne(_m *AuditLog) *AuditLogUpdateOne
- func (c *AuditLogClient) UpdateOneID(id uuid.UUID) *AuditLogUpdateOne
- func (c *AuditLogClient) Use(hooks ...Hook)
- type AuditLogCreate
- func (_c *AuditLogCreate) Exec(ctx context.Context) error
- func (_c *AuditLogCreate) ExecX(ctx context.Context)
- func (_c *AuditLogCreate) Mutation() *AuditLogMutation
- func (_c *AuditLogCreate) Save(ctx context.Context) (*AuditLog, error)
- func (_c *AuditLogCreate) SaveX(ctx context.Context) *AuditLog
- func (_c *AuditLogCreate) SetAction(v auditlog.Action) *AuditLogCreate
- func (_c *AuditLogCreate) SetActor(v string) *AuditLogCreate
- func (_c *AuditLogCreate) SetDetails(v map[string]interface{}) *AuditLogCreate
- func (_c *AuditLogCreate) SetID(v uuid.UUID) *AuditLogCreate
- func (_c *AuditLogCreate) SetNillableID(v *uuid.UUID) *AuditLogCreate
- func (_c *AuditLogCreate) SetNillableSessionKey(v *string) *AuditLogCreate
- func (_c *AuditLogCreate) SetNillableTarget(v *string) *AuditLogCreate
- func (_c *AuditLogCreate) SetNillableTimestamp(v *time.Time) *AuditLogCreate
- func (_c *AuditLogCreate) SetSessionKey(v string) *AuditLogCreate
- func (_c *AuditLogCreate) SetTarget(v string) *AuditLogCreate
- func (_c *AuditLogCreate) SetTimestamp(v time.Time) *AuditLogCreate
- type AuditLogCreateBulk
- type AuditLogDelete
- type AuditLogDeleteOne
- type AuditLogGroupBy
- func (_g *AuditLogGroupBy) Aggregate(fns ...AggregateFunc) *AuditLogGroupBy
- func (s *AuditLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuditLogGroupBy) BoolX(ctx context.Context) bool
- func (s *AuditLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AuditLogGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AuditLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuditLogGroupBy) Float64X(ctx context.Context) float64
- func (s *AuditLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuditLogGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AuditLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AuditLogGroupBy) IntX(ctx context.Context) int
- func (s *AuditLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AuditLogGroupBy) IntsX(ctx context.Context) []int
- func (_g *AuditLogGroupBy) Scan(ctx context.Context, v any) error
- func (s *AuditLogGroupBy) ScanX(ctx context.Context, v any)
- func (s *AuditLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AuditLogGroupBy) StringX(ctx context.Context) string
- func (s *AuditLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AuditLogGroupBy) StringsX(ctx context.Context) []string
- type AuditLogMutation
- func (m *AuditLogMutation) Action() (r auditlog.Action, exists bool)
- func (m *AuditLogMutation) Actor() (r string, exists bool)
- func (m *AuditLogMutation) AddField(name string, value ent.Value) error
- func (m *AuditLogMutation) AddedEdges() []string
- func (m *AuditLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *AuditLogMutation) AddedFields() []string
- func (m *AuditLogMutation) AddedIDs(name string) []ent.Value
- func (m *AuditLogMutation) ClearDetails()
- func (m *AuditLogMutation) ClearEdge(name string) error
- func (m *AuditLogMutation) ClearField(name string) error
- func (m *AuditLogMutation) ClearSessionKey()
- func (m *AuditLogMutation) ClearTarget()
- func (m *AuditLogMutation) ClearedEdges() []string
- func (m *AuditLogMutation) ClearedFields() []string
- func (m AuditLogMutation) Client() *Client
- func (m *AuditLogMutation) Details() (r map[string]interface{}, exists bool)
- func (m *AuditLogMutation) DetailsCleared() bool
- func (m *AuditLogMutation) EdgeCleared(name string) bool
- func (m *AuditLogMutation) Field(name string) (ent.Value, bool)
- func (m *AuditLogMutation) FieldCleared(name string) bool
- func (m *AuditLogMutation) Fields() []string
- func (m *AuditLogMutation) ID() (id uuid.UUID, exists bool)
- func (m *AuditLogMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AuditLogMutation) OldAction(ctx context.Context) (v auditlog.Action, err error)
- func (m *AuditLogMutation) OldActor(ctx context.Context) (v string, err error)
- func (m *AuditLogMutation) OldDetails(ctx context.Context) (v map[string]interface{}, err error)
- func (m *AuditLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AuditLogMutation) OldSessionKey(ctx context.Context) (v string, err error)
- func (m *AuditLogMutation) OldTarget(ctx context.Context) (v string, err error)
- func (m *AuditLogMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *AuditLogMutation) Op() Op
- func (m *AuditLogMutation) RemovedEdges() []string
- func (m *AuditLogMutation) RemovedIDs(name string) []ent.Value
- func (m *AuditLogMutation) ResetAction()
- func (m *AuditLogMutation) ResetActor()
- func (m *AuditLogMutation) ResetDetails()
- func (m *AuditLogMutation) ResetEdge(name string) error
- func (m *AuditLogMutation) ResetField(name string) error
- func (m *AuditLogMutation) ResetSessionKey()
- func (m *AuditLogMutation) ResetTarget()
- func (m *AuditLogMutation) ResetTimestamp()
- func (m *AuditLogMutation) SessionKey() (r string, exists bool)
- func (m *AuditLogMutation) SessionKeyCleared() bool
- func (m *AuditLogMutation) SetAction(a auditlog.Action)
- func (m *AuditLogMutation) SetActor(s string)
- func (m *AuditLogMutation) SetDetails(value map[string]interface{})
- func (m *AuditLogMutation) SetField(name string, value ent.Value) error
- func (m *AuditLogMutation) SetID(id uuid.UUID)
- func (m *AuditLogMutation) SetOp(op Op)
- func (m *AuditLogMutation) SetSessionKey(s string)
- func (m *AuditLogMutation) SetTarget(s string)
- func (m *AuditLogMutation) SetTimestamp(t time.Time)
- func (m *AuditLogMutation) Target() (r string, exists bool)
- func (m *AuditLogMutation) TargetCleared() bool
- func (m *AuditLogMutation) Timestamp() (r time.Time, exists bool)
- func (m AuditLogMutation) Tx() (*Tx, error)
- func (m *AuditLogMutation) Type() string
- func (m *AuditLogMutation) Where(ps ...predicate.AuditLog)
- func (m *AuditLogMutation) WhereP(ps ...func(*sql.Selector))
- type AuditLogQuery
- func (_q *AuditLogQuery) Aggregate(fns ...AggregateFunc) *AuditLogSelect
- func (_q *AuditLogQuery) All(ctx context.Context) ([]*AuditLog, error)
- func (_q *AuditLogQuery) AllX(ctx context.Context) []*AuditLog
- func (_q *AuditLogQuery) Clone() *AuditLogQuery
- func (_q *AuditLogQuery) Count(ctx context.Context) (int, error)
- func (_q *AuditLogQuery) CountX(ctx context.Context) int
- func (_q *AuditLogQuery) Exist(ctx context.Context) (bool, error)
- func (_q *AuditLogQuery) ExistX(ctx context.Context) bool
- func (_q *AuditLogQuery) First(ctx context.Context) (*AuditLog, error)
- func (_q *AuditLogQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AuditLogQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *AuditLogQuery) FirstX(ctx context.Context) *AuditLog
- func (_q *AuditLogQuery) GroupBy(field string, fields ...string) *AuditLogGroupBy
- func (_q *AuditLogQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *AuditLogQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *AuditLogQuery) Limit(limit int) *AuditLogQuery
- func (_q *AuditLogQuery) Offset(offset int) *AuditLogQuery
- func (_q *AuditLogQuery) Only(ctx context.Context) (*AuditLog, error)
- func (_q *AuditLogQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AuditLogQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *AuditLogQuery) OnlyX(ctx context.Context) *AuditLog
- func (_q *AuditLogQuery) Order(o ...auditlog.OrderOption) *AuditLogQuery
- func (_q *AuditLogQuery) Select(fields ...string) *AuditLogSelect
- func (_q *AuditLogQuery) Unique(unique bool) *AuditLogQuery
- func (_q *AuditLogQuery) Where(ps ...predicate.AuditLog) *AuditLogQuery
- type AuditLogSelect
- func (_s *AuditLogSelect) Aggregate(fns ...AggregateFunc) *AuditLogSelect
- func (s *AuditLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AuditLogSelect) BoolX(ctx context.Context) bool
- func (s *AuditLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AuditLogSelect) BoolsX(ctx context.Context) []bool
- func (s *AuditLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AuditLogSelect) Float64X(ctx context.Context) float64
- func (s *AuditLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AuditLogSelect) Float64sX(ctx context.Context) []float64
- func (s *AuditLogSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AuditLogSelect) IntX(ctx context.Context) int
- func (s *AuditLogSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AuditLogSelect) IntsX(ctx context.Context) []int
- func (_s *AuditLogSelect) Scan(ctx context.Context, v any) error
- func (s *AuditLogSelect) ScanX(ctx context.Context, v any)
- func (s *AuditLogSelect) String(ctx context.Context) (_ string, err error)
- func (s *AuditLogSelect) StringX(ctx context.Context) string
- func (s *AuditLogSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AuditLogSelect) StringsX(ctx context.Context) []string
- type AuditLogUpdate
- func (_u *AuditLogUpdate) ClearDetails() *AuditLogUpdate
- func (_u *AuditLogUpdate) ClearSessionKey() *AuditLogUpdate
- func (_u *AuditLogUpdate) ClearTarget() *AuditLogUpdate
- func (_u *AuditLogUpdate) Exec(ctx context.Context) error
- func (_u *AuditLogUpdate) ExecX(ctx context.Context)
- func (_u *AuditLogUpdate) Mutation() *AuditLogMutation
- func (_u *AuditLogUpdate) Save(ctx context.Context) (int, error)
- func (_u *AuditLogUpdate) SaveX(ctx context.Context) int
- func (_u *AuditLogUpdate) SetAction(v auditlog.Action) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetActor(v string) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetDetails(v map[string]interface{}) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetNillableAction(v *auditlog.Action) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetNillableActor(v *string) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetNillableSessionKey(v *string) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetNillableTarget(v *string) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetSessionKey(v string) *AuditLogUpdate
- func (_u *AuditLogUpdate) SetTarget(v string) *AuditLogUpdate
- func (_u *AuditLogUpdate) Where(ps ...predicate.AuditLog) *AuditLogUpdate
- type AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) ClearDetails() *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) ClearSessionKey() *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) ClearTarget() *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) Exec(ctx context.Context) error
- func (_u *AuditLogUpdateOne) ExecX(ctx context.Context)
- func (_u *AuditLogUpdateOne) Mutation() *AuditLogMutation
- func (_u *AuditLogUpdateOne) Save(ctx context.Context) (*AuditLog, error)
- func (_u *AuditLogUpdateOne) SaveX(ctx context.Context) *AuditLog
- func (_u *AuditLogUpdateOne) Select(field string, fields ...string) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetAction(v auditlog.Action) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetActor(v string) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetDetails(v map[string]interface{}) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetNillableAction(v *auditlog.Action) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetNillableActor(v *string) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetNillableSessionKey(v *string) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetNillableTarget(v *string) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetSessionKey(v string) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) SetTarget(v string) *AuditLogUpdateOne
- func (_u *AuditLogUpdateOne) Where(ps ...predicate.AuditLog) *AuditLogUpdateOne
- type AuditLogs
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConfigProfile
- type ConfigProfileClient
- func (c *ConfigProfileClient) Create() *ConfigProfileCreate
- func (c *ConfigProfileClient) CreateBulk(builders ...*ConfigProfileCreate) *ConfigProfileCreateBulk
- func (c *ConfigProfileClient) Delete() *ConfigProfileDelete
- func (c *ConfigProfileClient) DeleteOne(_m *ConfigProfile) *ConfigProfileDeleteOne
- func (c *ConfigProfileClient) DeleteOneID(id uuid.UUID) *ConfigProfileDeleteOne
- func (c *ConfigProfileClient) Get(ctx context.Context, id uuid.UUID) (*ConfigProfile, error)
- func (c *ConfigProfileClient) GetX(ctx context.Context, id uuid.UUID) *ConfigProfile
- func (c *ConfigProfileClient) Hooks() []Hook
- func (c *ConfigProfileClient) Intercept(interceptors ...Interceptor)
- func (c *ConfigProfileClient) Interceptors() []Interceptor
- func (c *ConfigProfileClient) MapCreateBulk(slice any, setFunc func(*ConfigProfileCreate, int)) *ConfigProfileCreateBulk
- func (c *ConfigProfileClient) Query() *ConfigProfileQuery
- func (c *ConfigProfileClient) Update() *ConfigProfileUpdate
- func (c *ConfigProfileClient) UpdateOne(_m *ConfigProfile) *ConfigProfileUpdateOne
- func (c *ConfigProfileClient) UpdateOneID(id uuid.UUID) *ConfigProfileUpdateOne
- func (c *ConfigProfileClient) Use(hooks ...Hook)
- type ConfigProfileCreate
- func (_c *ConfigProfileCreate) Exec(ctx context.Context) error
- func (_c *ConfigProfileCreate) ExecX(ctx context.Context)
- func (_c *ConfigProfileCreate) Mutation() *ConfigProfileMutation
- func (_c *ConfigProfileCreate) Save(ctx context.Context) (*ConfigProfile, error)
- func (_c *ConfigProfileCreate) SaveX(ctx context.Context) *ConfigProfile
- func (_c *ConfigProfileCreate) SetActive(v bool) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetCreatedAt(v time.Time) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetEncryptedData(v []byte) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetID(v uuid.UUID) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetName(v string) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetNillableActive(v *bool) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetNillableCreatedAt(v *time.Time) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetNillableID(v *uuid.UUID) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetNillableUpdatedAt(v *time.Time) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetNillableVersion(v *int) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetUpdatedAt(v time.Time) *ConfigProfileCreate
- func (_c *ConfigProfileCreate) SetVersion(v int) *ConfigProfileCreate
- type ConfigProfileCreateBulk
- type ConfigProfileDelete
- type ConfigProfileDeleteOne
- type ConfigProfileGroupBy
- func (_g *ConfigProfileGroupBy) Aggregate(fns ...AggregateFunc) *ConfigProfileGroupBy
- func (s *ConfigProfileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConfigProfileGroupBy) BoolX(ctx context.Context) bool
- func (s *ConfigProfileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ConfigProfileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ConfigProfileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConfigProfileGroupBy) Float64X(ctx context.Context) float64
- func (s *ConfigProfileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConfigProfileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ConfigProfileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ConfigProfileGroupBy) IntX(ctx context.Context) int
- func (s *ConfigProfileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ConfigProfileGroupBy) IntsX(ctx context.Context) []int
- func (_g *ConfigProfileGroupBy) Scan(ctx context.Context, v any) error
- func (s *ConfigProfileGroupBy) ScanX(ctx context.Context, v any)
- func (s *ConfigProfileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ConfigProfileGroupBy) StringX(ctx context.Context) string
- func (s *ConfigProfileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ConfigProfileGroupBy) StringsX(ctx context.Context) []string
- type ConfigProfileMutation
- func (m *ConfigProfileMutation) Active() (r bool, exists bool)
- func (m *ConfigProfileMutation) AddField(name string, value ent.Value) error
- func (m *ConfigProfileMutation) AddVersion(i int)
- func (m *ConfigProfileMutation) AddedEdges() []string
- func (m *ConfigProfileMutation) AddedField(name string) (ent.Value, bool)
- func (m *ConfigProfileMutation) AddedFields() []string
- func (m *ConfigProfileMutation) AddedIDs(name string) []ent.Value
- func (m *ConfigProfileMutation) AddedVersion() (r int, exists bool)
- func (m *ConfigProfileMutation) ClearEdge(name string) error
- func (m *ConfigProfileMutation) ClearField(name string) error
- func (m *ConfigProfileMutation) ClearedEdges() []string
- func (m *ConfigProfileMutation) ClearedFields() []string
- func (m ConfigProfileMutation) Client() *Client
- func (m *ConfigProfileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ConfigProfileMutation) EdgeCleared(name string) bool
- func (m *ConfigProfileMutation) EncryptedData() (r []byte, exists bool)
- func (m *ConfigProfileMutation) Field(name string) (ent.Value, bool)
- func (m *ConfigProfileMutation) FieldCleared(name string) bool
- func (m *ConfigProfileMutation) Fields() []string
- func (m *ConfigProfileMutation) ID() (id uuid.UUID, exists bool)
- func (m *ConfigProfileMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ConfigProfileMutation) Name() (r string, exists bool)
- func (m *ConfigProfileMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *ConfigProfileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ConfigProfileMutation) OldEncryptedData(ctx context.Context) (v []byte, err error)
- func (m *ConfigProfileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ConfigProfileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ConfigProfileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ConfigProfileMutation) OldVersion(ctx context.Context) (v int, err error)
- func (m *ConfigProfileMutation) Op() Op
- func (m *ConfigProfileMutation) RemovedEdges() []string
- func (m *ConfigProfileMutation) RemovedIDs(name string) []ent.Value
- func (m *ConfigProfileMutation) ResetActive()
- func (m *ConfigProfileMutation) ResetCreatedAt()
- func (m *ConfigProfileMutation) ResetEdge(name string) error
- func (m *ConfigProfileMutation) ResetEncryptedData()
- func (m *ConfigProfileMutation) ResetField(name string) error
- func (m *ConfigProfileMutation) ResetName()
- func (m *ConfigProfileMutation) ResetUpdatedAt()
- func (m *ConfigProfileMutation) ResetVersion()
- func (m *ConfigProfileMutation) SetActive(b bool)
- func (m *ConfigProfileMutation) SetCreatedAt(t time.Time)
- func (m *ConfigProfileMutation) SetEncryptedData(b []byte)
- func (m *ConfigProfileMutation) SetField(name string, value ent.Value) error
- func (m *ConfigProfileMutation) SetID(id uuid.UUID)
- func (m *ConfigProfileMutation) SetName(s string)
- func (m *ConfigProfileMutation) SetOp(op Op)
- func (m *ConfigProfileMutation) SetUpdatedAt(t time.Time)
- func (m *ConfigProfileMutation) SetVersion(i int)
- func (m ConfigProfileMutation) Tx() (*Tx, error)
- func (m *ConfigProfileMutation) Type() string
- func (m *ConfigProfileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ConfigProfileMutation) Version() (r int, exists bool)
- func (m *ConfigProfileMutation) Where(ps ...predicate.ConfigProfile)
- func (m *ConfigProfileMutation) WhereP(ps ...func(*sql.Selector))
- type ConfigProfileQuery
- func (_q *ConfigProfileQuery) Aggregate(fns ...AggregateFunc) *ConfigProfileSelect
- func (_q *ConfigProfileQuery) All(ctx context.Context) ([]*ConfigProfile, error)
- func (_q *ConfigProfileQuery) AllX(ctx context.Context) []*ConfigProfile
- func (_q *ConfigProfileQuery) Clone() *ConfigProfileQuery
- func (_q *ConfigProfileQuery) Count(ctx context.Context) (int, error)
- func (_q *ConfigProfileQuery) CountX(ctx context.Context) int
- func (_q *ConfigProfileQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ConfigProfileQuery) ExistX(ctx context.Context) bool
- func (_q *ConfigProfileQuery) First(ctx context.Context) (*ConfigProfile, error)
- func (_q *ConfigProfileQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ConfigProfileQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *ConfigProfileQuery) FirstX(ctx context.Context) *ConfigProfile
- func (_q *ConfigProfileQuery) GroupBy(field string, fields ...string) *ConfigProfileGroupBy
- func (_q *ConfigProfileQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *ConfigProfileQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *ConfigProfileQuery) Limit(limit int) *ConfigProfileQuery
- func (_q *ConfigProfileQuery) Offset(offset int) *ConfigProfileQuery
- func (_q *ConfigProfileQuery) Only(ctx context.Context) (*ConfigProfile, error)
- func (_q *ConfigProfileQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ConfigProfileQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *ConfigProfileQuery) OnlyX(ctx context.Context) *ConfigProfile
- func (_q *ConfigProfileQuery) Order(o ...configprofile.OrderOption) *ConfigProfileQuery
- func (_q *ConfigProfileQuery) Select(fields ...string) *ConfigProfileSelect
- func (_q *ConfigProfileQuery) Unique(unique bool) *ConfigProfileQuery
- func (_q *ConfigProfileQuery) Where(ps ...predicate.ConfigProfile) *ConfigProfileQuery
- type ConfigProfileSelect
- func (_s *ConfigProfileSelect) Aggregate(fns ...AggregateFunc) *ConfigProfileSelect
- func (s *ConfigProfileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConfigProfileSelect) BoolX(ctx context.Context) bool
- func (s *ConfigProfileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ConfigProfileSelect) BoolsX(ctx context.Context) []bool
- func (s *ConfigProfileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConfigProfileSelect) Float64X(ctx context.Context) float64
- func (s *ConfigProfileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConfigProfileSelect) Float64sX(ctx context.Context) []float64
- func (s *ConfigProfileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ConfigProfileSelect) IntX(ctx context.Context) int
- func (s *ConfigProfileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ConfigProfileSelect) IntsX(ctx context.Context) []int
- func (_s *ConfigProfileSelect) Scan(ctx context.Context, v any) error
- func (s *ConfigProfileSelect) ScanX(ctx context.Context, v any)
- func (s *ConfigProfileSelect) String(ctx context.Context) (_ string, err error)
- func (s *ConfigProfileSelect) StringX(ctx context.Context) string
- func (s *ConfigProfileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ConfigProfileSelect) StringsX(ctx context.Context) []string
- type ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) AddVersion(v int) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) Exec(ctx context.Context) error
- func (_u *ConfigProfileUpdate) ExecX(ctx context.Context)
- func (_u *ConfigProfileUpdate) Mutation() *ConfigProfileMutation
- func (_u *ConfigProfileUpdate) Save(ctx context.Context) (int, error)
- func (_u *ConfigProfileUpdate) SaveX(ctx context.Context) int
- func (_u *ConfigProfileUpdate) SetActive(v bool) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) SetEncryptedData(v []byte) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) SetName(v string) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) SetNillableActive(v *bool) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) SetNillableName(v *string) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) SetNillableVersion(v *int) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) SetUpdatedAt(v time.Time) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) SetVersion(v int) *ConfigProfileUpdate
- func (_u *ConfigProfileUpdate) Where(ps ...predicate.ConfigProfile) *ConfigProfileUpdate
- type ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) AddVersion(v int) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) Exec(ctx context.Context) error
- func (_u *ConfigProfileUpdateOne) ExecX(ctx context.Context)
- func (_u *ConfigProfileUpdateOne) Mutation() *ConfigProfileMutation
- func (_u *ConfigProfileUpdateOne) Save(ctx context.Context) (*ConfigProfile, error)
- func (_u *ConfigProfileUpdateOne) SaveX(ctx context.Context) *ConfigProfile
- func (_u *ConfigProfileUpdateOne) Select(field string, fields ...string) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetActive(v bool) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetEncryptedData(v []byte) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetName(v string) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetNillableActive(v *bool) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetNillableName(v *string) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetNillableVersion(v *int) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetUpdatedAt(v time.Time) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) SetVersion(v int) *ConfigProfileUpdateOne
- func (_u *ConfigProfileUpdateOne) Where(ps ...predicate.ConfigProfile) *ConfigProfileUpdateOne
- type ConfigProfiles
- type ConstraintError
- type CronJob
- type CronJobClient
- func (c *CronJobClient) Create() *CronJobCreate
- func (c *CronJobClient) CreateBulk(builders ...*CronJobCreate) *CronJobCreateBulk
- func (c *CronJobClient) Delete() *CronJobDelete
- func (c *CronJobClient) DeleteOne(_m *CronJob) *CronJobDeleteOne
- func (c *CronJobClient) DeleteOneID(id uuid.UUID) *CronJobDeleteOne
- func (c *CronJobClient) Get(ctx context.Context, id uuid.UUID) (*CronJob, error)
- func (c *CronJobClient) GetX(ctx context.Context, id uuid.UUID) *CronJob
- func (c *CronJobClient) Hooks() []Hook
- func (c *CronJobClient) Intercept(interceptors ...Interceptor)
- func (c *CronJobClient) Interceptors() []Interceptor
- func (c *CronJobClient) MapCreateBulk(slice any, setFunc func(*CronJobCreate, int)) *CronJobCreateBulk
- func (c *CronJobClient) Query() *CronJobQuery
- func (c *CronJobClient) Update() *CronJobUpdate
- func (c *CronJobClient) UpdateOne(_m *CronJob) *CronJobUpdateOne
- func (c *CronJobClient) UpdateOneID(id uuid.UUID) *CronJobUpdateOne
- func (c *CronJobClient) Use(hooks ...Hook)
- type CronJobCreate
- func (_c *CronJobCreate) Exec(ctx context.Context) error
- func (_c *CronJobCreate) ExecX(ctx context.Context)
- func (_c *CronJobCreate) Mutation() *CronJobMutation
- func (_c *CronJobCreate) Save(ctx context.Context) (*CronJob, error)
- func (_c *CronJobCreate) SaveX(ctx context.Context) *CronJob
- func (_c *CronJobCreate) SetCreatedAt(v time.Time) *CronJobCreate
- func (_c *CronJobCreate) SetDeliverTo(v []string) *CronJobCreate
- func (_c *CronJobCreate) SetEnabled(v bool) *CronJobCreate
- func (_c *CronJobCreate) SetID(v uuid.UUID) *CronJobCreate
- func (_c *CronJobCreate) SetLastRunAt(v time.Time) *CronJobCreate
- func (_c *CronJobCreate) SetName(v string) *CronJobCreate
- func (_c *CronJobCreate) SetNextRunAt(v time.Time) *CronJobCreate
- func (_c *CronJobCreate) SetNillableCreatedAt(v *time.Time) *CronJobCreate
- func (_c *CronJobCreate) SetNillableEnabled(v *bool) *CronJobCreate
- func (_c *CronJobCreate) SetNillableID(v *uuid.UUID) *CronJobCreate
- func (_c *CronJobCreate) SetNillableLastRunAt(v *time.Time) *CronJobCreate
- func (_c *CronJobCreate) SetNillableNextRunAt(v *time.Time) *CronJobCreate
- func (_c *CronJobCreate) SetNillableSessionMode(v *string) *CronJobCreate
- func (_c *CronJobCreate) SetNillableTimeoutMs(v *int64) *CronJobCreate
- func (_c *CronJobCreate) SetNillableTimezone(v *string) *CronJobCreate
- func (_c *CronJobCreate) SetNillableUpdatedAt(v *time.Time) *CronJobCreate
- func (_c *CronJobCreate) SetPrompt(v string) *CronJobCreate
- func (_c *CronJobCreate) SetSchedule(v string) *CronJobCreate
- func (_c *CronJobCreate) SetScheduleType(v cronjob.ScheduleType) *CronJobCreate
- func (_c *CronJobCreate) SetSessionMode(v string) *CronJobCreate
- func (_c *CronJobCreate) SetTimeoutMs(v int64) *CronJobCreate
- func (_c *CronJobCreate) SetTimezone(v string) *CronJobCreate
- func (_c *CronJobCreate) SetUpdatedAt(v time.Time) *CronJobCreate
- type CronJobCreateBulk
- type CronJobDelete
- type CronJobDeleteOne
- type CronJobGroupBy
- func (_g *CronJobGroupBy) Aggregate(fns ...AggregateFunc) *CronJobGroupBy
- func (s *CronJobGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CronJobGroupBy) BoolX(ctx context.Context) bool
- func (s *CronJobGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CronJobGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CronJobGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CronJobGroupBy) Float64X(ctx context.Context) float64
- func (s *CronJobGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CronJobGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CronJobGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CronJobGroupBy) IntX(ctx context.Context) int
- func (s *CronJobGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CronJobGroupBy) IntsX(ctx context.Context) []int
- func (_g *CronJobGroupBy) Scan(ctx context.Context, v any) error
- func (s *CronJobGroupBy) ScanX(ctx context.Context, v any)
- func (s *CronJobGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CronJobGroupBy) StringX(ctx context.Context) string
- func (s *CronJobGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CronJobGroupBy) StringsX(ctx context.Context) []string
- type CronJobHistories
- type CronJobHistory
- type CronJobHistoryClient
- func (c *CronJobHistoryClient) Create() *CronJobHistoryCreate
- func (c *CronJobHistoryClient) CreateBulk(builders ...*CronJobHistoryCreate) *CronJobHistoryCreateBulk
- func (c *CronJobHistoryClient) Delete() *CronJobHistoryDelete
- func (c *CronJobHistoryClient) DeleteOne(_m *CronJobHistory) *CronJobHistoryDeleteOne
- func (c *CronJobHistoryClient) DeleteOneID(id uuid.UUID) *CronJobHistoryDeleteOne
- func (c *CronJobHistoryClient) Get(ctx context.Context, id uuid.UUID) (*CronJobHistory, error)
- func (c *CronJobHistoryClient) GetX(ctx context.Context, id uuid.UUID) *CronJobHistory
- func (c *CronJobHistoryClient) Hooks() []Hook
- func (c *CronJobHistoryClient) Intercept(interceptors ...Interceptor)
- func (c *CronJobHistoryClient) Interceptors() []Interceptor
- func (c *CronJobHistoryClient) MapCreateBulk(slice any, setFunc func(*CronJobHistoryCreate, int)) *CronJobHistoryCreateBulk
- func (c *CronJobHistoryClient) Query() *CronJobHistoryQuery
- func (c *CronJobHistoryClient) Update() *CronJobHistoryUpdate
- func (c *CronJobHistoryClient) UpdateOne(_m *CronJobHistory) *CronJobHistoryUpdateOne
- func (c *CronJobHistoryClient) UpdateOneID(id uuid.UUID) *CronJobHistoryUpdateOne
- func (c *CronJobHistoryClient) Use(hooks ...Hook)
- type CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) Exec(ctx context.Context) error
- func (_c *CronJobHistoryCreate) ExecX(ctx context.Context)
- func (_c *CronJobHistoryCreate) Mutation() *CronJobHistoryMutation
- func (_c *CronJobHistoryCreate) Save(ctx context.Context) (*CronJobHistory, error)
- func (_c *CronJobHistoryCreate) SaveX(ctx context.Context) *CronJobHistory
- func (_c *CronJobHistoryCreate) SetCompletedAt(v time.Time) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetErrorMessage(v string) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetID(v uuid.UUID) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetJobID(v uuid.UUID) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetJobName(v string) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetNillableCompletedAt(v *time.Time) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetNillableErrorMessage(v *string) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetNillableID(v *uuid.UUID) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetNillableResult(v *string) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetNillableStartedAt(v *time.Time) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetNillableStatus(v *cronjobhistory.Status) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetNillableTokensUsed(v *int) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetPrompt(v string) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetResult(v string) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetStartedAt(v time.Time) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetStatus(v cronjobhistory.Status) *CronJobHistoryCreate
- func (_c *CronJobHistoryCreate) SetTokensUsed(v int) *CronJobHistoryCreate
- type CronJobHistoryCreateBulk
- func (_c *CronJobHistoryCreateBulk) Exec(ctx context.Context) error
- func (_c *CronJobHistoryCreateBulk) ExecX(ctx context.Context)
- func (_c *CronJobHistoryCreateBulk) Save(ctx context.Context) ([]*CronJobHistory, error)
- func (_c *CronJobHistoryCreateBulk) SaveX(ctx context.Context) []*CronJobHistory
- type CronJobHistoryDelete
- type CronJobHistoryDeleteOne
- type CronJobHistoryGroupBy
- func (_g *CronJobHistoryGroupBy) Aggregate(fns ...AggregateFunc) *CronJobHistoryGroupBy
- func (s *CronJobHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CronJobHistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *CronJobHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CronJobHistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CronJobHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CronJobHistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *CronJobHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CronJobHistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CronJobHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CronJobHistoryGroupBy) IntX(ctx context.Context) int
- func (s *CronJobHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CronJobHistoryGroupBy) IntsX(ctx context.Context) []int
- func (_g *CronJobHistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *CronJobHistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *CronJobHistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CronJobHistoryGroupBy) StringX(ctx context.Context) string
- func (s *CronJobHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CronJobHistoryGroupBy) StringsX(ctx context.Context) []string
- type CronJobHistoryMutation
- func (m *CronJobHistoryMutation) AddField(name string, value ent.Value) error
- func (m *CronJobHistoryMutation) AddTokensUsed(i int)
- func (m *CronJobHistoryMutation) AddedEdges() []string
- func (m *CronJobHistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *CronJobHistoryMutation) AddedFields() []string
- func (m *CronJobHistoryMutation) AddedIDs(name string) []ent.Value
- func (m *CronJobHistoryMutation) AddedTokensUsed() (r int, exists bool)
- func (m *CronJobHistoryMutation) ClearCompletedAt()
- func (m *CronJobHistoryMutation) ClearEdge(name string) error
- func (m *CronJobHistoryMutation) ClearErrorMessage()
- func (m *CronJobHistoryMutation) ClearField(name string) error
- func (m *CronJobHistoryMutation) ClearResult()
- func (m *CronJobHistoryMutation) ClearedEdges() []string
- func (m *CronJobHistoryMutation) ClearedFields() []string
- func (m CronJobHistoryMutation) Client() *Client
- func (m *CronJobHistoryMutation) CompletedAt() (r time.Time, exists bool)
- func (m *CronJobHistoryMutation) CompletedAtCleared() bool
- func (m *CronJobHistoryMutation) EdgeCleared(name string) bool
- func (m *CronJobHistoryMutation) ErrorMessage() (r string, exists bool)
- func (m *CronJobHistoryMutation) ErrorMessageCleared() bool
- func (m *CronJobHistoryMutation) Field(name string) (ent.Value, bool)
- func (m *CronJobHistoryMutation) FieldCleared(name string) bool
- func (m *CronJobHistoryMutation) Fields() []string
- func (m *CronJobHistoryMutation) ID() (id uuid.UUID, exists bool)
- func (m *CronJobHistoryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CronJobHistoryMutation) JobID() (r uuid.UUID, exists bool)
- func (m *CronJobHistoryMutation) JobName() (r string, exists bool)
- func (m *CronJobHistoryMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *CronJobHistoryMutation) OldErrorMessage(ctx context.Context) (v string, err error)
- func (m *CronJobHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CronJobHistoryMutation) OldJobID(ctx context.Context) (v uuid.UUID, err error)
- func (m *CronJobHistoryMutation) OldJobName(ctx context.Context) (v string, err error)
- func (m *CronJobHistoryMutation) OldPrompt(ctx context.Context) (v string, err error)
- func (m *CronJobHistoryMutation) OldResult(ctx context.Context) (v string, err error)
- func (m *CronJobHistoryMutation) OldStartedAt(ctx context.Context) (v time.Time, err error)
- func (m *CronJobHistoryMutation) OldStatus(ctx context.Context) (v cronjobhistory.Status, err error)
- func (m *CronJobHistoryMutation) OldTokensUsed(ctx context.Context) (v int, err error)
- func (m *CronJobHistoryMutation) Op() Op
- func (m *CronJobHistoryMutation) Prompt() (r string, exists bool)
- func (m *CronJobHistoryMutation) RemovedEdges() []string
- func (m *CronJobHistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *CronJobHistoryMutation) ResetCompletedAt()
- func (m *CronJobHistoryMutation) ResetEdge(name string) error
- func (m *CronJobHistoryMutation) ResetErrorMessage()
- func (m *CronJobHistoryMutation) ResetField(name string) error
- func (m *CronJobHistoryMutation) ResetJobID()
- func (m *CronJobHistoryMutation) ResetJobName()
- func (m *CronJobHistoryMutation) ResetPrompt()
- func (m *CronJobHistoryMutation) ResetResult()
- func (m *CronJobHistoryMutation) ResetStartedAt()
- func (m *CronJobHistoryMutation) ResetStatus()
- func (m *CronJobHistoryMutation) ResetTokensUsed()
- func (m *CronJobHistoryMutation) Result() (r string, exists bool)
- func (m *CronJobHistoryMutation) ResultCleared() bool
- func (m *CronJobHistoryMutation) SetCompletedAt(t time.Time)
- func (m *CronJobHistoryMutation) SetErrorMessage(s string)
- func (m *CronJobHistoryMutation) SetField(name string, value ent.Value) error
- func (m *CronJobHistoryMutation) SetID(id uuid.UUID)
- func (m *CronJobHistoryMutation) SetJobID(u uuid.UUID)
- func (m *CronJobHistoryMutation) SetJobName(s string)
- func (m *CronJobHistoryMutation) SetOp(op Op)
- func (m *CronJobHistoryMutation) SetPrompt(s string)
- func (m *CronJobHistoryMutation) SetResult(s string)
- func (m *CronJobHistoryMutation) SetStartedAt(t time.Time)
- func (m *CronJobHistoryMutation) SetStatus(c cronjobhistory.Status)
- func (m *CronJobHistoryMutation) SetTokensUsed(i int)
- func (m *CronJobHistoryMutation) StartedAt() (r time.Time, exists bool)
- func (m *CronJobHistoryMutation) Status() (r cronjobhistory.Status, exists bool)
- func (m *CronJobHistoryMutation) TokensUsed() (r int, exists bool)
- func (m CronJobHistoryMutation) Tx() (*Tx, error)
- func (m *CronJobHistoryMutation) Type() string
- func (m *CronJobHistoryMutation) Where(ps ...predicate.CronJobHistory)
- func (m *CronJobHistoryMutation) WhereP(ps ...func(*sql.Selector))
- type CronJobHistoryQuery
- func (_q *CronJobHistoryQuery) Aggregate(fns ...AggregateFunc) *CronJobHistorySelect
- func (_q *CronJobHistoryQuery) All(ctx context.Context) ([]*CronJobHistory, error)
- func (_q *CronJobHistoryQuery) AllX(ctx context.Context) []*CronJobHistory
- func (_q *CronJobHistoryQuery) Clone() *CronJobHistoryQuery
- func (_q *CronJobHistoryQuery) Count(ctx context.Context) (int, error)
- func (_q *CronJobHistoryQuery) CountX(ctx context.Context) int
- func (_q *CronJobHistoryQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CronJobHistoryQuery) ExistX(ctx context.Context) bool
- func (_q *CronJobHistoryQuery) First(ctx context.Context) (*CronJobHistory, error)
- func (_q *CronJobHistoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CronJobHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CronJobHistoryQuery) FirstX(ctx context.Context) *CronJobHistory
- func (_q *CronJobHistoryQuery) GroupBy(field string, fields ...string) *CronJobHistoryGroupBy
- func (_q *CronJobHistoryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CronJobHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CronJobHistoryQuery) Limit(limit int) *CronJobHistoryQuery
- func (_q *CronJobHistoryQuery) Offset(offset int) *CronJobHistoryQuery
- func (_q *CronJobHistoryQuery) Only(ctx context.Context) (*CronJobHistory, error)
- func (_q *CronJobHistoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CronJobHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CronJobHistoryQuery) OnlyX(ctx context.Context) *CronJobHistory
- func (_q *CronJobHistoryQuery) Order(o ...cronjobhistory.OrderOption) *CronJobHistoryQuery
- func (_q *CronJobHistoryQuery) Select(fields ...string) *CronJobHistorySelect
- func (_q *CronJobHistoryQuery) Unique(unique bool) *CronJobHistoryQuery
- func (_q *CronJobHistoryQuery) Where(ps ...predicate.CronJobHistory) *CronJobHistoryQuery
- type CronJobHistorySelect
- func (_s *CronJobHistorySelect) Aggregate(fns ...AggregateFunc) *CronJobHistorySelect
- func (s *CronJobHistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CronJobHistorySelect) BoolX(ctx context.Context) bool
- func (s *CronJobHistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CronJobHistorySelect) BoolsX(ctx context.Context) []bool
- func (s *CronJobHistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CronJobHistorySelect) Float64X(ctx context.Context) float64
- func (s *CronJobHistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CronJobHistorySelect) Float64sX(ctx context.Context) []float64
- func (s *CronJobHistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CronJobHistorySelect) IntX(ctx context.Context) int
- func (s *CronJobHistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CronJobHistorySelect) IntsX(ctx context.Context) []int
- func (_s *CronJobHistorySelect) Scan(ctx context.Context, v any) error
- func (s *CronJobHistorySelect) ScanX(ctx context.Context, v any)
- func (s *CronJobHistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *CronJobHistorySelect) StringX(ctx context.Context) string
- func (s *CronJobHistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CronJobHistorySelect) StringsX(ctx context.Context) []string
- type CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) AddTokensUsed(v int) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) ClearCompletedAt() *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) ClearErrorMessage() *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) ClearResult() *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) Exec(ctx context.Context) error
- func (_u *CronJobHistoryUpdate) ExecX(ctx context.Context)
- func (_u *CronJobHistoryUpdate) Mutation() *CronJobHistoryMutation
- func (_u *CronJobHistoryUpdate) Save(ctx context.Context) (int, error)
- func (_u *CronJobHistoryUpdate) SaveX(ctx context.Context) int
- func (_u *CronJobHistoryUpdate) SetCompletedAt(v time.Time) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetErrorMessage(v string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetJobID(v uuid.UUID) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetJobName(v string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillableCompletedAt(v *time.Time) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillableErrorMessage(v *string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillableJobID(v *uuid.UUID) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillableJobName(v *string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillablePrompt(v *string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillableResult(v *string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillableStatus(v *cronjobhistory.Status) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetNillableTokensUsed(v *int) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetPrompt(v string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetResult(v string) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetStatus(v cronjobhistory.Status) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) SetTokensUsed(v int) *CronJobHistoryUpdate
- func (_u *CronJobHistoryUpdate) Where(ps ...predicate.CronJobHistory) *CronJobHistoryUpdate
- type CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) AddTokensUsed(v int) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) ClearCompletedAt() *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) ClearErrorMessage() *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) ClearResult() *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) Exec(ctx context.Context) error
- func (_u *CronJobHistoryUpdateOne) ExecX(ctx context.Context)
- func (_u *CronJobHistoryUpdateOne) Mutation() *CronJobHistoryMutation
- func (_u *CronJobHistoryUpdateOne) Save(ctx context.Context) (*CronJobHistory, error)
- func (_u *CronJobHistoryUpdateOne) SaveX(ctx context.Context) *CronJobHistory
- func (_u *CronJobHistoryUpdateOne) Select(field string, fields ...string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetCompletedAt(v time.Time) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetErrorMessage(v string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetJobID(v uuid.UUID) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetJobName(v string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillableCompletedAt(v *time.Time) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillableErrorMessage(v *string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillableJobID(v *uuid.UUID) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillableJobName(v *string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillablePrompt(v *string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillableResult(v *string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillableStatus(v *cronjobhistory.Status) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetNillableTokensUsed(v *int) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetPrompt(v string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetResult(v string) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetStatus(v cronjobhistory.Status) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) SetTokensUsed(v int) *CronJobHistoryUpdateOne
- func (_u *CronJobHistoryUpdateOne) Where(ps ...predicate.CronJobHistory) *CronJobHistoryUpdateOne
- type CronJobMutation
- func (m *CronJobMutation) AddField(name string, value ent.Value) error
- func (m *CronJobMutation) AddTimeoutMs(i int64)
- func (m *CronJobMutation) AddedEdges() []string
- func (m *CronJobMutation) AddedField(name string) (ent.Value, bool)
- func (m *CronJobMutation) AddedFields() []string
- func (m *CronJobMutation) AddedIDs(name string) []ent.Value
- func (m *CronJobMutation) AddedTimeoutMs() (r int64, exists bool)
- func (m *CronJobMutation) AppendDeliverTo(s []string)
- func (m *CronJobMutation) AppendedDeliverTo() ([]string, bool)
- func (m *CronJobMutation) ClearDeliverTo()
- func (m *CronJobMutation) ClearEdge(name string) error
- func (m *CronJobMutation) ClearField(name string) error
- func (m *CronJobMutation) ClearLastRunAt()
- func (m *CronJobMutation) ClearNextRunAt()
- func (m *CronJobMutation) ClearTimeoutMs()
- func (m *CronJobMutation) ClearedEdges() []string
- func (m *CronJobMutation) ClearedFields() []string
- func (m CronJobMutation) Client() *Client
- func (m *CronJobMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CronJobMutation) DeliverTo() (r []string, exists bool)
- func (m *CronJobMutation) DeliverToCleared() bool
- func (m *CronJobMutation) EdgeCleared(name string) bool
- func (m *CronJobMutation) Enabled() (r bool, exists bool)
- func (m *CronJobMutation) Field(name string) (ent.Value, bool)
- func (m *CronJobMutation) FieldCleared(name string) bool
- func (m *CronJobMutation) Fields() []string
- func (m *CronJobMutation) ID() (id uuid.UUID, exists bool)
- func (m *CronJobMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CronJobMutation) LastRunAt() (r time.Time, exists bool)
- func (m *CronJobMutation) LastRunAtCleared() bool
- func (m *CronJobMutation) Name() (r string, exists bool)
- func (m *CronJobMutation) NextRunAt() (r time.Time, exists bool)
- func (m *CronJobMutation) NextRunAtCleared() bool
- func (m *CronJobMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CronJobMutation) OldDeliverTo(ctx context.Context) (v []string, err error)
- func (m *CronJobMutation) OldEnabled(ctx context.Context) (v bool, err error)
- func (m *CronJobMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CronJobMutation) OldLastRunAt(ctx context.Context) (v *time.Time, err error)
- func (m *CronJobMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CronJobMutation) OldNextRunAt(ctx context.Context) (v *time.Time, err error)
- func (m *CronJobMutation) OldPrompt(ctx context.Context) (v string, err error)
- func (m *CronJobMutation) OldSchedule(ctx context.Context) (v string, err error)
- func (m *CronJobMutation) OldScheduleType(ctx context.Context) (v cronjob.ScheduleType, err error)
- func (m *CronJobMutation) OldSessionMode(ctx context.Context) (v string, err error)
- func (m *CronJobMutation) OldTimeoutMs(ctx context.Context) (v *int64, err error)
- func (m *CronJobMutation) OldTimezone(ctx context.Context) (v string, err error)
- func (m *CronJobMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CronJobMutation) Op() Op
- func (m *CronJobMutation) Prompt() (r string, exists bool)
- func (m *CronJobMutation) RemovedEdges() []string
- func (m *CronJobMutation) RemovedIDs(name string) []ent.Value
- func (m *CronJobMutation) ResetCreatedAt()
- func (m *CronJobMutation) ResetDeliverTo()
- func (m *CronJobMutation) ResetEdge(name string) error
- func (m *CronJobMutation) ResetEnabled()
- func (m *CronJobMutation) ResetField(name string) error
- func (m *CronJobMutation) ResetLastRunAt()
- func (m *CronJobMutation) ResetName()
- func (m *CronJobMutation) ResetNextRunAt()
- func (m *CronJobMutation) ResetPrompt()
- func (m *CronJobMutation) ResetSchedule()
- func (m *CronJobMutation) ResetScheduleType()
- func (m *CronJobMutation) ResetSessionMode()
- func (m *CronJobMutation) ResetTimeoutMs()
- func (m *CronJobMutation) ResetTimezone()
- func (m *CronJobMutation) ResetUpdatedAt()
- func (m *CronJobMutation) Schedule() (r string, exists bool)
- func (m *CronJobMutation) ScheduleType() (r cronjob.ScheduleType, exists bool)
- func (m *CronJobMutation) SessionMode() (r string, exists bool)
- func (m *CronJobMutation) SetCreatedAt(t time.Time)
- func (m *CronJobMutation) SetDeliverTo(s []string)
- func (m *CronJobMutation) SetEnabled(b bool)
- func (m *CronJobMutation) SetField(name string, value ent.Value) error
- func (m *CronJobMutation) SetID(id uuid.UUID)
- func (m *CronJobMutation) SetLastRunAt(t time.Time)
- func (m *CronJobMutation) SetName(s string)
- func (m *CronJobMutation) SetNextRunAt(t time.Time)
- func (m *CronJobMutation) SetOp(op Op)
- func (m *CronJobMutation) SetPrompt(s string)
- func (m *CronJobMutation) SetSchedule(s string)
- func (m *CronJobMutation) SetScheduleType(ct cronjob.ScheduleType)
- func (m *CronJobMutation) SetSessionMode(s string)
- func (m *CronJobMutation) SetTimeoutMs(i int64)
- func (m *CronJobMutation) SetTimezone(s string)
- func (m *CronJobMutation) SetUpdatedAt(t time.Time)
- func (m *CronJobMutation) TimeoutMs() (r int64, exists bool)
- func (m *CronJobMutation) TimeoutMsCleared() bool
- func (m *CronJobMutation) Timezone() (r string, exists bool)
- func (m CronJobMutation) Tx() (*Tx, error)
- func (m *CronJobMutation) Type() string
- func (m *CronJobMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CronJobMutation) Where(ps ...predicate.CronJob)
- func (m *CronJobMutation) WhereP(ps ...func(*sql.Selector))
- type CronJobQuery
- func (_q *CronJobQuery) Aggregate(fns ...AggregateFunc) *CronJobSelect
- func (_q *CronJobQuery) All(ctx context.Context) ([]*CronJob, error)
- func (_q *CronJobQuery) AllX(ctx context.Context) []*CronJob
- func (_q *CronJobQuery) Clone() *CronJobQuery
- func (_q *CronJobQuery) Count(ctx context.Context) (int, error)
- func (_q *CronJobQuery) CountX(ctx context.Context) int
- func (_q *CronJobQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CronJobQuery) ExistX(ctx context.Context) bool
- func (_q *CronJobQuery) First(ctx context.Context) (*CronJob, error)
- func (_q *CronJobQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CronJobQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CronJobQuery) FirstX(ctx context.Context) *CronJob
- func (_q *CronJobQuery) GroupBy(field string, fields ...string) *CronJobGroupBy
- func (_q *CronJobQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CronJobQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CronJobQuery) Limit(limit int) *CronJobQuery
- func (_q *CronJobQuery) Offset(offset int) *CronJobQuery
- func (_q *CronJobQuery) Only(ctx context.Context) (*CronJob, error)
- func (_q *CronJobQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CronJobQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CronJobQuery) OnlyX(ctx context.Context) *CronJob
- func (_q *CronJobQuery) Order(o ...cronjob.OrderOption) *CronJobQuery
- func (_q *CronJobQuery) Select(fields ...string) *CronJobSelect
- func (_q *CronJobQuery) Unique(unique bool) *CronJobQuery
- func (_q *CronJobQuery) Where(ps ...predicate.CronJob) *CronJobQuery
- type CronJobSelect
- func (_s *CronJobSelect) Aggregate(fns ...AggregateFunc) *CronJobSelect
- func (s *CronJobSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CronJobSelect) BoolX(ctx context.Context) bool
- func (s *CronJobSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CronJobSelect) BoolsX(ctx context.Context) []bool
- func (s *CronJobSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CronJobSelect) Float64X(ctx context.Context) float64
- func (s *CronJobSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CronJobSelect) Float64sX(ctx context.Context) []float64
- func (s *CronJobSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CronJobSelect) IntX(ctx context.Context) int
- func (s *CronJobSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CronJobSelect) IntsX(ctx context.Context) []int
- func (_s *CronJobSelect) Scan(ctx context.Context, v any) error
- func (s *CronJobSelect) ScanX(ctx context.Context, v any)
- func (s *CronJobSelect) String(ctx context.Context) (_ string, err error)
- func (s *CronJobSelect) StringX(ctx context.Context) string
- func (s *CronJobSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CronJobSelect) StringsX(ctx context.Context) []string
- type CronJobUpdate
- func (_u *CronJobUpdate) AddTimeoutMs(v int64) *CronJobUpdate
- func (_u *CronJobUpdate) AppendDeliverTo(v []string) *CronJobUpdate
- func (_u *CronJobUpdate) ClearDeliverTo() *CronJobUpdate
- func (_u *CronJobUpdate) ClearLastRunAt() *CronJobUpdate
- func (_u *CronJobUpdate) ClearNextRunAt() *CronJobUpdate
- func (_u *CronJobUpdate) ClearTimeoutMs() *CronJobUpdate
- func (_u *CronJobUpdate) Exec(ctx context.Context) error
- func (_u *CronJobUpdate) ExecX(ctx context.Context)
- func (_u *CronJobUpdate) Mutation() *CronJobMutation
- func (_u *CronJobUpdate) Save(ctx context.Context) (int, error)
- func (_u *CronJobUpdate) SaveX(ctx context.Context) int
- func (_u *CronJobUpdate) SetDeliverTo(v []string) *CronJobUpdate
- func (_u *CronJobUpdate) SetEnabled(v bool) *CronJobUpdate
- func (_u *CronJobUpdate) SetLastRunAt(v time.Time) *CronJobUpdate
- func (_u *CronJobUpdate) SetName(v string) *CronJobUpdate
- func (_u *CronJobUpdate) SetNextRunAt(v time.Time) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableEnabled(v *bool) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableLastRunAt(v *time.Time) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableName(v *string) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableNextRunAt(v *time.Time) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillablePrompt(v *string) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableSchedule(v *string) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableScheduleType(v *cronjob.ScheduleType) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableSessionMode(v *string) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableTimeoutMs(v *int64) *CronJobUpdate
- func (_u *CronJobUpdate) SetNillableTimezone(v *string) *CronJobUpdate
- func (_u *CronJobUpdate) SetPrompt(v string) *CronJobUpdate
- func (_u *CronJobUpdate) SetSchedule(v string) *CronJobUpdate
- func (_u *CronJobUpdate) SetScheduleType(v cronjob.ScheduleType) *CronJobUpdate
- func (_u *CronJobUpdate) SetSessionMode(v string) *CronJobUpdate
- func (_u *CronJobUpdate) SetTimeoutMs(v int64) *CronJobUpdate
- func (_u *CronJobUpdate) SetTimezone(v string) *CronJobUpdate
- func (_u *CronJobUpdate) SetUpdatedAt(v time.Time) *CronJobUpdate
- func (_u *CronJobUpdate) Where(ps ...predicate.CronJob) *CronJobUpdate
- type CronJobUpdateOne
- func (_u *CronJobUpdateOne) AddTimeoutMs(v int64) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) AppendDeliverTo(v []string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) ClearDeliverTo() *CronJobUpdateOne
- func (_u *CronJobUpdateOne) ClearLastRunAt() *CronJobUpdateOne
- func (_u *CronJobUpdateOne) ClearNextRunAt() *CronJobUpdateOne
- func (_u *CronJobUpdateOne) ClearTimeoutMs() *CronJobUpdateOne
- func (_u *CronJobUpdateOne) Exec(ctx context.Context) error
- func (_u *CronJobUpdateOne) ExecX(ctx context.Context)
- func (_u *CronJobUpdateOne) Mutation() *CronJobMutation
- func (_u *CronJobUpdateOne) Save(ctx context.Context) (*CronJob, error)
- func (_u *CronJobUpdateOne) SaveX(ctx context.Context) *CronJob
- func (_u *CronJobUpdateOne) Select(field string, fields ...string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetDeliverTo(v []string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetEnabled(v bool) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetLastRunAt(v time.Time) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetName(v string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNextRunAt(v time.Time) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableEnabled(v *bool) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableLastRunAt(v *time.Time) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableName(v *string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableNextRunAt(v *time.Time) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillablePrompt(v *string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableSchedule(v *string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableScheduleType(v *cronjob.ScheduleType) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableSessionMode(v *string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableTimeoutMs(v *int64) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetNillableTimezone(v *string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetPrompt(v string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetSchedule(v string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetScheduleType(v cronjob.ScheduleType) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetSessionMode(v string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetTimeoutMs(v int64) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetTimezone(v string) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) SetUpdatedAt(v time.Time) *CronJobUpdateOne
- func (_u *CronJobUpdateOne) Where(ps ...predicate.CronJob) *CronJobUpdateOne
- type CronJobs
- type EscrowDeal
- type EscrowDealClient
- func (c *EscrowDealClient) Create() *EscrowDealCreate
- func (c *EscrowDealClient) CreateBulk(builders ...*EscrowDealCreate) *EscrowDealCreateBulk
- func (c *EscrowDealClient) Delete() *EscrowDealDelete
- func (c *EscrowDealClient) DeleteOne(_m *EscrowDeal) *EscrowDealDeleteOne
- func (c *EscrowDealClient) DeleteOneID(id int) *EscrowDealDeleteOne
- func (c *EscrowDealClient) Get(ctx context.Context, id int) (*EscrowDeal, error)
- func (c *EscrowDealClient) GetX(ctx context.Context, id int) *EscrowDeal
- func (c *EscrowDealClient) Hooks() []Hook
- func (c *EscrowDealClient) Intercept(interceptors ...Interceptor)
- func (c *EscrowDealClient) Interceptors() []Interceptor
- func (c *EscrowDealClient) MapCreateBulk(slice any, setFunc func(*EscrowDealCreate, int)) *EscrowDealCreateBulk
- func (c *EscrowDealClient) Query() *EscrowDealQuery
- func (c *EscrowDealClient) Update() *EscrowDealUpdate
- func (c *EscrowDealClient) UpdateOne(_m *EscrowDeal) *EscrowDealUpdateOne
- func (c *EscrowDealClient) UpdateOneID(id int) *EscrowDealUpdateOne
- func (c *EscrowDealClient) Use(hooks ...Hook)
- type EscrowDealCreate
- func (_c *EscrowDealCreate) Exec(ctx context.Context) error
- func (_c *EscrowDealCreate) ExecX(ctx context.Context)
- func (_c *EscrowDealCreate) Mutation() *EscrowDealMutation
- func (_c *EscrowDealCreate) Save(ctx context.Context) (*EscrowDeal, error)
- func (_c *EscrowDealCreate) SaveX(ctx context.Context) *EscrowDeal
- func (_c *EscrowDealCreate) SetBuyerDid(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetChainID(v int64) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetCreatedAt(v time.Time) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetDepositTxHash(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetDisputeNote(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetEscrowID(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetExpiresAt(v time.Time) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetHubAddress(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetMilestones(v []byte) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableChainID(v *int64) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableCreatedAt(v *time.Time) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableDepositTxHash(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableDisputeNote(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableHubAddress(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableOnChainDealID(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableReason(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableRefundTxHash(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableReleaseTxHash(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableStatus(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableTaskID(v *string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetNillableUpdatedAt(v *time.Time) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetOnChainDealID(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetReason(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetRefundTxHash(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetReleaseTxHash(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetSellerDid(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetStatus(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetTaskID(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetTotalAmount(v string) *EscrowDealCreate
- func (_c *EscrowDealCreate) SetUpdatedAt(v time.Time) *EscrowDealCreate
- type EscrowDealCreateBulk
- type EscrowDealDelete
- type EscrowDealDeleteOne
- type EscrowDealGroupBy
- func (_g *EscrowDealGroupBy) Aggregate(fns ...AggregateFunc) *EscrowDealGroupBy
- func (s *EscrowDealGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EscrowDealGroupBy) BoolX(ctx context.Context) bool
- func (s *EscrowDealGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EscrowDealGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EscrowDealGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EscrowDealGroupBy) Float64X(ctx context.Context) float64
- func (s *EscrowDealGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EscrowDealGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EscrowDealGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EscrowDealGroupBy) IntX(ctx context.Context) int
- func (s *EscrowDealGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EscrowDealGroupBy) IntsX(ctx context.Context) []int
- func (_g *EscrowDealGroupBy) Scan(ctx context.Context, v any) error
- func (s *EscrowDealGroupBy) ScanX(ctx context.Context, v any)
- func (s *EscrowDealGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EscrowDealGroupBy) StringX(ctx context.Context) string
- func (s *EscrowDealGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EscrowDealGroupBy) StringsX(ctx context.Context) []string
- type EscrowDealMutation
- func (m *EscrowDealMutation) AddChainID(i int64)
- func (m *EscrowDealMutation) AddField(name string, value ent.Value) error
- func (m *EscrowDealMutation) AddedChainID() (r int64, exists bool)
- func (m *EscrowDealMutation) AddedEdges() []string
- func (m *EscrowDealMutation) AddedField(name string) (ent.Value, bool)
- func (m *EscrowDealMutation) AddedFields() []string
- func (m *EscrowDealMutation) AddedIDs(name string) []ent.Value
- func (m *EscrowDealMutation) BuyerDid() (r string, exists bool)
- func (m *EscrowDealMutation) ChainID() (r int64, exists bool)
- func (m *EscrowDealMutation) ChainIDCleared() bool
- func (m *EscrowDealMutation) ClearChainID()
- func (m *EscrowDealMutation) ClearDepositTxHash()
- func (m *EscrowDealMutation) ClearDisputeNote()
- func (m *EscrowDealMutation) ClearEdge(name string) error
- func (m *EscrowDealMutation) ClearField(name string) error
- func (m *EscrowDealMutation) ClearHubAddress()
- func (m *EscrowDealMutation) ClearMilestones()
- func (m *EscrowDealMutation) ClearOnChainDealID()
- func (m *EscrowDealMutation) ClearReason()
- func (m *EscrowDealMutation) ClearRefundTxHash()
- func (m *EscrowDealMutation) ClearReleaseTxHash()
- func (m *EscrowDealMutation) ClearTaskID()
- func (m *EscrowDealMutation) ClearedEdges() []string
- func (m *EscrowDealMutation) ClearedFields() []string
- func (m EscrowDealMutation) Client() *Client
- func (m *EscrowDealMutation) CreatedAt() (r time.Time, exists bool)
- func (m *EscrowDealMutation) DepositTxHash() (r string, exists bool)
- func (m *EscrowDealMutation) DepositTxHashCleared() bool
- func (m *EscrowDealMutation) DisputeNote() (r string, exists bool)
- func (m *EscrowDealMutation) DisputeNoteCleared() bool
- func (m *EscrowDealMutation) EdgeCleared(name string) bool
- func (m *EscrowDealMutation) EscrowID() (r string, exists bool)
- func (m *EscrowDealMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *EscrowDealMutation) Field(name string) (ent.Value, bool)
- func (m *EscrowDealMutation) FieldCleared(name string) bool
- func (m *EscrowDealMutation) Fields() []string
- func (m *EscrowDealMutation) HubAddress() (r string, exists bool)
- func (m *EscrowDealMutation) HubAddressCleared() bool
- func (m *EscrowDealMutation) ID() (id int, exists bool)
- func (m *EscrowDealMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EscrowDealMutation) Milestones() (r []byte, exists bool)
- func (m *EscrowDealMutation) MilestonesCleared() bool
- func (m *EscrowDealMutation) OldBuyerDid(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldChainID(ctx context.Context) (v int64, err error)
- func (m *EscrowDealMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EscrowDealMutation) OldDepositTxHash(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldDisputeNote(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldEscrowID(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)
- func (m *EscrowDealMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EscrowDealMutation) OldHubAddress(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldMilestones(ctx context.Context) (v []byte, err error)
- func (m *EscrowDealMutation) OldOnChainDealID(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldReason(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldRefundTxHash(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldReleaseTxHash(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldSellerDid(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldTaskID(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldTotalAmount(ctx context.Context) (v string, err error)
- func (m *EscrowDealMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *EscrowDealMutation) OnChainDealID() (r string, exists bool)
- func (m *EscrowDealMutation) OnChainDealIDCleared() bool
- func (m *EscrowDealMutation) Op() Op
- func (m *EscrowDealMutation) Reason() (r string, exists bool)
- func (m *EscrowDealMutation) ReasonCleared() bool
- func (m *EscrowDealMutation) RefundTxHash() (r string, exists bool)
- func (m *EscrowDealMutation) RefundTxHashCleared() bool
- func (m *EscrowDealMutation) ReleaseTxHash() (r string, exists bool)
- func (m *EscrowDealMutation) ReleaseTxHashCleared() bool
- func (m *EscrowDealMutation) RemovedEdges() []string
- func (m *EscrowDealMutation) RemovedIDs(name string) []ent.Value
- func (m *EscrowDealMutation) ResetBuyerDid()
- func (m *EscrowDealMutation) ResetChainID()
- func (m *EscrowDealMutation) ResetCreatedAt()
- func (m *EscrowDealMutation) ResetDepositTxHash()
- func (m *EscrowDealMutation) ResetDisputeNote()
- func (m *EscrowDealMutation) ResetEdge(name string) error
- func (m *EscrowDealMutation) ResetEscrowID()
- func (m *EscrowDealMutation) ResetExpiresAt()
- func (m *EscrowDealMutation) ResetField(name string) error
- func (m *EscrowDealMutation) ResetHubAddress()
- func (m *EscrowDealMutation) ResetMilestones()
- func (m *EscrowDealMutation) ResetOnChainDealID()
- func (m *EscrowDealMutation) ResetReason()
- func (m *EscrowDealMutation) ResetRefundTxHash()
- func (m *EscrowDealMutation) ResetReleaseTxHash()
- func (m *EscrowDealMutation) ResetSellerDid()
- func (m *EscrowDealMutation) ResetStatus()
- func (m *EscrowDealMutation) ResetTaskID()
- func (m *EscrowDealMutation) ResetTotalAmount()
- func (m *EscrowDealMutation) ResetUpdatedAt()
- func (m *EscrowDealMutation) SellerDid() (r string, exists bool)
- func (m *EscrowDealMutation) SetBuyerDid(s string)
- func (m *EscrowDealMutation) SetChainID(i int64)
- func (m *EscrowDealMutation) SetCreatedAt(t time.Time)
- func (m *EscrowDealMutation) SetDepositTxHash(s string)
- func (m *EscrowDealMutation) SetDisputeNote(s string)
- func (m *EscrowDealMutation) SetEscrowID(s string)
- func (m *EscrowDealMutation) SetExpiresAt(t time.Time)
- func (m *EscrowDealMutation) SetField(name string, value ent.Value) error
- func (m *EscrowDealMutation) SetHubAddress(s string)
- func (m *EscrowDealMutation) SetMilestones(b []byte)
- func (m *EscrowDealMutation) SetOnChainDealID(s string)
- func (m *EscrowDealMutation) SetOp(op Op)
- func (m *EscrowDealMutation) SetReason(s string)
- func (m *EscrowDealMutation) SetRefundTxHash(s string)
- func (m *EscrowDealMutation) SetReleaseTxHash(s string)
- func (m *EscrowDealMutation) SetSellerDid(s string)
- func (m *EscrowDealMutation) SetStatus(s string)
- func (m *EscrowDealMutation) SetTaskID(s string)
- func (m *EscrowDealMutation) SetTotalAmount(s string)
- func (m *EscrowDealMutation) SetUpdatedAt(t time.Time)
- func (m *EscrowDealMutation) Status() (r string, exists bool)
- func (m *EscrowDealMutation) TaskID() (r string, exists bool)
- func (m *EscrowDealMutation) TaskIDCleared() bool
- func (m *EscrowDealMutation) TotalAmount() (r string, exists bool)
- func (m EscrowDealMutation) Tx() (*Tx, error)
- func (m *EscrowDealMutation) Type() string
- func (m *EscrowDealMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *EscrowDealMutation) Where(ps ...predicate.EscrowDeal)
- func (m *EscrowDealMutation) WhereP(ps ...func(*sql.Selector))
- type EscrowDealQuery
- func (_q *EscrowDealQuery) Aggregate(fns ...AggregateFunc) *EscrowDealSelect
- func (_q *EscrowDealQuery) All(ctx context.Context) ([]*EscrowDeal, error)
- func (_q *EscrowDealQuery) AllX(ctx context.Context) []*EscrowDeal
- func (_q *EscrowDealQuery) Clone() *EscrowDealQuery
- func (_q *EscrowDealQuery) Count(ctx context.Context) (int, error)
- func (_q *EscrowDealQuery) CountX(ctx context.Context) int
- func (_q *EscrowDealQuery) Exist(ctx context.Context) (bool, error)
- func (_q *EscrowDealQuery) ExistX(ctx context.Context) bool
- func (_q *EscrowDealQuery) First(ctx context.Context) (*EscrowDeal, error)
- func (_q *EscrowDealQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *EscrowDealQuery) FirstIDX(ctx context.Context) int
- func (_q *EscrowDealQuery) FirstX(ctx context.Context) *EscrowDeal
- func (_q *EscrowDealQuery) GroupBy(field string, fields ...string) *EscrowDealGroupBy
- func (_q *EscrowDealQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *EscrowDealQuery) IDsX(ctx context.Context) []int
- func (_q *EscrowDealQuery) Limit(limit int) *EscrowDealQuery
- func (_q *EscrowDealQuery) Offset(offset int) *EscrowDealQuery
- func (_q *EscrowDealQuery) Only(ctx context.Context) (*EscrowDeal, error)
- func (_q *EscrowDealQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *EscrowDealQuery) OnlyIDX(ctx context.Context) int
- func (_q *EscrowDealQuery) OnlyX(ctx context.Context) *EscrowDeal
- func (_q *EscrowDealQuery) Order(o ...escrowdeal.OrderOption) *EscrowDealQuery
- func (_q *EscrowDealQuery) Select(fields ...string) *EscrowDealSelect
- func (_q *EscrowDealQuery) Unique(unique bool) *EscrowDealQuery
- func (_q *EscrowDealQuery) Where(ps ...predicate.EscrowDeal) *EscrowDealQuery
- type EscrowDealSelect
- func (_s *EscrowDealSelect) Aggregate(fns ...AggregateFunc) *EscrowDealSelect
- func (s *EscrowDealSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EscrowDealSelect) BoolX(ctx context.Context) bool
- func (s *EscrowDealSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EscrowDealSelect) BoolsX(ctx context.Context) []bool
- func (s *EscrowDealSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EscrowDealSelect) Float64X(ctx context.Context) float64
- func (s *EscrowDealSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EscrowDealSelect) Float64sX(ctx context.Context) []float64
- func (s *EscrowDealSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EscrowDealSelect) IntX(ctx context.Context) int
- func (s *EscrowDealSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EscrowDealSelect) IntsX(ctx context.Context) []int
- func (_s *EscrowDealSelect) Scan(ctx context.Context, v any) error
- func (s *EscrowDealSelect) ScanX(ctx context.Context, v any)
- func (s *EscrowDealSelect) String(ctx context.Context) (_ string, err error)
- func (s *EscrowDealSelect) StringX(ctx context.Context) string
- func (s *EscrowDealSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EscrowDealSelect) StringsX(ctx context.Context) []string
- type EscrowDealUpdate
- func (_u *EscrowDealUpdate) AddChainID(v int64) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearChainID() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearDepositTxHash() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearDisputeNote() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearHubAddress() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearMilestones() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearOnChainDealID() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearReason() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearRefundTxHash() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearReleaseTxHash() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) ClearTaskID() *EscrowDealUpdate
- func (_u *EscrowDealUpdate) Exec(ctx context.Context) error
- func (_u *EscrowDealUpdate) ExecX(ctx context.Context)
- func (_u *EscrowDealUpdate) Mutation() *EscrowDealMutation
- func (_u *EscrowDealUpdate) Save(ctx context.Context) (int, error)
- func (_u *EscrowDealUpdate) SaveX(ctx context.Context) int
- func (_u *EscrowDealUpdate) SetBuyerDid(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetChainID(v int64) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetDepositTxHash(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetDisputeNote(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetEscrowID(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetExpiresAt(v time.Time) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetHubAddress(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetMilestones(v []byte) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableBuyerDid(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableChainID(v *int64) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableDepositTxHash(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableDisputeNote(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableEscrowID(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableExpiresAt(v *time.Time) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableHubAddress(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableOnChainDealID(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableReason(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableRefundTxHash(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableReleaseTxHash(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableSellerDid(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableStatus(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableTaskID(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetNillableTotalAmount(v *string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetOnChainDealID(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetReason(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetRefundTxHash(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetReleaseTxHash(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetSellerDid(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetStatus(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetTaskID(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetTotalAmount(v string) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) SetUpdatedAt(v time.Time) *EscrowDealUpdate
- func (_u *EscrowDealUpdate) Where(ps ...predicate.EscrowDeal) *EscrowDealUpdate
- type EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) AddChainID(v int64) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearChainID() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearDepositTxHash() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearDisputeNote() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearHubAddress() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearMilestones() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearOnChainDealID() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearReason() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearRefundTxHash() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearReleaseTxHash() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) ClearTaskID() *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) Exec(ctx context.Context) error
- func (_u *EscrowDealUpdateOne) ExecX(ctx context.Context)
- func (_u *EscrowDealUpdateOne) Mutation() *EscrowDealMutation
- func (_u *EscrowDealUpdateOne) Save(ctx context.Context) (*EscrowDeal, error)
- func (_u *EscrowDealUpdateOne) SaveX(ctx context.Context) *EscrowDeal
- func (_u *EscrowDealUpdateOne) Select(field string, fields ...string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetBuyerDid(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetChainID(v int64) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetDepositTxHash(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetDisputeNote(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetEscrowID(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetExpiresAt(v time.Time) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetHubAddress(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetMilestones(v []byte) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableBuyerDid(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableChainID(v *int64) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableDepositTxHash(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableDisputeNote(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableEscrowID(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableExpiresAt(v *time.Time) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableHubAddress(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableOnChainDealID(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableReason(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableRefundTxHash(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableReleaseTxHash(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableSellerDid(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableStatus(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableTaskID(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetNillableTotalAmount(v *string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetOnChainDealID(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetReason(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetRefundTxHash(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetReleaseTxHash(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetSellerDid(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetStatus(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetTaskID(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetTotalAmount(v string) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) SetUpdatedAt(v time.Time) *EscrowDealUpdateOne
- func (_u *EscrowDealUpdateOne) Where(ps ...predicate.EscrowDeal) *EscrowDealUpdateOne
- type EscrowDeals
- type ExternalRef
- type ExternalRefClient
- func (c *ExternalRefClient) Create() *ExternalRefCreate
- func (c *ExternalRefClient) CreateBulk(builders ...*ExternalRefCreate) *ExternalRefCreateBulk
- func (c *ExternalRefClient) Delete() *ExternalRefDelete
- func (c *ExternalRefClient) DeleteOne(_m *ExternalRef) *ExternalRefDeleteOne
- func (c *ExternalRefClient) DeleteOneID(id uuid.UUID) *ExternalRefDeleteOne
- func (c *ExternalRefClient) Get(ctx context.Context, id uuid.UUID) (*ExternalRef, error)
- func (c *ExternalRefClient) GetX(ctx context.Context, id uuid.UUID) *ExternalRef
- func (c *ExternalRefClient) Hooks() []Hook
- func (c *ExternalRefClient) Intercept(interceptors ...Interceptor)
- func (c *ExternalRefClient) Interceptors() []Interceptor
- func (c *ExternalRefClient) MapCreateBulk(slice any, setFunc func(*ExternalRefCreate, int)) *ExternalRefCreateBulk
- func (c *ExternalRefClient) Query() *ExternalRefQuery
- func (c *ExternalRefClient) Update() *ExternalRefUpdate
- func (c *ExternalRefClient) UpdateOne(_m *ExternalRef) *ExternalRefUpdateOne
- func (c *ExternalRefClient) UpdateOneID(id uuid.UUID) *ExternalRefUpdateOne
- func (c *ExternalRefClient) Use(hooks ...Hook)
- type ExternalRefCreate
- func (_c *ExternalRefCreate) Exec(ctx context.Context) error
- func (_c *ExternalRefCreate) ExecX(ctx context.Context)
- func (_c *ExternalRefCreate) Mutation() *ExternalRefMutation
- func (_c *ExternalRefCreate) Save(ctx context.Context) (*ExternalRef, error)
- func (_c *ExternalRefCreate) SaveX(ctx context.Context) *ExternalRef
- func (_c *ExternalRefCreate) SetCreatedAt(v time.Time) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetID(v uuid.UUID) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetLocation(v string) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetMetadata(v map[string]interface{}) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetName(v string) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetNillableCreatedAt(v *time.Time) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetNillableID(v *uuid.UUID) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetNillableSummary(v *string) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetNillableUpdatedAt(v *time.Time) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetRefType(v externalref.RefType) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetSummary(v string) *ExternalRefCreate
- func (_c *ExternalRefCreate) SetUpdatedAt(v time.Time) *ExternalRefCreate
- type ExternalRefCreateBulk
- type ExternalRefDelete
- type ExternalRefDeleteOne
- type ExternalRefGroupBy
- func (_g *ExternalRefGroupBy) Aggregate(fns ...AggregateFunc) *ExternalRefGroupBy
- func (s *ExternalRefGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ExternalRefGroupBy) BoolX(ctx context.Context) bool
- func (s *ExternalRefGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ExternalRefGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ExternalRefGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ExternalRefGroupBy) Float64X(ctx context.Context) float64
- func (s *ExternalRefGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ExternalRefGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ExternalRefGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ExternalRefGroupBy) IntX(ctx context.Context) int
- func (s *ExternalRefGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ExternalRefGroupBy) IntsX(ctx context.Context) []int
- func (_g *ExternalRefGroupBy) Scan(ctx context.Context, v any) error
- func (s *ExternalRefGroupBy) ScanX(ctx context.Context, v any)
- func (s *ExternalRefGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ExternalRefGroupBy) StringX(ctx context.Context) string
- func (s *ExternalRefGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ExternalRefGroupBy) StringsX(ctx context.Context) []string
- type ExternalRefMutation
- func (m *ExternalRefMutation) AddField(name string, value ent.Value) error
- func (m *ExternalRefMutation) AddedEdges() []string
- func (m *ExternalRefMutation) AddedField(name string) (ent.Value, bool)
- func (m *ExternalRefMutation) AddedFields() []string
- func (m *ExternalRefMutation) AddedIDs(name string) []ent.Value
- func (m *ExternalRefMutation) ClearEdge(name string) error
- func (m *ExternalRefMutation) ClearField(name string) error
- func (m *ExternalRefMutation) ClearMetadata()
- func (m *ExternalRefMutation) ClearSummary()
- func (m *ExternalRefMutation) ClearedEdges() []string
- func (m *ExternalRefMutation) ClearedFields() []string
- func (m ExternalRefMutation) Client() *Client
- func (m *ExternalRefMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ExternalRefMutation) EdgeCleared(name string) bool
- func (m *ExternalRefMutation) Field(name string) (ent.Value, bool)
- func (m *ExternalRefMutation) FieldCleared(name string) bool
- func (m *ExternalRefMutation) Fields() []string
- func (m *ExternalRefMutation) ID() (id uuid.UUID, exists bool)
- func (m *ExternalRefMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ExternalRefMutation) Location() (r string, exists bool)
- func (m *ExternalRefMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *ExternalRefMutation) MetadataCleared() bool
- func (m *ExternalRefMutation) Name() (r string, exists bool)
- func (m *ExternalRefMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ExternalRefMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ExternalRefMutation) OldLocation(ctx context.Context) (v string, err error)
- func (m *ExternalRefMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *ExternalRefMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ExternalRefMutation) OldRefType(ctx context.Context) (v externalref.RefType, err error)
- func (m *ExternalRefMutation) OldSummary(ctx context.Context) (v string, err error)
- func (m *ExternalRefMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ExternalRefMutation) Op() Op
- func (m *ExternalRefMutation) RefType() (r externalref.RefType, exists bool)
- func (m *ExternalRefMutation) RemovedEdges() []string
- func (m *ExternalRefMutation) RemovedIDs(name string) []ent.Value
- func (m *ExternalRefMutation) ResetCreatedAt()
- func (m *ExternalRefMutation) ResetEdge(name string) error
- func (m *ExternalRefMutation) ResetField(name string) error
- func (m *ExternalRefMutation) ResetLocation()
- func (m *ExternalRefMutation) ResetMetadata()
- func (m *ExternalRefMutation) ResetName()
- func (m *ExternalRefMutation) ResetRefType()
- func (m *ExternalRefMutation) ResetSummary()
- func (m *ExternalRefMutation) ResetUpdatedAt()
- func (m *ExternalRefMutation) SetCreatedAt(t time.Time)
- func (m *ExternalRefMutation) SetField(name string, value ent.Value) error
- func (m *ExternalRefMutation) SetID(id uuid.UUID)
- func (m *ExternalRefMutation) SetLocation(s string)
- func (m *ExternalRefMutation) SetMetadata(value map[string]interface{})
- func (m *ExternalRefMutation) SetName(s string)
- func (m *ExternalRefMutation) SetOp(op Op)
- func (m *ExternalRefMutation) SetRefType(et externalref.RefType)
- func (m *ExternalRefMutation) SetSummary(s string)
- func (m *ExternalRefMutation) SetUpdatedAt(t time.Time)
- func (m *ExternalRefMutation) Summary() (r string, exists bool)
- func (m *ExternalRefMutation) SummaryCleared() bool
- func (m ExternalRefMutation) Tx() (*Tx, error)
- func (m *ExternalRefMutation) Type() string
- func (m *ExternalRefMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ExternalRefMutation) Where(ps ...predicate.ExternalRef)
- func (m *ExternalRefMutation) WhereP(ps ...func(*sql.Selector))
- type ExternalRefQuery
- func (_q *ExternalRefQuery) Aggregate(fns ...AggregateFunc) *ExternalRefSelect
- func (_q *ExternalRefQuery) All(ctx context.Context) ([]*ExternalRef, error)
- func (_q *ExternalRefQuery) AllX(ctx context.Context) []*ExternalRef
- func (_q *ExternalRefQuery) Clone() *ExternalRefQuery
- func (_q *ExternalRefQuery) Count(ctx context.Context) (int, error)
- func (_q *ExternalRefQuery) CountX(ctx context.Context) int
- func (_q *ExternalRefQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ExternalRefQuery) ExistX(ctx context.Context) bool
- func (_q *ExternalRefQuery) First(ctx context.Context) (*ExternalRef, error)
- func (_q *ExternalRefQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ExternalRefQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *ExternalRefQuery) FirstX(ctx context.Context) *ExternalRef
- func (_q *ExternalRefQuery) GroupBy(field string, fields ...string) *ExternalRefGroupBy
- func (_q *ExternalRefQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *ExternalRefQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *ExternalRefQuery) Limit(limit int) *ExternalRefQuery
- func (_q *ExternalRefQuery) Offset(offset int) *ExternalRefQuery
- func (_q *ExternalRefQuery) Only(ctx context.Context) (*ExternalRef, error)
- func (_q *ExternalRefQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ExternalRefQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *ExternalRefQuery) OnlyX(ctx context.Context) *ExternalRef
- func (_q *ExternalRefQuery) Order(o ...externalref.OrderOption) *ExternalRefQuery
- func (_q *ExternalRefQuery) Select(fields ...string) *ExternalRefSelect
- func (_q *ExternalRefQuery) Unique(unique bool) *ExternalRefQuery
- func (_q *ExternalRefQuery) Where(ps ...predicate.ExternalRef) *ExternalRefQuery
- type ExternalRefSelect
- func (_s *ExternalRefSelect) Aggregate(fns ...AggregateFunc) *ExternalRefSelect
- func (s *ExternalRefSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ExternalRefSelect) BoolX(ctx context.Context) bool
- func (s *ExternalRefSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ExternalRefSelect) BoolsX(ctx context.Context) []bool
- func (s *ExternalRefSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ExternalRefSelect) Float64X(ctx context.Context) float64
- func (s *ExternalRefSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ExternalRefSelect) Float64sX(ctx context.Context) []float64
- func (s *ExternalRefSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ExternalRefSelect) IntX(ctx context.Context) int
- func (s *ExternalRefSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ExternalRefSelect) IntsX(ctx context.Context) []int
- func (_s *ExternalRefSelect) Scan(ctx context.Context, v any) error
- func (s *ExternalRefSelect) ScanX(ctx context.Context, v any)
- func (s *ExternalRefSelect) String(ctx context.Context) (_ string, err error)
- func (s *ExternalRefSelect) StringX(ctx context.Context) string
- func (s *ExternalRefSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ExternalRefSelect) StringsX(ctx context.Context) []string
- type ExternalRefUpdate
- func (_u *ExternalRefUpdate) ClearMetadata() *ExternalRefUpdate
- func (_u *ExternalRefUpdate) ClearSummary() *ExternalRefUpdate
- func (_u *ExternalRefUpdate) Exec(ctx context.Context) error
- func (_u *ExternalRefUpdate) ExecX(ctx context.Context)
- func (_u *ExternalRefUpdate) Mutation() *ExternalRefMutation
- func (_u *ExternalRefUpdate) Save(ctx context.Context) (int, error)
- func (_u *ExternalRefUpdate) SaveX(ctx context.Context) int
- func (_u *ExternalRefUpdate) SetLocation(v string) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetMetadata(v map[string]interface{}) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetName(v string) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetNillableLocation(v *string) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetNillableName(v *string) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetNillableRefType(v *externalref.RefType) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetNillableSummary(v *string) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetRefType(v externalref.RefType) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetSummary(v string) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) SetUpdatedAt(v time.Time) *ExternalRefUpdate
- func (_u *ExternalRefUpdate) Where(ps ...predicate.ExternalRef) *ExternalRefUpdate
- type ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) ClearMetadata() *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) ClearSummary() *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) Exec(ctx context.Context) error
- func (_u *ExternalRefUpdateOne) ExecX(ctx context.Context)
- func (_u *ExternalRefUpdateOne) Mutation() *ExternalRefMutation
- func (_u *ExternalRefUpdateOne) Save(ctx context.Context) (*ExternalRef, error)
- func (_u *ExternalRefUpdateOne) SaveX(ctx context.Context) *ExternalRef
- func (_u *ExternalRefUpdateOne) Select(field string, fields ...string) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetLocation(v string) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetMetadata(v map[string]interface{}) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetName(v string) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetNillableLocation(v *string) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetNillableName(v *string) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetNillableRefType(v *externalref.RefType) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetNillableSummary(v *string) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetRefType(v externalref.RefType) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetSummary(v string) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) SetUpdatedAt(v time.Time) *ExternalRefUpdateOne
- func (_u *ExternalRefUpdateOne) Where(ps ...predicate.ExternalRef) *ExternalRefUpdateOne
- type ExternalRefs
- type Hook
- type Inquiries
- type Inquiry
- type InquiryClient
- func (c *InquiryClient) Create() *InquiryCreate
- func (c *InquiryClient) CreateBulk(builders ...*InquiryCreate) *InquiryCreateBulk
- func (c *InquiryClient) Delete() *InquiryDelete
- func (c *InquiryClient) DeleteOne(_m *Inquiry) *InquiryDeleteOne
- func (c *InquiryClient) DeleteOneID(id uuid.UUID) *InquiryDeleteOne
- func (c *InquiryClient) Get(ctx context.Context, id uuid.UUID) (*Inquiry, error)
- func (c *InquiryClient) GetX(ctx context.Context, id uuid.UUID) *Inquiry
- func (c *InquiryClient) Hooks() []Hook
- func (c *InquiryClient) Intercept(interceptors ...Interceptor)
- func (c *InquiryClient) Interceptors() []Interceptor
- func (c *InquiryClient) MapCreateBulk(slice any, setFunc func(*InquiryCreate, int)) *InquiryCreateBulk
- func (c *InquiryClient) Query() *InquiryQuery
- func (c *InquiryClient) Update() *InquiryUpdate
- func (c *InquiryClient) UpdateOne(_m *Inquiry) *InquiryUpdateOne
- func (c *InquiryClient) UpdateOneID(id uuid.UUID) *InquiryUpdateOne
- func (c *InquiryClient) Use(hooks ...Hook)
- type InquiryCreate
- func (_c *InquiryCreate) Exec(ctx context.Context) error
- func (_c *InquiryCreate) ExecX(ctx context.Context)
- func (_c *InquiryCreate) Mutation() *InquiryMutation
- func (_c *InquiryCreate) Save(ctx context.Context) (*Inquiry, error)
- func (_c *InquiryCreate) SaveX(ctx context.Context) *Inquiry
- func (_c *InquiryCreate) SetAnswer(v string) *InquiryCreate
- func (_c *InquiryCreate) SetContext(v string) *InquiryCreate
- func (_c *InquiryCreate) SetCreatedAt(v time.Time) *InquiryCreate
- func (_c *InquiryCreate) SetID(v uuid.UUID) *InquiryCreate
- func (_c *InquiryCreate) SetKnowledgeKey(v string) *InquiryCreate
- func (_c *InquiryCreate) SetNillableAnswer(v *string) *InquiryCreate
- func (_c *InquiryCreate) SetNillableContext(v *string) *InquiryCreate
- func (_c *InquiryCreate) SetNillableCreatedAt(v *time.Time) *InquiryCreate
- func (_c *InquiryCreate) SetNillableID(v *uuid.UUID) *InquiryCreate
- func (_c *InquiryCreate) SetNillableKnowledgeKey(v *string) *InquiryCreate
- func (_c *InquiryCreate) SetNillablePriority(v *inquiry.Priority) *InquiryCreate
- func (_c *InquiryCreate) SetNillableResolvedAt(v *time.Time) *InquiryCreate
- func (_c *InquiryCreate) SetNillableSourceObservationID(v *string) *InquiryCreate
- func (_c *InquiryCreate) SetNillableStatus(v *inquiry.Status) *InquiryCreate
- func (_c *InquiryCreate) SetPriority(v inquiry.Priority) *InquiryCreate
- func (_c *InquiryCreate) SetQuestion(v string) *InquiryCreate
- func (_c *InquiryCreate) SetResolvedAt(v time.Time) *InquiryCreate
- func (_c *InquiryCreate) SetSessionKey(v string) *InquiryCreate
- func (_c *InquiryCreate) SetSourceObservationID(v string) *InquiryCreate
- func (_c *InquiryCreate) SetStatus(v inquiry.Status) *InquiryCreate
- func (_c *InquiryCreate) SetTopic(v string) *InquiryCreate
- type InquiryCreateBulk
- type InquiryDelete
- type InquiryDeleteOne
- type InquiryGroupBy
- func (_g *InquiryGroupBy) Aggregate(fns ...AggregateFunc) *InquiryGroupBy
- func (s *InquiryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InquiryGroupBy) BoolX(ctx context.Context) bool
- func (s *InquiryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InquiryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InquiryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InquiryGroupBy) Float64X(ctx context.Context) float64
- func (s *InquiryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InquiryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InquiryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InquiryGroupBy) IntX(ctx context.Context) int
- func (s *InquiryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InquiryGroupBy) IntsX(ctx context.Context) []int
- func (_g *InquiryGroupBy) Scan(ctx context.Context, v any) error
- func (s *InquiryGroupBy) ScanX(ctx context.Context, v any)
- func (s *InquiryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InquiryGroupBy) StringX(ctx context.Context) string
- func (s *InquiryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InquiryGroupBy) StringsX(ctx context.Context) []string
- type InquiryMutation
- func (m *InquiryMutation) AddField(name string, value ent.Value) error
- func (m *InquiryMutation) AddedEdges() []string
- func (m *InquiryMutation) AddedField(name string) (ent.Value, bool)
- func (m *InquiryMutation) AddedFields() []string
- func (m *InquiryMutation) AddedIDs(name string) []ent.Value
- func (m *InquiryMutation) Answer() (r string, exists bool)
- func (m *InquiryMutation) AnswerCleared() bool
- func (m *InquiryMutation) ClearAnswer()
- func (m *InquiryMutation) ClearContext()
- func (m *InquiryMutation) ClearEdge(name string) error
- func (m *InquiryMutation) ClearField(name string) error
- func (m *InquiryMutation) ClearKnowledgeKey()
- func (m *InquiryMutation) ClearResolvedAt()
- func (m *InquiryMutation) ClearSourceObservationID()
- func (m *InquiryMutation) ClearedEdges() []string
- func (m *InquiryMutation) ClearedFields() []string
- func (m InquiryMutation) Client() *Client
- func (m *InquiryMutation) Context() (r string, exists bool)
- func (m *InquiryMutation) ContextCleared() bool
- func (m *InquiryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *InquiryMutation) EdgeCleared(name string) bool
- func (m *InquiryMutation) Field(name string) (ent.Value, bool)
- func (m *InquiryMutation) FieldCleared(name string) bool
- func (m *InquiryMutation) Fields() []string
- func (m *InquiryMutation) ID() (id uuid.UUID, exists bool)
- func (m *InquiryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InquiryMutation) KnowledgeKey() (r string, exists bool)
- func (m *InquiryMutation) KnowledgeKeyCleared() bool
- func (m *InquiryMutation) OldAnswer(ctx context.Context) (v *string, err error)
- func (m *InquiryMutation) OldContext(ctx context.Context) (v *string, err error)
- func (m *InquiryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *InquiryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InquiryMutation) OldKnowledgeKey(ctx context.Context) (v *string, err error)
- func (m *InquiryMutation) OldPriority(ctx context.Context) (v inquiry.Priority, err error)
- func (m *InquiryMutation) OldQuestion(ctx context.Context) (v string, err error)
- func (m *InquiryMutation) OldResolvedAt(ctx context.Context) (v *time.Time, err error)
- func (m *InquiryMutation) OldSessionKey(ctx context.Context) (v string, err error)
- func (m *InquiryMutation) OldSourceObservationID(ctx context.Context) (v *string, err error)
- func (m *InquiryMutation) OldStatus(ctx context.Context) (v inquiry.Status, err error)
- func (m *InquiryMutation) OldTopic(ctx context.Context) (v string, err error)
- func (m *InquiryMutation) Op() Op
- func (m *InquiryMutation) Priority() (r inquiry.Priority, exists bool)
- func (m *InquiryMutation) Question() (r string, exists bool)
- func (m *InquiryMutation) RemovedEdges() []string
- func (m *InquiryMutation) RemovedIDs(name string) []ent.Value
- func (m *InquiryMutation) ResetAnswer()
- func (m *InquiryMutation) ResetContext()
- func (m *InquiryMutation) ResetCreatedAt()
- func (m *InquiryMutation) ResetEdge(name string) error
- func (m *InquiryMutation) ResetField(name string) error
- func (m *InquiryMutation) ResetKnowledgeKey()
- func (m *InquiryMutation) ResetPriority()
- func (m *InquiryMutation) ResetQuestion()
- func (m *InquiryMutation) ResetResolvedAt()
- func (m *InquiryMutation) ResetSessionKey()
- func (m *InquiryMutation) ResetSourceObservationID()
- func (m *InquiryMutation) ResetStatus()
- func (m *InquiryMutation) ResetTopic()
- func (m *InquiryMutation) ResolvedAt() (r time.Time, exists bool)
- func (m *InquiryMutation) ResolvedAtCleared() bool
- func (m *InquiryMutation) SessionKey() (r string, exists bool)
- func (m *InquiryMutation) SetAnswer(s string)
- func (m *InquiryMutation) SetContext(s string)
- func (m *InquiryMutation) SetCreatedAt(t time.Time)
- func (m *InquiryMutation) SetField(name string, value ent.Value) error
- func (m *InquiryMutation) SetID(id uuid.UUID)
- func (m *InquiryMutation) SetKnowledgeKey(s string)
- func (m *InquiryMutation) SetOp(op Op)
- func (m *InquiryMutation) SetPriority(i inquiry.Priority)
- func (m *InquiryMutation) SetQuestion(s string)
- func (m *InquiryMutation) SetResolvedAt(t time.Time)
- func (m *InquiryMutation) SetSessionKey(s string)
- func (m *InquiryMutation) SetSourceObservationID(s string)
- func (m *InquiryMutation) SetStatus(i inquiry.Status)
- func (m *InquiryMutation) SetTopic(s string)
- func (m *InquiryMutation) SourceObservationID() (r string, exists bool)
- func (m *InquiryMutation) SourceObservationIDCleared() bool
- func (m *InquiryMutation) Status() (r inquiry.Status, exists bool)
- func (m *InquiryMutation) Topic() (r string, exists bool)
- func (m InquiryMutation) Tx() (*Tx, error)
- func (m *InquiryMutation) Type() string
- func (m *InquiryMutation) Where(ps ...predicate.Inquiry)
- func (m *InquiryMutation) WhereP(ps ...func(*sql.Selector))
- type InquiryQuery
- func (_q *InquiryQuery) Aggregate(fns ...AggregateFunc) *InquirySelect
- func (_q *InquiryQuery) All(ctx context.Context) ([]*Inquiry, error)
- func (_q *InquiryQuery) AllX(ctx context.Context) []*Inquiry
- func (_q *InquiryQuery) Clone() *InquiryQuery
- func (_q *InquiryQuery) Count(ctx context.Context) (int, error)
- func (_q *InquiryQuery) CountX(ctx context.Context) int
- func (_q *InquiryQuery) Exist(ctx context.Context) (bool, error)
- func (_q *InquiryQuery) ExistX(ctx context.Context) bool
- func (_q *InquiryQuery) First(ctx context.Context) (*Inquiry, error)
- func (_q *InquiryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *InquiryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *InquiryQuery) FirstX(ctx context.Context) *Inquiry
- func (_q *InquiryQuery) GroupBy(field string, fields ...string) *InquiryGroupBy
- func (_q *InquiryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *InquiryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *InquiryQuery) Limit(limit int) *InquiryQuery
- func (_q *InquiryQuery) Offset(offset int) *InquiryQuery
- func (_q *InquiryQuery) Only(ctx context.Context) (*Inquiry, error)
- func (_q *InquiryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *InquiryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *InquiryQuery) OnlyX(ctx context.Context) *Inquiry
- func (_q *InquiryQuery) Order(o ...inquiry.OrderOption) *InquiryQuery
- func (_q *InquiryQuery) Select(fields ...string) *InquirySelect
- func (_q *InquiryQuery) Unique(unique bool) *InquiryQuery
- func (_q *InquiryQuery) Where(ps ...predicate.Inquiry) *InquiryQuery
- type InquirySelect
- func (_s *InquirySelect) Aggregate(fns ...AggregateFunc) *InquirySelect
- func (s *InquirySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InquirySelect) BoolX(ctx context.Context) bool
- func (s *InquirySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InquirySelect) BoolsX(ctx context.Context) []bool
- func (s *InquirySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InquirySelect) Float64X(ctx context.Context) float64
- func (s *InquirySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InquirySelect) Float64sX(ctx context.Context) []float64
- func (s *InquirySelect) Int(ctx context.Context) (_ int, err error)
- func (s *InquirySelect) IntX(ctx context.Context) int
- func (s *InquirySelect) Ints(ctx context.Context) ([]int, error)
- func (s *InquirySelect) IntsX(ctx context.Context) []int
- func (_s *InquirySelect) Scan(ctx context.Context, v any) error
- func (s *InquirySelect) ScanX(ctx context.Context, v any)
- func (s *InquirySelect) String(ctx context.Context) (_ string, err error)
- func (s *InquirySelect) StringX(ctx context.Context) string
- func (s *InquirySelect) Strings(ctx context.Context) ([]string, error)
- func (s *InquirySelect) StringsX(ctx context.Context) []string
- type InquiryUpdate
- func (_u *InquiryUpdate) ClearAnswer() *InquiryUpdate
- func (_u *InquiryUpdate) ClearContext() *InquiryUpdate
- func (_u *InquiryUpdate) ClearKnowledgeKey() *InquiryUpdate
- func (_u *InquiryUpdate) ClearResolvedAt() *InquiryUpdate
- func (_u *InquiryUpdate) ClearSourceObservationID() *InquiryUpdate
- func (_u *InquiryUpdate) Exec(ctx context.Context) error
- func (_u *InquiryUpdate) ExecX(ctx context.Context)
- func (_u *InquiryUpdate) Mutation() *InquiryMutation
- func (_u *InquiryUpdate) Save(ctx context.Context) (int, error)
- func (_u *InquiryUpdate) SaveX(ctx context.Context) int
- func (_u *InquiryUpdate) SetAnswer(v string) *InquiryUpdate
- func (_u *InquiryUpdate) SetContext(v string) *InquiryUpdate
- func (_u *InquiryUpdate) SetKnowledgeKey(v string) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableAnswer(v *string) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableContext(v *string) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableKnowledgeKey(v *string) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillablePriority(v *inquiry.Priority) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableQuestion(v *string) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableResolvedAt(v *time.Time) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableSessionKey(v *string) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableSourceObservationID(v *string) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableStatus(v *inquiry.Status) *InquiryUpdate
- func (_u *InquiryUpdate) SetNillableTopic(v *string) *InquiryUpdate
- func (_u *InquiryUpdate) SetPriority(v inquiry.Priority) *InquiryUpdate
- func (_u *InquiryUpdate) SetQuestion(v string) *InquiryUpdate
- func (_u *InquiryUpdate) SetResolvedAt(v time.Time) *InquiryUpdate
- func (_u *InquiryUpdate) SetSessionKey(v string) *InquiryUpdate
- func (_u *InquiryUpdate) SetSourceObservationID(v string) *InquiryUpdate
- func (_u *InquiryUpdate) SetStatus(v inquiry.Status) *InquiryUpdate
- func (_u *InquiryUpdate) SetTopic(v string) *InquiryUpdate
- func (_u *InquiryUpdate) Where(ps ...predicate.Inquiry) *InquiryUpdate
- type InquiryUpdateOne
- func (_u *InquiryUpdateOne) ClearAnswer() *InquiryUpdateOne
- func (_u *InquiryUpdateOne) ClearContext() *InquiryUpdateOne
- func (_u *InquiryUpdateOne) ClearKnowledgeKey() *InquiryUpdateOne
- func (_u *InquiryUpdateOne) ClearResolvedAt() *InquiryUpdateOne
- func (_u *InquiryUpdateOne) ClearSourceObservationID() *InquiryUpdateOne
- func (_u *InquiryUpdateOne) Exec(ctx context.Context) error
- func (_u *InquiryUpdateOne) ExecX(ctx context.Context)
- func (_u *InquiryUpdateOne) Mutation() *InquiryMutation
- func (_u *InquiryUpdateOne) Save(ctx context.Context) (*Inquiry, error)
- func (_u *InquiryUpdateOne) SaveX(ctx context.Context) *Inquiry
- func (_u *InquiryUpdateOne) Select(field string, fields ...string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetAnswer(v string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetContext(v string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetKnowledgeKey(v string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableAnswer(v *string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableContext(v *string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableKnowledgeKey(v *string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillablePriority(v *inquiry.Priority) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableQuestion(v *string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableResolvedAt(v *time.Time) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableSessionKey(v *string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableSourceObservationID(v *string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableStatus(v *inquiry.Status) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetNillableTopic(v *string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetPriority(v inquiry.Priority) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetQuestion(v string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetResolvedAt(v time.Time) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetSessionKey(v string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetSourceObservationID(v string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetStatus(v inquiry.Status) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) SetTopic(v string) *InquiryUpdateOne
- func (_u *InquiryUpdateOne) Where(ps ...predicate.Inquiry) *InquiryUpdateOne
- type InterceptFunc
- type Interceptor
- type Key
- type KeyClient
- func (c *KeyClient) Create() *KeyCreate
- func (c *KeyClient) CreateBulk(builders ...*KeyCreate) *KeyCreateBulk
- func (c *KeyClient) Delete() *KeyDelete
- func (c *KeyClient) DeleteOne(_m *Key) *KeyDeleteOne
- func (c *KeyClient) DeleteOneID(id uuid.UUID) *KeyDeleteOne
- func (c *KeyClient) Get(ctx context.Context, id uuid.UUID) (*Key, error)
- func (c *KeyClient) GetX(ctx context.Context, id uuid.UUID) *Key
- func (c *KeyClient) Hooks() []Hook
- func (c *KeyClient) Intercept(interceptors ...Interceptor)
- func (c *KeyClient) Interceptors() []Interceptor
- func (c *KeyClient) MapCreateBulk(slice any, setFunc func(*KeyCreate, int)) *KeyCreateBulk
- func (c *KeyClient) Query() *KeyQuery
- func (c *KeyClient) QuerySecrets(_m *Key) *SecretQuery
- func (c *KeyClient) Update() *KeyUpdate
- func (c *KeyClient) UpdateOne(_m *Key) *KeyUpdateOne
- func (c *KeyClient) UpdateOneID(id uuid.UUID) *KeyUpdateOne
- func (c *KeyClient) Use(hooks ...Hook)
- type KeyCreate
- func (_c *KeyCreate) AddSecretIDs(ids ...uuid.UUID) *KeyCreate
- func (_c *KeyCreate) AddSecrets(v ...*Secret) *KeyCreate
- func (_c *KeyCreate) Exec(ctx context.Context) error
- func (_c *KeyCreate) ExecX(ctx context.Context)
- func (_c *KeyCreate) Mutation() *KeyMutation
- func (_c *KeyCreate) Save(ctx context.Context) (*Key, error)
- func (_c *KeyCreate) SaveX(ctx context.Context) *Key
- func (_c *KeyCreate) SetCreatedAt(v time.Time) *KeyCreate
- func (_c *KeyCreate) SetID(v uuid.UUID) *KeyCreate
- func (_c *KeyCreate) SetLastUsedAt(v time.Time) *KeyCreate
- func (_c *KeyCreate) SetName(v string) *KeyCreate
- func (_c *KeyCreate) SetNillableCreatedAt(v *time.Time) *KeyCreate
- func (_c *KeyCreate) SetNillableID(v *uuid.UUID) *KeyCreate
- func (_c *KeyCreate) SetNillableLastUsedAt(v *time.Time) *KeyCreate
- func (_c *KeyCreate) SetNillableType(v *key.Type) *KeyCreate
- func (_c *KeyCreate) SetRemoteKeyID(v string) *KeyCreate
- func (_c *KeyCreate) SetType(v key.Type) *KeyCreate
- type KeyCreateBulk
- type KeyDelete
- type KeyDeleteOne
- type KeyEdges
- type KeyGroupBy
- func (_g *KeyGroupBy) Aggregate(fns ...AggregateFunc) *KeyGroupBy
- func (s *KeyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *KeyGroupBy) BoolX(ctx context.Context) bool
- func (s *KeyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *KeyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *KeyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *KeyGroupBy) Float64X(ctx context.Context) float64
- func (s *KeyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *KeyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *KeyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *KeyGroupBy) IntX(ctx context.Context) int
- func (s *KeyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *KeyGroupBy) IntsX(ctx context.Context) []int
- func (_g *KeyGroupBy) Scan(ctx context.Context, v any) error
- func (s *KeyGroupBy) ScanX(ctx context.Context, v any)
- func (s *KeyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *KeyGroupBy) StringX(ctx context.Context) string
- func (s *KeyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *KeyGroupBy) StringsX(ctx context.Context) []string
- type KeyMutation
- func (m *KeyMutation) AddField(name string, value ent.Value) error
- func (m *KeyMutation) AddSecretIDs(ids ...uuid.UUID)
- func (m *KeyMutation) AddedEdges() []string
- func (m *KeyMutation) AddedField(name string) (ent.Value, bool)
- func (m *KeyMutation) AddedFields() []string
- func (m *KeyMutation) AddedIDs(name string) []ent.Value
- func (m *KeyMutation) ClearEdge(name string) error
- func (m *KeyMutation) ClearField(name string) error
- func (m *KeyMutation) ClearLastUsedAt()
- func (m *KeyMutation) ClearSecrets()
- func (m *KeyMutation) ClearedEdges() []string
- func (m *KeyMutation) ClearedFields() []string
- func (m KeyMutation) Client() *Client
- func (m *KeyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *KeyMutation) EdgeCleared(name string) bool
- func (m *KeyMutation) Field(name string) (ent.Value, bool)
- func (m *KeyMutation) FieldCleared(name string) bool
- func (m *KeyMutation) Fields() []string
- func (m *KeyMutation) GetType() (r key.Type, exists bool)
- func (m *KeyMutation) ID() (id uuid.UUID, exists bool)
- func (m *KeyMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *KeyMutation) LastUsedAt() (r time.Time, exists bool)
- func (m *KeyMutation) LastUsedAtCleared() bool
- func (m *KeyMutation) Name() (r string, exists bool)
- func (m *KeyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *KeyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *KeyMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)
- func (m *KeyMutation) OldName(ctx context.Context) (v string, err error)
- func (m *KeyMutation) OldRemoteKeyID(ctx context.Context) (v string, err error)
- func (m *KeyMutation) OldType(ctx context.Context) (v key.Type, err error)
- func (m *KeyMutation) Op() Op
- func (m *KeyMutation) RemoteKeyID() (r string, exists bool)
- func (m *KeyMutation) RemoveSecretIDs(ids ...uuid.UUID)
- func (m *KeyMutation) RemovedEdges() []string
- func (m *KeyMutation) RemovedIDs(name string) []ent.Value
- func (m *KeyMutation) RemovedSecretsIDs() (ids []uuid.UUID)
- func (m *KeyMutation) ResetCreatedAt()
- func (m *KeyMutation) ResetEdge(name string) error
- func (m *KeyMutation) ResetField(name string) error
- func (m *KeyMutation) ResetLastUsedAt()
- func (m *KeyMutation) ResetName()
- func (m *KeyMutation) ResetRemoteKeyID()
- func (m *KeyMutation) ResetSecrets()
- func (m *KeyMutation) ResetType()
- func (m *KeyMutation) SecretsCleared() bool
- func (m *KeyMutation) SecretsIDs() (ids []uuid.UUID)
- func (m *KeyMutation) SetCreatedAt(t time.Time)
- func (m *KeyMutation) SetField(name string, value ent.Value) error
- func (m *KeyMutation) SetID(id uuid.UUID)
- func (m *KeyMutation) SetLastUsedAt(t time.Time)
- func (m *KeyMutation) SetName(s string)
- func (m *KeyMutation) SetOp(op Op)
- func (m *KeyMutation) SetRemoteKeyID(s string)
- func (m *KeyMutation) SetType(k key.Type)
- func (m KeyMutation) Tx() (*Tx, error)
- func (m *KeyMutation) Type() string
- func (m *KeyMutation) Where(ps ...predicate.Key)
- func (m *KeyMutation) WhereP(ps ...func(*sql.Selector))
- type KeyQuery
- func (_q *KeyQuery) Aggregate(fns ...AggregateFunc) *KeySelect
- func (_q *KeyQuery) All(ctx context.Context) ([]*Key, error)
- func (_q *KeyQuery) AllX(ctx context.Context) []*Key
- func (_q *KeyQuery) Clone() *KeyQuery
- func (_q *KeyQuery) Count(ctx context.Context) (int, error)
- func (_q *KeyQuery) CountX(ctx context.Context) int
- func (_q *KeyQuery) Exist(ctx context.Context) (bool, error)
- func (_q *KeyQuery) ExistX(ctx context.Context) bool
- func (_q *KeyQuery) First(ctx context.Context) (*Key, error)
- func (_q *KeyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *KeyQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *KeyQuery) FirstX(ctx context.Context) *Key
- func (_q *KeyQuery) GroupBy(field string, fields ...string) *KeyGroupBy
- func (_q *KeyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *KeyQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *KeyQuery) Limit(limit int) *KeyQuery
- func (_q *KeyQuery) Offset(offset int) *KeyQuery
- func (_q *KeyQuery) Only(ctx context.Context) (*Key, error)
- func (_q *KeyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *KeyQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *KeyQuery) OnlyX(ctx context.Context) *Key
- func (_q *KeyQuery) Order(o ...key.OrderOption) *KeyQuery
- func (_q *KeyQuery) QuerySecrets() *SecretQuery
- func (_q *KeyQuery) Select(fields ...string) *KeySelect
- func (_q *KeyQuery) Unique(unique bool) *KeyQuery
- func (_q *KeyQuery) Where(ps ...predicate.Key) *KeyQuery
- func (_q *KeyQuery) WithSecrets(opts ...func(*SecretQuery)) *KeyQuery
- type KeySelect
- func (_s *KeySelect) Aggregate(fns ...AggregateFunc) *KeySelect
- func (s *KeySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *KeySelect) BoolX(ctx context.Context) bool
- func (s *KeySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *KeySelect) BoolsX(ctx context.Context) []bool
- func (s *KeySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *KeySelect) Float64X(ctx context.Context) float64
- func (s *KeySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *KeySelect) Float64sX(ctx context.Context) []float64
- func (s *KeySelect) Int(ctx context.Context) (_ int, err error)
- func (s *KeySelect) IntX(ctx context.Context) int
- func (s *KeySelect) Ints(ctx context.Context) ([]int, error)
- func (s *KeySelect) IntsX(ctx context.Context) []int
- func (_s *KeySelect) Scan(ctx context.Context, v any) error
- func (s *KeySelect) ScanX(ctx context.Context, v any)
- func (s *KeySelect) String(ctx context.Context) (_ string, err error)
- func (s *KeySelect) StringX(ctx context.Context) string
- func (s *KeySelect) Strings(ctx context.Context) ([]string, error)
- func (s *KeySelect) StringsX(ctx context.Context) []string
- type KeyUpdate
- func (_u *KeyUpdate) AddSecretIDs(ids ...uuid.UUID) *KeyUpdate
- func (_u *KeyUpdate) AddSecrets(v ...*Secret) *KeyUpdate
- func (_u *KeyUpdate) ClearLastUsedAt() *KeyUpdate
- func (_u *KeyUpdate) ClearSecrets() *KeyUpdate
- func (_u *KeyUpdate) Exec(ctx context.Context) error
- func (_u *KeyUpdate) ExecX(ctx context.Context)
- func (_u *KeyUpdate) Mutation() *KeyMutation
- func (_u *KeyUpdate) RemoveSecretIDs(ids ...uuid.UUID) *KeyUpdate
- func (_u *KeyUpdate) RemoveSecrets(v ...*Secret) *KeyUpdate
- func (_u *KeyUpdate) Save(ctx context.Context) (int, error)
- func (_u *KeyUpdate) SaveX(ctx context.Context) int
- func (_u *KeyUpdate) SetLastUsedAt(v time.Time) *KeyUpdate
- func (_u *KeyUpdate) SetName(v string) *KeyUpdate
- func (_u *KeyUpdate) SetNillableLastUsedAt(v *time.Time) *KeyUpdate
- func (_u *KeyUpdate) SetNillableName(v *string) *KeyUpdate
- func (_u *KeyUpdate) SetNillableRemoteKeyID(v *string) *KeyUpdate
- func (_u *KeyUpdate) SetNillableType(v *key.Type) *KeyUpdate
- func (_u *KeyUpdate) SetRemoteKeyID(v string) *KeyUpdate
- func (_u *KeyUpdate) SetType(v key.Type) *KeyUpdate
- func (_u *KeyUpdate) Where(ps ...predicate.Key) *KeyUpdate
- type KeyUpdateOne
- func (_u *KeyUpdateOne) AddSecretIDs(ids ...uuid.UUID) *KeyUpdateOne
- func (_u *KeyUpdateOne) AddSecrets(v ...*Secret) *KeyUpdateOne
- func (_u *KeyUpdateOne) ClearLastUsedAt() *KeyUpdateOne
- func (_u *KeyUpdateOne) ClearSecrets() *KeyUpdateOne
- func (_u *KeyUpdateOne) Exec(ctx context.Context) error
- func (_u *KeyUpdateOne) ExecX(ctx context.Context)
- func (_u *KeyUpdateOne) Mutation() *KeyMutation
- func (_u *KeyUpdateOne) RemoveSecretIDs(ids ...uuid.UUID) *KeyUpdateOne
- func (_u *KeyUpdateOne) RemoveSecrets(v ...*Secret) *KeyUpdateOne
- func (_u *KeyUpdateOne) Save(ctx context.Context) (*Key, error)
- func (_u *KeyUpdateOne) SaveX(ctx context.Context) *Key
- func (_u *KeyUpdateOne) Select(field string, fields ...string) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetLastUsedAt(v time.Time) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetName(v string) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetNillableLastUsedAt(v *time.Time) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetNillableName(v *string) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetNillableRemoteKeyID(v *string) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetNillableType(v *key.Type) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetRemoteKeyID(v string) *KeyUpdateOne
- func (_u *KeyUpdateOne) SetType(v key.Type) *KeyUpdateOne
- func (_u *KeyUpdateOne) Where(ps ...predicate.Key) *KeyUpdateOne
- type Keys
- type Knowledge
- type KnowledgeClient
- func (c *KnowledgeClient) Create() *KnowledgeCreate
- func (c *KnowledgeClient) CreateBulk(builders ...*KnowledgeCreate) *KnowledgeCreateBulk
- func (c *KnowledgeClient) Delete() *KnowledgeDelete
- func (c *KnowledgeClient) DeleteOne(_m *Knowledge) *KnowledgeDeleteOne
- func (c *KnowledgeClient) DeleteOneID(id uuid.UUID) *KnowledgeDeleteOne
- func (c *KnowledgeClient) Get(ctx context.Context, id uuid.UUID) (*Knowledge, error)
- func (c *KnowledgeClient) GetX(ctx context.Context, id uuid.UUID) *Knowledge
- func (c *KnowledgeClient) Hooks() []Hook
- func (c *KnowledgeClient) Intercept(interceptors ...Interceptor)
- func (c *KnowledgeClient) Interceptors() []Interceptor
- func (c *KnowledgeClient) MapCreateBulk(slice any, setFunc func(*KnowledgeCreate, int)) *KnowledgeCreateBulk
- func (c *KnowledgeClient) Query() *KnowledgeQuery
- func (c *KnowledgeClient) Update() *KnowledgeUpdate
- func (c *KnowledgeClient) UpdateOne(_m *Knowledge) *KnowledgeUpdateOne
- func (c *KnowledgeClient) UpdateOneID(id uuid.UUID) *KnowledgeUpdateOne
- func (c *KnowledgeClient) Use(hooks ...Hook)
- type KnowledgeCreate
- func (_c *KnowledgeCreate) Exec(ctx context.Context) error
- func (_c *KnowledgeCreate) ExecX(ctx context.Context)
- func (_c *KnowledgeCreate) Mutation() *KnowledgeMutation
- func (_c *KnowledgeCreate) Save(ctx context.Context) (*Knowledge, error)
- func (_c *KnowledgeCreate) SaveX(ctx context.Context) *Knowledge
- func (_c *KnowledgeCreate) SetCategory(v knowledge.Category) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetContent(v string) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetCreatedAt(v time.Time) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetID(v uuid.UUID) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetKey(v string) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetNillableCreatedAt(v *time.Time) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetNillableID(v *uuid.UUID) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetNillableRelevanceScore(v *float64) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetNillableSource(v *string) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetNillableUpdatedAt(v *time.Time) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetNillableUseCount(v *int) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetRelevanceScore(v float64) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetSource(v string) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetTags(v []string) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetUpdatedAt(v time.Time) *KnowledgeCreate
- func (_c *KnowledgeCreate) SetUseCount(v int) *KnowledgeCreate
- type KnowledgeCreateBulk
- type KnowledgeDelete
- type KnowledgeDeleteOne
- type KnowledgeGroupBy
- func (_g *KnowledgeGroupBy) Aggregate(fns ...AggregateFunc) *KnowledgeGroupBy
- func (s *KnowledgeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *KnowledgeGroupBy) BoolX(ctx context.Context) bool
- func (s *KnowledgeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *KnowledgeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *KnowledgeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *KnowledgeGroupBy) Float64X(ctx context.Context) float64
- func (s *KnowledgeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *KnowledgeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *KnowledgeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *KnowledgeGroupBy) IntX(ctx context.Context) int
- func (s *KnowledgeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *KnowledgeGroupBy) IntsX(ctx context.Context) []int
- func (_g *KnowledgeGroupBy) Scan(ctx context.Context, v any) error
- func (s *KnowledgeGroupBy) ScanX(ctx context.Context, v any)
- func (s *KnowledgeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *KnowledgeGroupBy) StringX(ctx context.Context) string
- func (s *KnowledgeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *KnowledgeGroupBy) StringsX(ctx context.Context) []string
- type KnowledgeMutation
- func (m *KnowledgeMutation) AddField(name string, value ent.Value) error
- func (m *KnowledgeMutation) AddRelevanceScore(f float64)
- func (m *KnowledgeMutation) AddUseCount(i int)
- func (m *KnowledgeMutation) AddedEdges() []string
- func (m *KnowledgeMutation) AddedField(name string) (ent.Value, bool)
- func (m *KnowledgeMutation) AddedFields() []string
- func (m *KnowledgeMutation) AddedIDs(name string) []ent.Value
- func (m *KnowledgeMutation) AddedRelevanceScore() (r float64, exists bool)
- func (m *KnowledgeMutation) AddedUseCount() (r int, exists bool)
- func (m *KnowledgeMutation) AppendTags(s []string)
- func (m *KnowledgeMutation) AppendedTags() ([]string, bool)
- func (m *KnowledgeMutation) Category() (r knowledge.Category, exists bool)
- func (m *KnowledgeMutation) ClearEdge(name string) error
- func (m *KnowledgeMutation) ClearField(name string) error
- func (m *KnowledgeMutation) ClearSource()
- func (m *KnowledgeMutation) ClearTags()
- func (m *KnowledgeMutation) ClearedEdges() []string
- func (m *KnowledgeMutation) ClearedFields() []string
- func (m KnowledgeMutation) Client() *Client
- func (m *KnowledgeMutation) Content() (r string, exists bool)
- func (m *KnowledgeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *KnowledgeMutation) EdgeCleared(name string) bool
- func (m *KnowledgeMutation) Field(name string) (ent.Value, bool)
- func (m *KnowledgeMutation) FieldCleared(name string) bool
- func (m *KnowledgeMutation) Fields() []string
- func (m *KnowledgeMutation) ID() (id uuid.UUID, exists bool)
- func (m *KnowledgeMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *KnowledgeMutation) Key() (r string, exists bool)
- func (m *KnowledgeMutation) OldCategory(ctx context.Context) (v knowledge.Category, err error)
- func (m *KnowledgeMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *KnowledgeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *KnowledgeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *KnowledgeMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *KnowledgeMutation) OldRelevanceScore(ctx context.Context) (v float64, err error)
- func (m *KnowledgeMutation) OldSource(ctx context.Context) (v string, err error)
- func (m *KnowledgeMutation) OldTags(ctx context.Context) (v []string, err error)
- func (m *KnowledgeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *KnowledgeMutation) OldUseCount(ctx context.Context) (v int, err error)
- func (m *KnowledgeMutation) Op() Op
- func (m *KnowledgeMutation) RelevanceScore() (r float64, exists bool)
- func (m *KnowledgeMutation) RemovedEdges() []string
- func (m *KnowledgeMutation) RemovedIDs(name string) []ent.Value
- func (m *KnowledgeMutation) ResetCategory()
- func (m *KnowledgeMutation) ResetContent()
- func (m *KnowledgeMutation) ResetCreatedAt()
- func (m *KnowledgeMutation) ResetEdge(name string) error
- func (m *KnowledgeMutation) ResetField(name string) error
- func (m *KnowledgeMutation) ResetKey()
- func (m *KnowledgeMutation) ResetRelevanceScore()
- func (m *KnowledgeMutation) ResetSource()
- func (m *KnowledgeMutation) ResetTags()
- func (m *KnowledgeMutation) ResetUpdatedAt()
- func (m *KnowledgeMutation) ResetUseCount()
- func (m *KnowledgeMutation) SetCategory(k knowledge.Category)
- func (m *KnowledgeMutation) SetContent(s string)
- func (m *KnowledgeMutation) SetCreatedAt(t time.Time)
- func (m *KnowledgeMutation) SetField(name string, value ent.Value) error
- func (m *KnowledgeMutation) SetID(id uuid.UUID)
- func (m *KnowledgeMutation) SetKey(s string)
- func (m *KnowledgeMutation) SetOp(op Op)
- func (m *KnowledgeMutation) SetRelevanceScore(f float64)
- func (m *KnowledgeMutation) SetSource(s string)
- func (m *KnowledgeMutation) SetTags(s []string)
- func (m *KnowledgeMutation) SetUpdatedAt(t time.Time)
- func (m *KnowledgeMutation) SetUseCount(i int)
- func (m *KnowledgeMutation) Source() (r string, exists bool)
- func (m *KnowledgeMutation) SourceCleared() bool
- func (m *KnowledgeMutation) Tags() (r []string, exists bool)
- func (m *KnowledgeMutation) TagsCleared() bool
- func (m KnowledgeMutation) Tx() (*Tx, error)
- func (m *KnowledgeMutation) Type() string
- func (m *KnowledgeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *KnowledgeMutation) UseCount() (r int, exists bool)
- func (m *KnowledgeMutation) Where(ps ...predicate.Knowledge)
- func (m *KnowledgeMutation) WhereP(ps ...func(*sql.Selector))
- type KnowledgeQuery
- func (_q *KnowledgeQuery) Aggregate(fns ...AggregateFunc) *KnowledgeSelect
- func (_q *KnowledgeQuery) All(ctx context.Context) ([]*Knowledge, error)
- func (_q *KnowledgeQuery) AllX(ctx context.Context) []*Knowledge
- func (_q *KnowledgeQuery) Clone() *KnowledgeQuery
- func (_q *KnowledgeQuery) Count(ctx context.Context) (int, error)
- func (_q *KnowledgeQuery) CountX(ctx context.Context) int
- func (_q *KnowledgeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *KnowledgeQuery) ExistX(ctx context.Context) bool
- func (_q *KnowledgeQuery) First(ctx context.Context) (*Knowledge, error)
- func (_q *KnowledgeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *KnowledgeQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *KnowledgeQuery) FirstX(ctx context.Context) *Knowledge
- func (_q *KnowledgeQuery) GroupBy(field string, fields ...string) *KnowledgeGroupBy
- func (_q *KnowledgeQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *KnowledgeQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *KnowledgeQuery) Limit(limit int) *KnowledgeQuery
- func (_q *KnowledgeQuery) Offset(offset int) *KnowledgeQuery
- func (_q *KnowledgeQuery) Only(ctx context.Context) (*Knowledge, error)
- func (_q *KnowledgeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *KnowledgeQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *KnowledgeQuery) OnlyX(ctx context.Context) *Knowledge
- func (_q *KnowledgeQuery) Order(o ...knowledge.OrderOption) *KnowledgeQuery
- func (_q *KnowledgeQuery) Select(fields ...string) *KnowledgeSelect
- func (_q *KnowledgeQuery) Unique(unique bool) *KnowledgeQuery
- func (_q *KnowledgeQuery) Where(ps ...predicate.Knowledge) *KnowledgeQuery
- type KnowledgeSelect
- func (_s *KnowledgeSelect) Aggregate(fns ...AggregateFunc) *KnowledgeSelect
- func (s *KnowledgeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *KnowledgeSelect) BoolX(ctx context.Context) bool
- func (s *KnowledgeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *KnowledgeSelect) BoolsX(ctx context.Context) []bool
- func (s *KnowledgeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *KnowledgeSelect) Float64X(ctx context.Context) float64
- func (s *KnowledgeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *KnowledgeSelect) Float64sX(ctx context.Context) []float64
- func (s *KnowledgeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *KnowledgeSelect) IntX(ctx context.Context) int
- func (s *KnowledgeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *KnowledgeSelect) IntsX(ctx context.Context) []int
- func (_s *KnowledgeSelect) Scan(ctx context.Context, v any) error
- func (s *KnowledgeSelect) ScanX(ctx context.Context, v any)
- func (s *KnowledgeSelect) String(ctx context.Context) (_ string, err error)
- func (s *KnowledgeSelect) StringX(ctx context.Context) string
- func (s *KnowledgeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *KnowledgeSelect) StringsX(ctx context.Context) []string
- type KnowledgeUpdate
- func (_u *KnowledgeUpdate) AddRelevanceScore(v float64) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) AddUseCount(v int) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) AppendTags(v []string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) ClearSource() *KnowledgeUpdate
- func (_u *KnowledgeUpdate) ClearTags() *KnowledgeUpdate
- func (_u *KnowledgeUpdate) Exec(ctx context.Context) error
- func (_u *KnowledgeUpdate) ExecX(ctx context.Context)
- func (_u *KnowledgeUpdate) Mutation() *KnowledgeMutation
- func (_u *KnowledgeUpdate) Save(ctx context.Context) (int, error)
- func (_u *KnowledgeUpdate) SaveX(ctx context.Context) int
- func (_u *KnowledgeUpdate) SetCategory(v knowledge.Category) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetContent(v string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetKey(v string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetNillableCategory(v *knowledge.Category) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetNillableContent(v *string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetNillableKey(v *string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetNillableRelevanceScore(v *float64) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetNillableSource(v *string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetNillableUseCount(v *int) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetRelevanceScore(v float64) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetSource(v string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetTags(v []string) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetUpdatedAt(v time.Time) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) SetUseCount(v int) *KnowledgeUpdate
- func (_u *KnowledgeUpdate) Where(ps ...predicate.Knowledge) *KnowledgeUpdate
- type KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) AddRelevanceScore(v float64) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) AddUseCount(v int) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) AppendTags(v []string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) ClearSource() *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) ClearTags() *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) Exec(ctx context.Context) error
- func (_u *KnowledgeUpdateOne) ExecX(ctx context.Context)
- func (_u *KnowledgeUpdateOne) Mutation() *KnowledgeMutation
- func (_u *KnowledgeUpdateOne) Save(ctx context.Context) (*Knowledge, error)
- func (_u *KnowledgeUpdateOne) SaveX(ctx context.Context) *Knowledge
- func (_u *KnowledgeUpdateOne) Select(field string, fields ...string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetCategory(v knowledge.Category) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetContent(v string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetKey(v string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetNillableCategory(v *knowledge.Category) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetNillableContent(v *string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetNillableKey(v *string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetNillableRelevanceScore(v *float64) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetNillableSource(v *string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetNillableUseCount(v *int) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetRelevanceScore(v float64) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetSource(v string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetTags(v []string) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetUpdatedAt(v time.Time) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) SetUseCount(v int) *KnowledgeUpdateOne
- func (_u *KnowledgeUpdateOne) Where(ps ...predicate.Knowledge) *KnowledgeUpdateOne
- type Knowledges
- type Learning
- type LearningClient
- func (c *LearningClient) Create() *LearningCreate
- func (c *LearningClient) CreateBulk(builders ...*LearningCreate) *LearningCreateBulk
- func (c *LearningClient) Delete() *LearningDelete
- func (c *LearningClient) DeleteOne(_m *Learning) *LearningDeleteOne
- func (c *LearningClient) DeleteOneID(id uuid.UUID) *LearningDeleteOne
- func (c *LearningClient) Get(ctx context.Context, id uuid.UUID) (*Learning, error)
- func (c *LearningClient) GetX(ctx context.Context, id uuid.UUID) *Learning
- func (c *LearningClient) Hooks() []Hook
- func (c *LearningClient) Intercept(interceptors ...Interceptor)
- func (c *LearningClient) Interceptors() []Interceptor
- func (c *LearningClient) MapCreateBulk(slice any, setFunc func(*LearningCreate, int)) *LearningCreateBulk
- func (c *LearningClient) Query() *LearningQuery
- func (c *LearningClient) Update() *LearningUpdate
- func (c *LearningClient) UpdateOne(_m *Learning) *LearningUpdateOne
- func (c *LearningClient) UpdateOneID(id uuid.UUID) *LearningUpdateOne
- func (c *LearningClient) Use(hooks ...Hook)
- type LearningCreate
- func (_c *LearningCreate) Exec(ctx context.Context) error
- func (_c *LearningCreate) ExecX(ctx context.Context)
- func (_c *LearningCreate) Mutation() *LearningMutation
- func (_c *LearningCreate) Save(ctx context.Context) (*Learning, error)
- func (_c *LearningCreate) SaveX(ctx context.Context) *Learning
- func (_c *LearningCreate) SetCategory(v learning.Category) *LearningCreate
- func (_c *LearningCreate) SetConfidence(v float64) *LearningCreate
- func (_c *LearningCreate) SetCreatedAt(v time.Time) *LearningCreate
- func (_c *LearningCreate) SetDiagnosis(v string) *LearningCreate
- func (_c *LearningCreate) SetErrorPattern(v string) *LearningCreate
- func (_c *LearningCreate) SetFix(v string) *LearningCreate
- func (_c *LearningCreate) SetID(v uuid.UUID) *LearningCreate
- func (_c *LearningCreate) SetNillableConfidence(v *float64) *LearningCreate
- func (_c *LearningCreate) SetNillableCreatedAt(v *time.Time) *LearningCreate
- func (_c *LearningCreate) SetNillableDiagnosis(v *string) *LearningCreate
- func (_c *LearningCreate) SetNillableErrorPattern(v *string) *LearningCreate
- func (_c *LearningCreate) SetNillableFix(v *string) *LearningCreate
- func (_c *LearningCreate) SetNillableID(v *uuid.UUID) *LearningCreate
- func (_c *LearningCreate) SetNillableOccurrenceCount(v *int) *LearningCreate
- func (_c *LearningCreate) SetNillableSuccessCount(v *int) *LearningCreate
- func (_c *LearningCreate) SetNillableUpdatedAt(v *time.Time) *LearningCreate
- func (_c *LearningCreate) SetOccurrenceCount(v int) *LearningCreate
- func (_c *LearningCreate) SetSuccessCount(v int) *LearningCreate
- func (_c *LearningCreate) SetTags(v []string) *LearningCreate
- func (_c *LearningCreate) SetTrigger(v string) *LearningCreate
- func (_c *LearningCreate) SetUpdatedAt(v time.Time) *LearningCreate
- type LearningCreateBulk
- type LearningDelete
- type LearningDeleteOne
- type LearningGroupBy
- func (_g *LearningGroupBy) Aggregate(fns ...AggregateFunc) *LearningGroupBy
- func (s *LearningGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LearningGroupBy) BoolX(ctx context.Context) bool
- func (s *LearningGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LearningGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LearningGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LearningGroupBy) Float64X(ctx context.Context) float64
- func (s *LearningGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LearningGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LearningGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LearningGroupBy) IntX(ctx context.Context) int
- func (s *LearningGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LearningGroupBy) IntsX(ctx context.Context) []int
- func (_g *LearningGroupBy) Scan(ctx context.Context, v any) error
- func (s *LearningGroupBy) ScanX(ctx context.Context, v any)
- func (s *LearningGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LearningGroupBy) StringX(ctx context.Context) string
- func (s *LearningGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LearningGroupBy) StringsX(ctx context.Context) []string
- type LearningMutation
- func (m *LearningMutation) AddConfidence(f float64)
- func (m *LearningMutation) AddField(name string, value ent.Value) error
- func (m *LearningMutation) AddOccurrenceCount(i int)
- func (m *LearningMutation) AddSuccessCount(i int)
- func (m *LearningMutation) AddedConfidence() (r float64, exists bool)
- func (m *LearningMutation) AddedEdges() []string
- func (m *LearningMutation) AddedField(name string) (ent.Value, bool)
- func (m *LearningMutation) AddedFields() []string
- func (m *LearningMutation) AddedIDs(name string) []ent.Value
- func (m *LearningMutation) AddedOccurrenceCount() (r int, exists bool)
- func (m *LearningMutation) AddedSuccessCount() (r int, exists bool)
- func (m *LearningMutation) AppendTags(s []string)
- func (m *LearningMutation) AppendedTags() ([]string, bool)
- func (m *LearningMutation) Category() (r learning.Category, exists bool)
- func (m *LearningMutation) ClearDiagnosis()
- func (m *LearningMutation) ClearEdge(name string) error
- func (m *LearningMutation) ClearErrorPattern()
- func (m *LearningMutation) ClearField(name string) error
- func (m *LearningMutation) ClearFix()
- func (m *LearningMutation) ClearTags()
- func (m *LearningMutation) ClearedEdges() []string
- func (m *LearningMutation) ClearedFields() []string
- func (m LearningMutation) Client() *Client
- func (m *LearningMutation) Confidence() (r float64, exists bool)
- func (m *LearningMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LearningMutation) Diagnosis() (r string, exists bool)
- func (m *LearningMutation) DiagnosisCleared() bool
- func (m *LearningMutation) EdgeCleared(name string) bool
- func (m *LearningMutation) ErrorPattern() (r string, exists bool)
- func (m *LearningMutation) ErrorPatternCleared() bool
- func (m *LearningMutation) Field(name string) (ent.Value, bool)
- func (m *LearningMutation) FieldCleared(name string) bool
- func (m *LearningMutation) Fields() []string
- func (m *LearningMutation) Fix() (r string, exists bool)
- func (m *LearningMutation) FixCleared() bool
- func (m *LearningMutation) ID() (id uuid.UUID, exists bool)
- func (m *LearningMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *LearningMutation) OccurrenceCount() (r int, exists bool)
- func (m *LearningMutation) OldCategory(ctx context.Context) (v learning.Category, err error)
- func (m *LearningMutation) OldConfidence(ctx context.Context) (v float64, err error)
- func (m *LearningMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LearningMutation) OldDiagnosis(ctx context.Context) (v string, err error)
- func (m *LearningMutation) OldErrorPattern(ctx context.Context) (v string, err error)
- func (m *LearningMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LearningMutation) OldFix(ctx context.Context) (v string, err error)
- func (m *LearningMutation) OldOccurrenceCount(ctx context.Context) (v int, err error)
- func (m *LearningMutation) OldSuccessCount(ctx context.Context) (v int, err error)
- func (m *LearningMutation) OldTags(ctx context.Context) (v []string, err error)
- func (m *LearningMutation) OldTrigger(ctx context.Context) (v string, err error)
- func (m *LearningMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *LearningMutation) Op() Op
- func (m *LearningMutation) RemovedEdges() []string
- func (m *LearningMutation) RemovedIDs(name string) []ent.Value
- func (m *LearningMutation) ResetCategory()
- func (m *LearningMutation) ResetConfidence()
- func (m *LearningMutation) ResetCreatedAt()
- func (m *LearningMutation) ResetDiagnosis()
- func (m *LearningMutation) ResetEdge(name string) error
- func (m *LearningMutation) ResetErrorPattern()
- func (m *LearningMutation) ResetField(name string) error
- func (m *LearningMutation) ResetFix()
- func (m *LearningMutation) ResetOccurrenceCount()
- func (m *LearningMutation) ResetSuccessCount()
- func (m *LearningMutation) ResetTags()
- func (m *LearningMutation) ResetTrigger()
- func (m *LearningMutation) ResetUpdatedAt()
- func (m *LearningMutation) SetCategory(l learning.Category)
- func (m *LearningMutation) SetConfidence(f float64)
- func (m *LearningMutation) SetCreatedAt(t time.Time)
- func (m *LearningMutation) SetDiagnosis(s string)
- func (m *LearningMutation) SetErrorPattern(s string)
- func (m *LearningMutation) SetField(name string, value ent.Value) error
- func (m *LearningMutation) SetFix(s string)
- func (m *LearningMutation) SetID(id uuid.UUID)
- func (m *LearningMutation) SetOccurrenceCount(i int)
- func (m *LearningMutation) SetOp(op Op)
- func (m *LearningMutation) SetSuccessCount(i int)
- func (m *LearningMutation) SetTags(s []string)
- func (m *LearningMutation) SetTrigger(s string)
- func (m *LearningMutation) SetUpdatedAt(t time.Time)
- func (m *LearningMutation) SuccessCount() (r int, exists bool)
- func (m *LearningMutation) Tags() (r []string, exists bool)
- func (m *LearningMutation) TagsCleared() bool
- func (m *LearningMutation) Trigger() (r string, exists bool)
- func (m LearningMutation) Tx() (*Tx, error)
- func (m *LearningMutation) Type() string
- func (m *LearningMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *LearningMutation) Where(ps ...predicate.Learning)
- func (m *LearningMutation) WhereP(ps ...func(*sql.Selector))
- type LearningQuery
- func (_q *LearningQuery) Aggregate(fns ...AggregateFunc) *LearningSelect
- func (_q *LearningQuery) All(ctx context.Context) ([]*Learning, error)
- func (_q *LearningQuery) AllX(ctx context.Context) []*Learning
- func (_q *LearningQuery) Clone() *LearningQuery
- func (_q *LearningQuery) Count(ctx context.Context) (int, error)
- func (_q *LearningQuery) CountX(ctx context.Context) int
- func (_q *LearningQuery) Exist(ctx context.Context) (bool, error)
- func (_q *LearningQuery) ExistX(ctx context.Context) bool
- func (_q *LearningQuery) First(ctx context.Context) (*Learning, error)
- func (_q *LearningQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *LearningQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *LearningQuery) FirstX(ctx context.Context) *Learning
- func (_q *LearningQuery) GroupBy(field string, fields ...string) *LearningGroupBy
- func (_q *LearningQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *LearningQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *LearningQuery) Limit(limit int) *LearningQuery
- func (_q *LearningQuery) Offset(offset int) *LearningQuery
- func (_q *LearningQuery) Only(ctx context.Context) (*Learning, error)
- func (_q *LearningQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *LearningQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *LearningQuery) OnlyX(ctx context.Context) *Learning
- func (_q *LearningQuery) Order(o ...learning.OrderOption) *LearningQuery
- func (_q *LearningQuery) Select(fields ...string) *LearningSelect
- func (_q *LearningQuery) Unique(unique bool) *LearningQuery
- func (_q *LearningQuery) Where(ps ...predicate.Learning) *LearningQuery
- type LearningSelect
- func (_s *LearningSelect) Aggregate(fns ...AggregateFunc) *LearningSelect
- func (s *LearningSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LearningSelect) BoolX(ctx context.Context) bool
- func (s *LearningSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LearningSelect) BoolsX(ctx context.Context) []bool
- func (s *LearningSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LearningSelect) Float64X(ctx context.Context) float64
- func (s *LearningSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LearningSelect) Float64sX(ctx context.Context) []float64
- func (s *LearningSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LearningSelect) IntX(ctx context.Context) int
- func (s *LearningSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LearningSelect) IntsX(ctx context.Context) []int
- func (_s *LearningSelect) Scan(ctx context.Context, v any) error
- func (s *LearningSelect) ScanX(ctx context.Context, v any)
- func (s *LearningSelect) String(ctx context.Context) (_ string, err error)
- func (s *LearningSelect) StringX(ctx context.Context) string
- func (s *LearningSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LearningSelect) StringsX(ctx context.Context) []string
- type LearningUpdate
- func (_u *LearningUpdate) AddConfidence(v float64) *LearningUpdate
- func (_u *LearningUpdate) AddOccurrenceCount(v int) *LearningUpdate
- func (_u *LearningUpdate) AddSuccessCount(v int) *LearningUpdate
- func (_u *LearningUpdate) AppendTags(v []string) *LearningUpdate
- func (_u *LearningUpdate) ClearDiagnosis() *LearningUpdate
- func (_u *LearningUpdate) ClearErrorPattern() *LearningUpdate
- func (_u *LearningUpdate) ClearFix() *LearningUpdate
- func (_u *LearningUpdate) ClearTags() *LearningUpdate
- func (_u *LearningUpdate) Exec(ctx context.Context) error
- func (_u *LearningUpdate) ExecX(ctx context.Context)
- func (_u *LearningUpdate) Mutation() *LearningMutation
- func (_u *LearningUpdate) Save(ctx context.Context) (int, error)
- func (_u *LearningUpdate) SaveX(ctx context.Context) int
- func (_u *LearningUpdate) SetCategory(v learning.Category) *LearningUpdate
- func (_u *LearningUpdate) SetConfidence(v float64) *LearningUpdate
- func (_u *LearningUpdate) SetDiagnosis(v string) *LearningUpdate
- func (_u *LearningUpdate) SetErrorPattern(v string) *LearningUpdate
- func (_u *LearningUpdate) SetFix(v string) *LearningUpdate
- func (_u *LearningUpdate) SetNillableCategory(v *learning.Category) *LearningUpdate
- func (_u *LearningUpdate) SetNillableConfidence(v *float64) *LearningUpdate
- func (_u *LearningUpdate) SetNillableDiagnosis(v *string) *LearningUpdate
- func (_u *LearningUpdate) SetNillableErrorPattern(v *string) *LearningUpdate
- func (_u *LearningUpdate) SetNillableFix(v *string) *LearningUpdate
- func (_u *LearningUpdate) SetNillableOccurrenceCount(v *int) *LearningUpdate
- func (_u *LearningUpdate) SetNillableSuccessCount(v *int) *LearningUpdate
- func (_u *LearningUpdate) SetNillableTrigger(v *string) *LearningUpdate
- func (_u *LearningUpdate) SetOccurrenceCount(v int) *LearningUpdate
- func (_u *LearningUpdate) SetSuccessCount(v int) *LearningUpdate
- func (_u *LearningUpdate) SetTags(v []string) *LearningUpdate
- func (_u *LearningUpdate) SetTrigger(v string) *LearningUpdate
- func (_u *LearningUpdate) SetUpdatedAt(v time.Time) *LearningUpdate
- func (_u *LearningUpdate) Where(ps ...predicate.Learning) *LearningUpdate
- type LearningUpdateOne
- func (_u *LearningUpdateOne) AddConfidence(v float64) *LearningUpdateOne
- func (_u *LearningUpdateOne) AddOccurrenceCount(v int) *LearningUpdateOne
- func (_u *LearningUpdateOne) AddSuccessCount(v int) *LearningUpdateOne
- func (_u *LearningUpdateOne) AppendTags(v []string) *LearningUpdateOne
- func (_u *LearningUpdateOne) ClearDiagnosis() *LearningUpdateOne
- func (_u *LearningUpdateOne) ClearErrorPattern() *LearningUpdateOne
- func (_u *LearningUpdateOne) ClearFix() *LearningUpdateOne
- func (_u *LearningUpdateOne) ClearTags() *LearningUpdateOne
- func (_u *LearningUpdateOne) Exec(ctx context.Context) error
- func (_u *LearningUpdateOne) ExecX(ctx context.Context)
- func (_u *LearningUpdateOne) Mutation() *LearningMutation
- func (_u *LearningUpdateOne) Save(ctx context.Context) (*Learning, error)
- func (_u *LearningUpdateOne) SaveX(ctx context.Context) *Learning
- func (_u *LearningUpdateOne) Select(field string, fields ...string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetCategory(v learning.Category) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetConfidence(v float64) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetDiagnosis(v string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetErrorPattern(v string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetFix(v string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableCategory(v *learning.Category) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableConfidence(v *float64) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableDiagnosis(v *string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableErrorPattern(v *string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableFix(v *string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableOccurrenceCount(v *int) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableSuccessCount(v *int) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetNillableTrigger(v *string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetOccurrenceCount(v int) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetSuccessCount(v int) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetTags(v []string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetTrigger(v string) *LearningUpdateOne
- func (_u *LearningUpdateOne) SetUpdatedAt(v time.Time) *LearningUpdateOne
- func (_u *LearningUpdateOne) Where(ps ...predicate.Learning) *LearningUpdateOne
- type Learnings
- type Message
- type MessageClient
- func (c *MessageClient) Create() *MessageCreate
- func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
- func (c *MessageClient) Delete() *MessageDelete
- func (c *MessageClient) DeleteOne(_m *Message) *MessageDeleteOne
- func (c *MessageClient) DeleteOneID(id int) *MessageDeleteOne
- func (c *MessageClient) Get(ctx context.Context, id int) (*Message, error)
- func (c *MessageClient) GetX(ctx context.Context, id int) *Message
- func (c *MessageClient) Hooks() []Hook
- func (c *MessageClient) Intercept(interceptors ...Interceptor)
- func (c *MessageClient) Interceptors() []Interceptor
- func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
- func (c *MessageClient) Query() *MessageQuery
- func (c *MessageClient) QuerySession(_m *Message) *SessionQuery
- func (c *MessageClient) Update() *MessageUpdate
- func (c *MessageClient) UpdateOne(_m *Message) *MessageUpdateOne
- func (c *MessageClient) UpdateOneID(id int) *MessageUpdateOne
- func (c *MessageClient) Use(hooks ...Hook)
- type MessageCreate
- func (_c *MessageCreate) Exec(ctx context.Context) error
- func (_c *MessageCreate) ExecX(ctx context.Context)
- func (_c *MessageCreate) Mutation() *MessageMutation
- func (_c *MessageCreate) Save(ctx context.Context) (*Message, error)
- func (_c *MessageCreate) SaveX(ctx context.Context) *Message
- func (_c *MessageCreate) SetAuthor(v string) *MessageCreate
- func (_c *MessageCreate) SetContent(v string) *MessageCreate
- func (_c *MessageCreate) SetNillableAuthor(v *string) *MessageCreate
- func (_c *MessageCreate) SetNillableSessionID(id *int) *MessageCreate
- func (_c *MessageCreate) SetNillableTimestamp(v *time.Time) *MessageCreate
- func (_c *MessageCreate) SetRole(v string) *MessageCreate
- func (_c *MessageCreate) SetSession(v *Session) *MessageCreate
- func (_c *MessageCreate) SetSessionID(id int) *MessageCreate
- func (_c *MessageCreate) SetTimestamp(v time.Time) *MessageCreate
- func (_c *MessageCreate) SetToolCalls(v []schema.ToolCall) *MessageCreate
- type MessageCreateBulk
- type MessageDelete
- type MessageDeleteOne
- type MessageEdges
- type MessageGroupBy
- func (_g *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
- func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageGroupBy) BoolX(ctx context.Context) bool
- func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageGroupBy) Float64X(ctx context.Context) float64
- func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MessageGroupBy) IntX(ctx context.Context) int
- func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MessageGroupBy) IntsX(ctx context.Context) []int
- func (_g *MessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *MessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MessageGroupBy) StringX(ctx context.Context) string
- func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MessageGroupBy) StringsX(ctx context.Context) []string
- type MessageMutation
- func (m *MessageMutation) AddField(name string, value ent.Value) error
- func (m *MessageMutation) AddedEdges() []string
- func (m *MessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *MessageMutation) AddedFields() []string
- func (m *MessageMutation) AddedIDs(name string) []ent.Value
- func (m *MessageMutation) AppendToolCalls(sc []schema.ToolCall)
- func (m *MessageMutation) AppendedToolCalls() ([]schema.ToolCall, bool)
- func (m *MessageMutation) Author() (r string, exists bool)
- func (m *MessageMutation) AuthorCleared() bool
- func (m *MessageMutation) ClearAuthor()
- func (m *MessageMutation) ClearEdge(name string) error
- func (m *MessageMutation) ClearField(name string) error
- func (m *MessageMutation) ClearSession()
- func (m *MessageMutation) ClearToolCalls()
- func (m *MessageMutation) ClearedEdges() []string
- func (m *MessageMutation) ClearedFields() []string
- func (m MessageMutation) Client() *Client
- func (m *MessageMutation) Content() (r string, exists bool)
- func (m *MessageMutation) EdgeCleared(name string) bool
- func (m *MessageMutation) Field(name string) (ent.Value, bool)
- func (m *MessageMutation) FieldCleared(name string) bool
- func (m *MessageMutation) Fields() []string
- func (m *MessageMutation) ID() (id int, exists bool)
- func (m *MessageMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MessageMutation) OldAuthor(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MessageMutation) OldRole(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *MessageMutation) OldToolCalls(ctx context.Context) (v []schema.ToolCall, err error)
- func (m *MessageMutation) Op() Op
- func (m *MessageMutation) RemovedEdges() []string
- func (m *MessageMutation) RemovedIDs(name string) []ent.Value
- func (m *MessageMutation) ResetAuthor()
- func (m *MessageMutation) ResetContent()
- func (m *MessageMutation) ResetEdge(name string) error
- func (m *MessageMutation) ResetField(name string) error
- func (m *MessageMutation) ResetRole()
- func (m *MessageMutation) ResetSession()
- func (m *MessageMutation) ResetTimestamp()
- func (m *MessageMutation) ResetToolCalls()
- func (m *MessageMutation) Role() (r string, exists bool)
- func (m *MessageMutation) SessionCleared() bool
- func (m *MessageMutation) SessionID() (id int, exists bool)
- func (m *MessageMutation) SessionIDs() (ids []int)
- func (m *MessageMutation) SetAuthor(s string)
- func (m *MessageMutation) SetContent(s string)
- func (m *MessageMutation) SetField(name string, value ent.Value) error
- func (m *MessageMutation) SetOp(op Op)
- func (m *MessageMutation) SetRole(s string)
- func (m *MessageMutation) SetSessionID(id int)
- func (m *MessageMutation) SetTimestamp(t time.Time)
- func (m *MessageMutation) SetToolCalls(sc []schema.ToolCall)
- func (m *MessageMutation) Timestamp() (r time.Time, exists bool)
- func (m *MessageMutation) ToolCalls() (r []schema.ToolCall, exists bool)
- func (m *MessageMutation) ToolCallsCleared() bool
- func (m MessageMutation) Tx() (*Tx, error)
- func (m *MessageMutation) Type() string
- func (m *MessageMutation) Where(ps ...predicate.Message)
- func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
- type MessageQuery
- func (_q *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (_q *MessageQuery) All(ctx context.Context) ([]*Message, error)
- func (_q *MessageQuery) AllX(ctx context.Context) []*Message
- func (_q *MessageQuery) Clone() *MessageQuery
- func (_q *MessageQuery) Count(ctx context.Context) (int, error)
- func (_q *MessageQuery) CountX(ctx context.Context) int
- func (_q *MessageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *MessageQuery) ExistX(ctx context.Context) bool
- func (_q *MessageQuery) First(ctx context.Context) (*Message, error)
- func (_q *MessageQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *MessageQuery) FirstIDX(ctx context.Context) int
- func (_q *MessageQuery) FirstX(ctx context.Context) *Message
- func (_q *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
- func (_q *MessageQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *MessageQuery) IDsX(ctx context.Context) []int
- func (_q *MessageQuery) Limit(limit int) *MessageQuery
- func (_q *MessageQuery) Offset(offset int) *MessageQuery
- func (_q *MessageQuery) Only(ctx context.Context) (*Message, error)
- func (_q *MessageQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *MessageQuery) OnlyIDX(ctx context.Context) int
- func (_q *MessageQuery) OnlyX(ctx context.Context) *Message
- func (_q *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
- func (_q *MessageQuery) QuerySession() *SessionQuery
- func (_q *MessageQuery) Select(fields ...string) *MessageSelect
- func (_q *MessageQuery) Unique(unique bool) *MessageQuery
- func (_q *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
- func (_q *MessageQuery) WithSession(opts ...func(*SessionQuery)) *MessageQuery
- type MessageSelect
- func (_s *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageSelect) BoolX(ctx context.Context) bool
- func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageSelect) BoolsX(ctx context.Context) []bool
- func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageSelect) Float64X(ctx context.Context) float64
- func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageSelect) Float64sX(ctx context.Context) []float64
- func (s *MessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MessageSelect) IntX(ctx context.Context) int
- func (s *MessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MessageSelect) IntsX(ctx context.Context) []int
- func (_s *MessageSelect) Scan(ctx context.Context, v any) error
- func (s *MessageSelect) ScanX(ctx context.Context, v any)
- func (s *MessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *MessageSelect) StringX(ctx context.Context) string
- func (s *MessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MessageSelect) StringsX(ctx context.Context) []string
- type MessageUpdate
- func (_u *MessageUpdate) AppendToolCalls(v []schema.ToolCall) *MessageUpdate
- func (_u *MessageUpdate) ClearAuthor() *MessageUpdate
- func (_u *MessageUpdate) ClearSession() *MessageUpdate
- func (_u *MessageUpdate) ClearToolCalls() *MessageUpdate
- func (_u *MessageUpdate) Exec(ctx context.Context) error
- func (_u *MessageUpdate) ExecX(ctx context.Context)
- func (_u *MessageUpdate) Mutation() *MessageMutation
- func (_u *MessageUpdate) Save(ctx context.Context) (int, error)
- func (_u *MessageUpdate) SaveX(ctx context.Context) int
- func (_u *MessageUpdate) SetAuthor(v string) *MessageUpdate
- func (_u *MessageUpdate) SetContent(v string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableAuthor(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableContent(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableRole(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableSessionID(id *int) *MessageUpdate
- func (_u *MessageUpdate) SetNillableTimestamp(v *time.Time) *MessageUpdate
- func (_u *MessageUpdate) SetRole(v string) *MessageUpdate
- func (_u *MessageUpdate) SetSession(v *Session) *MessageUpdate
- func (_u *MessageUpdate) SetSessionID(id int) *MessageUpdate
- func (_u *MessageUpdate) SetTimestamp(v time.Time) *MessageUpdate
- func (_u *MessageUpdate) SetToolCalls(v []schema.ToolCall) *MessageUpdate
- func (_u *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
- type MessageUpdateOne
- func (_u *MessageUpdateOne) AppendToolCalls(v []schema.ToolCall) *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearAuthor() *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearSession() *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearToolCalls() *MessageUpdateOne
- func (_u *MessageUpdateOne) Exec(ctx context.Context) error
- func (_u *MessageUpdateOne) ExecX(ctx context.Context)
- func (_u *MessageUpdateOne) Mutation() *MessageMutation
- func (_u *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
- func (_u *MessageUpdateOne) SaveX(ctx context.Context) *Message
- func (_u *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetAuthor(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetContent(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableAuthor(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableContent(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableRole(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableSessionID(id *int) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableTimestamp(v *time.Time) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetRole(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetSession(v *Session) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetSessionID(id int) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetTimestamp(v time.Time) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetToolCalls(v []schema.ToolCall) *MessageUpdateOne
- func (_u *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
- type Messages
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Observation
- type ObservationClient
- func (c *ObservationClient) Create() *ObservationCreate
- func (c *ObservationClient) CreateBulk(builders ...*ObservationCreate) *ObservationCreateBulk
- func (c *ObservationClient) Delete() *ObservationDelete
- func (c *ObservationClient) DeleteOne(_m *Observation) *ObservationDeleteOne
- func (c *ObservationClient) DeleteOneID(id uuid.UUID) *ObservationDeleteOne
- func (c *ObservationClient) Get(ctx context.Context, id uuid.UUID) (*Observation, error)
- func (c *ObservationClient) GetX(ctx context.Context, id uuid.UUID) *Observation
- func (c *ObservationClient) Hooks() []Hook
- func (c *ObservationClient) Intercept(interceptors ...Interceptor)
- func (c *ObservationClient) Interceptors() []Interceptor
- func (c *ObservationClient) MapCreateBulk(slice any, setFunc func(*ObservationCreate, int)) *ObservationCreateBulk
- func (c *ObservationClient) Query() *ObservationQuery
- func (c *ObservationClient) Update() *ObservationUpdate
- func (c *ObservationClient) UpdateOne(_m *Observation) *ObservationUpdateOne
- func (c *ObservationClient) UpdateOneID(id uuid.UUID) *ObservationUpdateOne
- func (c *ObservationClient) Use(hooks ...Hook)
- type ObservationCreate
- func (_c *ObservationCreate) Exec(ctx context.Context) error
- func (_c *ObservationCreate) ExecX(ctx context.Context)
- func (_c *ObservationCreate) Mutation() *ObservationMutation
- func (_c *ObservationCreate) Save(ctx context.Context) (*Observation, error)
- func (_c *ObservationCreate) SaveX(ctx context.Context) *Observation
- func (_c *ObservationCreate) SetContent(v string) *ObservationCreate
- func (_c *ObservationCreate) SetCreatedAt(v time.Time) *ObservationCreate
- func (_c *ObservationCreate) SetID(v uuid.UUID) *ObservationCreate
- func (_c *ObservationCreate) SetNillableCreatedAt(v *time.Time) *ObservationCreate
- func (_c *ObservationCreate) SetNillableID(v *uuid.UUID) *ObservationCreate
- func (_c *ObservationCreate) SetNillableSourceEndIndex(v *int) *ObservationCreate
- func (_c *ObservationCreate) SetNillableSourceStartIndex(v *int) *ObservationCreate
- func (_c *ObservationCreate) SetNillableTokenCount(v *int) *ObservationCreate
- func (_c *ObservationCreate) SetSessionKey(v string) *ObservationCreate
- func (_c *ObservationCreate) SetSourceEndIndex(v int) *ObservationCreate
- func (_c *ObservationCreate) SetSourceStartIndex(v int) *ObservationCreate
- func (_c *ObservationCreate) SetTokenCount(v int) *ObservationCreate
- type ObservationCreateBulk
- type ObservationDelete
- type ObservationDeleteOne
- type ObservationGroupBy
- func (_g *ObservationGroupBy) Aggregate(fns ...AggregateFunc) *ObservationGroupBy
- func (s *ObservationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ObservationGroupBy) BoolX(ctx context.Context) bool
- func (s *ObservationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ObservationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ObservationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ObservationGroupBy) Float64X(ctx context.Context) float64
- func (s *ObservationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ObservationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ObservationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ObservationGroupBy) IntX(ctx context.Context) int
- func (s *ObservationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ObservationGroupBy) IntsX(ctx context.Context) []int
- func (_g *ObservationGroupBy) Scan(ctx context.Context, v any) error
- func (s *ObservationGroupBy) ScanX(ctx context.Context, v any)
- func (s *ObservationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ObservationGroupBy) StringX(ctx context.Context) string
- func (s *ObservationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ObservationGroupBy) StringsX(ctx context.Context) []string
- type ObservationMutation
- func (m *ObservationMutation) AddField(name string, value ent.Value) error
- func (m *ObservationMutation) AddSourceEndIndex(i int)
- func (m *ObservationMutation) AddSourceStartIndex(i int)
- func (m *ObservationMutation) AddTokenCount(i int)
- func (m *ObservationMutation) AddedEdges() []string
- func (m *ObservationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ObservationMutation) AddedFields() []string
- func (m *ObservationMutation) AddedIDs(name string) []ent.Value
- func (m *ObservationMutation) AddedSourceEndIndex() (r int, exists bool)
- func (m *ObservationMutation) AddedSourceStartIndex() (r int, exists bool)
- func (m *ObservationMutation) AddedTokenCount() (r int, exists bool)
- func (m *ObservationMutation) ClearEdge(name string) error
- func (m *ObservationMutation) ClearField(name string) error
- func (m *ObservationMutation) ClearedEdges() []string
- func (m *ObservationMutation) ClearedFields() []string
- func (m ObservationMutation) Client() *Client
- func (m *ObservationMutation) Content() (r string, exists bool)
- func (m *ObservationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ObservationMutation) EdgeCleared(name string) bool
- func (m *ObservationMutation) Field(name string) (ent.Value, bool)
- func (m *ObservationMutation) FieldCleared(name string) bool
- func (m *ObservationMutation) Fields() []string
- func (m *ObservationMutation) ID() (id uuid.UUID, exists bool)
- func (m *ObservationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ObservationMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *ObservationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ObservationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ObservationMutation) OldSessionKey(ctx context.Context) (v string, err error)
- func (m *ObservationMutation) OldSourceEndIndex(ctx context.Context) (v int, err error)
- func (m *ObservationMutation) OldSourceStartIndex(ctx context.Context) (v int, err error)
- func (m *ObservationMutation) OldTokenCount(ctx context.Context) (v int, err error)
- func (m *ObservationMutation) Op() Op
- func (m *ObservationMutation) RemovedEdges() []string
- func (m *ObservationMutation) RemovedIDs(name string) []ent.Value
- func (m *ObservationMutation) ResetContent()
- func (m *ObservationMutation) ResetCreatedAt()
- func (m *ObservationMutation) ResetEdge(name string) error
- func (m *ObservationMutation) ResetField(name string) error
- func (m *ObservationMutation) ResetSessionKey()
- func (m *ObservationMutation) ResetSourceEndIndex()
- func (m *ObservationMutation) ResetSourceStartIndex()
- func (m *ObservationMutation) ResetTokenCount()
- func (m *ObservationMutation) SessionKey() (r string, exists bool)
- func (m *ObservationMutation) SetContent(s string)
- func (m *ObservationMutation) SetCreatedAt(t time.Time)
- func (m *ObservationMutation) SetField(name string, value ent.Value) error
- func (m *ObservationMutation) SetID(id uuid.UUID)
- func (m *ObservationMutation) SetOp(op Op)
- func (m *ObservationMutation) SetSessionKey(s string)
- func (m *ObservationMutation) SetSourceEndIndex(i int)
- func (m *ObservationMutation) SetSourceStartIndex(i int)
- func (m *ObservationMutation) SetTokenCount(i int)
- func (m *ObservationMutation) SourceEndIndex() (r int, exists bool)
- func (m *ObservationMutation) SourceStartIndex() (r int, exists bool)
- func (m *ObservationMutation) TokenCount() (r int, exists bool)
- func (m ObservationMutation) Tx() (*Tx, error)
- func (m *ObservationMutation) Type() string
- func (m *ObservationMutation) Where(ps ...predicate.Observation)
- func (m *ObservationMutation) WhereP(ps ...func(*sql.Selector))
- type ObservationQuery
- func (_q *ObservationQuery) Aggregate(fns ...AggregateFunc) *ObservationSelect
- func (_q *ObservationQuery) All(ctx context.Context) ([]*Observation, error)
- func (_q *ObservationQuery) AllX(ctx context.Context) []*Observation
- func (_q *ObservationQuery) Clone() *ObservationQuery
- func (_q *ObservationQuery) Count(ctx context.Context) (int, error)
- func (_q *ObservationQuery) CountX(ctx context.Context) int
- func (_q *ObservationQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ObservationQuery) ExistX(ctx context.Context) bool
- func (_q *ObservationQuery) First(ctx context.Context) (*Observation, error)
- func (_q *ObservationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ObservationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *ObservationQuery) FirstX(ctx context.Context) *Observation
- func (_q *ObservationQuery) GroupBy(field string, fields ...string) *ObservationGroupBy
- func (_q *ObservationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *ObservationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *ObservationQuery) Limit(limit int) *ObservationQuery
- func (_q *ObservationQuery) Offset(offset int) *ObservationQuery
- func (_q *ObservationQuery) Only(ctx context.Context) (*Observation, error)
- func (_q *ObservationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ObservationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *ObservationQuery) OnlyX(ctx context.Context) *Observation
- func (_q *ObservationQuery) Order(o ...observation.OrderOption) *ObservationQuery
- func (_q *ObservationQuery) Select(fields ...string) *ObservationSelect
- func (_q *ObservationQuery) Unique(unique bool) *ObservationQuery
- func (_q *ObservationQuery) Where(ps ...predicate.Observation) *ObservationQuery
- type ObservationSelect
- func (_s *ObservationSelect) Aggregate(fns ...AggregateFunc) *ObservationSelect
- func (s *ObservationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ObservationSelect) BoolX(ctx context.Context) bool
- func (s *ObservationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ObservationSelect) BoolsX(ctx context.Context) []bool
- func (s *ObservationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ObservationSelect) Float64X(ctx context.Context) float64
- func (s *ObservationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ObservationSelect) Float64sX(ctx context.Context) []float64
- func (s *ObservationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ObservationSelect) IntX(ctx context.Context) int
- func (s *ObservationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ObservationSelect) IntsX(ctx context.Context) []int
- func (_s *ObservationSelect) Scan(ctx context.Context, v any) error
- func (s *ObservationSelect) ScanX(ctx context.Context, v any)
- func (s *ObservationSelect) String(ctx context.Context) (_ string, err error)
- func (s *ObservationSelect) StringX(ctx context.Context) string
- func (s *ObservationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ObservationSelect) StringsX(ctx context.Context) []string
- type ObservationUpdate
- func (_u *ObservationUpdate) AddSourceEndIndex(v int) *ObservationUpdate
- func (_u *ObservationUpdate) AddSourceStartIndex(v int) *ObservationUpdate
- func (_u *ObservationUpdate) AddTokenCount(v int) *ObservationUpdate
- func (_u *ObservationUpdate) Exec(ctx context.Context) error
- func (_u *ObservationUpdate) ExecX(ctx context.Context)
- func (_u *ObservationUpdate) Mutation() *ObservationMutation
- func (_u *ObservationUpdate) Save(ctx context.Context) (int, error)
- func (_u *ObservationUpdate) SaveX(ctx context.Context) int
- func (_u *ObservationUpdate) SetContent(v string) *ObservationUpdate
- func (_u *ObservationUpdate) SetNillableContent(v *string) *ObservationUpdate
- func (_u *ObservationUpdate) SetNillableSessionKey(v *string) *ObservationUpdate
- func (_u *ObservationUpdate) SetNillableSourceEndIndex(v *int) *ObservationUpdate
- func (_u *ObservationUpdate) SetNillableSourceStartIndex(v *int) *ObservationUpdate
- func (_u *ObservationUpdate) SetNillableTokenCount(v *int) *ObservationUpdate
- func (_u *ObservationUpdate) SetSessionKey(v string) *ObservationUpdate
- func (_u *ObservationUpdate) SetSourceEndIndex(v int) *ObservationUpdate
- func (_u *ObservationUpdate) SetSourceStartIndex(v int) *ObservationUpdate
- func (_u *ObservationUpdate) SetTokenCount(v int) *ObservationUpdate
- func (_u *ObservationUpdate) Where(ps ...predicate.Observation) *ObservationUpdate
- type ObservationUpdateOne
- func (_u *ObservationUpdateOne) AddSourceEndIndex(v int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) AddSourceStartIndex(v int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) AddTokenCount(v int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) Exec(ctx context.Context) error
- func (_u *ObservationUpdateOne) ExecX(ctx context.Context)
- func (_u *ObservationUpdateOne) Mutation() *ObservationMutation
- func (_u *ObservationUpdateOne) Save(ctx context.Context) (*Observation, error)
- func (_u *ObservationUpdateOne) SaveX(ctx context.Context) *Observation
- func (_u *ObservationUpdateOne) Select(field string, fields ...string) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetContent(v string) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetNillableContent(v *string) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetNillableSessionKey(v *string) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetNillableSourceEndIndex(v *int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetNillableSourceStartIndex(v *int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetNillableTokenCount(v *int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetSessionKey(v string) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetSourceEndIndex(v int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetSourceStartIndex(v int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) SetTokenCount(v int) *ObservationUpdateOne
- func (_u *ObservationUpdateOne) Where(ps ...predicate.Observation) *ObservationUpdateOne
- type Observations
- type Op
- type Option
- type OrderFunc
- type PaymentTx
- type PaymentTxClient
- func (c *PaymentTxClient) Create() *PaymentTxCreate
- func (c *PaymentTxClient) CreateBulk(builders ...*PaymentTxCreate) *PaymentTxCreateBulk
- func (c *PaymentTxClient) Delete() *PaymentTxDelete
- func (c *PaymentTxClient) DeleteOne(_m *PaymentTx) *PaymentTxDeleteOne
- func (c *PaymentTxClient) DeleteOneID(id uuid.UUID) *PaymentTxDeleteOne
- func (c *PaymentTxClient) Get(ctx context.Context, id uuid.UUID) (*PaymentTx, error)
- func (c *PaymentTxClient) GetX(ctx context.Context, id uuid.UUID) *PaymentTx
- func (c *PaymentTxClient) Hooks() []Hook
- func (c *PaymentTxClient) Intercept(interceptors ...Interceptor)
- func (c *PaymentTxClient) Interceptors() []Interceptor
- func (c *PaymentTxClient) MapCreateBulk(slice any, setFunc func(*PaymentTxCreate, int)) *PaymentTxCreateBulk
- func (c *PaymentTxClient) Query() *PaymentTxQuery
- func (c *PaymentTxClient) Update() *PaymentTxUpdate
- func (c *PaymentTxClient) UpdateOne(_m *PaymentTx) *PaymentTxUpdateOne
- func (c *PaymentTxClient) UpdateOneID(id uuid.UUID) *PaymentTxUpdateOne
- func (c *PaymentTxClient) Use(hooks ...Hook)
- type PaymentTxCreate
- func (_c *PaymentTxCreate) Exec(ctx context.Context) error
- func (_c *PaymentTxCreate) ExecX(ctx context.Context)
- func (_c *PaymentTxCreate) Mutation() *PaymentTxMutation
- func (_c *PaymentTxCreate) Save(ctx context.Context) (*PaymentTx, error)
- func (_c *PaymentTxCreate) SaveX(ctx context.Context) *PaymentTx
- func (_c *PaymentTxCreate) SetAmount(v string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetChainID(v int64) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetCreatedAt(v time.Time) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetErrorMessage(v string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetFromAddress(v string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetID(v uuid.UUID) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableCreatedAt(v *time.Time) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableErrorMessage(v *string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableID(v *uuid.UUID) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillablePaymentMethod(v *paymenttx.PaymentMethod) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillablePurpose(v *string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableSessionKey(v *string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableStatus(v *paymenttx.Status) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableTxHash(v *string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableUpdatedAt(v *time.Time) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetNillableX402URL(v *string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetPaymentMethod(v paymenttx.PaymentMethod) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetPurpose(v string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetSessionKey(v string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetStatus(v paymenttx.Status) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetToAddress(v string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetTxHash(v string) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetUpdatedAt(v time.Time) *PaymentTxCreate
- func (_c *PaymentTxCreate) SetX402URL(v string) *PaymentTxCreate
- type PaymentTxCreateBulk
- type PaymentTxDelete
- type PaymentTxDeleteOne
- type PaymentTxGroupBy
- func (_g *PaymentTxGroupBy) Aggregate(fns ...AggregateFunc) *PaymentTxGroupBy
- func (s *PaymentTxGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentTxGroupBy) BoolX(ctx context.Context) bool
- func (s *PaymentTxGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentTxGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PaymentTxGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentTxGroupBy) Float64X(ctx context.Context) float64
- func (s *PaymentTxGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentTxGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PaymentTxGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentTxGroupBy) IntX(ctx context.Context) int
- func (s *PaymentTxGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentTxGroupBy) IntsX(ctx context.Context) []int
- func (_g *PaymentTxGroupBy) Scan(ctx context.Context, v any) error
- func (s *PaymentTxGroupBy) ScanX(ctx context.Context, v any)
- func (s *PaymentTxGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PaymentTxGroupBy) StringX(ctx context.Context) string
- func (s *PaymentTxGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentTxGroupBy) StringsX(ctx context.Context) []string
- type PaymentTxMutation
- func (m *PaymentTxMutation) AddChainID(i int64)
- func (m *PaymentTxMutation) AddField(name string, value ent.Value) error
- func (m *PaymentTxMutation) AddedChainID() (r int64, exists bool)
- func (m *PaymentTxMutation) AddedEdges() []string
- func (m *PaymentTxMutation) AddedField(name string) (ent.Value, bool)
- func (m *PaymentTxMutation) AddedFields() []string
- func (m *PaymentTxMutation) AddedIDs(name string) []ent.Value
- func (m *PaymentTxMutation) Amount() (r string, exists bool)
- func (m *PaymentTxMutation) ChainID() (r int64, exists bool)
- func (m *PaymentTxMutation) ClearEdge(name string) error
- func (m *PaymentTxMutation) ClearErrorMessage()
- func (m *PaymentTxMutation) ClearField(name string) error
- func (m *PaymentTxMutation) ClearPurpose()
- func (m *PaymentTxMutation) ClearSessionKey()
- func (m *PaymentTxMutation) ClearTxHash()
- func (m *PaymentTxMutation) ClearX402URL()
- func (m *PaymentTxMutation) ClearedEdges() []string
- func (m *PaymentTxMutation) ClearedFields() []string
- func (m PaymentTxMutation) Client() *Client
- func (m *PaymentTxMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PaymentTxMutation) EdgeCleared(name string) bool
- func (m *PaymentTxMutation) ErrorMessage() (r string, exists bool)
- func (m *PaymentTxMutation) ErrorMessageCleared() bool
- func (m *PaymentTxMutation) Field(name string) (ent.Value, bool)
- func (m *PaymentTxMutation) FieldCleared(name string) bool
- func (m *PaymentTxMutation) Fields() []string
- func (m *PaymentTxMutation) FromAddress() (r string, exists bool)
- func (m *PaymentTxMutation) ID() (id uuid.UUID, exists bool)
- func (m *PaymentTxMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PaymentTxMutation) OldAmount(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) OldChainID(ctx context.Context) (v int64, err error)
- func (m *PaymentTxMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentTxMutation) OldErrorMessage(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PaymentTxMutation) OldFromAddress(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) OldPaymentMethod(ctx context.Context) (v paymenttx.PaymentMethod, err error)
- func (m *PaymentTxMutation) OldPurpose(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) OldSessionKey(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) OldStatus(ctx context.Context) (v paymenttx.Status, err error)
- func (m *PaymentTxMutation) OldToAddress(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) OldTxHash(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PaymentTxMutation) OldX402URL(ctx context.Context) (v string, err error)
- func (m *PaymentTxMutation) Op() Op
- func (m *PaymentTxMutation) PaymentMethod() (r paymenttx.PaymentMethod, exists bool)
- func (m *PaymentTxMutation) Purpose() (r string, exists bool)
- func (m *PaymentTxMutation) PurposeCleared() bool
- func (m *PaymentTxMutation) RemovedEdges() []string
- func (m *PaymentTxMutation) RemovedIDs(name string) []ent.Value
- func (m *PaymentTxMutation) ResetAmount()
- func (m *PaymentTxMutation) ResetChainID()
- func (m *PaymentTxMutation) ResetCreatedAt()
- func (m *PaymentTxMutation) ResetEdge(name string) error
- func (m *PaymentTxMutation) ResetErrorMessage()
- func (m *PaymentTxMutation) ResetField(name string) error
- func (m *PaymentTxMutation) ResetFromAddress()
- func (m *PaymentTxMutation) ResetPaymentMethod()
- func (m *PaymentTxMutation) ResetPurpose()
- func (m *PaymentTxMutation) ResetSessionKey()
- func (m *PaymentTxMutation) ResetStatus()
- func (m *PaymentTxMutation) ResetToAddress()
- func (m *PaymentTxMutation) ResetTxHash()
- func (m *PaymentTxMutation) ResetUpdatedAt()
- func (m *PaymentTxMutation) ResetX402URL()
- func (m *PaymentTxMutation) SessionKey() (r string, exists bool)
- func (m *PaymentTxMutation) SessionKeyCleared() bool
- func (m *PaymentTxMutation) SetAmount(s string)
- func (m *PaymentTxMutation) SetChainID(i int64)
- func (m *PaymentTxMutation) SetCreatedAt(t time.Time)
- func (m *PaymentTxMutation) SetErrorMessage(s string)
- func (m *PaymentTxMutation) SetField(name string, value ent.Value) error
- func (m *PaymentTxMutation) SetFromAddress(s string)
- func (m *PaymentTxMutation) SetID(id uuid.UUID)
- func (m *PaymentTxMutation) SetOp(op Op)
- func (m *PaymentTxMutation) SetPaymentMethod(pm paymenttx.PaymentMethod)
- func (m *PaymentTxMutation) SetPurpose(s string)
- func (m *PaymentTxMutation) SetSessionKey(s string)
- func (m *PaymentTxMutation) SetStatus(pa paymenttx.Status)
- func (m *PaymentTxMutation) SetToAddress(s string)
- func (m *PaymentTxMutation) SetTxHash(s string)
- func (m *PaymentTxMutation) SetUpdatedAt(t time.Time)
- func (m *PaymentTxMutation) SetX402URL(s string)
- func (m *PaymentTxMutation) Status() (r paymenttx.Status, exists bool)
- func (m *PaymentTxMutation) ToAddress() (r string, exists bool)
- func (m PaymentTxMutation) Tx() (*Tx, error)
- func (m *PaymentTxMutation) TxHash() (r string, exists bool)
- func (m *PaymentTxMutation) TxHashCleared() bool
- func (m *PaymentTxMutation) Type() string
- func (m *PaymentTxMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PaymentTxMutation) Where(ps ...predicate.PaymentTx)
- func (m *PaymentTxMutation) WhereP(ps ...func(*sql.Selector))
- func (m *PaymentTxMutation) X402URL() (r string, exists bool)
- func (m *PaymentTxMutation) X402URLCleared() bool
- type PaymentTxQuery
- func (_q *PaymentTxQuery) Aggregate(fns ...AggregateFunc) *PaymentTxSelect
- func (_q *PaymentTxQuery) All(ctx context.Context) ([]*PaymentTx, error)
- func (_q *PaymentTxQuery) AllX(ctx context.Context) []*PaymentTx
- func (_q *PaymentTxQuery) Clone() *PaymentTxQuery
- func (_q *PaymentTxQuery) Count(ctx context.Context) (int, error)
- func (_q *PaymentTxQuery) CountX(ctx context.Context) int
- func (_q *PaymentTxQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PaymentTxQuery) ExistX(ctx context.Context) bool
- func (_q *PaymentTxQuery) First(ctx context.Context) (*PaymentTx, error)
- func (_q *PaymentTxQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *PaymentTxQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *PaymentTxQuery) FirstX(ctx context.Context) *PaymentTx
- func (_q *PaymentTxQuery) GroupBy(field string, fields ...string) *PaymentTxGroupBy
- func (_q *PaymentTxQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *PaymentTxQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *PaymentTxQuery) Limit(limit int) *PaymentTxQuery
- func (_q *PaymentTxQuery) Offset(offset int) *PaymentTxQuery
- func (_q *PaymentTxQuery) Only(ctx context.Context) (*PaymentTx, error)
- func (_q *PaymentTxQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *PaymentTxQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *PaymentTxQuery) OnlyX(ctx context.Context) *PaymentTx
- func (_q *PaymentTxQuery) Order(o ...paymenttx.OrderOption) *PaymentTxQuery
- func (_q *PaymentTxQuery) Select(fields ...string) *PaymentTxSelect
- func (_q *PaymentTxQuery) Unique(unique bool) *PaymentTxQuery
- func (_q *PaymentTxQuery) Where(ps ...predicate.PaymentTx) *PaymentTxQuery
- type PaymentTxSelect
- func (_s *PaymentTxSelect) Aggregate(fns ...AggregateFunc) *PaymentTxSelect
- func (s *PaymentTxSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PaymentTxSelect) BoolX(ctx context.Context) bool
- func (s *PaymentTxSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PaymentTxSelect) BoolsX(ctx context.Context) []bool
- func (s *PaymentTxSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PaymentTxSelect) Float64X(ctx context.Context) float64
- func (s *PaymentTxSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PaymentTxSelect) Float64sX(ctx context.Context) []float64
- func (s *PaymentTxSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PaymentTxSelect) IntX(ctx context.Context) int
- func (s *PaymentTxSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PaymentTxSelect) IntsX(ctx context.Context) []int
- func (_s *PaymentTxSelect) Scan(ctx context.Context, v any) error
- func (s *PaymentTxSelect) ScanX(ctx context.Context, v any)
- func (s *PaymentTxSelect) String(ctx context.Context) (_ string, err error)
- func (s *PaymentTxSelect) StringX(ctx context.Context) string
- func (s *PaymentTxSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PaymentTxSelect) StringsX(ctx context.Context) []string
- type PaymentTxUpdate
- func (_u *PaymentTxUpdate) AddChainID(v int64) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) ClearErrorMessage() *PaymentTxUpdate
- func (_u *PaymentTxUpdate) ClearPurpose() *PaymentTxUpdate
- func (_u *PaymentTxUpdate) ClearSessionKey() *PaymentTxUpdate
- func (_u *PaymentTxUpdate) ClearTxHash() *PaymentTxUpdate
- func (_u *PaymentTxUpdate) ClearX402URL() *PaymentTxUpdate
- func (_u *PaymentTxUpdate) Exec(ctx context.Context) error
- func (_u *PaymentTxUpdate) ExecX(ctx context.Context)
- func (_u *PaymentTxUpdate) Mutation() *PaymentTxMutation
- func (_u *PaymentTxUpdate) Save(ctx context.Context) (int, error)
- func (_u *PaymentTxUpdate) SaveX(ctx context.Context) int
- func (_u *PaymentTxUpdate) SetAmount(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetChainID(v int64) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetErrorMessage(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetFromAddress(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableAmount(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableChainID(v *int64) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableErrorMessage(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableFromAddress(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillablePaymentMethod(v *paymenttx.PaymentMethod) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillablePurpose(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableSessionKey(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableStatus(v *paymenttx.Status) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableToAddress(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableTxHash(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetNillableX402URL(v *string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetPaymentMethod(v paymenttx.PaymentMethod) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetPurpose(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetSessionKey(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetStatus(v paymenttx.Status) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetToAddress(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetTxHash(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetUpdatedAt(v time.Time) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) SetX402URL(v string) *PaymentTxUpdate
- func (_u *PaymentTxUpdate) Where(ps ...predicate.PaymentTx) *PaymentTxUpdate
- type PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) AddChainID(v int64) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) ClearErrorMessage() *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) ClearPurpose() *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) ClearSessionKey() *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) ClearTxHash() *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) ClearX402URL() *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) Exec(ctx context.Context) error
- func (_u *PaymentTxUpdateOne) ExecX(ctx context.Context)
- func (_u *PaymentTxUpdateOne) Mutation() *PaymentTxMutation
- func (_u *PaymentTxUpdateOne) Save(ctx context.Context) (*PaymentTx, error)
- func (_u *PaymentTxUpdateOne) SaveX(ctx context.Context) *PaymentTx
- func (_u *PaymentTxUpdateOne) Select(field string, fields ...string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetAmount(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetChainID(v int64) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetErrorMessage(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetFromAddress(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableAmount(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableChainID(v *int64) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableErrorMessage(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableFromAddress(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillablePaymentMethod(v *paymenttx.PaymentMethod) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillablePurpose(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableSessionKey(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableStatus(v *paymenttx.Status) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableToAddress(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableTxHash(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetNillableX402URL(v *string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetPaymentMethod(v paymenttx.PaymentMethod) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetPurpose(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetSessionKey(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetStatus(v paymenttx.Status) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetToAddress(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetTxHash(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetUpdatedAt(v time.Time) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) SetX402URL(v string) *PaymentTxUpdateOne
- func (_u *PaymentTxUpdateOne) Where(ps ...predicate.PaymentTx) *PaymentTxUpdateOne
- type PaymentTxes
- type PeerReputation
- type PeerReputationClient
- func (c *PeerReputationClient) Create() *PeerReputationCreate
- func (c *PeerReputationClient) CreateBulk(builders ...*PeerReputationCreate) *PeerReputationCreateBulk
- func (c *PeerReputationClient) Delete() *PeerReputationDelete
- func (c *PeerReputationClient) DeleteOne(_m *PeerReputation) *PeerReputationDeleteOne
- func (c *PeerReputationClient) DeleteOneID(id uuid.UUID) *PeerReputationDeleteOne
- func (c *PeerReputationClient) Get(ctx context.Context, id uuid.UUID) (*PeerReputation, error)
- func (c *PeerReputationClient) GetX(ctx context.Context, id uuid.UUID) *PeerReputation
- func (c *PeerReputationClient) Hooks() []Hook
- func (c *PeerReputationClient) Intercept(interceptors ...Interceptor)
- func (c *PeerReputationClient) Interceptors() []Interceptor
- func (c *PeerReputationClient) MapCreateBulk(slice any, setFunc func(*PeerReputationCreate, int)) *PeerReputationCreateBulk
- func (c *PeerReputationClient) Query() *PeerReputationQuery
- func (c *PeerReputationClient) Update() *PeerReputationUpdate
- func (c *PeerReputationClient) UpdateOne(_m *PeerReputation) *PeerReputationUpdateOne
- func (c *PeerReputationClient) UpdateOneID(id uuid.UUID) *PeerReputationUpdateOne
- func (c *PeerReputationClient) Use(hooks ...Hook)
- type PeerReputationCreate
- func (_c *PeerReputationCreate) Exec(ctx context.Context) error
- func (_c *PeerReputationCreate) ExecX(ctx context.Context)
- func (_c *PeerReputationCreate) Mutation() *PeerReputationMutation
- func (_c *PeerReputationCreate) Save(ctx context.Context) (*PeerReputation, error)
- func (_c *PeerReputationCreate) SaveX(ctx context.Context) *PeerReputation
- func (_c *PeerReputationCreate) SetCreatedAt(v time.Time) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetFailedExchanges(v int) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetFirstSeen(v time.Time) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetID(v uuid.UUID) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetLastInteraction(v time.Time) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableCreatedAt(v *time.Time) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableFailedExchanges(v *int) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableFirstSeen(v *time.Time) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableID(v *uuid.UUID) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableLastInteraction(v *time.Time) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableSuccessfulExchanges(v *int) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableTimeoutCount(v *int) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableTrustScore(v *float64) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetNillableUpdatedAt(v *time.Time) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetPeerDid(v string) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetSuccessfulExchanges(v int) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetTimeoutCount(v int) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetTrustScore(v float64) *PeerReputationCreate
- func (_c *PeerReputationCreate) SetUpdatedAt(v time.Time) *PeerReputationCreate
- type PeerReputationCreateBulk
- func (_c *PeerReputationCreateBulk) Exec(ctx context.Context) error
- func (_c *PeerReputationCreateBulk) ExecX(ctx context.Context)
- func (_c *PeerReputationCreateBulk) Save(ctx context.Context) ([]*PeerReputation, error)
- func (_c *PeerReputationCreateBulk) SaveX(ctx context.Context) []*PeerReputation
- type PeerReputationDelete
- type PeerReputationDeleteOne
- type PeerReputationGroupBy
- func (_g *PeerReputationGroupBy) Aggregate(fns ...AggregateFunc) *PeerReputationGroupBy
- func (s *PeerReputationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PeerReputationGroupBy) BoolX(ctx context.Context) bool
- func (s *PeerReputationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PeerReputationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PeerReputationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PeerReputationGroupBy) Float64X(ctx context.Context) float64
- func (s *PeerReputationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PeerReputationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PeerReputationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PeerReputationGroupBy) IntX(ctx context.Context) int
- func (s *PeerReputationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PeerReputationGroupBy) IntsX(ctx context.Context) []int
- func (_g *PeerReputationGroupBy) Scan(ctx context.Context, v any) error
- func (s *PeerReputationGroupBy) ScanX(ctx context.Context, v any)
- func (s *PeerReputationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PeerReputationGroupBy) StringX(ctx context.Context) string
- func (s *PeerReputationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PeerReputationGroupBy) StringsX(ctx context.Context) []string
- type PeerReputationMutation
- func (m *PeerReputationMutation) AddFailedExchanges(i int)
- func (m *PeerReputationMutation) AddField(name string, value ent.Value) error
- func (m *PeerReputationMutation) AddSuccessfulExchanges(i int)
- func (m *PeerReputationMutation) AddTimeoutCount(i int)
- func (m *PeerReputationMutation) AddTrustScore(f float64)
- func (m *PeerReputationMutation) AddedEdges() []string
- func (m *PeerReputationMutation) AddedFailedExchanges() (r int, exists bool)
- func (m *PeerReputationMutation) AddedField(name string) (ent.Value, bool)
- func (m *PeerReputationMutation) AddedFields() []string
- func (m *PeerReputationMutation) AddedIDs(name string) []ent.Value
- func (m *PeerReputationMutation) AddedSuccessfulExchanges() (r int, exists bool)
- func (m *PeerReputationMutation) AddedTimeoutCount() (r int, exists bool)
- func (m *PeerReputationMutation) AddedTrustScore() (r float64, exists bool)
- func (m *PeerReputationMutation) ClearEdge(name string) error
- func (m *PeerReputationMutation) ClearField(name string) error
- func (m *PeerReputationMutation) ClearedEdges() []string
- func (m *PeerReputationMutation) ClearedFields() []string
- func (m PeerReputationMutation) Client() *Client
- func (m *PeerReputationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PeerReputationMutation) EdgeCleared(name string) bool
- func (m *PeerReputationMutation) FailedExchanges() (r int, exists bool)
- func (m *PeerReputationMutation) Field(name string) (ent.Value, bool)
- func (m *PeerReputationMutation) FieldCleared(name string) bool
- func (m *PeerReputationMutation) Fields() []string
- func (m *PeerReputationMutation) FirstSeen() (r time.Time, exists bool)
- func (m *PeerReputationMutation) ID() (id uuid.UUID, exists bool)
- func (m *PeerReputationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PeerReputationMutation) LastInteraction() (r time.Time, exists bool)
- func (m *PeerReputationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PeerReputationMutation) OldFailedExchanges(ctx context.Context) (v int, err error)
- func (m *PeerReputationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PeerReputationMutation) OldFirstSeen(ctx context.Context) (v time.Time, err error)
- func (m *PeerReputationMutation) OldLastInteraction(ctx context.Context) (v time.Time, err error)
- func (m *PeerReputationMutation) OldPeerDid(ctx context.Context) (v string, err error)
- func (m *PeerReputationMutation) OldSuccessfulExchanges(ctx context.Context) (v int, err error)
- func (m *PeerReputationMutation) OldTimeoutCount(ctx context.Context) (v int, err error)
- func (m *PeerReputationMutation) OldTrustScore(ctx context.Context) (v float64, err error)
- func (m *PeerReputationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PeerReputationMutation) Op() Op
- func (m *PeerReputationMutation) PeerDid() (r string, exists bool)
- func (m *PeerReputationMutation) RemovedEdges() []string
- func (m *PeerReputationMutation) RemovedIDs(name string) []ent.Value
- func (m *PeerReputationMutation) ResetCreatedAt()
- func (m *PeerReputationMutation) ResetEdge(name string) error
- func (m *PeerReputationMutation) ResetFailedExchanges()
- func (m *PeerReputationMutation) ResetField(name string) error
- func (m *PeerReputationMutation) ResetFirstSeen()
- func (m *PeerReputationMutation) ResetLastInteraction()
- func (m *PeerReputationMutation) ResetPeerDid()
- func (m *PeerReputationMutation) ResetSuccessfulExchanges()
- func (m *PeerReputationMutation) ResetTimeoutCount()
- func (m *PeerReputationMutation) ResetTrustScore()
- func (m *PeerReputationMutation) ResetUpdatedAt()
- func (m *PeerReputationMutation) SetCreatedAt(t time.Time)
- func (m *PeerReputationMutation) SetFailedExchanges(i int)
- func (m *PeerReputationMutation) SetField(name string, value ent.Value) error
- func (m *PeerReputationMutation) SetFirstSeen(t time.Time)
- func (m *PeerReputationMutation) SetID(id uuid.UUID)
- func (m *PeerReputationMutation) SetLastInteraction(t time.Time)
- func (m *PeerReputationMutation) SetOp(op Op)
- func (m *PeerReputationMutation) SetPeerDid(s string)
- func (m *PeerReputationMutation) SetSuccessfulExchanges(i int)
- func (m *PeerReputationMutation) SetTimeoutCount(i int)
- func (m *PeerReputationMutation) SetTrustScore(f float64)
- func (m *PeerReputationMutation) SetUpdatedAt(t time.Time)
- func (m *PeerReputationMutation) SuccessfulExchanges() (r int, exists bool)
- func (m *PeerReputationMutation) TimeoutCount() (r int, exists bool)
- func (m *PeerReputationMutation) TrustScore() (r float64, exists bool)
- func (m PeerReputationMutation) Tx() (*Tx, error)
- func (m *PeerReputationMutation) Type() string
- func (m *PeerReputationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PeerReputationMutation) Where(ps ...predicate.PeerReputation)
- func (m *PeerReputationMutation) WhereP(ps ...func(*sql.Selector))
- type PeerReputationQuery
- func (_q *PeerReputationQuery) Aggregate(fns ...AggregateFunc) *PeerReputationSelect
- func (_q *PeerReputationQuery) All(ctx context.Context) ([]*PeerReputation, error)
- func (_q *PeerReputationQuery) AllX(ctx context.Context) []*PeerReputation
- func (_q *PeerReputationQuery) Clone() *PeerReputationQuery
- func (_q *PeerReputationQuery) Count(ctx context.Context) (int, error)
- func (_q *PeerReputationQuery) CountX(ctx context.Context) int
- func (_q *PeerReputationQuery) Exist(ctx context.Context) (bool, error)
- func (_q *PeerReputationQuery) ExistX(ctx context.Context) bool
- func (_q *PeerReputationQuery) First(ctx context.Context) (*PeerReputation, error)
- func (_q *PeerReputationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *PeerReputationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *PeerReputationQuery) FirstX(ctx context.Context) *PeerReputation
- func (_q *PeerReputationQuery) GroupBy(field string, fields ...string) *PeerReputationGroupBy
- func (_q *PeerReputationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *PeerReputationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *PeerReputationQuery) Limit(limit int) *PeerReputationQuery
- func (_q *PeerReputationQuery) Offset(offset int) *PeerReputationQuery
- func (_q *PeerReputationQuery) Only(ctx context.Context) (*PeerReputation, error)
- func (_q *PeerReputationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *PeerReputationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *PeerReputationQuery) OnlyX(ctx context.Context) *PeerReputation
- func (_q *PeerReputationQuery) Order(o ...peerreputation.OrderOption) *PeerReputationQuery
- func (_q *PeerReputationQuery) Select(fields ...string) *PeerReputationSelect
- func (_q *PeerReputationQuery) Unique(unique bool) *PeerReputationQuery
- func (_q *PeerReputationQuery) Where(ps ...predicate.PeerReputation) *PeerReputationQuery
- type PeerReputationSelect
- func (_s *PeerReputationSelect) Aggregate(fns ...AggregateFunc) *PeerReputationSelect
- func (s *PeerReputationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PeerReputationSelect) BoolX(ctx context.Context) bool
- func (s *PeerReputationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PeerReputationSelect) BoolsX(ctx context.Context) []bool
- func (s *PeerReputationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PeerReputationSelect) Float64X(ctx context.Context) float64
- func (s *PeerReputationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PeerReputationSelect) Float64sX(ctx context.Context) []float64
- func (s *PeerReputationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PeerReputationSelect) IntX(ctx context.Context) int
- func (s *PeerReputationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PeerReputationSelect) IntsX(ctx context.Context) []int
- func (_s *PeerReputationSelect) Scan(ctx context.Context, v any) error
- func (s *PeerReputationSelect) ScanX(ctx context.Context, v any)
- func (s *PeerReputationSelect) String(ctx context.Context) (_ string, err error)
- func (s *PeerReputationSelect) StringX(ctx context.Context) string
- func (s *PeerReputationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PeerReputationSelect) StringsX(ctx context.Context) []string
- type PeerReputationUpdate
- func (_u *PeerReputationUpdate) AddFailedExchanges(v int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) AddSuccessfulExchanges(v int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) AddTimeoutCount(v int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) AddTrustScore(v float64) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) Exec(ctx context.Context) error
- func (_u *PeerReputationUpdate) ExecX(ctx context.Context)
- func (_u *PeerReputationUpdate) Mutation() *PeerReputationMutation
- func (_u *PeerReputationUpdate) Save(ctx context.Context) (int, error)
- func (_u *PeerReputationUpdate) SaveX(ctx context.Context) int
- func (_u *PeerReputationUpdate) SetFailedExchanges(v int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetLastInteraction(v time.Time) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetNillableFailedExchanges(v *int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetNillablePeerDid(v *string) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetNillableSuccessfulExchanges(v *int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetNillableTimeoutCount(v *int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetNillableTrustScore(v *float64) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetPeerDid(v string) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetSuccessfulExchanges(v int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetTimeoutCount(v int) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetTrustScore(v float64) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) SetUpdatedAt(v time.Time) *PeerReputationUpdate
- func (_u *PeerReputationUpdate) Where(ps ...predicate.PeerReputation) *PeerReputationUpdate
- type PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) AddFailedExchanges(v int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) AddSuccessfulExchanges(v int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) AddTimeoutCount(v int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) AddTrustScore(v float64) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) Exec(ctx context.Context) error
- func (_u *PeerReputationUpdateOne) ExecX(ctx context.Context)
- func (_u *PeerReputationUpdateOne) Mutation() *PeerReputationMutation
- func (_u *PeerReputationUpdateOne) Save(ctx context.Context) (*PeerReputation, error)
- func (_u *PeerReputationUpdateOne) SaveX(ctx context.Context) *PeerReputation
- func (_u *PeerReputationUpdateOne) Select(field string, fields ...string) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetFailedExchanges(v int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetLastInteraction(v time.Time) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetNillableFailedExchanges(v *int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetNillablePeerDid(v *string) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetNillableSuccessfulExchanges(v *int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetNillableTimeoutCount(v *int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetNillableTrustScore(v *float64) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetPeerDid(v string) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetSuccessfulExchanges(v int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetTimeoutCount(v int) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetTrustScore(v float64) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) SetUpdatedAt(v time.Time) *PeerReputationUpdateOne
- func (_u *PeerReputationUpdateOne) Where(ps ...predicate.PeerReputation) *PeerReputationUpdateOne
- type PeerReputations
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Reflection
- type ReflectionClient
- func (c *ReflectionClient) Create() *ReflectionCreate
- func (c *ReflectionClient) CreateBulk(builders ...*ReflectionCreate) *ReflectionCreateBulk
- func (c *ReflectionClient) Delete() *ReflectionDelete
- func (c *ReflectionClient) DeleteOne(_m *Reflection) *ReflectionDeleteOne
- func (c *ReflectionClient) DeleteOneID(id uuid.UUID) *ReflectionDeleteOne
- func (c *ReflectionClient) Get(ctx context.Context, id uuid.UUID) (*Reflection, error)
- func (c *ReflectionClient) GetX(ctx context.Context, id uuid.UUID) *Reflection
- func (c *ReflectionClient) Hooks() []Hook
- func (c *ReflectionClient) Intercept(interceptors ...Interceptor)
- func (c *ReflectionClient) Interceptors() []Interceptor
- func (c *ReflectionClient) MapCreateBulk(slice any, setFunc func(*ReflectionCreate, int)) *ReflectionCreateBulk
- func (c *ReflectionClient) Query() *ReflectionQuery
- func (c *ReflectionClient) Update() *ReflectionUpdate
- func (c *ReflectionClient) UpdateOne(_m *Reflection) *ReflectionUpdateOne
- func (c *ReflectionClient) UpdateOneID(id uuid.UUID) *ReflectionUpdateOne
- func (c *ReflectionClient) Use(hooks ...Hook)
- type ReflectionCreate
- func (_c *ReflectionCreate) Exec(ctx context.Context) error
- func (_c *ReflectionCreate) ExecX(ctx context.Context)
- func (_c *ReflectionCreate) Mutation() *ReflectionMutation
- func (_c *ReflectionCreate) Save(ctx context.Context) (*Reflection, error)
- func (_c *ReflectionCreate) SaveX(ctx context.Context) *Reflection
- func (_c *ReflectionCreate) SetContent(v string) *ReflectionCreate
- func (_c *ReflectionCreate) SetCreatedAt(v time.Time) *ReflectionCreate
- func (_c *ReflectionCreate) SetGeneration(v int) *ReflectionCreate
- func (_c *ReflectionCreate) SetID(v uuid.UUID) *ReflectionCreate
- func (_c *ReflectionCreate) SetNillableCreatedAt(v *time.Time) *ReflectionCreate
- func (_c *ReflectionCreate) SetNillableGeneration(v *int) *ReflectionCreate
- func (_c *ReflectionCreate) SetNillableID(v *uuid.UUID) *ReflectionCreate
- func (_c *ReflectionCreate) SetNillableTokenCount(v *int) *ReflectionCreate
- func (_c *ReflectionCreate) SetSessionKey(v string) *ReflectionCreate
- func (_c *ReflectionCreate) SetTokenCount(v int) *ReflectionCreate
- type ReflectionCreateBulk
- type ReflectionDelete
- type ReflectionDeleteOne
- type ReflectionGroupBy
- func (_g *ReflectionGroupBy) Aggregate(fns ...AggregateFunc) *ReflectionGroupBy
- func (s *ReflectionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReflectionGroupBy) BoolX(ctx context.Context) bool
- func (s *ReflectionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReflectionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReflectionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReflectionGroupBy) Float64X(ctx context.Context) float64
- func (s *ReflectionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReflectionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReflectionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReflectionGroupBy) IntX(ctx context.Context) int
- func (s *ReflectionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReflectionGroupBy) IntsX(ctx context.Context) []int
- func (_g *ReflectionGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReflectionGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReflectionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReflectionGroupBy) StringX(ctx context.Context) string
- func (s *ReflectionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReflectionGroupBy) StringsX(ctx context.Context) []string
- type ReflectionMutation
- func (m *ReflectionMutation) AddField(name string, value ent.Value) error
- func (m *ReflectionMutation) AddGeneration(i int)
- func (m *ReflectionMutation) AddTokenCount(i int)
- func (m *ReflectionMutation) AddedEdges() []string
- func (m *ReflectionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReflectionMutation) AddedFields() []string
- func (m *ReflectionMutation) AddedGeneration() (r int, exists bool)
- func (m *ReflectionMutation) AddedIDs(name string) []ent.Value
- func (m *ReflectionMutation) AddedTokenCount() (r int, exists bool)
- func (m *ReflectionMutation) ClearEdge(name string) error
- func (m *ReflectionMutation) ClearField(name string) error
- func (m *ReflectionMutation) ClearedEdges() []string
- func (m *ReflectionMutation) ClearedFields() []string
- func (m ReflectionMutation) Client() *Client
- func (m *ReflectionMutation) Content() (r string, exists bool)
- func (m *ReflectionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ReflectionMutation) EdgeCleared(name string) bool
- func (m *ReflectionMutation) Field(name string) (ent.Value, bool)
- func (m *ReflectionMutation) FieldCleared(name string) bool
- func (m *ReflectionMutation) Fields() []string
- func (m *ReflectionMutation) Generation() (r int, exists bool)
- func (m *ReflectionMutation) ID() (id uuid.UUID, exists bool)
- func (m *ReflectionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ReflectionMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *ReflectionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReflectionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReflectionMutation) OldGeneration(ctx context.Context) (v int, err error)
- func (m *ReflectionMutation) OldSessionKey(ctx context.Context) (v string, err error)
- func (m *ReflectionMutation) OldTokenCount(ctx context.Context) (v int, err error)
- func (m *ReflectionMutation) Op() Op
- func (m *ReflectionMutation) RemovedEdges() []string
- func (m *ReflectionMutation) RemovedIDs(name string) []ent.Value
- func (m *ReflectionMutation) ResetContent()
- func (m *ReflectionMutation) ResetCreatedAt()
- func (m *ReflectionMutation) ResetEdge(name string) error
- func (m *ReflectionMutation) ResetField(name string) error
- func (m *ReflectionMutation) ResetGeneration()
- func (m *ReflectionMutation) ResetSessionKey()
- func (m *ReflectionMutation) ResetTokenCount()
- func (m *ReflectionMutation) SessionKey() (r string, exists bool)
- func (m *ReflectionMutation) SetContent(s string)
- func (m *ReflectionMutation) SetCreatedAt(t time.Time)
- func (m *ReflectionMutation) SetField(name string, value ent.Value) error
- func (m *ReflectionMutation) SetGeneration(i int)
- func (m *ReflectionMutation) SetID(id uuid.UUID)
- func (m *ReflectionMutation) SetOp(op Op)
- func (m *ReflectionMutation) SetSessionKey(s string)
- func (m *ReflectionMutation) SetTokenCount(i int)
- func (m *ReflectionMutation) TokenCount() (r int, exists bool)
- func (m ReflectionMutation) Tx() (*Tx, error)
- func (m *ReflectionMutation) Type() string
- func (m *ReflectionMutation) Where(ps ...predicate.Reflection)
- func (m *ReflectionMutation) WhereP(ps ...func(*sql.Selector))
- type ReflectionQuery
- func (_q *ReflectionQuery) Aggregate(fns ...AggregateFunc) *ReflectionSelect
- func (_q *ReflectionQuery) All(ctx context.Context) ([]*Reflection, error)
- func (_q *ReflectionQuery) AllX(ctx context.Context) []*Reflection
- func (_q *ReflectionQuery) Clone() *ReflectionQuery
- func (_q *ReflectionQuery) Count(ctx context.Context) (int, error)
- func (_q *ReflectionQuery) CountX(ctx context.Context) int
- func (_q *ReflectionQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ReflectionQuery) ExistX(ctx context.Context) bool
- func (_q *ReflectionQuery) First(ctx context.Context) (*Reflection, error)
- func (_q *ReflectionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ReflectionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *ReflectionQuery) FirstX(ctx context.Context) *Reflection
- func (_q *ReflectionQuery) GroupBy(field string, fields ...string) *ReflectionGroupBy
- func (_q *ReflectionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *ReflectionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *ReflectionQuery) Limit(limit int) *ReflectionQuery
- func (_q *ReflectionQuery) Offset(offset int) *ReflectionQuery
- func (_q *ReflectionQuery) Only(ctx context.Context) (*Reflection, error)
- func (_q *ReflectionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ReflectionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *ReflectionQuery) OnlyX(ctx context.Context) *Reflection
- func (_q *ReflectionQuery) Order(o ...reflection.OrderOption) *ReflectionQuery
- func (_q *ReflectionQuery) Select(fields ...string) *ReflectionSelect
- func (_q *ReflectionQuery) Unique(unique bool) *ReflectionQuery
- func (_q *ReflectionQuery) Where(ps ...predicate.Reflection) *ReflectionQuery
- type ReflectionSelect
- func (_s *ReflectionSelect) Aggregate(fns ...AggregateFunc) *ReflectionSelect
- func (s *ReflectionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReflectionSelect) BoolX(ctx context.Context) bool
- func (s *ReflectionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReflectionSelect) BoolsX(ctx context.Context) []bool
- func (s *ReflectionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReflectionSelect) Float64X(ctx context.Context) float64
- func (s *ReflectionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReflectionSelect) Float64sX(ctx context.Context) []float64
- func (s *ReflectionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReflectionSelect) IntX(ctx context.Context) int
- func (s *ReflectionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReflectionSelect) IntsX(ctx context.Context) []int
- func (_s *ReflectionSelect) Scan(ctx context.Context, v any) error
- func (s *ReflectionSelect) ScanX(ctx context.Context, v any)
- func (s *ReflectionSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReflectionSelect) StringX(ctx context.Context) string
- func (s *ReflectionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReflectionSelect) StringsX(ctx context.Context) []string
- type ReflectionUpdate
- func (_u *ReflectionUpdate) AddGeneration(v int) *ReflectionUpdate
- func (_u *ReflectionUpdate) AddTokenCount(v int) *ReflectionUpdate
- func (_u *ReflectionUpdate) Exec(ctx context.Context) error
- func (_u *ReflectionUpdate) ExecX(ctx context.Context)
- func (_u *ReflectionUpdate) Mutation() *ReflectionMutation
- func (_u *ReflectionUpdate) Save(ctx context.Context) (int, error)
- func (_u *ReflectionUpdate) SaveX(ctx context.Context) int
- func (_u *ReflectionUpdate) SetContent(v string) *ReflectionUpdate
- func (_u *ReflectionUpdate) SetGeneration(v int) *ReflectionUpdate
- func (_u *ReflectionUpdate) SetNillableContent(v *string) *ReflectionUpdate
- func (_u *ReflectionUpdate) SetNillableGeneration(v *int) *ReflectionUpdate
- func (_u *ReflectionUpdate) SetNillableSessionKey(v *string) *ReflectionUpdate
- func (_u *ReflectionUpdate) SetNillableTokenCount(v *int) *ReflectionUpdate
- func (_u *ReflectionUpdate) SetSessionKey(v string) *ReflectionUpdate
- func (_u *ReflectionUpdate) SetTokenCount(v int) *ReflectionUpdate
- func (_u *ReflectionUpdate) Where(ps ...predicate.Reflection) *ReflectionUpdate
- type ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) AddGeneration(v int) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) AddTokenCount(v int) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) Exec(ctx context.Context) error
- func (_u *ReflectionUpdateOne) ExecX(ctx context.Context)
- func (_u *ReflectionUpdateOne) Mutation() *ReflectionMutation
- func (_u *ReflectionUpdateOne) Save(ctx context.Context) (*Reflection, error)
- func (_u *ReflectionUpdateOne) SaveX(ctx context.Context) *Reflection
- func (_u *ReflectionUpdateOne) Select(field string, fields ...string) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetContent(v string) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetGeneration(v int) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetNillableContent(v *string) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetNillableGeneration(v *int) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetNillableSessionKey(v *string) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetNillableTokenCount(v *int) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetSessionKey(v string) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) SetTokenCount(v int) *ReflectionUpdateOne
- func (_u *ReflectionUpdateOne) Where(ps ...predicate.Reflection) *ReflectionUpdateOne
- type Reflections
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Secret
- type SecretClient
- func (c *SecretClient) Create() *SecretCreate
- func (c *SecretClient) CreateBulk(builders ...*SecretCreate) *SecretCreateBulk
- func (c *SecretClient) Delete() *SecretDelete
- func (c *SecretClient) DeleteOne(_m *Secret) *SecretDeleteOne
- func (c *SecretClient) DeleteOneID(id uuid.UUID) *SecretDeleteOne
- func (c *SecretClient) Get(ctx context.Context, id uuid.UUID) (*Secret, error)
- func (c *SecretClient) GetX(ctx context.Context, id uuid.UUID) *Secret
- func (c *SecretClient) Hooks() []Hook
- func (c *SecretClient) Intercept(interceptors ...Interceptor)
- func (c *SecretClient) Interceptors() []Interceptor
- func (c *SecretClient) MapCreateBulk(slice any, setFunc func(*SecretCreate, int)) *SecretCreateBulk
- func (c *SecretClient) Query() *SecretQuery
- func (c *SecretClient) QueryKey(_m *Secret) *KeyQuery
- func (c *SecretClient) Update() *SecretUpdate
- func (c *SecretClient) UpdateOne(_m *Secret) *SecretUpdateOne
- func (c *SecretClient) UpdateOneID(id uuid.UUID) *SecretUpdateOne
- func (c *SecretClient) Use(hooks ...Hook)
- type SecretCreate
- func (_c *SecretCreate) Exec(ctx context.Context) error
- func (_c *SecretCreate) ExecX(ctx context.Context)
- func (_c *SecretCreate) Mutation() *SecretMutation
- func (_c *SecretCreate) Save(ctx context.Context) (*Secret, error)
- func (_c *SecretCreate) SaveX(ctx context.Context) *Secret
- func (_c *SecretCreate) SetAccessCount(v int) *SecretCreate
- func (_c *SecretCreate) SetCreatedAt(v time.Time) *SecretCreate
- func (_c *SecretCreate) SetEncryptedValue(v []byte) *SecretCreate
- func (_c *SecretCreate) SetID(v uuid.UUID) *SecretCreate
- func (_c *SecretCreate) SetKey(v *Key) *SecretCreate
- func (_c *SecretCreate) SetKeyID(id uuid.UUID) *SecretCreate
- func (_c *SecretCreate) SetName(v string) *SecretCreate
- func (_c *SecretCreate) SetNillableAccessCount(v *int) *SecretCreate
- func (_c *SecretCreate) SetNillableCreatedAt(v *time.Time) *SecretCreate
- func (_c *SecretCreate) SetNillableID(v *uuid.UUID) *SecretCreate
- func (_c *SecretCreate) SetNillableUpdatedAt(v *time.Time) *SecretCreate
- func (_c *SecretCreate) SetUpdatedAt(v time.Time) *SecretCreate
- type SecretCreateBulk
- type SecretDelete
- type SecretDeleteOne
- type SecretEdges
- type SecretGroupBy
- func (_g *SecretGroupBy) Aggregate(fns ...AggregateFunc) *SecretGroupBy
- func (s *SecretGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SecretGroupBy) BoolX(ctx context.Context) bool
- func (s *SecretGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SecretGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SecretGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SecretGroupBy) Float64X(ctx context.Context) float64
- func (s *SecretGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SecretGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SecretGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SecretGroupBy) IntX(ctx context.Context) int
- func (s *SecretGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SecretGroupBy) IntsX(ctx context.Context) []int
- func (_g *SecretGroupBy) Scan(ctx context.Context, v any) error
- func (s *SecretGroupBy) ScanX(ctx context.Context, v any)
- func (s *SecretGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SecretGroupBy) StringX(ctx context.Context) string
- func (s *SecretGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SecretGroupBy) StringsX(ctx context.Context) []string
- type SecretMutation
- func (m *SecretMutation) AccessCount() (r int, exists bool)
- func (m *SecretMutation) AddAccessCount(i int)
- func (m *SecretMutation) AddField(name string, value ent.Value) error
- func (m *SecretMutation) AddedAccessCount() (r int, exists bool)
- func (m *SecretMutation) AddedEdges() []string
- func (m *SecretMutation) AddedField(name string) (ent.Value, bool)
- func (m *SecretMutation) AddedFields() []string
- func (m *SecretMutation) AddedIDs(name string) []ent.Value
- func (m *SecretMutation) ClearEdge(name string) error
- func (m *SecretMutation) ClearField(name string) error
- func (m *SecretMutation) ClearKey()
- func (m *SecretMutation) ClearedEdges() []string
- func (m *SecretMutation) ClearedFields() []string
- func (m SecretMutation) Client() *Client
- func (m *SecretMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SecretMutation) EdgeCleared(name string) bool
- func (m *SecretMutation) EncryptedValue() (r []byte, exists bool)
- func (m *SecretMutation) Field(name string) (ent.Value, bool)
- func (m *SecretMutation) FieldCleared(name string) bool
- func (m *SecretMutation) Fields() []string
- func (m *SecretMutation) ID() (id uuid.UUID, exists bool)
- func (m *SecretMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *SecretMutation) KeyCleared() bool
- func (m *SecretMutation) KeyID() (id uuid.UUID, exists bool)
- func (m *SecretMutation) KeyIDs() (ids []uuid.UUID)
- func (m *SecretMutation) Name() (r string, exists bool)
- func (m *SecretMutation) OldAccessCount(ctx context.Context) (v int, err error)
- func (m *SecretMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SecretMutation) OldEncryptedValue(ctx context.Context) (v []byte, err error)
- func (m *SecretMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SecretMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SecretMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SecretMutation) Op() Op
- func (m *SecretMutation) RemovedEdges() []string
- func (m *SecretMutation) RemovedIDs(name string) []ent.Value
- func (m *SecretMutation) ResetAccessCount()
- func (m *SecretMutation) ResetCreatedAt()
- func (m *SecretMutation) ResetEdge(name string) error
- func (m *SecretMutation) ResetEncryptedValue()
- func (m *SecretMutation) ResetField(name string) error
- func (m *SecretMutation) ResetKey()
- func (m *SecretMutation) ResetName()
- func (m *SecretMutation) ResetUpdatedAt()
- func (m *SecretMutation) SetAccessCount(i int)
- func (m *SecretMutation) SetCreatedAt(t time.Time)
- func (m *SecretMutation) SetEncryptedValue(b []byte)
- func (m *SecretMutation) SetField(name string, value ent.Value) error
- func (m *SecretMutation) SetID(id uuid.UUID)
- func (m *SecretMutation) SetKeyID(id uuid.UUID)
- func (m *SecretMutation) SetName(s string)
- func (m *SecretMutation) SetOp(op Op)
- func (m *SecretMutation) SetUpdatedAt(t time.Time)
- func (m SecretMutation) Tx() (*Tx, error)
- func (m *SecretMutation) Type() string
- func (m *SecretMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SecretMutation) Where(ps ...predicate.Secret)
- func (m *SecretMutation) WhereP(ps ...func(*sql.Selector))
- type SecretQuery
- func (_q *SecretQuery) Aggregate(fns ...AggregateFunc) *SecretSelect
- func (_q *SecretQuery) All(ctx context.Context) ([]*Secret, error)
- func (_q *SecretQuery) AllX(ctx context.Context) []*Secret
- func (_q *SecretQuery) Clone() *SecretQuery
- func (_q *SecretQuery) Count(ctx context.Context) (int, error)
- func (_q *SecretQuery) CountX(ctx context.Context) int
- func (_q *SecretQuery) Exist(ctx context.Context) (bool, error)
- func (_q *SecretQuery) ExistX(ctx context.Context) bool
- func (_q *SecretQuery) First(ctx context.Context) (*Secret, error)
- func (_q *SecretQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *SecretQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *SecretQuery) FirstX(ctx context.Context) *Secret
- func (_q *SecretQuery) GroupBy(field string, fields ...string) *SecretGroupBy
- func (_q *SecretQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *SecretQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *SecretQuery) Limit(limit int) *SecretQuery
- func (_q *SecretQuery) Offset(offset int) *SecretQuery
- func (_q *SecretQuery) Only(ctx context.Context) (*Secret, error)
- func (_q *SecretQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *SecretQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *SecretQuery) OnlyX(ctx context.Context) *Secret
- func (_q *SecretQuery) Order(o ...secret.OrderOption) *SecretQuery
- func (_q *SecretQuery) QueryKey() *KeyQuery
- func (_q *SecretQuery) Select(fields ...string) *SecretSelect
- func (_q *SecretQuery) Unique(unique bool) *SecretQuery
- func (_q *SecretQuery) Where(ps ...predicate.Secret) *SecretQuery
- func (_q *SecretQuery) WithKey(opts ...func(*KeyQuery)) *SecretQuery
- type SecretSelect
- func (_s *SecretSelect) Aggregate(fns ...AggregateFunc) *SecretSelect
- func (s *SecretSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SecretSelect) BoolX(ctx context.Context) bool
- func (s *SecretSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SecretSelect) BoolsX(ctx context.Context) []bool
- func (s *SecretSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SecretSelect) Float64X(ctx context.Context) float64
- func (s *SecretSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SecretSelect) Float64sX(ctx context.Context) []float64
- func (s *SecretSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SecretSelect) IntX(ctx context.Context) int
- func (s *SecretSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SecretSelect) IntsX(ctx context.Context) []int
- func (_s *SecretSelect) Scan(ctx context.Context, v any) error
- func (s *SecretSelect) ScanX(ctx context.Context, v any)
- func (s *SecretSelect) String(ctx context.Context) (_ string, err error)
- func (s *SecretSelect) StringX(ctx context.Context) string
- func (s *SecretSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SecretSelect) StringsX(ctx context.Context) []string
- type SecretUpdate
- func (_u *SecretUpdate) AddAccessCount(v int) *SecretUpdate
- func (_u *SecretUpdate) ClearKey() *SecretUpdate
- func (_u *SecretUpdate) Exec(ctx context.Context) error
- func (_u *SecretUpdate) ExecX(ctx context.Context)
- func (_u *SecretUpdate) Mutation() *SecretMutation
- func (_u *SecretUpdate) Save(ctx context.Context) (int, error)
- func (_u *SecretUpdate) SaveX(ctx context.Context) int
- func (_u *SecretUpdate) SetAccessCount(v int) *SecretUpdate
- func (_u *SecretUpdate) SetEncryptedValue(v []byte) *SecretUpdate
- func (_u *SecretUpdate) SetKey(v *Key) *SecretUpdate
- func (_u *SecretUpdate) SetKeyID(id uuid.UUID) *SecretUpdate
- func (_u *SecretUpdate) SetName(v string) *SecretUpdate
- func (_u *SecretUpdate) SetNillableAccessCount(v *int) *SecretUpdate
- func (_u *SecretUpdate) SetNillableName(v *string) *SecretUpdate
- func (_u *SecretUpdate) SetUpdatedAt(v time.Time) *SecretUpdate
- func (_u *SecretUpdate) Where(ps ...predicate.Secret) *SecretUpdate
- type SecretUpdateOne
- func (_u *SecretUpdateOne) AddAccessCount(v int) *SecretUpdateOne
- func (_u *SecretUpdateOne) ClearKey() *SecretUpdateOne
- func (_u *SecretUpdateOne) Exec(ctx context.Context) error
- func (_u *SecretUpdateOne) ExecX(ctx context.Context)
- func (_u *SecretUpdateOne) Mutation() *SecretMutation
- func (_u *SecretUpdateOne) Save(ctx context.Context) (*Secret, error)
- func (_u *SecretUpdateOne) SaveX(ctx context.Context) *Secret
- func (_u *SecretUpdateOne) Select(field string, fields ...string) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetAccessCount(v int) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetEncryptedValue(v []byte) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetKey(v *Key) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetKeyID(id uuid.UUID) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetName(v string) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetNillableAccessCount(v *int) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetNillableName(v *string) *SecretUpdateOne
- func (_u *SecretUpdateOne) SetUpdatedAt(v time.Time) *SecretUpdateOne
- func (_u *SecretUpdateOne) Where(ps ...predicate.Secret) *SecretUpdateOne
- type Secrets
- type Session
- type SessionClient
- func (c *SessionClient) Create() *SessionCreate
- func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
- func (c *SessionClient) Delete() *SessionDelete
- func (c *SessionClient) DeleteOne(_m *Session) *SessionDeleteOne
- func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id int) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id int) *Session
- func (c *SessionClient) Hooks() []Hook
- func (c *SessionClient) Intercept(interceptors ...Interceptor)
- func (c *SessionClient) Interceptors() []Interceptor
- func (c *SessionClient) MapCreateBulk(slice any, setFunc func(*SessionCreate, int)) *SessionCreateBulk
- func (c *SessionClient) Query() *SessionQuery
- func (c *SessionClient) QueryMessages(_m *Session) *MessageQuery
- func (c *SessionClient) Update() *SessionUpdate
- func (c *SessionClient) UpdateOne(_m *Session) *SessionUpdateOne
- func (c *SessionClient) UpdateOneID(id int) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionCreate
- func (_c *SessionCreate) AddMessageIDs(ids ...int) *SessionCreate
- func (_c *SessionCreate) AddMessages(v ...*Message) *SessionCreate
- func (_c *SessionCreate) Exec(ctx context.Context) error
- func (_c *SessionCreate) ExecX(ctx context.Context)
- func (_c *SessionCreate) Mutation() *SessionMutation
- func (_c *SessionCreate) Save(ctx context.Context) (*Session, error)
- func (_c *SessionCreate) SaveX(ctx context.Context) *Session
- func (_c *SessionCreate) SetAgentID(v string) *SessionCreate
- func (_c *SessionCreate) SetChannelID(v string) *SessionCreate
- func (_c *SessionCreate) SetChannelType(v string) *SessionCreate
- func (_c *SessionCreate) SetCreatedAt(v time.Time) *SessionCreate
- func (_c *SessionCreate) SetKey(v string) *SessionCreate
- func (_c *SessionCreate) SetMetadata(v map[string]string) *SessionCreate
- func (_c *SessionCreate) SetModel(v string) *SessionCreate
- func (_c *SessionCreate) SetNillableAgentID(v *string) *SessionCreate
- func (_c *SessionCreate) SetNillableChannelID(v *string) *SessionCreate
- func (_c *SessionCreate) SetNillableChannelType(v *string) *SessionCreate
- func (_c *SessionCreate) SetNillableCreatedAt(v *time.Time) *SessionCreate
- func (_c *SessionCreate) SetNillableModel(v *string) *SessionCreate
- func (_c *SessionCreate) SetNillableUpdatedAt(v *time.Time) *SessionCreate
- func (_c *SessionCreate) SetUpdatedAt(v time.Time) *SessionCreate
- type SessionCreateBulk
- type SessionDelete
- type SessionDeleteOne
- type SessionEdges
- type SessionGroupBy
- func (_g *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
- func (s *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SessionGroupBy) BoolX(ctx context.Context) bool
- func (s *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SessionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SessionGroupBy) Float64X(ctx context.Context) float64
- func (s *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SessionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SessionGroupBy) IntX(ctx context.Context) int
- func (s *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SessionGroupBy) IntsX(ctx context.Context) []int
- func (_g *SessionGroupBy) Scan(ctx context.Context, v any) error
- func (s *SessionGroupBy) ScanX(ctx context.Context, v any)
- func (s *SessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SessionGroupBy) StringX(ctx context.Context) string
- func (s *SessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SessionGroupBy) StringsX(ctx context.Context) []string
- type SessionMutation
- func (m *SessionMutation) AddField(name string, value ent.Value) error
- func (m *SessionMutation) AddMessageIDs(ids ...int)
- func (m *SessionMutation) AddedEdges() []string
- func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SessionMutation) AddedFields() []string
- func (m *SessionMutation) AddedIDs(name string) []ent.Value
- func (m *SessionMutation) AgentID() (r string, exists bool)
- func (m *SessionMutation) AgentIDCleared() bool
- func (m *SessionMutation) ChannelID() (r string, exists bool)
- func (m *SessionMutation) ChannelIDCleared() bool
- func (m *SessionMutation) ChannelType() (r string, exists bool)
- func (m *SessionMutation) ChannelTypeCleared() bool
- func (m *SessionMutation) ClearAgentID()
- func (m *SessionMutation) ClearChannelID()
- func (m *SessionMutation) ClearChannelType()
- func (m *SessionMutation) ClearEdge(name string) error
- func (m *SessionMutation) ClearField(name string) error
- func (m *SessionMutation) ClearMessages()
- func (m *SessionMutation) ClearMetadata()
- func (m *SessionMutation) ClearModel()
- func (m *SessionMutation) ClearedEdges() []string
- func (m *SessionMutation) ClearedFields() []string
- func (m SessionMutation) Client() *Client
- func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) bool
- func (m *SessionMutation) Field(name string) (ent.Value, bool)
- func (m *SessionMutation) FieldCleared(name string) bool
- func (m *SessionMutation) Fields() []string
- func (m *SessionMutation) ID() (id int, exists bool)
- func (m *SessionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SessionMutation) Key() (r string, exists bool)
- func (m *SessionMutation) MessagesCleared() bool
- func (m *SessionMutation) MessagesIDs() (ids []int)
- func (m *SessionMutation) Metadata() (r map[string]string, exists bool)
- func (m *SessionMutation) MetadataCleared() bool
- func (m *SessionMutation) Model() (r string, exists bool)
- func (m *SessionMutation) ModelCleared() bool
- func (m *SessionMutation) OldAgentID(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldChannelID(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldChannelType(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SessionMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldMetadata(ctx context.Context) (v map[string]string, err error)
- func (m *SessionMutation) OldModel(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) Op() Op
- func (m *SessionMutation) RemoveMessageIDs(ids ...int)
- func (m *SessionMutation) RemovedEdges() []string
- func (m *SessionMutation) RemovedIDs(name string) []ent.Value
- func (m *SessionMutation) RemovedMessagesIDs() (ids []int)
- func (m *SessionMutation) ResetAgentID()
- func (m *SessionMutation) ResetChannelID()
- func (m *SessionMutation) ResetChannelType()
- func (m *SessionMutation) ResetCreatedAt()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetKey()
- func (m *SessionMutation) ResetMessages()
- func (m *SessionMutation) ResetMetadata()
- func (m *SessionMutation) ResetModel()
- func (m *SessionMutation) ResetUpdatedAt()
- func (m *SessionMutation) SetAgentID(s string)
- func (m *SessionMutation) SetChannelID(s string)
- func (m *SessionMutation) SetChannelType(s string)
- func (m *SessionMutation) SetCreatedAt(t time.Time)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetKey(s string)
- func (m *SessionMutation) SetMetadata(value map[string]string)
- func (m *SessionMutation) SetModel(s string)
- func (m *SessionMutation) SetOp(op Op)
- func (m *SessionMutation) SetUpdatedAt(t time.Time)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SessionMutation) Where(ps ...predicate.Session)
- func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))
- type SessionQuery
- func (_q *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect
- func (_q *SessionQuery) All(ctx context.Context) ([]*Session, error)
- func (_q *SessionQuery) AllX(ctx context.Context) []*Session
- func (_q *SessionQuery) Clone() *SessionQuery
- func (_q *SessionQuery) Count(ctx context.Context) (int, error)
- func (_q *SessionQuery) CountX(ctx context.Context) int
- func (_q *SessionQuery) Exist(ctx context.Context) (bool, error)
- func (_q *SessionQuery) ExistX(ctx context.Context) bool
- func (_q *SessionQuery) First(ctx context.Context) (*Session, error)
- func (_q *SessionQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *SessionQuery) FirstIDX(ctx context.Context) int
- func (_q *SessionQuery) FirstX(ctx context.Context) *Session
- func (_q *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (_q *SessionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *SessionQuery) IDsX(ctx context.Context) []int
- func (_q *SessionQuery) Limit(limit int) *SessionQuery
- func (_q *SessionQuery) Offset(offset int) *SessionQuery
- func (_q *SessionQuery) Only(ctx context.Context) (*Session, error)
- func (_q *SessionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *SessionQuery) OnlyIDX(ctx context.Context) int
- func (_q *SessionQuery) OnlyX(ctx context.Context) *Session
- func (_q *SessionQuery) Order(o ...session.OrderOption) *SessionQuery
- func (_q *SessionQuery) QueryMessages() *MessageQuery
- func (_q *SessionQuery) Select(fields ...string) *SessionSelect
- func (_q *SessionQuery) Unique(unique bool) *SessionQuery
- func (_q *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
- func (_q *SessionQuery) WithMessages(opts ...func(*MessageQuery)) *SessionQuery
- type SessionSelect
- func (_s *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect
- func (s *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SessionSelect) BoolX(ctx context.Context) bool
- func (s *SessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SessionSelect) BoolsX(ctx context.Context) []bool
- func (s *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SessionSelect) Float64X(ctx context.Context) float64
- func (s *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SessionSelect) Float64sX(ctx context.Context) []float64
- func (s *SessionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SessionSelect) IntX(ctx context.Context) int
- func (s *SessionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SessionSelect) IntsX(ctx context.Context) []int
- func (_s *SessionSelect) Scan(ctx context.Context, v any) error
- func (s *SessionSelect) ScanX(ctx context.Context, v any)
- func (s *SessionSelect) String(ctx context.Context) (_ string, err error)
- func (s *SessionSelect) StringX(ctx context.Context) string
- func (s *SessionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SessionSelect) StringsX(ctx context.Context) []string
- type SessionUpdate
- func (_u *SessionUpdate) AddMessageIDs(ids ...int) *SessionUpdate
- func (_u *SessionUpdate) AddMessages(v ...*Message) *SessionUpdate
- func (_u *SessionUpdate) ClearAgentID() *SessionUpdate
- func (_u *SessionUpdate) ClearChannelID() *SessionUpdate
- func (_u *SessionUpdate) ClearChannelType() *SessionUpdate
- func (_u *SessionUpdate) ClearMessages() *SessionUpdate
- func (_u *SessionUpdate) ClearMetadata() *SessionUpdate
- func (_u *SessionUpdate) ClearModel() *SessionUpdate
- func (_u *SessionUpdate) Exec(ctx context.Context) error
- func (_u *SessionUpdate) ExecX(ctx context.Context)
- func (_u *SessionUpdate) Mutation() *SessionMutation
- func (_u *SessionUpdate) RemoveMessageIDs(ids ...int) *SessionUpdate
- func (_u *SessionUpdate) RemoveMessages(v ...*Message) *SessionUpdate
- func (_u *SessionUpdate) Save(ctx context.Context) (int, error)
- func (_u *SessionUpdate) SaveX(ctx context.Context) int
- func (_u *SessionUpdate) SetAgentID(v string) *SessionUpdate
- func (_u *SessionUpdate) SetChannelID(v string) *SessionUpdate
- func (_u *SessionUpdate) SetChannelType(v string) *SessionUpdate
- func (_u *SessionUpdate) SetKey(v string) *SessionUpdate
- func (_u *SessionUpdate) SetMetadata(v map[string]string) *SessionUpdate
- func (_u *SessionUpdate) SetModel(v string) *SessionUpdate
- func (_u *SessionUpdate) SetNillableAgentID(v *string) *SessionUpdate
- func (_u *SessionUpdate) SetNillableChannelID(v *string) *SessionUpdate
- func (_u *SessionUpdate) SetNillableChannelType(v *string) *SessionUpdate
- func (_u *SessionUpdate) SetNillableKey(v *string) *SessionUpdate
- func (_u *SessionUpdate) SetNillableModel(v *string) *SessionUpdate
- func (_u *SessionUpdate) SetUpdatedAt(v time.Time) *SessionUpdate
- func (_u *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type SessionUpdateOne
- func (_u *SessionUpdateOne) AddMessageIDs(ids ...int) *SessionUpdateOne
- func (_u *SessionUpdateOne) AddMessages(v ...*Message) *SessionUpdateOne
- func (_u *SessionUpdateOne) ClearAgentID() *SessionUpdateOne
- func (_u *SessionUpdateOne) ClearChannelID() *SessionUpdateOne
- func (_u *SessionUpdateOne) ClearChannelType() *SessionUpdateOne
- func (_u *SessionUpdateOne) ClearMessages() *SessionUpdateOne
- func (_u *SessionUpdateOne) ClearMetadata() *SessionUpdateOne
- func (_u *SessionUpdateOne) ClearModel() *SessionUpdateOne
- func (_u *SessionUpdateOne) Exec(ctx context.Context) error
- func (_u *SessionUpdateOne) ExecX(ctx context.Context)
- func (_u *SessionUpdateOne) Mutation() *SessionMutation
- func (_u *SessionUpdateOne) RemoveMessageIDs(ids ...int) *SessionUpdateOne
- func (_u *SessionUpdateOne) RemoveMessages(v ...*Message) *SessionUpdateOne
- func (_u *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
- func (_u *SessionUpdateOne) SaveX(ctx context.Context) *Session
- func (_u *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetAgentID(v string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetChannelID(v string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetChannelType(v string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetKey(v string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetMetadata(v map[string]string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetModel(v string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetNillableAgentID(v *string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetNillableChannelID(v *string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetNillableChannelType(v *string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetNillableKey(v *string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetNillableModel(v *string) *SessionUpdateOne
- func (_u *SessionUpdateOne) SetUpdatedAt(v time.Time) *SessionUpdateOne
- func (_u *SessionUpdateOne) Where(ps ...predicate.Session) *SessionUpdateOne
- type Sessions
- type TokenUsage
- type TokenUsageClient
- func (c *TokenUsageClient) Create() *TokenUsageCreate
- func (c *TokenUsageClient) CreateBulk(builders ...*TokenUsageCreate) *TokenUsageCreateBulk
- func (c *TokenUsageClient) Delete() *TokenUsageDelete
- func (c *TokenUsageClient) DeleteOne(_m *TokenUsage) *TokenUsageDeleteOne
- func (c *TokenUsageClient) DeleteOneID(id uuid.UUID) *TokenUsageDeleteOne
- func (c *TokenUsageClient) Get(ctx context.Context, id uuid.UUID) (*TokenUsage, error)
- func (c *TokenUsageClient) GetX(ctx context.Context, id uuid.UUID) *TokenUsage
- func (c *TokenUsageClient) Hooks() []Hook
- func (c *TokenUsageClient) Intercept(interceptors ...Interceptor)
- func (c *TokenUsageClient) Interceptors() []Interceptor
- func (c *TokenUsageClient) MapCreateBulk(slice any, setFunc func(*TokenUsageCreate, int)) *TokenUsageCreateBulk
- func (c *TokenUsageClient) Query() *TokenUsageQuery
- func (c *TokenUsageClient) Update() *TokenUsageUpdate
- func (c *TokenUsageClient) UpdateOne(_m *TokenUsage) *TokenUsageUpdateOne
- func (c *TokenUsageClient) UpdateOneID(id uuid.UUID) *TokenUsageUpdateOne
- func (c *TokenUsageClient) Use(hooks ...Hook)
- type TokenUsageCreate
- func (_c *TokenUsageCreate) Exec(ctx context.Context) error
- func (_c *TokenUsageCreate) ExecX(ctx context.Context)
- func (_c *TokenUsageCreate) Mutation() *TokenUsageMutation
- func (_c *TokenUsageCreate) Save(ctx context.Context) (*TokenUsage, error)
- func (_c *TokenUsageCreate) SaveX(ctx context.Context) *TokenUsage
- func (_c *TokenUsageCreate) SetAgentName(v string) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetCacheTokens(v int64) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetID(v uuid.UUID) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetInputTokens(v int64) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetModel(v string) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableAgentName(v *string) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableCacheTokens(v *int64) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableID(v *uuid.UUID) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableInputTokens(v *int64) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableOutputTokens(v *int64) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableSessionKey(v *string) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableTimestamp(v *time.Time) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetNillableTotalTokens(v *int64) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetOutputTokens(v int64) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetProvider(v string) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetSessionKey(v string) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetTimestamp(v time.Time) *TokenUsageCreate
- func (_c *TokenUsageCreate) SetTotalTokens(v int64) *TokenUsageCreate
- type TokenUsageCreateBulk
- type TokenUsageDelete
- type TokenUsageDeleteOne
- type TokenUsageGroupBy
- func (_g *TokenUsageGroupBy) Aggregate(fns ...AggregateFunc) *TokenUsageGroupBy
- func (s *TokenUsageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TokenUsageGroupBy) BoolX(ctx context.Context) bool
- func (s *TokenUsageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TokenUsageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TokenUsageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TokenUsageGroupBy) Float64X(ctx context.Context) float64
- func (s *TokenUsageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TokenUsageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TokenUsageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TokenUsageGroupBy) IntX(ctx context.Context) int
- func (s *TokenUsageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TokenUsageGroupBy) IntsX(ctx context.Context) []int
- func (_g *TokenUsageGroupBy) Scan(ctx context.Context, v any) error
- func (s *TokenUsageGroupBy) ScanX(ctx context.Context, v any)
- func (s *TokenUsageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TokenUsageGroupBy) StringX(ctx context.Context) string
- func (s *TokenUsageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TokenUsageGroupBy) StringsX(ctx context.Context) []string
- type TokenUsageMutation
- func (m *TokenUsageMutation) AddCacheTokens(i int64)
- func (m *TokenUsageMutation) AddField(name string, value ent.Value) error
- func (m *TokenUsageMutation) AddInputTokens(i int64)
- func (m *TokenUsageMutation) AddOutputTokens(i int64)
- func (m *TokenUsageMutation) AddTotalTokens(i int64)
- func (m *TokenUsageMutation) AddedCacheTokens() (r int64, exists bool)
- func (m *TokenUsageMutation) AddedEdges() []string
- func (m *TokenUsageMutation) AddedField(name string) (ent.Value, bool)
- func (m *TokenUsageMutation) AddedFields() []string
- func (m *TokenUsageMutation) AddedIDs(name string) []ent.Value
- func (m *TokenUsageMutation) AddedInputTokens() (r int64, exists bool)
- func (m *TokenUsageMutation) AddedOutputTokens() (r int64, exists bool)
- func (m *TokenUsageMutation) AddedTotalTokens() (r int64, exists bool)
- func (m *TokenUsageMutation) AgentName() (r string, exists bool)
- func (m *TokenUsageMutation) AgentNameCleared() bool
- func (m *TokenUsageMutation) CacheTokens() (r int64, exists bool)
- func (m *TokenUsageMutation) ClearAgentName()
- func (m *TokenUsageMutation) ClearEdge(name string) error
- func (m *TokenUsageMutation) ClearField(name string) error
- func (m *TokenUsageMutation) ClearSessionKey()
- func (m *TokenUsageMutation) ClearedEdges() []string
- func (m *TokenUsageMutation) ClearedFields() []string
- func (m TokenUsageMutation) Client() *Client
- func (m *TokenUsageMutation) EdgeCleared(name string) bool
- func (m *TokenUsageMutation) Field(name string) (ent.Value, bool)
- func (m *TokenUsageMutation) FieldCleared(name string) bool
- func (m *TokenUsageMutation) Fields() []string
- func (m *TokenUsageMutation) ID() (id uuid.UUID, exists bool)
- func (m *TokenUsageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TokenUsageMutation) InputTokens() (r int64, exists bool)
- func (m *TokenUsageMutation) Model() (r string, exists bool)
- func (m *TokenUsageMutation) OldAgentName(ctx context.Context) (v string, err error)
- func (m *TokenUsageMutation) OldCacheTokens(ctx context.Context) (v int64, err error)
- func (m *TokenUsageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TokenUsageMutation) OldInputTokens(ctx context.Context) (v int64, err error)
- func (m *TokenUsageMutation) OldModel(ctx context.Context) (v string, err error)
- func (m *TokenUsageMutation) OldOutputTokens(ctx context.Context) (v int64, err error)
- func (m *TokenUsageMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *TokenUsageMutation) OldSessionKey(ctx context.Context) (v string, err error)
- func (m *TokenUsageMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *TokenUsageMutation) OldTotalTokens(ctx context.Context) (v int64, err error)
- func (m *TokenUsageMutation) Op() Op
- func (m *TokenUsageMutation) OutputTokens() (r int64, exists bool)
- func (m *TokenUsageMutation) Provider() (r string, exists bool)
- func (m *TokenUsageMutation) RemovedEdges() []string
- func (m *TokenUsageMutation) RemovedIDs(name string) []ent.Value
- func (m *TokenUsageMutation) ResetAgentName()
- func (m *TokenUsageMutation) ResetCacheTokens()
- func (m *TokenUsageMutation) ResetEdge(name string) error
- func (m *TokenUsageMutation) ResetField(name string) error
- func (m *TokenUsageMutation) ResetInputTokens()
- func (m *TokenUsageMutation) ResetModel()
- func (m *TokenUsageMutation) ResetOutputTokens()
- func (m *TokenUsageMutation) ResetProvider()
- func (m *TokenUsageMutation) ResetSessionKey()
- func (m *TokenUsageMutation) ResetTimestamp()
- func (m *TokenUsageMutation) ResetTotalTokens()
- func (m *TokenUsageMutation) SessionKey() (r string, exists bool)
- func (m *TokenUsageMutation) SessionKeyCleared() bool
- func (m *TokenUsageMutation) SetAgentName(s string)
- func (m *TokenUsageMutation) SetCacheTokens(i int64)
- func (m *TokenUsageMutation) SetField(name string, value ent.Value) error
- func (m *TokenUsageMutation) SetID(id uuid.UUID)
- func (m *TokenUsageMutation) SetInputTokens(i int64)
- func (m *TokenUsageMutation) SetModel(s string)
- func (m *TokenUsageMutation) SetOp(op Op)
- func (m *TokenUsageMutation) SetOutputTokens(i int64)
- func (m *TokenUsageMutation) SetProvider(s string)
- func (m *TokenUsageMutation) SetSessionKey(s string)
- func (m *TokenUsageMutation) SetTimestamp(t time.Time)
- func (m *TokenUsageMutation) SetTotalTokens(i int64)
- func (m *TokenUsageMutation) Timestamp() (r time.Time, exists bool)
- func (m *TokenUsageMutation) TotalTokens() (r int64, exists bool)
- func (m TokenUsageMutation) Tx() (*Tx, error)
- func (m *TokenUsageMutation) Type() string
- func (m *TokenUsageMutation) Where(ps ...predicate.TokenUsage)
- func (m *TokenUsageMutation) WhereP(ps ...func(*sql.Selector))
- type TokenUsageQuery
- func (_q *TokenUsageQuery) Aggregate(fns ...AggregateFunc) *TokenUsageSelect
- func (_q *TokenUsageQuery) All(ctx context.Context) ([]*TokenUsage, error)
- func (_q *TokenUsageQuery) AllX(ctx context.Context) []*TokenUsage
- func (_q *TokenUsageQuery) Clone() *TokenUsageQuery
- func (_q *TokenUsageQuery) Count(ctx context.Context) (int, error)
- func (_q *TokenUsageQuery) CountX(ctx context.Context) int
- func (_q *TokenUsageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *TokenUsageQuery) ExistX(ctx context.Context) bool
- func (_q *TokenUsageQuery) First(ctx context.Context) (*TokenUsage, error)
- func (_q *TokenUsageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *TokenUsageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *TokenUsageQuery) FirstX(ctx context.Context) *TokenUsage
- func (_q *TokenUsageQuery) GroupBy(field string, fields ...string) *TokenUsageGroupBy
- func (_q *TokenUsageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *TokenUsageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *TokenUsageQuery) Limit(limit int) *TokenUsageQuery
- func (_q *TokenUsageQuery) Offset(offset int) *TokenUsageQuery
- func (_q *TokenUsageQuery) Only(ctx context.Context) (*TokenUsage, error)
- func (_q *TokenUsageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *TokenUsageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *TokenUsageQuery) OnlyX(ctx context.Context) *TokenUsage
- func (_q *TokenUsageQuery) Order(o ...tokenusage.OrderOption) *TokenUsageQuery
- func (_q *TokenUsageQuery) Select(fields ...string) *TokenUsageSelect
- func (_q *TokenUsageQuery) Unique(unique bool) *TokenUsageQuery
- func (_q *TokenUsageQuery) Where(ps ...predicate.TokenUsage) *TokenUsageQuery
- type TokenUsageSelect
- func (_s *TokenUsageSelect) Aggregate(fns ...AggregateFunc) *TokenUsageSelect
- func (s *TokenUsageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TokenUsageSelect) BoolX(ctx context.Context) bool
- func (s *TokenUsageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TokenUsageSelect) BoolsX(ctx context.Context) []bool
- func (s *TokenUsageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TokenUsageSelect) Float64X(ctx context.Context) float64
- func (s *TokenUsageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TokenUsageSelect) Float64sX(ctx context.Context) []float64
- func (s *TokenUsageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TokenUsageSelect) IntX(ctx context.Context) int
- func (s *TokenUsageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TokenUsageSelect) IntsX(ctx context.Context) []int
- func (_s *TokenUsageSelect) Scan(ctx context.Context, v any) error
- func (s *TokenUsageSelect) ScanX(ctx context.Context, v any)
- func (s *TokenUsageSelect) String(ctx context.Context) (_ string, err error)
- func (s *TokenUsageSelect) StringX(ctx context.Context) string
- func (s *TokenUsageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TokenUsageSelect) StringsX(ctx context.Context) []string
- type TokenUsageUpdate
- func (_u *TokenUsageUpdate) AddCacheTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) AddInputTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) AddOutputTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) AddTotalTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) ClearAgentName() *TokenUsageUpdate
- func (_u *TokenUsageUpdate) ClearSessionKey() *TokenUsageUpdate
- func (_u *TokenUsageUpdate) Exec(ctx context.Context) error
- func (_u *TokenUsageUpdate) ExecX(ctx context.Context)
- func (_u *TokenUsageUpdate) Mutation() *TokenUsageMutation
- func (_u *TokenUsageUpdate) Save(ctx context.Context) (int, error)
- func (_u *TokenUsageUpdate) SaveX(ctx context.Context) int
- func (_u *TokenUsageUpdate) SetAgentName(v string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetCacheTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetInputTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetModel(v string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableAgentName(v *string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableCacheTokens(v *int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableInputTokens(v *int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableModel(v *string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableOutputTokens(v *int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableProvider(v *string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableSessionKey(v *string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetNillableTotalTokens(v *int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetOutputTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetProvider(v string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetSessionKey(v string) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) SetTotalTokens(v int64) *TokenUsageUpdate
- func (_u *TokenUsageUpdate) Where(ps ...predicate.TokenUsage) *TokenUsageUpdate
- type TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) AddCacheTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) AddInputTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) AddOutputTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) AddTotalTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) ClearAgentName() *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) ClearSessionKey() *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) Exec(ctx context.Context) error
- func (_u *TokenUsageUpdateOne) ExecX(ctx context.Context)
- func (_u *TokenUsageUpdateOne) Mutation() *TokenUsageMutation
- func (_u *TokenUsageUpdateOne) Save(ctx context.Context) (*TokenUsage, error)
- func (_u *TokenUsageUpdateOne) SaveX(ctx context.Context) *TokenUsage
- func (_u *TokenUsageUpdateOne) Select(field string, fields ...string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetAgentName(v string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetCacheTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetInputTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetModel(v string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableAgentName(v *string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableCacheTokens(v *int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableInputTokens(v *int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableModel(v *string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableOutputTokens(v *int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableProvider(v *string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableSessionKey(v *string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetNillableTotalTokens(v *int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetOutputTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetProvider(v string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetSessionKey(v string) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) SetTotalTokens(v int64) *TokenUsageUpdateOne
- func (_u *TokenUsageUpdateOne) Where(ps ...predicate.TokenUsage) *TokenUsageUpdateOne
- type TokenUsages
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type WorkflowRun
- type WorkflowRunClient
- func (c *WorkflowRunClient) Create() *WorkflowRunCreate
- func (c *WorkflowRunClient) CreateBulk(builders ...*WorkflowRunCreate) *WorkflowRunCreateBulk
- func (c *WorkflowRunClient) Delete() *WorkflowRunDelete
- func (c *WorkflowRunClient) DeleteOne(_m *WorkflowRun) *WorkflowRunDeleteOne
- func (c *WorkflowRunClient) DeleteOneID(id uuid.UUID) *WorkflowRunDeleteOne
- func (c *WorkflowRunClient) Get(ctx context.Context, id uuid.UUID) (*WorkflowRun, error)
- func (c *WorkflowRunClient) GetX(ctx context.Context, id uuid.UUID) *WorkflowRun
- func (c *WorkflowRunClient) Hooks() []Hook
- func (c *WorkflowRunClient) Intercept(interceptors ...Interceptor)
- func (c *WorkflowRunClient) Interceptors() []Interceptor
- func (c *WorkflowRunClient) MapCreateBulk(slice any, setFunc func(*WorkflowRunCreate, int)) *WorkflowRunCreateBulk
- func (c *WorkflowRunClient) Query() *WorkflowRunQuery
- func (c *WorkflowRunClient) Update() *WorkflowRunUpdate
- func (c *WorkflowRunClient) UpdateOne(_m *WorkflowRun) *WorkflowRunUpdateOne
- func (c *WorkflowRunClient) UpdateOneID(id uuid.UUID) *WorkflowRunUpdateOne
- func (c *WorkflowRunClient) Use(hooks ...Hook)
- type WorkflowRunCreate
- func (_c *WorkflowRunCreate) Exec(ctx context.Context) error
- func (_c *WorkflowRunCreate) ExecX(ctx context.Context)
- func (_c *WorkflowRunCreate) Mutation() *WorkflowRunMutation
- func (_c *WorkflowRunCreate) Save(ctx context.Context) (*WorkflowRun, error)
- func (_c *WorkflowRunCreate) SaveX(ctx context.Context) *WorkflowRun
- func (_c *WorkflowRunCreate) SetCompletedAt(v time.Time) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetCompletedSteps(v int) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetDescription(v string) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetErrorMessage(v string) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetID(v uuid.UUID) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableCompletedAt(v *time.Time) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableCompletedSteps(v *int) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableDescription(v *string) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableErrorMessage(v *string) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableID(v *uuid.UUID) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableStartedAt(v *time.Time) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableStatus(v *workflowrun.Status) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetNillableTotalSteps(v *int) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetStartedAt(v time.Time) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetStatus(v workflowrun.Status) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetTotalSteps(v int) *WorkflowRunCreate
- func (_c *WorkflowRunCreate) SetWorkflowName(v string) *WorkflowRunCreate
- type WorkflowRunCreateBulk
- type WorkflowRunDelete
- type WorkflowRunDeleteOne
- type WorkflowRunGroupBy
- func (_g *WorkflowRunGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowRunGroupBy
- func (s *WorkflowRunGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowRunGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkflowRunGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowRunGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkflowRunGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowRunGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkflowRunGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowRunGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkflowRunGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowRunGroupBy) IntX(ctx context.Context) int
- func (s *WorkflowRunGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowRunGroupBy) IntsX(ctx context.Context) []int
- func (_g *WorkflowRunGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkflowRunGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkflowRunGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowRunGroupBy) StringX(ctx context.Context) string
- func (s *WorkflowRunGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowRunGroupBy) StringsX(ctx context.Context) []string
- type WorkflowRunMutation
- func (m *WorkflowRunMutation) AddCompletedSteps(i int)
- func (m *WorkflowRunMutation) AddField(name string, value ent.Value) error
- func (m *WorkflowRunMutation) AddTotalSteps(i int)
- func (m *WorkflowRunMutation) AddedCompletedSteps() (r int, exists bool)
- func (m *WorkflowRunMutation) AddedEdges() []string
- func (m *WorkflowRunMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkflowRunMutation) AddedFields() []string
- func (m *WorkflowRunMutation) AddedIDs(name string) []ent.Value
- func (m *WorkflowRunMutation) AddedTotalSteps() (r int, exists bool)
- func (m *WorkflowRunMutation) ClearCompletedAt()
- func (m *WorkflowRunMutation) ClearDescription()
- func (m *WorkflowRunMutation) ClearEdge(name string) error
- func (m *WorkflowRunMutation) ClearErrorMessage()
- func (m *WorkflowRunMutation) ClearField(name string) error
- func (m *WorkflowRunMutation) ClearedEdges() []string
- func (m *WorkflowRunMutation) ClearedFields() []string
- func (m WorkflowRunMutation) Client() *Client
- func (m *WorkflowRunMutation) CompletedAt() (r time.Time, exists bool)
- func (m *WorkflowRunMutation) CompletedAtCleared() bool
- func (m *WorkflowRunMutation) CompletedSteps() (r int, exists bool)
- func (m *WorkflowRunMutation) Description() (r string, exists bool)
- func (m *WorkflowRunMutation) DescriptionCleared() bool
- func (m *WorkflowRunMutation) EdgeCleared(name string) bool
- func (m *WorkflowRunMutation) ErrorMessage() (r string, exists bool)
- func (m *WorkflowRunMutation) ErrorMessageCleared() bool
- func (m *WorkflowRunMutation) Field(name string) (ent.Value, bool)
- func (m *WorkflowRunMutation) FieldCleared(name string) bool
- func (m *WorkflowRunMutation) Fields() []string
- func (m *WorkflowRunMutation) ID() (id uuid.UUID, exists bool)
- func (m *WorkflowRunMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *WorkflowRunMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *WorkflowRunMutation) OldCompletedSteps(ctx context.Context) (v int, err error)
- func (m *WorkflowRunMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *WorkflowRunMutation) OldErrorMessage(ctx context.Context) (v string, err error)
- func (m *WorkflowRunMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkflowRunMutation) OldStartedAt(ctx context.Context) (v time.Time, err error)
- func (m *WorkflowRunMutation) OldStatus(ctx context.Context) (v workflowrun.Status, err error)
- func (m *WorkflowRunMutation) OldTotalSteps(ctx context.Context) (v int, err error)
- func (m *WorkflowRunMutation) OldWorkflowName(ctx context.Context) (v string, err error)
- func (m *WorkflowRunMutation) Op() Op
- func (m *WorkflowRunMutation) RemovedEdges() []string
- func (m *WorkflowRunMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkflowRunMutation) ResetCompletedAt()
- func (m *WorkflowRunMutation) ResetCompletedSteps()
- func (m *WorkflowRunMutation) ResetDescription()
- func (m *WorkflowRunMutation) ResetEdge(name string) error
- func (m *WorkflowRunMutation) ResetErrorMessage()
- func (m *WorkflowRunMutation) ResetField(name string) error
- func (m *WorkflowRunMutation) ResetStartedAt()
- func (m *WorkflowRunMutation) ResetStatus()
- func (m *WorkflowRunMutation) ResetTotalSteps()
- func (m *WorkflowRunMutation) ResetWorkflowName()
- func (m *WorkflowRunMutation) SetCompletedAt(t time.Time)
- func (m *WorkflowRunMutation) SetCompletedSteps(i int)
- func (m *WorkflowRunMutation) SetDescription(s string)
- func (m *WorkflowRunMutation) SetErrorMessage(s string)
- func (m *WorkflowRunMutation) SetField(name string, value ent.Value) error
- func (m *WorkflowRunMutation) SetID(id uuid.UUID)
- func (m *WorkflowRunMutation) SetOp(op Op)
- func (m *WorkflowRunMutation) SetStartedAt(t time.Time)
- func (m *WorkflowRunMutation) SetStatus(w workflowrun.Status)
- func (m *WorkflowRunMutation) SetTotalSteps(i int)
- func (m *WorkflowRunMutation) SetWorkflowName(s string)
- func (m *WorkflowRunMutation) StartedAt() (r time.Time, exists bool)
- func (m *WorkflowRunMutation) Status() (r workflowrun.Status, exists bool)
- func (m *WorkflowRunMutation) TotalSteps() (r int, exists bool)
- func (m WorkflowRunMutation) Tx() (*Tx, error)
- func (m *WorkflowRunMutation) Type() string
- func (m *WorkflowRunMutation) Where(ps ...predicate.WorkflowRun)
- func (m *WorkflowRunMutation) WhereP(ps ...func(*sql.Selector))
- func (m *WorkflowRunMutation) WorkflowName() (r string, exists bool)
- type WorkflowRunQuery
- func (_q *WorkflowRunQuery) Aggregate(fns ...AggregateFunc) *WorkflowRunSelect
- func (_q *WorkflowRunQuery) All(ctx context.Context) ([]*WorkflowRun, error)
- func (_q *WorkflowRunQuery) AllX(ctx context.Context) []*WorkflowRun
- func (_q *WorkflowRunQuery) Clone() *WorkflowRunQuery
- func (_q *WorkflowRunQuery) Count(ctx context.Context) (int, error)
- func (_q *WorkflowRunQuery) CountX(ctx context.Context) int
- func (_q *WorkflowRunQuery) Exist(ctx context.Context) (bool, error)
- func (_q *WorkflowRunQuery) ExistX(ctx context.Context) bool
- func (_q *WorkflowRunQuery) First(ctx context.Context) (*WorkflowRun, error)
- func (_q *WorkflowRunQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *WorkflowRunQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *WorkflowRunQuery) FirstX(ctx context.Context) *WorkflowRun
- func (_q *WorkflowRunQuery) GroupBy(field string, fields ...string) *WorkflowRunGroupBy
- func (_q *WorkflowRunQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *WorkflowRunQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *WorkflowRunQuery) Limit(limit int) *WorkflowRunQuery
- func (_q *WorkflowRunQuery) Offset(offset int) *WorkflowRunQuery
- func (_q *WorkflowRunQuery) Only(ctx context.Context) (*WorkflowRun, error)
- func (_q *WorkflowRunQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *WorkflowRunQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *WorkflowRunQuery) OnlyX(ctx context.Context) *WorkflowRun
- func (_q *WorkflowRunQuery) Order(o ...workflowrun.OrderOption) *WorkflowRunQuery
- func (_q *WorkflowRunQuery) Select(fields ...string) *WorkflowRunSelect
- func (_q *WorkflowRunQuery) Unique(unique bool) *WorkflowRunQuery
- func (_q *WorkflowRunQuery) Where(ps ...predicate.WorkflowRun) *WorkflowRunQuery
- type WorkflowRunSelect
- func (_s *WorkflowRunSelect) Aggregate(fns ...AggregateFunc) *WorkflowRunSelect
- func (s *WorkflowRunSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowRunSelect) BoolX(ctx context.Context) bool
- func (s *WorkflowRunSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowRunSelect) BoolsX(ctx context.Context) []bool
- func (s *WorkflowRunSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowRunSelect) Float64X(ctx context.Context) float64
- func (s *WorkflowRunSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowRunSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkflowRunSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowRunSelect) IntX(ctx context.Context) int
- func (s *WorkflowRunSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowRunSelect) IntsX(ctx context.Context) []int
- func (_s *WorkflowRunSelect) Scan(ctx context.Context, v any) error
- func (s *WorkflowRunSelect) ScanX(ctx context.Context, v any)
- func (s *WorkflowRunSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowRunSelect) StringX(ctx context.Context) string
- func (s *WorkflowRunSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowRunSelect) StringsX(ctx context.Context) []string
- type WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) AddCompletedSteps(v int) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) AddTotalSteps(v int) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) ClearCompletedAt() *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) ClearDescription() *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) ClearErrorMessage() *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) Exec(ctx context.Context) error
- func (_u *WorkflowRunUpdate) ExecX(ctx context.Context)
- func (_u *WorkflowRunUpdate) Mutation() *WorkflowRunMutation
- func (_u *WorkflowRunUpdate) Save(ctx context.Context) (int, error)
- func (_u *WorkflowRunUpdate) SaveX(ctx context.Context) int
- func (_u *WorkflowRunUpdate) SetCompletedAt(v time.Time) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetCompletedSteps(v int) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetDescription(v string) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetErrorMessage(v string) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetNillableCompletedAt(v *time.Time) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetNillableCompletedSteps(v *int) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetNillableDescription(v *string) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetNillableErrorMessage(v *string) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetNillableStatus(v *workflowrun.Status) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetNillableTotalSteps(v *int) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetNillableWorkflowName(v *string) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetStatus(v workflowrun.Status) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetTotalSteps(v int) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) SetWorkflowName(v string) *WorkflowRunUpdate
- func (_u *WorkflowRunUpdate) Where(ps ...predicate.WorkflowRun) *WorkflowRunUpdate
- type WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) AddCompletedSteps(v int) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) AddTotalSteps(v int) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) ClearCompletedAt() *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) ClearDescription() *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) ClearErrorMessage() *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) Exec(ctx context.Context) error
- func (_u *WorkflowRunUpdateOne) ExecX(ctx context.Context)
- func (_u *WorkflowRunUpdateOne) Mutation() *WorkflowRunMutation
- func (_u *WorkflowRunUpdateOne) Save(ctx context.Context) (*WorkflowRun, error)
- func (_u *WorkflowRunUpdateOne) SaveX(ctx context.Context) *WorkflowRun
- func (_u *WorkflowRunUpdateOne) Select(field string, fields ...string) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetCompletedAt(v time.Time) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetCompletedSteps(v int) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetDescription(v string) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetErrorMessage(v string) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetNillableCompletedAt(v *time.Time) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetNillableCompletedSteps(v *int) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetNillableDescription(v *string) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetNillableErrorMessage(v *string) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetNillableStatus(v *workflowrun.Status) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetNillableTotalSteps(v *int) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetNillableWorkflowName(v *string) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetStatus(v workflowrun.Status) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetTotalSteps(v int) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) SetWorkflowName(v string) *WorkflowRunUpdateOne
- func (_u *WorkflowRunUpdateOne) Where(ps ...predicate.WorkflowRun) *WorkflowRunUpdateOne
- type WorkflowRuns
- type WorkflowStepRun
- type WorkflowStepRunClient
- func (c *WorkflowStepRunClient) Create() *WorkflowStepRunCreate
- func (c *WorkflowStepRunClient) CreateBulk(builders ...*WorkflowStepRunCreate) *WorkflowStepRunCreateBulk
- func (c *WorkflowStepRunClient) Delete() *WorkflowStepRunDelete
- func (c *WorkflowStepRunClient) DeleteOne(_m *WorkflowStepRun) *WorkflowStepRunDeleteOne
- func (c *WorkflowStepRunClient) DeleteOneID(id uuid.UUID) *WorkflowStepRunDeleteOne
- func (c *WorkflowStepRunClient) Get(ctx context.Context, id uuid.UUID) (*WorkflowStepRun, error)
- func (c *WorkflowStepRunClient) GetX(ctx context.Context, id uuid.UUID) *WorkflowStepRun
- func (c *WorkflowStepRunClient) Hooks() []Hook
- func (c *WorkflowStepRunClient) Intercept(interceptors ...Interceptor)
- func (c *WorkflowStepRunClient) Interceptors() []Interceptor
- func (c *WorkflowStepRunClient) MapCreateBulk(slice any, setFunc func(*WorkflowStepRunCreate, int)) *WorkflowStepRunCreateBulk
- func (c *WorkflowStepRunClient) Query() *WorkflowStepRunQuery
- func (c *WorkflowStepRunClient) Update() *WorkflowStepRunUpdate
- func (c *WorkflowStepRunClient) UpdateOne(_m *WorkflowStepRun) *WorkflowStepRunUpdateOne
- func (c *WorkflowStepRunClient) UpdateOneID(id uuid.UUID) *WorkflowStepRunUpdateOne
- func (c *WorkflowStepRunClient) Use(hooks ...Hook)
- type WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) Exec(ctx context.Context) error
- func (_c *WorkflowStepRunCreate) ExecX(ctx context.Context)
- func (_c *WorkflowStepRunCreate) Mutation() *WorkflowStepRunMutation
- func (_c *WorkflowStepRunCreate) Save(ctx context.Context) (*WorkflowStepRun, error)
- func (_c *WorkflowStepRunCreate) SaveX(ctx context.Context) *WorkflowStepRun
- func (_c *WorkflowStepRunCreate) SetAgent(v string) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetCompletedAt(v time.Time) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetErrorMessage(v string) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetID(v uuid.UUID) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetNillableAgent(v *string) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetNillableCompletedAt(v *time.Time) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetNillableErrorMessage(v *string) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetNillableID(v *uuid.UUID) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetNillableResult(v *string) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetNillableStartedAt(v *time.Time) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetNillableStatus(v *workflowsteprun.Status) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetPrompt(v string) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetResult(v string) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetRunID(v uuid.UUID) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetStartedAt(v time.Time) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetStatus(v workflowsteprun.Status) *WorkflowStepRunCreate
- func (_c *WorkflowStepRunCreate) SetStepID(v string) *WorkflowStepRunCreate
- type WorkflowStepRunCreateBulk
- func (_c *WorkflowStepRunCreateBulk) Exec(ctx context.Context) error
- func (_c *WorkflowStepRunCreateBulk) ExecX(ctx context.Context)
- func (_c *WorkflowStepRunCreateBulk) Save(ctx context.Context) ([]*WorkflowStepRun, error)
- func (_c *WorkflowStepRunCreateBulk) SaveX(ctx context.Context) []*WorkflowStepRun
- type WorkflowStepRunDelete
- type WorkflowStepRunDeleteOne
- type WorkflowStepRunGroupBy
- func (_g *WorkflowStepRunGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowStepRunGroupBy
- func (s *WorkflowStepRunGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowStepRunGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkflowStepRunGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowStepRunGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkflowStepRunGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowStepRunGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkflowStepRunGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowStepRunGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkflowStepRunGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowStepRunGroupBy) IntX(ctx context.Context) int
- func (s *WorkflowStepRunGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowStepRunGroupBy) IntsX(ctx context.Context) []int
- func (_g *WorkflowStepRunGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkflowStepRunGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkflowStepRunGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowStepRunGroupBy) StringX(ctx context.Context) string
- func (s *WorkflowStepRunGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowStepRunGroupBy) StringsX(ctx context.Context) []string
- type WorkflowStepRunMutation
- func (m *WorkflowStepRunMutation) AddField(name string, value ent.Value) error
- func (m *WorkflowStepRunMutation) AddedEdges() []string
- func (m *WorkflowStepRunMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkflowStepRunMutation) AddedFields() []string
- func (m *WorkflowStepRunMutation) AddedIDs(name string) []ent.Value
- func (m *WorkflowStepRunMutation) Agent() (r string, exists bool)
- func (m *WorkflowStepRunMutation) AgentCleared() bool
- func (m *WorkflowStepRunMutation) ClearAgent()
- func (m *WorkflowStepRunMutation) ClearCompletedAt()
- func (m *WorkflowStepRunMutation) ClearEdge(name string) error
- func (m *WorkflowStepRunMutation) ClearErrorMessage()
- func (m *WorkflowStepRunMutation) ClearField(name string) error
- func (m *WorkflowStepRunMutation) ClearResult()
- func (m *WorkflowStepRunMutation) ClearStartedAt()
- func (m *WorkflowStepRunMutation) ClearedEdges() []string
- func (m *WorkflowStepRunMutation) ClearedFields() []string
- func (m WorkflowStepRunMutation) Client() *Client
- func (m *WorkflowStepRunMutation) CompletedAt() (r time.Time, exists bool)
- func (m *WorkflowStepRunMutation) CompletedAtCleared() bool
- func (m *WorkflowStepRunMutation) EdgeCleared(name string) bool
- func (m *WorkflowStepRunMutation) ErrorMessage() (r string, exists bool)
- func (m *WorkflowStepRunMutation) ErrorMessageCleared() bool
- func (m *WorkflowStepRunMutation) Field(name string) (ent.Value, bool)
- func (m *WorkflowStepRunMutation) FieldCleared(name string) bool
- func (m *WorkflowStepRunMutation) Fields() []string
- func (m *WorkflowStepRunMutation) ID() (id uuid.UUID, exists bool)
- func (m *WorkflowStepRunMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *WorkflowStepRunMutation) OldAgent(ctx context.Context) (v string, err error)
- func (m *WorkflowStepRunMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *WorkflowStepRunMutation) OldErrorMessage(ctx context.Context) (v string, err error)
- func (m *WorkflowStepRunMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkflowStepRunMutation) OldPrompt(ctx context.Context) (v string, err error)
- func (m *WorkflowStepRunMutation) OldResult(ctx context.Context) (v string, err error)
- func (m *WorkflowStepRunMutation) OldRunID(ctx context.Context) (v uuid.UUID, err error)
- func (m *WorkflowStepRunMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)
- func (m *WorkflowStepRunMutation) OldStatus(ctx context.Context) (v workflowsteprun.Status, err error)
- func (m *WorkflowStepRunMutation) OldStepID(ctx context.Context) (v string, err error)
- func (m *WorkflowStepRunMutation) Op() Op
- func (m *WorkflowStepRunMutation) Prompt() (r string, exists bool)
- func (m *WorkflowStepRunMutation) RemovedEdges() []string
- func (m *WorkflowStepRunMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkflowStepRunMutation) ResetAgent()
- func (m *WorkflowStepRunMutation) ResetCompletedAt()
- func (m *WorkflowStepRunMutation) ResetEdge(name string) error
- func (m *WorkflowStepRunMutation) ResetErrorMessage()
- func (m *WorkflowStepRunMutation) ResetField(name string) error
- func (m *WorkflowStepRunMutation) ResetPrompt()
- func (m *WorkflowStepRunMutation) ResetResult()
- func (m *WorkflowStepRunMutation) ResetRunID()
- func (m *WorkflowStepRunMutation) ResetStartedAt()
- func (m *WorkflowStepRunMutation) ResetStatus()
- func (m *WorkflowStepRunMutation) ResetStepID()
- func (m *WorkflowStepRunMutation) Result() (r string, exists bool)
- func (m *WorkflowStepRunMutation) ResultCleared() bool
- func (m *WorkflowStepRunMutation) RunID() (r uuid.UUID, exists bool)
- func (m *WorkflowStepRunMutation) SetAgent(s string)
- func (m *WorkflowStepRunMutation) SetCompletedAt(t time.Time)
- func (m *WorkflowStepRunMutation) SetErrorMessage(s string)
- func (m *WorkflowStepRunMutation) SetField(name string, value ent.Value) error
- func (m *WorkflowStepRunMutation) SetID(id uuid.UUID)
- func (m *WorkflowStepRunMutation) SetOp(op Op)
- func (m *WorkflowStepRunMutation) SetPrompt(s string)
- func (m *WorkflowStepRunMutation) SetResult(s string)
- func (m *WorkflowStepRunMutation) SetRunID(u uuid.UUID)
- func (m *WorkflowStepRunMutation) SetStartedAt(t time.Time)
- func (m *WorkflowStepRunMutation) SetStatus(w workflowsteprun.Status)
- func (m *WorkflowStepRunMutation) SetStepID(s string)
- func (m *WorkflowStepRunMutation) StartedAt() (r time.Time, exists bool)
- func (m *WorkflowStepRunMutation) StartedAtCleared() bool
- func (m *WorkflowStepRunMutation) Status() (r workflowsteprun.Status, exists bool)
- func (m *WorkflowStepRunMutation) StepID() (r string, exists bool)
- func (m WorkflowStepRunMutation) Tx() (*Tx, error)
- func (m *WorkflowStepRunMutation) Type() string
- func (m *WorkflowStepRunMutation) Where(ps ...predicate.WorkflowStepRun)
- func (m *WorkflowStepRunMutation) WhereP(ps ...func(*sql.Selector))
- type WorkflowStepRunQuery
- func (_q *WorkflowStepRunQuery) Aggregate(fns ...AggregateFunc) *WorkflowStepRunSelect
- func (_q *WorkflowStepRunQuery) All(ctx context.Context) ([]*WorkflowStepRun, error)
- func (_q *WorkflowStepRunQuery) AllX(ctx context.Context) []*WorkflowStepRun
- func (_q *WorkflowStepRunQuery) Clone() *WorkflowStepRunQuery
- func (_q *WorkflowStepRunQuery) Count(ctx context.Context) (int, error)
- func (_q *WorkflowStepRunQuery) CountX(ctx context.Context) int
- func (_q *WorkflowStepRunQuery) Exist(ctx context.Context) (bool, error)
- func (_q *WorkflowStepRunQuery) ExistX(ctx context.Context) bool
- func (_q *WorkflowStepRunQuery) First(ctx context.Context) (*WorkflowStepRun, error)
- func (_q *WorkflowStepRunQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *WorkflowStepRunQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *WorkflowStepRunQuery) FirstX(ctx context.Context) *WorkflowStepRun
- func (_q *WorkflowStepRunQuery) GroupBy(field string, fields ...string) *WorkflowStepRunGroupBy
- func (_q *WorkflowStepRunQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *WorkflowStepRunQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *WorkflowStepRunQuery) Limit(limit int) *WorkflowStepRunQuery
- func (_q *WorkflowStepRunQuery) Offset(offset int) *WorkflowStepRunQuery
- func (_q *WorkflowStepRunQuery) Only(ctx context.Context) (*WorkflowStepRun, error)
- func (_q *WorkflowStepRunQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *WorkflowStepRunQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *WorkflowStepRunQuery) OnlyX(ctx context.Context) *WorkflowStepRun
- func (_q *WorkflowStepRunQuery) Order(o ...workflowsteprun.OrderOption) *WorkflowStepRunQuery
- func (_q *WorkflowStepRunQuery) Select(fields ...string) *WorkflowStepRunSelect
- func (_q *WorkflowStepRunQuery) Unique(unique bool) *WorkflowStepRunQuery
- func (_q *WorkflowStepRunQuery) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunQuery
- type WorkflowStepRunSelect
- func (_s *WorkflowStepRunSelect) Aggregate(fns ...AggregateFunc) *WorkflowStepRunSelect
- func (s *WorkflowStepRunSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowStepRunSelect) BoolX(ctx context.Context) bool
- func (s *WorkflowStepRunSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowStepRunSelect) BoolsX(ctx context.Context) []bool
- func (s *WorkflowStepRunSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowStepRunSelect) Float64X(ctx context.Context) float64
- func (s *WorkflowStepRunSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowStepRunSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkflowStepRunSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowStepRunSelect) IntX(ctx context.Context) int
- func (s *WorkflowStepRunSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowStepRunSelect) IntsX(ctx context.Context) []int
- func (_s *WorkflowStepRunSelect) Scan(ctx context.Context, v any) error
- func (s *WorkflowStepRunSelect) ScanX(ctx context.Context, v any)
- func (s *WorkflowStepRunSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowStepRunSelect) StringX(ctx context.Context) string
- func (s *WorkflowStepRunSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowStepRunSelect) StringsX(ctx context.Context) []string
- type WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) ClearAgent() *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) ClearCompletedAt() *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) ClearErrorMessage() *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) ClearResult() *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) ClearStartedAt() *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) Exec(ctx context.Context) error
- func (_u *WorkflowStepRunUpdate) ExecX(ctx context.Context)
- func (_u *WorkflowStepRunUpdate) Mutation() *WorkflowStepRunMutation
- func (_u *WorkflowStepRunUpdate) Save(ctx context.Context) (int, error)
- func (_u *WorkflowStepRunUpdate) SaveX(ctx context.Context) int
- func (_u *WorkflowStepRunUpdate) SetAgent(v string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetCompletedAt(v time.Time) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetErrorMessage(v string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableAgent(v *string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableCompletedAt(v *time.Time) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableErrorMessage(v *string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillablePrompt(v *string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableResult(v *string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableRunID(v *uuid.UUID) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableStartedAt(v *time.Time) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableStatus(v *workflowsteprun.Status) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetNillableStepID(v *string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetPrompt(v string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetResult(v string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetRunID(v uuid.UUID) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetStartedAt(v time.Time) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetStatus(v workflowsteprun.Status) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) SetStepID(v string) *WorkflowStepRunUpdate
- func (_u *WorkflowStepRunUpdate) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunUpdate
- type WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) ClearAgent() *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) ClearCompletedAt() *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) ClearErrorMessage() *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) ClearResult() *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) ClearStartedAt() *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) Exec(ctx context.Context) error
- func (_u *WorkflowStepRunUpdateOne) ExecX(ctx context.Context)
- func (_u *WorkflowStepRunUpdateOne) Mutation() *WorkflowStepRunMutation
- func (_u *WorkflowStepRunUpdateOne) Save(ctx context.Context) (*WorkflowStepRun, error)
- func (_u *WorkflowStepRunUpdateOne) SaveX(ctx context.Context) *WorkflowStepRun
- func (_u *WorkflowStepRunUpdateOne) Select(field string, fields ...string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetAgent(v string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetCompletedAt(v time.Time) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetErrorMessage(v string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableAgent(v *string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableCompletedAt(v *time.Time) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableErrorMessage(v *string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillablePrompt(v *string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableResult(v *string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableRunID(v *uuid.UUID) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableStartedAt(v *time.Time) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableStatus(v *workflowsteprun.Status) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetNillableStepID(v *string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetPrompt(v string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetResult(v string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetRunID(v uuid.UUID) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetStartedAt(v time.Time) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetStatus(v workflowsteprun.Status) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) SetStepID(v string) *WorkflowStepRunUpdateOne
- func (_u *WorkflowStepRunUpdateOne) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunUpdateOne
- type WorkflowStepRuns
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAuditLog = "AuditLog" TypeConfigProfile = "ConfigProfile" TypeCronJob = "CronJob" TypeCronJobHistory = "CronJobHistory" TypeEscrowDeal = "EscrowDeal" TypeExternalRef = "ExternalRef" TypeInquiry = "Inquiry" TypeKey = "Key" TypeKnowledge = "Knowledge" TypeLearning = "Learning" TypeMessage = "Message" TypeObservation = "Observation" TypePaymentTx = "PaymentTx" TypePeerReputation = "PeerReputation" TypeReflection = "Reflection" TypeSecret = "Secret" TypeSession = "Session" TypeTokenUsage = "TokenUsage" TypeWorkflowRun = "WorkflowRun" TypeWorkflowStepRun = "WorkflowStepRun" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type AuditLog ¶
type AuditLog struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// SessionKey holds the value of the "session_key" field.
SessionKey string `json:"session_key,omitempty"`
// Action holds the value of the "action" field.
Action auditlog.Action `json:"action,omitempty"`
// Actor holds the value of the "actor" field.
Actor string `json:"actor,omitempty"`
// Target holds the value of the "target" field.
Target string `json:"target,omitempty"`
// Details holds the value of the "details" field.
Details map[string]interface{} `json:"details,omitempty"`
// Timestamp holds the value of the "timestamp" field.
Timestamp time.Time `json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
AuditLog is the model entity for the AuditLog schema.
func (*AuditLog) Unwrap ¶
Unwrap unwraps the AuditLog 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 (*AuditLog) Update ¶
func (_m *AuditLog) Update() *AuditLogUpdateOne
Update returns a builder for updating this AuditLog. Note that you need to call AuditLog.Unwrap() before calling this method if this AuditLog was returned from a transaction, and the transaction was committed or rolled back.
type AuditLogClient ¶
type AuditLogClient struct {
// contains filtered or unexported fields
}
AuditLogClient is a client for the AuditLog schema.
func NewAuditLogClient ¶
func NewAuditLogClient(c config) *AuditLogClient
NewAuditLogClient returns a client for the AuditLog from the given config.
func (*AuditLogClient) Create ¶
func (c *AuditLogClient) Create() *AuditLogCreate
Create returns a builder for creating a AuditLog entity.
func (*AuditLogClient) CreateBulk ¶
func (c *AuditLogClient) CreateBulk(builders ...*AuditLogCreate) *AuditLogCreateBulk
CreateBulk returns a builder for creating a bulk of AuditLog entities.
func (*AuditLogClient) Delete ¶
func (c *AuditLogClient) Delete() *AuditLogDelete
Delete returns a delete builder for AuditLog.
func (*AuditLogClient) DeleteOne ¶
func (c *AuditLogClient) DeleteOne(_m *AuditLog) *AuditLogDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AuditLogClient) DeleteOneID ¶
func (c *AuditLogClient) DeleteOneID(id uuid.UUID) *AuditLogDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AuditLogClient) Hooks ¶
func (c *AuditLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AuditLogClient) Intercept ¶
func (c *AuditLogClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `auditlog.Intercept(f(g(h())))`.
func (*AuditLogClient) Interceptors ¶
func (c *AuditLogClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AuditLogClient) MapCreateBulk ¶
func (c *AuditLogClient) MapCreateBulk(slice any, setFunc func(*AuditLogCreate, int)) *AuditLogCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AuditLogClient) Query ¶
func (c *AuditLogClient) Query() *AuditLogQuery
Query returns a query builder for AuditLog.
func (*AuditLogClient) Update ¶
func (c *AuditLogClient) Update() *AuditLogUpdate
Update returns an update builder for AuditLog.
func (*AuditLogClient) UpdateOne ¶
func (c *AuditLogClient) UpdateOne(_m *AuditLog) *AuditLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AuditLogClient) UpdateOneID ¶
func (c *AuditLogClient) UpdateOneID(id uuid.UUID) *AuditLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AuditLogClient) Use ¶
func (c *AuditLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `auditlog.Hooks(f(g(h())))`.
type AuditLogCreate ¶
type AuditLogCreate struct {
// contains filtered or unexported fields
}
AuditLogCreate is the builder for creating a AuditLog entity.
func (*AuditLogCreate) Exec ¶
func (_c *AuditLogCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuditLogCreate) ExecX ¶
func (_c *AuditLogCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditLogCreate) Mutation ¶
func (_c *AuditLogCreate) Mutation() *AuditLogMutation
Mutation returns the AuditLogMutation object of the builder.
func (*AuditLogCreate) Save ¶
func (_c *AuditLogCreate) Save(ctx context.Context) (*AuditLog, error)
Save creates the AuditLog in the database.
func (*AuditLogCreate) SaveX ¶
func (_c *AuditLogCreate) SaveX(ctx context.Context) *AuditLog
SaveX calls Save and panics if Save returns an error.
func (*AuditLogCreate) SetAction ¶
func (_c *AuditLogCreate) SetAction(v auditlog.Action) *AuditLogCreate
SetAction sets the "action" field.
func (*AuditLogCreate) SetActor ¶
func (_c *AuditLogCreate) SetActor(v string) *AuditLogCreate
SetActor sets the "actor" field.
func (*AuditLogCreate) SetDetails ¶
func (_c *AuditLogCreate) SetDetails(v map[string]interface{}) *AuditLogCreate
SetDetails sets the "details" field.
func (*AuditLogCreate) SetID ¶
func (_c *AuditLogCreate) SetID(v uuid.UUID) *AuditLogCreate
SetID sets the "id" field.
func (*AuditLogCreate) SetNillableID ¶
func (_c *AuditLogCreate) SetNillableID(v *uuid.UUID) *AuditLogCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AuditLogCreate) SetNillableSessionKey ¶
func (_c *AuditLogCreate) SetNillableSessionKey(v *string) *AuditLogCreate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*AuditLogCreate) SetNillableTarget ¶
func (_c *AuditLogCreate) SetNillableTarget(v *string) *AuditLogCreate
SetNillableTarget sets the "target" field if the given value is not nil.
func (*AuditLogCreate) SetNillableTimestamp ¶
func (_c *AuditLogCreate) SetNillableTimestamp(v *time.Time) *AuditLogCreate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*AuditLogCreate) SetSessionKey ¶
func (_c *AuditLogCreate) SetSessionKey(v string) *AuditLogCreate
SetSessionKey sets the "session_key" field.
func (*AuditLogCreate) SetTarget ¶
func (_c *AuditLogCreate) SetTarget(v string) *AuditLogCreate
SetTarget sets the "target" field.
func (*AuditLogCreate) SetTimestamp ¶
func (_c *AuditLogCreate) SetTimestamp(v time.Time) *AuditLogCreate
SetTimestamp sets the "timestamp" field.
type AuditLogCreateBulk ¶
type AuditLogCreateBulk struct {
// contains filtered or unexported fields
}
AuditLogCreateBulk is the builder for creating many AuditLog entities in bulk.
func (*AuditLogCreateBulk) Exec ¶
func (_c *AuditLogCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AuditLogCreateBulk) ExecX ¶
func (_c *AuditLogCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AuditLogDelete ¶
type AuditLogDelete struct {
// contains filtered or unexported fields
}
AuditLogDelete is the builder for deleting a AuditLog entity.
func (*AuditLogDelete) Exec ¶
func (_d *AuditLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AuditLogDelete) ExecX ¶
func (_d *AuditLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AuditLogDelete) Where ¶
func (_d *AuditLogDelete) Where(ps ...predicate.AuditLog) *AuditLogDelete
Where appends a list predicates to the AuditLogDelete builder.
type AuditLogDeleteOne ¶
type AuditLogDeleteOne struct {
// contains filtered or unexported fields
}
AuditLogDeleteOne is the builder for deleting a single AuditLog entity.
func (*AuditLogDeleteOne) Exec ¶
func (_d *AuditLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AuditLogDeleteOne) ExecX ¶
func (_d *AuditLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditLogDeleteOne) Where ¶
func (_d *AuditLogDeleteOne) Where(ps ...predicate.AuditLog) *AuditLogDeleteOne
Where appends a list predicates to the AuditLogDelete builder.
type AuditLogGroupBy ¶
type AuditLogGroupBy struct {
// contains filtered or unexported fields
}
AuditLogGroupBy is the group-by builder for AuditLog entities.
func (*AuditLogGroupBy) Aggregate ¶
func (_g *AuditLogGroupBy) Aggregate(fns ...AggregateFunc) *AuditLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AuditLogGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuditLogGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuditLogGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuditLogGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuditLogGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuditLogGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuditLogGroupBy) Scan ¶
func (_g *AuditLogGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuditLogGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuditLogMutation ¶
type AuditLogMutation struct {
// contains filtered or unexported fields
}
AuditLogMutation represents an operation that mutates the AuditLog nodes in the graph.
func (*AuditLogMutation) Action ¶
func (m *AuditLogMutation) Action() (r auditlog.Action, exists bool)
Action returns the value of the "action" field in the mutation.
func (*AuditLogMutation) Actor ¶
func (m *AuditLogMutation) Actor() (r string, exists bool)
Actor returns the value of the "actor" field in the mutation.
func (*AuditLogMutation) AddField ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) AddedEdges ¶
func (m *AuditLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AuditLogMutation) AddedField ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) AddedFields ¶
func (m *AuditLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AuditLogMutation) AddedIDs ¶
func (m *AuditLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AuditLogMutation) ClearDetails ¶
func (m *AuditLogMutation) ClearDetails()
ClearDetails clears the value of the "details" field.
func (*AuditLogMutation) ClearEdge ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) ClearField ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) ClearSessionKey ¶
func (m *AuditLogMutation) ClearSessionKey()
ClearSessionKey clears the value of the "session_key" field.
func (*AuditLogMutation) ClearTarget ¶
func (m *AuditLogMutation) ClearTarget()
ClearTarget clears the value of the "target" field.
func (*AuditLogMutation) ClearedEdges ¶
func (m *AuditLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AuditLogMutation) ClearedFields ¶
func (m *AuditLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AuditLogMutation) Client ¶
func (m AuditLogMutation) 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 (*AuditLogMutation) Details ¶
func (m *AuditLogMutation) Details() (r map[string]interface{}, exists bool)
Details returns the value of the "details" field in the mutation.
func (*AuditLogMutation) DetailsCleared ¶
func (m *AuditLogMutation) DetailsCleared() bool
DetailsCleared returns if the "details" field was cleared in this mutation.
func (*AuditLogMutation) EdgeCleared ¶
func (m *AuditLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AuditLogMutation) Field ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) FieldCleared ¶
func (m *AuditLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AuditLogMutation) Fields ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) ID ¶
func (m *AuditLogMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AuditLogMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AuditLogMutation) OldAction ¶
OldAction returns the old "action" field's value of the AuditLog entity. If the AuditLog 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 (*AuditLogMutation) OldActor ¶
func (m *AuditLogMutation) OldActor(ctx context.Context) (v string, err error)
OldActor returns the old "actor" field's value of the AuditLog entity. If the AuditLog 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 (*AuditLogMutation) OldDetails ¶
func (m *AuditLogMutation) OldDetails(ctx context.Context) (v map[string]interface{}, err error)
OldDetails returns the old "details" field's value of the AuditLog entity. If the AuditLog 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 (*AuditLogMutation) 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 (*AuditLogMutation) OldSessionKey ¶
func (m *AuditLogMutation) OldSessionKey(ctx context.Context) (v string, err error)
OldSessionKey returns the old "session_key" field's value of the AuditLog entity. If the AuditLog 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 (*AuditLogMutation) OldTarget ¶
func (m *AuditLogMutation) OldTarget(ctx context.Context) (v string, err error)
OldTarget returns the old "target" field's value of the AuditLog entity. If the AuditLog 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 (*AuditLogMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the AuditLog entity. If the AuditLog 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 (*AuditLogMutation) RemovedEdges ¶
func (m *AuditLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AuditLogMutation) RemovedIDs ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) ResetAction ¶
func (m *AuditLogMutation) ResetAction()
ResetAction resets all changes to the "action" field.
func (*AuditLogMutation) ResetActor ¶
func (m *AuditLogMutation) ResetActor()
ResetActor resets all changes to the "actor" field.
func (*AuditLogMutation) ResetDetails ¶
func (m *AuditLogMutation) ResetDetails()
ResetDetails resets all changes to the "details" field.
func (*AuditLogMutation) ResetEdge ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) ResetField ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) ResetSessionKey ¶
func (m *AuditLogMutation) ResetSessionKey()
ResetSessionKey resets all changes to the "session_key" field.
func (*AuditLogMutation) ResetTarget ¶
func (m *AuditLogMutation) ResetTarget()
ResetTarget resets all changes to the "target" field.
func (*AuditLogMutation) ResetTimestamp ¶
func (m *AuditLogMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*AuditLogMutation) SessionKey ¶
func (m *AuditLogMutation) SessionKey() (r string, exists bool)
SessionKey returns the value of the "session_key" field in the mutation.
func (*AuditLogMutation) SessionKeyCleared ¶
func (m *AuditLogMutation) SessionKeyCleared() bool
SessionKeyCleared returns if the "session_key" field was cleared in this mutation.
func (*AuditLogMutation) SetAction ¶
func (m *AuditLogMutation) SetAction(a auditlog.Action)
SetAction sets the "action" field.
func (*AuditLogMutation) SetActor ¶
func (m *AuditLogMutation) SetActor(s string)
SetActor sets the "actor" field.
func (*AuditLogMutation) SetDetails ¶
func (m *AuditLogMutation) SetDetails(value map[string]interface{})
SetDetails sets the "details" field.
func (*AuditLogMutation) SetField ¶
func (m *AuditLogMutation) 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 (*AuditLogMutation) SetID ¶
func (m *AuditLogMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AuditLog entities.
func (*AuditLogMutation) SetOp ¶
func (m *AuditLogMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AuditLogMutation) SetSessionKey ¶
func (m *AuditLogMutation) SetSessionKey(s string)
SetSessionKey sets the "session_key" field.
func (*AuditLogMutation) SetTarget ¶
func (m *AuditLogMutation) SetTarget(s string)
SetTarget sets the "target" field.
func (*AuditLogMutation) SetTimestamp ¶
func (m *AuditLogMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*AuditLogMutation) Target ¶
func (m *AuditLogMutation) Target() (r string, exists bool)
Target returns the value of the "target" field in the mutation.
func (*AuditLogMutation) TargetCleared ¶
func (m *AuditLogMutation) TargetCleared() bool
TargetCleared returns if the "target" field was cleared in this mutation.
func (*AuditLogMutation) Timestamp ¶
func (m *AuditLogMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (AuditLogMutation) Tx ¶
func (m AuditLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AuditLogMutation) Type ¶
func (m *AuditLogMutation) Type() string
Type returns the node type of this mutation (AuditLog).
func (*AuditLogMutation) Where ¶
func (m *AuditLogMutation) Where(ps ...predicate.AuditLog)
Where appends a list predicates to the AuditLogMutation builder.
func (*AuditLogMutation) WhereP ¶
func (m *AuditLogMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AuditLogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AuditLogQuery ¶
type AuditLogQuery struct {
// contains filtered or unexported fields
}
AuditLogQuery is the builder for querying AuditLog entities.
func (*AuditLogQuery) Aggregate ¶
func (_q *AuditLogQuery) Aggregate(fns ...AggregateFunc) *AuditLogSelect
Aggregate returns a AuditLogSelect configured with the given aggregations.
func (*AuditLogQuery) All ¶
func (_q *AuditLogQuery) All(ctx context.Context) ([]*AuditLog, error)
All executes the query and returns a list of AuditLogs.
func (*AuditLogQuery) AllX ¶
func (_q *AuditLogQuery) AllX(ctx context.Context) []*AuditLog
AllX is like All, but panics if an error occurs.
func (*AuditLogQuery) Clone ¶
func (_q *AuditLogQuery) Clone() *AuditLogQuery
Clone returns a duplicate of the AuditLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AuditLogQuery) Count ¶
func (_q *AuditLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AuditLogQuery) CountX ¶
func (_q *AuditLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AuditLogQuery) Exist ¶
func (_q *AuditLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AuditLogQuery) ExistX ¶
func (_q *AuditLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AuditLogQuery) First ¶
func (_q *AuditLogQuery) First(ctx context.Context) (*AuditLog, error)
First returns the first AuditLog entity from the query. Returns a *NotFoundError when no AuditLog was found.
func (*AuditLogQuery) FirstID ¶
FirstID returns the first AuditLog ID from the query. Returns a *NotFoundError when no AuditLog ID was found.
func (*AuditLogQuery) FirstIDX ¶
func (_q *AuditLogQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AuditLogQuery) FirstX ¶
func (_q *AuditLogQuery) FirstX(ctx context.Context) *AuditLog
FirstX is like First, but panics if an error occurs.
func (*AuditLogQuery) GroupBy ¶
func (_q *AuditLogQuery) GroupBy(field string, fields ...string) *AuditLogGroupBy
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 {
SessionKey string `json:"session_key,omitempty"`
Count int `json:"count,omitempty"`
}
client.AuditLog.Query().
GroupBy(auditlog.FieldSessionKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AuditLogQuery) IDsX ¶
func (_q *AuditLogQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AuditLogQuery) Limit ¶
func (_q *AuditLogQuery) Limit(limit int) *AuditLogQuery
Limit the number of records to be returned by this query.
func (*AuditLogQuery) Offset ¶
func (_q *AuditLogQuery) Offset(offset int) *AuditLogQuery
Offset to start from.
func (*AuditLogQuery) Only ¶
func (_q *AuditLogQuery) Only(ctx context.Context) (*AuditLog, error)
Only returns a single AuditLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AuditLog entity is found. Returns a *NotFoundError when no AuditLog entities are found.
func (*AuditLogQuery) OnlyID ¶
OnlyID is like Only, but returns the only AuditLog ID in the query. Returns a *NotSingularError when more than one AuditLog ID is found. Returns a *NotFoundError when no entities are found.
func (*AuditLogQuery) OnlyIDX ¶
func (_q *AuditLogQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AuditLogQuery) OnlyX ¶
func (_q *AuditLogQuery) OnlyX(ctx context.Context) *AuditLog
OnlyX is like Only, but panics if an error occurs.
func (*AuditLogQuery) Order ¶
func (_q *AuditLogQuery) Order(o ...auditlog.OrderOption) *AuditLogQuery
Order specifies how the records should be ordered.
func (*AuditLogQuery) Select ¶
func (_q *AuditLogQuery) Select(fields ...string) *AuditLogSelect
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 {
SessionKey string `json:"session_key,omitempty"`
}
client.AuditLog.Query().
Select(auditlog.FieldSessionKey).
Scan(ctx, &v)
func (*AuditLogQuery) Unique ¶
func (_q *AuditLogQuery) Unique(unique bool) *AuditLogQuery
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 (*AuditLogQuery) Where ¶
func (_q *AuditLogQuery) Where(ps ...predicate.AuditLog) *AuditLogQuery
Where adds a new predicate for the AuditLogQuery builder.
type AuditLogSelect ¶
type AuditLogSelect struct {
*AuditLogQuery
// contains filtered or unexported fields
}
AuditLogSelect is the builder for selecting fields of AuditLog entities.
func (*AuditLogSelect) Aggregate ¶
func (_s *AuditLogSelect) Aggregate(fns ...AggregateFunc) *AuditLogSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AuditLogSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AuditLogSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AuditLogSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AuditLogSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AuditLogSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AuditLogSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AuditLogSelect) Scan ¶
func (_s *AuditLogSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AuditLogSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AuditLogUpdate ¶
type AuditLogUpdate struct {
// contains filtered or unexported fields
}
AuditLogUpdate is the builder for updating AuditLog entities.
func (*AuditLogUpdate) ClearDetails ¶
func (_u *AuditLogUpdate) ClearDetails() *AuditLogUpdate
ClearDetails clears the value of the "details" field.
func (*AuditLogUpdate) ClearSessionKey ¶
func (_u *AuditLogUpdate) ClearSessionKey() *AuditLogUpdate
ClearSessionKey clears the value of the "session_key" field.
func (*AuditLogUpdate) ClearTarget ¶
func (_u *AuditLogUpdate) ClearTarget() *AuditLogUpdate
ClearTarget clears the value of the "target" field.
func (*AuditLogUpdate) Exec ¶
func (_u *AuditLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AuditLogUpdate) ExecX ¶
func (_u *AuditLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditLogUpdate) Mutation ¶
func (_u *AuditLogUpdate) Mutation() *AuditLogMutation
Mutation returns the AuditLogMutation object of the builder.
func (*AuditLogUpdate) Save ¶
func (_u *AuditLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AuditLogUpdate) SaveX ¶
func (_u *AuditLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AuditLogUpdate) SetAction ¶
func (_u *AuditLogUpdate) SetAction(v auditlog.Action) *AuditLogUpdate
SetAction sets the "action" field.
func (*AuditLogUpdate) SetActor ¶
func (_u *AuditLogUpdate) SetActor(v string) *AuditLogUpdate
SetActor sets the "actor" field.
func (*AuditLogUpdate) SetDetails ¶
func (_u *AuditLogUpdate) SetDetails(v map[string]interface{}) *AuditLogUpdate
SetDetails sets the "details" field.
func (*AuditLogUpdate) SetNillableAction ¶
func (_u *AuditLogUpdate) SetNillableAction(v *auditlog.Action) *AuditLogUpdate
SetNillableAction sets the "action" field if the given value is not nil.
func (*AuditLogUpdate) SetNillableActor ¶
func (_u *AuditLogUpdate) SetNillableActor(v *string) *AuditLogUpdate
SetNillableActor sets the "actor" field if the given value is not nil.
func (*AuditLogUpdate) SetNillableSessionKey ¶
func (_u *AuditLogUpdate) SetNillableSessionKey(v *string) *AuditLogUpdate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*AuditLogUpdate) SetNillableTarget ¶
func (_u *AuditLogUpdate) SetNillableTarget(v *string) *AuditLogUpdate
SetNillableTarget sets the "target" field if the given value is not nil.
func (*AuditLogUpdate) SetSessionKey ¶
func (_u *AuditLogUpdate) SetSessionKey(v string) *AuditLogUpdate
SetSessionKey sets the "session_key" field.
func (*AuditLogUpdate) SetTarget ¶
func (_u *AuditLogUpdate) SetTarget(v string) *AuditLogUpdate
SetTarget sets the "target" field.
func (*AuditLogUpdate) Where ¶
func (_u *AuditLogUpdate) Where(ps ...predicate.AuditLog) *AuditLogUpdate
Where appends a list predicates to the AuditLogUpdate builder.
type AuditLogUpdateOne ¶
type AuditLogUpdateOne struct {
// contains filtered or unexported fields
}
AuditLogUpdateOne is the builder for updating a single AuditLog entity.
func (*AuditLogUpdateOne) ClearDetails ¶
func (_u *AuditLogUpdateOne) ClearDetails() *AuditLogUpdateOne
ClearDetails clears the value of the "details" field.
func (*AuditLogUpdateOne) ClearSessionKey ¶
func (_u *AuditLogUpdateOne) ClearSessionKey() *AuditLogUpdateOne
ClearSessionKey clears the value of the "session_key" field.
func (*AuditLogUpdateOne) ClearTarget ¶
func (_u *AuditLogUpdateOne) ClearTarget() *AuditLogUpdateOne
ClearTarget clears the value of the "target" field.
func (*AuditLogUpdateOne) Exec ¶
func (_u *AuditLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AuditLogUpdateOne) ExecX ¶
func (_u *AuditLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AuditLogUpdateOne) Mutation ¶
func (_u *AuditLogUpdateOne) Mutation() *AuditLogMutation
Mutation returns the AuditLogMutation object of the builder.
func (*AuditLogUpdateOne) Save ¶
func (_u *AuditLogUpdateOne) Save(ctx context.Context) (*AuditLog, error)
Save executes the query and returns the updated AuditLog entity.
func (*AuditLogUpdateOne) SaveX ¶
func (_u *AuditLogUpdateOne) SaveX(ctx context.Context) *AuditLog
SaveX is like Save, but panics if an error occurs.
func (*AuditLogUpdateOne) Select ¶
func (_u *AuditLogUpdateOne) Select(field string, fields ...string) *AuditLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AuditLogUpdateOne) SetAction ¶
func (_u *AuditLogUpdateOne) SetAction(v auditlog.Action) *AuditLogUpdateOne
SetAction sets the "action" field.
func (*AuditLogUpdateOne) SetActor ¶
func (_u *AuditLogUpdateOne) SetActor(v string) *AuditLogUpdateOne
SetActor sets the "actor" field.
func (*AuditLogUpdateOne) SetDetails ¶
func (_u *AuditLogUpdateOne) SetDetails(v map[string]interface{}) *AuditLogUpdateOne
SetDetails sets the "details" field.
func (*AuditLogUpdateOne) SetNillableAction ¶
func (_u *AuditLogUpdateOne) SetNillableAction(v *auditlog.Action) *AuditLogUpdateOne
SetNillableAction sets the "action" field if the given value is not nil.
func (*AuditLogUpdateOne) SetNillableActor ¶
func (_u *AuditLogUpdateOne) SetNillableActor(v *string) *AuditLogUpdateOne
SetNillableActor sets the "actor" field if the given value is not nil.
func (*AuditLogUpdateOne) SetNillableSessionKey ¶
func (_u *AuditLogUpdateOne) SetNillableSessionKey(v *string) *AuditLogUpdateOne
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*AuditLogUpdateOne) SetNillableTarget ¶
func (_u *AuditLogUpdateOne) SetNillableTarget(v *string) *AuditLogUpdateOne
SetNillableTarget sets the "target" field if the given value is not nil.
func (*AuditLogUpdateOne) SetSessionKey ¶
func (_u *AuditLogUpdateOne) SetSessionKey(v string) *AuditLogUpdateOne
SetSessionKey sets the "session_key" field.
func (*AuditLogUpdateOne) SetTarget ¶
func (_u *AuditLogUpdateOne) SetTarget(v string) *AuditLogUpdateOne
SetTarget sets the "target" field.
func (*AuditLogUpdateOne) Where ¶
func (_u *AuditLogUpdateOne) Where(ps ...predicate.AuditLog) *AuditLogUpdateOne
Where appends a list predicates to the AuditLogUpdate builder.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// AuditLog is the client for interacting with the AuditLog builders.
AuditLog *AuditLogClient
// ConfigProfile is the client for interacting with the ConfigProfile builders.
ConfigProfile *ConfigProfileClient
// CronJob is the client for interacting with the CronJob builders.
CronJob *CronJobClient
// CronJobHistory is the client for interacting with the CronJobHistory builders.
CronJobHistory *CronJobHistoryClient
// EscrowDeal is the client for interacting with the EscrowDeal builders.
EscrowDeal *EscrowDealClient
// ExternalRef is the client for interacting with the ExternalRef builders.
ExternalRef *ExternalRefClient
// Inquiry is the client for interacting with the Inquiry builders.
Inquiry *InquiryClient
// Key is the client for interacting with the Key builders.
Key *KeyClient
// Knowledge is the client for interacting with the Knowledge builders.
Knowledge *KnowledgeClient
// Learning is the client for interacting with the Learning builders.
Learning *LearningClient
// Message is the client for interacting with the Message builders.
Message *MessageClient
// Observation is the client for interacting with the Observation builders.
Observation *ObservationClient
// PaymentTx is the client for interacting with the PaymentTx builders.
PaymentTx *PaymentTxClient
// PeerReputation is the client for interacting with the PeerReputation builders.
PeerReputation *PeerReputationClient
// Reflection is the client for interacting with the Reflection builders.
Reflection *ReflectionClient
// Secret is the client for interacting with the Secret builders.
Secret *SecretClient
// Session is the client for interacting with the Session builders.
Session *SessionClient
// TokenUsage is the client for interacting with the TokenUsage builders.
TokenUsage *TokenUsageClient
// WorkflowRun is the client for interacting with the WorkflowRun builders.
WorkflowRun *WorkflowRunClient
// WorkflowStepRun is the client for interacting with the WorkflowStepRun builders.
WorkflowStepRun *WorkflowStepRunClient
// 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(). AuditLog. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type ConfigProfile ¶
type ConfigProfile struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Profile identifier (e.g., default, staging, production)
Name string `json:"name,omitempty"`
// AES-256-GCM encrypted JSON configuration blob
EncryptedData []byte `json:"encrypted_data,omitempty"`
// Whether this profile is the currently active one
Active bool `json:"active,omitempty"`
// Schema version for forward compatibility
Version int `json:"version,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
ConfigProfile is the model entity for the ConfigProfile schema.
func (*ConfigProfile) String ¶
func (_m *ConfigProfile) String() string
String implements the fmt.Stringer.
func (*ConfigProfile) Unwrap ¶
func (_m *ConfigProfile) Unwrap() *ConfigProfile
Unwrap unwraps the ConfigProfile 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 (*ConfigProfile) Update ¶
func (_m *ConfigProfile) Update() *ConfigProfileUpdateOne
Update returns a builder for updating this ConfigProfile. Note that you need to call ConfigProfile.Unwrap() before calling this method if this ConfigProfile was returned from a transaction, and the transaction was committed or rolled back.
type ConfigProfileClient ¶
type ConfigProfileClient struct {
// contains filtered or unexported fields
}
ConfigProfileClient is a client for the ConfigProfile schema.
func NewConfigProfileClient ¶
func NewConfigProfileClient(c config) *ConfigProfileClient
NewConfigProfileClient returns a client for the ConfigProfile from the given config.
func (*ConfigProfileClient) Create ¶
func (c *ConfigProfileClient) Create() *ConfigProfileCreate
Create returns a builder for creating a ConfigProfile entity.
func (*ConfigProfileClient) CreateBulk ¶
func (c *ConfigProfileClient) CreateBulk(builders ...*ConfigProfileCreate) *ConfigProfileCreateBulk
CreateBulk returns a builder for creating a bulk of ConfigProfile entities.
func (*ConfigProfileClient) Delete ¶
func (c *ConfigProfileClient) Delete() *ConfigProfileDelete
Delete returns a delete builder for ConfigProfile.
func (*ConfigProfileClient) DeleteOne ¶
func (c *ConfigProfileClient) DeleteOne(_m *ConfigProfile) *ConfigProfileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ConfigProfileClient) DeleteOneID ¶
func (c *ConfigProfileClient) DeleteOneID(id uuid.UUID) *ConfigProfileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ConfigProfileClient) Get ¶
func (c *ConfigProfileClient) Get(ctx context.Context, id uuid.UUID) (*ConfigProfile, error)
Get returns a ConfigProfile entity by its id.
func (*ConfigProfileClient) GetX ¶
func (c *ConfigProfileClient) GetX(ctx context.Context, id uuid.UUID) *ConfigProfile
GetX is like Get, but panics if an error occurs.
func (*ConfigProfileClient) Hooks ¶
func (c *ConfigProfileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ConfigProfileClient) Intercept ¶
func (c *ConfigProfileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `configprofile.Intercept(f(g(h())))`.
func (*ConfigProfileClient) Interceptors ¶
func (c *ConfigProfileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ConfigProfileClient) MapCreateBulk ¶
func (c *ConfigProfileClient) MapCreateBulk(slice any, setFunc func(*ConfigProfileCreate, int)) *ConfigProfileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ConfigProfileClient) Query ¶
func (c *ConfigProfileClient) Query() *ConfigProfileQuery
Query returns a query builder for ConfigProfile.
func (*ConfigProfileClient) Update ¶
func (c *ConfigProfileClient) Update() *ConfigProfileUpdate
Update returns an update builder for ConfigProfile.
func (*ConfigProfileClient) UpdateOne ¶
func (c *ConfigProfileClient) UpdateOne(_m *ConfigProfile) *ConfigProfileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ConfigProfileClient) UpdateOneID ¶
func (c *ConfigProfileClient) UpdateOneID(id uuid.UUID) *ConfigProfileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ConfigProfileClient) Use ¶
func (c *ConfigProfileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `configprofile.Hooks(f(g(h())))`.
type ConfigProfileCreate ¶
type ConfigProfileCreate struct {
// contains filtered or unexported fields
}
ConfigProfileCreate is the builder for creating a ConfigProfile entity.
func (*ConfigProfileCreate) Exec ¶
func (_c *ConfigProfileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConfigProfileCreate) ExecX ¶
func (_c *ConfigProfileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigProfileCreate) Mutation ¶
func (_c *ConfigProfileCreate) Mutation() *ConfigProfileMutation
Mutation returns the ConfigProfileMutation object of the builder.
func (*ConfigProfileCreate) Save ¶
func (_c *ConfigProfileCreate) Save(ctx context.Context) (*ConfigProfile, error)
Save creates the ConfigProfile in the database.
func (*ConfigProfileCreate) SaveX ¶
func (_c *ConfigProfileCreate) SaveX(ctx context.Context) *ConfigProfile
SaveX calls Save and panics if Save returns an error.
func (*ConfigProfileCreate) SetActive ¶
func (_c *ConfigProfileCreate) SetActive(v bool) *ConfigProfileCreate
SetActive sets the "active" field.
func (*ConfigProfileCreate) SetCreatedAt ¶
func (_c *ConfigProfileCreate) SetCreatedAt(v time.Time) *ConfigProfileCreate
SetCreatedAt sets the "created_at" field.
func (*ConfigProfileCreate) SetEncryptedData ¶
func (_c *ConfigProfileCreate) SetEncryptedData(v []byte) *ConfigProfileCreate
SetEncryptedData sets the "encrypted_data" field.
func (*ConfigProfileCreate) SetID ¶
func (_c *ConfigProfileCreate) SetID(v uuid.UUID) *ConfigProfileCreate
SetID sets the "id" field.
func (*ConfigProfileCreate) SetName ¶
func (_c *ConfigProfileCreate) SetName(v string) *ConfigProfileCreate
SetName sets the "name" field.
func (*ConfigProfileCreate) SetNillableActive ¶
func (_c *ConfigProfileCreate) SetNillableActive(v *bool) *ConfigProfileCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*ConfigProfileCreate) SetNillableCreatedAt ¶
func (_c *ConfigProfileCreate) SetNillableCreatedAt(v *time.Time) *ConfigProfileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ConfigProfileCreate) SetNillableID ¶
func (_c *ConfigProfileCreate) SetNillableID(v *uuid.UUID) *ConfigProfileCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ConfigProfileCreate) SetNillableUpdatedAt ¶
func (_c *ConfigProfileCreate) SetNillableUpdatedAt(v *time.Time) *ConfigProfileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ConfigProfileCreate) SetNillableVersion ¶
func (_c *ConfigProfileCreate) SetNillableVersion(v *int) *ConfigProfileCreate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*ConfigProfileCreate) SetUpdatedAt ¶
func (_c *ConfigProfileCreate) SetUpdatedAt(v time.Time) *ConfigProfileCreate
SetUpdatedAt sets the "updated_at" field.
func (*ConfigProfileCreate) SetVersion ¶
func (_c *ConfigProfileCreate) SetVersion(v int) *ConfigProfileCreate
SetVersion sets the "version" field.
type ConfigProfileCreateBulk ¶
type ConfigProfileCreateBulk struct {
// contains filtered or unexported fields
}
ConfigProfileCreateBulk is the builder for creating many ConfigProfile entities in bulk.
func (*ConfigProfileCreateBulk) Exec ¶
func (_c *ConfigProfileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ConfigProfileCreateBulk) ExecX ¶
func (_c *ConfigProfileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigProfileCreateBulk) Save ¶
func (_c *ConfigProfileCreateBulk) Save(ctx context.Context) ([]*ConfigProfile, error)
Save creates the ConfigProfile entities in the database.
func (*ConfigProfileCreateBulk) SaveX ¶
func (_c *ConfigProfileCreateBulk) SaveX(ctx context.Context) []*ConfigProfile
SaveX is like Save, but panics if an error occurs.
type ConfigProfileDelete ¶
type ConfigProfileDelete struct {
// contains filtered or unexported fields
}
ConfigProfileDelete is the builder for deleting a ConfigProfile entity.
func (*ConfigProfileDelete) Exec ¶
func (_d *ConfigProfileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ConfigProfileDelete) ExecX ¶
func (_d *ConfigProfileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ConfigProfileDelete) Where ¶
func (_d *ConfigProfileDelete) Where(ps ...predicate.ConfigProfile) *ConfigProfileDelete
Where appends a list predicates to the ConfigProfileDelete builder.
type ConfigProfileDeleteOne ¶
type ConfigProfileDeleteOne struct {
// contains filtered or unexported fields
}
ConfigProfileDeleteOne is the builder for deleting a single ConfigProfile entity.
func (*ConfigProfileDeleteOne) Exec ¶
func (_d *ConfigProfileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ConfigProfileDeleteOne) ExecX ¶
func (_d *ConfigProfileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigProfileDeleteOne) Where ¶
func (_d *ConfigProfileDeleteOne) Where(ps ...predicate.ConfigProfile) *ConfigProfileDeleteOne
Where appends a list predicates to the ConfigProfileDelete builder.
type ConfigProfileGroupBy ¶
type ConfigProfileGroupBy struct {
// contains filtered or unexported fields
}
ConfigProfileGroupBy is the group-by builder for ConfigProfile entities.
func (*ConfigProfileGroupBy) Aggregate ¶
func (_g *ConfigProfileGroupBy) Aggregate(fns ...AggregateFunc) *ConfigProfileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ConfigProfileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConfigProfileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConfigProfileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConfigProfileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConfigProfileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConfigProfileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConfigProfileGroupBy) Scan ¶
func (_g *ConfigProfileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConfigProfileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConfigProfileMutation ¶
type ConfigProfileMutation struct {
// contains filtered or unexported fields
}
ConfigProfileMutation represents an operation that mutates the ConfigProfile nodes in the graph.
func (*ConfigProfileMutation) Active ¶
func (m *ConfigProfileMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*ConfigProfileMutation) AddField ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) AddVersion ¶
func (m *ConfigProfileMutation) AddVersion(i int)
AddVersion adds i to the "version" field.
func (*ConfigProfileMutation) AddedEdges ¶
func (m *ConfigProfileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ConfigProfileMutation) AddedField ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) AddedFields ¶
func (m *ConfigProfileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ConfigProfileMutation) AddedIDs ¶
func (m *ConfigProfileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ConfigProfileMutation) AddedVersion ¶
func (m *ConfigProfileMutation) AddedVersion() (r int, exists bool)
AddedVersion returns the value that was added to the "version" field in this mutation.
func (*ConfigProfileMutation) ClearEdge ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) ClearField ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) ClearedEdges ¶
func (m *ConfigProfileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ConfigProfileMutation) ClearedFields ¶
func (m *ConfigProfileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ConfigProfileMutation) Client ¶
func (m ConfigProfileMutation) 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 (*ConfigProfileMutation) CreatedAt ¶
func (m *ConfigProfileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ConfigProfileMutation) EdgeCleared ¶
func (m *ConfigProfileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ConfigProfileMutation) EncryptedData ¶
func (m *ConfigProfileMutation) EncryptedData() (r []byte, exists bool)
EncryptedData returns the value of the "encrypted_data" field in the mutation.
func (*ConfigProfileMutation) Field ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) FieldCleared ¶
func (m *ConfigProfileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ConfigProfileMutation) Fields ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) ID ¶
func (m *ConfigProfileMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ConfigProfileMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ConfigProfileMutation) Name ¶
func (m *ConfigProfileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ConfigProfileMutation) OldActive ¶
func (m *ConfigProfileMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the ConfigProfile entity. If the ConfigProfile 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 (*ConfigProfileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ConfigProfile entity. If the ConfigProfile 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 (*ConfigProfileMutation) OldEncryptedData ¶
func (m *ConfigProfileMutation) OldEncryptedData(ctx context.Context) (v []byte, err error)
OldEncryptedData returns the old "encrypted_data" field's value of the ConfigProfile entity. If the ConfigProfile 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 (*ConfigProfileMutation) 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 (*ConfigProfileMutation) OldName ¶
func (m *ConfigProfileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ConfigProfile entity. If the ConfigProfile 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 (*ConfigProfileMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ConfigProfile entity. If the ConfigProfile 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 (*ConfigProfileMutation) OldVersion ¶
func (m *ConfigProfileMutation) OldVersion(ctx context.Context) (v int, err error)
OldVersion returns the old "version" field's value of the ConfigProfile entity. If the ConfigProfile 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 (*ConfigProfileMutation) Op ¶
func (m *ConfigProfileMutation) Op() Op
Op returns the operation name.
func (*ConfigProfileMutation) RemovedEdges ¶
func (m *ConfigProfileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ConfigProfileMutation) RemovedIDs ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) ResetActive ¶
func (m *ConfigProfileMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*ConfigProfileMutation) ResetCreatedAt ¶
func (m *ConfigProfileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ConfigProfileMutation) ResetEdge ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) ResetEncryptedData ¶
func (m *ConfigProfileMutation) ResetEncryptedData()
ResetEncryptedData resets all changes to the "encrypted_data" field.
func (*ConfigProfileMutation) ResetField ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) ResetName ¶
func (m *ConfigProfileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ConfigProfileMutation) ResetUpdatedAt ¶
func (m *ConfigProfileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ConfigProfileMutation) ResetVersion ¶
func (m *ConfigProfileMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*ConfigProfileMutation) SetActive ¶
func (m *ConfigProfileMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*ConfigProfileMutation) SetCreatedAt ¶
func (m *ConfigProfileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ConfigProfileMutation) SetEncryptedData ¶
func (m *ConfigProfileMutation) SetEncryptedData(b []byte)
SetEncryptedData sets the "encrypted_data" field.
func (*ConfigProfileMutation) SetField ¶
func (m *ConfigProfileMutation) 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 (*ConfigProfileMutation) SetID ¶
func (m *ConfigProfileMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ConfigProfile entities.
func (*ConfigProfileMutation) SetName ¶
func (m *ConfigProfileMutation) SetName(s string)
SetName sets the "name" field.
func (*ConfigProfileMutation) SetOp ¶
func (m *ConfigProfileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ConfigProfileMutation) SetUpdatedAt ¶
func (m *ConfigProfileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ConfigProfileMutation) SetVersion ¶
func (m *ConfigProfileMutation) SetVersion(i int)
SetVersion sets the "version" field.
func (ConfigProfileMutation) Tx ¶
func (m ConfigProfileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ConfigProfileMutation) Type ¶
func (m *ConfigProfileMutation) Type() string
Type returns the node type of this mutation (ConfigProfile).
func (*ConfigProfileMutation) UpdatedAt ¶
func (m *ConfigProfileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ConfigProfileMutation) Version ¶
func (m *ConfigProfileMutation) Version() (r int, exists bool)
Version returns the value of the "version" field in the mutation.
func (*ConfigProfileMutation) Where ¶
func (m *ConfigProfileMutation) Where(ps ...predicate.ConfigProfile)
Where appends a list predicates to the ConfigProfileMutation builder.
func (*ConfigProfileMutation) WhereP ¶
func (m *ConfigProfileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ConfigProfileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ConfigProfileQuery ¶
type ConfigProfileQuery struct {
// contains filtered or unexported fields
}
ConfigProfileQuery is the builder for querying ConfigProfile entities.
func (*ConfigProfileQuery) Aggregate ¶
func (_q *ConfigProfileQuery) Aggregate(fns ...AggregateFunc) *ConfigProfileSelect
Aggregate returns a ConfigProfileSelect configured with the given aggregations.
func (*ConfigProfileQuery) All ¶
func (_q *ConfigProfileQuery) All(ctx context.Context) ([]*ConfigProfile, error)
All executes the query and returns a list of ConfigProfiles.
func (*ConfigProfileQuery) AllX ¶
func (_q *ConfigProfileQuery) AllX(ctx context.Context) []*ConfigProfile
AllX is like All, but panics if an error occurs.
func (*ConfigProfileQuery) Clone ¶
func (_q *ConfigProfileQuery) Clone() *ConfigProfileQuery
Clone returns a duplicate of the ConfigProfileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ConfigProfileQuery) Count ¶
func (_q *ConfigProfileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ConfigProfileQuery) CountX ¶
func (_q *ConfigProfileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ConfigProfileQuery) Exist ¶
func (_q *ConfigProfileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ConfigProfileQuery) ExistX ¶
func (_q *ConfigProfileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ConfigProfileQuery) First ¶
func (_q *ConfigProfileQuery) First(ctx context.Context) (*ConfigProfile, error)
First returns the first ConfigProfile entity from the query. Returns a *NotFoundError when no ConfigProfile was found.
func (*ConfigProfileQuery) FirstID ¶
FirstID returns the first ConfigProfile ID from the query. Returns a *NotFoundError when no ConfigProfile ID was found.
func (*ConfigProfileQuery) FirstIDX ¶
func (_q *ConfigProfileQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ConfigProfileQuery) FirstX ¶
func (_q *ConfigProfileQuery) FirstX(ctx context.Context) *ConfigProfile
FirstX is like First, but panics if an error occurs.
func (*ConfigProfileQuery) GroupBy ¶
func (_q *ConfigProfileQuery) GroupBy(field string, fields ...string) *ConfigProfileGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.ConfigProfile.Query().
GroupBy(configprofile.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ConfigProfileQuery) IDsX ¶
func (_q *ConfigProfileQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ConfigProfileQuery) Limit ¶
func (_q *ConfigProfileQuery) Limit(limit int) *ConfigProfileQuery
Limit the number of records to be returned by this query.
func (*ConfigProfileQuery) Offset ¶
func (_q *ConfigProfileQuery) Offset(offset int) *ConfigProfileQuery
Offset to start from.
func (*ConfigProfileQuery) Only ¶
func (_q *ConfigProfileQuery) Only(ctx context.Context) (*ConfigProfile, error)
Only returns a single ConfigProfile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ConfigProfile entity is found. Returns a *NotFoundError when no ConfigProfile entities are found.
func (*ConfigProfileQuery) OnlyID ¶
OnlyID is like Only, but returns the only ConfigProfile ID in the query. Returns a *NotSingularError when more than one ConfigProfile ID is found. Returns a *NotFoundError when no entities are found.
func (*ConfigProfileQuery) OnlyIDX ¶
func (_q *ConfigProfileQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ConfigProfileQuery) OnlyX ¶
func (_q *ConfigProfileQuery) OnlyX(ctx context.Context) *ConfigProfile
OnlyX is like Only, but panics if an error occurs.
func (*ConfigProfileQuery) Order ¶
func (_q *ConfigProfileQuery) Order(o ...configprofile.OrderOption) *ConfigProfileQuery
Order specifies how the records should be ordered.
func (*ConfigProfileQuery) Select ¶
func (_q *ConfigProfileQuery) Select(fields ...string) *ConfigProfileSelect
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 {
Name string `json:"name,omitempty"`
}
client.ConfigProfile.Query().
Select(configprofile.FieldName).
Scan(ctx, &v)
func (*ConfigProfileQuery) Unique ¶
func (_q *ConfigProfileQuery) Unique(unique bool) *ConfigProfileQuery
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 (*ConfigProfileQuery) Where ¶
func (_q *ConfigProfileQuery) Where(ps ...predicate.ConfigProfile) *ConfigProfileQuery
Where adds a new predicate for the ConfigProfileQuery builder.
type ConfigProfileSelect ¶
type ConfigProfileSelect struct {
*ConfigProfileQuery
// contains filtered or unexported fields
}
ConfigProfileSelect is the builder for selecting fields of ConfigProfile entities.
func (*ConfigProfileSelect) Aggregate ¶
func (_s *ConfigProfileSelect) Aggregate(fns ...AggregateFunc) *ConfigProfileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ConfigProfileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConfigProfileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConfigProfileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConfigProfileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConfigProfileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConfigProfileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConfigProfileSelect) Scan ¶
func (_s *ConfigProfileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConfigProfileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConfigProfileUpdate ¶
type ConfigProfileUpdate struct {
// contains filtered or unexported fields
}
ConfigProfileUpdate is the builder for updating ConfigProfile entities.
func (*ConfigProfileUpdate) AddVersion ¶
func (_u *ConfigProfileUpdate) AddVersion(v int) *ConfigProfileUpdate
AddVersion adds value to the "version" field.
func (*ConfigProfileUpdate) Exec ¶
func (_u *ConfigProfileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConfigProfileUpdate) ExecX ¶
func (_u *ConfigProfileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigProfileUpdate) Mutation ¶
func (_u *ConfigProfileUpdate) Mutation() *ConfigProfileMutation
Mutation returns the ConfigProfileMutation object of the builder.
func (*ConfigProfileUpdate) Save ¶
func (_u *ConfigProfileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ConfigProfileUpdate) SaveX ¶
func (_u *ConfigProfileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ConfigProfileUpdate) SetActive ¶
func (_u *ConfigProfileUpdate) SetActive(v bool) *ConfigProfileUpdate
SetActive sets the "active" field.
func (*ConfigProfileUpdate) SetEncryptedData ¶
func (_u *ConfigProfileUpdate) SetEncryptedData(v []byte) *ConfigProfileUpdate
SetEncryptedData sets the "encrypted_data" field.
func (*ConfigProfileUpdate) SetName ¶
func (_u *ConfigProfileUpdate) SetName(v string) *ConfigProfileUpdate
SetName sets the "name" field.
func (*ConfigProfileUpdate) SetNillableActive ¶
func (_u *ConfigProfileUpdate) SetNillableActive(v *bool) *ConfigProfileUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*ConfigProfileUpdate) SetNillableName ¶
func (_u *ConfigProfileUpdate) SetNillableName(v *string) *ConfigProfileUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ConfigProfileUpdate) SetNillableVersion ¶
func (_u *ConfigProfileUpdate) SetNillableVersion(v *int) *ConfigProfileUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*ConfigProfileUpdate) SetUpdatedAt ¶
func (_u *ConfigProfileUpdate) SetUpdatedAt(v time.Time) *ConfigProfileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ConfigProfileUpdate) SetVersion ¶
func (_u *ConfigProfileUpdate) SetVersion(v int) *ConfigProfileUpdate
SetVersion sets the "version" field.
func (*ConfigProfileUpdate) Where ¶
func (_u *ConfigProfileUpdate) Where(ps ...predicate.ConfigProfile) *ConfigProfileUpdate
Where appends a list predicates to the ConfigProfileUpdate builder.
type ConfigProfileUpdateOne ¶
type ConfigProfileUpdateOne struct {
// contains filtered or unexported fields
}
ConfigProfileUpdateOne is the builder for updating a single ConfigProfile entity.
func (*ConfigProfileUpdateOne) AddVersion ¶
func (_u *ConfigProfileUpdateOne) AddVersion(v int) *ConfigProfileUpdateOne
AddVersion adds value to the "version" field.
func (*ConfigProfileUpdateOne) Exec ¶
func (_u *ConfigProfileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ConfigProfileUpdateOne) ExecX ¶
func (_u *ConfigProfileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigProfileUpdateOne) Mutation ¶
func (_u *ConfigProfileUpdateOne) Mutation() *ConfigProfileMutation
Mutation returns the ConfigProfileMutation object of the builder.
func (*ConfigProfileUpdateOne) Save ¶
func (_u *ConfigProfileUpdateOne) Save(ctx context.Context) (*ConfigProfile, error)
Save executes the query and returns the updated ConfigProfile entity.
func (*ConfigProfileUpdateOne) SaveX ¶
func (_u *ConfigProfileUpdateOne) SaveX(ctx context.Context) *ConfigProfile
SaveX is like Save, but panics if an error occurs.
func (*ConfigProfileUpdateOne) Select ¶
func (_u *ConfigProfileUpdateOne) Select(field string, fields ...string) *ConfigProfileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ConfigProfileUpdateOne) SetActive ¶
func (_u *ConfigProfileUpdateOne) SetActive(v bool) *ConfigProfileUpdateOne
SetActive sets the "active" field.
func (*ConfigProfileUpdateOne) SetEncryptedData ¶
func (_u *ConfigProfileUpdateOne) SetEncryptedData(v []byte) *ConfigProfileUpdateOne
SetEncryptedData sets the "encrypted_data" field.
func (*ConfigProfileUpdateOne) SetName ¶
func (_u *ConfigProfileUpdateOne) SetName(v string) *ConfigProfileUpdateOne
SetName sets the "name" field.
func (*ConfigProfileUpdateOne) SetNillableActive ¶
func (_u *ConfigProfileUpdateOne) SetNillableActive(v *bool) *ConfigProfileUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*ConfigProfileUpdateOne) SetNillableName ¶
func (_u *ConfigProfileUpdateOne) SetNillableName(v *string) *ConfigProfileUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ConfigProfileUpdateOne) SetNillableVersion ¶
func (_u *ConfigProfileUpdateOne) SetNillableVersion(v *int) *ConfigProfileUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*ConfigProfileUpdateOne) SetUpdatedAt ¶
func (_u *ConfigProfileUpdateOne) SetUpdatedAt(v time.Time) *ConfigProfileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ConfigProfileUpdateOne) SetVersion ¶
func (_u *ConfigProfileUpdateOne) SetVersion(v int) *ConfigProfileUpdateOne
SetVersion sets the "version" field.
func (*ConfigProfileUpdateOne) Where ¶
func (_u *ConfigProfileUpdateOne) Where(ps ...predicate.ConfigProfile) *ConfigProfileUpdateOne
Where appends a list predicates to the ConfigProfileUpdate builder.
type ConfigProfiles ¶
type ConfigProfiles []*ConfigProfile
ConfigProfiles is a parsable slice of ConfigProfile.
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 CronJob ¶
type CronJob struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Human-readable job name
Name string `json:"name,omitempty"`
// Schedule type: one-time, interval, or cron expression
ScheduleType cronjob.ScheduleType `json:"schedule_type,omitempty"`
// Schedule value: ISO8601 datetime, duration, or cron expression
Schedule string `json:"schedule,omitempty"`
// Prompt to execute when the job fires
Prompt string `json:"prompt,omitempty"`
// Session mode: isolated or main
SessionMode string `json:"session_mode,omitempty"`
// Channels to deliver results to (e.g. slack, telegram)
DeliverTo []string `json:"deliver_to,omitempty"`
// Timezone for schedule evaluation
Timezone string `json:"timezone,omitempty"`
// Enabled holds the value of the "enabled" field.
Enabled bool `json:"enabled,omitempty"`
// Per-job timeout in milliseconds (overrides default)
TimeoutMs *int64 `json:"timeout_ms,omitempty"`
// When the job last executed
LastRunAt *time.Time `json:"last_run_at,omitempty"`
// When the job will next execute
NextRunAt *time.Time `json:"next_run_at,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
CronJob is the model entity for the CronJob schema.
func (*CronJob) Unwrap ¶
Unwrap unwraps the CronJob 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 (*CronJob) Update ¶
func (_m *CronJob) Update() *CronJobUpdateOne
Update returns a builder for updating this CronJob. Note that you need to call CronJob.Unwrap() before calling this method if this CronJob was returned from a transaction, and the transaction was committed or rolled back.
type CronJobClient ¶
type CronJobClient struct {
// contains filtered or unexported fields
}
CronJobClient is a client for the CronJob schema.
func NewCronJobClient ¶
func NewCronJobClient(c config) *CronJobClient
NewCronJobClient returns a client for the CronJob from the given config.
func (*CronJobClient) Create ¶
func (c *CronJobClient) Create() *CronJobCreate
Create returns a builder for creating a CronJob entity.
func (*CronJobClient) CreateBulk ¶
func (c *CronJobClient) CreateBulk(builders ...*CronJobCreate) *CronJobCreateBulk
CreateBulk returns a builder for creating a bulk of CronJob entities.
func (*CronJobClient) Delete ¶
func (c *CronJobClient) Delete() *CronJobDelete
Delete returns a delete builder for CronJob.
func (*CronJobClient) DeleteOne ¶
func (c *CronJobClient) DeleteOne(_m *CronJob) *CronJobDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CronJobClient) DeleteOneID ¶
func (c *CronJobClient) DeleteOneID(id uuid.UUID) *CronJobDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CronJobClient) Hooks ¶
func (c *CronJobClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CronJobClient) Intercept ¶
func (c *CronJobClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cronjob.Intercept(f(g(h())))`.
func (*CronJobClient) Interceptors ¶
func (c *CronJobClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CronJobClient) MapCreateBulk ¶
func (c *CronJobClient) MapCreateBulk(slice any, setFunc func(*CronJobCreate, int)) *CronJobCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CronJobClient) Query ¶
func (c *CronJobClient) Query() *CronJobQuery
Query returns a query builder for CronJob.
func (*CronJobClient) Update ¶
func (c *CronJobClient) Update() *CronJobUpdate
Update returns an update builder for CronJob.
func (*CronJobClient) UpdateOne ¶
func (c *CronJobClient) UpdateOne(_m *CronJob) *CronJobUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CronJobClient) UpdateOneID ¶
func (c *CronJobClient) UpdateOneID(id uuid.UUID) *CronJobUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CronJobClient) Use ¶
func (c *CronJobClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cronjob.Hooks(f(g(h())))`.
type CronJobCreate ¶
type CronJobCreate struct {
// contains filtered or unexported fields
}
CronJobCreate is the builder for creating a CronJob entity.
func (*CronJobCreate) Exec ¶
func (_c *CronJobCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CronJobCreate) ExecX ¶
func (_c *CronJobCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobCreate) Mutation ¶
func (_c *CronJobCreate) Mutation() *CronJobMutation
Mutation returns the CronJobMutation object of the builder.
func (*CronJobCreate) Save ¶
func (_c *CronJobCreate) Save(ctx context.Context) (*CronJob, error)
Save creates the CronJob in the database.
func (*CronJobCreate) SaveX ¶
func (_c *CronJobCreate) SaveX(ctx context.Context) *CronJob
SaveX calls Save and panics if Save returns an error.
func (*CronJobCreate) SetCreatedAt ¶
func (_c *CronJobCreate) SetCreatedAt(v time.Time) *CronJobCreate
SetCreatedAt sets the "created_at" field.
func (*CronJobCreate) SetDeliverTo ¶
func (_c *CronJobCreate) SetDeliverTo(v []string) *CronJobCreate
SetDeliverTo sets the "deliver_to" field.
func (*CronJobCreate) SetEnabled ¶
func (_c *CronJobCreate) SetEnabled(v bool) *CronJobCreate
SetEnabled sets the "enabled" field.
func (*CronJobCreate) SetID ¶
func (_c *CronJobCreate) SetID(v uuid.UUID) *CronJobCreate
SetID sets the "id" field.
func (*CronJobCreate) SetLastRunAt ¶
func (_c *CronJobCreate) SetLastRunAt(v time.Time) *CronJobCreate
SetLastRunAt sets the "last_run_at" field.
func (*CronJobCreate) SetName ¶
func (_c *CronJobCreate) SetName(v string) *CronJobCreate
SetName sets the "name" field.
func (*CronJobCreate) SetNextRunAt ¶
func (_c *CronJobCreate) SetNextRunAt(v time.Time) *CronJobCreate
SetNextRunAt sets the "next_run_at" field.
func (*CronJobCreate) SetNillableCreatedAt ¶
func (_c *CronJobCreate) SetNillableCreatedAt(v *time.Time) *CronJobCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CronJobCreate) SetNillableEnabled ¶
func (_c *CronJobCreate) SetNillableEnabled(v *bool) *CronJobCreate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*CronJobCreate) SetNillableID ¶
func (_c *CronJobCreate) SetNillableID(v *uuid.UUID) *CronJobCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CronJobCreate) SetNillableLastRunAt ¶
func (_c *CronJobCreate) SetNillableLastRunAt(v *time.Time) *CronJobCreate
SetNillableLastRunAt sets the "last_run_at" field if the given value is not nil.
func (*CronJobCreate) SetNillableNextRunAt ¶
func (_c *CronJobCreate) SetNillableNextRunAt(v *time.Time) *CronJobCreate
SetNillableNextRunAt sets the "next_run_at" field if the given value is not nil.
func (*CronJobCreate) SetNillableSessionMode ¶
func (_c *CronJobCreate) SetNillableSessionMode(v *string) *CronJobCreate
SetNillableSessionMode sets the "session_mode" field if the given value is not nil.
func (*CronJobCreate) SetNillableTimeoutMs ¶ added in v0.6.0
func (_c *CronJobCreate) SetNillableTimeoutMs(v *int64) *CronJobCreate
SetNillableTimeoutMs sets the "timeout_ms" field if the given value is not nil.
func (*CronJobCreate) SetNillableTimezone ¶
func (_c *CronJobCreate) SetNillableTimezone(v *string) *CronJobCreate
SetNillableTimezone sets the "timezone" field if the given value is not nil.
func (*CronJobCreate) SetNillableUpdatedAt ¶
func (_c *CronJobCreate) SetNillableUpdatedAt(v *time.Time) *CronJobCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CronJobCreate) SetPrompt ¶
func (_c *CronJobCreate) SetPrompt(v string) *CronJobCreate
SetPrompt sets the "prompt" field.
func (*CronJobCreate) SetSchedule ¶
func (_c *CronJobCreate) SetSchedule(v string) *CronJobCreate
SetSchedule sets the "schedule" field.
func (*CronJobCreate) SetScheduleType ¶
func (_c *CronJobCreate) SetScheduleType(v cronjob.ScheduleType) *CronJobCreate
SetScheduleType sets the "schedule_type" field.
func (*CronJobCreate) SetSessionMode ¶
func (_c *CronJobCreate) SetSessionMode(v string) *CronJobCreate
SetSessionMode sets the "session_mode" field.
func (*CronJobCreate) SetTimeoutMs ¶ added in v0.6.0
func (_c *CronJobCreate) SetTimeoutMs(v int64) *CronJobCreate
SetTimeoutMs sets the "timeout_ms" field.
func (*CronJobCreate) SetTimezone ¶
func (_c *CronJobCreate) SetTimezone(v string) *CronJobCreate
SetTimezone sets the "timezone" field.
func (*CronJobCreate) SetUpdatedAt ¶
func (_c *CronJobCreate) SetUpdatedAt(v time.Time) *CronJobCreate
SetUpdatedAt sets the "updated_at" field.
type CronJobCreateBulk ¶
type CronJobCreateBulk struct {
// contains filtered or unexported fields
}
CronJobCreateBulk is the builder for creating many CronJob entities in bulk.
func (*CronJobCreateBulk) Exec ¶
func (_c *CronJobCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CronJobCreateBulk) ExecX ¶
func (_c *CronJobCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CronJobDelete ¶
type CronJobDelete struct {
// contains filtered or unexported fields
}
CronJobDelete is the builder for deleting a CronJob entity.
func (*CronJobDelete) Exec ¶
func (_d *CronJobDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CronJobDelete) ExecX ¶
func (_d *CronJobDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CronJobDelete) Where ¶
func (_d *CronJobDelete) Where(ps ...predicate.CronJob) *CronJobDelete
Where appends a list predicates to the CronJobDelete builder.
type CronJobDeleteOne ¶
type CronJobDeleteOne struct {
// contains filtered or unexported fields
}
CronJobDeleteOne is the builder for deleting a single CronJob entity.
func (*CronJobDeleteOne) Exec ¶
func (_d *CronJobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CronJobDeleteOne) ExecX ¶
func (_d *CronJobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobDeleteOne) Where ¶
func (_d *CronJobDeleteOne) Where(ps ...predicate.CronJob) *CronJobDeleteOne
Where appends a list predicates to the CronJobDelete builder.
type CronJobGroupBy ¶
type CronJobGroupBy struct {
// contains filtered or unexported fields
}
CronJobGroupBy is the group-by builder for CronJob entities.
func (*CronJobGroupBy) Aggregate ¶
func (_g *CronJobGroupBy) Aggregate(fns ...AggregateFunc) *CronJobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CronJobGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CronJobGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CronJobGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CronJobGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CronJobGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CronJobGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CronJobGroupBy) Scan ¶
func (_g *CronJobGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CronJobGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CronJobHistories ¶
type CronJobHistories []*CronJobHistory
CronJobHistories is a parsable slice of CronJobHistory.
type CronJobHistory ¶
type CronJobHistory struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Reference to the CronJob that was executed
JobID uuid.UUID `json:"job_id,omitempty"`
// Snapshot of job name at execution time
JobName string `json:"job_name,omitempty"`
// Status holds the value of the "status" field.
Status cronjobhistory.Status `json:"status,omitempty"`
// Prompt that was executed
Prompt string `json:"prompt,omitempty"`
// Agent response
Result string `json:"result,omitempty"`
// Error details if execution failed
ErrorMessage string `json:"error_message,omitempty"`
// TokensUsed holds the value of the "tokens_used" field.
TokensUsed int `json:"tokens_used,omitempty"`
// StartedAt holds the value of the "started_at" field.
StartedAt time.Time `json:"started_at,omitempty"`
// CompletedAt holds the value of the "completed_at" field.
CompletedAt *time.Time `json:"completed_at,omitempty"`
// contains filtered or unexported fields
}
CronJobHistory is the model entity for the CronJobHistory schema.
func (*CronJobHistory) String ¶
func (_m *CronJobHistory) String() string
String implements the fmt.Stringer.
func (*CronJobHistory) Unwrap ¶
func (_m *CronJobHistory) Unwrap() *CronJobHistory
Unwrap unwraps the CronJobHistory 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 (*CronJobHistory) Update ¶
func (_m *CronJobHistory) Update() *CronJobHistoryUpdateOne
Update returns a builder for updating this CronJobHistory. Note that you need to call CronJobHistory.Unwrap() before calling this method if this CronJobHistory was returned from a transaction, and the transaction was committed or rolled back.
type CronJobHistoryClient ¶
type CronJobHistoryClient struct {
// contains filtered or unexported fields
}
CronJobHistoryClient is a client for the CronJobHistory schema.
func NewCronJobHistoryClient ¶
func NewCronJobHistoryClient(c config) *CronJobHistoryClient
NewCronJobHistoryClient returns a client for the CronJobHistory from the given config.
func (*CronJobHistoryClient) Create ¶
func (c *CronJobHistoryClient) Create() *CronJobHistoryCreate
Create returns a builder for creating a CronJobHistory entity.
func (*CronJobHistoryClient) CreateBulk ¶
func (c *CronJobHistoryClient) CreateBulk(builders ...*CronJobHistoryCreate) *CronJobHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of CronJobHistory entities.
func (*CronJobHistoryClient) Delete ¶
func (c *CronJobHistoryClient) Delete() *CronJobHistoryDelete
Delete returns a delete builder for CronJobHistory.
func (*CronJobHistoryClient) DeleteOne ¶
func (c *CronJobHistoryClient) DeleteOne(_m *CronJobHistory) *CronJobHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CronJobHistoryClient) DeleteOneID ¶
func (c *CronJobHistoryClient) DeleteOneID(id uuid.UUID) *CronJobHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CronJobHistoryClient) Get ¶
func (c *CronJobHistoryClient) Get(ctx context.Context, id uuid.UUID) (*CronJobHistory, error)
Get returns a CronJobHistory entity by its id.
func (*CronJobHistoryClient) GetX ¶
func (c *CronJobHistoryClient) GetX(ctx context.Context, id uuid.UUID) *CronJobHistory
GetX is like Get, but panics if an error occurs.
func (*CronJobHistoryClient) Hooks ¶
func (c *CronJobHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CronJobHistoryClient) Intercept ¶
func (c *CronJobHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cronjobhistory.Intercept(f(g(h())))`.
func (*CronJobHistoryClient) Interceptors ¶
func (c *CronJobHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CronJobHistoryClient) MapCreateBulk ¶
func (c *CronJobHistoryClient) MapCreateBulk(slice any, setFunc func(*CronJobHistoryCreate, int)) *CronJobHistoryCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CronJobHistoryClient) Query ¶
func (c *CronJobHistoryClient) Query() *CronJobHistoryQuery
Query returns a query builder for CronJobHistory.
func (*CronJobHistoryClient) Update ¶
func (c *CronJobHistoryClient) Update() *CronJobHistoryUpdate
Update returns an update builder for CronJobHistory.
func (*CronJobHistoryClient) UpdateOne ¶
func (c *CronJobHistoryClient) UpdateOne(_m *CronJobHistory) *CronJobHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CronJobHistoryClient) UpdateOneID ¶
func (c *CronJobHistoryClient) UpdateOneID(id uuid.UUID) *CronJobHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CronJobHistoryClient) Use ¶
func (c *CronJobHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cronjobhistory.Hooks(f(g(h())))`.
type CronJobHistoryCreate ¶
type CronJobHistoryCreate struct {
// contains filtered or unexported fields
}
CronJobHistoryCreate is the builder for creating a CronJobHistory entity.
func (*CronJobHistoryCreate) Exec ¶
func (_c *CronJobHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CronJobHistoryCreate) ExecX ¶
func (_c *CronJobHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobHistoryCreate) Mutation ¶
func (_c *CronJobHistoryCreate) Mutation() *CronJobHistoryMutation
Mutation returns the CronJobHistoryMutation object of the builder.
func (*CronJobHistoryCreate) Save ¶
func (_c *CronJobHistoryCreate) Save(ctx context.Context) (*CronJobHistory, error)
Save creates the CronJobHistory in the database.
func (*CronJobHistoryCreate) SaveX ¶
func (_c *CronJobHistoryCreate) SaveX(ctx context.Context) *CronJobHistory
SaveX calls Save and panics if Save returns an error.
func (*CronJobHistoryCreate) SetCompletedAt ¶
func (_c *CronJobHistoryCreate) SetCompletedAt(v time.Time) *CronJobHistoryCreate
SetCompletedAt sets the "completed_at" field.
func (*CronJobHistoryCreate) SetErrorMessage ¶
func (_c *CronJobHistoryCreate) SetErrorMessage(v string) *CronJobHistoryCreate
SetErrorMessage sets the "error_message" field.
func (*CronJobHistoryCreate) SetID ¶
func (_c *CronJobHistoryCreate) SetID(v uuid.UUID) *CronJobHistoryCreate
SetID sets the "id" field.
func (*CronJobHistoryCreate) SetJobID ¶
func (_c *CronJobHistoryCreate) SetJobID(v uuid.UUID) *CronJobHistoryCreate
SetJobID sets the "job_id" field.
func (*CronJobHistoryCreate) SetJobName ¶
func (_c *CronJobHistoryCreate) SetJobName(v string) *CronJobHistoryCreate
SetJobName sets the "job_name" field.
func (*CronJobHistoryCreate) SetNillableCompletedAt ¶
func (_c *CronJobHistoryCreate) SetNillableCompletedAt(v *time.Time) *CronJobHistoryCreate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*CronJobHistoryCreate) SetNillableErrorMessage ¶
func (_c *CronJobHistoryCreate) SetNillableErrorMessage(v *string) *CronJobHistoryCreate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*CronJobHistoryCreate) SetNillableID ¶
func (_c *CronJobHistoryCreate) SetNillableID(v *uuid.UUID) *CronJobHistoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CronJobHistoryCreate) SetNillableResult ¶
func (_c *CronJobHistoryCreate) SetNillableResult(v *string) *CronJobHistoryCreate
SetNillableResult sets the "result" field if the given value is not nil.
func (*CronJobHistoryCreate) SetNillableStartedAt ¶
func (_c *CronJobHistoryCreate) SetNillableStartedAt(v *time.Time) *CronJobHistoryCreate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*CronJobHistoryCreate) SetNillableStatus ¶
func (_c *CronJobHistoryCreate) SetNillableStatus(v *cronjobhistory.Status) *CronJobHistoryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CronJobHistoryCreate) SetNillableTokensUsed ¶
func (_c *CronJobHistoryCreate) SetNillableTokensUsed(v *int) *CronJobHistoryCreate
SetNillableTokensUsed sets the "tokens_used" field if the given value is not nil.
func (*CronJobHistoryCreate) SetPrompt ¶
func (_c *CronJobHistoryCreate) SetPrompt(v string) *CronJobHistoryCreate
SetPrompt sets the "prompt" field.
func (*CronJobHistoryCreate) SetResult ¶
func (_c *CronJobHistoryCreate) SetResult(v string) *CronJobHistoryCreate
SetResult sets the "result" field.
func (*CronJobHistoryCreate) SetStartedAt ¶
func (_c *CronJobHistoryCreate) SetStartedAt(v time.Time) *CronJobHistoryCreate
SetStartedAt sets the "started_at" field.
func (*CronJobHistoryCreate) SetStatus ¶
func (_c *CronJobHistoryCreate) SetStatus(v cronjobhistory.Status) *CronJobHistoryCreate
SetStatus sets the "status" field.
func (*CronJobHistoryCreate) SetTokensUsed ¶
func (_c *CronJobHistoryCreate) SetTokensUsed(v int) *CronJobHistoryCreate
SetTokensUsed sets the "tokens_used" field.
type CronJobHistoryCreateBulk ¶
type CronJobHistoryCreateBulk struct {
// contains filtered or unexported fields
}
CronJobHistoryCreateBulk is the builder for creating many CronJobHistory entities in bulk.
func (*CronJobHistoryCreateBulk) Exec ¶
func (_c *CronJobHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CronJobHistoryCreateBulk) ExecX ¶
func (_c *CronJobHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobHistoryCreateBulk) Save ¶
func (_c *CronJobHistoryCreateBulk) Save(ctx context.Context) ([]*CronJobHistory, error)
Save creates the CronJobHistory entities in the database.
func (*CronJobHistoryCreateBulk) SaveX ¶
func (_c *CronJobHistoryCreateBulk) SaveX(ctx context.Context) []*CronJobHistory
SaveX is like Save, but panics if an error occurs.
type CronJobHistoryDelete ¶
type CronJobHistoryDelete struct {
// contains filtered or unexported fields
}
CronJobHistoryDelete is the builder for deleting a CronJobHistory entity.
func (*CronJobHistoryDelete) Exec ¶
func (_d *CronJobHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CronJobHistoryDelete) ExecX ¶
func (_d *CronJobHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CronJobHistoryDelete) Where ¶
func (_d *CronJobHistoryDelete) Where(ps ...predicate.CronJobHistory) *CronJobHistoryDelete
Where appends a list predicates to the CronJobHistoryDelete builder.
type CronJobHistoryDeleteOne ¶
type CronJobHistoryDeleteOne struct {
// contains filtered or unexported fields
}
CronJobHistoryDeleteOne is the builder for deleting a single CronJobHistory entity.
func (*CronJobHistoryDeleteOne) Exec ¶
func (_d *CronJobHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CronJobHistoryDeleteOne) ExecX ¶
func (_d *CronJobHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobHistoryDeleteOne) Where ¶
func (_d *CronJobHistoryDeleteOne) Where(ps ...predicate.CronJobHistory) *CronJobHistoryDeleteOne
Where appends a list predicates to the CronJobHistoryDelete builder.
type CronJobHistoryGroupBy ¶
type CronJobHistoryGroupBy struct {
// contains filtered or unexported fields
}
CronJobHistoryGroupBy is the group-by builder for CronJobHistory entities.
func (*CronJobHistoryGroupBy) Aggregate ¶
func (_g *CronJobHistoryGroupBy) Aggregate(fns ...AggregateFunc) *CronJobHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CronJobHistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CronJobHistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CronJobHistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CronJobHistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CronJobHistoryGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CronJobHistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CronJobHistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CronJobHistoryGroupBy) Scan ¶
func (_g *CronJobHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CronJobHistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CronJobHistoryMutation ¶
type CronJobHistoryMutation struct {
// contains filtered or unexported fields
}
CronJobHistoryMutation represents an operation that mutates the CronJobHistory nodes in the graph.
func (*CronJobHistoryMutation) AddField ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) AddTokensUsed ¶
func (m *CronJobHistoryMutation) AddTokensUsed(i int)
AddTokensUsed adds i to the "tokens_used" field.
func (*CronJobHistoryMutation) AddedEdges ¶
func (m *CronJobHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CronJobHistoryMutation) AddedField ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) AddedFields ¶
func (m *CronJobHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CronJobHistoryMutation) AddedIDs ¶
func (m *CronJobHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CronJobHistoryMutation) AddedTokensUsed ¶
func (m *CronJobHistoryMutation) AddedTokensUsed() (r int, exists bool)
AddedTokensUsed returns the value that was added to the "tokens_used" field in this mutation.
func (*CronJobHistoryMutation) ClearCompletedAt ¶
func (m *CronJobHistoryMutation) ClearCompletedAt()
ClearCompletedAt clears the value of the "completed_at" field.
func (*CronJobHistoryMutation) ClearEdge ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) ClearErrorMessage ¶
func (m *CronJobHistoryMutation) ClearErrorMessage()
ClearErrorMessage clears the value of the "error_message" field.
func (*CronJobHistoryMutation) ClearField ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) ClearResult ¶
func (m *CronJobHistoryMutation) ClearResult()
ClearResult clears the value of the "result" field.
func (*CronJobHistoryMutation) ClearedEdges ¶
func (m *CronJobHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CronJobHistoryMutation) ClearedFields ¶
func (m *CronJobHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CronJobHistoryMutation) Client ¶
func (m CronJobHistoryMutation) 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 (*CronJobHistoryMutation) CompletedAt ¶
func (m *CronJobHistoryMutation) CompletedAt() (r time.Time, exists bool)
CompletedAt returns the value of the "completed_at" field in the mutation.
func (*CronJobHistoryMutation) CompletedAtCleared ¶
func (m *CronJobHistoryMutation) CompletedAtCleared() bool
CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.
func (*CronJobHistoryMutation) EdgeCleared ¶
func (m *CronJobHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CronJobHistoryMutation) ErrorMessage ¶
func (m *CronJobHistoryMutation) ErrorMessage() (r string, exists bool)
ErrorMessage returns the value of the "error_message" field in the mutation.
func (*CronJobHistoryMutation) ErrorMessageCleared ¶
func (m *CronJobHistoryMutation) ErrorMessageCleared() bool
ErrorMessageCleared returns if the "error_message" field was cleared in this mutation.
func (*CronJobHistoryMutation) Field ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) FieldCleared ¶
func (m *CronJobHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CronJobHistoryMutation) Fields ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) ID ¶
func (m *CronJobHistoryMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CronJobHistoryMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CronJobHistoryMutation) JobID ¶
func (m *CronJobHistoryMutation) JobID() (r uuid.UUID, exists bool)
JobID returns the value of the "job_id" field in the mutation.
func (*CronJobHistoryMutation) JobName ¶
func (m *CronJobHistoryMutation) JobName() (r string, exists bool)
JobName returns the value of the "job_name" field in the mutation.
func (*CronJobHistoryMutation) OldCompletedAt ¶
OldCompletedAt returns the old "completed_at" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) OldErrorMessage ¶
func (m *CronJobHistoryMutation) OldErrorMessage(ctx context.Context) (v string, err error)
OldErrorMessage returns the old "error_message" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) 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 (*CronJobHistoryMutation) OldJobID ¶
OldJobID returns the old "job_id" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) OldJobName ¶
func (m *CronJobHistoryMutation) OldJobName(ctx context.Context) (v string, err error)
OldJobName returns the old "job_name" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) OldPrompt ¶
func (m *CronJobHistoryMutation) OldPrompt(ctx context.Context) (v string, err error)
OldPrompt returns the old "prompt" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) OldResult ¶
func (m *CronJobHistoryMutation) OldResult(ctx context.Context) (v string, err error)
OldResult returns the old "result" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) OldStartedAt ¶
OldStartedAt returns the old "started_at" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) OldStatus ¶
func (m *CronJobHistoryMutation) OldStatus(ctx context.Context) (v cronjobhistory.Status, err error)
OldStatus returns the old "status" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) OldTokensUsed ¶
func (m *CronJobHistoryMutation) OldTokensUsed(ctx context.Context) (v int, err error)
OldTokensUsed returns the old "tokens_used" field's value of the CronJobHistory entity. If the CronJobHistory 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 (*CronJobHistoryMutation) Op ¶
func (m *CronJobHistoryMutation) Op() Op
Op returns the operation name.
func (*CronJobHistoryMutation) Prompt ¶
func (m *CronJobHistoryMutation) Prompt() (r string, exists bool)
Prompt returns the value of the "prompt" field in the mutation.
func (*CronJobHistoryMutation) RemovedEdges ¶
func (m *CronJobHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CronJobHistoryMutation) RemovedIDs ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) ResetCompletedAt ¶
func (m *CronJobHistoryMutation) ResetCompletedAt()
ResetCompletedAt resets all changes to the "completed_at" field.
func (*CronJobHistoryMutation) ResetEdge ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) ResetErrorMessage ¶
func (m *CronJobHistoryMutation) ResetErrorMessage()
ResetErrorMessage resets all changes to the "error_message" field.
func (*CronJobHistoryMutation) ResetField ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) ResetJobID ¶
func (m *CronJobHistoryMutation) ResetJobID()
ResetJobID resets all changes to the "job_id" field.
func (*CronJobHistoryMutation) ResetJobName ¶
func (m *CronJobHistoryMutation) ResetJobName()
ResetJobName resets all changes to the "job_name" field.
func (*CronJobHistoryMutation) ResetPrompt ¶
func (m *CronJobHistoryMutation) ResetPrompt()
ResetPrompt resets all changes to the "prompt" field.
func (*CronJobHistoryMutation) ResetResult ¶
func (m *CronJobHistoryMutation) ResetResult()
ResetResult resets all changes to the "result" field.
func (*CronJobHistoryMutation) ResetStartedAt ¶
func (m *CronJobHistoryMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "started_at" field.
func (*CronJobHistoryMutation) ResetStatus ¶
func (m *CronJobHistoryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*CronJobHistoryMutation) ResetTokensUsed ¶
func (m *CronJobHistoryMutation) ResetTokensUsed()
ResetTokensUsed resets all changes to the "tokens_used" field.
func (*CronJobHistoryMutation) Result ¶
func (m *CronJobHistoryMutation) Result() (r string, exists bool)
Result returns the value of the "result" field in the mutation.
func (*CronJobHistoryMutation) ResultCleared ¶
func (m *CronJobHistoryMutation) ResultCleared() bool
ResultCleared returns if the "result" field was cleared in this mutation.
func (*CronJobHistoryMutation) SetCompletedAt ¶
func (m *CronJobHistoryMutation) SetCompletedAt(t time.Time)
SetCompletedAt sets the "completed_at" field.
func (*CronJobHistoryMutation) SetErrorMessage ¶
func (m *CronJobHistoryMutation) SetErrorMessage(s string)
SetErrorMessage sets the "error_message" field.
func (*CronJobHistoryMutation) SetField ¶
func (m *CronJobHistoryMutation) 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 (*CronJobHistoryMutation) SetID ¶
func (m *CronJobHistoryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CronJobHistory entities.
func (*CronJobHistoryMutation) SetJobID ¶
func (m *CronJobHistoryMutation) SetJobID(u uuid.UUID)
SetJobID sets the "job_id" field.
func (*CronJobHistoryMutation) SetJobName ¶
func (m *CronJobHistoryMutation) SetJobName(s string)
SetJobName sets the "job_name" field.
func (*CronJobHistoryMutation) SetOp ¶
func (m *CronJobHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CronJobHistoryMutation) SetPrompt ¶
func (m *CronJobHistoryMutation) SetPrompt(s string)
SetPrompt sets the "prompt" field.
func (*CronJobHistoryMutation) SetResult ¶
func (m *CronJobHistoryMutation) SetResult(s string)
SetResult sets the "result" field.
func (*CronJobHistoryMutation) SetStartedAt ¶
func (m *CronJobHistoryMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "started_at" field.
func (*CronJobHistoryMutation) SetStatus ¶
func (m *CronJobHistoryMutation) SetStatus(c cronjobhistory.Status)
SetStatus sets the "status" field.
func (*CronJobHistoryMutation) SetTokensUsed ¶
func (m *CronJobHistoryMutation) SetTokensUsed(i int)
SetTokensUsed sets the "tokens_used" field.
func (*CronJobHistoryMutation) StartedAt ¶
func (m *CronJobHistoryMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "started_at" field in the mutation.
func (*CronJobHistoryMutation) Status ¶
func (m *CronJobHistoryMutation) Status() (r cronjobhistory.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*CronJobHistoryMutation) TokensUsed ¶
func (m *CronJobHistoryMutation) TokensUsed() (r int, exists bool)
TokensUsed returns the value of the "tokens_used" field in the mutation.
func (CronJobHistoryMutation) Tx ¶
func (m CronJobHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CronJobHistoryMutation) Type ¶
func (m *CronJobHistoryMutation) Type() string
Type returns the node type of this mutation (CronJobHistory).
func (*CronJobHistoryMutation) Where ¶
func (m *CronJobHistoryMutation) Where(ps ...predicate.CronJobHistory)
Where appends a list predicates to the CronJobHistoryMutation builder.
func (*CronJobHistoryMutation) WhereP ¶
func (m *CronJobHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CronJobHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CronJobHistoryQuery ¶
type CronJobHistoryQuery struct {
// contains filtered or unexported fields
}
CronJobHistoryQuery is the builder for querying CronJobHistory entities.
func (*CronJobHistoryQuery) Aggregate ¶
func (_q *CronJobHistoryQuery) Aggregate(fns ...AggregateFunc) *CronJobHistorySelect
Aggregate returns a CronJobHistorySelect configured with the given aggregations.
func (*CronJobHistoryQuery) All ¶
func (_q *CronJobHistoryQuery) All(ctx context.Context) ([]*CronJobHistory, error)
All executes the query and returns a list of CronJobHistories.
func (*CronJobHistoryQuery) AllX ¶
func (_q *CronJobHistoryQuery) AllX(ctx context.Context) []*CronJobHistory
AllX is like All, but panics if an error occurs.
func (*CronJobHistoryQuery) Clone ¶
func (_q *CronJobHistoryQuery) Clone() *CronJobHistoryQuery
Clone returns a duplicate of the CronJobHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CronJobHistoryQuery) Count ¶
func (_q *CronJobHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CronJobHistoryQuery) CountX ¶
func (_q *CronJobHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CronJobHistoryQuery) Exist ¶
func (_q *CronJobHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CronJobHistoryQuery) ExistX ¶
func (_q *CronJobHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CronJobHistoryQuery) First ¶
func (_q *CronJobHistoryQuery) First(ctx context.Context) (*CronJobHistory, error)
First returns the first CronJobHistory entity from the query. Returns a *NotFoundError when no CronJobHistory was found.
func (*CronJobHistoryQuery) FirstID ¶
FirstID returns the first CronJobHistory ID from the query. Returns a *NotFoundError when no CronJobHistory ID was found.
func (*CronJobHistoryQuery) FirstIDX ¶
func (_q *CronJobHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CronJobHistoryQuery) FirstX ¶
func (_q *CronJobHistoryQuery) FirstX(ctx context.Context) *CronJobHistory
FirstX is like First, but panics if an error occurs.
func (*CronJobHistoryQuery) GroupBy ¶
func (_q *CronJobHistoryQuery) GroupBy(field string, fields ...string) *CronJobHistoryGroupBy
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 {
JobID uuid.UUID `json:"job_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.CronJobHistory.Query().
GroupBy(cronjobhistory.FieldJobID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CronJobHistoryQuery) IDsX ¶
func (_q *CronJobHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CronJobHistoryQuery) Limit ¶
func (_q *CronJobHistoryQuery) Limit(limit int) *CronJobHistoryQuery
Limit the number of records to be returned by this query.
func (*CronJobHistoryQuery) Offset ¶
func (_q *CronJobHistoryQuery) Offset(offset int) *CronJobHistoryQuery
Offset to start from.
func (*CronJobHistoryQuery) Only ¶
func (_q *CronJobHistoryQuery) Only(ctx context.Context) (*CronJobHistory, error)
Only returns a single CronJobHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CronJobHistory entity is found. Returns a *NotFoundError when no CronJobHistory entities are found.
func (*CronJobHistoryQuery) OnlyID ¶
OnlyID is like Only, but returns the only CronJobHistory ID in the query. Returns a *NotSingularError when more than one CronJobHistory ID is found. Returns a *NotFoundError when no entities are found.
func (*CronJobHistoryQuery) OnlyIDX ¶
func (_q *CronJobHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CronJobHistoryQuery) OnlyX ¶
func (_q *CronJobHistoryQuery) OnlyX(ctx context.Context) *CronJobHistory
OnlyX is like Only, but panics if an error occurs.
func (*CronJobHistoryQuery) Order ¶
func (_q *CronJobHistoryQuery) Order(o ...cronjobhistory.OrderOption) *CronJobHistoryQuery
Order specifies how the records should be ordered.
func (*CronJobHistoryQuery) Select ¶
func (_q *CronJobHistoryQuery) Select(fields ...string) *CronJobHistorySelect
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 {
JobID uuid.UUID `json:"job_id,omitempty"`
}
client.CronJobHistory.Query().
Select(cronjobhistory.FieldJobID).
Scan(ctx, &v)
func (*CronJobHistoryQuery) Unique ¶
func (_q *CronJobHistoryQuery) Unique(unique bool) *CronJobHistoryQuery
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 (*CronJobHistoryQuery) Where ¶
func (_q *CronJobHistoryQuery) Where(ps ...predicate.CronJobHistory) *CronJobHistoryQuery
Where adds a new predicate for the CronJobHistoryQuery builder.
type CronJobHistorySelect ¶
type CronJobHistorySelect struct {
*CronJobHistoryQuery
// contains filtered or unexported fields
}
CronJobHistorySelect is the builder for selecting fields of CronJobHistory entities.
func (*CronJobHistorySelect) Aggregate ¶
func (_s *CronJobHistorySelect) Aggregate(fns ...AggregateFunc) *CronJobHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*CronJobHistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CronJobHistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CronJobHistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CronJobHistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CronJobHistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CronJobHistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CronJobHistorySelect) Scan ¶
func (_s *CronJobHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CronJobHistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CronJobHistoryUpdate ¶
type CronJobHistoryUpdate struct {
// contains filtered or unexported fields
}
CronJobHistoryUpdate is the builder for updating CronJobHistory entities.
func (*CronJobHistoryUpdate) AddTokensUsed ¶
func (_u *CronJobHistoryUpdate) AddTokensUsed(v int) *CronJobHistoryUpdate
AddTokensUsed adds value to the "tokens_used" field.
func (*CronJobHistoryUpdate) ClearCompletedAt ¶
func (_u *CronJobHistoryUpdate) ClearCompletedAt() *CronJobHistoryUpdate
ClearCompletedAt clears the value of the "completed_at" field.
func (*CronJobHistoryUpdate) ClearErrorMessage ¶
func (_u *CronJobHistoryUpdate) ClearErrorMessage() *CronJobHistoryUpdate
ClearErrorMessage clears the value of the "error_message" field.
func (*CronJobHistoryUpdate) ClearResult ¶
func (_u *CronJobHistoryUpdate) ClearResult() *CronJobHistoryUpdate
ClearResult clears the value of the "result" field.
func (*CronJobHistoryUpdate) Exec ¶
func (_u *CronJobHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CronJobHistoryUpdate) ExecX ¶
func (_u *CronJobHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobHistoryUpdate) Mutation ¶
func (_u *CronJobHistoryUpdate) Mutation() *CronJobHistoryMutation
Mutation returns the CronJobHistoryMutation object of the builder.
func (*CronJobHistoryUpdate) Save ¶
func (_u *CronJobHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CronJobHistoryUpdate) SaveX ¶
func (_u *CronJobHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CronJobHistoryUpdate) SetCompletedAt ¶
func (_u *CronJobHistoryUpdate) SetCompletedAt(v time.Time) *CronJobHistoryUpdate
SetCompletedAt sets the "completed_at" field.
func (*CronJobHistoryUpdate) SetErrorMessage ¶
func (_u *CronJobHistoryUpdate) SetErrorMessage(v string) *CronJobHistoryUpdate
SetErrorMessage sets the "error_message" field.
func (*CronJobHistoryUpdate) SetJobID ¶
func (_u *CronJobHistoryUpdate) SetJobID(v uuid.UUID) *CronJobHistoryUpdate
SetJobID sets the "job_id" field.
func (*CronJobHistoryUpdate) SetJobName ¶
func (_u *CronJobHistoryUpdate) SetJobName(v string) *CronJobHistoryUpdate
SetJobName sets the "job_name" field.
func (*CronJobHistoryUpdate) SetNillableCompletedAt ¶
func (_u *CronJobHistoryUpdate) SetNillableCompletedAt(v *time.Time) *CronJobHistoryUpdate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetNillableErrorMessage ¶
func (_u *CronJobHistoryUpdate) SetNillableErrorMessage(v *string) *CronJobHistoryUpdate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetNillableJobID ¶
func (_u *CronJobHistoryUpdate) SetNillableJobID(v *uuid.UUID) *CronJobHistoryUpdate
SetNillableJobID sets the "job_id" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetNillableJobName ¶
func (_u *CronJobHistoryUpdate) SetNillableJobName(v *string) *CronJobHistoryUpdate
SetNillableJobName sets the "job_name" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetNillablePrompt ¶
func (_u *CronJobHistoryUpdate) SetNillablePrompt(v *string) *CronJobHistoryUpdate
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetNillableResult ¶
func (_u *CronJobHistoryUpdate) SetNillableResult(v *string) *CronJobHistoryUpdate
SetNillableResult sets the "result" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetNillableStatus ¶
func (_u *CronJobHistoryUpdate) SetNillableStatus(v *cronjobhistory.Status) *CronJobHistoryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetNillableTokensUsed ¶
func (_u *CronJobHistoryUpdate) SetNillableTokensUsed(v *int) *CronJobHistoryUpdate
SetNillableTokensUsed sets the "tokens_used" field if the given value is not nil.
func (*CronJobHistoryUpdate) SetPrompt ¶
func (_u *CronJobHistoryUpdate) SetPrompt(v string) *CronJobHistoryUpdate
SetPrompt sets the "prompt" field.
func (*CronJobHistoryUpdate) SetResult ¶
func (_u *CronJobHistoryUpdate) SetResult(v string) *CronJobHistoryUpdate
SetResult sets the "result" field.
func (*CronJobHistoryUpdate) SetStatus ¶
func (_u *CronJobHistoryUpdate) SetStatus(v cronjobhistory.Status) *CronJobHistoryUpdate
SetStatus sets the "status" field.
func (*CronJobHistoryUpdate) SetTokensUsed ¶
func (_u *CronJobHistoryUpdate) SetTokensUsed(v int) *CronJobHistoryUpdate
SetTokensUsed sets the "tokens_used" field.
func (*CronJobHistoryUpdate) Where ¶
func (_u *CronJobHistoryUpdate) Where(ps ...predicate.CronJobHistory) *CronJobHistoryUpdate
Where appends a list predicates to the CronJobHistoryUpdate builder.
type CronJobHistoryUpdateOne ¶
type CronJobHistoryUpdateOne struct {
// contains filtered or unexported fields
}
CronJobHistoryUpdateOne is the builder for updating a single CronJobHistory entity.
func (*CronJobHistoryUpdateOne) AddTokensUsed ¶
func (_u *CronJobHistoryUpdateOne) AddTokensUsed(v int) *CronJobHistoryUpdateOne
AddTokensUsed adds value to the "tokens_used" field.
func (*CronJobHistoryUpdateOne) ClearCompletedAt ¶
func (_u *CronJobHistoryUpdateOne) ClearCompletedAt() *CronJobHistoryUpdateOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*CronJobHistoryUpdateOne) ClearErrorMessage ¶
func (_u *CronJobHistoryUpdateOne) ClearErrorMessage() *CronJobHistoryUpdateOne
ClearErrorMessage clears the value of the "error_message" field.
func (*CronJobHistoryUpdateOne) ClearResult ¶
func (_u *CronJobHistoryUpdateOne) ClearResult() *CronJobHistoryUpdateOne
ClearResult clears the value of the "result" field.
func (*CronJobHistoryUpdateOne) Exec ¶
func (_u *CronJobHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CronJobHistoryUpdateOne) ExecX ¶
func (_u *CronJobHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobHistoryUpdateOne) Mutation ¶
func (_u *CronJobHistoryUpdateOne) Mutation() *CronJobHistoryMutation
Mutation returns the CronJobHistoryMutation object of the builder.
func (*CronJobHistoryUpdateOne) Save ¶
func (_u *CronJobHistoryUpdateOne) Save(ctx context.Context) (*CronJobHistory, error)
Save executes the query and returns the updated CronJobHistory entity.
func (*CronJobHistoryUpdateOne) SaveX ¶
func (_u *CronJobHistoryUpdateOne) SaveX(ctx context.Context) *CronJobHistory
SaveX is like Save, but panics if an error occurs.
func (*CronJobHistoryUpdateOne) Select ¶
func (_u *CronJobHistoryUpdateOne) Select(field string, fields ...string) *CronJobHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CronJobHistoryUpdateOne) SetCompletedAt ¶
func (_u *CronJobHistoryUpdateOne) SetCompletedAt(v time.Time) *CronJobHistoryUpdateOne
SetCompletedAt sets the "completed_at" field.
func (*CronJobHistoryUpdateOne) SetErrorMessage ¶
func (_u *CronJobHistoryUpdateOne) SetErrorMessage(v string) *CronJobHistoryUpdateOne
SetErrorMessage sets the "error_message" field.
func (*CronJobHistoryUpdateOne) SetJobID ¶
func (_u *CronJobHistoryUpdateOne) SetJobID(v uuid.UUID) *CronJobHistoryUpdateOne
SetJobID sets the "job_id" field.
func (*CronJobHistoryUpdateOne) SetJobName ¶
func (_u *CronJobHistoryUpdateOne) SetJobName(v string) *CronJobHistoryUpdateOne
SetJobName sets the "job_name" field.
func (*CronJobHistoryUpdateOne) SetNillableCompletedAt ¶
func (_u *CronJobHistoryUpdateOne) SetNillableCompletedAt(v *time.Time) *CronJobHistoryUpdateOne
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetNillableErrorMessage ¶
func (_u *CronJobHistoryUpdateOne) SetNillableErrorMessage(v *string) *CronJobHistoryUpdateOne
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetNillableJobID ¶
func (_u *CronJobHistoryUpdateOne) SetNillableJobID(v *uuid.UUID) *CronJobHistoryUpdateOne
SetNillableJobID sets the "job_id" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetNillableJobName ¶
func (_u *CronJobHistoryUpdateOne) SetNillableJobName(v *string) *CronJobHistoryUpdateOne
SetNillableJobName sets the "job_name" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetNillablePrompt ¶
func (_u *CronJobHistoryUpdateOne) SetNillablePrompt(v *string) *CronJobHistoryUpdateOne
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetNillableResult ¶
func (_u *CronJobHistoryUpdateOne) SetNillableResult(v *string) *CronJobHistoryUpdateOne
SetNillableResult sets the "result" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetNillableStatus ¶
func (_u *CronJobHistoryUpdateOne) SetNillableStatus(v *cronjobhistory.Status) *CronJobHistoryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetNillableTokensUsed ¶
func (_u *CronJobHistoryUpdateOne) SetNillableTokensUsed(v *int) *CronJobHistoryUpdateOne
SetNillableTokensUsed sets the "tokens_used" field if the given value is not nil.
func (*CronJobHistoryUpdateOne) SetPrompt ¶
func (_u *CronJobHistoryUpdateOne) SetPrompt(v string) *CronJobHistoryUpdateOne
SetPrompt sets the "prompt" field.
func (*CronJobHistoryUpdateOne) SetResult ¶
func (_u *CronJobHistoryUpdateOne) SetResult(v string) *CronJobHistoryUpdateOne
SetResult sets the "result" field.
func (*CronJobHistoryUpdateOne) SetStatus ¶
func (_u *CronJobHistoryUpdateOne) SetStatus(v cronjobhistory.Status) *CronJobHistoryUpdateOne
SetStatus sets the "status" field.
func (*CronJobHistoryUpdateOne) SetTokensUsed ¶
func (_u *CronJobHistoryUpdateOne) SetTokensUsed(v int) *CronJobHistoryUpdateOne
SetTokensUsed sets the "tokens_used" field.
func (*CronJobHistoryUpdateOne) Where ¶
func (_u *CronJobHistoryUpdateOne) Where(ps ...predicate.CronJobHistory) *CronJobHistoryUpdateOne
Where appends a list predicates to the CronJobHistoryUpdate builder.
type CronJobMutation ¶
type CronJobMutation struct {
// contains filtered or unexported fields
}
CronJobMutation represents an operation that mutates the CronJob nodes in the graph.
func (*CronJobMutation) AddField ¶
func (m *CronJobMutation) 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 (*CronJobMutation) AddTimeoutMs ¶ added in v0.6.0
func (m *CronJobMutation) AddTimeoutMs(i int64)
AddTimeoutMs adds i to the "timeout_ms" field.
func (*CronJobMutation) AddedEdges ¶
func (m *CronJobMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CronJobMutation) AddedField ¶
func (m *CronJobMutation) 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 (*CronJobMutation) AddedFields ¶
func (m *CronJobMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CronJobMutation) AddedIDs ¶
func (m *CronJobMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CronJobMutation) AddedTimeoutMs ¶ added in v0.6.0
func (m *CronJobMutation) AddedTimeoutMs() (r int64, exists bool)
AddedTimeoutMs returns the value that was added to the "timeout_ms" field in this mutation.
func (*CronJobMutation) AppendDeliverTo ¶
func (m *CronJobMutation) AppendDeliverTo(s []string)
AppendDeliverTo adds s to the "deliver_to" field.
func (*CronJobMutation) AppendedDeliverTo ¶
func (m *CronJobMutation) AppendedDeliverTo() ([]string, bool)
AppendedDeliverTo returns the list of values that were appended to the "deliver_to" field in this mutation.
func (*CronJobMutation) ClearDeliverTo ¶
func (m *CronJobMutation) ClearDeliverTo()
ClearDeliverTo clears the value of the "deliver_to" field.
func (*CronJobMutation) ClearEdge ¶
func (m *CronJobMutation) 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 (*CronJobMutation) ClearField ¶
func (m *CronJobMutation) 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 (*CronJobMutation) ClearLastRunAt ¶
func (m *CronJobMutation) ClearLastRunAt()
ClearLastRunAt clears the value of the "last_run_at" field.
func (*CronJobMutation) ClearNextRunAt ¶
func (m *CronJobMutation) ClearNextRunAt()
ClearNextRunAt clears the value of the "next_run_at" field.
func (*CronJobMutation) ClearTimeoutMs ¶ added in v0.6.0
func (m *CronJobMutation) ClearTimeoutMs()
ClearTimeoutMs clears the value of the "timeout_ms" field.
func (*CronJobMutation) ClearedEdges ¶
func (m *CronJobMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CronJobMutation) ClearedFields ¶
func (m *CronJobMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CronJobMutation) Client ¶
func (m CronJobMutation) 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 (*CronJobMutation) CreatedAt ¶
func (m *CronJobMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CronJobMutation) DeliverTo ¶
func (m *CronJobMutation) DeliverTo() (r []string, exists bool)
DeliverTo returns the value of the "deliver_to" field in the mutation.
func (*CronJobMutation) DeliverToCleared ¶
func (m *CronJobMutation) DeliverToCleared() bool
DeliverToCleared returns if the "deliver_to" field was cleared in this mutation.
func (*CronJobMutation) EdgeCleared ¶
func (m *CronJobMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CronJobMutation) Enabled ¶
func (m *CronJobMutation) Enabled() (r bool, exists bool)
Enabled returns the value of the "enabled" field in the mutation.
func (*CronJobMutation) Field ¶
func (m *CronJobMutation) 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 (*CronJobMutation) FieldCleared ¶
func (m *CronJobMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CronJobMutation) Fields ¶
func (m *CronJobMutation) 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 (*CronJobMutation) ID ¶
func (m *CronJobMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CronJobMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CronJobMutation) LastRunAt ¶
func (m *CronJobMutation) LastRunAt() (r time.Time, exists bool)
LastRunAt returns the value of the "last_run_at" field in the mutation.
func (*CronJobMutation) LastRunAtCleared ¶
func (m *CronJobMutation) LastRunAtCleared() bool
LastRunAtCleared returns if the "last_run_at" field was cleared in this mutation.
func (*CronJobMutation) Name ¶
func (m *CronJobMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CronJobMutation) NextRunAt ¶
func (m *CronJobMutation) NextRunAt() (r time.Time, exists bool)
NextRunAt returns the value of the "next_run_at" field in the mutation.
func (*CronJobMutation) NextRunAtCleared ¶
func (m *CronJobMutation) NextRunAtCleared() bool
NextRunAtCleared returns if the "next_run_at" field was cleared in this mutation.
func (*CronJobMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldDeliverTo ¶
func (m *CronJobMutation) OldDeliverTo(ctx context.Context) (v []string, err error)
OldDeliverTo returns the old "deliver_to" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldEnabled ¶
func (m *CronJobMutation) OldEnabled(ctx context.Context) (v bool, err error)
OldEnabled returns the old "enabled" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) 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 (*CronJobMutation) OldLastRunAt ¶
OldLastRunAt returns the old "last_run_at" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldName ¶
func (m *CronJobMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldNextRunAt ¶
OldNextRunAt returns the old "next_run_at" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldPrompt ¶
func (m *CronJobMutation) OldPrompt(ctx context.Context) (v string, err error)
OldPrompt returns the old "prompt" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldSchedule ¶
func (m *CronJobMutation) OldSchedule(ctx context.Context) (v string, err error)
OldSchedule returns the old "schedule" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldScheduleType ¶
func (m *CronJobMutation) OldScheduleType(ctx context.Context) (v cronjob.ScheduleType, err error)
OldScheduleType returns the old "schedule_type" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldSessionMode ¶
func (m *CronJobMutation) OldSessionMode(ctx context.Context) (v string, err error)
OldSessionMode returns the old "session_mode" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldTimeoutMs ¶ added in v0.6.0
func (m *CronJobMutation) OldTimeoutMs(ctx context.Context) (v *int64, err error)
OldTimeoutMs returns the old "timeout_ms" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldTimezone ¶
func (m *CronJobMutation) OldTimezone(ctx context.Context) (v string, err error)
OldTimezone returns the old "timezone" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the CronJob entity. If the CronJob 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 (*CronJobMutation) Prompt ¶
func (m *CronJobMutation) Prompt() (r string, exists bool)
Prompt returns the value of the "prompt" field in the mutation.
func (*CronJobMutation) RemovedEdges ¶
func (m *CronJobMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CronJobMutation) RemovedIDs ¶
func (m *CronJobMutation) 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 (*CronJobMutation) ResetCreatedAt ¶
func (m *CronJobMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CronJobMutation) ResetDeliverTo ¶
func (m *CronJobMutation) ResetDeliverTo()
ResetDeliverTo resets all changes to the "deliver_to" field.
func (*CronJobMutation) ResetEdge ¶
func (m *CronJobMutation) 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 (*CronJobMutation) ResetEnabled ¶
func (m *CronJobMutation) ResetEnabled()
ResetEnabled resets all changes to the "enabled" field.
func (*CronJobMutation) ResetField ¶
func (m *CronJobMutation) 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 (*CronJobMutation) ResetLastRunAt ¶
func (m *CronJobMutation) ResetLastRunAt()
ResetLastRunAt resets all changes to the "last_run_at" field.
func (*CronJobMutation) ResetName ¶
func (m *CronJobMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CronJobMutation) ResetNextRunAt ¶
func (m *CronJobMutation) ResetNextRunAt()
ResetNextRunAt resets all changes to the "next_run_at" field.
func (*CronJobMutation) ResetPrompt ¶
func (m *CronJobMutation) ResetPrompt()
ResetPrompt resets all changes to the "prompt" field.
func (*CronJobMutation) ResetSchedule ¶
func (m *CronJobMutation) ResetSchedule()
ResetSchedule resets all changes to the "schedule" field.
func (*CronJobMutation) ResetScheduleType ¶
func (m *CronJobMutation) ResetScheduleType()
ResetScheduleType resets all changes to the "schedule_type" field.
func (*CronJobMutation) ResetSessionMode ¶
func (m *CronJobMutation) ResetSessionMode()
ResetSessionMode resets all changes to the "session_mode" field.
func (*CronJobMutation) ResetTimeoutMs ¶ added in v0.6.0
func (m *CronJobMutation) ResetTimeoutMs()
ResetTimeoutMs resets all changes to the "timeout_ms" field.
func (*CronJobMutation) ResetTimezone ¶
func (m *CronJobMutation) ResetTimezone()
ResetTimezone resets all changes to the "timezone" field.
func (*CronJobMutation) ResetUpdatedAt ¶
func (m *CronJobMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CronJobMutation) Schedule ¶
func (m *CronJobMutation) Schedule() (r string, exists bool)
Schedule returns the value of the "schedule" field in the mutation.
func (*CronJobMutation) ScheduleType ¶
func (m *CronJobMutation) ScheduleType() (r cronjob.ScheduleType, exists bool)
ScheduleType returns the value of the "schedule_type" field in the mutation.
func (*CronJobMutation) SessionMode ¶
func (m *CronJobMutation) SessionMode() (r string, exists bool)
SessionMode returns the value of the "session_mode" field in the mutation.
func (*CronJobMutation) SetCreatedAt ¶
func (m *CronJobMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CronJobMutation) SetDeliverTo ¶
func (m *CronJobMutation) SetDeliverTo(s []string)
SetDeliverTo sets the "deliver_to" field.
func (*CronJobMutation) SetEnabled ¶
func (m *CronJobMutation) SetEnabled(b bool)
SetEnabled sets the "enabled" field.
func (*CronJobMutation) SetField ¶
func (m *CronJobMutation) 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 (*CronJobMutation) SetID ¶
func (m *CronJobMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CronJob entities.
func (*CronJobMutation) SetLastRunAt ¶
func (m *CronJobMutation) SetLastRunAt(t time.Time)
SetLastRunAt sets the "last_run_at" field.
func (*CronJobMutation) SetName ¶
func (m *CronJobMutation) SetName(s string)
SetName sets the "name" field.
func (*CronJobMutation) SetNextRunAt ¶
func (m *CronJobMutation) SetNextRunAt(t time.Time)
SetNextRunAt sets the "next_run_at" field.
func (*CronJobMutation) SetOp ¶
func (m *CronJobMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CronJobMutation) SetPrompt ¶
func (m *CronJobMutation) SetPrompt(s string)
SetPrompt sets the "prompt" field.
func (*CronJobMutation) SetSchedule ¶
func (m *CronJobMutation) SetSchedule(s string)
SetSchedule sets the "schedule" field.
func (*CronJobMutation) SetScheduleType ¶
func (m *CronJobMutation) SetScheduleType(ct cronjob.ScheduleType)
SetScheduleType sets the "schedule_type" field.
func (*CronJobMutation) SetSessionMode ¶
func (m *CronJobMutation) SetSessionMode(s string)
SetSessionMode sets the "session_mode" field.
func (*CronJobMutation) SetTimeoutMs ¶ added in v0.6.0
func (m *CronJobMutation) SetTimeoutMs(i int64)
SetTimeoutMs sets the "timeout_ms" field.
func (*CronJobMutation) SetTimezone ¶
func (m *CronJobMutation) SetTimezone(s string)
SetTimezone sets the "timezone" field.
func (*CronJobMutation) SetUpdatedAt ¶
func (m *CronJobMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CronJobMutation) TimeoutMs ¶ added in v0.6.0
func (m *CronJobMutation) TimeoutMs() (r int64, exists bool)
TimeoutMs returns the value of the "timeout_ms" field in the mutation.
func (*CronJobMutation) TimeoutMsCleared ¶ added in v0.6.0
func (m *CronJobMutation) TimeoutMsCleared() bool
TimeoutMsCleared returns if the "timeout_ms" field was cleared in this mutation.
func (*CronJobMutation) Timezone ¶
func (m *CronJobMutation) Timezone() (r string, exists bool)
Timezone returns the value of the "timezone" field in the mutation.
func (CronJobMutation) Tx ¶
func (m CronJobMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CronJobMutation) Type ¶
func (m *CronJobMutation) Type() string
Type returns the node type of this mutation (CronJob).
func (*CronJobMutation) UpdatedAt ¶
func (m *CronJobMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CronJobMutation) Where ¶
func (m *CronJobMutation) Where(ps ...predicate.CronJob)
Where appends a list predicates to the CronJobMutation builder.
func (*CronJobMutation) WhereP ¶
func (m *CronJobMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CronJobMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CronJobQuery ¶
type CronJobQuery struct {
// contains filtered or unexported fields
}
CronJobQuery is the builder for querying CronJob entities.
func (*CronJobQuery) Aggregate ¶
func (_q *CronJobQuery) Aggregate(fns ...AggregateFunc) *CronJobSelect
Aggregate returns a CronJobSelect configured with the given aggregations.
func (*CronJobQuery) All ¶
func (_q *CronJobQuery) All(ctx context.Context) ([]*CronJob, error)
All executes the query and returns a list of CronJobs.
func (*CronJobQuery) AllX ¶
func (_q *CronJobQuery) AllX(ctx context.Context) []*CronJob
AllX is like All, but panics if an error occurs.
func (*CronJobQuery) Clone ¶
func (_q *CronJobQuery) Clone() *CronJobQuery
Clone returns a duplicate of the CronJobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CronJobQuery) Count ¶
func (_q *CronJobQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CronJobQuery) CountX ¶
func (_q *CronJobQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CronJobQuery) Exist ¶
func (_q *CronJobQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CronJobQuery) ExistX ¶
func (_q *CronJobQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CronJobQuery) First ¶
func (_q *CronJobQuery) First(ctx context.Context) (*CronJob, error)
First returns the first CronJob entity from the query. Returns a *NotFoundError when no CronJob was found.
func (*CronJobQuery) FirstID ¶
FirstID returns the first CronJob ID from the query. Returns a *NotFoundError when no CronJob ID was found.
func (*CronJobQuery) FirstIDX ¶
func (_q *CronJobQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CronJobQuery) FirstX ¶
func (_q *CronJobQuery) FirstX(ctx context.Context) *CronJob
FirstX is like First, but panics if an error occurs.
func (*CronJobQuery) GroupBy ¶
func (_q *CronJobQuery) GroupBy(field string, fields ...string) *CronJobGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.CronJob.Query().
GroupBy(cronjob.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CronJobQuery) IDsX ¶
func (_q *CronJobQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CronJobQuery) Limit ¶
func (_q *CronJobQuery) Limit(limit int) *CronJobQuery
Limit the number of records to be returned by this query.
func (*CronJobQuery) Offset ¶
func (_q *CronJobQuery) Offset(offset int) *CronJobQuery
Offset to start from.
func (*CronJobQuery) Only ¶
func (_q *CronJobQuery) Only(ctx context.Context) (*CronJob, error)
Only returns a single CronJob entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CronJob entity is found. Returns a *NotFoundError when no CronJob entities are found.
func (*CronJobQuery) OnlyID ¶
OnlyID is like Only, but returns the only CronJob ID in the query. Returns a *NotSingularError when more than one CronJob ID is found. Returns a *NotFoundError when no entities are found.
func (*CronJobQuery) OnlyIDX ¶
func (_q *CronJobQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CronJobQuery) OnlyX ¶
func (_q *CronJobQuery) OnlyX(ctx context.Context) *CronJob
OnlyX is like Only, but panics if an error occurs.
func (*CronJobQuery) Order ¶
func (_q *CronJobQuery) Order(o ...cronjob.OrderOption) *CronJobQuery
Order specifies how the records should be ordered.
func (*CronJobQuery) Select ¶
func (_q *CronJobQuery) Select(fields ...string) *CronJobSelect
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 {
Name string `json:"name,omitempty"`
}
client.CronJob.Query().
Select(cronjob.FieldName).
Scan(ctx, &v)
func (*CronJobQuery) Unique ¶
func (_q *CronJobQuery) Unique(unique bool) *CronJobQuery
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 (*CronJobQuery) Where ¶
func (_q *CronJobQuery) Where(ps ...predicate.CronJob) *CronJobQuery
Where adds a new predicate for the CronJobQuery builder.
type CronJobSelect ¶
type CronJobSelect struct {
*CronJobQuery
// contains filtered or unexported fields
}
CronJobSelect is the builder for selecting fields of CronJob entities.
func (*CronJobSelect) Aggregate ¶
func (_s *CronJobSelect) Aggregate(fns ...AggregateFunc) *CronJobSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CronJobSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CronJobSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CronJobSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CronJobSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CronJobSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CronJobSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CronJobSelect) Scan ¶
func (_s *CronJobSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CronJobSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CronJobUpdate ¶
type CronJobUpdate struct {
// contains filtered or unexported fields
}
CronJobUpdate is the builder for updating CronJob entities.
func (*CronJobUpdate) AddTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdate) AddTimeoutMs(v int64) *CronJobUpdate
AddTimeoutMs adds value to the "timeout_ms" field.
func (*CronJobUpdate) AppendDeliverTo ¶
func (_u *CronJobUpdate) AppendDeliverTo(v []string) *CronJobUpdate
AppendDeliverTo appends value to the "deliver_to" field.
func (*CronJobUpdate) ClearDeliverTo ¶
func (_u *CronJobUpdate) ClearDeliverTo() *CronJobUpdate
ClearDeliverTo clears the value of the "deliver_to" field.
func (*CronJobUpdate) ClearLastRunAt ¶
func (_u *CronJobUpdate) ClearLastRunAt() *CronJobUpdate
ClearLastRunAt clears the value of the "last_run_at" field.
func (*CronJobUpdate) ClearNextRunAt ¶
func (_u *CronJobUpdate) ClearNextRunAt() *CronJobUpdate
ClearNextRunAt clears the value of the "next_run_at" field.
func (*CronJobUpdate) ClearTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdate) ClearTimeoutMs() *CronJobUpdate
ClearTimeoutMs clears the value of the "timeout_ms" field.
func (*CronJobUpdate) Exec ¶
func (_u *CronJobUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CronJobUpdate) ExecX ¶
func (_u *CronJobUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobUpdate) Mutation ¶
func (_u *CronJobUpdate) Mutation() *CronJobMutation
Mutation returns the CronJobMutation object of the builder.
func (*CronJobUpdate) Save ¶
func (_u *CronJobUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CronJobUpdate) SaveX ¶
func (_u *CronJobUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CronJobUpdate) SetDeliverTo ¶
func (_u *CronJobUpdate) SetDeliverTo(v []string) *CronJobUpdate
SetDeliverTo sets the "deliver_to" field.
func (*CronJobUpdate) SetEnabled ¶
func (_u *CronJobUpdate) SetEnabled(v bool) *CronJobUpdate
SetEnabled sets the "enabled" field.
func (*CronJobUpdate) SetLastRunAt ¶
func (_u *CronJobUpdate) SetLastRunAt(v time.Time) *CronJobUpdate
SetLastRunAt sets the "last_run_at" field.
func (*CronJobUpdate) SetName ¶
func (_u *CronJobUpdate) SetName(v string) *CronJobUpdate
SetName sets the "name" field.
func (*CronJobUpdate) SetNextRunAt ¶
func (_u *CronJobUpdate) SetNextRunAt(v time.Time) *CronJobUpdate
SetNextRunAt sets the "next_run_at" field.
func (*CronJobUpdate) SetNillableEnabled ¶
func (_u *CronJobUpdate) SetNillableEnabled(v *bool) *CronJobUpdate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*CronJobUpdate) SetNillableLastRunAt ¶
func (_u *CronJobUpdate) SetNillableLastRunAt(v *time.Time) *CronJobUpdate
SetNillableLastRunAt sets the "last_run_at" field if the given value is not nil.
func (*CronJobUpdate) SetNillableName ¶
func (_u *CronJobUpdate) SetNillableName(v *string) *CronJobUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CronJobUpdate) SetNillableNextRunAt ¶
func (_u *CronJobUpdate) SetNillableNextRunAt(v *time.Time) *CronJobUpdate
SetNillableNextRunAt sets the "next_run_at" field if the given value is not nil.
func (*CronJobUpdate) SetNillablePrompt ¶
func (_u *CronJobUpdate) SetNillablePrompt(v *string) *CronJobUpdate
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*CronJobUpdate) SetNillableSchedule ¶
func (_u *CronJobUpdate) SetNillableSchedule(v *string) *CronJobUpdate
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*CronJobUpdate) SetNillableScheduleType ¶
func (_u *CronJobUpdate) SetNillableScheduleType(v *cronjob.ScheduleType) *CronJobUpdate
SetNillableScheduleType sets the "schedule_type" field if the given value is not nil.
func (*CronJobUpdate) SetNillableSessionMode ¶
func (_u *CronJobUpdate) SetNillableSessionMode(v *string) *CronJobUpdate
SetNillableSessionMode sets the "session_mode" field if the given value is not nil.
func (*CronJobUpdate) SetNillableTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdate) SetNillableTimeoutMs(v *int64) *CronJobUpdate
SetNillableTimeoutMs sets the "timeout_ms" field if the given value is not nil.
func (*CronJobUpdate) SetNillableTimezone ¶
func (_u *CronJobUpdate) SetNillableTimezone(v *string) *CronJobUpdate
SetNillableTimezone sets the "timezone" field if the given value is not nil.
func (*CronJobUpdate) SetPrompt ¶
func (_u *CronJobUpdate) SetPrompt(v string) *CronJobUpdate
SetPrompt sets the "prompt" field.
func (*CronJobUpdate) SetSchedule ¶
func (_u *CronJobUpdate) SetSchedule(v string) *CronJobUpdate
SetSchedule sets the "schedule" field.
func (*CronJobUpdate) SetScheduleType ¶
func (_u *CronJobUpdate) SetScheduleType(v cronjob.ScheduleType) *CronJobUpdate
SetScheduleType sets the "schedule_type" field.
func (*CronJobUpdate) SetSessionMode ¶
func (_u *CronJobUpdate) SetSessionMode(v string) *CronJobUpdate
SetSessionMode sets the "session_mode" field.
func (*CronJobUpdate) SetTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdate) SetTimeoutMs(v int64) *CronJobUpdate
SetTimeoutMs sets the "timeout_ms" field.
func (*CronJobUpdate) SetTimezone ¶
func (_u *CronJobUpdate) SetTimezone(v string) *CronJobUpdate
SetTimezone sets the "timezone" field.
func (*CronJobUpdate) SetUpdatedAt ¶
func (_u *CronJobUpdate) SetUpdatedAt(v time.Time) *CronJobUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CronJobUpdate) Where ¶
func (_u *CronJobUpdate) Where(ps ...predicate.CronJob) *CronJobUpdate
Where appends a list predicates to the CronJobUpdate builder.
type CronJobUpdateOne ¶
type CronJobUpdateOne struct {
// contains filtered or unexported fields
}
CronJobUpdateOne is the builder for updating a single CronJob entity.
func (*CronJobUpdateOne) AddTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdateOne) AddTimeoutMs(v int64) *CronJobUpdateOne
AddTimeoutMs adds value to the "timeout_ms" field.
func (*CronJobUpdateOne) AppendDeliverTo ¶
func (_u *CronJobUpdateOne) AppendDeliverTo(v []string) *CronJobUpdateOne
AppendDeliverTo appends value to the "deliver_to" field.
func (*CronJobUpdateOne) ClearDeliverTo ¶
func (_u *CronJobUpdateOne) ClearDeliverTo() *CronJobUpdateOne
ClearDeliverTo clears the value of the "deliver_to" field.
func (*CronJobUpdateOne) ClearLastRunAt ¶
func (_u *CronJobUpdateOne) ClearLastRunAt() *CronJobUpdateOne
ClearLastRunAt clears the value of the "last_run_at" field.
func (*CronJobUpdateOne) ClearNextRunAt ¶
func (_u *CronJobUpdateOne) ClearNextRunAt() *CronJobUpdateOne
ClearNextRunAt clears the value of the "next_run_at" field.
func (*CronJobUpdateOne) ClearTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdateOne) ClearTimeoutMs() *CronJobUpdateOne
ClearTimeoutMs clears the value of the "timeout_ms" field.
func (*CronJobUpdateOne) Exec ¶
func (_u *CronJobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CronJobUpdateOne) ExecX ¶
func (_u *CronJobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CronJobUpdateOne) Mutation ¶
func (_u *CronJobUpdateOne) Mutation() *CronJobMutation
Mutation returns the CronJobMutation object of the builder.
func (*CronJobUpdateOne) Save ¶
func (_u *CronJobUpdateOne) Save(ctx context.Context) (*CronJob, error)
Save executes the query and returns the updated CronJob entity.
func (*CronJobUpdateOne) SaveX ¶
func (_u *CronJobUpdateOne) SaveX(ctx context.Context) *CronJob
SaveX is like Save, but panics if an error occurs.
func (*CronJobUpdateOne) Select ¶
func (_u *CronJobUpdateOne) Select(field string, fields ...string) *CronJobUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CronJobUpdateOne) SetDeliverTo ¶
func (_u *CronJobUpdateOne) SetDeliverTo(v []string) *CronJobUpdateOne
SetDeliverTo sets the "deliver_to" field.
func (*CronJobUpdateOne) SetEnabled ¶
func (_u *CronJobUpdateOne) SetEnabled(v bool) *CronJobUpdateOne
SetEnabled sets the "enabled" field.
func (*CronJobUpdateOne) SetLastRunAt ¶
func (_u *CronJobUpdateOne) SetLastRunAt(v time.Time) *CronJobUpdateOne
SetLastRunAt sets the "last_run_at" field.
func (*CronJobUpdateOne) SetName ¶
func (_u *CronJobUpdateOne) SetName(v string) *CronJobUpdateOne
SetName sets the "name" field.
func (*CronJobUpdateOne) SetNextRunAt ¶
func (_u *CronJobUpdateOne) SetNextRunAt(v time.Time) *CronJobUpdateOne
SetNextRunAt sets the "next_run_at" field.
func (*CronJobUpdateOne) SetNillableEnabled ¶
func (_u *CronJobUpdateOne) SetNillableEnabled(v *bool) *CronJobUpdateOne
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableLastRunAt ¶
func (_u *CronJobUpdateOne) SetNillableLastRunAt(v *time.Time) *CronJobUpdateOne
SetNillableLastRunAt sets the "last_run_at" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableName ¶
func (_u *CronJobUpdateOne) SetNillableName(v *string) *CronJobUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableNextRunAt ¶
func (_u *CronJobUpdateOne) SetNillableNextRunAt(v *time.Time) *CronJobUpdateOne
SetNillableNextRunAt sets the "next_run_at" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillablePrompt ¶
func (_u *CronJobUpdateOne) SetNillablePrompt(v *string) *CronJobUpdateOne
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableSchedule ¶
func (_u *CronJobUpdateOne) SetNillableSchedule(v *string) *CronJobUpdateOne
SetNillableSchedule sets the "schedule" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableScheduleType ¶
func (_u *CronJobUpdateOne) SetNillableScheduleType(v *cronjob.ScheduleType) *CronJobUpdateOne
SetNillableScheduleType sets the "schedule_type" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableSessionMode ¶
func (_u *CronJobUpdateOne) SetNillableSessionMode(v *string) *CronJobUpdateOne
SetNillableSessionMode sets the "session_mode" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdateOne) SetNillableTimeoutMs(v *int64) *CronJobUpdateOne
SetNillableTimeoutMs sets the "timeout_ms" field if the given value is not nil.
func (*CronJobUpdateOne) SetNillableTimezone ¶
func (_u *CronJobUpdateOne) SetNillableTimezone(v *string) *CronJobUpdateOne
SetNillableTimezone sets the "timezone" field if the given value is not nil.
func (*CronJobUpdateOne) SetPrompt ¶
func (_u *CronJobUpdateOne) SetPrompt(v string) *CronJobUpdateOne
SetPrompt sets the "prompt" field.
func (*CronJobUpdateOne) SetSchedule ¶
func (_u *CronJobUpdateOne) SetSchedule(v string) *CronJobUpdateOne
SetSchedule sets the "schedule" field.
func (*CronJobUpdateOne) SetScheduleType ¶
func (_u *CronJobUpdateOne) SetScheduleType(v cronjob.ScheduleType) *CronJobUpdateOne
SetScheduleType sets the "schedule_type" field.
func (*CronJobUpdateOne) SetSessionMode ¶
func (_u *CronJobUpdateOne) SetSessionMode(v string) *CronJobUpdateOne
SetSessionMode sets the "session_mode" field.
func (*CronJobUpdateOne) SetTimeoutMs ¶ added in v0.6.0
func (_u *CronJobUpdateOne) SetTimeoutMs(v int64) *CronJobUpdateOne
SetTimeoutMs sets the "timeout_ms" field.
func (*CronJobUpdateOne) SetTimezone ¶
func (_u *CronJobUpdateOne) SetTimezone(v string) *CronJobUpdateOne
SetTimezone sets the "timezone" field.
func (*CronJobUpdateOne) SetUpdatedAt ¶
func (_u *CronJobUpdateOne) SetUpdatedAt(v time.Time) *CronJobUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CronJobUpdateOne) Where ¶
func (_u *CronJobUpdateOne) Where(ps ...predicate.CronJob) *CronJobUpdateOne
Where appends a list predicates to the CronJobUpdate builder.
type EscrowDeal ¶ added in v0.5.0
type EscrowDeal struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Unique escrow identifier
EscrowID string `json:"escrow_id,omitempty"`
// Buyer DID
BuyerDid string `json:"buyer_did,omitempty"`
// Seller DID
SellerDid string `json:"seller_did,omitempty"`
// Total escrow amount as decimal string (big.Int)
TotalAmount string `json:"total_amount,omitempty"`
// Escrow lifecycle status
Status string `json:"status,omitempty"`
// JSON-serialized milestone data
Milestones []byte `json:"milestones,omitempty"`
// Associated task identifier
TaskID string `json:"task_id,omitempty"`
// Reason for the escrow
Reason string `json:"reason,omitempty"`
// Dispute description if disputed
DisputeNote string `json:"dispute_note,omitempty"`
// EVM chain ID for on-chain tracking
ChainID int64 `json:"chain_id,omitempty"`
// On-chain escrow hub contract address
HubAddress string `json:"hub_address,omitempty"`
// Deal ID on the escrow contract
OnChainDealID string `json:"on_chain_deal_id,omitempty"`
// Deposit transaction hash
DepositTxHash string `json:"deposit_tx_hash,omitempty"`
// Release transaction hash
ReleaseTxHash string `json:"release_tx_hash,omitempty"`
// Refund transaction hash
RefundTxHash string `json:"refund_tx_hash,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Escrow expiration time
ExpiresAt time.Time `json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
EscrowDeal is the model entity for the EscrowDeal schema.
func (*EscrowDeal) String ¶ added in v0.5.0
func (_m *EscrowDeal) String() string
String implements the fmt.Stringer.
func (*EscrowDeal) Unwrap ¶ added in v0.5.0
func (_m *EscrowDeal) Unwrap() *EscrowDeal
Unwrap unwraps the EscrowDeal 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 (*EscrowDeal) Update ¶ added in v0.5.0
func (_m *EscrowDeal) Update() *EscrowDealUpdateOne
Update returns a builder for updating this EscrowDeal. Note that you need to call EscrowDeal.Unwrap() before calling this method if this EscrowDeal was returned from a transaction, and the transaction was committed or rolled back.
type EscrowDealClient ¶ added in v0.5.0
type EscrowDealClient struct {
// contains filtered or unexported fields
}
EscrowDealClient is a client for the EscrowDeal schema.
func NewEscrowDealClient ¶ added in v0.5.0
func NewEscrowDealClient(c config) *EscrowDealClient
NewEscrowDealClient returns a client for the EscrowDeal from the given config.
func (*EscrowDealClient) Create ¶ added in v0.5.0
func (c *EscrowDealClient) Create() *EscrowDealCreate
Create returns a builder for creating a EscrowDeal entity.
func (*EscrowDealClient) CreateBulk ¶ added in v0.5.0
func (c *EscrowDealClient) CreateBulk(builders ...*EscrowDealCreate) *EscrowDealCreateBulk
CreateBulk returns a builder for creating a bulk of EscrowDeal entities.
func (*EscrowDealClient) Delete ¶ added in v0.5.0
func (c *EscrowDealClient) Delete() *EscrowDealDelete
Delete returns a delete builder for EscrowDeal.
func (*EscrowDealClient) DeleteOne ¶ added in v0.5.0
func (c *EscrowDealClient) DeleteOne(_m *EscrowDeal) *EscrowDealDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EscrowDealClient) DeleteOneID ¶ added in v0.5.0
func (c *EscrowDealClient) DeleteOneID(id int) *EscrowDealDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EscrowDealClient) Get ¶ added in v0.5.0
func (c *EscrowDealClient) Get(ctx context.Context, id int) (*EscrowDeal, error)
Get returns a EscrowDeal entity by its id.
func (*EscrowDealClient) GetX ¶ added in v0.5.0
func (c *EscrowDealClient) GetX(ctx context.Context, id int) *EscrowDeal
GetX is like Get, but panics if an error occurs.
func (*EscrowDealClient) Hooks ¶ added in v0.5.0
func (c *EscrowDealClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EscrowDealClient) Intercept ¶ added in v0.5.0
func (c *EscrowDealClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `escrowdeal.Intercept(f(g(h())))`.
func (*EscrowDealClient) Interceptors ¶ added in v0.5.0
func (c *EscrowDealClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EscrowDealClient) MapCreateBulk ¶ added in v0.5.0
func (c *EscrowDealClient) MapCreateBulk(slice any, setFunc func(*EscrowDealCreate, int)) *EscrowDealCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*EscrowDealClient) Query ¶ added in v0.5.0
func (c *EscrowDealClient) Query() *EscrowDealQuery
Query returns a query builder for EscrowDeal.
func (*EscrowDealClient) Update ¶ added in v0.5.0
func (c *EscrowDealClient) Update() *EscrowDealUpdate
Update returns an update builder for EscrowDeal.
func (*EscrowDealClient) UpdateOne ¶ added in v0.5.0
func (c *EscrowDealClient) UpdateOne(_m *EscrowDeal) *EscrowDealUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EscrowDealClient) UpdateOneID ¶ added in v0.5.0
func (c *EscrowDealClient) UpdateOneID(id int) *EscrowDealUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EscrowDealClient) Use ¶ added in v0.5.0
func (c *EscrowDealClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `escrowdeal.Hooks(f(g(h())))`.
type EscrowDealCreate ¶ added in v0.5.0
type EscrowDealCreate struct {
// contains filtered or unexported fields
}
EscrowDealCreate is the builder for creating a EscrowDeal entity.
func (*EscrowDealCreate) Exec ¶ added in v0.5.0
func (_c *EscrowDealCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EscrowDealCreate) ExecX ¶ added in v0.5.0
func (_c *EscrowDealCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EscrowDealCreate) Mutation ¶ added in v0.5.0
func (_c *EscrowDealCreate) Mutation() *EscrowDealMutation
Mutation returns the EscrowDealMutation object of the builder.
func (*EscrowDealCreate) Save ¶ added in v0.5.0
func (_c *EscrowDealCreate) Save(ctx context.Context) (*EscrowDeal, error)
Save creates the EscrowDeal in the database.
func (*EscrowDealCreate) SaveX ¶ added in v0.5.0
func (_c *EscrowDealCreate) SaveX(ctx context.Context) *EscrowDeal
SaveX calls Save and panics if Save returns an error.
func (*EscrowDealCreate) SetBuyerDid ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetBuyerDid(v string) *EscrowDealCreate
SetBuyerDid sets the "buyer_did" field.
func (*EscrowDealCreate) SetChainID ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetChainID(v int64) *EscrowDealCreate
SetChainID sets the "chain_id" field.
func (*EscrowDealCreate) SetCreatedAt ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetCreatedAt(v time.Time) *EscrowDealCreate
SetCreatedAt sets the "created_at" field.
func (*EscrowDealCreate) SetDepositTxHash ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetDepositTxHash(v string) *EscrowDealCreate
SetDepositTxHash sets the "deposit_tx_hash" field.
func (*EscrowDealCreate) SetDisputeNote ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetDisputeNote(v string) *EscrowDealCreate
SetDisputeNote sets the "dispute_note" field.
func (*EscrowDealCreate) SetEscrowID ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetEscrowID(v string) *EscrowDealCreate
SetEscrowID sets the "escrow_id" field.
func (*EscrowDealCreate) SetExpiresAt ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetExpiresAt(v time.Time) *EscrowDealCreate
SetExpiresAt sets the "expires_at" field.
func (*EscrowDealCreate) SetHubAddress ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetHubAddress(v string) *EscrowDealCreate
SetHubAddress sets the "hub_address" field.
func (*EscrowDealCreate) SetMilestones ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetMilestones(v []byte) *EscrowDealCreate
SetMilestones sets the "milestones" field.
func (*EscrowDealCreate) SetNillableChainID ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableChainID(v *int64) *EscrowDealCreate
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableCreatedAt ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableCreatedAt(v *time.Time) *EscrowDealCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableDepositTxHash ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableDepositTxHash(v *string) *EscrowDealCreate
SetNillableDepositTxHash sets the "deposit_tx_hash" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableDisputeNote ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableDisputeNote(v *string) *EscrowDealCreate
SetNillableDisputeNote sets the "dispute_note" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableHubAddress ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableHubAddress(v *string) *EscrowDealCreate
SetNillableHubAddress sets the "hub_address" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableOnChainDealID ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableOnChainDealID(v *string) *EscrowDealCreate
SetNillableOnChainDealID sets the "on_chain_deal_id" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableReason ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableReason(v *string) *EscrowDealCreate
SetNillableReason sets the "reason" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableRefundTxHash ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableRefundTxHash(v *string) *EscrowDealCreate
SetNillableRefundTxHash sets the "refund_tx_hash" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableReleaseTxHash ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableReleaseTxHash(v *string) *EscrowDealCreate
SetNillableReleaseTxHash sets the "release_tx_hash" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableStatus ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableStatus(v *string) *EscrowDealCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableTaskID ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableTaskID(v *string) *EscrowDealCreate
SetNillableTaskID sets the "task_id" field if the given value is not nil.
func (*EscrowDealCreate) SetNillableUpdatedAt ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetNillableUpdatedAt(v *time.Time) *EscrowDealCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*EscrowDealCreate) SetOnChainDealID ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetOnChainDealID(v string) *EscrowDealCreate
SetOnChainDealID sets the "on_chain_deal_id" field.
func (*EscrowDealCreate) SetReason ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetReason(v string) *EscrowDealCreate
SetReason sets the "reason" field.
func (*EscrowDealCreate) SetRefundTxHash ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetRefundTxHash(v string) *EscrowDealCreate
SetRefundTxHash sets the "refund_tx_hash" field.
func (*EscrowDealCreate) SetReleaseTxHash ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetReleaseTxHash(v string) *EscrowDealCreate
SetReleaseTxHash sets the "release_tx_hash" field.
func (*EscrowDealCreate) SetSellerDid ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetSellerDid(v string) *EscrowDealCreate
SetSellerDid sets the "seller_did" field.
func (*EscrowDealCreate) SetStatus ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetStatus(v string) *EscrowDealCreate
SetStatus sets the "status" field.
func (*EscrowDealCreate) SetTaskID ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetTaskID(v string) *EscrowDealCreate
SetTaskID sets the "task_id" field.
func (*EscrowDealCreate) SetTotalAmount ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetTotalAmount(v string) *EscrowDealCreate
SetTotalAmount sets the "total_amount" field.
func (*EscrowDealCreate) SetUpdatedAt ¶ added in v0.5.0
func (_c *EscrowDealCreate) SetUpdatedAt(v time.Time) *EscrowDealCreate
SetUpdatedAt sets the "updated_at" field.
type EscrowDealCreateBulk ¶ added in v0.5.0
type EscrowDealCreateBulk struct {
// contains filtered or unexported fields
}
EscrowDealCreateBulk is the builder for creating many EscrowDeal entities in bulk.
func (*EscrowDealCreateBulk) Exec ¶ added in v0.5.0
func (_c *EscrowDealCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EscrowDealCreateBulk) ExecX ¶ added in v0.5.0
func (_c *EscrowDealCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EscrowDealCreateBulk) Save ¶ added in v0.5.0
func (_c *EscrowDealCreateBulk) Save(ctx context.Context) ([]*EscrowDeal, error)
Save creates the EscrowDeal entities in the database.
func (*EscrowDealCreateBulk) SaveX ¶ added in v0.5.0
func (_c *EscrowDealCreateBulk) SaveX(ctx context.Context) []*EscrowDeal
SaveX is like Save, but panics if an error occurs.
type EscrowDealDelete ¶ added in v0.5.0
type EscrowDealDelete struct {
// contains filtered or unexported fields
}
EscrowDealDelete is the builder for deleting a EscrowDeal entity.
func (*EscrowDealDelete) Exec ¶ added in v0.5.0
func (_d *EscrowDealDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EscrowDealDelete) ExecX ¶ added in v0.5.0
func (_d *EscrowDealDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EscrowDealDelete) Where ¶ added in v0.5.0
func (_d *EscrowDealDelete) Where(ps ...predicate.EscrowDeal) *EscrowDealDelete
Where appends a list predicates to the EscrowDealDelete builder.
type EscrowDealDeleteOne ¶ added in v0.5.0
type EscrowDealDeleteOne struct {
// contains filtered or unexported fields
}
EscrowDealDeleteOne is the builder for deleting a single EscrowDeal entity.
func (*EscrowDealDeleteOne) Exec ¶ added in v0.5.0
func (_d *EscrowDealDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EscrowDealDeleteOne) ExecX ¶ added in v0.5.0
func (_d *EscrowDealDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EscrowDealDeleteOne) Where ¶ added in v0.5.0
func (_d *EscrowDealDeleteOne) Where(ps ...predicate.EscrowDeal) *EscrowDealDeleteOne
Where appends a list predicates to the EscrowDealDelete builder.
type EscrowDealGroupBy ¶ added in v0.5.0
type EscrowDealGroupBy struct {
// contains filtered or unexported fields
}
EscrowDealGroupBy is the group-by builder for EscrowDeal entities.
func (*EscrowDealGroupBy) Aggregate ¶ added in v0.5.0
func (_g *EscrowDealGroupBy) Aggregate(fns ...AggregateFunc) *EscrowDealGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EscrowDealGroupBy) Bool ¶ added in v0.5.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EscrowDealGroupBy) BoolX ¶ added in v0.5.0
BoolX is like Bool, but panics if an error occurs.
func (*EscrowDealGroupBy) Bools ¶ added in v0.5.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EscrowDealGroupBy) BoolsX ¶ added in v0.5.0
BoolsX is like Bools, but panics if an error occurs.
func (*EscrowDealGroupBy) Float64 ¶ added in v0.5.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EscrowDealGroupBy) Float64X ¶ added in v0.5.0
Float64X is like Float64, but panics if an error occurs.
func (*EscrowDealGroupBy) Float64s ¶ added in v0.5.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EscrowDealGroupBy) Float64sX ¶ added in v0.5.0
Float64sX is like Float64s, but panics if an error occurs.
func (*EscrowDealGroupBy) Int ¶ added in v0.5.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EscrowDealGroupBy) Ints ¶ added in v0.5.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EscrowDealGroupBy) IntsX ¶ added in v0.5.0
IntsX is like Ints, but panics if an error occurs.
func (*EscrowDealGroupBy) Scan ¶ added in v0.5.0
func (_g *EscrowDealGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EscrowDealGroupBy) ScanX ¶ added in v0.5.0
ScanX is like Scan, but panics if an error occurs.
func (*EscrowDealGroupBy) String ¶ added in v0.5.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*EscrowDealGroupBy) StringX ¶ added in v0.5.0
StringX is like String, but panics if an error occurs.
type EscrowDealMutation ¶ added in v0.5.0
type EscrowDealMutation struct {
// contains filtered or unexported fields
}
EscrowDealMutation represents an operation that mutates the EscrowDeal nodes in the graph.
func (*EscrowDealMutation) AddChainID ¶ added in v0.5.0
func (m *EscrowDealMutation) AddChainID(i int64)
AddChainID adds i to the "chain_id" field.
func (*EscrowDealMutation) AddField ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) AddedChainID ¶ added in v0.5.0
func (m *EscrowDealMutation) AddedChainID() (r int64, exists bool)
AddedChainID returns the value that was added to the "chain_id" field in this mutation.
func (*EscrowDealMutation) AddedEdges ¶ added in v0.5.0
func (m *EscrowDealMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EscrowDealMutation) AddedField ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) AddedFields ¶ added in v0.5.0
func (m *EscrowDealMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EscrowDealMutation) AddedIDs ¶ added in v0.5.0
func (m *EscrowDealMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EscrowDealMutation) BuyerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) BuyerDid() (r string, exists bool)
BuyerDid returns the value of the "buyer_did" field in the mutation.
func (*EscrowDealMutation) ChainID ¶ added in v0.5.0
func (m *EscrowDealMutation) ChainID() (r int64, exists bool)
ChainID returns the value of the "chain_id" field in the mutation.
func (*EscrowDealMutation) ChainIDCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) ChainIDCleared() bool
ChainIDCleared returns if the "chain_id" field was cleared in this mutation.
func (*EscrowDealMutation) ClearChainID ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearChainID()
ClearChainID clears the value of the "chain_id" field.
func (*EscrowDealMutation) ClearDepositTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearDepositTxHash()
ClearDepositTxHash clears the value of the "deposit_tx_hash" field.
func (*EscrowDealMutation) ClearDisputeNote ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearDisputeNote()
ClearDisputeNote clears the value of the "dispute_note" field.
func (*EscrowDealMutation) ClearEdge ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) ClearField ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) ClearHubAddress ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearHubAddress()
ClearHubAddress clears the value of the "hub_address" field.
func (*EscrowDealMutation) ClearMilestones ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearMilestones()
ClearMilestones clears the value of the "milestones" field.
func (*EscrowDealMutation) ClearOnChainDealID ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearOnChainDealID()
ClearOnChainDealID clears the value of the "on_chain_deal_id" field.
func (*EscrowDealMutation) ClearReason ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearReason()
ClearReason clears the value of the "reason" field.
func (*EscrowDealMutation) ClearRefundTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearRefundTxHash()
ClearRefundTxHash clears the value of the "refund_tx_hash" field.
func (*EscrowDealMutation) ClearReleaseTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearReleaseTxHash()
ClearReleaseTxHash clears the value of the "release_tx_hash" field.
func (*EscrowDealMutation) ClearTaskID ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearTaskID()
ClearTaskID clears the value of the "task_id" field.
func (*EscrowDealMutation) ClearedEdges ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EscrowDealMutation) ClearedFields ¶ added in v0.5.0
func (m *EscrowDealMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EscrowDealMutation) Client ¶ added in v0.5.0
func (m EscrowDealMutation) 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 (*EscrowDealMutation) CreatedAt ¶ added in v0.5.0
func (m *EscrowDealMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*EscrowDealMutation) DepositTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) DepositTxHash() (r string, exists bool)
DepositTxHash returns the value of the "deposit_tx_hash" field in the mutation.
func (*EscrowDealMutation) DepositTxHashCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) DepositTxHashCleared() bool
DepositTxHashCleared returns if the "deposit_tx_hash" field was cleared in this mutation.
func (*EscrowDealMutation) DisputeNote ¶ added in v0.5.0
func (m *EscrowDealMutation) DisputeNote() (r string, exists bool)
DisputeNote returns the value of the "dispute_note" field in the mutation.
func (*EscrowDealMutation) DisputeNoteCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) DisputeNoteCleared() bool
DisputeNoteCleared returns if the "dispute_note" field was cleared in this mutation.
func (*EscrowDealMutation) EdgeCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EscrowDealMutation) EscrowID ¶ added in v0.5.0
func (m *EscrowDealMutation) EscrowID() (r string, exists bool)
EscrowID returns the value of the "escrow_id" field in the mutation.
func (*EscrowDealMutation) ExpiresAt ¶ added in v0.5.0
func (m *EscrowDealMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the value of the "expires_at" field in the mutation.
func (*EscrowDealMutation) Field ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) FieldCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EscrowDealMutation) Fields ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) HubAddress ¶ added in v0.5.0
func (m *EscrowDealMutation) HubAddress() (r string, exists bool)
HubAddress returns the value of the "hub_address" field in the mutation.
func (*EscrowDealMutation) HubAddressCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) HubAddressCleared() bool
HubAddressCleared returns if the "hub_address" field was cleared in this mutation.
func (*EscrowDealMutation) ID ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) IDs ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) Milestones ¶ added in v0.5.0
func (m *EscrowDealMutation) Milestones() (r []byte, exists bool)
Milestones returns the value of the "milestones" field in the mutation.
func (*EscrowDealMutation) MilestonesCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) MilestonesCleared() bool
MilestonesCleared returns if the "milestones" field was cleared in this mutation.
func (*EscrowDealMutation) OldBuyerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) OldBuyerDid(ctx context.Context) (v string, err error)
OldBuyerDid returns the old "buyer_did" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldChainID ¶ added in v0.5.0
func (m *EscrowDealMutation) OldChainID(ctx context.Context) (v int64, err error)
OldChainID returns the old "chain_id" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldCreatedAt ¶ added in v0.5.0
OldCreatedAt returns the old "created_at" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldDepositTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) OldDepositTxHash(ctx context.Context) (v string, err error)
OldDepositTxHash returns the old "deposit_tx_hash" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldDisputeNote ¶ added in v0.5.0
func (m *EscrowDealMutation) OldDisputeNote(ctx context.Context) (v string, err error)
OldDisputeNote returns the old "dispute_note" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldEscrowID ¶ added in v0.5.0
func (m *EscrowDealMutation) OldEscrowID(ctx context.Context) (v string, err error)
OldEscrowID returns the old "escrow_id" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldExpiresAt ¶ added in v0.5.0
OldExpiresAt returns the old "expires_at" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldField ¶ added in v0.5.0
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 (*EscrowDealMutation) OldHubAddress ¶ added in v0.5.0
func (m *EscrowDealMutation) OldHubAddress(ctx context.Context) (v string, err error)
OldHubAddress returns the old "hub_address" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldMilestones ¶ added in v0.5.0
func (m *EscrowDealMutation) OldMilestones(ctx context.Context) (v []byte, err error)
OldMilestones returns the old "milestones" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldOnChainDealID ¶ added in v0.5.0
func (m *EscrowDealMutation) OldOnChainDealID(ctx context.Context) (v string, err error)
OldOnChainDealID returns the old "on_chain_deal_id" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldReason ¶ added in v0.5.0
func (m *EscrowDealMutation) OldReason(ctx context.Context) (v string, err error)
OldReason returns the old "reason" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldRefundTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) OldRefundTxHash(ctx context.Context) (v string, err error)
OldRefundTxHash returns the old "refund_tx_hash" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldReleaseTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) OldReleaseTxHash(ctx context.Context) (v string, err error)
OldReleaseTxHash returns the old "release_tx_hash" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldSellerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) OldSellerDid(ctx context.Context) (v string, err error)
OldSellerDid returns the old "seller_did" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldStatus ¶ added in v0.5.0
func (m *EscrowDealMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldTaskID ¶ added in v0.5.0
func (m *EscrowDealMutation) OldTaskID(ctx context.Context) (v string, err error)
OldTaskID returns the old "task_id" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldTotalAmount ¶ added in v0.5.0
func (m *EscrowDealMutation) OldTotalAmount(ctx context.Context) (v string, err error)
OldTotalAmount returns the old "total_amount" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OldUpdatedAt ¶ added in v0.5.0
OldUpdatedAt returns the old "updated_at" field's value of the EscrowDeal entity. If the EscrowDeal 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 (*EscrowDealMutation) OnChainDealID ¶ added in v0.5.0
func (m *EscrowDealMutation) OnChainDealID() (r string, exists bool)
OnChainDealID returns the value of the "on_chain_deal_id" field in the mutation.
func (*EscrowDealMutation) OnChainDealIDCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) OnChainDealIDCleared() bool
OnChainDealIDCleared returns if the "on_chain_deal_id" field was cleared in this mutation.
func (*EscrowDealMutation) Op ¶ added in v0.5.0
func (m *EscrowDealMutation) Op() Op
Op returns the operation name.
func (*EscrowDealMutation) Reason ¶ added in v0.5.0
func (m *EscrowDealMutation) Reason() (r string, exists bool)
Reason returns the value of the "reason" field in the mutation.
func (*EscrowDealMutation) ReasonCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) ReasonCleared() bool
ReasonCleared returns if the "reason" field was cleared in this mutation.
func (*EscrowDealMutation) RefundTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) RefundTxHash() (r string, exists bool)
RefundTxHash returns the value of the "refund_tx_hash" field in the mutation.
func (*EscrowDealMutation) RefundTxHashCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) RefundTxHashCleared() bool
RefundTxHashCleared returns if the "refund_tx_hash" field was cleared in this mutation.
func (*EscrowDealMutation) ReleaseTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) ReleaseTxHash() (r string, exists bool)
ReleaseTxHash returns the value of the "release_tx_hash" field in the mutation.
func (*EscrowDealMutation) ReleaseTxHashCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) ReleaseTxHashCleared() bool
ReleaseTxHashCleared returns if the "release_tx_hash" field was cleared in this mutation.
func (*EscrowDealMutation) RemovedEdges ¶ added in v0.5.0
func (m *EscrowDealMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EscrowDealMutation) RemovedIDs ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) ResetBuyerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetBuyerDid()
ResetBuyerDid resets all changes to the "buyer_did" field.
func (*EscrowDealMutation) ResetChainID ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetChainID()
ResetChainID resets all changes to the "chain_id" field.
func (*EscrowDealMutation) ResetCreatedAt ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*EscrowDealMutation) ResetDepositTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetDepositTxHash()
ResetDepositTxHash resets all changes to the "deposit_tx_hash" field.
func (*EscrowDealMutation) ResetDisputeNote ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetDisputeNote()
ResetDisputeNote resets all changes to the "dispute_note" field.
func (*EscrowDealMutation) ResetEdge ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) ResetEscrowID ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetEscrowID()
ResetEscrowID resets all changes to the "escrow_id" field.
func (*EscrowDealMutation) ResetExpiresAt ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetExpiresAt()
ResetExpiresAt resets all changes to the "expires_at" field.
func (*EscrowDealMutation) ResetField ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) ResetHubAddress ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetHubAddress()
ResetHubAddress resets all changes to the "hub_address" field.
func (*EscrowDealMutation) ResetMilestones ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetMilestones()
ResetMilestones resets all changes to the "milestones" field.
func (*EscrowDealMutation) ResetOnChainDealID ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetOnChainDealID()
ResetOnChainDealID resets all changes to the "on_chain_deal_id" field.
func (*EscrowDealMutation) ResetReason ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetReason()
ResetReason resets all changes to the "reason" field.
func (*EscrowDealMutation) ResetRefundTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetRefundTxHash()
ResetRefundTxHash resets all changes to the "refund_tx_hash" field.
func (*EscrowDealMutation) ResetReleaseTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetReleaseTxHash()
ResetReleaseTxHash resets all changes to the "release_tx_hash" field.
func (*EscrowDealMutation) ResetSellerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetSellerDid()
ResetSellerDid resets all changes to the "seller_did" field.
func (*EscrowDealMutation) ResetStatus ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*EscrowDealMutation) ResetTaskID ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetTaskID()
ResetTaskID resets all changes to the "task_id" field.
func (*EscrowDealMutation) ResetTotalAmount ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetTotalAmount()
ResetTotalAmount resets all changes to the "total_amount" field.
func (*EscrowDealMutation) ResetUpdatedAt ¶ added in v0.5.0
func (m *EscrowDealMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*EscrowDealMutation) SellerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) SellerDid() (r string, exists bool)
SellerDid returns the value of the "seller_did" field in the mutation.
func (*EscrowDealMutation) SetBuyerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) SetBuyerDid(s string)
SetBuyerDid sets the "buyer_did" field.
func (*EscrowDealMutation) SetChainID ¶ added in v0.5.0
func (m *EscrowDealMutation) SetChainID(i int64)
SetChainID sets the "chain_id" field.
func (*EscrowDealMutation) SetCreatedAt ¶ added in v0.5.0
func (m *EscrowDealMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*EscrowDealMutation) SetDepositTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) SetDepositTxHash(s string)
SetDepositTxHash sets the "deposit_tx_hash" field.
func (*EscrowDealMutation) SetDisputeNote ¶ added in v0.5.0
func (m *EscrowDealMutation) SetDisputeNote(s string)
SetDisputeNote sets the "dispute_note" field.
func (*EscrowDealMutation) SetEscrowID ¶ added in v0.5.0
func (m *EscrowDealMutation) SetEscrowID(s string)
SetEscrowID sets the "escrow_id" field.
func (*EscrowDealMutation) SetExpiresAt ¶ added in v0.5.0
func (m *EscrowDealMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the "expires_at" field.
func (*EscrowDealMutation) SetField ¶ added in v0.5.0
func (m *EscrowDealMutation) 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 (*EscrowDealMutation) SetHubAddress ¶ added in v0.5.0
func (m *EscrowDealMutation) SetHubAddress(s string)
SetHubAddress sets the "hub_address" field.
func (*EscrowDealMutation) SetMilestones ¶ added in v0.5.0
func (m *EscrowDealMutation) SetMilestones(b []byte)
SetMilestones sets the "milestones" field.
func (*EscrowDealMutation) SetOnChainDealID ¶ added in v0.5.0
func (m *EscrowDealMutation) SetOnChainDealID(s string)
SetOnChainDealID sets the "on_chain_deal_id" field.
func (*EscrowDealMutation) SetOp ¶ added in v0.5.0
func (m *EscrowDealMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EscrowDealMutation) SetReason ¶ added in v0.5.0
func (m *EscrowDealMutation) SetReason(s string)
SetReason sets the "reason" field.
func (*EscrowDealMutation) SetRefundTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) SetRefundTxHash(s string)
SetRefundTxHash sets the "refund_tx_hash" field.
func (*EscrowDealMutation) SetReleaseTxHash ¶ added in v0.5.0
func (m *EscrowDealMutation) SetReleaseTxHash(s string)
SetReleaseTxHash sets the "release_tx_hash" field.
func (*EscrowDealMutation) SetSellerDid ¶ added in v0.5.0
func (m *EscrowDealMutation) SetSellerDid(s string)
SetSellerDid sets the "seller_did" field.
func (*EscrowDealMutation) SetStatus ¶ added in v0.5.0
func (m *EscrowDealMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*EscrowDealMutation) SetTaskID ¶ added in v0.5.0
func (m *EscrowDealMutation) SetTaskID(s string)
SetTaskID sets the "task_id" field.
func (*EscrowDealMutation) SetTotalAmount ¶ added in v0.5.0
func (m *EscrowDealMutation) SetTotalAmount(s string)
SetTotalAmount sets the "total_amount" field.
func (*EscrowDealMutation) SetUpdatedAt ¶ added in v0.5.0
func (m *EscrowDealMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*EscrowDealMutation) Status ¶ added in v0.5.0
func (m *EscrowDealMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (*EscrowDealMutation) TaskID ¶ added in v0.5.0
func (m *EscrowDealMutation) TaskID() (r string, exists bool)
TaskID returns the value of the "task_id" field in the mutation.
func (*EscrowDealMutation) TaskIDCleared ¶ added in v0.5.0
func (m *EscrowDealMutation) TaskIDCleared() bool
TaskIDCleared returns if the "task_id" field was cleared in this mutation.
func (*EscrowDealMutation) TotalAmount ¶ added in v0.5.0
func (m *EscrowDealMutation) TotalAmount() (r string, exists bool)
TotalAmount returns the value of the "total_amount" field in the mutation.
func (EscrowDealMutation) Tx ¶ added in v0.5.0
func (m EscrowDealMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EscrowDealMutation) Type ¶ added in v0.5.0
func (m *EscrowDealMutation) Type() string
Type returns the node type of this mutation (EscrowDeal).
func (*EscrowDealMutation) UpdatedAt ¶ added in v0.5.0
func (m *EscrowDealMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*EscrowDealMutation) Where ¶ added in v0.5.0
func (m *EscrowDealMutation) Where(ps ...predicate.EscrowDeal)
Where appends a list predicates to the EscrowDealMutation builder.
func (*EscrowDealMutation) WhereP ¶ added in v0.5.0
func (m *EscrowDealMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EscrowDealMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EscrowDealQuery ¶ added in v0.5.0
type EscrowDealQuery struct {
// contains filtered or unexported fields
}
EscrowDealQuery is the builder for querying EscrowDeal entities.
func (*EscrowDealQuery) Aggregate ¶ added in v0.5.0
func (_q *EscrowDealQuery) Aggregate(fns ...AggregateFunc) *EscrowDealSelect
Aggregate returns a EscrowDealSelect configured with the given aggregations.
func (*EscrowDealQuery) All ¶ added in v0.5.0
func (_q *EscrowDealQuery) All(ctx context.Context) ([]*EscrowDeal, error)
All executes the query and returns a list of EscrowDeals.
func (*EscrowDealQuery) AllX ¶ added in v0.5.0
func (_q *EscrowDealQuery) AllX(ctx context.Context) []*EscrowDeal
AllX is like All, but panics if an error occurs.
func (*EscrowDealQuery) Clone ¶ added in v0.5.0
func (_q *EscrowDealQuery) Clone() *EscrowDealQuery
Clone returns a duplicate of the EscrowDealQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EscrowDealQuery) Count ¶ added in v0.5.0
func (_q *EscrowDealQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EscrowDealQuery) CountX ¶ added in v0.5.0
func (_q *EscrowDealQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EscrowDealQuery) Exist ¶ added in v0.5.0
func (_q *EscrowDealQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EscrowDealQuery) ExistX ¶ added in v0.5.0
func (_q *EscrowDealQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EscrowDealQuery) First ¶ added in v0.5.0
func (_q *EscrowDealQuery) First(ctx context.Context) (*EscrowDeal, error)
First returns the first EscrowDeal entity from the query. Returns a *NotFoundError when no EscrowDeal was found.
func (*EscrowDealQuery) FirstID ¶ added in v0.5.0
func (_q *EscrowDealQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first EscrowDeal ID from the query. Returns a *NotFoundError when no EscrowDeal ID was found.
func (*EscrowDealQuery) FirstIDX ¶ added in v0.5.0
func (_q *EscrowDealQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EscrowDealQuery) FirstX ¶ added in v0.5.0
func (_q *EscrowDealQuery) FirstX(ctx context.Context) *EscrowDeal
FirstX is like First, but panics if an error occurs.
func (*EscrowDealQuery) GroupBy ¶ added in v0.5.0
func (_q *EscrowDealQuery) GroupBy(field string, fields ...string) *EscrowDealGroupBy
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 {
EscrowID string `json:"escrow_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.EscrowDeal.Query().
GroupBy(escrowdeal.FieldEscrowID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*EscrowDealQuery) IDs ¶ added in v0.5.0
func (_q *EscrowDealQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of EscrowDeal IDs.
func (*EscrowDealQuery) IDsX ¶ added in v0.5.0
func (_q *EscrowDealQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EscrowDealQuery) Limit ¶ added in v0.5.0
func (_q *EscrowDealQuery) Limit(limit int) *EscrowDealQuery
Limit the number of records to be returned by this query.
func (*EscrowDealQuery) Offset ¶ added in v0.5.0
func (_q *EscrowDealQuery) Offset(offset int) *EscrowDealQuery
Offset to start from.
func (*EscrowDealQuery) Only ¶ added in v0.5.0
func (_q *EscrowDealQuery) Only(ctx context.Context) (*EscrowDeal, error)
Only returns a single EscrowDeal entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one EscrowDeal entity is found. Returns a *NotFoundError when no EscrowDeal entities are found.
func (*EscrowDealQuery) OnlyID ¶ added in v0.5.0
func (_q *EscrowDealQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only EscrowDeal ID in the query. Returns a *NotSingularError when more than one EscrowDeal ID is found. Returns a *NotFoundError when no entities are found.
func (*EscrowDealQuery) OnlyIDX ¶ added in v0.5.0
func (_q *EscrowDealQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EscrowDealQuery) OnlyX ¶ added in v0.5.0
func (_q *EscrowDealQuery) OnlyX(ctx context.Context) *EscrowDeal
OnlyX is like Only, but panics if an error occurs.
func (*EscrowDealQuery) Order ¶ added in v0.5.0
func (_q *EscrowDealQuery) Order(o ...escrowdeal.OrderOption) *EscrowDealQuery
Order specifies how the records should be ordered.
func (*EscrowDealQuery) Select ¶ added in v0.5.0
func (_q *EscrowDealQuery) Select(fields ...string) *EscrowDealSelect
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 {
EscrowID string `json:"escrow_id,omitempty"`
}
client.EscrowDeal.Query().
Select(escrowdeal.FieldEscrowID).
Scan(ctx, &v)
func (*EscrowDealQuery) Unique ¶ added in v0.5.0
func (_q *EscrowDealQuery) Unique(unique bool) *EscrowDealQuery
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 (*EscrowDealQuery) Where ¶ added in v0.5.0
func (_q *EscrowDealQuery) Where(ps ...predicate.EscrowDeal) *EscrowDealQuery
Where adds a new predicate for the EscrowDealQuery builder.
type EscrowDealSelect ¶ added in v0.5.0
type EscrowDealSelect struct {
*EscrowDealQuery
// contains filtered or unexported fields
}
EscrowDealSelect is the builder for selecting fields of EscrowDeal entities.
func (*EscrowDealSelect) Aggregate ¶ added in v0.5.0
func (_s *EscrowDealSelect) Aggregate(fns ...AggregateFunc) *EscrowDealSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EscrowDealSelect) Bool ¶ added in v0.5.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EscrowDealSelect) Bools ¶ added in v0.5.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EscrowDealSelect) BoolsX ¶ added in v0.5.0
BoolsX is like Bools, but panics if an error occurs.
func (*EscrowDealSelect) Float64 ¶ added in v0.5.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EscrowDealSelect) Float64X ¶ added in v0.5.0
Float64X is like Float64, but panics if an error occurs.
func (*EscrowDealSelect) Float64s ¶ added in v0.5.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EscrowDealSelect) Float64sX ¶ added in v0.5.0
Float64sX is like Float64s, but panics if an error occurs.
func (*EscrowDealSelect) Int ¶ added in v0.5.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EscrowDealSelect) Ints ¶ added in v0.5.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EscrowDealSelect) Scan ¶ added in v0.5.0
func (_s *EscrowDealSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EscrowDealSelect) String ¶ added in v0.5.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*EscrowDealSelect) StringX ¶ added in v0.5.0
StringX is like String, but panics if an error occurs.
type EscrowDealUpdate ¶ added in v0.5.0
type EscrowDealUpdate struct {
// contains filtered or unexported fields
}
EscrowDealUpdate is the builder for updating EscrowDeal entities.
func (*EscrowDealUpdate) AddChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) AddChainID(v int64) *EscrowDealUpdate
AddChainID adds value to the "chain_id" field.
func (*EscrowDealUpdate) ClearChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearChainID() *EscrowDealUpdate
ClearChainID clears the value of the "chain_id" field.
func (*EscrowDealUpdate) ClearDepositTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearDepositTxHash() *EscrowDealUpdate
ClearDepositTxHash clears the value of the "deposit_tx_hash" field.
func (*EscrowDealUpdate) ClearDisputeNote ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearDisputeNote() *EscrowDealUpdate
ClearDisputeNote clears the value of the "dispute_note" field.
func (*EscrowDealUpdate) ClearHubAddress ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearHubAddress() *EscrowDealUpdate
ClearHubAddress clears the value of the "hub_address" field.
func (*EscrowDealUpdate) ClearMilestones ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearMilestones() *EscrowDealUpdate
ClearMilestones clears the value of the "milestones" field.
func (*EscrowDealUpdate) ClearOnChainDealID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearOnChainDealID() *EscrowDealUpdate
ClearOnChainDealID clears the value of the "on_chain_deal_id" field.
func (*EscrowDealUpdate) ClearReason ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearReason() *EscrowDealUpdate
ClearReason clears the value of the "reason" field.
func (*EscrowDealUpdate) ClearRefundTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearRefundTxHash() *EscrowDealUpdate
ClearRefundTxHash clears the value of the "refund_tx_hash" field.
func (*EscrowDealUpdate) ClearReleaseTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearReleaseTxHash() *EscrowDealUpdate
ClearReleaseTxHash clears the value of the "release_tx_hash" field.
func (*EscrowDealUpdate) ClearTaskID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ClearTaskID() *EscrowDealUpdate
ClearTaskID clears the value of the "task_id" field.
func (*EscrowDealUpdate) Exec ¶ added in v0.5.0
func (_u *EscrowDealUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EscrowDealUpdate) ExecX ¶ added in v0.5.0
func (_u *EscrowDealUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EscrowDealUpdate) Mutation ¶ added in v0.5.0
func (_u *EscrowDealUpdate) Mutation() *EscrowDealMutation
Mutation returns the EscrowDealMutation object of the builder.
func (*EscrowDealUpdate) Save ¶ added in v0.5.0
func (_u *EscrowDealUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EscrowDealUpdate) SaveX ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EscrowDealUpdate) SetBuyerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetBuyerDid(v string) *EscrowDealUpdate
SetBuyerDid sets the "buyer_did" field.
func (*EscrowDealUpdate) SetChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetChainID(v int64) *EscrowDealUpdate
SetChainID sets the "chain_id" field.
func (*EscrowDealUpdate) SetDepositTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetDepositTxHash(v string) *EscrowDealUpdate
SetDepositTxHash sets the "deposit_tx_hash" field.
func (*EscrowDealUpdate) SetDisputeNote ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetDisputeNote(v string) *EscrowDealUpdate
SetDisputeNote sets the "dispute_note" field.
func (*EscrowDealUpdate) SetEscrowID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetEscrowID(v string) *EscrowDealUpdate
SetEscrowID sets the "escrow_id" field.
func (*EscrowDealUpdate) SetExpiresAt ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetExpiresAt(v time.Time) *EscrowDealUpdate
SetExpiresAt sets the "expires_at" field.
func (*EscrowDealUpdate) SetHubAddress ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetHubAddress(v string) *EscrowDealUpdate
SetHubAddress sets the "hub_address" field.
func (*EscrowDealUpdate) SetMilestones ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetMilestones(v []byte) *EscrowDealUpdate
SetMilestones sets the "milestones" field.
func (*EscrowDealUpdate) SetNillableBuyerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableBuyerDid(v *string) *EscrowDealUpdate
SetNillableBuyerDid sets the "buyer_did" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableChainID(v *int64) *EscrowDealUpdate
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableDepositTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableDepositTxHash(v *string) *EscrowDealUpdate
SetNillableDepositTxHash sets the "deposit_tx_hash" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableDisputeNote ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableDisputeNote(v *string) *EscrowDealUpdate
SetNillableDisputeNote sets the "dispute_note" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableEscrowID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableEscrowID(v *string) *EscrowDealUpdate
SetNillableEscrowID sets the "escrow_id" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableExpiresAt ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableExpiresAt(v *time.Time) *EscrowDealUpdate
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableHubAddress ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableHubAddress(v *string) *EscrowDealUpdate
SetNillableHubAddress sets the "hub_address" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableOnChainDealID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableOnChainDealID(v *string) *EscrowDealUpdate
SetNillableOnChainDealID sets the "on_chain_deal_id" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableReason ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableReason(v *string) *EscrowDealUpdate
SetNillableReason sets the "reason" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableRefundTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableRefundTxHash(v *string) *EscrowDealUpdate
SetNillableRefundTxHash sets the "refund_tx_hash" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableReleaseTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableReleaseTxHash(v *string) *EscrowDealUpdate
SetNillableReleaseTxHash sets the "release_tx_hash" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableSellerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableSellerDid(v *string) *EscrowDealUpdate
SetNillableSellerDid sets the "seller_did" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableStatus ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableStatus(v *string) *EscrowDealUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableTaskID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableTaskID(v *string) *EscrowDealUpdate
SetNillableTaskID sets the "task_id" field if the given value is not nil.
func (*EscrowDealUpdate) SetNillableTotalAmount ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetNillableTotalAmount(v *string) *EscrowDealUpdate
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*EscrowDealUpdate) SetOnChainDealID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetOnChainDealID(v string) *EscrowDealUpdate
SetOnChainDealID sets the "on_chain_deal_id" field.
func (*EscrowDealUpdate) SetReason ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetReason(v string) *EscrowDealUpdate
SetReason sets the "reason" field.
func (*EscrowDealUpdate) SetRefundTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetRefundTxHash(v string) *EscrowDealUpdate
SetRefundTxHash sets the "refund_tx_hash" field.
func (*EscrowDealUpdate) SetReleaseTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetReleaseTxHash(v string) *EscrowDealUpdate
SetReleaseTxHash sets the "release_tx_hash" field.
func (*EscrowDealUpdate) SetSellerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetSellerDid(v string) *EscrowDealUpdate
SetSellerDid sets the "seller_did" field.
func (*EscrowDealUpdate) SetStatus ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetStatus(v string) *EscrowDealUpdate
SetStatus sets the "status" field.
func (*EscrowDealUpdate) SetTaskID ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetTaskID(v string) *EscrowDealUpdate
SetTaskID sets the "task_id" field.
func (*EscrowDealUpdate) SetTotalAmount ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetTotalAmount(v string) *EscrowDealUpdate
SetTotalAmount sets the "total_amount" field.
func (*EscrowDealUpdate) SetUpdatedAt ¶ added in v0.5.0
func (_u *EscrowDealUpdate) SetUpdatedAt(v time.Time) *EscrowDealUpdate
SetUpdatedAt sets the "updated_at" field.
func (*EscrowDealUpdate) Where ¶ added in v0.5.0
func (_u *EscrowDealUpdate) Where(ps ...predicate.EscrowDeal) *EscrowDealUpdate
Where appends a list predicates to the EscrowDealUpdate builder.
type EscrowDealUpdateOne ¶ added in v0.5.0
type EscrowDealUpdateOne struct {
// contains filtered or unexported fields
}
EscrowDealUpdateOne is the builder for updating a single EscrowDeal entity.
func (*EscrowDealUpdateOne) AddChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) AddChainID(v int64) *EscrowDealUpdateOne
AddChainID adds value to the "chain_id" field.
func (*EscrowDealUpdateOne) ClearChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearChainID() *EscrowDealUpdateOne
ClearChainID clears the value of the "chain_id" field.
func (*EscrowDealUpdateOne) ClearDepositTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearDepositTxHash() *EscrowDealUpdateOne
ClearDepositTxHash clears the value of the "deposit_tx_hash" field.
func (*EscrowDealUpdateOne) ClearDisputeNote ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearDisputeNote() *EscrowDealUpdateOne
ClearDisputeNote clears the value of the "dispute_note" field.
func (*EscrowDealUpdateOne) ClearHubAddress ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearHubAddress() *EscrowDealUpdateOne
ClearHubAddress clears the value of the "hub_address" field.
func (*EscrowDealUpdateOne) ClearMilestones ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearMilestones() *EscrowDealUpdateOne
ClearMilestones clears the value of the "milestones" field.
func (*EscrowDealUpdateOne) ClearOnChainDealID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearOnChainDealID() *EscrowDealUpdateOne
ClearOnChainDealID clears the value of the "on_chain_deal_id" field.
func (*EscrowDealUpdateOne) ClearReason ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearReason() *EscrowDealUpdateOne
ClearReason clears the value of the "reason" field.
func (*EscrowDealUpdateOne) ClearRefundTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearRefundTxHash() *EscrowDealUpdateOne
ClearRefundTxHash clears the value of the "refund_tx_hash" field.
func (*EscrowDealUpdateOne) ClearReleaseTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearReleaseTxHash() *EscrowDealUpdateOne
ClearReleaseTxHash clears the value of the "release_tx_hash" field.
func (*EscrowDealUpdateOne) ClearTaskID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ClearTaskID() *EscrowDealUpdateOne
ClearTaskID clears the value of the "task_id" field.
func (*EscrowDealUpdateOne) Exec ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EscrowDealUpdateOne) ExecX ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EscrowDealUpdateOne) Mutation ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) Mutation() *EscrowDealMutation
Mutation returns the EscrowDealMutation object of the builder.
func (*EscrowDealUpdateOne) Save ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) Save(ctx context.Context) (*EscrowDeal, error)
Save executes the query and returns the updated EscrowDeal entity.
func (*EscrowDealUpdateOne) SaveX ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SaveX(ctx context.Context) *EscrowDeal
SaveX is like Save, but panics if an error occurs.
func (*EscrowDealUpdateOne) Select ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) Select(field string, fields ...string) *EscrowDealUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EscrowDealUpdateOne) SetBuyerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetBuyerDid(v string) *EscrowDealUpdateOne
SetBuyerDid sets the "buyer_did" field.
func (*EscrowDealUpdateOne) SetChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetChainID(v int64) *EscrowDealUpdateOne
SetChainID sets the "chain_id" field.
func (*EscrowDealUpdateOne) SetDepositTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetDepositTxHash(v string) *EscrowDealUpdateOne
SetDepositTxHash sets the "deposit_tx_hash" field.
func (*EscrowDealUpdateOne) SetDisputeNote ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetDisputeNote(v string) *EscrowDealUpdateOne
SetDisputeNote sets the "dispute_note" field.
func (*EscrowDealUpdateOne) SetEscrowID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetEscrowID(v string) *EscrowDealUpdateOne
SetEscrowID sets the "escrow_id" field.
func (*EscrowDealUpdateOne) SetExpiresAt ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetExpiresAt(v time.Time) *EscrowDealUpdateOne
SetExpiresAt sets the "expires_at" field.
func (*EscrowDealUpdateOne) SetHubAddress ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetHubAddress(v string) *EscrowDealUpdateOne
SetHubAddress sets the "hub_address" field.
func (*EscrowDealUpdateOne) SetMilestones ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetMilestones(v []byte) *EscrowDealUpdateOne
SetMilestones sets the "milestones" field.
func (*EscrowDealUpdateOne) SetNillableBuyerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableBuyerDid(v *string) *EscrowDealUpdateOne
SetNillableBuyerDid sets the "buyer_did" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableChainID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableChainID(v *int64) *EscrowDealUpdateOne
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableDepositTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableDepositTxHash(v *string) *EscrowDealUpdateOne
SetNillableDepositTxHash sets the "deposit_tx_hash" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableDisputeNote ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableDisputeNote(v *string) *EscrowDealUpdateOne
SetNillableDisputeNote sets the "dispute_note" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableEscrowID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableEscrowID(v *string) *EscrowDealUpdateOne
SetNillableEscrowID sets the "escrow_id" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableExpiresAt ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableExpiresAt(v *time.Time) *EscrowDealUpdateOne
SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableHubAddress ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableHubAddress(v *string) *EscrowDealUpdateOne
SetNillableHubAddress sets the "hub_address" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableOnChainDealID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableOnChainDealID(v *string) *EscrowDealUpdateOne
SetNillableOnChainDealID sets the "on_chain_deal_id" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableReason ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableReason(v *string) *EscrowDealUpdateOne
SetNillableReason sets the "reason" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableRefundTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableRefundTxHash(v *string) *EscrowDealUpdateOne
SetNillableRefundTxHash sets the "refund_tx_hash" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableReleaseTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableReleaseTxHash(v *string) *EscrowDealUpdateOne
SetNillableReleaseTxHash sets the "release_tx_hash" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableSellerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableSellerDid(v *string) *EscrowDealUpdateOne
SetNillableSellerDid sets the "seller_did" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableStatus ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableStatus(v *string) *EscrowDealUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableTaskID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableTaskID(v *string) *EscrowDealUpdateOne
SetNillableTaskID sets the "task_id" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetNillableTotalAmount ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetNillableTotalAmount(v *string) *EscrowDealUpdateOne
SetNillableTotalAmount sets the "total_amount" field if the given value is not nil.
func (*EscrowDealUpdateOne) SetOnChainDealID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetOnChainDealID(v string) *EscrowDealUpdateOne
SetOnChainDealID sets the "on_chain_deal_id" field.
func (*EscrowDealUpdateOne) SetReason ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetReason(v string) *EscrowDealUpdateOne
SetReason sets the "reason" field.
func (*EscrowDealUpdateOne) SetRefundTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetRefundTxHash(v string) *EscrowDealUpdateOne
SetRefundTxHash sets the "refund_tx_hash" field.
func (*EscrowDealUpdateOne) SetReleaseTxHash ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetReleaseTxHash(v string) *EscrowDealUpdateOne
SetReleaseTxHash sets the "release_tx_hash" field.
func (*EscrowDealUpdateOne) SetSellerDid ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetSellerDid(v string) *EscrowDealUpdateOne
SetSellerDid sets the "seller_did" field.
func (*EscrowDealUpdateOne) SetStatus ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetStatus(v string) *EscrowDealUpdateOne
SetStatus sets the "status" field.
func (*EscrowDealUpdateOne) SetTaskID ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetTaskID(v string) *EscrowDealUpdateOne
SetTaskID sets the "task_id" field.
func (*EscrowDealUpdateOne) SetTotalAmount ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetTotalAmount(v string) *EscrowDealUpdateOne
SetTotalAmount sets the "total_amount" field.
func (*EscrowDealUpdateOne) SetUpdatedAt ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) SetUpdatedAt(v time.Time) *EscrowDealUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*EscrowDealUpdateOne) Where ¶ added in v0.5.0
func (_u *EscrowDealUpdateOne) Where(ps ...predicate.EscrowDeal) *EscrowDealUpdateOne
Where appends a list predicates to the EscrowDealUpdate builder.
type EscrowDeals ¶ added in v0.5.0
type EscrowDeals []*EscrowDeal
EscrowDeals is a parsable slice of EscrowDeal.
type ExternalRef ¶
type ExternalRef struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// RefType holds the value of the "ref_type" field.
RefType externalref.RefType `json:"ref_type,omitempty"`
// Location holds the value of the "location" field.
Location string `json:"location,omitempty"`
// Summary holds the value of the "summary" field.
Summary string `json:"summary,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
ExternalRef is the model entity for the ExternalRef schema.
func (*ExternalRef) String ¶
func (_m *ExternalRef) String() string
String implements the fmt.Stringer.
func (*ExternalRef) Unwrap ¶
func (_m *ExternalRef) Unwrap() *ExternalRef
Unwrap unwraps the ExternalRef 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 (*ExternalRef) Update ¶
func (_m *ExternalRef) Update() *ExternalRefUpdateOne
Update returns a builder for updating this ExternalRef. Note that you need to call ExternalRef.Unwrap() before calling this method if this ExternalRef was returned from a transaction, and the transaction was committed or rolled back.
type ExternalRefClient ¶
type ExternalRefClient struct {
// contains filtered or unexported fields
}
ExternalRefClient is a client for the ExternalRef schema.
func NewExternalRefClient ¶
func NewExternalRefClient(c config) *ExternalRefClient
NewExternalRefClient returns a client for the ExternalRef from the given config.
func (*ExternalRefClient) Create ¶
func (c *ExternalRefClient) Create() *ExternalRefCreate
Create returns a builder for creating a ExternalRef entity.
func (*ExternalRefClient) CreateBulk ¶
func (c *ExternalRefClient) CreateBulk(builders ...*ExternalRefCreate) *ExternalRefCreateBulk
CreateBulk returns a builder for creating a bulk of ExternalRef entities.
func (*ExternalRefClient) Delete ¶
func (c *ExternalRefClient) Delete() *ExternalRefDelete
Delete returns a delete builder for ExternalRef.
func (*ExternalRefClient) DeleteOne ¶
func (c *ExternalRefClient) DeleteOne(_m *ExternalRef) *ExternalRefDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ExternalRefClient) DeleteOneID ¶
func (c *ExternalRefClient) DeleteOneID(id uuid.UUID) *ExternalRefDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ExternalRefClient) Get ¶
func (c *ExternalRefClient) Get(ctx context.Context, id uuid.UUID) (*ExternalRef, error)
Get returns a ExternalRef entity by its id.
func (*ExternalRefClient) GetX ¶
func (c *ExternalRefClient) GetX(ctx context.Context, id uuid.UUID) *ExternalRef
GetX is like Get, but panics if an error occurs.
func (*ExternalRefClient) Hooks ¶
func (c *ExternalRefClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ExternalRefClient) Intercept ¶
func (c *ExternalRefClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `externalref.Intercept(f(g(h())))`.
func (*ExternalRefClient) Interceptors ¶
func (c *ExternalRefClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ExternalRefClient) MapCreateBulk ¶
func (c *ExternalRefClient) MapCreateBulk(slice any, setFunc func(*ExternalRefCreate, int)) *ExternalRefCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ExternalRefClient) Query ¶
func (c *ExternalRefClient) Query() *ExternalRefQuery
Query returns a query builder for ExternalRef.
func (*ExternalRefClient) Update ¶
func (c *ExternalRefClient) Update() *ExternalRefUpdate
Update returns an update builder for ExternalRef.
func (*ExternalRefClient) UpdateOne ¶
func (c *ExternalRefClient) UpdateOne(_m *ExternalRef) *ExternalRefUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ExternalRefClient) UpdateOneID ¶
func (c *ExternalRefClient) UpdateOneID(id uuid.UUID) *ExternalRefUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ExternalRefClient) Use ¶
func (c *ExternalRefClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `externalref.Hooks(f(g(h())))`.
type ExternalRefCreate ¶
type ExternalRefCreate struct {
// contains filtered or unexported fields
}
ExternalRefCreate is the builder for creating a ExternalRef entity.
func (*ExternalRefCreate) Exec ¶
func (_c *ExternalRefCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ExternalRefCreate) ExecX ¶
func (_c *ExternalRefCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExternalRefCreate) Mutation ¶
func (_c *ExternalRefCreate) Mutation() *ExternalRefMutation
Mutation returns the ExternalRefMutation object of the builder.
func (*ExternalRefCreate) Save ¶
func (_c *ExternalRefCreate) Save(ctx context.Context) (*ExternalRef, error)
Save creates the ExternalRef in the database.
func (*ExternalRefCreate) SaveX ¶
func (_c *ExternalRefCreate) SaveX(ctx context.Context) *ExternalRef
SaveX calls Save and panics if Save returns an error.
func (*ExternalRefCreate) SetCreatedAt ¶
func (_c *ExternalRefCreate) SetCreatedAt(v time.Time) *ExternalRefCreate
SetCreatedAt sets the "created_at" field.
func (*ExternalRefCreate) SetID ¶
func (_c *ExternalRefCreate) SetID(v uuid.UUID) *ExternalRefCreate
SetID sets the "id" field.
func (*ExternalRefCreate) SetLocation ¶
func (_c *ExternalRefCreate) SetLocation(v string) *ExternalRefCreate
SetLocation sets the "location" field.
func (*ExternalRefCreate) SetMetadata ¶
func (_c *ExternalRefCreate) SetMetadata(v map[string]interface{}) *ExternalRefCreate
SetMetadata sets the "metadata" field.
func (*ExternalRefCreate) SetName ¶
func (_c *ExternalRefCreate) SetName(v string) *ExternalRefCreate
SetName sets the "name" field.
func (*ExternalRefCreate) SetNillableCreatedAt ¶
func (_c *ExternalRefCreate) SetNillableCreatedAt(v *time.Time) *ExternalRefCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ExternalRefCreate) SetNillableID ¶
func (_c *ExternalRefCreate) SetNillableID(v *uuid.UUID) *ExternalRefCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ExternalRefCreate) SetNillableSummary ¶
func (_c *ExternalRefCreate) SetNillableSummary(v *string) *ExternalRefCreate
SetNillableSummary sets the "summary" field if the given value is not nil.
func (*ExternalRefCreate) SetNillableUpdatedAt ¶
func (_c *ExternalRefCreate) SetNillableUpdatedAt(v *time.Time) *ExternalRefCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ExternalRefCreate) SetRefType ¶
func (_c *ExternalRefCreate) SetRefType(v externalref.RefType) *ExternalRefCreate
SetRefType sets the "ref_type" field.
func (*ExternalRefCreate) SetSummary ¶
func (_c *ExternalRefCreate) SetSummary(v string) *ExternalRefCreate
SetSummary sets the "summary" field.
func (*ExternalRefCreate) SetUpdatedAt ¶
func (_c *ExternalRefCreate) SetUpdatedAt(v time.Time) *ExternalRefCreate
SetUpdatedAt sets the "updated_at" field.
type ExternalRefCreateBulk ¶
type ExternalRefCreateBulk struct {
// contains filtered or unexported fields
}
ExternalRefCreateBulk is the builder for creating many ExternalRef entities in bulk.
func (*ExternalRefCreateBulk) Exec ¶
func (_c *ExternalRefCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ExternalRefCreateBulk) ExecX ¶
func (_c *ExternalRefCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExternalRefCreateBulk) Save ¶
func (_c *ExternalRefCreateBulk) Save(ctx context.Context) ([]*ExternalRef, error)
Save creates the ExternalRef entities in the database.
func (*ExternalRefCreateBulk) SaveX ¶
func (_c *ExternalRefCreateBulk) SaveX(ctx context.Context) []*ExternalRef
SaveX is like Save, but panics if an error occurs.
type ExternalRefDelete ¶
type ExternalRefDelete struct {
// contains filtered or unexported fields
}
ExternalRefDelete is the builder for deleting a ExternalRef entity.
func (*ExternalRefDelete) Exec ¶
func (_d *ExternalRefDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ExternalRefDelete) ExecX ¶
func (_d *ExternalRefDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ExternalRefDelete) Where ¶
func (_d *ExternalRefDelete) Where(ps ...predicate.ExternalRef) *ExternalRefDelete
Where appends a list predicates to the ExternalRefDelete builder.
type ExternalRefDeleteOne ¶
type ExternalRefDeleteOne struct {
// contains filtered or unexported fields
}
ExternalRefDeleteOne is the builder for deleting a single ExternalRef entity.
func (*ExternalRefDeleteOne) Exec ¶
func (_d *ExternalRefDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ExternalRefDeleteOne) ExecX ¶
func (_d *ExternalRefDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExternalRefDeleteOne) Where ¶
func (_d *ExternalRefDeleteOne) Where(ps ...predicate.ExternalRef) *ExternalRefDeleteOne
Where appends a list predicates to the ExternalRefDelete builder.
type ExternalRefGroupBy ¶
type ExternalRefGroupBy struct {
// contains filtered or unexported fields
}
ExternalRefGroupBy is the group-by builder for ExternalRef entities.
func (*ExternalRefGroupBy) Aggregate ¶
func (_g *ExternalRefGroupBy) Aggregate(fns ...AggregateFunc) *ExternalRefGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ExternalRefGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ExternalRefGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ExternalRefGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ExternalRefGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ExternalRefGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ExternalRefGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ExternalRefGroupBy) Scan ¶
func (_g *ExternalRefGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ExternalRefGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ExternalRefMutation ¶
type ExternalRefMutation struct {
// contains filtered or unexported fields
}
ExternalRefMutation represents an operation that mutates the ExternalRef nodes in the graph.
func (*ExternalRefMutation) AddField ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) AddedEdges ¶
func (m *ExternalRefMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ExternalRefMutation) AddedField ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) AddedFields ¶
func (m *ExternalRefMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ExternalRefMutation) AddedIDs ¶
func (m *ExternalRefMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ExternalRefMutation) ClearEdge ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) ClearField ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) ClearMetadata ¶
func (m *ExternalRefMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*ExternalRefMutation) ClearSummary ¶
func (m *ExternalRefMutation) ClearSummary()
ClearSummary clears the value of the "summary" field.
func (*ExternalRefMutation) ClearedEdges ¶
func (m *ExternalRefMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ExternalRefMutation) ClearedFields ¶
func (m *ExternalRefMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ExternalRefMutation) Client ¶
func (m ExternalRefMutation) 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 (*ExternalRefMutation) CreatedAt ¶
func (m *ExternalRefMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ExternalRefMutation) EdgeCleared ¶
func (m *ExternalRefMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ExternalRefMutation) Field ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) FieldCleared ¶
func (m *ExternalRefMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ExternalRefMutation) Fields ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) ID ¶
func (m *ExternalRefMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ExternalRefMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ExternalRefMutation) Location ¶
func (m *ExternalRefMutation) Location() (r string, exists bool)
Location returns the value of the "location" field in the mutation.
func (*ExternalRefMutation) Metadata ¶
func (m *ExternalRefMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*ExternalRefMutation) MetadataCleared ¶
func (m *ExternalRefMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*ExternalRefMutation) Name ¶
func (m *ExternalRefMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ExternalRefMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ExternalRef entity. If the ExternalRef 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 (*ExternalRefMutation) 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 (*ExternalRefMutation) OldLocation ¶
func (m *ExternalRefMutation) OldLocation(ctx context.Context) (v string, err error)
OldLocation returns the old "location" field's value of the ExternalRef entity. If the ExternalRef 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 (*ExternalRefMutation) OldMetadata ¶
func (m *ExternalRefMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old "metadata" field's value of the ExternalRef entity. If the ExternalRef 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 (*ExternalRefMutation) OldName ¶
func (m *ExternalRefMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ExternalRef entity. If the ExternalRef 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 (*ExternalRefMutation) OldRefType ¶
func (m *ExternalRefMutation) OldRefType(ctx context.Context) (v externalref.RefType, err error)
OldRefType returns the old "ref_type" field's value of the ExternalRef entity. If the ExternalRef 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 (*ExternalRefMutation) OldSummary ¶
func (m *ExternalRefMutation) OldSummary(ctx context.Context) (v string, err error)
OldSummary returns the old "summary" field's value of the ExternalRef entity. If the ExternalRef 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 (*ExternalRefMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ExternalRef entity. If the ExternalRef 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 (*ExternalRefMutation) Op ¶
func (m *ExternalRefMutation) Op() Op
Op returns the operation name.
func (*ExternalRefMutation) RefType ¶
func (m *ExternalRefMutation) RefType() (r externalref.RefType, exists bool)
RefType returns the value of the "ref_type" field in the mutation.
func (*ExternalRefMutation) RemovedEdges ¶
func (m *ExternalRefMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ExternalRefMutation) RemovedIDs ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) ResetCreatedAt ¶
func (m *ExternalRefMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ExternalRefMutation) ResetEdge ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) ResetField ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) ResetLocation ¶
func (m *ExternalRefMutation) ResetLocation()
ResetLocation resets all changes to the "location" field.
func (*ExternalRefMutation) ResetMetadata ¶
func (m *ExternalRefMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*ExternalRefMutation) ResetName ¶
func (m *ExternalRefMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ExternalRefMutation) ResetRefType ¶
func (m *ExternalRefMutation) ResetRefType()
ResetRefType resets all changes to the "ref_type" field.
func (*ExternalRefMutation) ResetSummary ¶
func (m *ExternalRefMutation) ResetSummary()
ResetSummary resets all changes to the "summary" field.
func (*ExternalRefMutation) ResetUpdatedAt ¶
func (m *ExternalRefMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ExternalRefMutation) SetCreatedAt ¶
func (m *ExternalRefMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ExternalRefMutation) SetField ¶
func (m *ExternalRefMutation) 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 (*ExternalRefMutation) SetID ¶
func (m *ExternalRefMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ExternalRef entities.
func (*ExternalRefMutation) SetLocation ¶
func (m *ExternalRefMutation) SetLocation(s string)
SetLocation sets the "location" field.
func (*ExternalRefMutation) SetMetadata ¶
func (m *ExternalRefMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the "metadata" field.
func (*ExternalRefMutation) SetName ¶
func (m *ExternalRefMutation) SetName(s string)
SetName sets the "name" field.
func (*ExternalRefMutation) SetOp ¶
func (m *ExternalRefMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ExternalRefMutation) SetRefType ¶
func (m *ExternalRefMutation) SetRefType(et externalref.RefType)
SetRefType sets the "ref_type" field.
func (*ExternalRefMutation) SetSummary ¶
func (m *ExternalRefMutation) SetSummary(s string)
SetSummary sets the "summary" field.
func (*ExternalRefMutation) SetUpdatedAt ¶
func (m *ExternalRefMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ExternalRefMutation) Summary ¶
func (m *ExternalRefMutation) Summary() (r string, exists bool)
Summary returns the value of the "summary" field in the mutation.
func (*ExternalRefMutation) SummaryCleared ¶
func (m *ExternalRefMutation) SummaryCleared() bool
SummaryCleared returns if the "summary" field was cleared in this mutation.
func (ExternalRefMutation) Tx ¶
func (m ExternalRefMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ExternalRefMutation) Type ¶
func (m *ExternalRefMutation) Type() string
Type returns the node type of this mutation (ExternalRef).
func (*ExternalRefMutation) UpdatedAt ¶
func (m *ExternalRefMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ExternalRefMutation) Where ¶
func (m *ExternalRefMutation) Where(ps ...predicate.ExternalRef)
Where appends a list predicates to the ExternalRefMutation builder.
func (*ExternalRefMutation) WhereP ¶
func (m *ExternalRefMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ExternalRefMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ExternalRefQuery ¶
type ExternalRefQuery struct {
// contains filtered or unexported fields
}
ExternalRefQuery is the builder for querying ExternalRef entities.
func (*ExternalRefQuery) Aggregate ¶
func (_q *ExternalRefQuery) Aggregate(fns ...AggregateFunc) *ExternalRefSelect
Aggregate returns a ExternalRefSelect configured with the given aggregations.
func (*ExternalRefQuery) All ¶
func (_q *ExternalRefQuery) All(ctx context.Context) ([]*ExternalRef, error)
All executes the query and returns a list of ExternalRefs.
func (*ExternalRefQuery) AllX ¶
func (_q *ExternalRefQuery) AllX(ctx context.Context) []*ExternalRef
AllX is like All, but panics if an error occurs.
func (*ExternalRefQuery) Clone ¶
func (_q *ExternalRefQuery) Clone() *ExternalRefQuery
Clone returns a duplicate of the ExternalRefQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ExternalRefQuery) Count ¶
func (_q *ExternalRefQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ExternalRefQuery) CountX ¶
func (_q *ExternalRefQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ExternalRefQuery) Exist ¶
func (_q *ExternalRefQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ExternalRefQuery) ExistX ¶
func (_q *ExternalRefQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ExternalRefQuery) First ¶
func (_q *ExternalRefQuery) First(ctx context.Context) (*ExternalRef, error)
First returns the first ExternalRef entity from the query. Returns a *NotFoundError when no ExternalRef was found.
func (*ExternalRefQuery) FirstID ¶
FirstID returns the first ExternalRef ID from the query. Returns a *NotFoundError when no ExternalRef ID was found.
func (*ExternalRefQuery) FirstIDX ¶
func (_q *ExternalRefQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ExternalRefQuery) FirstX ¶
func (_q *ExternalRefQuery) FirstX(ctx context.Context) *ExternalRef
FirstX is like First, but panics if an error occurs.
func (*ExternalRefQuery) GroupBy ¶
func (_q *ExternalRefQuery) GroupBy(field string, fields ...string) *ExternalRefGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.ExternalRef.Query().
GroupBy(externalref.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ExternalRefQuery) IDsX ¶
func (_q *ExternalRefQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ExternalRefQuery) Limit ¶
func (_q *ExternalRefQuery) Limit(limit int) *ExternalRefQuery
Limit the number of records to be returned by this query.
func (*ExternalRefQuery) Offset ¶
func (_q *ExternalRefQuery) Offset(offset int) *ExternalRefQuery
Offset to start from.
func (*ExternalRefQuery) Only ¶
func (_q *ExternalRefQuery) Only(ctx context.Context) (*ExternalRef, error)
Only returns a single ExternalRef entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ExternalRef entity is found. Returns a *NotFoundError when no ExternalRef entities are found.
func (*ExternalRefQuery) OnlyID ¶
OnlyID is like Only, but returns the only ExternalRef ID in the query. Returns a *NotSingularError when more than one ExternalRef ID is found. Returns a *NotFoundError when no entities are found.
func (*ExternalRefQuery) OnlyIDX ¶
func (_q *ExternalRefQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ExternalRefQuery) OnlyX ¶
func (_q *ExternalRefQuery) OnlyX(ctx context.Context) *ExternalRef
OnlyX is like Only, but panics if an error occurs.
func (*ExternalRefQuery) Order ¶
func (_q *ExternalRefQuery) Order(o ...externalref.OrderOption) *ExternalRefQuery
Order specifies how the records should be ordered.
func (*ExternalRefQuery) Select ¶
func (_q *ExternalRefQuery) Select(fields ...string) *ExternalRefSelect
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 {
Name string `json:"name,omitempty"`
}
client.ExternalRef.Query().
Select(externalref.FieldName).
Scan(ctx, &v)
func (*ExternalRefQuery) Unique ¶
func (_q *ExternalRefQuery) Unique(unique bool) *ExternalRefQuery
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 (*ExternalRefQuery) Where ¶
func (_q *ExternalRefQuery) Where(ps ...predicate.ExternalRef) *ExternalRefQuery
Where adds a new predicate for the ExternalRefQuery builder.
type ExternalRefSelect ¶
type ExternalRefSelect struct {
*ExternalRefQuery
// contains filtered or unexported fields
}
ExternalRefSelect is the builder for selecting fields of ExternalRef entities.
func (*ExternalRefSelect) Aggregate ¶
func (_s *ExternalRefSelect) Aggregate(fns ...AggregateFunc) *ExternalRefSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ExternalRefSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ExternalRefSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ExternalRefSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ExternalRefSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ExternalRefSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ExternalRefSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ExternalRefSelect) Scan ¶
func (_s *ExternalRefSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ExternalRefSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ExternalRefUpdate ¶
type ExternalRefUpdate struct {
// contains filtered or unexported fields
}
ExternalRefUpdate is the builder for updating ExternalRef entities.
func (*ExternalRefUpdate) ClearMetadata ¶
func (_u *ExternalRefUpdate) ClearMetadata() *ExternalRefUpdate
ClearMetadata clears the value of the "metadata" field.
func (*ExternalRefUpdate) ClearSummary ¶
func (_u *ExternalRefUpdate) ClearSummary() *ExternalRefUpdate
ClearSummary clears the value of the "summary" field.
func (*ExternalRefUpdate) Exec ¶
func (_u *ExternalRefUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ExternalRefUpdate) ExecX ¶
func (_u *ExternalRefUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExternalRefUpdate) Mutation ¶
func (_u *ExternalRefUpdate) Mutation() *ExternalRefMutation
Mutation returns the ExternalRefMutation object of the builder.
func (*ExternalRefUpdate) Save ¶
func (_u *ExternalRefUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ExternalRefUpdate) SaveX ¶
func (_u *ExternalRefUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ExternalRefUpdate) SetLocation ¶
func (_u *ExternalRefUpdate) SetLocation(v string) *ExternalRefUpdate
SetLocation sets the "location" field.
func (*ExternalRefUpdate) SetMetadata ¶
func (_u *ExternalRefUpdate) SetMetadata(v map[string]interface{}) *ExternalRefUpdate
SetMetadata sets the "metadata" field.
func (*ExternalRefUpdate) SetName ¶
func (_u *ExternalRefUpdate) SetName(v string) *ExternalRefUpdate
SetName sets the "name" field.
func (*ExternalRefUpdate) SetNillableLocation ¶
func (_u *ExternalRefUpdate) SetNillableLocation(v *string) *ExternalRefUpdate
SetNillableLocation sets the "location" field if the given value is not nil.
func (*ExternalRefUpdate) SetNillableName ¶
func (_u *ExternalRefUpdate) SetNillableName(v *string) *ExternalRefUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ExternalRefUpdate) SetNillableRefType ¶
func (_u *ExternalRefUpdate) SetNillableRefType(v *externalref.RefType) *ExternalRefUpdate
SetNillableRefType sets the "ref_type" field if the given value is not nil.
func (*ExternalRefUpdate) SetNillableSummary ¶
func (_u *ExternalRefUpdate) SetNillableSummary(v *string) *ExternalRefUpdate
SetNillableSummary sets the "summary" field if the given value is not nil.
func (*ExternalRefUpdate) SetRefType ¶
func (_u *ExternalRefUpdate) SetRefType(v externalref.RefType) *ExternalRefUpdate
SetRefType sets the "ref_type" field.
func (*ExternalRefUpdate) SetSummary ¶
func (_u *ExternalRefUpdate) SetSummary(v string) *ExternalRefUpdate
SetSummary sets the "summary" field.
func (*ExternalRefUpdate) SetUpdatedAt ¶
func (_u *ExternalRefUpdate) SetUpdatedAt(v time.Time) *ExternalRefUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ExternalRefUpdate) Where ¶
func (_u *ExternalRefUpdate) Where(ps ...predicate.ExternalRef) *ExternalRefUpdate
Where appends a list predicates to the ExternalRefUpdate builder.
type ExternalRefUpdateOne ¶
type ExternalRefUpdateOne struct {
// contains filtered or unexported fields
}
ExternalRefUpdateOne is the builder for updating a single ExternalRef entity.
func (*ExternalRefUpdateOne) ClearMetadata ¶
func (_u *ExternalRefUpdateOne) ClearMetadata() *ExternalRefUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*ExternalRefUpdateOne) ClearSummary ¶
func (_u *ExternalRefUpdateOne) ClearSummary() *ExternalRefUpdateOne
ClearSummary clears the value of the "summary" field.
func (*ExternalRefUpdateOne) Exec ¶
func (_u *ExternalRefUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ExternalRefUpdateOne) ExecX ¶
func (_u *ExternalRefUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ExternalRefUpdateOne) Mutation ¶
func (_u *ExternalRefUpdateOne) Mutation() *ExternalRefMutation
Mutation returns the ExternalRefMutation object of the builder.
func (*ExternalRefUpdateOne) Save ¶
func (_u *ExternalRefUpdateOne) Save(ctx context.Context) (*ExternalRef, error)
Save executes the query and returns the updated ExternalRef entity.
func (*ExternalRefUpdateOne) SaveX ¶
func (_u *ExternalRefUpdateOne) SaveX(ctx context.Context) *ExternalRef
SaveX is like Save, but panics if an error occurs.
func (*ExternalRefUpdateOne) Select ¶
func (_u *ExternalRefUpdateOne) Select(field string, fields ...string) *ExternalRefUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ExternalRefUpdateOne) SetLocation ¶
func (_u *ExternalRefUpdateOne) SetLocation(v string) *ExternalRefUpdateOne
SetLocation sets the "location" field.
func (*ExternalRefUpdateOne) SetMetadata ¶
func (_u *ExternalRefUpdateOne) SetMetadata(v map[string]interface{}) *ExternalRefUpdateOne
SetMetadata sets the "metadata" field.
func (*ExternalRefUpdateOne) SetName ¶
func (_u *ExternalRefUpdateOne) SetName(v string) *ExternalRefUpdateOne
SetName sets the "name" field.
func (*ExternalRefUpdateOne) SetNillableLocation ¶
func (_u *ExternalRefUpdateOne) SetNillableLocation(v *string) *ExternalRefUpdateOne
SetNillableLocation sets the "location" field if the given value is not nil.
func (*ExternalRefUpdateOne) SetNillableName ¶
func (_u *ExternalRefUpdateOne) SetNillableName(v *string) *ExternalRefUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ExternalRefUpdateOne) SetNillableRefType ¶
func (_u *ExternalRefUpdateOne) SetNillableRefType(v *externalref.RefType) *ExternalRefUpdateOne
SetNillableRefType sets the "ref_type" field if the given value is not nil.
func (*ExternalRefUpdateOne) SetNillableSummary ¶
func (_u *ExternalRefUpdateOne) SetNillableSummary(v *string) *ExternalRefUpdateOne
SetNillableSummary sets the "summary" field if the given value is not nil.
func (*ExternalRefUpdateOne) SetRefType ¶
func (_u *ExternalRefUpdateOne) SetRefType(v externalref.RefType) *ExternalRefUpdateOne
SetRefType sets the "ref_type" field.
func (*ExternalRefUpdateOne) SetSummary ¶
func (_u *ExternalRefUpdateOne) SetSummary(v string) *ExternalRefUpdateOne
SetSummary sets the "summary" field.
func (*ExternalRefUpdateOne) SetUpdatedAt ¶
func (_u *ExternalRefUpdateOne) SetUpdatedAt(v time.Time) *ExternalRefUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ExternalRefUpdateOne) Where ¶
func (_u *ExternalRefUpdateOne) Where(ps ...predicate.ExternalRef) *ExternalRefUpdateOne
Where appends a list predicates to the ExternalRefUpdate builder.
type ExternalRefs ¶
type ExternalRefs []*ExternalRef
ExternalRefs is a parsable slice of ExternalRef.
type Inquiry ¶
type Inquiry struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// SessionKey holds the value of the "session_key" field.
SessionKey string `json:"session_key,omitempty"`
// Topic holds the value of the "topic" field.
Topic string `json:"topic,omitempty"`
// Question holds the value of the "question" field.
Question string `json:"question,omitempty"`
// Context holds the value of the "context" field.
Context *string `json:"context,omitempty"`
// Priority holds the value of the "priority" field.
Priority inquiry.Priority `json:"priority,omitempty"`
// Status holds the value of the "status" field.
Status inquiry.Status `json:"status,omitempty"`
// Answer holds the value of the "answer" field.
Answer *string `json:"answer,omitempty"`
// KnowledgeKey holds the value of the "knowledge_key" field.
KnowledgeKey *string `json:"knowledge_key,omitempty"`
// SourceObservationID holds the value of the "source_observation_id" field.
SourceObservationID *string `json:"source_observation_id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// ResolvedAt holds the value of the "resolved_at" field.
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
// contains filtered or unexported fields
}
Inquiry is the model entity for the Inquiry schema.
func (*Inquiry) Unwrap ¶
Unwrap unwraps the Inquiry 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 (*Inquiry) Update ¶
func (_m *Inquiry) Update() *InquiryUpdateOne
Update returns a builder for updating this Inquiry. Note that you need to call Inquiry.Unwrap() before calling this method if this Inquiry was returned from a transaction, and the transaction was committed or rolled back.
type InquiryClient ¶
type InquiryClient struct {
// contains filtered or unexported fields
}
InquiryClient is a client for the Inquiry schema.
func NewInquiryClient ¶
func NewInquiryClient(c config) *InquiryClient
NewInquiryClient returns a client for the Inquiry from the given config.
func (*InquiryClient) Create ¶
func (c *InquiryClient) Create() *InquiryCreate
Create returns a builder for creating a Inquiry entity.
func (*InquiryClient) CreateBulk ¶
func (c *InquiryClient) CreateBulk(builders ...*InquiryCreate) *InquiryCreateBulk
CreateBulk returns a builder for creating a bulk of Inquiry entities.
func (*InquiryClient) Delete ¶
func (c *InquiryClient) Delete() *InquiryDelete
Delete returns a delete builder for Inquiry.
func (*InquiryClient) DeleteOne ¶
func (c *InquiryClient) DeleteOne(_m *Inquiry) *InquiryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InquiryClient) DeleteOneID ¶
func (c *InquiryClient) DeleteOneID(id uuid.UUID) *InquiryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InquiryClient) Hooks ¶
func (c *InquiryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InquiryClient) Intercept ¶
func (c *InquiryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `inquiry.Intercept(f(g(h())))`.
func (*InquiryClient) Interceptors ¶
func (c *InquiryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InquiryClient) MapCreateBulk ¶
func (c *InquiryClient) MapCreateBulk(slice any, setFunc func(*InquiryCreate, int)) *InquiryCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*InquiryClient) Query ¶
func (c *InquiryClient) Query() *InquiryQuery
Query returns a query builder for Inquiry.
func (*InquiryClient) Update ¶
func (c *InquiryClient) Update() *InquiryUpdate
Update returns an update builder for Inquiry.
func (*InquiryClient) UpdateOne ¶
func (c *InquiryClient) UpdateOne(_m *Inquiry) *InquiryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InquiryClient) UpdateOneID ¶
func (c *InquiryClient) UpdateOneID(id uuid.UUID) *InquiryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InquiryClient) Use ¶
func (c *InquiryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `inquiry.Hooks(f(g(h())))`.
type InquiryCreate ¶
type InquiryCreate struct {
// contains filtered or unexported fields
}
InquiryCreate is the builder for creating a Inquiry entity.
func (*InquiryCreate) Exec ¶
func (_c *InquiryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InquiryCreate) ExecX ¶
func (_c *InquiryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InquiryCreate) Mutation ¶
func (_c *InquiryCreate) Mutation() *InquiryMutation
Mutation returns the InquiryMutation object of the builder.
func (*InquiryCreate) Save ¶
func (_c *InquiryCreate) Save(ctx context.Context) (*Inquiry, error)
Save creates the Inquiry in the database.
func (*InquiryCreate) SaveX ¶
func (_c *InquiryCreate) SaveX(ctx context.Context) *Inquiry
SaveX calls Save and panics if Save returns an error.
func (*InquiryCreate) SetAnswer ¶
func (_c *InquiryCreate) SetAnswer(v string) *InquiryCreate
SetAnswer sets the "answer" field.
func (*InquiryCreate) SetContext ¶
func (_c *InquiryCreate) SetContext(v string) *InquiryCreate
SetContext sets the "context" field.
func (*InquiryCreate) SetCreatedAt ¶
func (_c *InquiryCreate) SetCreatedAt(v time.Time) *InquiryCreate
SetCreatedAt sets the "created_at" field.
func (*InquiryCreate) SetID ¶
func (_c *InquiryCreate) SetID(v uuid.UUID) *InquiryCreate
SetID sets the "id" field.
func (*InquiryCreate) SetKnowledgeKey ¶
func (_c *InquiryCreate) SetKnowledgeKey(v string) *InquiryCreate
SetKnowledgeKey sets the "knowledge_key" field.
func (*InquiryCreate) SetNillableAnswer ¶
func (_c *InquiryCreate) SetNillableAnswer(v *string) *InquiryCreate
SetNillableAnswer sets the "answer" field if the given value is not nil.
func (*InquiryCreate) SetNillableContext ¶
func (_c *InquiryCreate) SetNillableContext(v *string) *InquiryCreate
SetNillableContext sets the "context" field if the given value is not nil.
func (*InquiryCreate) SetNillableCreatedAt ¶
func (_c *InquiryCreate) SetNillableCreatedAt(v *time.Time) *InquiryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*InquiryCreate) SetNillableID ¶
func (_c *InquiryCreate) SetNillableID(v *uuid.UUID) *InquiryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InquiryCreate) SetNillableKnowledgeKey ¶
func (_c *InquiryCreate) SetNillableKnowledgeKey(v *string) *InquiryCreate
SetNillableKnowledgeKey sets the "knowledge_key" field if the given value is not nil.
func (*InquiryCreate) SetNillablePriority ¶
func (_c *InquiryCreate) SetNillablePriority(v *inquiry.Priority) *InquiryCreate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*InquiryCreate) SetNillableResolvedAt ¶
func (_c *InquiryCreate) SetNillableResolvedAt(v *time.Time) *InquiryCreate
SetNillableResolvedAt sets the "resolved_at" field if the given value is not nil.
func (*InquiryCreate) SetNillableSourceObservationID ¶
func (_c *InquiryCreate) SetNillableSourceObservationID(v *string) *InquiryCreate
SetNillableSourceObservationID sets the "source_observation_id" field if the given value is not nil.
func (*InquiryCreate) SetNillableStatus ¶
func (_c *InquiryCreate) SetNillableStatus(v *inquiry.Status) *InquiryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InquiryCreate) SetPriority ¶
func (_c *InquiryCreate) SetPriority(v inquiry.Priority) *InquiryCreate
SetPriority sets the "priority" field.
func (*InquiryCreate) SetQuestion ¶
func (_c *InquiryCreate) SetQuestion(v string) *InquiryCreate
SetQuestion sets the "question" field.
func (*InquiryCreate) SetResolvedAt ¶
func (_c *InquiryCreate) SetResolvedAt(v time.Time) *InquiryCreate
SetResolvedAt sets the "resolved_at" field.
func (*InquiryCreate) SetSessionKey ¶
func (_c *InquiryCreate) SetSessionKey(v string) *InquiryCreate
SetSessionKey sets the "session_key" field.
func (*InquiryCreate) SetSourceObservationID ¶
func (_c *InquiryCreate) SetSourceObservationID(v string) *InquiryCreate
SetSourceObservationID sets the "source_observation_id" field.
func (*InquiryCreate) SetStatus ¶
func (_c *InquiryCreate) SetStatus(v inquiry.Status) *InquiryCreate
SetStatus sets the "status" field.
func (*InquiryCreate) SetTopic ¶
func (_c *InquiryCreate) SetTopic(v string) *InquiryCreate
SetTopic sets the "topic" field.
type InquiryCreateBulk ¶
type InquiryCreateBulk struct {
// contains filtered or unexported fields
}
InquiryCreateBulk is the builder for creating many Inquiry entities in bulk.
func (*InquiryCreateBulk) Exec ¶
func (_c *InquiryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InquiryCreateBulk) ExecX ¶
func (_c *InquiryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type InquiryDelete ¶
type InquiryDelete struct {
// contains filtered or unexported fields
}
InquiryDelete is the builder for deleting a Inquiry entity.
func (*InquiryDelete) Exec ¶
func (_d *InquiryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InquiryDelete) ExecX ¶
func (_d *InquiryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InquiryDelete) Where ¶
func (_d *InquiryDelete) Where(ps ...predicate.Inquiry) *InquiryDelete
Where appends a list predicates to the InquiryDelete builder.
type InquiryDeleteOne ¶
type InquiryDeleteOne struct {
// contains filtered or unexported fields
}
InquiryDeleteOne is the builder for deleting a single Inquiry entity.
func (*InquiryDeleteOne) Exec ¶
func (_d *InquiryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InquiryDeleteOne) ExecX ¶
func (_d *InquiryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InquiryDeleteOne) Where ¶
func (_d *InquiryDeleteOne) Where(ps ...predicate.Inquiry) *InquiryDeleteOne
Where appends a list predicates to the InquiryDelete builder.
type InquiryGroupBy ¶
type InquiryGroupBy struct {
// contains filtered or unexported fields
}
InquiryGroupBy is the group-by builder for Inquiry entities.
func (*InquiryGroupBy) Aggregate ¶
func (_g *InquiryGroupBy) Aggregate(fns ...AggregateFunc) *InquiryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InquiryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InquiryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InquiryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InquiryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InquiryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InquiryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InquiryGroupBy) Scan ¶
func (_g *InquiryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InquiryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InquiryMutation ¶
type InquiryMutation struct {
// contains filtered or unexported fields
}
InquiryMutation represents an operation that mutates the Inquiry nodes in the graph.
func (*InquiryMutation) AddField ¶
func (m *InquiryMutation) 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 (*InquiryMutation) AddedEdges ¶
func (m *InquiryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InquiryMutation) AddedField ¶
func (m *InquiryMutation) 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 (*InquiryMutation) AddedFields ¶
func (m *InquiryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InquiryMutation) AddedIDs ¶
func (m *InquiryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InquiryMutation) Answer ¶
func (m *InquiryMutation) Answer() (r string, exists bool)
Answer returns the value of the "answer" field in the mutation.
func (*InquiryMutation) AnswerCleared ¶
func (m *InquiryMutation) AnswerCleared() bool
AnswerCleared returns if the "answer" field was cleared in this mutation.
func (*InquiryMutation) ClearAnswer ¶
func (m *InquiryMutation) ClearAnswer()
ClearAnswer clears the value of the "answer" field.
func (*InquiryMutation) ClearContext ¶
func (m *InquiryMutation) ClearContext()
ClearContext clears the value of the "context" field.
func (*InquiryMutation) ClearEdge ¶
func (m *InquiryMutation) 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 (*InquiryMutation) ClearField ¶
func (m *InquiryMutation) 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 (*InquiryMutation) ClearKnowledgeKey ¶
func (m *InquiryMutation) ClearKnowledgeKey()
ClearKnowledgeKey clears the value of the "knowledge_key" field.
func (*InquiryMutation) ClearResolvedAt ¶
func (m *InquiryMutation) ClearResolvedAt()
ClearResolvedAt clears the value of the "resolved_at" field.
func (*InquiryMutation) ClearSourceObservationID ¶
func (m *InquiryMutation) ClearSourceObservationID()
ClearSourceObservationID clears the value of the "source_observation_id" field.
func (*InquiryMutation) ClearedEdges ¶
func (m *InquiryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InquiryMutation) ClearedFields ¶
func (m *InquiryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InquiryMutation) Client ¶
func (m InquiryMutation) 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 (*InquiryMutation) Context ¶
func (m *InquiryMutation) Context() (r string, exists bool)
Context returns the value of the "context" field in the mutation.
func (*InquiryMutation) ContextCleared ¶
func (m *InquiryMutation) ContextCleared() bool
ContextCleared returns if the "context" field was cleared in this mutation.
func (*InquiryMutation) CreatedAt ¶
func (m *InquiryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*InquiryMutation) EdgeCleared ¶
func (m *InquiryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InquiryMutation) Field ¶
func (m *InquiryMutation) 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 (*InquiryMutation) FieldCleared ¶
func (m *InquiryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InquiryMutation) Fields ¶
func (m *InquiryMutation) 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 (*InquiryMutation) ID ¶
func (m *InquiryMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*InquiryMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InquiryMutation) KnowledgeKey ¶
func (m *InquiryMutation) KnowledgeKey() (r string, exists bool)
KnowledgeKey returns the value of the "knowledge_key" field in the mutation.
func (*InquiryMutation) KnowledgeKeyCleared ¶
func (m *InquiryMutation) KnowledgeKeyCleared() bool
KnowledgeKeyCleared returns if the "knowledge_key" field was cleared in this mutation.
func (*InquiryMutation) OldAnswer ¶
func (m *InquiryMutation) OldAnswer(ctx context.Context) (v *string, err error)
OldAnswer returns the old "answer" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldContext ¶
func (m *InquiryMutation) OldContext(ctx context.Context) (v *string, err error)
OldContext returns the old "context" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) 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 (*InquiryMutation) OldKnowledgeKey ¶
func (m *InquiryMutation) OldKnowledgeKey(ctx context.Context) (v *string, err error)
OldKnowledgeKey returns the old "knowledge_key" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldPriority ¶
OldPriority returns the old "priority" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldQuestion ¶
func (m *InquiryMutation) OldQuestion(ctx context.Context) (v string, err error)
OldQuestion returns the old "question" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldResolvedAt ¶
OldResolvedAt returns the old "resolved_at" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldSessionKey ¶
func (m *InquiryMutation) OldSessionKey(ctx context.Context) (v string, err error)
OldSessionKey returns the old "session_key" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldSourceObservationID ¶
func (m *InquiryMutation) OldSourceObservationID(ctx context.Context) (v *string, err error)
OldSourceObservationID returns the old "source_observation_id" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) OldTopic ¶
func (m *InquiryMutation) OldTopic(ctx context.Context) (v string, err error)
OldTopic returns the old "topic" field's value of the Inquiry entity. If the Inquiry 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 (*InquiryMutation) Priority ¶
func (m *InquiryMutation) Priority() (r inquiry.Priority, exists bool)
Priority returns the value of the "priority" field in the mutation.
func (*InquiryMutation) Question ¶
func (m *InquiryMutation) Question() (r string, exists bool)
Question returns the value of the "question" field in the mutation.
func (*InquiryMutation) RemovedEdges ¶
func (m *InquiryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InquiryMutation) RemovedIDs ¶
func (m *InquiryMutation) 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 (*InquiryMutation) ResetAnswer ¶
func (m *InquiryMutation) ResetAnswer()
ResetAnswer resets all changes to the "answer" field.
func (*InquiryMutation) ResetContext ¶
func (m *InquiryMutation) ResetContext()
ResetContext resets all changes to the "context" field.
func (*InquiryMutation) ResetCreatedAt ¶
func (m *InquiryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*InquiryMutation) ResetEdge ¶
func (m *InquiryMutation) 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 (*InquiryMutation) ResetField ¶
func (m *InquiryMutation) 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 (*InquiryMutation) ResetKnowledgeKey ¶
func (m *InquiryMutation) ResetKnowledgeKey()
ResetKnowledgeKey resets all changes to the "knowledge_key" field.
func (*InquiryMutation) ResetPriority ¶
func (m *InquiryMutation) ResetPriority()
ResetPriority resets all changes to the "priority" field.
func (*InquiryMutation) ResetQuestion ¶
func (m *InquiryMutation) ResetQuestion()
ResetQuestion resets all changes to the "question" field.
func (*InquiryMutation) ResetResolvedAt ¶
func (m *InquiryMutation) ResetResolvedAt()
ResetResolvedAt resets all changes to the "resolved_at" field.
func (*InquiryMutation) ResetSessionKey ¶
func (m *InquiryMutation) ResetSessionKey()
ResetSessionKey resets all changes to the "session_key" field.
func (*InquiryMutation) ResetSourceObservationID ¶
func (m *InquiryMutation) ResetSourceObservationID()
ResetSourceObservationID resets all changes to the "source_observation_id" field.
func (*InquiryMutation) ResetStatus ¶
func (m *InquiryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*InquiryMutation) ResetTopic ¶
func (m *InquiryMutation) ResetTopic()
ResetTopic resets all changes to the "topic" field.
func (*InquiryMutation) ResolvedAt ¶
func (m *InquiryMutation) ResolvedAt() (r time.Time, exists bool)
ResolvedAt returns the value of the "resolved_at" field in the mutation.
func (*InquiryMutation) ResolvedAtCleared ¶
func (m *InquiryMutation) ResolvedAtCleared() bool
ResolvedAtCleared returns if the "resolved_at" field was cleared in this mutation.
func (*InquiryMutation) SessionKey ¶
func (m *InquiryMutation) SessionKey() (r string, exists bool)
SessionKey returns the value of the "session_key" field in the mutation.
func (*InquiryMutation) SetAnswer ¶
func (m *InquiryMutation) SetAnswer(s string)
SetAnswer sets the "answer" field.
func (*InquiryMutation) SetContext ¶
func (m *InquiryMutation) SetContext(s string)
SetContext sets the "context" field.
func (*InquiryMutation) SetCreatedAt ¶
func (m *InquiryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*InquiryMutation) SetField ¶
func (m *InquiryMutation) 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 (*InquiryMutation) SetID ¶
func (m *InquiryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Inquiry entities.
func (*InquiryMutation) SetKnowledgeKey ¶
func (m *InquiryMutation) SetKnowledgeKey(s string)
SetKnowledgeKey sets the "knowledge_key" field.
func (*InquiryMutation) SetOp ¶
func (m *InquiryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InquiryMutation) SetPriority ¶
func (m *InquiryMutation) SetPriority(i inquiry.Priority)
SetPriority sets the "priority" field.
func (*InquiryMutation) SetQuestion ¶
func (m *InquiryMutation) SetQuestion(s string)
SetQuestion sets the "question" field.
func (*InquiryMutation) SetResolvedAt ¶
func (m *InquiryMutation) SetResolvedAt(t time.Time)
SetResolvedAt sets the "resolved_at" field.
func (*InquiryMutation) SetSessionKey ¶
func (m *InquiryMutation) SetSessionKey(s string)
SetSessionKey sets the "session_key" field.
func (*InquiryMutation) SetSourceObservationID ¶
func (m *InquiryMutation) SetSourceObservationID(s string)
SetSourceObservationID sets the "source_observation_id" field.
func (*InquiryMutation) SetStatus ¶
func (m *InquiryMutation) SetStatus(i inquiry.Status)
SetStatus sets the "status" field.
func (*InquiryMutation) SetTopic ¶
func (m *InquiryMutation) SetTopic(s string)
SetTopic sets the "topic" field.
func (*InquiryMutation) SourceObservationID ¶
func (m *InquiryMutation) SourceObservationID() (r string, exists bool)
SourceObservationID returns the value of the "source_observation_id" field in the mutation.
func (*InquiryMutation) SourceObservationIDCleared ¶
func (m *InquiryMutation) SourceObservationIDCleared() bool
SourceObservationIDCleared returns if the "source_observation_id" field was cleared in this mutation.
func (*InquiryMutation) Status ¶
func (m *InquiryMutation) Status() (r inquiry.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*InquiryMutation) Topic ¶
func (m *InquiryMutation) Topic() (r string, exists bool)
Topic returns the value of the "topic" field in the mutation.
func (InquiryMutation) Tx ¶
func (m InquiryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InquiryMutation) Type ¶
func (m *InquiryMutation) Type() string
Type returns the node type of this mutation (Inquiry).
func (*InquiryMutation) Where ¶
func (m *InquiryMutation) Where(ps ...predicate.Inquiry)
Where appends a list predicates to the InquiryMutation builder.
func (*InquiryMutation) WhereP ¶
func (m *InquiryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InquiryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InquiryQuery ¶
type InquiryQuery struct {
// contains filtered or unexported fields
}
InquiryQuery is the builder for querying Inquiry entities.
func (*InquiryQuery) Aggregate ¶
func (_q *InquiryQuery) Aggregate(fns ...AggregateFunc) *InquirySelect
Aggregate returns a InquirySelect configured with the given aggregations.
func (*InquiryQuery) All ¶
func (_q *InquiryQuery) All(ctx context.Context) ([]*Inquiry, error)
All executes the query and returns a list of Inquiries.
func (*InquiryQuery) AllX ¶
func (_q *InquiryQuery) AllX(ctx context.Context) []*Inquiry
AllX is like All, but panics if an error occurs.
func (*InquiryQuery) Clone ¶
func (_q *InquiryQuery) Clone() *InquiryQuery
Clone returns a duplicate of the InquiryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InquiryQuery) Count ¶
func (_q *InquiryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InquiryQuery) CountX ¶
func (_q *InquiryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InquiryQuery) Exist ¶
func (_q *InquiryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InquiryQuery) ExistX ¶
func (_q *InquiryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InquiryQuery) First ¶
func (_q *InquiryQuery) First(ctx context.Context) (*Inquiry, error)
First returns the first Inquiry entity from the query. Returns a *NotFoundError when no Inquiry was found.
func (*InquiryQuery) FirstID ¶
FirstID returns the first Inquiry ID from the query. Returns a *NotFoundError when no Inquiry ID was found.
func (*InquiryQuery) FirstIDX ¶
func (_q *InquiryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InquiryQuery) FirstX ¶
func (_q *InquiryQuery) FirstX(ctx context.Context) *Inquiry
FirstX is like First, but panics if an error occurs.
func (*InquiryQuery) GroupBy ¶
func (_q *InquiryQuery) GroupBy(field string, fields ...string) *InquiryGroupBy
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 {
SessionKey string `json:"session_key,omitempty"`
Count int `json:"count,omitempty"`
}
client.Inquiry.Query().
GroupBy(inquiry.FieldSessionKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*InquiryQuery) IDsX ¶
func (_q *InquiryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InquiryQuery) Limit ¶
func (_q *InquiryQuery) Limit(limit int) *InquiryQuery
Limit the number of records to be returned by this query.
func (*InquiryQuery) Offset ¶
func (_q *InquiryQuery) Offset(offset int) *InquiryQuery
Offset to start from.
func (*InquiryQuery) Only ¶
func (_q *InquiryQuery) Only(ctx context.Context) (*Inquiry, error)
Only returns a single Inquiry entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Inquiry entity is found. Returns a *NotFoundError when no Inquiry entities are found.
func (*InquiryQuery) OnlyID ¶
OnlyID is like Only, but returns the only Inquiry ID in the query. Returns a *NotSingularError when more than one Inquiry ID is found. Returns a *NotFoundError when no entities are found.
func (*InquiryQuery) OnlyIDX ¶
func (_q *InquiryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InquiryQuery) OnlyX ¶
func (_q *InquiryQuery) OnlyX(ctx context.Context) *Inquiry
OnlyX is like Only, but panics if an error occurs.
func (*InquiryQuery) Order ¶
func (_q *InquiryQuery) Order(o ...inquiry.OrderOption) *InquiryQuery
Order specifies how the records should be ordered.
func (*InquiryQuery) Select ¶
func (_q *InquiryQuery) Select(fields ...string) *InquirySelect
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 {
SessionKey string `json:"session_key,omitempty"`
}
client.Inquiry.Query().
Select(inquiry.FieldSessionKey).
Scan(ctx, &v)
func (*InquiryQuery) Unique ¶
func (_q *InquiryQuery) Unique(unique bool) *InquiryQuery
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 (*InquiryQuery) Where ¶
func (_q *InquiryQuery) Where(ps ...predicate.Inquiry) *InquiryQuery
Where adds a new predicate for the InquiryQuery builder.
type InquirySelect ¶
type InquirySelect struct {
*InquiryQuery
// contains filtered or unexported fields
}
InquirySelect is the builder for selecting fields of Inquiry entities.
func (*InquirySelect) Aggregate ¶
func (_s *InquirySelect) Aggregate(fns ...AggregateFunc) *InquirySelect
Aggregate adds the given aggregation functions to the selector query.
func (*InquirySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InquirySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InquirySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InquirySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InquirySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InquirySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InquirySelect) Scan ¶
func (_s *InquirySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InquirySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InquiryUpdate ¶
type InquiryUpdate struct {
// contains filtered or unexported fields
}
InquiryUpdate is the builder for updating Inquiry entities.
func (*InquiryUpdate) ClearAnswer ¶
func (_u *InquiryUpdate) ClearAnswer() *InquiryUpdate
ClearAnswer clears the value of the "answer" field.
func (*InquiryUpdate) ClearContext ¶
func (_u *InquiryUpdate) ClearContext() *InquiryUpdate
ClearContext clears the value of the "context" field.
func (*InquiryUpdate) ClearKnowledgeKey ¶
func (_u *InquiryUpdate) ClearKnowledgeKey() *InquiryUpdate
ClearKnowledgeKey clears the value of the "knowledge_key" field.
func (*InquiryUpdate) ClearResolvedAt ¶
func (_u *InquiryUpdate) ClearResolvedAt() *InquiryUpdate
ClearResolvedAt clears the value of the "resolved_at" field.
func (*InquiryUpdate) ClearSourceObservationID ¶
func (_u *InquiryUpdate) ClearSourceObservationID() *InquiryUpdate
ClearSourceObservationID clears the value of the "source_observation_id" field.
func (*InquiryUpdate) Exec ¶
func (_u *InquiryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InquiryUpdate) ExecX ¶
func (_u *InquiryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InquiryUpdate) Mutation ¶
func (_u *InquiryUpdate) Mutation() *InquiryMutation
Mutation returns the InquiryMutation object of the builder.
func (*InquiryUpdate) Save ¶
func (_u *InquiryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InquiryUpdate) SaveX ¶
func (_u *InquiryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InquiryUpdate) SetAnswer ¶
func (_u *InquiryUpdate) SetAnswer(v string) *InquiryUpdate
SetAnswer sets the "answer" field.
func (*InquiryUpdate) SetContext ¶
func (_u *InquiryUpdate) SetContext(v string) *InquiryUpdate
SetContext sets the "context" field.
func (*InquiryUpdate) SetKnowledgeKey ¶
func (_u *InquiryUpdate) SetKnowledgeKey(v string) *InquiryUpdate
SetKnowledgeKey sets the "knowledge_key" field.
func (*InquiryUpdate) SetNillableAnswer ¶
func (_u *InquiryUpdate) SetNillableAnswer(v *string) *InquiryUpdate
SetNillableAnswer sets the "answer" field if the given value is not nil.
func (*InquiryUpdate) SetNillableContext ¶
func (_u *InquiryUpdate) SetNillableContext(v *string) *InquiryUpdate
SetNillableContext sets the "context" field if the given value is not nil.
func (*InquiryUpdate) SetNillableKnowledgeKey ¶
func (_u *InquiryUpdate) SetNillableKnowledgeKey(v *string) *InquiryUpdate
SetNillableKnowledgeKey sets the "knowledge_key" field if the given value is not nil.
func (*InquiryUpdate) SetNillablePriority ¶
func (_u *InquiryUpdate) SetNillablePriority(v *inquiry.Priority) *InquiryUpdate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*InquiryUpdate) SetNillableQuestion ¶
func (_u *InquiryUpdate) SetNillableQuestion(v *string) *InquiryUpdate
SetNillableQuestion sets the "question" field if the given value is not nil.
func (*InquiryUpdate) SetNillableResolvedAt ¶
func (_u *InquiryUpdate) SetNillableResolvedAt(v *time.Time) *InquiryUpdate
SetNillableResolvedAt sets the "resolved_at" field if the given value is not nil.
func (*InquiryUpdate) SetNillableSessionKey ¶
func (_u *InquiryUpdate) SetNillableSessionKey(v *string) *InquiryUpdate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*InquiryUpdate) SetNillableSourceObservationID ¶
func (_u *InquiryUpdate) SetNillableSourceObservationID(v *string) *InquiryUpdate
SetNillableSourceObservationID sets the "source_observation_id" field if the given value is not nil.
func (*InquiryUpdate) SetNillableStatus ¶
func (_u *InquiryUpdate) SetNillableStatus(v *inquiry.Status) *InquiryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InquiryUpdate) SetNillableTopic ¶
func (_u *InquiryUpdate) SetNillableTopic(v *string) *InquiryUpdate
SetNillableTopic sets the "topic" field if the given value is not nil.
func (*InquiryUpdate) SetPriority ¶
func (_u *InquiryUpdate) SetPriority(v inquiry.Priority) *InquiryUpdate
SetPriority sets the "priority" field.
func (*InquiryUpdate) SetQuestion ¶
func (_u *InquiryUpdate) SetQuestion(v string) *InquiryUpdate
SetQuestion sets the "question" field.
func (*InquiryUpdate) SetResolvedAt ¶
func (_u *InquiryUpdate) SetResolvedAt(v time.Time) *InquiryUpdate
SetResolvedAt sets the "resolved_at" field.
func (*InquiryUpdate) SetSessionKey ¶
func (_u *InquiryUpdate) SetSessionKey(v string) *InquiryUpdate
SetSessionKey sets the "session_key" field.
func (*InquiryUpdate) SetSourceObservationID ¶
func (_u *InquiryUpdate) SetSourceObservationID(v string) *InquiryUpdate
SetSourceObservationID sets the "source_observation_id" field.
func (*InquiryUpdate) SetStatus ¶
func (_u *InquiryUpdate) SetStatus(v inquiry.Status) *InquiryUpdate
SetStatus sets the "status" field.
func (*InquiryUpdate) SetTopic ¶
func (_u *InquiryUpdate) SetTopic(v string) *InquiryUpdate
SetTopic sets the "topic" field.
func (*InquiryUpdate) Where ¶
func (_u *InquiryUpdate) Where(ps ...predicate.Inquiry) *InquiryUpdate
Where appends a list predicates to the InquiryUpdate builder.
type InquiryUpdateOne ¶
type InquiryUpdateOne struct {
// contains filtered or unexported fields
}
InquiryUpdateOne is the builder for updating a single Inquiry entity.
func (*InquiryUpdateOne) ClearAnswer ¶
func (_u *InquiryUpdateOne) ClearAnswer() *InquiryUpdateOne
ClearAnswer clears the value of the "answer" field.
func (*InquiryUpdateOne) ClearContext ¶
func (_u *InquiryUpdateOne) ClearContext() *InquiryUpdateOne
ClearContext clears the value of the "context" field.
func (*InquiryUpdateOne) ClearKnowledgeKey ¶
func (_u *InquiryUpdateOne) ClearKnowledgeKey() *InquiryUpdateOne
ClearKnowledgeKey clears the value of the "knowledge_key" field.
func (*InquiryUpdateOne) ClearResolvedAt ¶
func (_u *InquiryUpdateOne) ClearResolvedAt() *InquiryUpdateOne
ClearResolvedAt clears the value of the "resolved_at" field.
func (*InquiryUpdateOne) ClearSourceObservationID ¶
func (_u *InquiryUpdateOne) ClearSourceObservationID() *InquiryUpdateOne
ClearSourceObservationID clears the value of the "source_observation_id" field.
func (*InquiryUpdateOne) Exec ¶
func (_u *InquiryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InquiryUpdateOne) ExecX ¶
func (_u *InquiryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InquiryUpdateOne) Mutation ¶
func (_u *InquiryUpdateOne) Mutation() *InquiryMutation
Mutation returns the InquiryMutation object of the builder.
func (*InquiryUpdateOne) Save ¶
func (_u *InquiryUpdateOne) Save(ctx context.Context) (*Inquiry, error)
Save executes the query and returns the updated Inquiry entity.
func (*InquiryUpdateOne) SaveX ¶
func (_u *InquiryUpdateOne) SaveX(ctx context.Context) *Inquiry
SaveX is like Save, but panics if an error occurs.
func (*InquiryUpdateOne) Select ¶
func (_u *InquiryUpdateOne) Select(field string, fields ...string) *InquiryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InquiryUpdateOne) SetAnswer ¶
func (_u *InquiryUpdateOne) SetAnswer(v string) *InquiryUpdateOne
SetAnswer sets the "answer" field.
func (*InquiryUpdateOne) SetContext ¶
func (_u *InquiryUpdateOne) SetContext(v string) *InquiryUpdateOne
SetContext sets the "context" field.
func (*InquiryUpdateOne) SetKnowledgeKey ¶
func (_u *InquiryUpdateOne) SetKnowledgeKey(v string) *InquiryUpdateOne
SetKnowledgeKey sets the "knowledge_key" field.
func (*InquiryUpdateOne) SetNillableAnswer ¶
func (_u *InquiryUpdateOne) SetNillableAnswer(v *string) *InquiryUpdateOne
SetNillableAnswer sets the "answer" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableContext ¶
func (_u *InquiryUpdateOne) SetNillableContext(v *string) *InquiryUpdateOne
SetNillableContext sets the "context" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableKnowledgeKey ¶
func (_u *InquiryUpdateOne) SetNillableKnowledgeKey(v *string) *InquiryUpdateOne
SetNillableKnowledgeKey sets the "knowledge_key" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillablePriority ¶
func (_u *InquiryUpdateOne) SetNillablePriority(v *inquiry.Priority) *InquiryUpdateOne
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableQuestion ¶
func (_u *InquiryUpdateOne) SetNillableQuestion(v *string) *InquiryUpdateOne
SetNillableQuestion sets the "question" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableResolvedAt ¶
func (_u *InquiryUpdateOne) SetNillableResolvedAt(v *time.Time) *InquiryUpdateOne
SetNillableResolvedAt sets the "resolved_at" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableSessionKey ¶
func (_u *InquiryUpdateOne) SetNillableSessionKey(v *string) *InquiryUpdateOne
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableSourceObservationID ¶
func (_u *InquiryUpdateOne) SetNillableSourceObservationID(v *string) *InquiryUpdateOne
SetNillableSourceObservationID sets the "source_observation_id" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableStatus ¶
func (_u *InquiryUpdateOne) SetNillableStatus(v *inquiry.Status) *InquiryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*InquiryUpdateOne) SetNillableTopic ¶
func (_u *InquiryUpdateOne) SetNillableTopic(v *string) *InquiryUpdateOne
SetNillableTopic sets the "topic" field if the given value is not nil.
func (*InquiryUpdateOne) SetPriority ¶
func (_u *InquiryUpdateOne) SetPriority(v inquiry.Priority) *InquiryUpdateOne
SetPriority sets the "priority" field.
func (*InquiryUpdateOne) SetQuestion ¶
func (_u *InquiryUpdateOne) SetQuestion(v string) *InquiryUpdateOne
SetQuestion sets the "question" field.
func (*InquiryUpdateOne) SetResolvedAt ¶
func (_u *InquiryUpdateOne) SetResolvedAt(v time.Time) *InquiryUpdateOne
SetResolvedAt sets the "resolved_at" field.
func (*InquiryUpdateOne) SetSessionKey ¶
func (_u *InquiryUpdateOne) SetSessionKey(v string) *InquiryUpdateOne
SetSessionKey sets the "session_key" field.
func (*InquiryUpdateOne) SetSourceObservationID ¶
func (_u *InquiryUpdateOne) SetSourceObservationID(v string) *InquiryUpdateOne
SetSourceObservationID sets the "source_observation_id" field.
func (*InquiryUpdateOne) SetStatus ¶
func (_u *InquiryUpdateOne) SetStatus(v inquiry.Status) *InquiryUpdateOne
SetStatus sets the "status" field.
func (*InquiryUpdateOne) SetTopic ¶
func (_u *InquiryUpdateOne) SetTopic(v string) *InquiryUpdateOne
SetTopic sets the "topic" field.
func (*InquiryUpdateOne) Where ¶
func (_u *InquiryUpdateOne) Where(ps ...predicate.Inquiry) *InquiryUpdateOne
Where appends a list predicates to the InquiryUpdate builder.
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 Key ¶
type Key struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Display name for the key
Name string `json:"name,omitempty"`
// Reference to key in external provider (companion) or 'local'
RemoteKeyID string `json:"remote_key_id,omitempty"`
// Key purpose
Type key.Type `json:"type,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Last time this key was used for an operation
LastUsedAt *time.Time `json:"last_used_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the KeyQuery when eager-loading is set.
Edges KeyEdges `json:"edges"`
// contains filtered or unexported fields
}
Key is the model entity for the Key schema.
func (*Key) QuerySecrets ¶
func (_m *Key) QuerySecrets() *SecretQuery
QuerySecrets queries the "secrets" edge of the Key entity.
func (*Key) Unwrap ¶
Unwrap unwraps the Key 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 (*Key) Update ¶
func (_m *Key) Update() *KeyUpdateOne
Update returns a builder for updating this Key. Note that you need to call Key.Unwrap() before calling this method if this Key was returned from a transaction, and the transaction was committed or rolled back.
type KeyClient ¶
type KeyClient struct {
// contains filtered or unexported fields
}
KeyClient is a client for the Key schema.
func NewKeyClient ¶
func NewKeyClient(c config) *KeyClient
NewKeyClient returns a client for the Key from the given config.
func (*KeyClient) CreateBulk ¶
func (c *KeyClient) CreateBulk(builders ...*KeyCreate) *KeyCreateBulk
CreateBulk returns a builder for creating a bulk of Key entities.
func (*KeyClient) DeleteOne ¶
func (c *KeyClient) DeleteOne(_m *Key) *KeyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*KeyClient) DeleteOneID ¶
func (c *KeyClient) DeleteOneID(id uuid.UUID) *KeyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*KeyClient) Intercept ¶
func (c *KeyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `key.Intercept(f(g(h())))`.
func (*KeyClient) Interceptors ¶
func (c *KeyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*KeyClient) MapCreateBulk ¶
func (c *KeyClient) MapCreateBulk(slice any, setFunc func(*KeyCreate, int)) *KeyCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*KeyClient) QuerySecrets ¶
func (c *KeyClient) QuerySecrets(_m *Key) *SecretQuery
QuerySecrets queries the secrets edge of a Key.
func (*KeyClient) UpdateOne ¶
func (c *KeyClient) UpdateOne(_m *Key) *KeyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*KeyClient) UpdateOneID ¶
func (c *KeyClient) UpdateOneID(id uuid.UUID) *KeyUpdateOne
UpdateOneID returns an update builder for the given id.
type KeyCreate ¶
type KeyCreate struct {
// contains filtered or unexported fields
}
KeyCreate is the builder for creating a Key entity.
func (*KeyCreate) AddSecretIDs ¶
AddSecretIDs adds the "secrets" edge to the Secret entity by IDs.
func (*KeyCreate) AddSecrets ¶
AddSecrets adds the "secrets" edges to the Secret entity.
func (*KeyCreate) Mutation ¶
func (_c *KeyCreate) Mutation() *KeyMutation
Mutation returns the KeyMutation object of the builder.
func (*KeyCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*KeyCreate) SetLastUsedAt ¶
SetLastUsedAt sets the "last_used_at" field.
func (*KeyCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*KeyCreate) SetNillableID ¶
SetNillableID sets the "id" field if the given value is not nil.
func (*KeyCreate) SetNillableLastUsedAt ¶
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*KeyCreate) SetNillableType ¶
SetNillableType sets the "type" field if the given value is not nil.
func (*KeyCreate) SetRemoteKeyID ¶
SetRemoteKeyID sets the "remote_key_id" field.
type KeyCreateBulk ¶
type KeyCreateBulk struct {
// contains filtered or unexported fields
}
KeyCreateBulk is the builder for creating many Key entities in bulk.
func (*KeyCreateBulk) Exec ¶
func (_c *KeyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*KeyCreateBulk) ExecX ¶
func (_c *KeyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type KeyDelete ¶
type KeyDelete struct {
// contains filtered or unexported fields
}
KeyDelete is the builder for deleting a Key entity.
func (*KeyDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type KeyDeleteOne ¶
type KeyDeleteOne struct {
// contains filtered or unexported fields
}
KeyDeleteOne is the builder for deleting a single Key entity.
func (*KeyDeleteOne) Exec ¶
func (_d *KeyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*KeyDeleteOne) ExecX ¶
func (_d *KeyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KeyDeleteOne) Where ¶
func (_d *KeyDeleteOne) Where(ps ...predicate.Key) *KeyDeleteOne
Where appends a list predicates to the KeyDelete builder.
type KeyEdges ¶
type KeyEdges struct {
// Secrets encrypted with this key
Secrets []*Secret `json:"secrets,omitempty"`
// contains filtered or unexported fields
}
KeyEdges holds the relations/edges for other nodes in the graph.
func (KeyEdges) SecretsOrErr ¶
SecretsOrErr returns the Secrets value or an error if the edge was not loaded in eager-loading.
type KeyGroupBy ¶
type KeyGroupBy struct {
// contains filtered or unexported fields
}
KeyGroupBy is the group-by builder for Key entities.
func (*KeyGroupBy) Aggregate ¶
func (_g *KeyGroupBy) Aggregate(fns ...AggregateFunc) *KeyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*KeyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KeyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*KeyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KeyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KeyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KeyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*KeyGroupBy) Scan ¶
func (_g *KeyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*KeyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KeyMutation ¶
type KeyMutation struct {
// contains filtered or unexported fields
}
KeyMutation represents an operation that mutates the Key nodes in the graph.
func (*KeyMutation) AddField ¶
func (m *KeyMutation) 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 (*KeyMutation) AddSecretIDs ¶
func (m *KeyMutation) AddSecretIDs(ids ...uuid.UUID)
AddSecretIDs adds the "secrets" edge to the Secret entity by ids.
func (*KeyMutation) AddedEdges ¶
func (m *KeyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*KeyMutation) AddedField ¶
func (m *KeyMutation) 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 (*KeyMutation) AddedFields ¶
func (m *KeyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*KeyMutation) AddedIDs ¶
func (m *KeyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*KeyMutation) ClearEdge ¶
func (m *KeyMutation) 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 (*KeyMutation) ClearField ¶
func (m *KeyMutation) 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 (*KeyMutation) ClearLastUsedAt ¶
func (m *KeyMutation) ClearLastUsedAt()
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*KeyMutation) ClearSecrets ¶
func (m *KeyMutation) ClearSecrets()
ClearSecrets clears the "secrets" edge to the Secret entity.
func (*KeyMutation) ClearedEdges ¶
func (m *KeyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*KeyMutation) ClearedFields ¶
func (m *KeyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (KeyMutation) Client ¶
func (m KeyMutation) 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 (*KeyMutation) CreatedAt ¶
func (m *KeyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*KeyMutation) EdgeCleared ¶
func (m *KeyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*KeyMutation) Field ¶
func (m *KeyMutation) 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 (*KeyMutation) FieldCleared ¶
func (m *KeyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*KeyMutation) Fields ¶
func (m *KeyMutation) 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 (*KeyMutation) GetType ¶
func (m *KeyMutation) GetType() (r key.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*KeyMutation) ID ¶
func (m *KeyMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*KeyMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*KeyMutation) LastUsedAt ¶
func (m *KeyMutation) LastUsedAt() (r time.Time, exists bool)
LastUsedAt returns the value of the "last_used_at" field in the mutation.
func (*KeyMutation) LastUsedAtCleared ¶
func (m *KeyMutation) LastUsedAtCleared() bool
LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.
func (*KeyMutation) Name ¶
func (m *KeyMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*KeyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Key entity. If the Key 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 (*KeyMutation) 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 (*KeyMutation) OldLastUsedAt ¶
OldLastUsedAt returns the old "last_used_at" field's value of the Key entity. If the Key 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 (*KeyMutation) OldName ¶
func (m *KeyMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Key entity. If the Key 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 (*KeyMutation) OldRemoteKeyID ¶
func (m *KeyMutation) OldRemoteKeyID(ctx context.Context) (v string, err error)
OldRemoteKeyID returns the old "remote_key_id" field's value of the Key entity. If the Key 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 (*KeyMutation) OldType ¶
OldType returns the old "type" field's value of the Key entity. If the Key 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 (*KeyMutation) RemoteKeyID ¶
func (m *KeyMutation) RemoteKeyID() (r string, exists bool)
RemoteKeyID returns the value of the "remote_key_id" field in the mutation.
func (*KeyMutation) RemoveSecretIDs ¶
func (m *KeyMutation) RemoveSecretIDs(ids ...uuid.UUID)
RemoveSecretIDs removes the "secrets" edge to the Secret entity by IDs.
func (*KeyMutation) RemovedEdges ¶
func (m *KeyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*KeyMutation) RemovedIDs ¶
func (m *KeyMutation) 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 (*KeyMutation) RemovedSecretsIDs ¶
func (m *KeyMutation) RemovedSecretsIDs() (ids []uuid.UUID)
RemovedSecrets returns the removed IDs of the "secrets" edge to the Secret entity.
func (*KeyMutation) ResetCreatedAt ¶
func (m *KeyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*KeyMutation) ResetEdge ¶
func (m *KeyMutation) 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 (*KeyMutation) ResetField ¶
func (m *KeyMutation) 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 (*KeyMutation) ResetLastUsedAt ¶
func (m *KeyMutation) ResetLastUsedAt()
ResetLastUsedAt resets all changes to the "last_used_at" field.
func (*KeyMutation) ResetName ¶
func (m *KeyMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*KeyMutation) ResetRemoteKeyID ¶
func (m *KeyMutation) ResetRemoteKeyID()
ResetRemoteKeyID resets all changes to the "remote_key_id" field.
func (*KeyMutation) ResetSecrets ¶
func (m *KeyMutation) ResetSecrets()
ResetSecrets resets all changes to the "secrets" edge.
func (*KeyMutation) ResetType ¶
func (m *KeyMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*KeyMutation) SecretsCleared ¶
func (m *KeyMutation) SecretsCleared() bool
SecretsCleared reports if the "secrets" edge to the Secret entity was cleared.
func (*KeyMutation) SecretsIDs ¶
func (m *KeyMutation) SecretsIDs() (ids []uuid.UUID)
SecretsIDs returns the "secrets" edge IDs in the mutation.
func (*KeyMutation) SetCreatedAt ¶
func (m *KeyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*KeyMutation) SetField ¶
func (m *KeyMutation) 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 (*KeyMutation) SetID ¶
func (m *KeyMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Key entities.
func (*KeyMutation) SetLastUsedAt ¶
func (m *KeyMutation) SetLastUsedAt(t time.Time)
SetLastUsedAt sets the "last_used_at" field.
func (*KeyMutation) SetName ¶
func (m *KeyMutation) SetName(s string)
SetName sets the "name" field.
func (*KeyMutation) SetOp ¶
func (m *KeyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*KeyMutation) SetRemoteKeyID ¶
func (m *KeyMutation) SetRemoteKeyID(s string)
SetRemoteKeyID sets the "remote_key_id" field.
func (*KeyMutation) SetType ¶
func (m *KeyMutation) SetType(k key.Type)
SetType sets the "type" field.
func (KeyMutation) Tx ¶
func (m KeyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*KeyMutation) Type ¶
func (m *KeyMutation) Type() string
Type returns the node type of this mutation (Key).
func (*KeyMutation) Where ¶
func (m *KeyMutation) Where(ps ...predicate.Key)
Where appends a list predicates to the KeyMutation builder.
func (*KeyMutation) WhereP ¶
func (m *KeyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the KeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type KeyQuery ¶
type KeyQuery struct {
// contains filtered or unexported fields
}
KeyQuery is the builder for querying Key entities.
func (*KeyQuery) Aggregate ¶
func (_q *KeyQuery) Aggregate(fns ...AggregateFunc) *KeySelect
Aggregate returns a KeySelect configured with the given aggregations.
func (*KeyQuery) Clone ¶
Clone returns a duplicate of the KeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*KeyQuery) First ¶
First returns the first Key entity from the query. Returns a *NotFoundError when no Key was found.
func (*KeyQuery) FirstID ¶
FirstID returns the first Key ID from the query. Returns a *NotFoundError when no Key ID was found.
func (*KeyQuery) GroupBy ¶
func (_q *KeyQuery) GroupBy(field string, fields ...string) *KeyGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.Key.Query().
GroupBy(key.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*KeyQuery) Only ¶
Only returns a single Key entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Key entity is found. Returns a *NotFoundError when no Key entities are found.
func (*KeyQuery) OnlyID ¶
OnlyID is like Only, but returns the only Key ID in the query. Returns a *NotSingularError when more than one Key ID is found. Returns a *NotFoundError when no entities are found.
func (*KeyQuery) Order ¶
func (_q *KeyQuery) Order(o ...key.OrderOption) *KeyQuery
Order specifies how the records should be ordered.
func (*KeyQuery) QuerySecrets ¶
func (_q *KeyQuery) QuerySecrets() *SecretQuery
QuerySecrets chains the current query on the "secrets" edge.
func (*KeyQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.Key.Query().
Select(key.FieldName).
Scan(ctx, &v)
func (*KeyQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*KeyQuery) WithSecrets ¶
func (_q *KeyQuery) WithSecrets(opts ...func(*SecretQuery)) *KeyQuery
WithSecrets tells the query-builder to eager-load the nodes that are connected to the "secrets" edge. The optional arguments are used to configure the query builder of the edge.
type KeySelect ¶
type KeySelect struct {
*KeyQuery
// contains filtered or unexported fields
}
KeySelect is the builder for selecting fields of Key entities.
func (*KeySelect) Aggregate ¶
func (_s *KeySelect) Aggregate(fns ...AggregateFunc) *KeySelect
Aggregate adds the given aggregation functions to the selector query.
func (*KeySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KeySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*KeySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KeySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KeySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KeySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*KeySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KeyUpdate ¶
type KeyUpdate struct {
// contains filtered or unexported fields
}
KeyUpdate is the builder for updating Key entities.
func (*KeyUpdate) AddSecretIDs ¶
AddSecretIDs adds the "secrets" edge to the Secret entity by IDs.
func (*KeyUpdate) AddSecrets ¶
AddSecrets adds the "secrets" edges to the Secret entity.
func (*KeyUpdate) ClearLastUsedAt ¶
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*KeyUpdate) ClearSecrets ¶
ClearSecrets clears all "secrets" edges to the Secret entity.
func (*KeyUpdate) Mutation ¶
func (_u *KeyUpdate) Mutation() *KeyMutation
Mutation returns the KeyMutation object of the builder.
func (*KeyUpdate) RemoveSecretIDs ¶
RemoveSecretIDs removes the "secrets" edge to Secret entities by IDs.
func (*KeyUpdate) RemoveSecrets ¶
RemoveSecrets removes "secrets" edges to Secret entities.
func (*KeyUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*KeyUpdate) SetLastUsedAt ¶
SetLastUsedAt sets the "last_used_at" field.
func (*KeyUpdate) SetNillableLastUsedAt ¶
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*KeyUpdate) SetNillableName ¶
SetNillableName sets the "name" field if the given value is not nil.
func (*KeyUpdate) SetNillableRemoteKeyID ¶
SetNillableRemoteKeyID sets the "remote_key_id" field if the given value is not nil.
func (*KeyUpdate) SetNillableType ¶
SetNillableType sets the "type" field if the given value is not nil.
func (*KeyUpdate) SetRemoteKeyID ¶
SetRemoteKeyID sets the "remote_key_id" field.
type KeyUpdateOne ¶
type KeyUpdateOne struct {
// contains filtered or unexported fields
}
KeyUpdateOne is the builder for updating a single Key entity.
func (*KeyUpdateOne) AddSecretIDs ¶
func (_u *KeyUpdateOne) AddSecretIDs(ids ...uuid.UUID) *KeyUpdateOne
AddSecretIDs adds the "secrets" edge to the Secret entity by IDs.
func (*KeyUpdateOne) AddSecrets ¶
func (_u *KeyUpdateOne) AddSecrets(v ...*Secret) *KeyUpdateOne
AddSecrets adds the "secrets" edges to the Secret entity.
func (*KeyUpdateOne) ClearLastUsedAt ¶
func (_u *KeyUpdateOne) ClearLastUsedAt() *KeyUpdateOne
ClearLastUsedAt clears the value of the "last_used_at" field.
func (*KeyUpdateOne) ClearSecrets ¶
func (_u *KeyUpdateOne) ClearSecrets() *KeyUpdateOne
ClearSecrets clears all "secrets" edges to the Secret entity.
func (*KeyUpdateOne) Exec ¶
func (_u *KeyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*KeyUpdateOne) ExecX ¶
func (_u *KeyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KeyUpdateOne) Mutation ¶
func (_u *KeyUpdateOne) Mutation() *KeyMutation
Mutation returns the KeyMutation object of the builder.
func (*KeyUpdateOne) RemoveSecretIDs ¶
func (_u *KeyUpdateOne) RemoveSecretIDs(ids ...uuid.UUID) *KeyUpdateOne
RemoveSecretIDs removes the "secrets" edge to Secret entities by IDs.
func (*KeyUpdateOne) RemoveSecrets ¶
func (_u *KeyUpdateOne) RemoveSecrets(v ...*Secret) *KeyUpdateOne
RemoveSecrets removes "secrets" edges to Secret entities.
func (*KeyUpdateOne) Save ¶
func (_u *KeyUpdateOne) Save(ctx context.Context) (*Key, error)
Save executes the query and returns the updated Key entity.
func (*KeyUpdateOne) SaveX ¶
func (_u *KeyUpdateOne) SaveX(ctx context.Context) *Key
SaveX is like Save, but panics if an error occurs.
func (*KeyUpdateOne) Select ¶
func (_u *KeyUpdateOne) Select(field string, fields ...string) *KeyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*KeyUpdateOne) SetLastUsedAt ¶
func (_u *KeyUpdateOne) SetLastUsedAt(v time.Time) *KeyUpdateOne
SetLastUsedAt sets the "last_used_at" field.
func (*KeyUpdateOne) SetName ¶
func (_u *KeyUpdateOne) SetName(v string) *KeyUpdateOne
SetName sets the "name" field.
func (*KeyUpdateOne) SetNillableLastUsedAt ¶
func (_u *KeyUpdateOne) SetNillableLastUsedAt(v *time.Time) *KeyUpdateOne
SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.
func (*KeyUpdateOne) SetNillableName ¶
func (_u *KeyUpdateOne) SetNillableName(v *string) *KeyUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*KeyUpdateOne) SetNillableRemoteKeyID ¶
func (_u *KeyUpdateOne) SetNillableRemoteKeyID(v *string) *KeyUpdateOne
SetNillableRemoteKeyID sets the "remote_key_id" field if the given value is not nil.
func (*KeyUpdateOne) SetNillableType ¶
func (_u *KeyUpdateOne) SetNillableType(v *key.Type) *KeyUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*KeyUpdateOne) SetRemoteKeyID ¶
func (_u *KeyUpdateOne) SetRemoteKeyID(v string) *KeyUpdateOne
SetRemoteKeyID sets the "remote_key_id" field.
func (*KeyUpdateOne) SetType ¶
func (_u *KeyUpdateOne) SetType(v key.Type) *KeyUpdateOne
SetType sets the "type" field.
func (*KeyUpdateOne) Where ¶
func (_u *KeyUpdateOne) Where(ps ...predicate.Key) *KeyUpdateOne
Where appends a list predicates to the KeyUpdate builder.
type Knowledge ¶
type Knowledge struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// Category holds the value of the "category" field.
Category knowledge.Category `json:"category,omitempty"`
// Content holds the value of the "content" field.
Content string `json:"content,omitempty"`
// Tags holds the value of the "tags" field.
Tags []string `json:"tags,omitempty"`
// Source holds the value of the "source" field.
Source string `json:"source,omitempty"`
// UseCount holds the value of the "use_count" field.
UseCount int `json:"use_count,omitempty"`
// RelevanceScore holds the value of the "relevance_score" field.
RelevanceScore float64 `json:"relevance_score,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
Knowledge is the model entity for the Knowledge schema.
func (*Knowledge) Unwrap ¶
Unwrap unwraps the Knowledge 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 (*Knowledge) Update ¶
func (_m *Knowledge) Update() *KnowledgeUpdateOne
Update returns a builder for updating this Knowledge. Note that you need to call Knowledge.Unwrap() before calling this method if this Knowledge was returned from a transaction, and the transaction was committed or rolled back.
type KnowledgeClient ¶
type KnowledgeClient struct {
// contains filtered or unexported fields
}
KnowledgeClient is a client for the Knowledge schema.
func NewKnowledgeClient ¶
func NewKnowledgeClient(c config) *KnowledgeClient
NewKnowledgeClient returns a client for the Knowledge from the given config.
func (*KnowledgeClient) Create ¶
func (c *KnowledgeClient) Create() *KnowledgeCreate
Create returns a builder for creating a Knowledge entity.
func (*KnowledgeClient) CreateBulk ¶
func (c *KnowledgeClient) CreateBulk(builders ...*KnowledgeCreate) *KnowledgeCreateBulk
CreateBulk returns a builder for creating a bulk of Knowledge entities.
func (*KnowledgeClient) Delete ¶
func (c *KnowledgeClient) Delete() *KnowledgeDelete
Delete returns a delete builder for Knowledge.
func (*KnowledgeClient) DeleteOne ¶
func (c *KnowledgeClient) DeleteOne(_m *Knowledge) *KnowledgeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*KnowledgeClient) DeleteOneID ¶
func (c *KnowledgeClient) DeleteOneID(id uuid.UUID) *KnowledgeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*KnowledgeClient) Hooks ¶
func (c *KnowledgeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*KnowledgeClient) Intercept ¶
func (c *KnowledgeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `knowledge.Intercept(f(g(h())))`.
func (*KnowledgeClient) Interceptors ¶
func (c *KnowledgeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*KnowledgeClient) MapCreateBulk ¶
func (c *KnowledgeClient) MapCreateBulk(slice any, setFunc func(*KnowledgeCreate, int)) *KnowledgeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*KnowledgeClient) Query ¶
func (c *KnowledgeClient) Query() *KnowledgeQuery
Query returns a query builder for Knowledge.
func (*KnowledgeClient) Update ¶
func (c *KnowledgeClient) Update() *KnowledgeUpdate
Update returns an update builder for Knowledge.
func (*KnowledgeClient) UpdateOne ¶
func (c *KnowledgeClient) UpdateOne(_m *Knowledge) *KnowledgeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*KnowledgeClient) UpdateOneID ¶
func (c *KnowledgeClient) UpdateOneID(id uuid.UUID) *KnowledgeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*KnowledgeClient) Use ¶
func (c *KnowledgeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `knowledge.Hooks(f(g(h())))`.
type KnowledgeCreate ¶
type KnowledgeCreate struct {
// contains filtered or unexported fields
}
KnowledgeCreate is the builder for creating a Knowledge entity.
func (*KnowledgeCreate) Exec ¶
func (_c *KnowledgeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*KnowledgeCreate) ExecX ¶
func (_c *KnowledgeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KnowledgeCreate) Mutation ¶
func (_c *KnowledgeCreate) Mutation() *KnowledgeMutation
Mutation returns the KnowledgeMutation object of the builder.
func (*KnowledgeCreate) Save ¶
func (_c *KnowledgeCreate) Save(ctx context.Context) (*Knowledge, error)
Save creates the Knowledge in the database.
func (*KnowledgeCreate) SaveX ¶
func (_c *KnowledgeCreate) SaveX(ctx context.Context) *Knowledge
SaveX calls Save and panics if Save returns an error.
func (*KnowledgeCreate) SetCategory ¶
func (_c *KnowledgeCreate) SetCategory(v knowledge.Category) *KnowledgeCreate
SetCategory sets the "category" field.
func (*KnowledgeCreate) SetContent ¶
func (_c *KnowledgeCreate) SetContent(v string) *KnowledgeCreate
SetContent sets the "content" field.
func (*KnowledgeCreate) SetCreatedAt ¶
func (_c *KnowledgeCreate) SetCreatedAt(v time.Time) *KnowledgeCreate
SetCreatedAt sets the "created_at" field.
func (*KnowledgeCreate) SetID ¶
func (_c *KnowledgeCreate) SetID(v uuid.UUID) *KnowledgeCreate
SetID sets the "id" field.
func (*KnowledgeCreate) SetKey ¶
func (_c *KnowledgeCreate) SetKey(v string) *KnowledgeCreate
SetKey sets the "key" field.
func (*KnowledgeCreate) SetNillableCreatedAt ¶
func (_c *KnowledgeCreate) SetNillableCreatedAt(v *time.Time) *KnowledgeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*KnowledgeCreate) SetNillableID ¶
func (_c *KnowledgeCreate) SetNillableID(v *uuid.UUID) *KnowledgeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*KnowledgeCreate) SetNillableRelevanceScore ¶
func (_c *KnowledgeCreate) SetNillableRelevanceScore(v *float64) *KnowledgeCreate
SetNillableRelevanceScore sets the "relevance_score" field if the given value is not nil.
func (*KnowledgeCreate) SetNillableSource ¶
func (_c *KnowledgeCreate) SetNillableSource(v *string) *KnowledgeCreate
SetNillableSource sets the "source" field if the given value is not nil.
func (*KnowledgeCreate) SetNillableUpdatedAt ¶
func (_c *KnowledgeCreate) SetNillableUpdatedAt(v *time.Time) *KnowledgeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*KnowledgeCreate) SetNillableUseCount ¶
func (_c *KnowledgeCreate) SetNillableUseCount(v *int) *KnowledgeCreate
SetNillableUseCount sets the "use_count" field if the given value is not nil.
func (*KnowledgeCreate) SetRelevanceScore ¶
func (_c *KnowledgeCreate) SetRelevanceScore(v float64) *KnowledgeCreate
SetRelevanceScore sets the "relevance_score" field.
func (*KnowledgeCreate) SetSource ¶
func (_c *KnowledgeCreate) SetSource(v string) *KnowledgeCreate
SetSource sets the "source" field.
func (*KnowledgeCreate) SetTags ¶
func (_c *KnowledgeCreate) SetTags(v []string) *KnowledgeCreate
SetTags sets the "tags" field.
func (*KnowledgeCreate) SetUpdatedAt ¶
func (_c *KnowledgeCreate) SetUpdatedAt(v time.Time) *KnowledgeCreate
SetUpdatedAt sets the "updated_at" field.
func (*KnowledgeCreate) SetUseCount ¶
func (_c *KnowledgeCreate) SetUseCount(v int) *KnowledgeCreate
SetUseCount sets the "use_count" field.
type KnowledgeCreateBulk ¶
type KnowledgeCreateBulk struct {
// contains filtered or unexported fields
}
KnowledgeCreateBulk is the builder for creating many Knowledge entities in bulk.
func (*KnowledgeCreateBulk) Exec ¶
func (_c *KnowledgeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*KnowledgeCreateBulk) ExecX ¶
func (_c *KnowledgeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type KnowledgeDelete ¶
type KnowledgeDelete struct {
// contains filtered or unexported fields
}
KnowledgeDelete is the builder for deleting a Knowledge entity.
func (*KnowledgeDelete) Exec ¶
func (_d *KnowledgeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*KnowledgeDelete) ExecX ¶
func (_d *KnowledgeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*KnowledgeDelete) Where ¶
func (_d *KnowledgeDelete) Where(ps ...predicate.Knowledge) *KnowledgeDelete
Where appends a list predicates to the KnowledgeDelete builder.
type KnowledgeDeleteOne ¶
type KnowledgeDeleteOne struct {
// contains filtered or unexported fields
}
KnowledgeDeleteOne is the builder for deleting a single Knowledge entity.
func (*KnowledgeDeleteOne) Exec ¶
func (_d *KnowledgeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*KnowledgeDeleteOne) ExecX ¶
func (_d *KnowledgeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KnowledgeDeleteOne) Where ¶
func (_d *KnowledgeDeleteOne) Where(ps ...predicate.Knowledge) *KnowledgeDeleteOne
Where appends a list predicates to the KnowledgeDelete builder.
type KnowledgeGroupBy ¶
type KnowledgeGroupBy struct {
// contains filtered or unexported fields
}
KnowledgeGroupBy is the group-by builder for Knowledge entities.
func (*KnowledgeGroupBy) Aggregate ¶
func (_g *KnowledgeGroupBy) Aggregate(fns ...AggregateFunc) *KnowledgeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*KnowledgeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KnowledgeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*KnowledgeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KnowledgeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KnowledgeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KnowledgeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*KnowledgeGroupBy) Scan ¶
func (_g *KnowledgeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*KnowledgeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KnowledgeMutation ¶
type KnowledgeMutation struct {
// contains filtered or unexported fields
}
KnowledgeMutation represents an operation that mutates the Knowledge nodes in the graph.
func (*KnowledgeMutation) AddField ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) AddRelevanceScore ¶
func (m *KnowledgeMutation) AddRelevanceScore(f float64)
AddRelevanceScore adds f to the "relevance_score" field.
func (*KnowledgeMutation) AddUseCount ¶
func (m *KnowledgeMutation) AddUseCount(i int)
AddUseCount adds i to the "use_count" field.
func (*KnowledgeMutation) AddedEdges ¶
func (m *KnowledgeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*KnowledgeMutation) AddedField ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) AddedFields ¶
func (m *KnowledgeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*KnowledgeMutation) AddedIDs ¶
func (m *KnowledgeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*KnowledgeMutation) AddedRelevanceScore ¶
func (m *KnowledgeMutation) AddedRelevanceScore() (r float64, exists bool)
AddedRelevanceScore returns the value that was added to the "relevance_score" field in this mutation.
func (*KnowledgeMutation) AddedUseCount ¶
func (m *KnowledgeMutation) AddedUseCount() (r int, exists bool)
AddedUseCount returns the value that was added to the "use_count" field in this mutation.
func (*KnowledgeMutation) AppendTags ¶
func (m *KnowledgeMutation) AppendTags(s []string)
AppendTags adds s to the "tags" field.
func (*KnowledgeMutation) AppendedTags ¶
func (m *KnowledgeMutation) AppendedTags() ([]string, bool)
AppendedTags returns the list of values that were appended to the "tags" field in this mutation.
func (*KnowledgeMutation) Category ¶
func (m *KnowledgeMutation) Category() (r knowledge.Category, exists bool)
Category returns the value of the "category" field in the mutation.
func (*KnowledgeMutation) ClearEdge ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) ClearField ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) ClearSource ¶
func (m *KnowledgeMutation) ClearSource()
ClearSource clears the value of the "source" field.
func (*KnowledgeMutation) ClearTags ¶
func (m *KnowledgeMutation) ClearTags()
ClearTags clears the value of the "tags" field.
func (*KnowledgeMutation) ClearedEdges ¶
func (m *KnowledgeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*KnowledgeMutation) ClearedFields ¶
func (m *KnowledgeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (KnowledgeMutation) Client ¶
func (m KnowledgeMutation) 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 (*KnowledgeMutation) Content ¶
func (m *KnowledgeMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*KnowledgeMutation) CreatedAt ¶
func (m *KnowledgeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*KnowledgeMutation) EdgeCleared ¶
func (m *KnowledgeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*KnowledgeMutation) Field ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) FieldCleared ¶
func (m *KnowledgeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*KnowledgeMutation) Fields ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) ID ¶
func (m *KnowledgeMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*KnowledgeMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*KnowledgeMutation) Key ¶
func (m *KnowledgeMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*KnowledgeMutation) OldCategory ¶
OldCategory returns the old "category" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) OldContent ¶
func (m *KnowledgeMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) 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 (*KnowledgeMutation) OldKey ¶
func (m *KnowledgeMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) OldRelevanceScore ¶
func (m *KnowledgeMutation) OldRelevanceScore(ctx context.Context) (v float64, err error)
OldRelevanceScore returns the old "relevance_score" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) OldSource ¶
func (m *KnowledgeMutation) OldSource(ctx context.Context) (v string, err error)
OldSource returns the old "source" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) OldTags ¶
func (m *KnowledgeMutation) OldTags(ctx context.Context) (v []string, err error)
OldTags returns the old "tags" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) OldUseCount ¶
func (m *KnowledgeMutation) OldUseCount(ctx context.Context) (v int, err error)
OldUseCount returns the old "use_count" field's value of the Knowledge entity. If the Knowledge 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 (*KnowledgeMutation) RelevanceScore ¶
func (m *KnowledgeMutation) RelevanceScore() (r float64, exists bool)
RelevanceScore returns the value of the "relevance_score" field in the mutation.
func (*KnowledgeMutation) RemovedEdges ¶
func (m *KnowledgeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*KnowledgeMutation) RemovedIDs ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) ResetCategory ¶
func (m *KnowledgeMutation) ResetCategory()
ResetCategory resets all changes to the "category" field.
func (*KnowledgeMutation) ResetContent ¶
func (m *KnowledgeMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*KnowledgeMutation) ResetCreatedAt ¶
func (m *KnowledgeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*KnowledgeMutation) ResetEdge ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) ResetField ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) ResetKey ¶
func (m *KnowledgeMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*KnowledgeMutation) ResetRelevanceScore ¶
func (m *KnowledgeMutation) ResetRelevanceScore()
ResetRelevanceScore resets all changes to the "relevance_score" field.
func (*KnowledgeMutation) ResetSource ¶
func (m *KnowledgeMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*KnowledgeMutation) ResetTags ¶
func (m *KnowledgeMutation) ResetTags()
ResetTags resets all changes to the "tags" field.
func (*KnowledgeMutation) ResetUpdatedAt ¶
func (m *KnowledgeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*KnowledgeMutation) ResetUseCount ¶
func (m *KnowledgeMutation) ResetUseCount()
ResetUseCount resets all changes to the "use_count" field.
func (*KnowledgeMutation) SetCategory ¶
func (m *KnowledgeMutation) SetCategory(k knowledge.Category)
SetCategory sets the "category" field.
func (*KnowledgeMutation) SetContent ¶
func (m *KnowledgeMutation) SetContent(s string)
SetContent sets the "content" field.
func (*KnowledgeMutation) SetCreatedAt ¶
func (m *KnowledgeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*KnowledgeMutation) SetField ¶
func (m *KnowledgeMutation) 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 (*KnowledgeMutation) SetID ¶
func (m *KnowledgeMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Knowledge entities.
func (*KnowledgeMutation) SetKey ¶
func (m *KnowledgeMutation) SetKey(s string)
SetKey sets the "key" field.
func (*KnowledgeMutation) SetOp ¶
func (m *KnowledgeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*KnowledgeMutation) SetRelevanceScore ¶
func (m *KnowledgeMutation) SetRelevanceScore(f float64)
SetRelevanceScore sets the "relevance_score" field.
func (*KnowledgeMutation) SetSource ¶
func (m *KnowledgeMutation) SetSource(s string)
SetSource sets the "source" field.
func (*KnowledgeMutation) SetTags ¶
func (m *KnowledgeMutation) SetTags(s []string)
SetTags sets the "tags" field.
func (*KnowledgeMutation) SetUpdatedAt ¶
func (m *KnowledgeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*KnowledgeMutation) SetUseCount ¶
func (m *KnowledgeMutation) SetUseCount(i int)
SetUseCount sets the "use_count" field.
func (*KnowledgeMutation) Source ¶
func (m *KnowledgeMutation) Source() (r string, exists bool)
Source returns the value of the "source" field in the mutation.
func (*KnowledgeMutation) SourceCleared ¶
func (m *KnowledgeMutation) SourceCleared() bool
SourceCleared returns if the "source" field was cleared in this mutation.
func (*KnowledgeMutation) Tags ¶
func (m *KnowledgeMutation) Tags() (r []string, exists bool)
Tags returns the value of the "tags" field in the mutation.
func (*KnowledgeMutation) TagsCleared ¶
func (m *KnowledgeMutation) TagsCleared() bool
TagsCleared returns if the "tags" field was cleared in this mutation.
func (KnowledgeMutation) Tx ¶
func (m KnowledgeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*KnowledgeMutation) Type ¶
func (m *KnowledgeMutation) Type() string
Type returns the node type of this mutation (Knowledge).
func (*KnowledgeMutation) UpdatedAt ¶
func (m *KnowledgeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*KnowledgeMutation) UseCount ¶
func (m *KnowledgeMutation) UseCount() (r int, exists bool)
UseCount returns the value of the "use_count" field in the mutation.
func (*KnowledgeMutation) Where ¶
func (m *KnowledgeMutation) Where(ps ...predicate.Knowledge)
Where appends a list predicates to the KnowledgeMutation builder.
func (*KnowledgeMutation) WhereP ¶
func (m *KnowledgeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the KnowledgeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type KnowledgeQuery ¶
type KnowledgeQuery struct {
// contains filtered or unexported fields
}
KnowledgeQuery is the builder for querying Knowledge entities.
func (*KnowledgeQuery) Aggregate ¶
func (_q *KnowledgeQuery) Aggregate(fns ...AggregateFunc) *KnowledgeSelect
Aggregate returns a KnowledgeSelect configured with the given aggregations.
func (*KnowledgeQuery) All ¶
func (_q *KnowledgeQuery) All(ctx context.Context) ([]*Knowledge, error)
All executes the query and returns a list of Knowledges.
func (*KnowledgeQuery) AllX ¶
func (_q *KnowledgeQuery) AllX(ctx context.Context) []*Knowledge
AllX is like All, but panics if an error occurs.
func (*KnowledgeQuery) Clone ¶
func (_q *KnowledgeQuery) Clone() *KnowledgeQuery
Clone returns a duplicate of the KnowledgeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*KnowledgeQuery) Count ¶
func (_q *KnowledgeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*KnowledgeQuery) CountX ¶
func (_q *KnowledgeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*KnowledgeQuery) Exist ¶
func (_q *KnowledgeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*KnowledgeQuery) ExistX ¶
func (_q *KnowledgeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*KnowledgeQuery) First ¶
func (_q *KnowledgeQuery) First(ctx context.Context) (*Knowledge, error)
First returns the first Knowledge entity from the query. Returns a *NotFoundError when no Knowledge was found.
func (*KnowledgeQuery) FirstID ¶
FirstID returns the first Knowledge ID from the query. Returns a *NotFoundError when no Knowledge ID was found.
func (*KnowledgeQuery) FirstIDX ¶
func (_q *KnowledgeQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*KnowledgeQuery) FirstX ¶
func (_q *KnowledgeQuery) FirstX(ctx context.Context) *Knowledge
FirstX is like First, but panics if an error occurs.
func (*KnowledgeQuery) GroupBy ¶
func (_q *KnowledgeQuery) GroupBy(field string, fields ...string) *KnowledgeGroupBy
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 {
Key string `json:"key,omitempty"`
Count int `json:"count,omitempty"`
}
client.Knowledge.Query().
GroupBy(knowledge.FieldKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*KnowledgeQuery) IDsX ¶
func (_q *KnowledgeQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*KnowledgeQuery) Limit ¶
func (_q *KnowledgeQuery) Limit(limit int) *KnowledgeQuery
Limit the number of records to be returned by this query.
func (*KnowledgeQuery) Offset ¶
func (_q *KnowledgeQuery) Offset(offset int) *KnowledgeQuery
Offset to start from.
func (*KnowledgeQuery) Only ¶
func (_q *KnowledgeQuery) Only(ctx context.Context) (*Knowledge, error)
Only returns a single Knowledge entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Knowledge entity is found. Returns a *NotFoundError when no Knowledge entities are found.
func (*KnowledgeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Knowledge ID in the query. Returns a *NotSingularError when more than one Knowledge ID is found. Returns a *NotFoundError when no entities are found.
func (*KnowledgeQuery) OnlyIDX ¶
func (_q *KnowledgeQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*KnowledgeQuery) OnlyX ¶
func (_q *KnowledgeQuery) OnlyX(ctx context.Context) *Knowledge
OnlyX is like Only, but panics if an error occurs.
func (*KnowledgeQuery) Order ¶
func (_q *KnowledgeQuery) Order(o ...knowledge.OrderOption) *KnowledgeQuery
Order specifies how the records should be ordered.
func (*KnowledgeQuery) Select ¶
func (_q *KnowledgeQuery) Select(fields ...string) *KnowledgeSelect
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 {
Key string `json:"key,omitempty"`
}
client.Knowledge.Query().
Select(knowledge.FieldKey).
Scan(ctx, &v)
func (*KnowledgeQuery) Unique ¶
func (_q *KnowledgeQuery) Unique(unique bool) *KnowledgeQuery
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 (*KnowledgeQuery) Where ¶
func (_q *KnowledgeQuery) Where(ps ...predicate.Knowledge) *KnowledgeQuery
Where adds a new predicate for the KnowledgeQuery builder.
type KnowledgeSelect ¶
type KnowledgeSelect struct {
*KnowledgeQuery
// contains filtered or unexported fields
}
KnowledgeSelect is the builder for selecting fields of Knowledge entities.
func (*KnowledgeSelect) Aggregate ¶
func (_s *KnowledgeSelect) Aggregate(fns ...AggregateFunc) *KnowledgeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*KnowledgeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*KnowledgeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*KnowledgeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*KnowledgeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*KnowledgeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*KnowledgeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*KnowledgeSelect) Scan ¶
func (_s *KnowledgeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*KnowledgeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type KnowledgeUpdate ¶
type KnowledgeUpdate struct {
// contains filtered or unexported fields
}
KnowledgeUpdate is the builder for updating Knowledge entities.
func (*KnowledgeUpdate) AddRelevanceScore ¶
func (_u *KnowledgeUpdate) AddRelevanceScore(v float64) *KnowledgeUpdate
AddRelevanceScore adds value to the "relevance_score" field.
func (*KnowledgeUpdate) AddUseCount ¶
func (_u *KnowledgeUpdate) AddUseCount(v int) *KnowledgeUpdate
AddUseCount adds value to the "use_count" field.
func (*KnowledgeUpdate) AppendTags ¶
func (_u *KnowledgeUpdate) AppendTags(v []string) *KnowledgeUpdate
AppendTags appends value to the "tags" field.
func (*KnowledgeUpdate) ClearSource ¶
func (_u *KnowledgeUpdate) ClearSource() *KnowledgeUpdate
ClearSource clears the value of the "source" field.
func (*KnowledgeUpdate) ClearTags ¶
func (_u *KnowledgeUpdate) ClearTags() *KnowledgeUpdate
ClearTags clears the value of the "tags" field.
func (*KnowledgeUpdate) Exec ¶
func (_u *KnowledgeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*KnowledgeUpdate) ExecX ¶
func (_u *KnowledgeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KnowledgeUpdate) Mutation ¶
func (_u *KnowledgeUpdate) Mutation() *KnowledgeMutation
Mutation returns the KnowledgeMutation object of the builder.
func (*KnowledgeUpdate) Save ¶
func (_u *KnowledgeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*KnowledgeUpdate) SaveX ¶
func (_u *KnowledgeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*KnowledgeUpdate) SetCategory ¶
func (_u *KnowledgeUpdate) SetCategory(v knowledge.Category) *KnowledgeUpdate
SetCategory sets the "category" field.
func (*KnowledgeUpdate) SetContent ¶
func (_u *KnowledgeUpdate) SetContent(v string) *KnowledgeUpdate
SetContent sets the "content" field.
func (*KnowledgeUpdate) SetKey ¶
func (_u *KnowledgeUpdate) SetKey(v string) *KnowledgeUpdate
SetKey sets the "key" field.
func (*KnowledgeUpdate) SetNillableCategory ¶
func (_u *KnowledgeUpdate) SetNillableCategory(v *knowledge.Category) *KnowledgeUpdate
SetNillableCategory sets the "category" field if the given value is not nil.
func (*KnowledgeUpdate) SetNillableContent ¶
func (_u *KnowledgeUpdate) SetNillableContent(v *string) *KnowledgeUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*KnowledgeUpdate) SetNillableKey ¶
func (_u *KnowledgeUpdate) SetNillableKey(v *string) *KnowledgeUpdate
SetNillableKey sets the "key" field if the given value is not nil.
func (*KnowledgeUpdate) SetNillableRelevanceScore ¶
func (_u *KnowledgeUpdate) SetNillableRelevanceScore(v *float64) *KnowledgeUpdate
SetNillableRelevanceScore sets the "relevance_score" field if the given value is not nil.
func (*KnowledgeUpdate) SetNillableSource ¶
func (_u *KnowledgeUpdate) SetNillableSource(v *string) *KnowledgeUpdate
SetNillableSource sets the "source" field if the given value is not nil.
func (*KnowledgeUpdate) SetNillableUseCount ¶
func (_u *KnowledgeUpdate) SetNillableUseCount(v *int) *KnowledgeUpdate
SetNillableUseCount sets the "use_count" field if the given value is not nil.
func (*KnowledgeUpdate) SetRelevanceScore ¶
func (_u *KnowledgeUpdate) SetRelevanceScore(v float64) *KnowledgeUpdate
SetRelevanceScore sets the "relevance_score" field.
func (*KnowledgeUpdate) SetSource ¶
func (_u *KnowledgeUpdate) SetSource(v string) *KnowledgeUpdate
SetSource sets the "source" field.
func (*KnowledgeUpdate) SetTags ¶
func (_u *KnowledgeUpdate) SetTags(v []string) *KnowledgeUpdate
SetTags sets the "tags" field.
func (*KnowledgeUpdate) SetUpdatedAt ¶
func (_u *KnowledgeUpdate) SetUpdatedAt(v time.Time) *KnowledgeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*KnowledgeUpdate) SetUseCount ¶
func (_u *KnowledgeUpdate) SetUseCount(v int) *KnowledgeUpdate
SetUseCount sets the "use_count" field.
func (*KnowledgeUpdate) Where ¶
func (_u *KnowledgeUpdate) Where(ps ...predicate.Knowledge) *KnowledgeUpdate
Where appends a list predicates to the KnowledgeUpdate builder.
type KnowledgeUpdateOne ¶
type KnowledgeUpdateOne struct {
// contains filtered or unexported fields
}
KnowledgeUpdateOne is the builder for updating a single Knowledge entity.
func (*KnowledgeUpdateOne) AddRelevanceScore ¶
func (_u *KnowledgeUpdateOne) AddRelevanceScore(v float64) *KnowledgeUpdateOne
AddRelevanceScore adds value to the "relevance_score" field.
func (*KnowledgeUpdateOne) AddUseCount ¶
func (_u *KnowledgeUpdateOne) AddUseCount(v int) *KnowledgeUpdateOne
AddUseCount adds value to the "use_count" field.
func (*KnowledgeUpdateOne) AppendTags ¶
func (_u *KnowledgeUpdateOne) AppendTags(v []string) *KnowledgeUpdateOne
AppendTags appends value to the "tags" field.
func (*KnowledgeUpdateOne) ClearSource ¶
func (_u *KnowledgeUpdateOne) ClearSource() *KnowledgeUpdateOne
ClearSource clears the value of the "source" field.
func (*KnowledgeUpdateOne) ClearTags ¶
func (_u *KnowledgeUpdateOne) ClearTags() *KnowledgeUpdateOne
ClearTags clears the value of the "tags" field.
func (*KnowledgeUpdateOne) Exec ¶
func (_u *KnowledgeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*KnowledgeUpdateOne) ExecX ¶
func (_u *KnowledgeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*KnowledgeUpdateOne) Mutation ¶
func (_u *KnowledgeUpdateOne) Mutation() *KnowledgeMutation
Mutation returns the KnowledgeMutation object of the builder.
func (*KnowledgeUpdateOne) Save ¶
func (_u *KnowledgeUpdateOne) Save(ctx context.Context) (*Knowledge, error)
Save executes the query and returns the updated Knowledge entity.
func (*KnowledgeUpdateOne) SaveX ¶
func (_u *KnowledgeUpdateOne) SaveX(ctx context.Context) *Knowledge
SaveX is like Save, but panics if an error occurs.
func (*KnowledgeUpdateOne) Select ¶
func (_u *KnowledgeUpdateOne) Select(field string, fields ...string) *KnowledgeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*KnowledgeUpdateOne) SetCategory ¶
func (_u *KnowledgeUpdateOne) SetCategory(v knowledge.Category) *KnowledgeUpdateOne
SetCategory sets the "category" field.
func (*KnowledgeUpdateOne) SetContent ¶
func (_u *KnowledgeUpdateOne) SetContent(v string) *KnowledgeUpdateOne
SetContent sets the "content" field.
func (*KnowledgeUpdateOne) SetKey ¶
func (_u *KnowledgeUpdateOne) SetKey(v string) *KnowledgeUpdateOne
SetKey sets the "key" field.
func (*KnowledgeUpdateOne) SetNillableCategory ¶
func (_u *KnowledgeUpdateOne) SetNillableCategory(v *knowledge.Category) *KnowledgeUpdateOne
SetNillableCategory sets the "category" field if the given value is not nil.
func (*KnowledgeUpdateOne) SetNillableContent ¶
func (_u *KnowledgeUpdateOne) SetNillableContent(v *string) *KnowledgeUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*KnowledgeUpdateOne) SetNillableKey ¶
func (_u *KnowledgeUpdateOne) SetNillableKey(v *string) *KnowledgeUpdateOne
SetNillableKey sets the "key" field if the given value is not nil.
func (*KnowledgeUpdateOne) SetNillableRelevanceScore ¶
func (_u *KnowledgeUpdateOne) SetNillableRelevanceScore(v *float64) *KnowledgeUpdateOne
SetNillableRelevanceScore sets the "relevance_score" field if the given value is not nil.
func (*KnowledgeUpdateOne) SetNillableSource ¶
func (_u *KnowledgeUpdateOne) SetNillableSource(v *string) *KnowledgeUpdateOne
SetNillableSource sets the "source" field if the given value is not nil.
func (*KnowledgeUpdateOne) SetNillableUseCount ¶
func (_u *KnowledgeUpdateOne) SetNillableUseCount(v *int) *KnowledgeUpdateOne
SetNillableUseCount sets the "use_count" field if the given value is not nil.
func (*KnowledgeUpdateOne) SetRelevanceScore ¶
func (_u *KnowledgeUpdateOne) SetRelevanceScore(v float64) *KnowledgeUpdateOne
SetRelevanceScore sets the "relevance_score" field.
func (*KnowledgeUpdateOne) SetSource ¶
func (_u *KnowledgeUpdateOne) SetSource(v string) *KnowledgeUpdateOne
SetSource sets the "source" field.
func (*KnowledgeUpdateOne) SetTags ¶
func (_u *KnowledgeUpdateOne) SetTags(v []string) *KnowledgeUpdateOne
SetTags sets the "tags" field.
func (*KnowledgeUpdateOne) SetUpdatedAt ¶
func (_u *KnowledgeUpdateOne) SetUpdatedAt(v time.Time) *KnowledgeUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*KnowledgeUpdateOne) SetUseCount ¶
func (_u *KnowledgeUpdateOne) SetUseCount(v int) *KnowledgeUpdateOne
SetUseCount sets the "use_count" field.
func (*KnowledgeUpdateOne) Where ¶
func (_u *KnowledgeUpdateOne) Where(ps ...predicate.Knowledge) *KnowledgeUpdateOne
Where appends a list predicates to the KnowledgeUpdate builder.
type Learning ¶
type Learning struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Trigger holds the value of the "trigger" field.
Trigger string `json:"trigger,omitempty"`
// ErrorPattern holds the value of the "error_pattern" field.
ErrorPattern string `json:"error_pattern,omitempty"`
// Diagnosis holds the value of the "diagnosis" field.
Diagnosis string `json:"diagnosis,omitempty"`
// Fix holds the value of the "fix" field.
Fix string `json:"fix,omitempty"`
// Category holds the value of the "category" field.
Category learning.Category `json:"category,omitempty"`
// Tags holds the value of the "tags" field.
Tags []string `json:"tags,omitempty"`
// OccurrenceCount holds the value of the "occurrence_count" field.
OccurrenceCount int `json:"occurrence_count,omitempty"`
// SuccessCount holds the value of the "success_count" field.
SuccessCount int `json:"success_count,omitempty"`
// Confidence holds the value of the "confidence" field.
Confidence float64 `json:"confidence,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
Learning is the model entity for the Learning schema.
func (*Learning) Unwrap ¶
Unwrap unwraps the Learning 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 (*Learning) Update ¶
func (_m *Learning) Update() *LearningUpdateOne
Update returns a builder for updating this Learning. Note that you need to call Learning.Unwrap() before calling this method if this Learning was returned from a transaction, and the transaction was committed or rolled back.
type LearningClient ¶
type LearningClient struct {
// contains filtered or unexported fields
}
LearningClient is a client for the Learning schema.
func NewLearningClient ¶
func NewLearningClient(c config) *LearningClient
NewLearningClient returns a client for the Learning from the given config.
func (*LearningClient) Create ¶
func (c *LearningClient) Create() *LearningCreate
Create returns a builder for creating a Learning entity.
func (*LearningClient) CreateBulk ¶
func (c *LearningClient) CreateBulk(builders ...*LearningCreate) *LearningCreateBulk
CreateBulk returns a builder for creating a bulk of Learning entities.
func (*LearningClient) Delete ¶
func (c *LearningClient) Delete() *LearningDelete
Delete returns a delete builder for Learning.
func (*LearningClient) DeleteOne ¶
func (c *LearningClient) DeleteOne(_m *Learning) *LearningDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LearningClient) DeleteOneID ¶
func (c *LearningClient) DeleteOneID(id uuid.UUID) *LearningDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LearningClient) Hooks ¶
func (c *LearningClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LearningClient) Intercept ¶
func (c *LearningClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `learning.Intercept(f(g(h())))`.
func (*LearningClient) Interceptors ¶
func (c *LearningClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LearningClient) MapCreateBulk ¶
func (c *LearningClient) MapCreateBulk(slice any, setFunc func(*LearningCreate, int)) *LearningCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*LearningClient) Query ¶
func (c *LearningClient) Query() *LearningQuery
Query returns a query builder for Learning.
func (*LearningClient) Update ¶
func (c *LearningClient) Update() *LearningUpdate
Update returns an update builder for Learning.
func (*LearningClient) UpdateOne ¶
func (c *LearningClient) UpdateOne(_m *Learning) *LearningUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LearningClient) UpdateOneID ¶
func (c *LearningClient) UpdateOneID(id uuid.UUID) *LearningUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LearningClient) Use ¶
func (c *LearningClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `learning.Hooks(f(g(h())))`.
type LearningCreate ¶
type LearningCreate struct {
// contains filtered or unexported fields
}
LearningCreate is the builder for creating a Learning entity.
func (*LearningCreate) Exec ¶
func (_c *LearningCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LearningCreate) ExecX ¶
func (_c *LearningCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LearningCreate) Mutation ¶
func (_c *LearningCreate) Mutation() *LearningMutation
Mutation returns the LearningMutation object of the builder.
func (*LearningCreate) Save ¶
func (_c *LearningCreate) Save(ctx context.Context) (*Learning, error)
Save creates the Learning in the database.
func (*LearningCreate) SaveX ¶
func (_c *LearningCreate) SaveX(ctx context.Context) *Learning
SaveX calls Save and panics if Save returns an error.
func (*LearningCreate) SetCategory ¶
func (_c *LearningCreate) SetCategory(v learning.Category) *LearningCreate
SetCategory sets the "category" field.
func (*LearningCreate) SetConfidence ¶
func (_c *LearningCreate) SetConfidence(v float64) *LearningCreate
SetConfidence sets the "confidence" field.
func (*LearningCreate) SetCreatedAt ¶
func (_c *LearningCreate) SetCreatedAt(v time.Time) *LearningCreate
SetCreatedAt sets the "created_at" field.
func (*LearningCreate) SetDiagnosis ¶
func (_c *LearningCreate) SetDiagnosis(v string) *LearningCreate
SetDiagnosis sets the "diagnosis" field.
func (*LearningCreate) SetErrorPattern ¶
func (_c *LearningCreate) SetErrorPattern(v string) *LearningCreate
SetErrorPattern sets the "error_pattern" field.
func (*LearningCreate) SetFix ¶
func (_c *LearningCreate) SetFix(v string) *LearningCreate
SetFix sets the "fix" field.
func (*LearningCreate) SetID ¶
func (_c *LearningCreate) SetID(v uuid.UUID) *LearningCreate
SetID sets the "id" field.
func (*LearningCreate) SetNillableConfidence ¶
func (_c *LearningCreate) SetNillableConfidence(v *float64) *LearningCreate
SetNillableConfidence sets the "confidence" field if the given value is not nil.
func (*LearningCreate) SetNillableCreatedAt ¶
func (_c *LearningCreate) SetNillableCreatedAt(v *time.Time) *LearningCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*LearningCreate) SetNillableDiagnosis ¶
func (_c *LearningCreate) SetNillableDiagnosis(v *string) *LearningCreate
SetNillableDiagnosis sets the "diagnosis" field if the given value is not nil.
func (*LearningCreate) SetNillableErrorPattern ¶
func (_c *LearningCreate) SetNillableErrorPattern(v *string) *LearningCreate
SetNillableErrorPattern sets the "error_pattern" field if the given value is not nil.
func (*LearningCreate) SetNillableFix ¶
func (_c *LearningCreate) SetNillableFix(v *string) *LearningCreate
SetNillableFix sets the "fix" field if the given value is not nil.
func (*LearningCreate) SetNillableID ¶
func (_c *LearningCreate) SetNillableID(v *uuid.UUID) *LearningCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*LearningCreate) SetNillableOccurrenceCount ¶
func (_c *LearningCreate) SetNillableOccurrenceCount(v *int) *LearningCreate
SetNillableOccurrenceCount sets the "occurrence_count" field if the given value is not nil.
func (*LearningCreate) SetNillableSuccessCount ¶
func (_c *LearningCreate) SetNillableSuccessCount(v *int) *LearningCreate
SetNillableSuccessCount sets the "success_count" field if the given value is not nil.
func (*LearningCreate) SetNillableUpdatedAt ¶
func (_c *LearningCreate) SetNillableUpdatedAt(v *time.Time) *LearningCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*LearningCreate) SetOccurrenceCount ¶
func (_c *LearningCreate) SetOccurrenceCount(v int) *LearningCreate
SetOccurrenceCount sets the "occurrence_count" field.
func (*LearningCreate) SetSuccessCount ¶
func (_c *LearningCreate) SetSuccessCount(v int) *LearningCreate
SetSuccessCount sets the "success_count" field.
func (*LearningCreate) SetTags ¶
func (_c *LearningCreate) SetTags(v []string) *LearningCreate
SetTags sets the "tags" field.
func (*LearningCreate) SetTrigger ¶
func (_c *LearningCreate) SetTrigger(v string) *LearningCreate
SetTrigger sets the "trigger" field.
func (*LearningCreate) SetUpdatedAt ¶
func (_c *LearningCreate) SetUpdatedAt(v time.Time) *LearningCreate
SetUpdatedAt sets the "updated_at" field.
type LearningCreateBulk ¶
type LearningCreateBulk struct {
// contains filtered or unexported fields
}
LearningCreateBulk is the builder for creating many Learning entities in bulk.
func (*LearningCreateBulk) Exec ¶
func (_c *LearningCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LearningCreateBulk) ExecX ¶
func (_c *LearningCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LearningDelete ¶
type LearningDelete struct {
// contains filtered or unexported fields
}
LearningDelete is the builder for deleting a Learning entity.
func (*LearningDelete) Exec ¶
func (_d *LearningDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LearningDelete) ExecX ¶
func (_d *LearningDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LearningDelete) Where ¶
func (_d *LearningDelete) Where(ps ...predicate.Learning) *LearningDelete
Where appends a list predicates to the LearningDelete builder.
type LearningDeleteOne ¶
type LearningDeleteOne struct {
// contains filtered or unexported fields
}
LearningDeleteOne is the builder for deleting a single Learning entity.
func (*LearningDeleteOne) Exec ¶
func (_d *LearningDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LearningDeleteOne) ExecX ¶
func (_d *LearningDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LearningDeleteOne) Where ¶
func (_d *LearningDeleteOne) Where(ps ...predicate.Learning) *LearningDeleteOne
Where appends a list predicates to the LearningDelete builder.
type LearningGroupBy ¶
type LearningGroupBy struct {
// contains filtered or unexported fields
}
LearningGroupBy is the group-by builder for Learning entities.
func (*LearningGroupBy) Aggregate ¶
func (_g *LearningGroupBy) Aggregate(fns ...AggregateFunc) *LearningGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LearningGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LearningGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LearningGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LearningGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LearningGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LearningGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LearningGroupBy) Scan ¶
func (_g *LearningGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LearningGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LearningMutation ¶
type LearningMutation struct {
// contains filtered or unexported fields
}
LearningMutation represents an operation that mutates the Learning nodes in the graph.
func (*LearningMutation) AddConfidence ¶
func (m *LearningMutation) AddConfidence(f float64)
AddConfidence adds f to the "confidence" field.
func (*LearningMutation) AddField ¶
func (m *LearningMutation) 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 (*LearningMutation) AddOccurrenceCount ¶
func (m *LearningMutation) AddOccurrenceCount(i int)
AddOccurrenceCount adds i to the "occurrence_count" field.
func (*LearningMutation) AddSuccessCount ¶
func (m *LearningMutation) AddSuccessCount(i int)
AddSuccessCount adds i to the "success_count" field.
func (*LearningMutation) AddedConfidence ¶
func (m *LearningMutation) AddedConfidence() (r float64, exists bool)
AddedConfidence returns the value that was added to the "confidence" field in this mutation.
func (*LearningMutation) AddedEdges ¶
func (m *LearningMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LearningMutation) AddedField ¶
func (m *LearningMutation) 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 (*LearningMutation) AddedFields ¶
func (m *LearningMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LearningMutation) AddedIDs ¶
func (m *LearningMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LearningMutation) AddedOccurrenceCount ¶
func (m *LearningMutation) AddedOccurrenceCount() (r int, exists bool)
AddedOccurrenceCount returns the value that was added to the "occurrence_count" field in this mutation.
func (*LearningMutation) AddedSuccessCount ¶
func (m *LearningMutation) AddedSuccessCount() (r int, exists bool)
AddedSuccessCount returns the value that was added to the "success_count" field in this mutation.
func (*LearningMutation) AppendTags ¶
func (m *LearningMutation) AppendTags(s []string)
AppendTags adds s to the "tags" field.
func (*LearningMutation) AppendedTags ¶
func (m *LearningMutation) AppendedTags() ([]string, bool)
AppendedTags returns the list of values that were appended to the "tags" field in this mutation.
func (*LearningMutation) Category ¶
func (m *LearningMutation) Category() (r learning.Category, exists bool)
Category returns the value of the "category" field in the mutation.
func (*LearningMutation) ClearDiagnosis ¶
func (m *LearningMutation) ClearDiagnosis()
ClearDiagnosis clears the value of the "diagnosis" field.
func (*LearningMutation) ClearEdge ¶
func (m *LearningMutation) 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 (*LearningMutation) ClearErrorPattern ¶
func (m *LearningMutation) ClearErrorPattern()
ClearErrorPattern clears the value of the "error_pattern" field.
func (*LearningMutation) ClearField ¶
func (m *LearningMutation) 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 (*LearningMutation) ClearFix ¶
func (m *LearningMutation) ClearFix()
ClearFix clears the value of the "fix" field.
func (*LearningMutation) ClearTags ¶
func (m *LearningMutation) ClearTags()
ClearTags clears the value of the "tags" field.
func (*LearningMutation) ClearedEdges ¶
func (m *LearningMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LearningMutation) ClearedFields ¶
func (m *LearningMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LearningMutation) Client ¶
func (m LearningMutation) 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 (*LearningMutation) Confidence ¶
func (m *LearningMutation) Confidence() (r float64, exists bool)
Confidence returns the value of the "confidence" field in the mutation.
func (*LearningMutation) CreatedAt ¶
func (m *LearningMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*LearningMutation) Diagnosis ¶
func (m *LearningMutation) Diagnosis() (r string, exists bool)
Diagnosis returns the value of the "diagnosis" field in the mutation.
func (*LearningMutation) DiagnosisCleared ¶
func (m *LearningMutation) DiagnosisCleared() bool
DiagnosisCleared returns if the "diagnosis" field was cleared in this mutation.
func (*LearningMutation) EdgeCleared ¶
func (m *LearningMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LearningMutation) ErrorPattern ¶
func (m *LearningMutation) ErrorPattern() (r string, exists bool)
ErrorPattern returns the value of the "error_pattern" field in the mutation.
func (*LearningMutation) ErrorPatternCleared ¶
func (m *LearningMutation) ErrorPatternCleared() bool
ErrorPatternCleared returns if the "error_pattern" field was cleared in this mutation.
func (*LearningMutation) Field ¶
func (m *LearningMutation) 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 (*LearningMutation) FieldCleared ¶
func (m *LearningMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LearningMutation) Fields ¶
func (m *LearningMutation) 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 (*LearningMutation) Fix ¶
func (m *LearningMutation) Fix() (r string, exists bool)
Fix returns the value of the "fix" field in the mutation.
func (*LearningMutation) FixCleared ¶
func (m *LearningMutation) FixCleared() bool
FixCleared returns if the "fix" field was cleared in this mutation.
func (*LearningMutation) ID ¶
func (m *LearningMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LearningMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LearningMutation) OccurrenceCount ¶
func (m *LearningMutation) OccurrenceCount() (r int, exists bool)
OccurrenceCount returns the value of the "occurrence_count" field in the mutation.
func (*LearningMutation) OldCategory ¶
OldCategory returns the old "category" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldConfidence ¶
func (m *LearningMutation) OldConfidence(ctx context.Context) (v float64, err error)
OldConfidence returns the old "confidence" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldDiagnosis ¶
func (m *LearningMutation) OldDiagnosis(ctx context.Context) (v string, err error)
OldDiagnosis returns the old "diagnosis" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldErrorPattern ¶
func (m *LearningMutation) OldErrorPattern(ctx context.Context) (v string, err error)
OldErrorPattern returns the old "error_pattern" field's value of the Learning entity. If the Learning 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 (*LearningMutation) 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 (*LearningMutation) OldFix ¶
func (m *LearningMutation) OldFix(ctx context.Context) (v string, err error)
OldFix returns the old "fix" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldOccurrenceCount ¶
func (m *LearningMutation) OldOccurrenceCount(ctx context.Context) (v int, err error)
OldOccurrenceCount returns the old "occurrence_count" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldSuccessCount ¶
func (m *LearningMutation) OldSuccessCount(ctx context.Context) (v int, err error)
OldSuccessCount returns the old "success_count" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldTags ¶
func (m *LearningMutation) OldTags(ctx context.Context) (v []string, err error)
OldTags returns the old "tags" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldTrigger ¶
func (m *LearningMutation) OldTrigger(ctx context.Context) (v string, err error)
OldTrigger returns the old "trigger" field's value of the Learning entity. If the Learning 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 (*LearningMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Learning entity. If the Learning 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 (*LearningMutation) RemovedEdges ¶
func (m *LearningMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LearningMutation) RemovedIDs ¶
func (m *LearningMutation) 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 (*LearningMutation) ResetCategory ¶
func (m *LearningMutation) ResetCategory()
ResetCategory resets all changes to the "category" field.
func (*LearningMutation) ResetConfidence ¶
func (m *LearningMutation) ResetConfidence()
ResetConfidence resets all changes to the "confidence" field.
func (*LearningMutation) ResetCreatedAt ¶
func (m *LearningMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*LearningMutation) ResetDiagnosis ¶
func (m *LearningMutation) ResetDiagnosis()
ResetDiagnosis resets all changes to the "diagnosis" field.
func (*LearningMutation) ResetEdge ¶
func (m *LearningMutation) 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 (*LearningMutation) ResetErrorPattern ¶
func (m *LearningMutation) ResetErrorPattern()
ResetErrorPattern resets all changes to the "error_pattern" field.
func (*LearningMutation) ResetField ¶
func (m *LearningMutation) 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 (*LearningMutation) ResetFix ¶
func (m *LearningMutation) ResetFix()
ResetFix resets all changes to the "fix" field.
func (*LearningMutation) ResetOccurrenceCount ¶
func (m *LearningMutation) ResetOccurrenceCount()
ResetOccurrenceCount resets all changes to the "occurrence_count" field.
func (*LearningMutation) ResetSuccessCount ¶
func (m *LearningMutation) ResetSuccessCount()
ResetSuccessCount resets all changes to the "success_count" field.
func (*LearningMutation) ResetTags ¶
func (m *LearningMutation) ResetTags()
ResetTags resets all changes to the "tags" field.
func (*LearningMutation) ResetTrigger ¶
func (m *LearningMutation) ResetTrigger()
ResetTrigger resets all changes to the "trigger" field.
func (*LearningMutation) ResetUpdatedAt ¶
func (m *LearningMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*LearningMutation) SetCategory ¶
func (m *LearningMutation) SetCategory(l learning.Category)
SetCategory sets the "category" field.
func (*LearningMutation) SetConfidence ¶
func (m *LearningMutation) SetConfidence(f float64)
SetConfidence sets the "confidence" field.
func (*LearningMutation) SetCreatedAt ¶
func (m *LearningMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*LearningMutation) SetDiagnosis ¶
func (m *LearningMutation) SetDiagnosis(s string)
SetDiagnosis sets the "diagnosis" field.
func (*LearningMutation) SetErrorPattern ¶
func (m *LearningMutation) SetErrorPattern(s string)
SetErrorPattern sets the "error_pattern" field.
func (*LearningMutation) SetField ¶
func (m *LearningMutation) 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 (*LearningMutation) SetFix ¶
func (m *LearningMutation) SetFix(s string)
SetFix sets the "fix" field.
func (*LearningMutation) SetID ¶
func (m *LearningMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Learning entities.
func (*LearningMutation) SetOccurrenceCount ¶
func (m *LearningMutation) SetOccurrenceCount(i int)
SetOccurrenceCount sets the "occurrence_count" field.
func (*LearningMutation) SetOp ¶
func (m *LearningMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LearningMutation) SetSuccessCount ¶
func (m *LearningMutation) SetSuccessCount(i int)
SetSuccessCount sets the "success_count" field.
func (*LearningMutation) SetTags ¶
func (m *LearningMutation) SetTags(s []string)
SetTags sets the "tags" field.
func (*LearningMutation) SetTrigger ¶
func (m *LearningMutation) SetTrigger(s string)
SetTrigger sets the "trigger" field.
func (*LearningMutation) SetUpdatedAt ¶
func (m *LearningMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*LearningMutation) SuccessCount ¶
func (m *LearningMutation) SuccessCount() (r int, exists bool)
SuccessCount returns the value of the "success_count" field in the mutation.
func (*LearningMutation) Tags ¶
func (m *LearningMutation) Tags() (r []string, exists bool)
Tags returns the value of the "tags" field in the mutation.
func (*LearningMutation) TagsCleared ¶
func (m *LearningMutation) TagsCleared() bool
TagsCleared returns if the "tags" field was cleared in this mutation.
func (*LearningMutation) Trigger ¶
func (m *LearningMutation) Trigger() (r string, exists bool)
Trigger returns the value of the "trigger" field in the mutation.
func (LearningMutation) Tx ¶
func (m LearningMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LearningMutation) Type ¶
func (m *LearningMutation) Type() string
Type returns the node type of this mutation (Learning).
func (*LearningMutation) UpdatedAt ¶
func (m *LearningMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*LearningMutation) Where ¶
func (m *LearningMutation) Where(ps ...predicate.Learning)
Where appends a list predicates to the LearningMutation builder.
func (*LearningMutation) WhereP ¶
func (m *LearningMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LearningMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LearningQuery ¶
type LearningQuery struct {
// contains filtered or unexported fields
}
LearningQuery is the builder for querying Learning entities.
func (*LearningQuery) Aggregate ¶
func (_q *LearningQuery) Aggregate(fns ...AggregateFunc) *LearningSelect
Aggregate returns a LearningSelect configured with the given aggregations.
func (*LearningQuery) All ¶
func (_q *LearningQuery) All(ctx context.Context) ([]*Learning, error)
All executes the query and returns a list of Learnings.
func (*LearningQuery) AllX ¶
func (_q *LearningQuery) AllX(ctx context.Context) []*Learning
AllX is like All, but panics if an error occurs.
func (*LearningQuery) Clone ¶
func (_q *LearningQuery) Clone() *LearningQuery
Clone returns a duplicate of the LearningQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LearningQuery) Count ¶
func (_q *LearningQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LearningQuery) CountX ¶
func (_q *LearningQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LearningQuery) Exist ¶
func (_q *LearningQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LearningQuery) ExistX ¶
func (_q *LearningQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LearningQuery) First ¶
func (_q *LearningQuery) First(ctx context.Context) (*Learning, error)
First returns the first Learning entity from the query. Returns a *NotFoundError when no Learning was found.
func (*LearningQuery) FirstID ¶
FirstID returns the first Learning ID from the query. Returns a *NotFoundError when no Learning ID was found.
func (*LearningQuery) FirstIDX ¶
func (_q *LearningQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LearningQuery) FirstX ¶
func (_q *LearningQuery) FirstX(ctx context.Context) *Learning
FirstX is like First, but panics if an error occurs.
func (*LearningQuery) GroupBy ¶
func (_q *LearningQuery) GroupBy(field string, fields ...string) *LearningGroupBy
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 {
Trigger string `json:"trigger,omitempty"`
Count int `json:"count,omitempty"`
}
client.Learning.Query().
GroupBy(learning.FieldTrigger).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*LearningQuery) IDsX ¶
func (_q *LearningQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*LearningQuery) Limit ¶
func (_q *LearningQuery) Limit(limit int) *LearningQuery
Limit the number of records to be returned by this query.
func (*LearningQuery) Offset ¶
func (_q *LearningQuery) Offset(offset int) *LearningQuery
Offset to start from.
func (*LearningQuery) Only ¶
func (_q *LearningQuery) Only(ctx context.Context) (*Learning, error)
Only returns a single Learning entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Learning entity is found. Returns a *NotFoundError when no Learning entities are found.
func (*LearningQuery) OnlyID ¶
OnlyID is like Only, but returns the only Learning ID in the query. Returns a *NotSingularError when more than one Learning ID is found. Returns a *NotFoundError when no entities are found.
func (*LearningQuery) OnlyIDX ¶
func (_q *LearningQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LearningQuery) OnlyX ¶
func (_q *LearningQuery) OnlyX(ctx context.Context) *Learning
OnlyX is like Only, but panics if an error occurs.
func (*LearningQuery) Order ¶
func (_q *LearningQuery) Order(o ...learning.OrderOption) *LearningQuery
Order specifies how the records should be ordered.
func (*LearningQuery) Select ¶
func (_q *LearningQuery) Select(fields ...string) *LearningSelect
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 {
Trigger string `json:"trigger,omitempty"`
}
client.Learning.Query().
Select(learning.FieldTrigger).
Scan(ctx, &v)
func (*LearningQuery) Unique ¶
func (_q *LearningQuery) Unique(unique bool) *LearningQuery
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 (*LearningQuery) Where ¶
func (_q *LearningQuery) Where(ps ...predicate.Learning) *LearningQuery
Where adds a new predicate for the LearningQuery builder.
type LearningSelect ¶
type LearningSelect struct {
*LearningQuery
// contains filtered or unexported fields
}
LearningSelect is the builder for selecting fields of Learning entities.
func (*LearningSelect) Aggregate ¶
func (_s *LearningSelect) Aggregate(fns ...AggregateFunc) *LearningSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LearningSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LearningSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LearningSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LearningSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LearningSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LearningSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LearningSelect) Scan ¶
func (_s *LearningSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LearningSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LearningUpdate ¶
type LearningUpdate struct {
// contains filtered or unexported fields
}
LearningUpdate is the builder for updating Learning entities.
func (*LearningUpdate) AddConfidence ¶
func (_u *LearningUpdate) AddConfidence(v float64) *LearningUpdate
AddConfidence adds value to the "confidence" field.
func (*LearningUpdate) AddOccurrenceCount ¶
func (_u *LearningUpdate) AddOccurrenceCount(v int) *LearningUpdate
AddOccurrenceCount adds value to the "occurrence_count" field.
func (*LearningUpdate) AddSuccessCount ¶
func (_u *LearningUpdate) AddSuccessCount(v int) *LearningUpdate
AddSuccessCount adds value to the "success_count" field.
func (*LearningUpdate) AppendTags ¶
func (_u *LearningUpdate) AppendTags(v []string) *LearningUpdate
AppendTags appends value to the "tags" field.
func (*LearningUpdate) ClearDiagnosis ¶
func (_u *LearningUpdate) ClearDiagnosis() *LearningUpdate
ClearDiagnosis clears the value of the "diagnosis" field.
func (*LearningUpdate) ClearErrorPattern ¶
func (_u *LearningUpdate) ClearErrorPattern() *LearningUpdate
ClearErrorPattern clears the value of the "error_pattern" field.
func (*LearningUpdate) ClearFix ¶
func (_u *LearningUpdate) ClearFix() *LearningUpdate
ClearFix clears the value of the "fix" field.
func (*LearningUpdate) ClearTags ¶
func (_u *LearningUpdate) ClearTags() *LearningUpdate
ClearTags clears the value of the "tags" field.
func (*LearningUpdate) Exec ¶
func (_u *LearningUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LearningUpdate) ExecX ¶
func (_u *LearningUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LearningUpdate) Mutation ¶
func (_u *LearningUpdate) Mutation() *LearningMutation
Mutation returns the LearningMutation object of the builder.
func (*LearningUpdate) Save ¶
func (_u *LearningUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LearningUpdate) SaveX ¶
func (_u *LearningUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LearningUpdate) SetCategory ¶
func (_u *LearningUpdate) SetCategory(v learning.Category) *LearningUpdate
SetCategory sets the "category" field.
func (*LearningUpdate) SetConfidence ¶
func (_u *LearningUpdate) SetConfidence(v float64) *LearningUpdate
SetConfidence sets the "confidence" field.
func (*LearningUpdate) SetDiagnosis ¶
func (_u *LearningUpdate) SetDiagnosis(v string) *LearningUpdate
SetDiagnosis sets the "diagnosis" field.
func (*LearningUpdate) SetErrorPattern ¶
func (_u *LearningUpdate) SetErrorPattern(v string) *LearningUpdate
SetErrorPattern sets the "error_pattern" field.
func (*LearningUpdate) SetFix ¶
func (_u *LearningUpdate) SetFix(v string) *LearningUpdate
SetFix sets the "fix" field.
func (*LearningUpdate) SetNillableCategory ¶
func (_u *LearningUpdate) SetNillableCategory(v *learning.Category) *LearningUpdate
SetNillableCategory sets the "category" field if the given value is not nil.
func (*LearningUpdate) SetNillableConfidence ¶
func (_u *LearningUpdate) SetNillableConfidence(v *float64) *LearningUpdate
SetNillableConfidence sets the "confidence" field if the given value is not nil.
func (*LearningUpdate) SetNillableDiagnosis ¶
func (_u *LearningUpdate) SetNillableDiagnosis(v *string) *LearningUpdate
SetNillableDiagnosis sets the "diagnosis" field if the given value is not nil.
func (*LearningUpdate) SetNillableErrorPattern ¶
func (_u *LearningUpdate) SetNillableErrorPattern(v *string) *LearningUpdate
SetNillableErrorPattern sets the "error_pattern" field if the given value is not nil.
func (*LearningUpdate) SetNillableFix ¶
func (_u *LearningUpdate) SetNillableFix(v *string) *LearningUpdate
SetNillableFix sets the "fix" field if the given value is not nil.
func (*LearningUpdate) SetNillableOccurrenceCount ¶
func (_u *LearningUpdate) SetNillableOccurrenceCount(v *int) *LearningUpdate
SetNillableOccurrenceCount sets the "occurrence_count" field if the given value is not nil.
func (*LearningUpdate) SetNillableSuccessCount ¶
func (_u *LearningUpdate) SetNillableSuccessCount(v *int) *LearningUpdate
SetNillableSuccessCount sets the "success_count" field if the given value is not nil.
func (*LearningUpdate) SetNillableTrigger ¶
func (_u *LearningUpdate) SetNillableTrigger(v *string) *LearningUpdate
SetNillableTrigger sets the "trigger" field if the given value is not nil.
func (*LearningUpdate) SetOccurrenceCount ¶
func (_u *LearningUpdate) SetOccurrenceCount(v int) *LearningUpdate
SetOccurrenceCount sets the "occurrence_count" field.
func (*LearningUpdate) SetSuccessCount ¶
func (_u *LearningUpdate) SetSuccessCount(v int) *LearningUpdate
SetSuccessCount sets the "success_count" field.
func (*LearningUpdate) SetTags ¶
func (_u *LearningUpdate) SetTags(v []string) *LearningUpdate
SetTags sets the "tags" field.
func (*LearningUpdate) SetTrigger ¶
func (_u *LearningUpdate) SetTrigger(v string) *LearningUpdate
SetTrigger sets the "trigger" field.
func (*LearningUpdate) SetUpdatedAt ¶
func (_u *LearningUpdate) SetUpdatedAt(v time.Time) *LearningUpdate
SetUpdatedAt sets the "updated_at" field.
func (*LearningUpdate) Where ¶
func (_u *LearningUpdate) Where(ps ...predicate.Learning) *LearningUpdate
Where appends a list predicates to the LearningUpdate builder.
type LearningUpdateOne ¶
type LearningUpdateOne struct {
// contains filtered or unexported fields
}
LearningUpdateOne is the builder for updating a single Learning entity.
func (*LearningUpdateOne) AddConfidence ¶
func (_u *LearningUpdateOne) AddConfidence(v float64) *LearningUpdateOne
AddConfidence adds value to the "confidence" field.
func (*LearningUpdateOne) AddOccurrenceCount ¶
func (_u *LearningUpdateOne) AddOccurrenceCount(v int) *LearningUpdateOne
AddOccurrenceCount adds value to the "occurrence_count" field.
func (*LearningUpdateOne) AddSuccessCount ¶
func (_u *LearningUpdateOne) AddSuccessCount(v int) *LearningUpdateOne
AddSuccessCount adds value to the "success_count" field.
func (*LearningUpdateOne) AppendTags ¶
func (_u *LearningUpdateOne) AppendTags(v []string) *LearningUpdateOne
AppendTags appends value to the "tags" field.
func (*LearningUpdateOne) ClearDiagnosis ¶
func (_u *LearningUpdateOne) ClearDiagnosis() *LearningUpdateOne
ClearDiagnosis clears the value of the "diagnosis" field.
func (*LearningUpdateOne) ClearErrorPattern ¶
func (_u *LearningUpdateOne) ClearErrorPattern() *LearningUpdateOne
ClearErrorPattern clears the value of the "error_pattern" field.
func (*LearningUpdateOne) ClearFix ¶
func (_u *LearningUpdateOne) ClearFix() *LearningUpdateOne
ClearFix clears the value of the "fix" field.
func (*LearningUpdateOne) ClearTags ¶
func (_u *LearningUpdateOne) ClearTags() *LearningUpdateOne
ClearTags clears the value of the "tags" field.
func (*LearningUpdateOne) Exec ¶
func (_u *LearningUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LearningUpdateOne) ExecX ¶
func (_u *LearningUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LearningUpdateOne) Mutation ¶
func (_u *LearningUpdateOne) Mutation() *LearningMutation
Mutation returns the LearningMutation object of the builder.
func (*LearningUpdateOne) Save ¶
func (_u *LearningUpdateOne) Save(ctx context.Context) (*Learning, error)
Save executes the query and returns the updated Learning entity.
func (*LearningUpdateOne) SaveX ¶
func (_u *LearningUpdateOne) SaveX(ctx context.Context) *Learning
SaveX is like Save, but panics if an error occurs.
func (*LearningUpdateOne) Select ¶
func (_u *LearningUpdateOne) Select(field string, fields ...string) *LearningUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LearningUpdateOne) SetCategory ¶
func (_u *LearningUpdateOne) SetCategory(v learning.Category) *LearningUpdateOne
SetCategory sets the "category" field.
func (*LearningUpdateOne) SetConfidence ¶
func (_u *LearningUpdateOne) SetConfidence(v float64) *LearningUpdateOne
SetConfidence sets the "confidence" field.
func (*LearningUpdateOne) SetDiagnosis ¶
func (_u *LearningUpdateOne) SetDiagnosis(v string) *LearningUpdateOne
SetDiagnosis sets the "diagnosis" field.
func (*LearningUpdateOne) SetErrorPattern ¶
func (_u *LearningUpdateOne) SetErrorPattern(v string) *LearningUpdateOne
SetErrorPattern sets the "error_pattern" field.
func (*LearningUpdateOne) SetFix ¶
func (_u *LearningUpdateOne) SetFix(v string) *LearningUpdateOne
SetFix sets the "fix" field.
func (*LearningUpdateOne) SetNillableCategory ¶
func (_u *LearningUpdateOne) SetNillableCategory(v *learning.Category) *LearningUpdateOne
SetNillableCategory sets the "category" field if the given value is not nil.
func (*LearningUpdateOne) SetNillableConfidence ¶
func (_u *LearningUpdateOne) SetNillableConfidence(v *float64) *LearningUpdateOne
SetNillableConfidence sets the "confidence" field if the given value is not nil.
func (*LearningUpdateOne) SetNillableDiagnosis ¶
func (_u *LearningUpdateOne) SetNillableDiagnosis(v *string) *LearningUpdateOne
SetNillableDiagnosis sets the "diagnosis" field if the given value is not nil.
func (*LearningUpdateOne) SetNillableErrorPattern ¶
func (_u *LearningUpdateOne) SetNillableErrorPattern(v *string) *LearningUpdateOne
SetNillableErrorPattern sets the "error_pattern" field if the given value is not nil.
func (*LearningUpdateOne) SetNillableFix ¶
func (_u *LearningUpdateOne) SetNillableFix(v *string) *LearningUpdateOne
SetNillableFix sets the "fix" field if the given value is not nil.
func (*LearningUpdateOne) SetNillableOccurrenceCount ¶
func (_u *LearningUpdateOne) SetNillableOccurrenceCount(v *int) *LearningUpdateOne
SetNillableOccurrenceCount sets the "occurrence_count" field if the given value is not nil.
func (*LearningUpdateOne) SetNillableSuccessCount ¶
func (_u *LearningUpdateOne) SetNillableSuccessCount(v *int) *LearningUpdateOne
SetNillableSuccessCount sets the "success_count" field if the given value is not nil.
func (*LearningUpdateOne) SetNillableTrigger ¶
func (_u *LearningUpdateOne) SetNillableTrigger(v *string) *LearningUpdateOne
SetNillableTrigger sets the "trigger" field if the given value is not nil.
func (*LearningUpdateOne) SetOccurrenceCount ¶
func (_u *LearningUpdateOne) SetOccurrenceCount(v int) *LearningUpdateOne
SetOccurrenceCount sets the "occurrence_count" field.
func (*LearningUpdateOne) SetSuccessCount ¶
func (_u *LearningUpdateOne) SetSuccessCount(v int) *LearningUpdateOne
SetSuccessCount sets the "success_count" field.
func (*LearningUpdateOne) SetTags ¶
func (_u *LearningUpdateOne) SetTags(v []string) *LearningUpdateOne
SetTags sets the "tags" field.
func (*LearningUpdateOne) SetTrigger ¶
func (_u *LearningUpdateOne) SetTrigger(v string) *LearningUpdateOne
SetTrigger sets the "trigger" field.
func (*LearningUpdateOne) SetUpdatedAt ¶
func (_u *LearningUpdateOne) SetUpdatedAt(v time.Time) *LearningUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*LearningUpdateOne) Where ¶
func (_u *LearningUpdateOne) Where(ps ...predicate.Learning) *LearningUpdateOne
Where appends a list predicates to the LearningUpdate builder.
type Message ¶
type Message struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Role holds the value of the "role" field.
Role string `json:"role,omitempty"`
// Content holds the value of the "content" field.
Content string `json:"content,omitempty"`
// Timestamp holds the value of the "timestamp" field.
Timestamp time.Time `json:"timestamp,omitempty"`
// ToolCalls holds the value of the "tool_calls" field.
ToolCalls []schema.ToolCall `json:"tool_calls,omitempty"`
// Author holds the value of the "author" field.
Author string `json:"author,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the MessageQuery when eager-loading is set.
Edges MessageEdges `json:"edges"`
// contains filtered or unexported fields
}
Message is the model entity for the Message schema.
func (*Message) QuerySession ¶
func (_m *Message) QuerySession() *SessionQuery
QuerySession queries the "session" edge of the Message entity.
func (*Message) Unwrap ¶
Unwrap unwraps the Message entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Message) Update ¶
func (_m *Message) Update() *MessageUpdateOne
Update returns a builder for updating this Message. Note that you need to call Message.Unwrap() before calling this method if this Message was returned from a transaction, and the transaction was committed or rolled back.
type MessageClient ¶
type MessageClient struct {
// contains filtered or unexported fields
}
MessageClient is a client for the Message schema.
func NewMessageClient ¶
func NewMessageClient(c config) *MessageClient
NewMessageClient returns a client for the Message from the given config.
func (*MessageClient) Create ¶
func (c *MessageClient) Create() *MessageCreate
Create returns a builder for creating a Message entity.
func (*MessageClient) CreateBulk ¶
func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
CreateBulk returns a builder for creating a bulk of Message entities.
func (*MessageClient) Delete ¶
func (c *MessageClient) Delete() *MessageDelete
Delete returns a delete builder for Message.
func (*MessageClient) DeleteOne ¶
func (c *MessageClient) DeleteOne(_m *Message) *MessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MessageClient) DeleteOneID ¶
func (c *MessageClient) DeleteOneID(id int) *MessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MessageClient) GetX ¶
func (c *MessageClient) GetX(ctx context.Context, id int) *Message
GetX is like Get, but panics if an error occurs.
func (*MessageClient) Hooks ¶
func (c *MessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MessageClient) Intercept ¶
func (c *MessageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `message.Intercept(f(g(h())))`.
func (*MessageClient) Interceptors ¶
func (c *MessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MessageClient) MapCreateBulk ¶
func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MessageClient) Query ¶
func (c *MessageClient) Query() *MessageQuery
Query returns a query builder for Message.
func (*MessageClient) QuerySession ¶
func (c *MessageClient) QuerySession(_m *Message) *SessionQuery
QuerySession queries the session edge of a Message.
func (*MessageClient) Update ¶
func (c *MessageClient) Update() *MessageUpdate
Update returns an update builder for Message.
func (*MessageClient) UpdateOne ¶
func (c *MessageClient) UpdateOne(_m *Message) *MessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MessageClient) UpdateOneID ¶
func (c *MessageClient) UpdateOneID(id int) *MessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MessageClient) Use ¶
func (c *MessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `message.Hooks(f(g(h())))`.
type MessageCreate ¶
type MessageCreate struct {
// contains filtered or unexported fields
}
MessageCreate is the builder for creating a Message entity.
func (*MessageCreate) Exec ¶
func (_c *MessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreate) ExecX ¶
func (_c *MessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreate) Mutation ¶
func (_c *MessageCreate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageCreate) Save ¶
func (_c *MessageCreate) Save(ctx context.Context) (*Message, error)
Save creates the Message in the database.
func (*MessageCreate) SaveX ¶
func (_c *MessageCreate) SaveX(ctx context.Context) *Message
SaveX calls Save and panics if Save returns an error.
func (*MessageCreate) SetAuthor ¶
func (_c *MessageCreate) SetAuthor(v string) *MessageCreate
SetAuthor sets the "author" field.
func (*MessageCreate) SetContent ¶
func (_c *MessageCreate) SetContent(v string) *MessageCreate
SetContent sets the "content" field.
func (*MessageCreate) SetNillableAuthor ¶
func (_c *MessageCreate) SetNillableAuthor(v *string) *MessageCreate
SetNillableAuthor sets the "author" field if the given value is not nil.
func (*MessageCreate) SetNillableSessionID ¶
func (_c *MessageCreate) SetNillableSessionID(id *int) *MessageCreate
SetNillableSessionID sets the "session" edge to the Session entity by ID if the given value is not nil.
func (*MessageCreate) SetNillableTimestamp ¶
func (_c *MessageCreate) SetNillableTimestamp(v *time.Time) *MessageCreate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*MessageCreate) SetRole ¶
func (_c *MessageCreate) SetRole(v string) *MessageCreate
SetRole sets the "role" field.
func (*MessageCreate) SetSession ¶
func (_c *MessageCreate) SetSession(v *Session) *MessageCreate
SetSession sets the "session" edge to the Session entity.
func (*MessageCreate) SetSessionID ¶
func (_c *MessageCreate) SetSessionID(id int) *MessageCreate
SetSessionID sets the "session" edge to the Session entity by ID.
func (*MessageCreate) SetTimestamp ¶
func (_c *MessageCreate) SetTimestamp(v time.Time) *MessageCreate
SetTimestamp sets the "timestamp" field.
func (*MessageCreate) SetToolCalls ¶
func (_c *MessageCreate) SetToolCalls(v []schema.ToolCall) *MessageCreate
SetToolCalls sets the "tool_calls" field.
type MessageCreateBulk ¶
type MessageCreateBulk struct {
// contains filtered or unexported fields
}
MessageCreateBulk is the builder for creating many Message entities in bulk.
func (*MessageCreateBulk) Exec ¶
func (_c *MessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreateBulk) ExecX ¶
func (_c *MessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MessageDelete ¶
type MessageDelete struct {
// contains filtered or unexported fields
}
MessageDelete is the builder for deleting a Message entity.
func (*MessageDelete) Exec ¶
func (_d *MessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MessageDelete) ExecX ¶
func (_d *MessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MessageDelete) Where ¶
func (_d *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
Where appends a list predicates to the MessageDelete builder.
type MessageDeleteOne ¶
type MessageDeleteOne struct {
// contains filtered or unexported fields
}
MessageDeleteOne is the builder for deleting a single Message entity.
func (*MessageDeleteOne) Exec ¶
func (_d *MessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MessageDeleteOne) ExecX ¶
func (_d *MessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageDeleteOne) Where ¶
func (_d *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne
Where appends a list predicates to the MessageDelete builder.
type MessageEdges ¶
type MessageEdges struct {
// Session holds the value of the session edge.
Session *Session `json:"session,omitempty"`
// contains filtered or unexported fields
}
MessageEdges holds the relations/edges for other nodes in the graph.
func (MessageEdges) SessionOrErr ¶
func (e MessageEdges) SessionOrErr() (*Session, error)
SessionOrErr returns the Session value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MessageGroupBy ¶
type MessageGroupBy struct {
// contains filtered or unexported fields
}
MessageGroupBy is the group-by builder for Message entities.
func (*MessageGroupBy) Aggregate ¶
func (_g *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Scan ¶
func (_g *MessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageMutation ¶
type MessageMutation struct {
// contains filtered or unexported fields
}
MessageMutation represents an operation that mutates the Message nodes in the graph.
func (*MessageMutation) AddField ¶
func (m *MessageMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MessageMutation) AddedEdges ¶
func (m *MessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MessageMutation) AddedField ¶
func (m *MessageMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MessageMutation) AddedFields ¶
func (m *MessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MessageMutation) AddedIDs ¶
func (m *MessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MessageMutation) AppendToolCalls ¶
func (m *MessageMutation) AppendToolCalls(sc []schema.ToolCall)
AppendToolCalls adds sc to the "tool_calls" field.
func (*MessageMutation) AppendedToolCalls ¶
func (m *MessageMutation) AppendedToolCalls() ([]schema.ToolCall, bool)
AppendedToolCalls returns the list of values that were appended to the "tool_calls" field in this mutation.
func (*MessageMutation) Author ¶
func (m *MessageMutation) Author() (r string, exists bool)
Author returns the value of the "author" field in the mutation.
func (*MessageMutation) AuthorCleared ¶
func (m *MessageMutation) AuthorCleared() bool
AuthorCleared returns if the "author" field was cleared in this mutation.
func (*MessageMutation) ClearAuthor ¶
func (m *MessageMutation) ClearAuthor()
ClearAuthor clears the value of the "author" field.
func (*MessageMutation) ClearEdge ¶
func (m *MessageMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*MessageMutation) ClearField ¶
func (m *MessageMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*MessageMutation) ClearSession ¶
func (m *MessageMutation) ClearSession()
ClearSession clears the "session" edge to the Session entity.
func (*MessageMutation) ClearToolCalls ¶
func (m *MessageMutation) ClearToolCalls()
ClearToolCalls clears the value of the "tool_calls" field.
func (*MessageMutation) ClearedEdges ¶
func (m *MessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MessageMutation) ClearedFields ¶
func (m *MessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MessageMutation) Client ¶
func (m MessageMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*MessageMutation) Content ¶
func (m *MessageMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*MessageMutation) EdgeCleared ¶
func (m *MessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MessageMutation) Field ¶
func (m *MessageMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*MessageMutation) FieldCleared ¶
func (m *MessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MessageMutation) Fields ¶
func (m *MessageMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*MessageMutation) ID ¶
func (m *MessageMutation) 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 (*MessageMutation) IDs ¶
func (m *MessageMutation) 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 (*MessageMutation) OldAuthor ¶
func (m *MessageMutation) OldAuthor(ctx context.Context) (v string, err error)
OldAuthor returns the old "author" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldContent ¶
func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*MessageMutation) OldRole ¶
func (m *MessageMutation) OldRole(ctx context.Context) (v string, err error)
OldRole returns the old "role" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldToolCalls ¶
OldToolCalls returns the old "tool_calls" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) RemovedEdges ¶
func (m *MessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MessageMutation) RemovedIDs ¶
func (m *MessageMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*MessageMutation) ResetAuthor ¶
func (m *MessageMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" field.
func (*MessageMutation) ResetContent ¶
func (m *MessageMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*MessageMutation) ResetEdge ¶
func (m *MessageMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*MessageMutation) ResetField ¶
func (m *MessageMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*MessageMutation) ResetRole ¶
func (m *MessageMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*MessageMutation) ResetSession ¶
func (m *MessageMutation) ResetSession()
ResetSession resets all changes to the "session" edge.
func (*MessageMutation) ResetTimestamp ¶
func (m *MessageMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*MessageMutation) ResetToolCalls ¶
func (m *MessageMutation) ResetToolCalls()
ResetToolCalls resets all changes to the "tool_calls" field.
func (*MessageMutation) Role ¶
func (m *MessageMutation) Role() (r string, exists bool)
Role returns the value of the "role" field in the mutation.
func (*MessageMutation) SessionCleared ¶
func (m *MessageMutation) SessionCleared() bool
SessionCleared reports if the "session" edge to the Session entity was cleared.
func (*MessageMutation) SessionID ¶
func (m *MessageMutation) SessionID() (id int, exists bool)
SessionID returns the "session" edge ID in the mutation.
func (*MessageMutation) SessionIDs ¶
func (m *MessageMutation) SessionIDs() (ids []int)
SessionIDs returns the "session" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SessionID instead. It exists only for internal usage by the builders.
func (*MessageMutation) SetAuthor ¶
func (m *MessageMutation) SetAuthor(s string)
SetAuthor sets the "author" field.
func (*MessageMutation) SetContent ¶
func (m *MessageMutation) SetContent(s string)
SetContent sets the "content" field.
func (*MessageMutation) SetField ¶
func (m *MessageMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MessageMutation) SetOp ¶
func (m *MessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MessageMutation) SetRole ¶
func (m *MessageMutation) SetRole(s string)
SetRole sets the "role" field.
func (*MessageMutation) SetSessionID ¶
func (m *MessageMutation) SetSessionID(id int)
SetSessionID sets the "session" edge to the Session entity by id.
func (*MessageMutation) SetTimestamp ¶
func (m *MessageMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*MessageMutation) SetToolCalls ¶
func (m *MessageMutation) SetToolCalls(sc []schema.ToolCall)
SetToolCalls sets the "tool_calls" field.
func (*MessageMutation) Timestamp ¶
func (m *MessageMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (*MessageMutation) ToolCalls ¶
func (m *MessageMutation) ToolCalls() (r []schema.ToolCall, exists bool)
ToolCalls returns the value of the "tool_calls" field in the mutation.
func (*MessageMutation) ToolCallsCleared ¶
func (m *MessageMutation) ToolCallsCleared() bool
ToolCallsCleared returns if the "tool_calls" field was cleared in this mutation.
func (MessageMutation) Tx ¶
func (m MessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MessageMutation) Type ¶
func (m *MessageMutation) Type() string
Type returns the node type of this mutation (Message).
func (*MessageMutation) Where ¶
func (m *MessageMutation) Where(ps ...predicate.Message)
Where appends a list predicates to the MessageMutation builder.
func (*MessageMutation) WhereP ¶
func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
MessageQuery is the builder for querying Message entities.
func (*MessageQuery) Aggregate ¶
func (_q *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate returns a MessageSelect configured with the given aggregations.
func (*MessageQuery) All ¶
func (_q *MessageQuery) All(ctx context.Context) ([]*Message, error)
All executes the query and returns a list of Messages.
func (*MessageQuery) AllX ¶
func (_q *MessageQuery) AllX(ctx context.Context) []*Message
AllX is like All, but panics if an error occurs.
func (*MessageQuery) Clone ¶
func (_q *MessageQuery) Clone() *MessageQuery
Clone returns a duplicate of the MessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MessageQuery) Count ¶
func (_q *MessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MessageQuery) CountX ¶
func (_q *MessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MessageQuery) Exist ¶
func (_q *MessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MessageQuery) ExistX ¶
func (_q *MessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MessageQuery) First ¶
func (_q *MessageQuery) First(ctx context.Context) (*Message, error)
First returns the first Message entity from the query. Returns a *NotFoundError when no Message was found.
func (*MessageQuery) FirstID ¶
func (_q *MessageQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Message ID from the query. Returns a *NotFoundError when no Message ID was found.
func (*MessageQuery) FirstIDX ¶
func (_q *MessageQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MessageQuery) FirstX ¶
func (_q *MessageQuery) FirstX(ctx context.Context) *Message
FirstX is like First, but panics if an error occurs.
func (*MessageQuery) GroupBy ¶
func (_q *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
Role string `json:"role,omitempty"`
Count int `json:"count,omitempty"`
}
client.Message.Query().
GroupBy(message.FieldRole).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*MessageQuery) IDs ¶
func (_q *MessageQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Message IDs.
func (*MessageQuery) IDsX ¶
func (_q *MessageQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MessageQuery) Limit ¶
func (_q *MessageQuery) Limit(limit int) *MessageQuery
Limit the number of records to be returned by this query.
func (*MessageQuery) Offset ¶
func (_q *MessageQuery) Offset(offset int) *MessageQuery
Offset to start from.
func (*MessageQuery) Only ¶
func (_q *MessageQuery) Only(ctx context.Context) (*Message, error)
Only returns a single Message entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Message entity is found. Returns a *NotFoundError when no Message entities are found.
func (*MessageQuery) OnlyID ¶
func (_q *MessageQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Message ID in the query. Returns a *NotSingularError when more than one Message ID is found. Returns a *NotFoundError when no entities are found.
func (*MessageQuery) OnlyIDX ¶
func (_q *MessageQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MessageQuery) OnlyX ¶
func (_q *MessageQuery) OnlyX(ctx context.Context) *Message
OnlyX is like Only, but panics if an error occurs.
func (*MessageQuery) Order ¶
func (_q *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
Order specifies how the records should be ordered.
func (*MessageQuery) QuerySession ¶
func (_q *MessageQuery) QuerySession() *SessionQuery
QuerySession chains the current query on the "session" edge.
func (*MessageQuery) Select ¶
func (_q *MessageQuery) Select(fields ...string) *MessageSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
Role string `json:"role,omitempty"`
}
client.Message.Query().
Select(message.FieldRole).
Scan(ctx, &v)
func (*MessageQuery) Unique ¶
func (_q *MessageQuery) Unique(unique bool) *MessageQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MessageQuery) Where ¶
func (_q *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
Where adds a new predicate for the MessageQuery builder.
func (*MessageQuery) WithSession ¶
func (_q *MessageQuery) WithSession(opts ...func(*SessionQuery)) *MessageQuery
WithSession tells the query-builder to eager-load the nodes that are connected to the "session" edge. The optional arguments are used to configure the query builder of the edge.
type MessageSelect ¶
type MessageSelect struct {
*MessageQuery
// contains filtered or unexported fields
}
MessageSelect is the builder for selecting fields of Message entities.
func (*MessageSelect) Aggregate ¶
func (_s *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Scan ¶
func (_s *MessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageUpdate ¶
type MessageUpdate struct {
// contains filtered or unexported fields
}
MessageUpdate is the builder for updating Message entities.
func (*MessageUpdate) AppendToolCalls ¶
func (_u *MessageUpdate) AppendToolCalls(v []schema.ToolCall) *MessageUpdate
AppendToolCalls appends value to the "tool_calls" field.
func (*MessageUpdate) ClearAuthor ¶
func (_u *MessageUpdate) ClearAuthor() *MessageUpdate
ClearAuthor clears the value of the "author" field.
func (*MessageUpdate) ClearSession ¶
func (_u *MessageUpdate) ClearSession() *MessageUpdate
ClearSession clears the "session" edge to the Session entity.
func (*MessageUpdate) ClearToolCalls ¶
func (_u *MessageUpdate) ClearToolCalls() *MessageUpdate
ClearToolCalls clears the value of the "tool_calls" field.
func (*MessageUpdate) Exec ¶
func (_u *MessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpdate) ExecX ¶
func (_u *MessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdate) Mutation ¶
func (_u *MessageUpdate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdate) Save ¶
func (_u *MessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MessageUpdate) SaveX ¶
func (_u *MessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdate) SetAuthor ¶
func (_u *MessageUpdate) SetAuthor(v string) *MessageUpdate
SetAuthor sets the "author" field.
func (*MessageUpdate) SetContent ¶
func (_u *MessageUpdate) SetContent(v string) *MessageUpdate
SetContent sets the "content" field.
func (*MessageUpdate) SetNillableAuthor ¶
func (_u *MessageUpdate) SetNillableAuthor(v *string) *MessageUpdate
SetNillableAuthor sets the "author" field if the given value is not nil.
func (*MessageUpdate) SetNillableContent ¶
func (_u *MessageUpdate) SetNillableContent(v *string) *MessageUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdate) SetNillableRole ¶
func (_u *MessageUpdate) SetNillableRole(v *string) *MessageUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*MessageUpdate) SetNillableSessionID ¶
func (_u *MessageUpdate) SetNillableSessionID(id *int) *MessageUpdate
SetNillableSessionID sets the "session" edge to the Session entity by ID if the given value is not nil.
func (*MessageUpdate) SetNillableTimestamp ¶
func (_u *MessageUpdate) SetNillableTimestamp(v *time.Time) *MessageUpdate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*MessageUpdate) SetRole ¶
func (_u *MessageUpdate) SetRole(v string) *MessageUpdate
SetRole sets the "role" field.
func (*MessageUpdate) SetSession ¶
func (_u *MessageUpdate) SetSession(v *Session) *MessageUpdate
SetSession sets the "session" edge to the Session entity.
func (*MessageUpdate) SetSessionID ¶
func (_u *MessageUpdate) SetSessionID(id int) *MessageUpdate
SetSessionID sets the "session" edge to the Session entity by ID.
func (*MessageUpdate) SetTimestamp ¶
func (_u *MessageUpdate) SetTimestamp(v time.Time) *MessageUpdate
SetTimestamp sets the "timestamp" field.
func (*MessageUpdate) SetToolCalls ¶
func (_u *MessageUpdate) SetToolCalls(v []schema.ToolCall) *MessageUpdate
SetToolCalls sets the "tool_calls" field.
func (*MessageUpdate) Where ¶
func (_u *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
Where appends a list predicates to the MessageUpdate builder.
type MessageUpdateOne ¶
type MessageUpdateOne struct {
// contains filtered or unexported fields
}
MessageUpdateOne is the builder for updating a single Message entity.
func (*MessageUpdateOne) AppendToolCalls ¶
func (_u *MessageUpdateOne) AppendToolCalls(v []schema.ToolCall) *MessageUpdateOne
AppendToolCalls appends value to the "tool_calls" field.
func (*MessageUpdateOne) ClearAuthor ¶
func (_u *MessageUpdateOne) ClearAuthor() *MessageUpdateOne
ClearAuthor clears the value of the "author" field.
func (*MessageUpdateOne) ClearSession ¶
func (_u *MessageUpdateOne) ClearSession() *MessageUpdateOne
ClearSession clears the "session" edge to the Session entity.
func (*MessageUpdateOne) ClearToolCalls ¶
func (_u *MessageUpdateOne) ClearToolCalls() *MessageUpdateOne
ClearToolCalls clears the value of the "tool_calls" field.
func (*MessageUpdateOne) Exec ¶
func (_u *MessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MessageUpdateOne) ExecX ¶
func (_u *MessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdateOne) Mutation ¶
func (_u *MessageUpdateOne) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdateOne) Save ¶
func (_u *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
Save executes the query and returns the updated Message entity.
func (*MessageUpdateOne) SaveX ¶
func (_u *MessageUpdateOne) SaveX(ctx context.Context) *Message
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdateOne) Select ¶
func (_u *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MessageUpdateOne) SetAuthor ¶
func (_u *MessageUpdateOne) SetAuthor(v string) *MessageUpdateOne
SetAuthor sets the "author" field.
func (*MessageUpdateOne) SetContent ¶
func (_u *MessageUpdateOne) SetContent(v string) *MessageUpdateOne
SetContent sets the "content" field.
func (*MessageUpdateOne) SetNillableAuthor ¶
func (_u *MessageUpdateOne) SetNillableAuthor(v *string) *MessageUpdateOne
SetNillableAuthor sets the "author" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableContent ¶
func (_u *MessageUpdateOne) SetNillableContent(v *string) *MessageUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableRole ¶
func (_u *MessageUpdateOne) SetNillableRole(v *string) *MessageUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableSessionID ¶
func (_u *MessageUpdateOne) SetNillableSessionID(id *int) *MessageUpdateOne
SetNillableSessionID sets the "session" edge to the Session entity by ID if the given value is not nil.
func (*MessageUpdateOne) SetNillableTimestamp ¶
func (_u *MessageUpdateOne) SetNillableTimestamp(v *time.Time) *MessageUpdateOne
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*MessageUpdateOne) SetRole ¶
func (_u *MessageUpdateOne) SetRole(v string) *MessageUpdateOne
SetRole sets the "role" field.
func (*MessageUpdateOne) SetSession ¶
func (_u *MessageUpdateOne) SetSession(v *Session) *MessageUpdateOne
SetSession sets the "session" edge to the Session entity.
func (*MessageUpdateOne) SetSessionID ¶
func (_u *MessageUpdateOne) SetSessionID(id int) *MessageUpdateOne
SetSessionID sets the "session" edge to the Session entity by ID.
func (*MessageUpdateOne) SetTimestamp ¶
func (_u *MessageUpdateOne) SetTimestamp(v time.Time) *MessageUpdateOne
SetTimestamp sets the "timestamp" field.
func (*MessageUpdateOne) SetToolCalls ¶
func (_u *MessageUpdateOne) SetToolCalls(v []schema.ToolCall) *MessageUpdateOne
SetToolCalls sets the "tool_calls" field.
func (*MessageUpdateOne) Where ¶
func (_u *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
Where appends a list predicates to the MessageUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Observation ¶
type Observation struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// SessionKey holds the value of the "session_key" field.
SessionKey string `json:"session_key,omitempty"`
// Content holds the value of the "content" field.
Content string `json:"content,omitempty"`
// TokenCount holds the value of the "token_count" field.
TokenCount int `json:"token_count,omitempty"`
// SourceStartIndex holds the value of the "source_start_index" field.
SourceStartIndex int `json:"source_start_index,omitempty"`
// SourceEndIndex holds the value of the "source_end_index" field.
SourceEndIndex int `json:"source_end_index,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// contains filtered or unexported fields
}
Observation is the model entity for the Observation schema.
func (*Observation) String ¶
func (_m *Observation) String() string
String implements the fmt.Stringer.
func (*Observation) Unwrap ¶
func (_m *Observation) Unwrap() *Observation
Unwrap unwraps the Observation 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 (*Observation) Update ¶
func (_m *Observation) Update() *ObservationUpdateOne
Update returns a builder for updating this Observation. Note that you need to call Observation.Unwrap() before calling this method if this Observation was returned from a transaction, and the transaction was committed or rolled back.
type ObservationClient ¶
type ObservationClient struct {
// contains filtered or unexported fields
}
ObservationClient is a client for the Observation schema.
func NewObservationClient ¶
func NewObservationClient(c config) *ObservationClient
NewObservationClient returns a client for the Observation from the given config.
func (*ObservationClient) Create ¶
func (c *ObservationClient) Create() *ObservationCreate
Create returns a builder for creating a Observation entity.
func (*ObservationClient) CreateBulk ¶
func (c *ObservationClient) CreateBulk(builders ...*ObservationCreate) *ObservationCreateBulk
CreateBulk returns a builder for creating a bulk of Observation entities.
func (*ObservationClient) Delete ¶
func (c *ObservationClient) Delete() *ObservationDelete
Delete returns a delete builder for Observation.
func (*ObservationClient) DeleteOne ¶
func (c *ObservationClient) DeleteOne(_m *Observation) *ObservationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ObservationClient) DeleteOneID ¶
func (c *ObservationClient) DeleteOneID(id uuid.UUID) *ObservationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ObservationClient) Get ¶
func (c *ObservationClient) Get(ctx context.Context, id uuid.UUID) (*Observation, error)
Get returns a Observation entity by its id.
func (*ObservationClient) GetX ¶
func (c *ObservationClient) GetX(ctx context.Context, id uuid.UUID) *Observation
GetX is like Get, but panics if an error occurs.
func (*ObservationClient) Hooks ¶
func (c *ObservationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ObservationClient) Intercept ¶
func (c *ObservationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `observation.Intercept(f(g(h())))`.
func (*ObservationClient) Interceptors ¶
func (c *ObservationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ObservationClient) MapCreateBulk ¶
func (c *ObservationClient) MapCreateBulk(slice any, setFunc func(*ObservationCreate, int)) *ObservationCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ObservationClient) Query ¶
func (c *ObservationClient) Query() *ObservationQuery
Query returns a query builder for Observation.
func (*ObservationClient) Update ¶
func (c *ObservationClient) Update() *ObservationUpdate
Update returns an update builder for Observation.
func (*ObservationClient) UpdateOne ¶
func (c *ObservationClient) UpdateOne(_m *Observation) *ObservationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ObservationClient) UpdateOneID ¶
func (c *ObservationClient) UpdateOneID(id uuid.UUID) *ObservationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ObservationClient) Use ¶
func (c *ObservationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `observation.Hooks(f(g(h())))`.
type ObservationCreate ¶
type ObservationCreate struct {
// contains filtered or unexported fields
}
ObservationCreate is the builder for creating a Observation entity.
func (*ObservationCreate) Exec ¶
func (_c *ObservationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ObservationCreate) ExecX ¶
func (_c *ObservationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ObservationCreate) Mutation ¶
func (_c *ObservationCreate) Mutation() *ObservationMutation
Mutation returns the ObservationMutation object of the builder.
func (*ObservationCreate) Save ¶
func (_c *ObservationCreate) Save(ctx context.Context) (*Observation, error)
Save creates the Observation in the database.
func (*ObservationCreate) SaveX ¶
func (_c *ObservationCreate) SaveX(ctx context.Context) *Observation
SaveX calls Save and panics if Save returns an error.
func (*ObservationCreate) SetContent ¶
func (_c *ObservationCreate) SetContent(v string) *ObservationCreate
SetContent sets the "content" field.
func (*ObservationCreate) SetCreatedAt ¶
func (_c *ObservationCreate) SetCreatedAt(v time.Time) *ObservationCreate
SetCreatedAt sets the "created_at" field.
func (*ObservationCreate) SetID ¶
func (_c *ObservationCreate) SetID(v uuid.UUID) *ObservationCreate
SetID sets the "id" field.
func (*ObservationCreate) SetNillableCreatedAt ¶
func (_c *ObservationCreate) SetNillableCreatedAt(v *time.Time) *ObservationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ObservationCreate) SetNillableID ¶
func (_c *ObservationCreate) SetNillableID(v *uuid.UUID) *ObservationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ObservationCreate) SetNillableSourceEndIndex ¶
func (_c *ObservationCreate) SetNillableSourceEndIndex(v *int) *ObservationCreate
SetNillableSourceEndIndex sets the "source_end_index" field if the given value is not nil.
func (*ObservationCreate) SetNillableSourceStartIndex ¶
func (_c *ObservationCreate) SetNillableSourceStartIndex(v *int) *ObservationCreate
SetNillableSourceStartIndex sets the "source_start_index" field if the given value is not nil.
func (*ObservationCreate) SetNillableTokenCount ¶
func (_c *ObservationCreate) SetNillableTokenCount(v *int) *ObservationCreate
SetNillableTokenCount sets the "token_count" field if the given value is not nil.
func (*ObservationCreate) SetSessionKey ¶
func (_c *ObservationCreate) SetSessionKey(v string) *ObservationCreate
SetSessionKey sets the "session_key" field.
func (*ObservationCreate) SetSourceEndIndex ¶
func (_c *ObservationCreate) SetSourceEndIndex(v int) *ObservationCreate
SetSourceEndIndex sets the "source_end_index" field.
func (*ObservationCreate) SetSourceStartIndex ¶
func (_c *ObservationCreate) SetSourceStartIndex(v int) *ObservationCreate
SetSourceStartIndex sets the "source_start_index" field.
func (*ObservationCreate) SetTokenCount ¶
func (_c *ObservationCreate) SetTokenCount(v int) *ObservationCreate
SetTokenCount sets the "token_count" field.
type ObservationCreateBulk ¶
type ObservationCreateBulk struct {
// contains filtered or unexported fields
}
ObservationCreateBulk is the builder for creating many Observation entities in bulk.
func (*ObservationCreateBulk) Exec ¶
func (_c *ObservationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ObservationCreateBulk) ExecX ¶
func (_c *ObservationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ObservationCreateBulk) Save ¶
func (_c *ObservationCreateBulk) Save(ctx context.Context) ([]*Observation, error)
Save creates the Observation entities in the database.
func (*ObservationCreateBulk) SaveX ¶
func (_c *ObservationCreateBulk) SaveX(ctx context.Context) []*Observation
SaveX is like Save, but panics if an error occurs.
type ObservationDelete ¶
type ObservationDelete struct {
// contains filtered or unexported fields
}
ObservationDelete is the builder for deleting a Observation entity.
func (*ObservationDelete) Exec ¶
func (_d *ObservationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ObservationDelete) ExecX ¶
func (_d *ObservationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ObservationDelete) Where ¶
func (_d *ObservationDelete) Where(ps ...predicate.Observation) *ObservationDelete
Where appends a list predicates to the ObservationDelete builder.
type ObservationDeleteOne ¶
type ObservationDeleteOne struct {
// contains filtered or unexported fields
}
ObservationDeleteOne is the builder for deleting a single Observation entity.
func (*ObservationDeleteOne) Exec ¶
func (_d *ObservationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ObservationDeleteOne) ExecX ¶
func (_d *ObservationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ObservationDeleteOne) Where ¶
func (_d *ObservationDeleteOne) Where(ps ...predicate.Observation) *ObservationDeleteOne
Where appends a list predicates to the ObservationDelete builder.
type ObservationGroupBy ¶
type ObservationGroupBy struct {
// contains filtered or unexported fields
}
ObservationGroupBy is the group-by builder for Observation entities.
func (*ObservationGroupBy) Aggregate ¶
func (_g *ObservationGroupBy) Aggregate(fns ...AggregateFunc) *ObservationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ObservationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ObservationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ObservationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ObservationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ObservationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ObservationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ObservationGroupBy) Scan ¶
func (_g *ObservationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ObservationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ObservationMutation ¶
type ObservationMutation struct {
// contains filtered or unexported fields
}
ObservationMutation represents an operation that mutates the Observation nodes in the graph.
func (*ObservationMutation) AddField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) AddSourceEndIndex ¶
func (m *ObservationMutation) AddSourceEndIndex(i int)
AddSourceEndIndex adds i to the "source_end_index" field.
func (*ObservationMutation) AddSourceStartIndex ¶
func (m *ObservationMutation) AddSourceStartIndex(i int)
AddSourceStartIndex adds i to the "source_start_index" field.
func (*ObservationMutation) AddTokenCount ¶
func (m *ObservationMutation) AddTokenCount(i int)
AddTokenCount adds i to the "token_count" field.
func (*ObservationMutation) AddedEdges ¶
func (m *ObservationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ObservationMutation) AddedField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) AddedFields ¶
func (m *ObservationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ObservationMutation) AddedIDs ¶
func (m *ObservationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ObservationMutation) AddedSourceEndIndex ¶
func (m *ObservationMutation) AddedSourceEndIndex() (r int, exists bool)
AddedSourceEndIndex returns the value that was added to the "source_end_index" field in this mutation.
func (*ObservationMutation) AddedSourceStartIndex ¶
func (m *ObservationMutation) AddedSourceStartIndex() (r int, exists bool)
AddedSourceStartIndex returns the value that was added to the "source_start_index" field in this mutation.
func (*ObservationMutation) AddedTokenCount ¶
func (m *ObservationMutation) AddedTokenCount() (r int, exists bool)
AddedTokenCount returns the value that was added to the "token_count" field in this mutation.
func (*ObservationMutation) ClearEdge ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ClearField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ClearedEdges ¶
func (m *ObservationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ObservationMutation) ClearedFields ¶
func (m *ObservationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ObservationMutation) Client ¶
func (m ObservationMutation) 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 (*ObservationMutation) Content ¶
func (m *ObservationMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*ObservationMutation) CreatedAt ¶
func (m *ObservationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ObservationMutation) EdgeCleared ¶
func (m *ObservationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ObservationMutation) Field ¶
func (m *ObservationMutation) 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 (*ObservationMutation) FieldCleared ¶
func (m *ObservationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ObservationMutation) Fields ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ID ¶
func (m *ObservationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ObservationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ObservationMutation) OldContent ¶
func (m *ObservationMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) 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 (*ObservationMutation) OldSessionKey ¶
func (m *ObservationMutation) OldSessionKey(ctx context.Context) (v string, err error)
OldSessionKey returns the old "session_key" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) OldSourceEndIndex ¶
func (m *ObservationMutation) OldSourceEndIndex(ctx context.Context) (v int, err error)
OldSourceEndIndex returns the old "source_end_index" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) OldSourceStartIndex ¶
func (m *ObservationMutation) OldSourceStartIndex(ctx context.Context) (v int, err error)
OldSourceStartIndex returns the old "source_start_index" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) OldTokenCount ¶
func (m *ObservationMutation) OldTokenCount(ctx context.Context) (v int, err error)
OldTokenCount returns the old "token_count" field's value of the Observation entity. If the Observation 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 (*ObservationMutation) Op ¶
func (m *ObservationMutation) Op() Op
Op returns the operation name.
func (*ObservationMutation) RemovedEdges ¶
func (m *ObservationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ObservationMutation) RemovedIDs ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ResetContent ¶
func (m *ObservationMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*ObservationMutation) ResetCreatedAt ¶
func (m *ObservationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ObservationMutation) ResetEdge ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ResetField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) ResetSessionKey ¶
func (m *ObservationMutation) ResetSessionKey()
ResetSessionKey resets all changes to the "session_key" field.
func (*ObservationMutation) ResetSourceEndIndex ¶
func (m *ObservationMutation) ResetSourceEndIndex()
ResetSourceEndIndex resets all changes to the "source_end_index" field.
func (*ObservationMutation) ResetSourceStartIndex ¶
func (m *ObservationMutation) ResetSourceStartIndex()
ResetSourceStartIndex resets all changes to the "source_start_index" field.
func (*ObservationMutation) ResetTokenCount ¶
func (m *ObservationMutation) ResetTokenCount()
ResetTokenCount resets all changes to the "token_count" field.
func (*ObservationMutation) SessionKey ¶
func (m *ObservationMutation) SessionKey() (r string, exists bool)
SessionKey returns the value of the "session_key" field in the mutation.
func (*ObservationMutation) SetContent ¶
func (m *ObservationMutation) SetContent(s string)
SetContent sets the "content" field.
func (*ObservationMutation) SetCreatedAt ¶
func (m *ObservationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ObservationMutation) SetField ¶
func (m *ObservationMutation) 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 (*ObservationMutation) SetID ¶
func (m *ObservationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Observation entities.
func (*ObservationMutation) SetOp ¶
func (m *ObservationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ObservationMutation) SetSessionKey ¶
func (m *ObservationMutation) SetSessionKey(s string)
SetSessionKey sets the "session_key" field.
func (*ObservationMutation) SetSourceEndIndex ¶
func (m *ObservationMutation) SetSourceEndIndex(i int)
SetSourceEndIndex sets the "source_end_index" field.
func (*ObservationMutation) SetSourceStartIndex ¶
func (m *ObservationMutation) SetSourceStartIndex(i int)
SetSourceStartIndex sets the "source_start_index" field.
func (*ObservationMutation) SetTokenCount ¶
func (m *ObservationMutation) SetTokenCount(i int)
SetTokenCount sets the "token_count" field.
func (*ObservationMutation) SourceEndIndex ¶
func (m *ObservationMutation) SourceEndIndex() (r int, exists bool)
SourceEndIndex returns the value of the "source_end_index" field in the mutation.
func (*ObservationMutation) SourceStartIndex ¶
func (m *ObservationMutation) SourceStartIndex() (r int, exists bool)
SourceStartIndex returns the value of the "source_start_index" field in the mutation.
func (*ObservationMutation) TokenCount ¶
func (m *ObservationMutation) TokenCount() (r int, exists bool)
TokenCount returns the value of the "token_count" field in the mutation.
func (ObservationMutation) Tx ¶
func (m ObservationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ObservationMutation) Type ¶
func (m *ObservationMutation) Type() string
Type returns the node type of this mutation (Observation).
func (*ObservationMutation) Where ¶
func (m *ObservationMutation) Where(ps ...predicate.Observation)
Where appends a list predicates to the ObservationMutation builder.
func (*ObservationMutation) WhereP ¶
func (m *ObservationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ObservationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ObservationQuery ¶
type ObservationQuery struct {
// contains filtered or unexported fields
}
ObservationQuery is the builder for querying Observation entities.
func (*ObservationQuery) Aggregate ¶
func (_q *ObservationQuery) Aggregate(fns ...AggregateFunc) *ObservationSelect
Aggregate returns a ObservationSelect configured with the given aggregations.
func (*ObservationQuery) All ¶
func (_q *ObservationQuery) All(ctx context.Context) ([]*Observation, error)
All executes the query and returns a list of Observations.
func (*ObservationQuery) AllX ¶
func (_q *ObservationQuery) AllX(ctx context.Context) []*Observation
AllX is like All, but panics if an error occurs.
func (*ObservationQuery) Clone ¶
func (_q *ObservationQuery) Clone() *ObservationQuery
Clone returns a duplicate of the ObservationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ObservationQuery) Count ¶
func (_q *ObservationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ObservationQuery) CountX ¶
func (_q *ObservationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ObservationQuery) Exist ¶
func (_q *ObservationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ObservationQuery) ExistX ¶
func (_q *ObservationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ObservationQuery) First ¶
func (_q *ObservationQuery) First(ctx context.Context) (*Observation, error)
First returns the first Observation entity from the query. Returns a *NotFoundError when no Observation was found.
func (*ObservationQuery) FirstID ¶
FirstID returns the first Observation ID from the query. Returns a *NotFoundError when no Observation ID was found.
func (*ObservationQuery) FirstIDX ¶
func (_q *ObservationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ObservationQuery) FirstX ¶
func (_q *ObservationQuery) FirstX(ctx context.Context) *Observation
FirstX is like First, but panics if an error occurs.
func (*ObservationQuery) GroupBy ¶
func (_q *ObservationQuery) GroupBy(field string, fields ...string) *ObservationGroupBy
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 {
SessionKey string `json:"session_key,omitempty"`
Count int `json:"count,omitempty"`
}
client.Observation.Query().
GroupBy(observation.FieldSessionKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ObservationQuery) IDsX ¶
func (_q *ObservationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ObservationQuery) Limit ¶
func (_q *ObservationQuery) Limit(limit int) *ObservationQuery
Limit the number of records to be returned by this query.
func (*ObservationQuery) Offset ¶
func (_q *ObservationQuery) Offset(offset int) *ObservationQuery
Offset to start from.
func (*ObservationQuery) Only ¶
func (_q *ObservationQuery) Only(ctx context.Context) (*Observation, error)
Only returns a single Observation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Observation entity is found. Returns a *NotFoundError when no Observation entities are found.
func (*ObservationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Observation ID in the query. Returns a *NotSingularError when more than one Observation ID is found. Returns a *NotFoundError when no entities are found.
func (*ObservationQuery) OnlyIDX ¶
func (_q *ObservationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ObservationQuery) OnlyX ¶
func (_q *ObservationQuery) OnlyX(ctx context.Context) *Observation
OnlyX is like Only, but panics if an error occurs.
func (*ObservationQuery) Order ¶
func (_q *ObservationQuery) Order(o ...observation.OrderOption) *ObservationQuery
Order specifies how the records should be ordered.
func (*ObservationQuery) Select ¶
func (_q *ObservationQuery) Select(fields ...string) *ObservationSelect
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 {
SessionKey string `json:"session_key,omitempty"`
}
client.Observation.Query().
Select(observation.FieldSessionKey).
Scan(ctx, &v)
func (*ObservationQuery) Unique ¶
func (_q *ObservationQuery) Unique(unique bool) *ObservationQuery
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 (*ObservationQuery) Where ¶
func (_q *ObservationQuery) Where(ps ...predicate.Observation) *ObservationQuery
Where adds a new predicate for the ObservationQuery builder.
type ObservationSelect ¶
type ObservationSelect struct {
*ObservationQuery
// contains filtered or unexported fields
}
ObservationSelect is the builder for selecting fields of Observation entities.
func (*ObservationSelect) Aggregate ¶
func (_s *ObservationSelect) Aggregate(fns ...AggregateFunc) *ObservationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ObservationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ObservationSelect) Scan ¶
func (_s *ObservationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ObservationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ObservationUpdate ¶
type ObservationUpdate struct {
// contains filtered or unexported fields
}
ObservationUpdate is the builder for updating Observation entities.
func (*ObservationUpdate) AddSourceEndIndex ¶
func (_u *ObservationUpdate) AddSourceEndIndex(v int) *ObservationUpdate
AddSourceEndIndex adds value to the "source_end_index" field.
func (*ObservationUpdate) AddSourceStartIndex ¶
func (_u *ObservationUpdate) AddSourceStartIndex(v int) *ObservationUpdate
AddSourceStartIndex adds value to the "source_start_index" field.
func (*ObservationUpdate) AddTokenCount ¶
func (_u *ObservationUpdate) AddTokenCount(v int) *ObservationUpdate
AddTokenCount adds value to the "token_count" field.
func (*ObservationUpdate) Exec ¶
func (_u *ObservationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ObservationUpdate) ExecX ¶
func (_u *ObservationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ObservationUpdate) Mutation ¶
func (_u *ObservationUpdate) Mutation() *ObservationMutation
Mutation returns the ObservationMutation object of the builder.
func (*ObservationUpdate) Save ¶
func (_u *ObservationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ObservationUpdate) SaveX ¶
func (_u *ObservationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ObservationUpdate) SetContent ¶
func (_u *ObservationUpdate) SetContent(v string) *ObservationUpdate
SetContent sets the "content" field.
func (*ObservationUpdate) SetNillableContent ¶
func (_u *ObservationUpdate) SetNillableContent(v *string) *ObservationUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*ObservationUpdate) SetNillableSessionKey ¶
func (_u *ObservationUpdate) SetNillableSessionKey(v *string) *ObservationUpdate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*ObservationUpdate) SetNillableSourceEndIndex ¶
func (_u *ObservationUpdate) SetNillableSourceEndIndex(v *int) *ObservationUpdate
SetNillableSourceEndIndex sets the "source_end_index" field if the given value is not nil.
func (*ObservationUpdate) SetNillableSourceStartIndex ¶
func (_u *ObservationUpdate) SetNillableSourceStartIndex(v *int) *ObservationUpdate
SetNillableSourceStartIndex sets the "source_start_index" field if the given value is not nil.
func (*ObservationUpdate) SetNillableTokenCount ¶
func (_u *ObservationUpdate) SetNillableTokenCount(v *int) *ObservationUpdate
SetNillableTokenCount sets the "token_count" field if the given value is not nil.
func (*ObservationUpdate) SetSessionKey ¶
func (_u *ObservationUpdate) SetSessionKey(v string) *ObservationUpdate
SetSessionKey sets the "session_key" field.
func (*ObservationUpdate) SetSourceEndIndex ¶
func (_u *ObservationUpdate) SetSourceEndIndex(v int) *ObservationUpdate
SetSourceEndIndex sets the "source_end_index" field.
func (*ObservationUpdate) SetSourceStartIndex ¶
func (_u *ObservationUpdate) SetSourceStartIndex(v int) *ObservationUpdate
SetSourceStartIndex sets the "source_start_index" field.
func (*ObservationUpdate) SetTokenCount ¶
func (_u *ObservationUpdate) SetTokenCount(v int) *ObservationUpdate
SetTokenCount sets the "token_count" field.
func (*ObservationUpdate) Where ¶
func (_u *ObservationUpdate) Where(ps ...predicate.Observation) *ObservationUpdate
Where appends a list predicates to the ObservationUpdate builder.
type ObservationUpdateOne ¶
type ObservationUpdateOne struct {
// contains filtered or unexported fields
}
ObservationUpdateOne is the builder for updating a single Observation entity.
func (*ObservationUpdateOne) AddSourceEndIndex ¶
func (_u *ObservationUpdateOne) AddSourceEndIndex(v int) *ObservationUpdateOne
AddSourceEndIndex adds value to the "source_end_index" field.
func (*ObservationUpdateOne) AddSourceStartIndex ¶
func (_u *ObservationUpdateOne) AddSourceStartIndex(v int) *ObservationUpdateOne
AddSourceStartIndex adds value to the "source_start_index" field.
func (*ObservationUpdateOne) AddTokenCount ¶
func (_u *ObservationUpdateOne) AddTokenCount(v int) *ObservationUpdateOne
AddTokenCount adds value to the "token_count" field.
func (*ObservationUpdateOne) Exec ¶
func (_u *ObservationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ObservationUpdateOne) ExecX ¶
func (_u *ObservationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ObservationUpdateOne) Mutation ¶
func (_u *ObservationUpdateOne) Mutation() *ObservationMutation
Mutation returns the ObservationMutation object of the builder.
func (*ObservationUpdateOne) Save ¶
func (_u *ObservationUpdateOne) Save(ctx context.Context) (*Observation, error)
Save executes the query and returns the updated Observation entity.
func (*ObservationUpdateOne) SaveX ¶
func (_u *ObservationUpdateOne) SaveX(ctx context.Context) *Observation
SaveX is like Save, but panics if an error occurs.
func (*ObservationUpdateOne) Select ¶
func (_u *ObservationUpdateOne) Select(field string, fields ...string) *ObservationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ObservationUpdateOne) SetContent ¶
func (_u *ObservationUpdateOne) SetContent(v string) *ObservationUpdateOne
SetContent sets the "content" field.
func (*ObservationUpdateOne) SetNillableContent ¶
func (_u *ObservationUpdateOne) SetNillableContent(v *string) *ObservationUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*ObservationUpdateOne) SetNillableSessionKey ¶
func (_u *ObservationUpdateOne) SetNillableSessionKey(v *string) *ObservationUpdateOne
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*ObservationUpdateOne) SetNillableSourceEndIndex ¶
func (_u *ObservationUpdateOne) SetNillableSourceEndIndex(v *int) *ObservationUpdateOne
SetNillableSourceEndIndex sets the "source_end_index" field if the given value is not nil.
func (*ObservationUpdateOne) SetNillableSourceStartIndex ¶
func (_u *ObservationUpdateOne) SetNillableSourceStartIndex(v *int) *ObservationUpdateOne
SetNillableSourceStartIndex sets the "source_start_index" field if the given value is not nil.
func (*ObservationUpdateOne) SetNillableTokenCount ¶
func (_u *ObservationUpdateOne) SetNillableTokenCount(v *int) *ObservationUpdateOne
SetNillableTokenCount sets the "token_count" field if the given value is not nil.
func (*ObservationUpdateOne) SetSessionKey ¶
func (_u *ObservationUpdateOne) SetSessionKey(v string) *ObservationUpdateOne
SetSessionKey sets the "session_key" field.
func (*ObservationUpdateOne) SetSourceEndIndex ¶
func (_u *ObservationUpdateOne) SetSourceEndIndex(v int) *ObservationUpdateOne
SetSourceEndIndex sets the "source_end_index" field.
func (*ObservationUpdateOne) SetSourceStartIndex ¶
func (_u *ObservationUpdateOne) SetSourceStartIndex(v int) *ObservationUpdateOne
SetSourceStartIndex sets the "source_start_index" field.
func (*ObservationUpdateOne) SetTokenCount ¶
func (_u *ObservationUpdateOne) SetTokenCount(v int) *ObservationUpdateOne
SetTokenCount sets the "token_count" field.
func (*ObservationUpdateOne) Where ¶
func (_u *ObservationUpdateOne) Where(ps ...predicate.Observation) *ObservationUpdateOne
Where appends a list predicates to the ObservationUpdate builder.
type Observations ¶
type Observations []*Observation
Observations is a parsable slice of Observation.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PaymentTx ¶
type PaymentTx struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// On-chain transaction hash
TxHash string `json:"tx_hash,omitempty"`
// Sender wallet address
FromAddress string `json:"from_address,omitempty"`
// Recipient wallet address
ToAddress string `json:"to_address,omitempty"`
// Transaction amount in USDC (decimal string)
Amount string `json:"amount,omitempty"`
// EVM chain ID
ChainID int64 `json:"chain_id,omitempty"`
// Transaction lifecycle status
Status paymenttx.Status `json:"status,omitempty"`
// Agent session key that initiated this transaction
SessionKey string `json:"session_key,omitempty"`
// Human-readable purpose of the payment
Purpose string `json:"purpose,omitempty"`
// URL that triggered X402 payment (if applicable)
X402URL string `json:"x402_url,omitempty"`
// How the payment was made: direct ERC-20 transfer, X402 V2, or P2P settlement
PaymentMethod paymenttx.PaymentMethod `json:"payment_method,omitempty"`
// Error details if transaction failed
ErrorMessage string `json:"error_message,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
PaymentTx is the model entity for the PaymentTx schema.
func (*PaymentTx) Unwrap ¶
Unwrap unwraps the PaymentTx 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 (*PaymentTx) Update ¶
func (_m *PaymentTx) Update() *PaymentTxUpdateOne
Update returns a builder for updating this PaymentTx. Note that you need to call PaymentTx.Unwrap() before calling this method if this PaymentTx was returned from a transaction, and the transaction was committed or rolled back.
type PaymentTxClient ¶
type PaymentTxClient struct {
// contains filtered or unexported fields
}
PaymentTxClient is a client for the PaymentTx schema.
func NewPaymentTxClient ¶
func NewPaymentTxClient(c config) *PaymentTxClient
NewPaymentTxClient returns a client for the PaymentTx from the given config.
func (*PaymentTxClient) Create ¶
func (c *PaymentTxClient) Create() *PaymentTxCreate
Create returns a builder for creating a PaymentTx entity.
func (*PaymentTxClient) CreateBulk ¶
func (c *PaymentTxClient) CreateBulk(builders ...*PaymentTxCreate) *PaymentTxCreateBulk
CreateBulk returns a builder for creating a bulk of PaymentTx entities.
func (*PaymentTxClient) Delete ¶
func (c *PaymentTxClient) Delete() *PaymentTxDelete
Delete returns a delete builder for PaymentTx.
func (*PaymentTxClient) DeleteOne ¶
func (c *PaymentTxClient) DeleteOne(_m *PaymentTx) *PaymentTxDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PaymentTxClient) DeleteOneID ¶
func (c *PaymentTxClient) DeleteOneID(id uuid.UUID) *PaymentTxDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PaymentTxClient) Hooks ¶
func (c *PaymentTxClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PaymentTxClient) Intercept ¶
func (c *PaymentTxClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `paymenttx.Intercept(f(g(h())))`.
func (*PaymentTxClient) Interceptors ¶
func (c *PaymentTxClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PaymentTxClient) MapCreateBulk ¶
func (c *PaymentTxClient) MapCreateBulk(slice any, setFunc func(*PaymentTxCreate, int)) *PaymentTxCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PaymentTxClient) Query ¶
func (c *PaymentTxClient) Query() *PaymentTxQuery
Query returns a query builder for PaymentTx.
func (*PaymentTxClient) Update ¶
func (c *PaymentTxClient) Update() *PaymentTxUpdate
Update returns an update builder for PaymentTx.
func (*PaymentTxClient) UpdateOne ¶
func (c *PaymentTxClient) UpdateOne(_m *PaymentTx) *PaymentTxUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PaymentTxClient) UpdateOneID ¶
func (c *PaymentTxClient) UpdateOneID(id uuid.UUID) *PaymentTxUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PaymentTxClient) Use ¶
func (c *PaymentTxClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `paymenttx.Hooks(f(g(h())))`.
type PaymentTxCreate ¶
type PaymentTxCreate struct {
// contains filtered or unexported fields
}
PaymentTxCreate is the builder for creating a PaymentTx entity.
func (*PaymentTxCreate) Exec ¶
func (_c *PaymentTxCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentTxCreate) ExecX ¶
func (_c *PaymentTxCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentTxCreate) Mutation ¶
func (_c *PaymentTxCreate) Mutation() *PaymentTxMutation
Mutation returns the PaymentTxMutation object of the builder.
func (*PaymentTxCreate) Save ¶
func (_c *PaymentTxCreate) Save(ctx context.Context) (*PaymentTx, error)
Save creates the PaymentTx in the database.
func (*PaymentTxCreate) SaveX ¶
func (_c *PaymentTxCreate) SaveX(ctx context.Context) *PaymentTx
SaveX calls Save and panics if Save returns an error.
func (*PaymentTxCreate) SetAmount ¶
func (_c *PaymentTxCreate) SetAmount(v string) *PaymentTxCreate
SetAmount sets the "amount" field.
func (*PaymentTxCreate) SetChainID ¶
func (_c *PaymentTxCreate) SetChainID(v int64) *PaymentTxCreate
SetChainID sets the "chain_id" field.
func (*PaymentTxCreate) SetCreatedAt ¶
func (_c *PaymentTxCreate) SetCreatedAt(v time.Time) *PaymentTxCreate
SetCreatedAt sets the "created_at" field.
func (*PaymentTxCreate) SetErrorMessage ¶
func (_c *PaymentTxCreate) SetErrorMessage(v string) *PaymentTxCreate
SetErrorMessage sets the "error_message" field.
func (*PaymentTxCreate) SetFromAddress ¶
func (_c *PaymentTxCreate) SetFromAddress(v string) *PaymentTxCreate
SetFromAddress sets the "from_address" field.
func (*PaymentTxCreate) SetID ¶
func (_c *PaymentTxCreate) SetID(v uuid.UUID) *PaymentTxCreate
SetID sets the "id" field.
func (*PaymentTxCreate) SetNillableCreatedAt ¶
func (_c *PaymentTxCreate) SetNillableCreatedAt(v *time.Time) *PaymentTxCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PaymentTxCreate) SetNillableErrorMessage ¶
func (_c *PaymentTxCreate) SetNillableErrorMessage(v *string) *PaymentTxCreate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*PaymentTxCreate) SetNillableID ¶
func (_c *PaymentTxCreate) SetNillableID(v *uuid.UUID) *PaymentTxCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PaymentTxCreate) SetNillablePaymentMethod ¶
func (_c *PaymentTxCreate) SetNillablePaymentMethod(v *paymenttx.PaymentMethod) *PaymentTxCreate
SetNillablePaymentMethod sets the "payment_method" field if the given value is not nil.
func (*PaymentTxCreate) SetNillablePurpose ¶
func (_c *PaymentTxCreate) SetNillablePurpose(v *string) *PaymentTxCreate
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*PaymentTxCreate) SetNillableSessionKey ¶
func (_c *PaymentTxCreate) SetNillableSessionKey(v *string) *PaymentTxCreate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*PaymentTxCreate) SetNillableStatus ¶
func (_c *PaymentTxCreate) SetNillableStatus(v *paymenttx.Status) *PaymentTxCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PaymentTxCreate) SetNillableTxHash ¶
func (_c *PaymentTxCreate) SetNillableTxHash(v *string) *PaymentTxCreate
SetNillableTxHash sets the "tx_hash" field if the given value is not nil.
func (*PaymentTxCreate) SetNillableUpdatedAt ¶
func (_c *PaymentTxCreate) SetNillableUpdatedAt(v *time.Time) *PaymentTxCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PaymentTxCreate) SetNillableX402URL ¶
func (_c *PaymentTxCreate) SetNillableX402URL(v *string) *PaymentTxCreate
SetNillableX402URL sets the "x402_url" field if the given value is not nil.
func (*PaymentTxCreate) SetPaymentMethod ¶
func (_c *PaymentTxCreate) SetPaymentMethod(v paymenttx.PaymentMethod) *PaymentTxCreate
SetPaymentMethod sets the "payment_method" field.
func (*PaymentTxCreate) SetPurpose ¶
func (_c *PaymentTxCreate) SetPurpose(v string) *PaymentTxCreate
SetPurpose sets the "purpose" field.
func (*PaymentTxCreate) SetSessionKey ¶
func (_c *PaymentTxCreate) SetSessionKey(v string) *PaymentTxCreate
SetSessionKey sets the "session_key" field.
func (*PaymentTxCreate) SetStatus ¶
func (_c *PaymentTxCreate) SetStatus(v paymenttx.Status) *PaymentTxCreate
SetStatus sets the "status" field.
func (*PaymentTxCreate) SetToAddress ¶
func (_c *PaymentTxCreate) SetToAddress(v string) *PaymentTxCreate
SetToAddress sets the "to_address" field.
func (*PaymentTxCreate) SetTxHash ¶
func (_c *PaymentTxCreate) SetTxHash(v string) *PaymentTxCreate
SetTxHash sets the "tx_hash" field.
func (*PaymentTxCreate) SetUpdatedAt ¶
func (_c *PaymentTxCreate) SetUpdatedAt(v time.Time) *PaymentTxCreate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentTxCreate) SetX402URL ¶
func (_c *PaymentTxCreate) SetX402URL(v string) *PaymentTxCreate
SetX402URL sets the "x402_url" field.
type PaymentTxCreateBulk ¶
type PaymentTxCreateBulk struct {
// contains filtered or unexported fields
}
PaymentTxCreateBulk is the builder for creating many PaymentTx entities in bulk.
func (*PaymentTxCreateBulk) Exec ¶
func (_c *PaymentTxCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentTxCreateBulk) ExecX ¶
func (_c *PaymentTxCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PaymentTxDelete ¶
type PaymentTxDelete struct {
// contains filtered or unexported fields
}
PaymentTxDelete is the builder for deleting a PaymentTx entity.
func (*PaymentTxDelete) Exec ¶
func (_d *PaymentTxDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PaymentTxDelete) ExecX ¶
func (_d *PaymentTxDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PaymentTxDelete) Where ¶
func (_d *PaymentTxDelete) Where(ps ...predicate.PaymentTx) *PaymentTxDelete
Where appends a list predicates to the PaymentTxDelete builder.
type PaymentTxDeleteOne ¶
type PaymentTxDeleteOne struct {
// contains filtered or unexported fields
}
PaymentTxDeleteOne is the builder for deleting a single PaymentTx entity.
func (*PaymentTxDeleteOne) Exec ¶
func (_d *PaymentTxDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PaymentTxDeleteOne) ExecX ¶
func (_d *PaymentTxDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentTxDeleteOne) Where ¶
func (_d *PaymentTxDeleteOne) Where(ps ...predicate.PaymentTx) *PaymentTxDeleteOne
Where appends a list predicates to the PaymentTxDelete builder.
type PaymentTxGroupBy ¶
type PaymentTxGroupBy struct {
// contains filtered or unexported fields
}
PaymentTxGroupBy is the group-by builder for PaymentTx entities.
func (*PaymentTxGroupBy) Aggregate ¶
func (_g *PaymentTxGroupBy) Aggregate(fns ...AggregateFunc) *PaymentTxGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PaymentTxGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentTxGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentTxGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentTxGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentTxGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentTxGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentTxGroupBy) Scan ¶
func (_g *PaymentTxGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentTxGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentTxMutation ¶
type PaymentTxMutation struct {
// contains filtered or unexported fields
}
PaymentTxMutation represents an operation that mutates the PaymentTx nodes in the graph.
func (*PaymentTxMutation) AddChainID ¶
func (m *PaymentTxMutation) AddChainID(i int64)
AddChainID adds i to the "chain_id" field.
func (*PaymentTxMutation) AddField ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) AddedChainID ¶
func (m *PaymentTxMutation) AddedChainID() (r int64, exists bool)
AddedChainID returns the value that was added to the "chain_id" field in this mutation.
func (*PaymentTxMutation) AddedEdges ¶
func (m *PaymentTxMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PaymentTxMutation) AddedField ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) AddedFields ¶
func (m *PaymentTxMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PaymentTxMutation) AddedIDs ¶
func (m *PaymentTxMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PaymentTxMutation) Amount ¶
func (m *PaymentTxMutation) Amount() (r string, exists bool)
Amount returns the value of the "amount" field in the mutation.
func (*PaymentTxMutation) ChainID ¶
func (m *PaymentTxMutation) ChainID() (r int64, exists bool)
ChainID returns the value of the "chain_id" field in the mutation.
func (*PaymentTxMutation) ClearEdge ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) ClearErrorMessage ¶
func (m *PaymentTxMutation) ClearErrorMessage()
ClearErrorMessage clears the value of the "error_message" field.
func (*PaymentTxMutation) ClearField ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) ClearPurpose ¶
func (m *PaymentTxMutation) ClearPurpose()
ClearPurpose clears the value of the "purpose" field.
func (*PaymentTxMutation) ClearSessionKey ¶
func (m *PaymentTxMutation) ClearSessionKey()
ClearSessionKey clears the value of the "session_key" field.
func (*PaymentTxMutation) ClearTxHash ¶
func (m *PaymentTxMutation) ClearTxHash()
ClearTxHash clears the value of the "tx_hash" field.
func (*PaymentTxMutation) ClearX402URL ¶
func (m *PaymentTxMutation) ClearX402URL()
ClearX402URL clears the value of the "x402_url" field.
func (*PaymentTxMutation) ClearedEdges ¶
func (m *PaymentTxMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PaymentTxMutation) ClearedFields ¶
func (m *PaymentTxMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PaymentTxMutation) Client ¶
func (m PaymentTxMutation) 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 (*PaymentTxMutation) CreatedAt ¶
func (m *PaymentTxMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PaymentTxMutation) EdgeCleared ¶
func (m *PaymentTxMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PaymentTxMutation) ErrorMessage ¶
func (m *PaymentTxMutation) ErrorMessage() (r string, exists bool)
ErrorMessage returns the value of the "error_message" field in the mutation.
func (*PaymentTxMutation) ErrorMessageCleared ¶
func (m *PaymentTxMutation) ErrorMessageCleared() bool
ErrorMessageCleared returns if the "error_message" field was cleared in this mutation.
func (*PaymentTxMutation) Field ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) FieldCleared ¶
func (m *PaymentTxMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PaymentTxMutation) Fields ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) FromAddress ¶
func (m *PaymentTxMutation) FromAddress() (r string, exists bool)
FromAddress returns the value of the "from_address" field in the mutation.
func (*PaymentTxMutation) ID ¶
func (m *PaymentTxMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PaymentTxMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PaymentTxMutation) OldAmount ¶
func (m *PaymentTxMutation) OldAmount(ctx context.Context) (v string, err error)
OldAmount returns the old "amount" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldChainID ¶
func (m *PaymentTxMutation) OldChainID(ctx context.Context) (v int64, err error)
OldChainID returns the old "chain_id" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldErrorMessage ¶
func (m *PaymentTxMutation) OldErrorMessage(ctx context.Context) (v string, err error)
OldErrorMessage returns the old "error_message" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) 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 (*PaymentTxMutation) OldFromAddress ¶
func (m *PaymentTxMutation) OldFromAddress(ctx context.Context) (v string, err error)
OldFromAddress returns the old "from_address" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldPaymentMethod ¶
func (m *PaymentTxMutation) OldPaymentMethod(ctx context.Context) (v paymenttx.PaymentMethod, err error)
OldPaymentMethod returns the old "payment_method" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldPurpose ¶
func (m *PaymentTxMutation) OldPurpose(ctx context.Context) (v string, err error)
OldPurpose returns the old "purpose" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldSessionKey ¶
func (m *PaymentTxMutation) OldSessionKey(ctx context.Context) (v string, err error)
OldSessionKey returns the old "session_key" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldToAddress ¶
func (m *PaymentTxMutation) OldToAddress(ctx context.Context) (v string, err error)
OldToAddress returns the old "to_address" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldTxHash ¶
func (m *PaymentTxMutation) OldTxHash(ctx context.Context) (v string, err error)
OldTxHash returns the old "tx_hash" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) OldX402URL ¶
func (m *PaymentTxMutation) OldX402URL(ctx context.Context) (v string, err error)
OldX402URL returns the old "x402_url" field's value of the PaymentTx entity. If the PaymentTx 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 (*PaymentTxMutation) PaymentMethod ¶
func (m *PaymentTxMutation) PaymentMethod() (r paymenttx.PaymentMethod, exists bool)
PaymentMethod returns the value of the "payment_method" field in the mutation.
func (*PaymentTxMutation) Purpose ¶
func (m *PaymentTxMutation) Purpose() (r string, exists bool)
Purpose returns the value of the "purpose" field in the mutation.
func (*PaymentTxMutation) PurposeCleared ¶
func (m *PaymentTxMutation) PurposeCleared() bool
PurposeCleared returns if the "purpose" field was cleared in this mutation.
func (*PaymentTxMutation) RemovedEdges ¶
func (m *PaymentTxMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PaymentTxMutation) RemovedIDs ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) ResetAmount ¶
func (m *PaymentTxMutation) ResetAmount()
ResetAmount resets all changes to the "amount" field.
func (*PaymentTxMutation) ResetChainID ¶
func (m *PaymentTxMutation) ResetChainID()
ResetChainID resets all changes to the "chain_id" field.
func (*PaymentTxMutation) ResetCreatedAt ¶
func (m *PaymentTxMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PaymentTxMutation) ResetEdge ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) ResetErrorMessage ¶
func (m *PaymentTxMutation) ResetErrorMessage()
ResetErrorMessage resets all changes to the "error_message" field.
func (*PaymentTxMutation) ResetField ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) ResetFromAddress ¶
func (m *PaymentTxMutation) ResetFromAddress()
ResetFromAddress resets all changes to the "from_address" field.
func (*PaymentTxMutation) ResetPaymentMethod ¶
func (m *PaymentTxMutation) ResetPaymentMethod()
ResetPaymentMethod resets all changes to the "payment_method" field.
func (*PaymentTxMutation) ResetPurpose ¶
func (m *PaymentTxMutation) ResetPurpose()
ResetPurpose resets all changes to the "purpose" field.
func (*PaymentTxMutation) ResetSessionKey ¶
func (m *PaymentTxMutation) ResetSessionKey()
ResetSessionKey resets all changes to the "session_key" field.
func (*PaymentTxMutation) ResetStatus ¶
func (m *PaymentTxMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*PaymentTxMutation) ResetToAddress ¶
func (m *PaymentTxMutation) ResetToAddress()
ResetToAddress resets all changes to the "to_address" field.
func (*PaymentTxMutation) ResetTxHash ¶
func (m *PaymentTxMutation) ResetTxHash()
ResetTxHash resets all changes to the "tx_hash" field.
func (*PaymentTxMutation) ResetUpdatedAt ¶
func (m *PaymentTxMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PaymentTxMutation) ResetX402URL ¶
func (m *PaymentTxMutation) ResetX402URL()
ResetX402URL resets all changes to the "x402_url" field.
func (*PaymentTxMutation) SessionKey ¶
func (m *PaymentTxMutation) SessionKey() (r string, exists bool)
SessionKey returns the value of the "session_key" field in the mutation.
func (*PaymentTxMutation) SessionKeyCleared ¶
func (m *PaymentTxMutation) SessionKeyCleared() bool
SessionKeyCleared returns if the "session_key" field was cleared in this mutation.
func (*PaymentTxMutation) SetAmount ¶
func (m *PaymentTxMutation) SetAmount(s string)
SetAmount sets the "amount" field.
func (*PaymentTxMutation) SetChainID ¶
func (m *PaymentTxMutation) SetChainID(i int64)
SetChainID sets the "chain_id" field.
func (*PaymentTxMutation) SetCreatedAt ¶
func (m *PaymentTxMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PaymentTxMutation) SetErrorMessage ¶
func (m *PaymentTxMutation) SetErrorMessage(s string)
SetErrorMessage sets the "error_message" field.
func (*PaymentTxMutation) SetField ¶
func (m *PaymentTxMutation) 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 (*PaymentTxMutation) SetFromAddress ¶
func (m *PaymentTxMutation) SetFromAddress(s string)
SetFromAddress sets the "from_address" field.
func (*PaymentTxMutation) SetID ¶
func (m *PaymentTxMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of PaymentTx entities.
func (*PaymentTxMutation) SetOp ¶
func (m *PaymentTxMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PaymentTxMutation) SetPaymentMethod ¶
func (m *PaymentTxMutation) SetPaymentMethod(pm paymenttx.PaymentMethod)
SetPaymentMethod sets the "payment_method" field.
func (*PaymentTxMutation) SetPurpose ¶
func (m *PaymentTxMutation) SetPurpose(s string)
SetPurpose sets the "purpose" field.
func (*PaymentTxMutation) SetSessionKey ¶
func (m *PaymentTxMutation) SetSessionKey(s string)
SetSessionKey sets the "session_key" field.
func (*PaymentTxMutation) SetStatus ¶
func (m *PaymentTxMutation) SetStatus(pa paymenttx.Status)
SetStatus sets the "status" field.
func (*PaymentTxMutation) SetToAddress ¶
func (m *PaymentTxMutation) SetToAddress(s string)
SetToAddress sets the "to_address" field.
func (*PaymentTxMutation) SetTxHash ¶
func (m *PaymentTxMutation) SetTxHash(s string)
SetTxHash sets the "tx_hash" field.
func (*PaymentTxMutation) SetUpdatedAt ¶
func (m *PaymentTxMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PaymentTxMutation) SetX402URL ¶
func (m *PaymentTxMutation) SetX402URL(s string)
SetX402URL sets the "x402_url" field.
func (*PaymentTxMutation) Status ¶
func (m *PaymentTxMutation) Status() (r paymenttx.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*PaymentTxMutation) ToAddress ¶
func (m *PaymentTxMutation) ToAddress() (r string, exists bool)
ToAddress returns the value of the "to_address" field in the mutation.
func (PaymentTxMutation) Tx ¶
func (m PaymentTxMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PaymentTxMutation) TxHash ¶
func (m *PaymentTxMutation) TxHash() (r string, exists bool)
TxHash returns the value of the "tx_hash" field in the mutation.
func (*PaymentTxMutation) TxHashCleared ¶
func (m *PaymentTxMutation) TxHashCleared() bool
TxHashCleared returns if the "tx_hash" field was cleared in this mutation.
func (*PaymentTxMutation) Type ¶
func (m *PaymentTxMutation) Type() string
Type returns the node type of this mutation (PaymentTx).
func (*PaymentTxMutation) UpdatedAt ¶
func (m *PaymentTxMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PaymentTxMutation) Where ¶
func (m *PaymentTxMutation) Where(ps ...predicate.PaymentTx)
Where appends a list predicates to the PaymentTxMutation builder.
func (*PaymentTxMutation) WhereP ¶
func (m *PaymentTxMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PaymentTxMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*PaymentTxMutation) X402URL ¶
func (m *PaymentTxMutation) X402URL() (r string, exists bool)
X402URL returns the value of the "x402_url" field in the mutation.
func (*PaymentTxMutation) X402URLCleared ¶
func (m *PaymentTxMutation) X402URLCleared() bool
X402URLCleared returns if the "x402_url" field was cleared in this mutation.
type PaymentTxQuery ¶
type PaymentTxQuery struct {
// contains filtered or unexported fields
}
PaymentTxQuery is the builder for querying PaymentTx entities.
func (*PaymentTxQuery) Aggregate ¶
func (_q *PaymentTxQuery) Aggregate(fns ...AggregateFunc) *PaymentTxSelect
Aggregate returns a PaymentTxSelect configured with the given aggregations.
func (*PaymentTxQuery) All ¶
func (_q *PaymentTxQuery) All(ctx context.Context) ([]*PaymentTx, error)
All executes the query and returns a list of PaymentTxes.
func (*PaymentTxQuery) AllX ¶
func (_q *PaymentTxQuery) AllX(ctx context.Context) []*PaymentTx
AllX is like All, but panics if an error occurs.
func (*PaymentTxQuery) Clone ¶
func (_q *PaymentTxQuery) Clone() *PaymentTxQuery
Clone returns a duplicate of the PaymentTxQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PaymentTxQuery) Count ¶
func (_q *PaymentTxQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PaymentTxQuery) CountX ¶
func (_q *PaymentTxQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PaymentTxQuery) Exist ¶
func (_q *PaymentTxQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PaymentTxQuery) ExistX ¶
func (_q *PaymentTxQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PaymentTxQuery) First ¶
func (_q *PaymentTxQuery) First(ctx context.Context) (*PaymentTx, error)
First returns the first PaymentTx entity from the query. Returns a *NotFoundError when no PaymentTx was found.
func (*PaymentTxQuery) FirstID ¶
FirstID returns the first PaymentTx ID from the query. Returns a *NotFoundError when no PaymentTx ID was found.
func (*PaymentTxQuery) FirstIDX ¶
func (_q *PaymentTxQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PaymentTxQuery) FirstX ¶
func (_q *PaymentTxQuery) FirstX(ctx context.Context) *PaymentTx
FirstX is like First, but panics if an error occurs.
func (*PaymentTxQuery) GroupBy ¶
func (_q *PaymentTxQuery) GroupBy(field string, fields ...string) *PaymentTxGroupBy
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 {
TxHash string `json:"tx_hash,omitempty"`
Count int `json:"count,omitempty"`
}
client.PaymentTx.Query().
GroupBy(paymenttx.FieldTxHash).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PaymentTxQuery) IDsX ¶
func (_q *PaymentTxQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PaymentTxQuery) Limit ¶
func (_q *PaymentTxQuery) Limit(limit int) *PaymentTxQuery
Limit the number of records to be returned by this query.
func (*PaymentTxQuery) Offset ¶
func (_q *PaymentTxQuery) Offset(offset int) *PaymentTxQuery
Offset to start from.
func (*PaymentTxQuery) Only ¶
func (_q *PaymentTxQuery) Only(ctx context.Context) (*PaymentTx, error)
Only returns a single PaymentTx entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PaymentTx entity is found. Returns a *NotFoundError when no PaymentTx entities are found.
func (*PaymentTxQuery) OnlyID ¶
OnlyID is like Only, but returns the only PaymentTx ID in the query. Returns a *NotSingularError when more than one PaymentTx ID is found. Returns a *NotFoundError when no entities are found.
func (*PaymentTxQuery) OnlyIDX ¶
func (_q *PaymentTxQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PaymentTxQuery) OnlyX ¶
func (_q *PaymentTxQuery) OnlyX(ctx context.Context) *PaymentTx
OnlyX is like Only, but panics if an error occurs.
func (*PaymentTxQuery) Order ¶
func (_q *PaymentTxQuery) Order(o ...paymenttx.OrderOption) *PaymentTxQuery
Order specifies how the records should be ordered.
func (*PaymentTxQuery) Select ¶
func (_q *PaymentTxQuery) Select(fields ...string) *PaymentTxSelect
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 {
TxHash string `json:"tx_hash,omitempty"`
}
client.PaymentTx.Query().
Select(paymenttx.FieldTxHash).
Scan(ctx, &v)
func (*PaymentTxQuery) Unique ¶
func (_q *PaymentTxQuery) Unique(unique bool) *PaymentTxQuery
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 (*PaymentTxQuery) Where ¶
func (_q *PaymentTxQuery) Where(ps ...predicate.PaymentTx) *PaymentTxQuery
Where adds a new predicate for the PaymentTxQuery builder.
type PaymentTxSelect ¶
type PaymentTxSelect struct {
*PaymentTxQuery
// contains filtered or unexported fields
}
PaymentTxSelect is the builder for selecting fields of PaymentTx entities.
func (*PaymentTxSelect) Aggregate ¶
func (_s *PaymentTxSelect) Aggregate(fns ...AggregateFunc) *PaymentTxSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PaymentTxSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PaymentTxSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PaymentTxSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PaymentTxSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PaymentTxSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PaymentTxSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PaymentTxSelect) Scan ¶
func (_s *PaymentTxSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PaymentTxSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PaymentTxUpdate ¶
type PaymentTxUpdate struct {
// contains filtered or unexported fields
}
PaymentTxUpdate is the builder for updating PaymentTx entities.
func (*PaymentTxUpdate) AddChainID ¶
func (_u *PaymentTxUpdate) AddChainID(v int64) *PaymentTxUpdate
AddChainID adds value to the "chain_id" field.
func (*PaymentTxUpdate) ClearErrorMessage ¶
func (_u *PaymentTxUpdate) ClearErrorMessage() *PaymentTxUpdate
ClearErrorMessage clears the value of the "error_message" field.
func (*PaymentTxUpdate) ClearPurpose ¶
func (_u *PaymentTxUpdate) ClearPurpose() *PaymentTxUpdate
ClearPurpose clears the value of the "purpose" field.
func (*PaymentTxUpdate) ClearSessionKey ¶
func (_u *PaymentTxUpdate) ClearSessionKey() *PaymentTxUpdate
ClearSessionKey clears the value of the "session_key" field.
func (*PaymentTxUpdate) ClearTxHash ¶
func (_u *PaymentTxUpdate) ClearTxHash() *PaymentTxUpdate
ClearTxHash clears the value of the "tx_hash" field.
func (*PaymentTxUpdate) ClearX402URL ¶
func (_u *PaymentTxUpdate) ClearX402URL() *PaymentTxUpdate
ClearX402URL clears the value of the "x402_url" field.
func (*PaymentTxUpdate) Exec ¶
func (_u *PaymentTxUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PaymentTxUpdate) ExecX ¶
func (_u *PaymentTxUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentTxUpdate) Mutation ¶
func (_u *PaymentTxUpdate) Mutation() *PaymentTxMutation
Mutation returns the PaymentTxMutation object of the builder.
func (*PaymentTxUpdate) Save ¶
func (_u *PaymentTxUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PaymentTxUpdate) SaveX ¶
func (_u *PaymentTxUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PaymentTxUpdate) SetAmount ¶
func (_u *PaymentTxUpdate) SetAmount(v string) *PaymentTxUpdate
SetAmount sets the "amount" field.
func (*PaymentTxUpdate) SetChainID ¶
func (_u *PaymentTxUpdate) SetChainID(v int64) *PaymentTxUpdate
SetChainID sets the "chain_id" field.
func (*PaymentTxUpdate) SetErrorMessage ¶
func (_u *PaymentTxUpdate) SetErrorMessage(v string) *PaymentTxUpdate
SetErrorMessage sets the "error_message" field.
func (*PaymentTxUpdate) SetFromAddress ¶
func (_u *PaymentTxUpdate) SetFromAddress(v string) *PaymentTxUpdate
SetFromAddress sets the "from_address" field.
func (*PaymentTxUpdate) SetNillableAmount ¶
func (_u *PaymentTxUpdate) SetNillableAmount(v *string) *PaymentTxUpdate
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableChainID ¶
func (_u *PaymentTxUpdate) SetNillableChainID(v *int64) *PaymentTxUpdate
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableErrorMessage ¶
func (_u *PaymentTxUpdate) SetNillableErrorMessage(v *string) *PaymentTxUpdate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableFromAddress ¶
func (_u *PaymentTxUpdate) SetNillableFromAddress(v *string) *PaymentTxUpdate
SetNillableFromAddress sets the "from_address" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillablePaymentMethod ¶
func (_u *PaymentTxUpdate) SetNillablePaymentMethod(v *paymenttx.PaymentMethod) *PaymentTxUpdate
SetNillablePaymentMethod sets the "payment_method" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillablePurpose ¶
func (_u *PaymentTxUpdate) SetNillablePurpose(v *string) *PaymentTxUpdate
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableSessionKey ¶
func (_u *PaymentTxUpdate) SetNillableSessionKey(v *string) *PaymentTxUpdate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableStatus ¶
func (_u *PaymentTxUpdate) SetNillableStatus(v *paymenttx.Status) *PaymentTxUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableToAddress ¶
func (_u *PaymentTxUpdate) SetNillableToAddress(v *string) *PaymentTxUpdate
SetNillableToAddress sets the "to_address" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableTxHash ¶
func (_u *PaymentTxUpdate) SetNillableTxHash(v *string) *PaymentTxUpdate
SetNillableTxHash sets the "tx_hash" field if the given value is not nil.
func (*PaymentTxUpdate) SetNillableX402URL ¶
func (_u *PaymentTxUpdate) SetNillableX402URL(v *string) *PaymentTxUpdate
SetNillableX402URL sets the "x402_url" field if the given value is not nil.
func (*PaymentTxUpdate) SetPaymentMethod ¶
func (_u *PaymentTxUpdate) SetPaymentMethod(v paymenttx.PaymentMethod) *PaymentTxUpdate
SetPaymentMethod sets the "payment_method" field.
func (*PaymentTxUpdate) SetPurpose ¶
func (_u *PaymentTxUpdate) SetPurpose(v string) *PaymentTxUpdate
SetPurpose sets the "purpose" field.
func (*PaymentTxUpdate) SetSessionKey ¶
func (_u *PaymentTxUpdate) SetSessionKey(v string) *PaymentTxUpdate
SetSessionKey sets the "session_key" field.
func (*PaymentTxUpdate) SetStatus ¶
func (_u *PaymentTxUpdate) SetStatus(v paymenttx.Status) *PaymentTxUpdate
SetStatus sets the "status" field.
func (*PaymentTxUpdate) SetToAddress ¶
func (_u *PaymentTxUpdate) SetToAddress(v string) *PaymentTxUpdate
SetToAddress sets the "to_address" field.
func (*PaymentTxUpdate) SetTxHash ¶
func (_u *PaymentTxUpdate) SetTxHash(v string) *PaymentTxUpdate
SetTxHash sets the "tx_hash" field.
func (*PaymentTxUpdate) SetUpdatedAt ¶
func (_u *PaymentTxUpdate) SetUpdatedAt(v time.Time) *PaymentTxUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PaymentTxUpdate) SetX402URL ¶
func (_u *PaymentTxUpdate) SetX402URL(v string) *PaymentTxUpdate
SetX402URL sets the "x402_url" field.
func (*PaymentTxUpdate) Where ¶
func (_u *PaymentTxUpdate) Where(ps ...predicate.PaymentTx) *PaymentTxUpdate
Where appends a list predicates to the PaymentTxUpdate builder.
type PaymentTxUpdateOne ¶
type PaymentTxUpdateOne struct {
// contains filtered or unexported fields
}
PaymentTxUpdateOne is the builder for updating a single PaymentTx entity.
func (*PaymentTxUpdateOne) AddChainID ¶
func (_u *PaymentTxUpdateOne) AddChainID(v int64) *PaymentTxUpdateOne
AddChainID adds value to the "chain_id" field.
func (*PaymentTxUpdateOne) ClearErrorMessage ¶
func (_u *PaymentTxUpdateOne) ClearErrorMessage() *PaymentTxUpdateOne
ClearErrorMessage clears the value of the "error_message" field.
func (*PaymentTxUpdateOne) ClearPurpose ¶
func (_u *PaymentTxUpdateOne) ClearPurpose() *PaymentTxUpdateOne
ClearPurpose clears the value of the "purpose" field.
func (*PaymentTxUpdateOne) ClearSessionKey ¶
func (_u *PaymentTxUpdateOne) ClearSessionKey() *PaymentTxUpdateOne
ClearSessionKey clears the value of the "session_key" field.
func (*PaymentTxUpdateOne) ClearTxHash ¶
func (_u *PaymentTxUpdateOne) ClearTxHash() *PaymentTxUpdateOne
ClearTxHash clears the value of the "tx_hash" field.
func (*PaymentTxUpdateOne) ClearX402URL ¶
func (_u *PaymentTxUpdateOne) ClearX402URL() *PaymentTxUpdateOne
ClearX402URL clears the value of the "x402_url" field.
func (*PaymentTxUpdateOne) Exec ¶
func (_u *PaymentTxUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PaymentTxUpdateOne) ExecX ¶
func (_u *PaymentTxUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PaymentTxUpdateOne) Mutation ¶
func (_u *PaymentTxUpdateOne) Mutation() *PaymentTxMutation
Mutation returns the PaymentTxMutation object of the builder.
func (*PaymentTxUpdateOne) Save ¶
func (_u *PaymentTxUpdateOne) Save(ctx context.Context) (*PaymentTx, error)
Save executes the query and returns the updated PaymentTx entity.
func (*PaymentTxUpdateOne) SaveX ¶
func (_u *PaymentTxUpdateOne) SaveX(ctx context.Context) *PaymentTx
SaveX is like Save, but panics if an error occurs.
func (*PaymentTxUpdateOne) Select ¶
func (_u *PaymentTxUpdateOne) Select(field string, fields ...string) *PaymentTxUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PaymentTxUpdateOne) SetAmount ¶
func (_u *PaymentTxUpdateOne) SetAmount(v string) *PaymentTxUpdateOne
SetAmount sets the "amount" field.
func (*PaymentTxUpdateOne) SetChainID ¶
func (_u *PaymentTxUpdateOne) SetChainID(v int64) *PaymentTxUpdateOne
SetChainID sets the "chain_id" field.
func (*PaymentTxUpdateOne) SetErrorMessage ¶
func (_u *PaymentTxUpdateOne) SetErrorMessage(v string) *PaymentTxUpdateOne
SetErrorMessage sets the "error_message" field.
func (*PaymentTxUpdateOne) SetFromAddress ¶
func (_u *PaymentTxUpdateOne) SetFromAddress(v string) *PaymentTxUpdateOne
SetFromAddress sets the "from_address" field.
func (*PaymentTxUpdateOne) SetNillableAmount ¶
func (_u *PaymentTxUpdateOne) SetNillableAmount(v *string) *PaymentTxUpdateOne
SetNillableAmount sets the "amount" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableChainID ¶
func (_u *PaymentTxUpdateOne) SetNillableChainID(v *int64) *PaymentTxUpdateOne
SetNillableChainID sets the "chain_id" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableErrorMessage ¶
func (_u *PaymentTxUpdateOne) SetNillableErrorMessage(v *string) *PaymentTxUpdateOne
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableFromAddress ¶
func (_u *PaymentTxUpdateOne) SetNillableFromAddress(v *string) *PaymentTxUpdateOne
SetNillableFromAddress sets the "from_address" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillablePaymentMethod ¶
func (_u *PaymentTxUpdateOne) SetNillablePaymentMethod(v *paymenttx.PaymentMethod) *PaymentTxUpdateOne
SetNillablePaymentMethod sets the "payment_method" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillablePurpose ¶
func (_u *PaymentTxUpdateOne) SetNillablePurpose(v *string) *PaymentTxUpdateOne
SetNillablePurpose sets the "purpose" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableSessionKey ¶
func (_u *PaymentTxUpdateOne) SetNillableSessionKey(v *string) *PaymentTxUpdateOne
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableStatus ¶
func (_u *PaymentTxUpdateOne) SetNillableStatus(v *paymenttx.Status) *PaymentTxUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableToAddress ¶
func (_u *PaymentTxUpdateOne) SetNillableToAddress(v *string) *PaymentTxUpdateOne
SetNillableToAddress sets the "to_address" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableTxHash ¶
func (_u *PaymentTxUpdateOne) SetNillableTxHash(v *string) *PaymentTxUpdateOne
SetNillableTxHash sets the "tx_hash" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetNillableX402URL ¶
func (_u *PaymentTxUpdateOne) SetNillableX402URL(v *string) *PaymentTxUpdateOne
SetNillableX402URL sets the "x402_url" field if the given value is not nil.
func (*PaymentTxUpdateOne) SetPaymentMethod ¶
func (_u *PaymentTxUpdateOne) SetPaymentMethod(v paymenttx.PaymentMethod) *PaymentTxUpdateOne
SetPaymentMethod sets the "payment_method" field.
func (*PaymentTxUpdateOne) SetPurpose ¶
func (_u *PaymentTxUpdateOne) SetPurpose(v string) *PaymentTxUpdateOne
SetPurpose sets the "purpose" field.
func (*PaymentTxUpdateOne) SetSessionKey ¶
func (_u *PaymentTxUpdateOne) SetSessionKey(v string) *PaymentTxUpdateOne
SetSessionKey sets the "session_key" field.
func (*PaymentTxUpdateOne) SetStatus ¶
func (_u *PaymentTxUpdateOne) SetStatus(v paymenttx.Status) *PaymentTxUpdateOne
SetStatus sets the "status" field.
func (*PaymentTxUpdateOne) SetToAddress ¶
func (_u *PaymentTxUpdateOne) SetToAddress(v string) *PaymentTxUpdateOne
SetToAddress sets the "to_address" field.
func (*PaymentTxUpdateOne) SetTxHash ¶
func (_u *PaymentTxUpdateOne) SetTxHash(v string) *PaymentTxUpdateOne
SetTxHash sets the "tx_hash" field.
func (*PaymentTxUpdateOne) SetUpdatedAt ¶
func (_u *PaymentTxUpdateOne) SetUpdatedAt(v time.Time) *PaymentTxUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PaymentTxUpdateOne) SetX402URL ¶
func (_u *PaymentTxUpdateOne) SetX402URL(v string) *PaymentTxUpdateOne
SetX402URL sets the "x402_url" field.
func (*PaymentTxUpdateOne) Where ¶
func (_u *PaymentTxUpdateOne) Where(ps ...predicate.PaymentTx) *PaymentTxUpdateOne
Where appends a list predicates to the PaymentTxUpdate builder.
type PeerReputation ¶
type PeerReputation struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// DID of the peer
PeerDid string `json:"peer_did,omitempty"`
// Count of successful paid exchanges
SuccessfulExchanges int `json:"successful_exchanges,omitempty"`
// Count of failed exchanges
FailedExchanges int `json:"failed_exchanges,omitempty"`
// Count of timed-out exchanges
TimeoutCount int `json:"timeout_count,omitempty"`
// Computed trust score
TrustScore float64 `json:"trust_score,omitempty"`
// When this peer was first observed
FirstSeen time.Time `json:"first_seen,omitempty"`
// Most recent interaction timestamp
LastInteraction time.Time `json:"last_interaction,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
PeerReputation is the model entity for the PeerReputation schema.
func (*PeerReputation) String ¶
func (_m *PeerReputation) String() string
String implements the fmt.Stringer.
func (*PeerReputation) Unwrap ¶
func (_m *PeerReputation) Unwrap() *PeerReputation
Unwrap unwraps the PeerReputation 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 (*PeerReputation) Update ¶
func (_m *PeerReputation) Update() *PeerReputationUpdateOne
Update returns a builder for updating this PeerReputation. Note that you need to call PeerReputation.Unwrap() before calling this method if this PeerReputation was returned from a transaction, and the transaction was committed or rolled back.
type PeerReputationClient ¶
type PeerReputationClient struct {
// contains filtered or unexported fields
}
PeerReputationClient is a client for the PeerReputation schema.
func NewPeerReputationClient ¶
func NewPeerReputationClient(c config) *PeerReputationClient
NewPeerReputationClient returns a client for the PeerReputation from the given config.
func (*PeerReputationClient) Create ¶
func (c *PeerReputationClient) Create() *PeerReputationCreate
Create returns a builder for creating a PeerReputation entity.
func (*PeerReputationClient) CreateBulk ¶
func (c *PeerReputationClient) CreateBulk(builders ...*PeerReputationCreate) *PeerReputationCreateBulk
CreateBulk returns a builder for creating a bulk of PeerReputation entities.
func (*PeerReputationClient) Delete ¶
func (c *PeerReputationClient) Delete() *PeerReputationDelete
Delete returns a delete builder for PeerReputation.
func (*PeerReputationClient) DeleteOne ¶
func (c *PeerReputationClient) DeleteOne(_m *PeerReputation) *PeerReputationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PeerReputationClient) DeleteOneID ¶
func (c *PeerReputationClient) DeleteOneID(id uuid.UUID) *PeerReputationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PeerReputationClient) Get ¶
func (c *PeerReputationClient) Get(ctx context.Context, id uuid.UUID) (*PeerReputation, error)
Get returns a PeerReputation entity by its id.
func (*PeerReputationClient) GetX ¶
func (c *PeerReputationClient) GetX(ctx context.Context, id uuid.UUID) *PeerReputation
GetX is like Get, but panics if an error occurs.
func (*PeerReputationClient) Hooks ¶
func (c *PeerReputationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PeerReputationClient) Intercept ¶
func (c *PeerReputationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `peerreputation.Intercept(f(g(h())))`.
func (*PeerReputationClient) Interceptors ¶
func (c *PeerReputationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PeerReputationClient) MapCreateBulk ¶
func (c *PeerReputationClient) MapCreateBulk(slice any, setFunc func(*PeerReputationCreate, int)) *PeerReputationCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PeerReputationClient) Query ¶
func (c *PeerReputationClient) Query() *PeerReputationQuery
Query returns a query builder for PeerReputation.
func (*PeerReputationClient) Update ¶
func (c *PeerReputationClient) Update() *PeerReputationUpdate
Update returns an update builder for PeerReputation.
func (*PeerReputationClient) UpdateOne ¶
func (c *PeerReputationClient) UpdateOne(_m *PeerReputation) *PeerReputationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PeerReputationClient) UpdateOneID ¶
func (c *PeerReputationClient) UpdateOneID(id uuid.UUID) *PeerReputationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PeerReputationClient) Use ¶
func (c *PeerReputationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `peerreputation.Hooks(f(g(h())))`.
type PeerReputationCreate ¶
type PeerReputationCreate struct {
// contains filtered or unexported fields
}
PeerReputationCreate is the builder for creating a PeerReputation entity.
func (*PeerReputationCreate) Exec ¶
func (_c *PeerReputationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PeerReputationCreate) ExecX ¶
func (_c *PeerReputationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PeerReputationCreate) Mutation ¶
func (_c *PeerReputationCreate) Mutation() *PeerReputationMutation
Mutation returns the PeerReputationMutation object of the builder.
func (*PeerReputationCreate) Save ¶
func (_c *PeerReputationCreate) Save(ctx context.Context) (*PeerReputation, error)
Save creates the PeerReputation in the database.
func (*PeerReputationCreate) SaveX ¶
func (_c *PeerReputationCreate) SaveX(ctx context.Context) *PeerReputation
SaveX calls Save and panics if Save returns an error.
func (*PeerReputationCreate) SetCreatedAt ¶
func (_c *PeerReputationCreate) SetCreatedAt(v time.Time) *PeerReputationCreate
SetCreatedAt sets the "created_at" field.
func (*PeerReputationCreate) SetFailedExchanges ¶
func (_c *PeerReputationCreate) SetFailedExchanges(v int) *PeerReputationCreate
SetFailedExchanges sets the "failed_exchanges" field.
func (*PeerReputationCreate) SetFirstSeen ¶
func (_c *PeerReputationCreate) SetFirstSeen(v time.Time) *PeerReputationCreate
SetFirstSeen sets the "first_seen" field.
func (*PeerReputationCreate) SetID ¶
func (_c *PeerReputationCreate) SetID(v uuid.UUID) *PeerReputationCreate
SetID sets the "id" field.
func (*PeerReputationCreate) SetLastInteraction ¶
func (_c *PeerReputationCreate) SetLastInteraction(v time.Time) *PeerReputationCreate
SetLastInteraction sets the "last_interaction" field.
func (*PeerReputationCreate) SetNillableCreatedAt ¶
func (_c *PeerReputationCreate) SetNillableCreatedAt(v *time.Time) *PeerReputationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableFailedExchanges ¶
func (_c *PeerReputationCreate) SetNillableFailedExchanges(v *int) *PeerReputationCreate
SetNillableFailedExchanges sets the "failed_exchanges" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableFirstSeen ¶
func (_c *PeerReputationCreate) SetNillableFirstSeen(v *time.Time) *PeerReputationCreate
SetNillableFirstSeen sets the "first_seen" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableID ¶
func (_c *PeerReputationCreate) SetNillableID(v *uuid.UUID) *PeerReputationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableLastInteraction ¶
func (_c *PeerReputationCreate) SetNillableLastInteraction(v *time.Time) *PeerReputationCreate
SetNillableLastInteraction sets the "last_interaction" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableSuccessfulExchanges ¶
func (_c *PeerReputationCreate) SetNillableSuccessfulExchanges(v *int) *PeerReputationCreate
SetNillableSuccessfulExchanges sets the "successful_exchanges" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableTimeoutCount ¶
func (_c *PeerReputationCreate) SetNillableTimeoutCount(v *int) *PeerReputationCreate
SetNillableTimeoutCount sets the "timeout_count" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableTrustScore ¶
func (_c *PeerReputationCreate) SetNillableTrustScore(v *float64) *PeerReputationCreate
SetNillableTrustScore sets the "trust_score" field if the given value is not nil.
func (*PeerReputationCreate) SetNillableUpdatedAt ¶
func (_c *PeerReputationCreate) SetNillableUpdatedAt(v *time.Time) *PeerReputationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PeerReputationCreate) SetPeerDid ¶
func (_c *PeerReputationCreate) SetPeerDid(v string) *PeerReputationCreate
SetPeerDid sets the "peer_did" field.
func (*PeerReputationCreate) SetSuccessfulExchanges ¶
func (_c *PeerReputationCreate) SetSuccessfulExchanges(v int) *PeerReputationCreate
SetSuccessfulExchanges sets the "successful_exchanges" field.
func (*PeerReputationCreate) SetTimeoutCount ¶
func (_c *PeerReputationCreate) SetTimeoutCount(v int) *PeerReputationCreate
SetTimeoutCount sets the "timeout_count" field.
func (*PeerReputationCreate) SetTrustScore ¶
func (_c *PeerReputationCreate) SetTrustScore(v float64) *PeerReputationCreate
SetTrustScore sets the "trust_score" field.
func (*PeerReputationCreate) SetUpdatedAt ¶
func (_c *PeerReputationCreate) SetUpdatedAt(v time.Time) *PeerReputationCreate
SetUpdatedAt sets the "updated_at" field.
type PeerReputationCreateBulk ¶
type PeerReputationCreateBulk struct {
// contains filtered or unexported fields
}
PeerReputationCreateBulk is the builder for creating many PeerReputation entities in bulk.
func (*PeerReputationCreateBulk) Exec ¶
func (_c *PeerReputationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PeerReputationCreateBulk) ExecX ¶
func (_c *PeerReputationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PeerReputationCreateBulk) Save ¶
func (_c *PeerReputationCreateBulk) Save(ctx context.Context) ([]*PeerReputation, error)
Save creates the PeerReputation entities in the database.
func (*PeerReputationCreateBulk) SaveX ¶
func (_c *PeerReputationCreateBulk) SaveX(ctx context.Context) []*PeerReputation
SaveX is like Save, but panics if an error occurs.
type PeerReputationDelete ¶
type PeerReputationDelete struct {
// contains filtered or unexported fields
}
PeerReputationDelete is the builder for deleting a PeerReputation entity.
func (*PeerReputationDelete) Exec ¶
func (_d *PeerReputationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PeerReputationDelete) ExecX ¶
func (_d *PeerReputationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PeerReputationDelete) Where ¶
func (_d *PeerReputationDelete) Where(ps ...predicate.PeerReputation) *PeerReputationDelete
Where appends a list predicates to the PeerReputationDelete builder.
type PeerReputationDeleteOne ¶
type PeerReputationDeleteOne struct {
// contains filtered or unexported fields
}
PeerReputationDeleteOne is the builder for deleting a single PeerReputation entity.
func (*PeerReputationDeleteOne) Exec ¶
func (_d *PeerReputationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PeerReputationDeleteOne) ExecX ¶
func (_d *PeerReputationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PeerReputationDeleteOne) Where ¶
func (_d *PeerReputationDeleteOne) Where(ps ...predicate.PeerReputation) *PeerReputationDeleteOne
Where appends a list predicates to the PeerReputationDelete builder.
type PeerReputationGroupBy ¶
type PeerReputationGroupBy struct {
// contains filtered or unexported fields
}
PeerReputationGroupBy is the group-by builder for PeerReputation entities.
func (*PeerReputationGroupBy) Aggregate ¶
func (_g *PeerReputationGroupBy) Aggregate(fns ...AggregateFunc) *PeerReputationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PeerReputationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PeerReputationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PeerReputationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PeerReputationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PeerReputationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PeerReputationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PeerReputationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PeerReputationGroupBy) Scan ¶
func (_g *PeerReputationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PeerReputationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PeerReputationMutation ¶
type PeerReputationMutation struct {
// contains filtered or unexported fields
}
PeerReputationMutation represents an operation that mutates the PeerReputation nodes in the graph.
func (*PeerReputationMutation) AddFailedExchanges ¶
func (m *PeerReputationMutation) AddFailedExchanges(i int)
AddFailedExchanges adds i to the "failed_exchanges" field.
func (*PeerReputationMutation) AddField ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) AddSuccessfulExchanges ¶
func (m *PeerReputationMutation) AddSuccessfulExchanges(i int)
AddSuccessfulExchanges adds i to the "successful_exchanges" field.
func (*PeerReputationMutation) AddTimeoutCount ¶
func (m *PeerReputationMutation) AddTimeoutCount(i int)
AddTimeoutCount adds i to the "timeout_count" field.
func (*PeerReputationMutation) AddTrustScore ¶
func (m *PeerReputationMutation) AddTrustScore(f float64)
AddTrustScore adds f to the "trust_score" field.
func (*PeerReputationMutation) AddedEdges ¶
func (m *PeerReputationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PeerReputationMutation) AddedFailedExchanges ¶
func (m *PeerReputationMutation) AddedFailedExchanges() (r int, exists bool)
AddedFailedExchanges returns the value that was added to the "failed_exchanges" field in this mutation.
func (*PeerReputationMutation) AddedField ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) AddedFields ¶
func (m *PeerReputationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PeerReputationMutation) AddedIDs ¶
func (m *PeerReputationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PeerReputationMutation) AddedSuccessfulExchanges ¶
func (m *PeerReputationMutation) AddedSuccessfulExchanges() (r int, exists bool)
AddedSuccessfulExchanges returns the value that was added to the "successful_exchanges" field in this mutation.
func (*PeerReputationMutation) AddedTimeoutCount ¶
func (m *PeerReputationMutation) AddedTimeoutCount() (r int, exists bool)
AddedTimeoutCount returns the value that was added to the "timeout_count" field in this mutation.
func (*PeerReputationMutation) AddedTrustScore ¶
func (m *PeerReputationMutation) AddedTrustScore() (r float64, exists bool)
AddedTrustScore returns the value that was added to the "trust_score" field in this mutation.
func (*PeerReputationMutation) ClearEdge ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) ClearField ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) ClearedEdges ¶
func (m *PeerReputationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PeerReputationMutation) ClearedFields ¶
func (m *PeerReputationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PeerReputationMutation) Client ¶
func (m PeerReputationMutation) 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 (*PeerReputationMutation) CreatedAt ¶
func (m *PeerReputationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PeerReputationMutation) EdgeCleared ¶
func (m *PeerReputationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PeerReputationMutation) FailedExchanges ¶
func (m *PeerReputationMutation) FailedExchanges() (r int, exists bool)
FailedExchanges returns the value of the "failed_exchanges" field in the mutation.
func (*PeerReputationMutation) Field ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) FieldCleared ¶
func (m *PeerReputationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PeerReputationMutation) Fields ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) FirstSeen ¶
func (m *PeerReputationMutation) FirstSeen() (r time.Time, exists bool)
FirstSeen returns the value of the "first_seen" field in the mutation.
func (*PeerReputationMutation) ID ¶
func (m *PeerReputationMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PeerReputationMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PeerReputationMutation) LastInteraction ¶
func (m *PeerReputationMutation) LastInteraction() (r time.Time, exists bool)
LastInteraction returns the value of the "last_interaction" field in the mutation.
func (*PeerReputationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) OldFailedExchanges ¶
func (m *PeerReputationMutation) OldFailedExchanges(ctx context.Context) (v int, err error)
OldFailedExchanges returns the old "failed_exchanges" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) 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 (*PeerReputationMutation) OldFirstSeen ¶
OldFirstSeen returns the old "first_seen" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) OldLastInteraction ¶
OldLastInteraction returns the old "last_interaction" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) OldPeerDid ¶
func (m *PeerReputationMutation) OldPeerDid(ctx context.Context) (v string, err error)
OldPeerDid returns the old "peer_did" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) OldSuccessfulExchanges ¶
func (m *PeerReputationMutation) OldSuccessfulExchanges(ctx context.Context) (v int, err error)
OldSuccessfulExchanges returns the old "successful_exchanges" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) OldTimeoutCount ¶
func (m *PeerReputationMutation) OldTimeoutCount(ctx context.Context) (v int, err error)
OldTimeoutCount returns the old "timeout_count" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) OldTrustScore ¶
func (m *PeerReputationMutation) OldTrustScore(ctx context.Context) (v float64, err error)
OldTrustScore returns the old "trust_score" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PeerReputation entity. If the PeerReputation 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 (*PeerReputationMutation) Op ¶
func (m *PeerReputationMutation) Op() Op
Op returns the operation name.
func (*PeerReputationMutation) PeerDid ¶
func (m *PeerReputationMutation) PeerDid() (r string, exists bool)
PeerDid returns the value of the "peer_did" field in the mutation.
func (*PeerReputationMutation) RemovedEdges ¶
func (m *PeerReputationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PeerReputationMutation) RemovedIDs ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) ResetCreatedAt ¶
func (m *PeerReputationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PeerReputationMutation) ResetEdge ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) ResetFailedExchanges ¶
func (m *PeerReputationMutation) ResetFailedExchanges()
ResetFailedExchanges resets all changes to the "failed_exchanges" field.
func (*PeerReputationMutation) ResetField ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) ResetFirstSeen ¶
func (m *PeerReputationMutation) ResetFirstSeen()
ResetFirstSeen resets all changes to the "first_seen" field.
func (*PeerReputationMutation) ResetLastInteraction ¶
func (m *PeerReputationMutation) ResetLastInteraction()
ResetLastInteraction resets all changes to the "last_interaction" field.
func (*PeerReputationMutation) ResetPeerDid ¶
func (m *PeerReputationMutation) ResetPeerDid()
ResetPeerDid resets all changes to the "peer_did" field.
func (*PeerReputationMutation) ResetSuccessfulExchanges ¶
func (m *PeerReputationMutation) ResetSuccessfulExchanges()
ResetSuccessfulExchanges resets all changes to the "successful_exchanges" field.
func (*PeerReputationMutation) ResetTimeoutCount ¶
func (m *PeerReputationMutation) ResetTimeoutCount()
ResetTimeoutCount resets all changes to the "timeout_count" field.
func (*PeerReputationMutation) ResetTrustScore ¶
func (m *PeerReputationMutation) ResetTrustScore()
ResetTrustScore resets all changes to the "trust_score" field.
func (*PeerReputationMutation) ResetUpdatedAt ¶
func (m *PeerReputationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PeerReputationMutation) SetCreatedAt ¶
func (m *PeerReputationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PeerReputationMutation) SetFailedExchanges ¶
func (m *PeerReputationMutation) SetFailedExchanges(i int)
SetFailedExchanges sets the "failed_exchanges" field.
func (*PeerReputationMutation) SetField ¶
func (m *PeerReputationMutation) 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 (*PeerReputationMutation) SetFirstSeen ¶
func (m *PeerReputationMutation) SetFirstSeen(t time.Time)
SetFirstSeen sets the "first_seen" field.
func (*PeerReputationMutation) SetID ¶
func (m *PeerReputationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of PeerReputation entities.
func (*PeerReputationMutation) SetLastInteraction ¶
func (m *PeerReputationMutation) SetLastInteraction(t time.Time)
SetLastInteraction sets the "last_interaction" field.
func (*PeerReputationMutation) SetOp ¶
func (m *PeerReputationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PeerReputationMutation) SetPeerDid ¶
func (m *PeerReputationMutation) SetPeerDid(s string)
SetPeerDid sets the "peer_did" field.
func (*PeerReputationMutation) SetSuccessfulExchanges ¶
func (m *PeerReputationMutation) SetSuccessfulExchanges(i int)
SetSuccessfulExchanges sets the "successful_exchanges" field.
func (*PeerReputationMutation) SetTimeoutCount ¶
func (m *PeerReputationMutation) SetTimeoutCount(i int)
SetTimeoutCount sets the "timeout_count" field.
func (*PeerReputationMutation) SetTrustScore ¶
func (m *PeerReputationMutation) SetTrustScore(f float64)
SetTrustScore sets the "trust_score" field.
func (*PeerReputationMutation) SetUpdatedAt ¶
func (m *PeerReputationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PeerReputationMutation) SuccessfulExchanges ¶
func (m *PeerReputationMutation) SuccessfulExchanges() (r int, exists bool)
SuccessfulExchanges returns the value of the "successful_exchanges" field in the mutation.
func (*PeerReputationMutation) TimeoutCount ¶
func (m *PeerReputationMutation) TimeoutCount() (r int, exists bool)
TimeoutCount returns the value of the "timeout_count" field in the mutation.
func (*PeerReputationMutation) TrustScore ¶
func (m *PeerReputationMutation) TrustScore() (r float64, exists bool)
TrustScore returns the value of the "trust_score" field in the mutation.
func (PeerReputationMutation) Tx ¶
func (m PeerReputationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PeerReputationMutation) Type ¶
func (m *PeerReputationMutation) Type() string
Type returns the node type of this mutation (PeerReputation).
func (*PeerReputationMutation) UpdatedAt ¶
func (m *PeerReputationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PeerReputationMutation) Where ¶
func (m *PeerReputationMutation) Where(ps ...predicate.PeerReputation)
Where appends a list predicates to the PeerReputationMutation builder.
func (*PeerReputationMutation) WhereP ¶
func (m *PeerReputationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PeerReputationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PeerReputationQuery ¶
type PeerReputationQuery struct {
// contains filtered or unexported fields
}
PeerReputationQuery is the builder for querying PeerReputation entities.
func (*PeerReputationQuery) Aggregate ¶
func (_q *PeerReputationQuery) Aggregate(fns ...AggregateFunc) *PeerReputationSelect
Aggregate returns a PeerReputationSelect configured with the given aggregations.
func (*PeerReputationQuery) All ¶
func (_q *PeerReputationQuery) All(ctx context.Context) ([]*PeerReputation, error)
All executes the query and returns a list of PeerReputations.
func (*PeerReputationQuery) AllX ¶
func (_q *PeerReputationQuery) AllX(ctx context.Context) []*PeerReputation
AllX is like All, but panics if an error occurs.
func (*PeerReputationQuery) Clone ¶
func (_q *PeerReputationQuery) Clone() *PeerReputationQuery
Clone returns a duplicate of the PeerReputationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PeerReputationQuery) Count ¶
func (_q *PeerReputationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PeerReputationQuery) CountX ¶
func (_q *PeerReputationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PeerReputationQuery) Exist ¶
func (_q *PeerReputationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PeerReputationQuery) ExistX ¶
func (_q *PeerReputationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PeerReputationQuery) First ¶
func (_q *PeerReputationQuery) First(ctx context.Context) (*PeerReputation, error)
First returns the first PeerReputation entity from the query. Returns a *NotFoundError when no PeerReputation was found.
func (*PeerReputationQuery) FirstID ¶
FirstID returns the first PeerReputation ID from the query. Returns a *NotFoundError when no PeerReputation ID was found.
func (*PeerReputationQuery) FirstIDX ¶
func (_q *PeerReputationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PeerReputationQuery) FirstX ¶
func (_q *PeerReputationQuery) FirstX(ctx context.Context) *PeerReputation
FirstX is like First, but panics if an error occurs.
func (*PeerReputationQuery) GroupBy ¶
func (_q *PeerReputationQuery) GroupBy(field string, fields ...string) *PeerReputationGroupBy
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 {
PeerDid string `json:"peer_did,omitempty"`
Count int `json:"count,omitempty"`
}
client.PeerReputation.Query().
GroupBy(peerreputation.FieldPeerDid).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*PeerReputationQuery) IDsX ¶
func (_q *PeerReputationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PeerReputationQuery) Limit ¶
func (_q *PeerReputationQuery) Limit(limit int) *PeerReputationQuery
Limit the number of records to be returned by this query.
func (*PeerReputationQuery) Offset ¶
func (_q *PeerReputationQuery) Offset(offset int) *PeerReputationQuery
Offset to start from.
func (*PeerReputationQuery) Only ¶
func (_q *PeerReputationQuery) Only(ctx context.Context) (*PeerReputation, error)
Only returns a single PeerReputation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PeerReputation entity is found. Returns a *NotFoundError when no PeerReputation entities are found.
func (*PeerReputationQuery) OnlyID ¶
OnlyID is like Only, but returns the only PeerReputation ID in the query. Returns a *NotSingularError when more than one PeerReputation ID is found. Returns a *NotFoundError when no entities are found.
func (*PeerReputationQuery) OnlyIDX ¶
func (_q *PeerReputationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PeerReputationQuery) OnlyX ¶
func (_q *PeerReputationQuery) OnlyX(ctx context.Context) *PeerReputation
OnlyX is like Only, but panics if an error occurs.
func (*PeerReputationQuery) Order ¶
func (_q *PeerReputationQuery) Order(o ...peerreputation.OrderOption) *PeerReputationQuery
Order specifies how the records should be ordered.
func (*PeerReputationQuery) Select ¶
func (_q *PeerReputationQuery) Select(fields ...string) *PeerReputationSelect
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 {
PeerDid string `json:"peer_did,omitempty"`
}
client.PeerReputation.Query().
Select(peerreputation.FieldPeerDid).
Scan(ctx, &v)
func (*PeerReputationQuery) Unique ¶
func (_q *PeerReputationQuery) Unique(unique bool) *PeerReputationQuery
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 (*PeerReputationQuery) Where ¶
func (_q *PeerReputationQuery) Where(ps ...predicate.PeerReputation) *PeerReputationQuery
Where adds a new predicate for the PeerReputationQuery builder.
type PeerReputationSelect ¶
type PeerReputationSelect struct {
*PeerReputationQuery
// contains filtered or unexported fields
}
PeerReputationSelect is the builder for selecting fields of PeerReputation entities.
func (*PeerReputationSelect) Aggregate ¶
func (_s *PeerReputationSelect) Aggregate(fns ...AggregateFunc) *PeerReputationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PeerReputationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PeerReputationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PeerReputationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PeerReputationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PeerReputationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PeerReputationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PeerReputationSelect) Scan ¶
func (_s *PeerReputationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PeerReputationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PeerReputationUpdate ¶
type PeerReputationUpdate struct {
// contains filtered or unexported fields
}
PeerReputationUpdate is the builder for updating PeerReputation entities.
func (*PeerReputationUpdate) AddFailedExchanges ¶
func (_u *PeerReputationUpdate) AddFailedExchanges(v int) *PeerReputationUpdate
AddFailedExchanges adds value to the "failed_exchanges" field.
func (*PeerReputationUpdate) AddSuccessfulExchanges ¶
func (_u *PeerReputationUpdate) AddSuccessfulExchanges(v int) *PeerReputationUpdate
AddSuccessfulExchanges adds value to the "successful_exchanges" field.
func (*PeerReputationUpdate) AddTimeoutCount ¶
func (_u *PeerReputationUpdate) AddTimeoutCount(v int) *PeerReputationUpdate
AddTimeoutCount adds value to the "timeout_count" field.
func (*PeerReputationUpdate) AddTrustScore ¶
func (_u *PeerReputationUpdate) AddTrustScore(v float64) *PeerReputationUpdate
AddTrustScore adds value to the "trust_score" field.
func (*PeerReputationUpdate) Exec ¶
func (_u *PeerReputationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PeerReputationUpdate) ExecX ¶
func (_u *PeerReputationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PeerReputationUpdate) Mutation ¶
func (_u *PeerReputationUpdate) Mutation() *PeerReputationMutation
Mutation returns the PeerReputationMutation object of the builder.
func (*PeerReputationUpdate) Save ¶
func (_u *PeerReputationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PeerReputationUpdate) SaveX ¶
func (_u *PeerReputationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PeerReputationUpdate) SetFailedExchanges ¶
func (_u *PeerReputationUpdate) SetFailedExchanges(v int) *PeerReputationUpdate
SetFailedExchanges sets the "failed_exchanges" field.
func (*PeerReputationUpdate) SetLastInteraction ¶
func (_u *PeerReputationUpdate) SetLastInteraction(v time.Time) *PeerReputationUpdate
SetLastInteraction sets the "last_interaction" field.
func (*PeerReputationUpdate) SetNillableFailedExchanges ¶
func (_u *PeerReputationUpdate) SetNillableFailedExchanges(v *int) *PeerReputationUpdate
SetNillableFailedExchanges sets the "failed_exchanges" field if the given value is not nil.
func (*PeerReputationUpdate) SetNillablePeerDid ¶
func (_u *PeerReputationUpdate) SetNillablePeerDid(v *string) *PeerReputationUpdate
SetNillablePeerDid sets the "peer_did" field if the given value is not nil.
func (*PeerReputationUpdate) SetNillableSuccessfulExchanges ¶
func (_u *PeerReputationUpdate) SetNillableSuccessfulExchanges(v *int) *PeerReputationUpdate
SetNillableSuccessfulExchanges sets the "successful_exchanges" field if the given value is not nil.
func (*PeerReputationUpdate) SetNillableTimeoutCount ¶
func (_u *PeerReputationUpdate) SetNillableTimeoutCount(v *int) *PeerReputationUpdate
SetNillableTimeoutCount sets the "timeout_count" field if the given value is not nil.
func (*PeerReputationUpdate) SetNillableTrustScore ¶
func (_u *PeerReputationUpdate) SetNillableTrustScore(v *float64) *PeerReputationUpdate
SetNillableTrustScore sets the "trust_score" field if the given value is not nil.
func (*PeerReputationUpdate) SetPeerDid ¶
func (_u *PeerReputationUpdate) SetPeerDid(v string) *PeerReputationUpdate
SetPeerDid sets the "peer_did" field.
func (*PeerReputationUpdate) SetSuccessfulExchanges ¶
func (_u *PeerReputationUpdate) SetSuccessfulExchanges(v int) *PeerReputationUpdate
SetSuccessfulExchanges sets the "successful_exchanges" field.
func (*PeerReputationUpdate) SetTimeoutCount ¶
func (_u *PeerReputationUpdate) SetTimeoutCount(v int) *PeerReputationUpdate
SetTimeoutCount sets the "timeout_count" field.
func (*PeerReputationUpdate) SetTrustScore ¶
func (_u *PeerReputationUpdate) SetTrustScore(v float64) *PeerReputationUpdate
SetTrustScore sets the "trust_score" field.
func (*PeerReputationUpdate) SetUpdatedAt ¶
func (_u *PeerReputationUpdate) SetUpdatedAt(v time.Time) *PeerReputationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PeerReputationUpdate) Where ¶
func (_u *PeerReputationUpdate) Where(ps ...predicate.PeerReputation) *PeerReputationUpdate
Where appends a list predicates to the PeerReputationUpdate builder.
type PeerReputationUpdateOne ¶
type PeerReputationUpdateOne struct {
// contains filtered or unexported fields
}
PeerReputationUpdateOne is the builder for updating a single PeerReputation entity.
func (*PeerReputationUpdateOne) AddFailedExchanges ¶
func (_u *PeerReputationUpdateOne) AddFailedExchanges(v int) *PeerReputationUpdateOne
AddFailedExchanges adds value to the "failed_exchanges" field.
func (*PeerReputationUpdateOne) AddSuccessfulExchanges ¶
func (_u *PeerReputationUpdateOne) AddSuccessfulExchanges(v int) *PeerReputationUpdateOne
AddSuccessfulExchanges adds value to the "successful_exchanges" field.
func (*PeerReputationUpdateOne) AddTimeoutCount ¶
func (_u *PeerReputationUpdateOne) AddTimeoutCount(v int) *PeerReputationUpdateOne
AddTimeoutCount adds value to the "timeout_count" field.
func (*PeerReputationUpdateOne) AddTrustScore ¶
func (_u *PeerReputationUpdateOne) AddTrustScore(v float64) *PeerReputationUpdateOne
AddTrustScore adds value to the "trust_score" field.
func (*PeerReputationUpdateOne) Exec ¶
func (_u *PeerReputationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PeerReputationUpdateOne) ExecX ¶
func (_u *PeerReputationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PeerReputationUpdateOne) Mutation ¶
func (_u *PeerReputationUpdateOne) Mutation() *PeerReputationMutation
Mutation returns the PeerReputationMutation object of the builder.
func (*PeerReputationUpdateOne) Save ¶
func (_u *PeerReputationUpdateOne) Save(ctx context.Context) (*PeerReputation, error)
Save executes the query and returns the updated PeerReputation entity.
func (*PeerReputationUpdateOne) SaveX ¶
func (_u *PeerReputationUpdateOne) SaveX(ctx context.Context) *PeerReputation
SaveX is like Save, but panics if an error occurs.
func (*PeerReputationUpdateOne) Select ¶
func (_u *PeerReputationUpdateOne) Select(field string, fields ...string) *PeerReputationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PeerReputationUpdateOne) SetFailedExchanges ¶
func (_u *PeerReputationUpdateOne) SetFailedExchanges(v int) *PeerReputationUpdateOne
SetFailedExchanges sets the "failed_exchanges" field.
func (*PeerReputationUpdateOne) SetLastInteraction ¶
func (_u *PeerReputationUpdateOne) SetLastInteraction(v time.Time) *PeerReputationUpdateOne
SetLastInteraction sets the "last_interaction" field.
func (*PeerReputationUpdateOne) SetNillableFailedExchanges ¶
func (_u *PeerReputationUpdateOne) SetNillableFailedExchanges(v *int) *PeerReputationUpdateOne
SetNillableFailedExchanges sets the "failed_exchanges" field if the given value is not nil.
func (*PeerReputationUpdateOne) SetNillablePeerDid ¶
func (_u *PeerReputationUpdateOne) SetNillablePeerDid(v *string) *PeerReputationUpdateOne
SetNillablePeerDid sets the "peer_did" field if the given value is not nil.
func (*PeerReputationUpdateOne) SetNillableSuccessfulExchanges ¶
func (_u *PeerReputationUpdateOne) SetNillableSuccessfulExchanges(v *int) *PeerReputationUpdateOne
SetNillableSuccessfulExchanges sets the "successful_exchanges" field if the given value is not nil.
func (*PeerReputationUpdateOne) SetNillableTimeoutCount ¶
func (_u *PeerReputationUpdateOne) SetNillableTimeoutCount(v *int) *PeerReputationUpdateOne
SetNillableTimeoutCount sets the "timeout_count" field if the given value is not nil.
func (*PeerReputationUpdateOne) SetNillableTrustScore ¶
func (_u *PeerReputationUpdateOne) SetNillableTrustScore(v *float64) *PeerReputationUpdateOne
SetNillableTrustScore sets the "trust_score" field if the given value is not nil.
func (*PeerReputationUpdateOne) SetPeerDid ¶
func (_u *PeerReputationUpdateOne) SetPeerDid(v string) *PeerReputationUpdateOne
SetPeerDid sets the "peer_did" field.
func (*PeerReputationUpdateOne) SetSuccessfulExchanges ¶
func (_u *PeerReputationUpdateOne) SetSuccessfulExchanges(v int) *PeerReputationUpdateOne
SetSuccessfulExchanges sets the "successful_exchanges" field.
func (*PeerReputationUpdateOne) SetTimeoutCount ¶
func (_u *PeerReputationUpdateOne) SetTimeoutCount(v int) *PeerReputationUpdateOne
SetTimeoutCount sets the "timeout_count" field.
func (*PeerReputationUpdateOne) SetTrustScore ¶
func (_u *PeerReputationUpdateOne) SetTrustScore(v float64) *PeerReputationUpdateOne
SetTrustScore sets the "trust_score" field.
func (*PeerReputationUpdateOne) SetUpdatedAt ¶
func (_u *PeerReputationUpdateOne) SetUpdatedAt(v time.Time) *PeerReputationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PeerReputationUpdateOne) Where ¶
func (_u *PeerReputationUpdateOne) Where(ps ...predicate.PeerReputation) *PeerReputationUpdateOne
Where appends a list predicates to the PeerReputationUpdate builder.
type PeerReputations ¶
type PeerReputations []*PeerReputation
PeerReputations is a parsable slice of PeerReputation.
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 Reflection ¶
type Reflection struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// SessionKey holds the value of the "session_key" field.
SessionKey string `json:"session_key,omitempty"`
// Content holds the value of the "content" field.
Content string `json:"content,omitempty"`
// TokenCount holds the value of the "token_count" field.
TokenCount int `json:"token_count,omitempty"`
// Generation holds the value of the "generation" field.
Generation int `json:"generation,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// contains filtered or unexported fields
}
Reflection is the model entity for the Reflection schema.
func (*Reflection) String ¶
func (_m *Reflection) String() string
String implements the fmt.Stringer.
func (*Reflection) Unwrap ¶
func (_m *Reflection) Unwrap() *Reflection
Unwrap unwraps the Reflection 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 (*Reflection) Update ¶
func (_m *Reflection) Update() *ReflectionUpdateOne
Update returns a builder for updating this Reflection. Note that you need to call Reflection.Unwrap() before calling this method if this Reflection was returned from a transaction, and the transaction was committed or rolled back.
type ReflectionClient ¶
type ReflectionClient struct {
// contains filtered or unexported fields
}
ReflectionClient is a client for the Reflection schema.
func NewReflectionClient ¶
func NewReflectionClient(c config) *ReflectionClient
NewReflectionClient returns a client for the Reflection from the given config.
func (*ReflectionClient) Create ¶
func (c *ReflectionClient) Create() *ReflectionCreate
Create returns a builder for creating a Reflection entity.
func (*ReflectionClient) CreateBulk ¶
func (c *ReflectionClient) CreateBulk(builders ...*ReflectionCreate) *ReflectionCreateBulk
CreateBulk returns a builder for creating a bulk of Reflection entities.
func (*ReflectionClient) Delete ¶
func (c *ReflectionClient) Delete() *ReflectionDelete
Delete returns a delete builder for Reflection.
func (*ReflectionClient) DeleteOne ¶
func (c *ReflectionClient) DeleteOne(_m *Reflection) *ReflectionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReflectionClient) DeleteOneID ¶
func (c *ReflectionClient) DeleteOneID(id uuid.UUID) *ReflectionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ReflectionClient) Get ¶
func (c *ReflectionClient) Get(ctx context.Context, id uuid.UUID) (*Reflection, error)
Get returns a Reflection entity by its id.
func (*ReflectionClient) GetX ¶
func (c *ReflectionClient) GetX(ctx context.Context, id uuid.UUID) *Reflection
GetX is like Get, but panics if an error occurs.
func (*ReflectionClient) Hooks ¶
func (c *ReflectionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ReflectionClient) Intercept ¶
func (c *ReflectionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `reflection.Intercept(f(g(h())))`.
func (*ReflectionClient) Interceptors ¶
func (c *ReflectionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ReflectionClient) MapCreateBulk ¶
func (c *ReflectionClient) MapCreateBulk(slice any, setFunc func(*ReflectionCreate, int)) *ReflectionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ReflectionClient) Query ¶
func (c *ReflectionClient) Query() *ReflectionQuery
Query returns a query builder for Reflection.
func (*ReflectionClient) Update ¶
func (c *ReflectionClient) Update() *ReflectionUpdate
Update returns an update builder for Reflection.
func (*ReflectionClient) UpdateOne ¶
func (c *ReflectionClient) UpdateOne(_m *Reflection) *ReflectionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReflectionClient) UpdateOneID ¶
func (c *ReflectionClient) UpdateOneID(id uuid.UUID) *ReflectionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReflectionClient) Use ¶
func (c *ReflectionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `reflection.Hooks(f(g(h())))`.
type ReflectionCreate ¶
type ReflectionCreate struct {
// contains filtered or unexported fields
}
ReflectionCreate is the builder for creating a Reflection entity.
func (*ReflectionCreate) Exec ¶
func (_c *ReflectionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReflectionCreate) ExecX ¶
func (_c *ReflectionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReflectionCreate) Mutation ¶
func (_c *ReflectionCreate) Mutation() *ReflectionMutation
Mutation returns the ReflectionMutation object of the builder.
func (*ReflectionCreate) Save ¶
func (_c *ReflectionCreate) Save(ctx context.Context) (*Reflection, error)
Save creates the Reflection in the database.
func (*ReflectionCreate) SaveX ¶
func (_c *ReflectionCreate) SaveX(ctx context.Context) *Reflection
SaveX calls Save and panics if Save returns an error.
func (*ReflectionCreate) SetContent ¶
func (_c *ReflectionCreate) SetContent(v string) *ReflectionCreate
SetContent sets the "content" field.
func (*ReflectionCreate) SetCreatedAt ¶
func (_c *ReflectionCreate) SetCreatedAt(v time.Time) *ReflectionCreate
SetCreatedAt sets the "created_at" field.
func (*ReflectionCreate) SetGeneration ¶
func (_c *ReflectionCreate) SetGeneration(v int) *ReflectionCreate
SetGeneration sets the "generation" field.
func (*ReflectionCreate) SetID ¶
func (_c *ReflectionCreate) SetID(v uuid.UUID) *ReflectionCreate
SetID sets the "id" field.
func (*ReflectionCreate) SetNillableCreatedAt ¶
func (_c *ReflectionCreate) SetNillableCreatedAt(v *time.Time) *ReflectionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReflectionCreate) SetNillableGeneration ¶
func (_c *ReflectionCreate) SetNillableGeneration(v *int) *ReflectionCreate
SetNillableGeneration sets the "generation" field if the given value is not nil.
func (*ReflectionCreate) SetNillableID ¶
func (_c *ReflectionCreate) SetNillableID(v *uuid.UUID) *ReflectionCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ReflectionCreate) SetNillableTokenCount ¶
func (_c *ReflectionCreate) SetNillableTokenCount(v *int) *ReflectionCreate
SetNillableTokenCount sets the "token_count" field if the given value is not nil.
func (*ReflectionCreate) SetSessionKey ¶
func (_c *ReflectionCreate) SetSessionKey(v string) *ReflectionCreate
SetSessionKey sets the "session_key" field.
func (*ReflectionCreate) SetTokenCount ¶
func (_c *ReflectionCreate) SetTokenCount(v int) *ReflectionCreate
SetTokenCount sets the "token_count" field.
type ReflectionCreateBulk ¶
type ReflectionCreateBulk struct {
// contains filtered or unexported fields
}
ReflectionCreateBulk is the builder for creating many Reflection entities in bulk.
func (*ReflectionCreateBulk) Exec ¶
func (_c *ReflectionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReflectionCreateBulk) ExecX ¶
func (_c *ReflectionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReflectionCreateBulk) Save ¶
func (_c *ReflectionCreateBulk) Save(ctx context.Context) ([]*Reflection, error)
Save creates the Reflection entities in the database.
func (*ReflectionCreateBulk) SaveX ¶
func (_c *ReflectionCreateBulk) SaveX(ctx context.Context) []*Reflection
SaveX is like Save, but panics if an error occurs.
type ReflectionDelete ¶
type ReflectionDelete struct {
// contains filtered or unexported fields
}
ReflectionDelete is the builder for deleting a Reflection entity.
func (*ReflectionDelete) Exec ¶
func (_d *ReflectionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReflectionDelete) ExecX ¶
func (_d *ReflectionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReflectionDelete) Where ¶
func (_d *ReflectionDelete) Where(ps ...predicate.Reflection) *ReflectionDelete
Where appends a list predicates to the ReflectionDelete builder.
type ReflectionDeleteOne ¶
type ReflectionDeleteOne struct {
// contains filtered or unexported fields
}
ReflectionDeleteOne is the builder for deleting a single Reflection entity.
func (*ReflectionDeleteOne) Exec ¶
func (_d *ReflectionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReflectionDeleteOne) ExecX ¶
func (_d *ReflectionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReflectionDeleteOne) Where ¶
func (_d *ReflectionDeleteOne) Where(ps ...predicate.Reflection) *ReflectionDeleteOne
Where appends a list predicates to the ReflectionDelete builder.
type ReflectionGroupBy ¶
type ReflectionGroupBy struct {
// contains filtered or unexported fields
}
ReflectionGroupBy is the group-by builder for Reflection entities.
func (*ReflectionGroupBy) Aggregate ¶
func (_g *ReflectionGroupBy) Aggregate(fns ...AggregateFunc) *ReflectionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReflectionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReflectionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReflectionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReflectionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReflectionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReflectionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReflectionGroupBy) Scan ¶
func (_g *ReflectionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReflectionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReflectionMutation ¶
type ReflectionMutation struct {
// contains filtered or unexported fields
}
ReflectionMutation represents an operation that mutates the Reflection nodes in the graph.
func (*ReflectionMutation) AddField ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) AddGeneration ¶
func (m *ReflectionMutation) AddGeneration(i int)
AddGeneration adds i to the "generation" field.
func (*ReflectionMutation) AddTokenCount ¶
func (m *ReflectionMutation) AddTokenCount(i int)
AddTokenCount adds i to the "token_count" field.
func (*ReflectionMutation) AddedEdges ¶
func (m *ReflectionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReflectionMutation) AddedField ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) AddedFields ¶
func (m *ReflectionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReflectionMutation) AddedGeneration ¶
func (m *ReflectionMutation) AddedGeneration() (r int, exists bool)
AddedGeneration returns the value that was added to the "generation" field in this mutation.
func (*ReflectionMutation) AddedIDs ¶
func (m *ReflectionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReflectionMutation) AddedTokenCount ¶
func (m *ReflectionMutation) AddedTokenCount() (r int, exists bool)
AddedTokenCount returns the value that was added to the "token_count" field in this mutation.
func (*ReflectionMutation) ClearEdge ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) ClearField ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) ClearedEdges ¶
func (m *ReflectionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReflectionMutation) ClearedFields ¶
func (m *ReflectionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReflectionMutation) Client ¶
func (m ReflectionMutation) 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 (*ReflectionMutation) Content ¶
func (m *ReflectionMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*ReflectionMutation) CreatedAt ¶
func (m *ReflectionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ReflectionMutation) EdgeCleared ¶
func (m *ReflectionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReflectionMutation) Field ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) FieldCleared ¶
func (m *ReflectionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReflectionMutation) Fields ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) Generation ¶
func (m *ReflectionMutation) Generation() (r int, exists bool)
Generation returns the value of the "generation" field in the mutation.
func (*ReflectionMutation) ID ¶
func (m *ReflectionMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ReflectionMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ReflectionMutation) OldContent ¶
func (m *ReflectionMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Reflection entity. If the Reflection 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 (*ReflectionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Reflection entity. If the Reflection 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 (*ReflectionMutation) 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 (*ReflectionMutation) OldGeneration ¶
func (m *ReflectionMutation) OldGeneration(ctx context.Context) (v int, err error)
OldGeneration returns the old "generation" field's value of the Reflection entity. If the Reflection 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 (*ReflectionMutation) OldSessionKey ¶
func (m *ReflectionMutation) OldSessionKey(ctx context.Context) (v string, err error)
OldSessionKey returns the old "session_key" field's value of the Reflection entity. If the Reflection 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 (*ReflectionMutation) OldTokenCount ¶
func (m *ReflectionMutation) OldTokenCount(ctx context.Context) (v int, err error)
OldTokenCount returns the old "token_count" field's value of the Reflection entity. If the Reflection 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 (*ReflectionMutation) RemovedEdges ¶
func (m *ReflectionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReflectionMutation) RemovedIDs ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) ResetContent ¶
func (m *ReflectionMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*ReflectionMutation) ResetCreatedAt ¶
func (m *ReflectionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ReflectionMutation) ResetEdge ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) ResetField ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) ResetGeneration ¶
func (m *ReflectionMutation) ResetGeneration()
ResetGeneration resets all changes to the "generation" field.
func (*ReflectionMutation) ResetSessionKey ¶
func (m *ReflectionMutation) ResetSessionKey()
ResetSessionKey resets all changes to the "session_key" field.
func (*ReflectionMutation) ResetTokenCount ¶
func (m *ReflectionMutation) ResetTokenCount()
ResetTokenCount resets all changes to the "token_count" field.
func (*ReflectionMutation) SessionKey ¶
func (m *ReflectionMutation) SessionKey() (r string, exists bool)
SessionKey returns the value of the "session_key" field in the mutation.
func (*ReflectionMutation) SetContent ¶
func (m *ReflectionMutation) SetContent(s string)
SetContent sets the "content" field.
func (*ReflectionMutation) SetCreatedAt ¶
func (m *ReflectionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ReflectionMutation) SetField ¶
func (m *ReflectionMutation) 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 (*ReflectionMutation) SetGeneration ¶
func (m *ReflectionMutation) SetGeneration(i int)
SetGeneration sets the "generation" field.
func (*ReflectionMutation) SetID ¶
func (m *ReflectionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Reflection entities.
func (*ReflectionMutation) SetOp ¶
func (m *ReflectionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ReflectionMutation) SetSessionKey ¶
func (m *ReflectionMutation) SetSessionKey(s string)
SetSessionKey sets the "session_key" field.
func (*ReflectionMutation) SetTokenCount ¶
func (m *ReflectionMutation) SetTokenCount(i int)
SetTokenCount sets the "token_count" field.
func (*ReflectionMutation) TokenCount ¶
func (m *ReflectionMutation) TokenCount() (r int, exists bool)
TokenCount returns the value of the "token_count" field in the mutation.
func (ReflectionMutation) Tx ¶
func (m ReflectionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReflectionMutation) Type ¶
func (m *ReflectionMutation) Type() string
Type returns the node type of this mutation (Reflection).
func (*ReflectionMutation) Where ¶
func (m *ReflectionMutation) Where(ps ...predicate.Reflection)
Where appends a list predicates to the ReflectionMutation builder.
func (*ReflectionMutation) WhereP ¶
func (m *ReflectionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ReflectionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ReflectionQuery ¶
type ReflectionQuery struct {
// contains filtered or unexported fields
}
ReflectionQuery is the builder for querying Reflection entities.
func (*ReflectionQuery) Aggregate ¶
func (_q *ReflectionQuery) Aggregate(fns ...AggregateFunc) *ReflectionSelect
Aggregate returns a ReflectionSelect configured with the given aggregations.
func (*ReflectionQuery) All ¶
func (_q *ReflectionQuery) All(ctx context.Context) ([]*Reflection, error)
All executes the query and returns a list of Reflections.
func (*ReflectionQuery) AllX ¶
func (_q *ReflectionQuery) AllX(ctx context.Context) []*Reflection
AllX is like All, but panics if an error occurs.
func (*ReflectionQuery) Clone ¶
func (_q *ReflectionQuery) Clone() *ReflectionQuery
Clone returns a duplicate of the ReflectionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReflectionQuery) Count ¶
func (_q *ReflectionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReflectionQuery) CountX ¶
func (_q *ReflectionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReflectionQuery) Exist ¶
func (_q *ReflectionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReflectionQuery) ExistX ¶
func (_q *ReflectionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReflectionQuery) First ¶
func (_q *ReflectionQuery) First(ctx context.Context) (*Reflection, error)
First returns the first Reflection entity from the query. Returns a *NotFoundError when no Reflection was found.
func (*ReflectionQuery) FirstID ¶
FirstID returns the first Reflection ID from the query. Returns a *NotFoundError when no Reflection ID was found.
func (*ReflectionQuery) FirstIDX ¶
func (_q *ReflectionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReflectionQuery) FirstX ¶
func (_q *ReflectionQuery) FirstX(ctx context.Context) *Reflection
FirstX is like First, but panics if an error occurs.
func (*ReflectionQuery) GroupBy ¶
func (_q *ReflectionQuery) GroupBy(field string, fields ...string) *ReflectionGroupBy
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 {
SessionKey string `json:"session_key,omitempty"`
Count int `json:"count,omitempty"`
}
client.Reflection.Query().
GroupBy(reflection.FieldSessionKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ReflectionQuery) IDsX ¶
func (_q *ReflectionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ReflectionQuery) Limit ¶
func (_q *ReflectionQuery) Limit(limit int) *ReflectionQuery
Limit the number of records to be returned by this query.
func (*ReflectionQuery) Offset ¶
func (_q *ReflectionQuery) Offset(offset int) *ReflectionQuery
Offset to start from.
func (*ReflectionQuery) Only ¶
func (_q *ReflectionQuery) Only(ctx context.Context) (*Reflection, error)
Only returns a single Reflection entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Reflection entity is found. Returns a *NotFoundError when no Reflection entities are found.
func (*ReflectionQuery) OnlyID ¶
OnlyID is like Only, but returns the only Reflection ID in the query. Returns a *NotSingularError when more than one Reflection ID is found. Returns a *NotFoundError when no entities are found.
func (*ReflectionQuery) OnlyIDX ¶
func (_q *ReflectionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReflectionQuery) OnlyX ¶
func (_q *ReflectionQuery) OnlyX(ctx context.Context) *Reflection
OnlyX is like Only, but panics if an error occurs.
func (*ReflectionQuery) Order ¶
func (_q *ReflectionQuery) Order(o ...reflection.OrderOption) *ReflectionQuery
Order specifies how the records should be ordered.
func (*ReflectionQuery) Select ¶
func (_q *ReflectionQuery) Select(fields ...string) *ReflectionSelect
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 {
SessionKey string `json:"session_key,omitempty"`
}
client.Reflection.Query().
Select(reflection.FieldSessionKey).
Scan(ctx, &v)
func (*ReflectionQuery) Unique ¶
func (_q *ReflectionQuery) Unique(unique bool) *ReflectionQuery
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 (*ReflectionQuery) Where ¶
func (_q *ReflectionQuery) Where(ps ...predicate.Reflection) *ReflectionQuery
Where adds a new predicate for the ReflectionQuery builder.
type ReflectionSelect ¶
type ReflectionSelect struct {
*ReflectionQuery
// contains filtered or unexported fields
}
ReflectionSelect is the builder for selecting fields of Reflection entities.
func (*ReflectionSelect) Aggregate ¶
func (_s *ReflectionSelect) Aggregate(fns ...AggregateFunc) *ReflectionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ReflectionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReflectionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReflectionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReflectionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReflectionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReflectionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReflectionSelect) Scan ¶
func (_s *ReflectionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReflectionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReflectionUpdate ¶
type ReflectionUpdate struct {
// contains filtered or unexported fields
}
ReflectionUpdate is the builder for updating Reflection entities.
func (*ReflectionUpdate) AddGeneration ¶
func (_u *ReflectionUpdate) AddGeneration(v int) *ReflectionUpdate
AddGeneration adds value to the "generation" field.
func (*ReflectionUpdate) AddTokenCount ¶
func (_u *ReflectionUpdate) AddTokenCount(v int) *ReflectionUpdate
AddTokenCount adds value to the "token_count" field.
func (*ReflectionUpdate) Exec ¶
func (_u *ReflectionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReflectionUpdate) ExecX ¶
func (_u *ReflectionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReflectionUpdate) Mutation ¶
func (_u *ReflectionUpdate) Mutation() *ReflectionMutation
Mutation returns the ReflectionMutation object of the builder.
func (*ReflectionUpdate) Save ¶
func (_u *ReflectionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReflectionUpdate) SaveX ¶
func (_u *ReflectionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReflectionUpdate) SetContent ¶
func (_u *ReflectionUpdate) SetContent(v string) *ReflectionUpdate
SetContent sets the "content" field.
func (*ReflectionUpdate) SetGeneration ¶
func (_u *ReflectionUpdate) SetGeneration(v int) *ReflectionUpdate
SetGeneration sets the "generation" field.
func (*ReflectionUpdate) SetNillableContent ¶
func (_u *ReflectionUpdate) SetNillableContent(v *string) *ReflectionUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*ReflectionUpdate) SetNillableGeneration ¶
func (_u *ReflectionUpdate) SetNillableGeneration(v *int) *ReflectionUpdate
SetNillableGeneration sets the "generation" field if the given value is not nil.
func (*ReflectionUpdate) SetNillableSessionKey ¶
func (_u *ReflectionUpdate) SetNillableSessionKey(v *string) *ReflectionUpdate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*ReflectionUpdate) SetNillableTokenCount ¶
func (_u *ReflectionUpdate) SetNillableTokenCount(v *int) *ReflectionUpdate
SetNillableTokenCount sets the "token_count" field if the given value is not nil.
func (*ReflectionUpdate) SetSessionKey ¶
func (_u *ReflectionUpdate) SetSessionKey(v string) *ReflectionUpdate
SetSessionKey sets the "session_key" field.
func (*ReflectionUpdate) SetTokenCount ¶
func (_u *ReflectionUpdate) SetTokenCount(v int) *ReflectionUpdate
SetTokenCount sets the "token_count" field.
func (*ReflectionUpdate) Where ¶
func (_u *ReflectionUpdate) Where(ps ...predicate.Reflection) *ReflectionUpdate
Where appends a list predicates to the ReflectionUpdate builder.
type ReflectionUpdateOne ¶
type ReflectionUpdateOne struct {
// contains filtered or unexported fields
}
ReflectionUpdateOne is the builder for updating a single Reflection entity.
func (*ReflectionUpdateOne) AddGeneration ¶
func (_u *ReflectionUpdateOne) AddGeneration(v int) *ReflectionUpdateOne
AddGeneration adds value to the "generation" field.
func (*ReflectionUpdateOne) AddTokenCount ¶
func (_u *ReflectionUpdateOne) AddTokenCount(v int) *ReflectionUpdateOne
AddTokenCount adds value to the "token_count" field.
func (*ReflectionUpdateOne) Exec ¶
func (_u *ReflectionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReflectionUpdateOne) ExecX ¶
func (_u *ReflectionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReflectionUpdateOne) Mutation ¶
func (_u *ReflectionUpdateOne) Mutation() *ReflectionMutation
Mutation returns the ReflectionMutation object of the builder.
func (*ReflectionUpdateOne) Save ¶
func (_u *ReflectionUpdateOne) Save(ctx context.Context) (*Reflection, error)
Save executes the query and returns the updated Reflection entity.
func (*ReflectionUpdateOne) SaveX ¶
func (_u *ReflectionUpdateOne) SaveX(ctx context.Context) *Reflection
SaveX is like Save, but panics if an error occurs.
func (*ReflectionUpdateOne) Select ¶
func (_u *ReflectionUpdateOne) Select(field string, fields ...string) *ReflectionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReflectionUpdateOne) SetContent ¶
func (_u *ReflectionUpdateOne) SetContent(v string) *ReflectionUpdateOne
SetContent sets the "content" field.
func (*ReflectionUpdateOne) SetGeneration ¶
func (_u *ReflectionUpdateOne) SetGeneration(v int) *ReflectionUpdateOne
SetGeneration sets the "generation" field.
func (*ReflectionUpdateOne) SetNillableContent ¶
func (_u *ReflectionUpdateOne) SetNillableContent(v *string) *ReflectionUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*ReflectionUpdateOne) SetNillableGeneration ¶
func (_u *ReflectionUpdateOne) SetNillableGeneration(v *int) *ReflectionUpdateOne
SetNillableGeneration sets the "generation" field if the given value is not nil.
func (*ReflectionUpdateOne) SetNillableSessionKey ¶
func (_u *ReflectionUpdateOne) SetNillableSessionKey(v *string) *ReflectionUpdateOne
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*ReflectionUpdateOne) SetNillableTokenCount ¶
func (_u *ReflectionUpdateOne) SetNillableTokenCount(v *int) *ReflectionUpdateOne
SetNillableTokenCount sets the "token_count" field if the given value is not nil.
func (*ReflectionUpdateOne) SetSessionKey ¶
func (_u *ReflectionUpdateOne) SetSessionKey(v string) *ReflectionUpdateOne
SetSessionKey sets the "session_key" field.
func (*ReflectionUpdateOne) SetTokenCount ¶
func (_u *ReflectionUpdateOne) SetTokenCount(v int) *ReflectionUpdateOne
SetTokenCount sets the "token_count" field.
func (*ReflectionUpdateOne) Where ¶
func (_u *ReflectionUpdateOne) Where(ps ...predicate.Reflection) *ReflectionUpdateOne
Where appends a list predicates to the ReflectionUpdate builder.
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 Secret ¶
type Secret struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Lookup key for the secret
Name string `json:"name,omitempty"`
// Encrypted secret data
EncryptedValue []byte `json:"encrypted_value,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Number of times this secret has been accessed
AccessCount int `json:"access_count,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the SecretQuery when eager-loading is set.
Edges SecretEdges `json:"edges"`
// contains filtered or unexported fields
}
Secret is the model entity for the Secret schema.
func (*Secret) Unwrap ¶
Unwrap unwraps the Secret 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 (*Secret) Update ¶
func (_m *Secret) Update() *SecretUpdateOne
Update returns a builder for updating this Secret. Note that you need to call Secret.Unwrap() before calling this method if this Secret was returned from a transaction, and the transaction was committed or rolled back.
type SecretClient ¶
type SecretClient struct {
// contains filtered or unexported fields
}
SecretClient is a client for the Secret schema.
func NewSecretClient ¶
func NewSecretClient(c config) *SecretClient
NewSecretClient returns a client for the Secret from the given config.
func (*SecretClient) Create ¶
func (c *SecretClient) Create() *SecretCreate
Create returns a builder for creating a Secret entity.
func (*SecretClient) CreateBulk ¶
func (c *SecretClient) CreateBulk(builders ...*SecretCreate) *SecretCreateBulk
CreateBulk returns a builder for creating a bulk of Secret entities.
func (*SecretClient) Delete ¶
func (c *SecretClient) Delete() *SecretDelete
Delete returns a delete builder for Secret.
func (*SecretClient) DeleteOne ¶
func (c *SecretClient) DeleteOne(_m *Secret) *SecretDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SecretClient) DeleteOneID ¶
func (c *SecretClient) DeleteOneID(id uuid.UUID) *SecretDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SecretClient) Intercept ¶
func (c *SecretClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `secret.Intercept(f(g(h())))`.
func (*SecretClient) Interceptors ¶
func (c *SecretClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SecretClient) MapCreateBulk ¶
func (c *SecretClient) MapCreateBulk(slice any, setFunc func(*SecretCreate, int)) *SecretCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SecretClient) Query ¶
func (c *SecretClient) Query() *SecretQuery
Query returns a query builder for Secret.
func (*SecretClient) QueryKey ¶
func (c *SecretClient) QueryKey(_m *Secret) *KeyQuery
QueryKey queries the key edge of a Secret.
func (*SecretClient) Update ¶
func (c *SecretClient) Update() *SecretUpdate
Update returns an update builder for Secret.
func (*SecretClient) UpdateOne ¶
func (c *SecretClient) UpdateOne(_m *Secret) *SecretUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SecretClient) UpdateOneID ¶
func (c *SecretClient) UpdateOneID(id uuid.UUID) *SecretUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SecretClient) Use ¶
func (c *SecretClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `secret.Hooks(f(g(h())))`.
type SecretCreate ¶
type SecretCreate struct {
// contains filtered or unexported fields
}
SecretCreate is the builder for creating a Secret entity.
func (*SecretCreate) Exec ¶
func (_c *SecretCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretCreate) ExecX ¶
func (_c *SecretCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretCreate) Mutation ¶
func (_c *SecretCreate) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretCreate) Save ¶
func (_c *SecretCreate) Save(ctx context.Context) (*Secret, error)
Save creates the Secret in the database.
func (*SecretCreate) SaveX ¶
func (_c *SecretCreate) SaveX(ctx context.Context) *Secret
SaveX calls Save and panics if Save returns an error.
func (*SecretCreate) SetAccessCount ¶
func (_c *SecretCreate) SetAccessCount(v int) *SecretCreate
SetAccessCount sets the "access_count" field.
func (*SecretCreate) SetCreatedAt ¶
func (_c *SecretCreate) SetCreatedAt(v time.Time) *SecretCreate
SetCreatedAt sets the "created_at" field.
func (*SecretCreate) SetEncryptedValue ¶
func (_c *SecretCreate) SetEncryptedValue(v []byte) *SecretCreate
SetEncryptedValue sets the "encrypted_value" field.
func (*SecretCreate) SetID ¶
func (_c *SecretCreate) SetID(v uuid.UUID) *SecretCreate
SetID sets the "id" field.
func (*SecretCreate) SetKey ¶
func (_c *SecretCreate) SetKey(v *Key) *SecretCreate
SetKey sets the "key" edge to the Key entity.
func (*SecretCreate) SetKeyID ¶
func (_c *SecretCreate) SetKeyID(id uuid.UUID) *SecretCreate
SetKeyID sets the "key" edge to the Key entity by ID.
func (*SecretCreate) SetName ¶
func (_c *SecretCreate) SetName(v string) *SecretCreate
SetName sets the "name" field.
func (*SecretCreate) SetNillableAccessCount ¶
func (_c *SecretCreate) SetNillableAccessCount(v *int) *SecretCreate
SetNillableAccessCount sets the "access_count" field if the given value is not nil.
func (*SecretCreate) SetNillableCreatedAt ¶
func (_c *SecretCreate) SetNillableCreatedAt(v *time.Time) *SecretCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SecretCreate) SetNillableID ¶
func (_c *SecretCreate) SetNillableID(v *uuid.UUID) *SecretCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*SecretCreate) SetNillableUpdatedAt ¶
func (_c *SecretCreate) SetNillableUpdatedAt(v *time.Time) *SecretCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SecretCreate) SetUpdatedAt ¶
func (_c *SecretCreate) SetUpdatedAt(v time.Time) *SecretCreate
SetUpdatedAt sets the "updated_at" field.
type SecretCreateBulk ¶
type SecretCreateBulk struct {
// contains filtered or unexported fields
}
SecretCreateBulk is the builder for creating many Secret entities in bulk.
func (*SecretCreateBulk) Exec ¶
func (_c *SecretCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretCreateBulk) ExecX ¶
func (_c *SecretCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SecretDelete ¶
type SecretDelete struct {
// contains filtered or unexported fields
}
SecretDelete is the builder for deleting a Secret entity.
func (*SecretDelete) Exec ¶
func (_d *SecretDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SecretDelete) ExecX ¶
func (_d *SecretDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SecretDelete) Where ¶
func (_d *SecretDelete) Where(ps ...predicate.Secret) *SecretDelete
Where appends a list predicates to the SecretDelete builder.
type SecretDeleteOne ¶
type SecretDeleteOne struct {
// contains filtered or unexported fields
}
SecretDeleteOne is the builder for deleting a single Secret entity.
func (*SecretDeleteOne) Exec ¶
func (_d *SecretDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SecretDeleteOne) ExecX ¶
func (_d *SecretDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretDeleteOne) Where ¶
func (_d *SecretDeleteOne) Where(ps ...predicate.Secret) *SecretDeleteOne
Where appends a list predicates to the SecretDelete builder.
type SecretEdges ¶
type SecretEdges struct {
// Encryption key used for this secret
Key *Key `json:"key,omitempty"`
// contains filtered or unexported fields
}
SecretEdges holds the relations/edges for other nodes in the graph.
func (SecretEdges) KeyOrErr ¶
func (e SecretEdges) KeyOrErr() (*Key, error)
KeyOrErr returns the Key value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SecretGroupBy ¶
type SecretGroupBy struct {
// contains filtered or unexported fields
}
SecretGroupBy is the group-by builder for Secret entities.
func (*SecretGroupBy) Aggregate ¶
func (_g *SecretGroupBy) Aggregate(fns ...AggregateFunc) *SecretGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SecretGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Scan ¶
func (_g *SecretGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SecretGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SecretMutation ¶
type SecretMutation struct {
// contains filtered or unexported fields
}
SecretMutation represents an operation that mutates the Secret nodes in the graph.
func (*SecretMutation) AccessCount ¶
func (m *SecretMutation) AccessCount() (r int, exists bool)
AccessCount returns the value of the "access_count" field in the mutation.
func (*SecretMutation) AddAccessCount ¶
func (m *SecretMutation) AddAccessCount(i int)
AddAccessCount adds i to the "access_count" field.
func (*SecretMutation) AddField ¶
func (m *SecretMutation) 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 (*SecretMutation) AddedAccessCount ¶
func (m *SecretMutation) AddedAccessCount() (r int, exists bool)
AddedAccessCount returns the value that was added to the "access_count" field in this mutation.
func (*SecretMutation) AddedEdges ¶
func (m *SecretMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SecretMutation) AddedField ¶
func (m *SecretMutation) 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 (*SecretMutation) AddedFields ¶
func (m *SecretMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SecretMutation) AddedIDs ¶
func (m *SecretMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SecretMutation) ClearEdge ¶
func (m *SecretMutation) 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 (*SecretMutation) ClearField ¶
func (m *SecretMutation) 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 (*SecretMutation) ClearKey ¶
func (m *SecretMutation) ClearKey()
ClearKey clears the "key" edge to the Key entity.
func (*SecretMutation) ClearedEdges ¶
func (m *SecretMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SecretMutation) ClearedFields ¶
func (m *SecretMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SecretMutation) Client ¶
func (m SecretMutation) 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 (*SecretMutation) CreatedAt ¶
func (m *SecretMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SecretMutation) EdgeCleared ¶
func (m *SecretMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SecretMutation) EncryptedValue ¶
func (m *SecretMutation) EncryptedValue() (r []byte, exists bool)
EncryptedValue returns the value of the "encrypted_value" field in the mutation.
func (*SecretMutation) Field ¶
func (m *SecretMutation) 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 (*SecretMutation) FieldCleared ¶
func (m *SecretMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SecretMutation) Fields ¶
func (m *SecretMutation) 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 (*SecretMutation) ID ¶
func (m *SecretMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SecretMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SecretMutation) KeyCleared ¶
func (m *SecretMutation) KeyCleared() bool
KeyCleared reports if the "key" edge to the Key entity was cleared.
func (*SecretMutation) KeyID ¶
func (m *SecretMutation) KeyID() (id uuid.UUID, exists bool)
KeyID returns the "key" edge ID in the mutation.
func (*SecretMutation) KeyIDs ¶
func (m *SecretMutation) KeyIDs() (ids []uuid.UUID)
KeyIDs returns the "key" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use KeyID instead. It exists only for internal usage by the builders.
func (*SecretMutation) Name ¶
func (m *SecretMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SecretMutation) OldAccessCount ¶
func (m *SecretMutation) OldAccessCount(ctx context.Context) (v int, err error)
OldAccessCount returns the old "access_count" field's value of the Secret entity. If the Secret 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 (*SecretMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Secret entity. If the Secret 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 (*SecretMutation) OldEncryptedValue ¶
func (m *SecretMutation) OldEncryptedValue(ctx context.Context) (v []byte, err error)
OldEncryptedValue returns the old "encrypted_value" field's value of the Secret entity. If the Secret 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 (*SecretMutation) 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 (*SecretMutation) OldName ¶
func (m *SecretMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Secret entity. If the Secret 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 (*SecretMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Secret entity. If the Secret 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 (*SecretMutation) RemovedEdges ¶
func (m *SecretMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SecretMutation) RemovedIDs ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetAccessCount ¶
func (m *SecretMutation) ResetAccessCount()
ResetAccessCount resets all changes to the "access_count" field.
func (*SecretMutation) ResetCreatedAt ¶
func (m *SecretMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SecretMutation) ResetEdge ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetEncryptedValue ¶
func (m *SecretMutation) ResetEncryptedValue()
ResetEncryptedValue resets all changes to the "encrypted_value" field.
func (*SecretMutation) ResetField ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetKey ¶
func (m *SecretMutation) ResetKey()
ResetKey resets all changes to the "key" edge.
func (*SecretMutation) ResetName ¶
func (m *SecretMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SecretMutation) ResetUpdatedAt ¶
func (m *SecretMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SecretMutation) SetAccessCount ¶
func (m *SecretMutation) SetAccessCount(i int)
SetAccessCount sets the "access_count" field.
func (*SecretMutation) SetCreatedAt ¶
func (m *SecretMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SecretMutation) SetEncryptedValue ¶
func (m *SecretMutation) SetEncryptedValue(b []byte)
SetEncryptedValue sets the "encrypted_value" field.
func (*SecretMutation) SetField ¶
func (m *SecretMutation) 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 (*SecretMutation) SetID ¶
func (m *SecretMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Secret entities.
func (*SecretMutation) SetKeyID ¶
func (m *SecretMutation) SetKeyID(id uuid.UUID)
SetKeyID sets the "key" edge to the Key entity by id.
func (*SecretMutation) SetName ¶
func (m *SecretMutation) SetName(s string)
SetName sets the "name" field.
func (*SecretMutation) SetOp ¶
func (m *SecretMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SecretMutation) SetUpdatedAt ¶
func (m *SecretMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (SecretMutation) Tx ¶
func (m SecretMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SecretMutation) Type ¶
func (m *SecretMutation) Type() string
Type returns the node type of this mutation (Secret).
func (*SecretMutation) UpdatedAt ¶
func (m *SecretMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SecretMutation) Where ¶
func (m *SecretMutation) Where(ps ...predicate.Secret)
Where appends a list predicates to the SecretMutation builder.
func (*SecretMutation) WhereP ¶
func (m *SecretMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SecretMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SecretQuery ¶
type SecretQuery struct {
// contains filtered or unexported fields
}
SecretQuery is the builder for querying Secret entities.
func (*SecretQuery) Aggregate ¶
func (_q *SecretQuery) Aggregate(fns ...AggregateFunc) *SecretSelect
Aggregate returns a SecretSelect configured with the given aggregations.
func (*SecretQuery) All ¶
func (_q *SecretQuery) All(ctx context.Context) ([]*Secret, error)
All executes the query and returns a list of Secrets.
func (*SecretQuery) AllX ¶
func (_q *SecretQuery) AllX(ctx context.Context) []*Secret
AllX is like All, but panics if an error occurs.
func (*SecretQuery) Clone ¶
func (_q *SecretQuery) Clone() *SecretQuery
Clone returns a duplicate of the SecretQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SecretQuery) Count ¶
func (_q *SecretQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SecretQuery) CountX ¶
func (_q *SecretQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SecretQuery) Exist ¶
func (_q *SecretQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SecretQuery) ExistX ¶
func (_q *SecretQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SecretQuery) First ¶
func (_q *SecretQuery) First(ctx context.Context) (*Secret, error)
First returns the first Secret entity from the query. Returns a *NotFoundError when no Secret was found.
func (*SecretQuery) FirstID ¶
FirstID returns the first Secret ID from the query. Returns a *NotFoundError when no Secret ID was found.
func (*SecretQuery) FirstIDX ¶
func (_q *SecretQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*SecretQuery) FirstX ¶
func (_q *SecretQuery) FirstX(ctx context.Context) *Secret
FirstX is like First, but panics if an error occurs.
func (*SecretQuery) GroupBy ¶
func (_q *SecretQuery) GroupBy(field string, fields ...string) *SecretGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.Secret.Query().
GroupBy(secret.FieldName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SecretQuery) IDsX ¶
func (_q *SecretQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*SecretQuery) Limit ¶
func (_q *SecretQuery) Limit(limit int) *SecretQuery
Limit the number of records to be returned by this query.
func (*SecretQuery) Offset ¶
func (_q *SecretQuery) Offset(offset int) *SecretQuery
Offset to start from.
func (*SecretQuery) Only ¶
func (_q *SecretQuery) Only(ctx context.Context) (*Secret, error)
Only returns a single Secret entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Secret entity is found. Returns a *NotFoundError when no Secret entities are found.
func (*SecretQuery) OnlyID ¶
OnlyID is like Only, but returns the only Secret ID in the query. Returns a *NotSingularError when more than one Secret ID is found. Returns a *NotFoundError when no entities are found.
func (*SecretQuery) OnlyIDX ¶
func (_q *SecretQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SecretQuery) OnlyX ¶
func (_q *SecretQuery) OnlyX(ctx context.Context) *Secret
OnlyX is like Only, but panics if an error occurs.
func (*SecretQuery) Order ¶
func (_q *SecretQuery) Order(o ...secret.OrderOption) *SecretQuery
Order specifies how the records should be ordered.
func (*SecretQuery) QueryKey ¶
func (_q *SecretQuery) QueryKey() *KeyQuery
QueryKey chains the current query on the "key" edge.
func (*SecretQuery) Select ¶
func (_q *SecretQuery) Select(fields ...string) *SecretSelect
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 {
Name string `json:"name,omitempty"`
}
client.Secret.Query().
Select(secret.FieldName).
Scan(ctx, &v)
func (*SecretQuery) Unique ¶
func (_q *SecretQuery) Unique(unique bool) *SecretQuery
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 (*SecretQuery) Where ¶
func (_q *SecretQuery) Where(ps ...predicate.Secret) *SecretQuery
Where adds a new predicate for the SecretQuery builder.
func (*SecretQuery) WithKey ¶
func (_q *SecretQuery) WithKey(opts ...func(*KeyQuery)) *SecretQuery
WithKey tells the query-builder to eager-load the nodes that are connected to the "key" edge. The optional arguments are used to configure the query builder of the edge.
type SecretSelect ¶
type SecretSelect struct {
*SecretQuery
// contains filtered or unexported fields
}
SecretSelect is the builder for selecting fields of Secret entities.
func (*SecretSelect) Aggregate ¶
func (_s *SecretSelect) Aggregate(fns ...AggregateFunc) *SecretSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SecretSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Scan ¶
func (_s *SecretSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SecretSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SecretUpdate ¶
type SecretUpdate struct {
// contains filtered or unexported fields
}
SecretUpdate is the builder for updating Secret entities.
func (*SecretUpdate) AddAccessCount ¶
func (_u *SecretUpdate) AddAccessCount(v int) *SecretUpdate
AddAccessCount adds value to the "access_count" field.
func (*SecretUpdate) ClearKey ¶
func (_u *SecretUpdate) ClearKey() *SecretUpdate
ClearKey clears the "key" edge to the Key entity.
func (*SecretUpdate) Exec ¶
func (_u *SecretUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretUpdate) ExecX ¶
func (_u *SecretUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpdate) Mutation ¶
func (_u *SecretUpdate) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretUpdate) Save ¶
func (_u *SecretUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SecretUpdate) SaveX ¶
func (_u *SecretUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SecretUpdate) SetAccessCount ¶
func (_u *SecretUpdate) SetAccessCount(v int) *SecretUpdate
SetAccessCount sets the "access_count" field.
func (*SecretUpdate) SetEncryptedValue ¶
func (_u *SecretUpdate) SetEncryptedValue(v []byte) *SecretUpdate
SetEncryptedValue sets the "encrypted_value" field.
func (*SecretUpdate) SetKey ¶
func (_u *SecretUpdate) SetKey(v *Key) *SecretUpdate
SetKey sets the "key" edge to the Key entity.
func (*SecretUpdate) SetKeyID ¶
func (_u *SecretUpdate) SetKeyID(id uuid.UUID) *SecretUpdate
SetKeyID sets the "key" edge to the Key entity by ID.
func (*SecretUpdate) SetName ¶
func (_u *SecretUpdate) SetName(v string) *SecretUpdate
SetName sets the "name" field.
func (*SecretUpdate) SetNillableAccessCount ¶
func (_u *SecretUpdate) SetNillableAccessCount(v *int) *SecretUpdate
SetNillableAccessCount sets the "access_count" field if the given value is not nil.
func (*SecretUpdate) SetNillableName ¶
func (_u *SecretUpdate) SetNillableName(v *string) *SecretUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*SecretUpdate) SetUpdatedAt ¶
func (_u *SecretUpdate) SetUpdatedAt(v time.Time) *SecretUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpdate) Where ¶
func (_u *SecretUpdate) Where(ps ...predicate.Secret) *SecretUpdate
Where appends a list predicates to the SecretUpdate builder.
type SecretUpdateOne ¶
type SecretUpdateOne struct {
// contains filtered or unexported fields
}
SecretUpdateOne is the builder for updating a single Secret entity.
func (*SecretUpdateOne) AddAccessCount ¶
func (_u *SecretUpdateOne) AddAccessCount(v int) *SecretUpdateOne
AddAccessCount adds value to the "access_count" field.
func (*SecretUpdateOne) ClearKey ¶
func (_u *SecretUpdateOne) ClearKey() *SecretUpdateOne
ClearKey clears the "key" edge to the Key entity.
func (*SecretUpdateOne) Exec ¶
func (_u *SecretUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SecretUpdateOne) ExecX ¶
func (_u *SecretUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpdateOne) Mutation ¶
func (_u *SecretUpdateOne) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretUpdateOne) Save ¶
func (_u *SecretUpdateOne) Save(ctx context.Context) (*Secret, error)
Save executes the query and returns the updated Secret entity.
func (*SecretUpdateOne) SaveX ¶
func (_u *SecretUpdateOne) SaveX(ctx context.Context) *Secret
SaveX is like Save, but panics if an error occurs.
func (*SecretUpdateOne) Select ¶
func (_u *SecretUpdateOne) Select(field string, fields ...string) *SecretUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SecretUpdateOne) SetAccessCount ¶
func (_u *SecretUpdateOne) SetAccessCount(v int) *SecretUpdateOne
SetAccessCount sets the "access_count" field.
func (*SecretUpdateOne) SetEncryptedValue ¶
func (_u *SecretUpdateOne) SetEncryptedValue(v []byte) *SecretUpdateOne
SetEncryptedValue sets the "encrypted_value" field.
func (*SecretUpdateOne) SetKey ¶
func (_u *SecretUpdateOne) SetKey(v *Key) *SecretUpdateOne
SetKey sets the "key" edge to the Key entity.
func (*SecretUpdateOne) SetKeyID ¶
func (_u *SecretUpdateOne) SetKeyID(id uuid.UUID) *SecretUpdateOne
SetKeyID sets the "key" edge to the Key entity by ID.
func (*SecretUpdateOne) SetName ¶
func (_u *SecretUpdateOne) SetName(v string) *SecretUpdateOne
SetName sets the "name" field.
func (*SecretUpdateOne) SetNillableAccessCount ¶
func (_u *SecretUpdateOne) SetNillableAccessCount(v *int) *SecretUpdateOne
SetNillableAccessCount sets the "access_count" field if the given value is not nil.
func (*SecretUpdateOne) SetNillableName ¶
func (_u *SecretUpdateOne) SetNillableName(v *string) *SecretUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*SecretUpdateOne) SetUpdatedAt ¶
func (_u *SecretUpdateOne) SetUpdatedAt(v time.Time) *SecretUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpdateOne) Where ¶
func (_u *SecretUpdateOne) Where(ps ...predicate.Secret) *SecretUpdateOne
Where appends a list predicates to the SecretUpdate builder.
type Session ¶
type Session struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Key holds the value of the "key" field.
Key string `json:"key,omitempty"`
// AgentID holds the value of the "agent_id" field.
AgentID string `json:"agent_id,omitempty"`
// ChannelType holds the value of the "channel_type" field.
ChannelType string `json:"channel_type,omitempty"`
// ChannelID holds the value of the "channel_id" field.
ChannelID string `json:"channel_id,omitempty"`
// Model holds the value of the "model" field.
Model string `json:"model,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]string `json:"metadata,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the SessionQuery when eager-loading is set.
Edges SessionEdges `json:"edges"`
// contains filtered or unexported fields
}
Session is the model entity for the Session schema.
func (*Session) QueryMessages ¶
func (_m *Session) QueryMessages() *MessageQuery
QueryMessages queries the "messages" edge of the Session entity.
func (*Session) Unwrap ¶
Unwrap unwraps the Session 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 (*Session) Update ¶
func (_m *Session) Update() *SessionUpdateOne
Update returns a builder for updating this Session. Note that you need to call Session.Unwrap() before calling this method if this Session was returned from a transaction, and the transaction was committed or rolled back.
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient is a client for the Session schema.
func NewSessionClient ¶
func NewSessionClient(c config) *SessionClient
NewSessionClient returns a client for the Session from the given config.
func (*SessionClient) Create ¶
func (c *SessionClient) Create() *SessionCreate
Create returns a builder for creating a Session entity.
func (*SessionClient) CreateBulk ¶
func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
CreateBulk returns a builder for creating a bulk of Session entities.
func (*SessionClient) Delete ¶
func (c *SessionClient) Delete() *SessionDelete
Delete returns a delete builder for Session.
func (*SessionClient) DeleteOne ¶
func (c *SessionClient) DeleteOne(_m *Session) *SessionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SessionClient) DeleteOneID ¶
func (c *SessionClient) DeleteOneID(id int) *SessionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SessionClient) GetX ¶
func (c *SessionClient) GetX(ctx context.Context, id int) *Session
GetX is like Get, but panics if an error occurs.
func (*SessionClient) Hooks ¶
func (c *SessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SessionClient) Intercept ¶
func (c *SessionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `session.Intercept(f(g(h())))`.
func (*SessionClient) Interceptors ¶
func (c *SessionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SessionClient) MapCreateBulk ¶
func (c *SessionClient) MapCreateBulk(slice any, setFunc func(*SessionCreate, int)) *SessionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SessionClient) Query ¶
func (c *SessionClient) Query() *SessionQuery
Query returns a query builder for Session.
func (*SessionClient) QueryMessages ¶
func (c *SessionClient) QueryMessages(_m *Session) *MessageQuery
QueryMessages queries the messages edge of a Session.
func (*SessionClient) Update ¶
func (c *SessionClient) Update() *SessionUpdate
Update returns an update builder for Session.
func (*SessionClient) UpdateOne ¶
func (c *SessionClient) UpdateOne(_m *Session) *SessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SessionClient) UpdateOneID ¶
func (c *SessionClient) UpdateOneID(id int) *SessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SessionClient) Use ¶
func (c *SessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.
type SessionCreate ¶
type SessionCreate struct {
// contains filtered or unexported fields
}
SessionCreate is the builder for creating a Session entity.
func (*SessionCreate) AddMessageIDs ¶
func (_c *SessionCreate) AddMessageIDs(ids ...int) *SessionCreate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*SessionCreate) AddMessages ¶
func (_c *SessionCreate) AddMessages(v ...*Message) *SessionCreate
AddMessages adds the "messages" edges to the Message entity.
func (*SessionCreate) Exec ¶
func (_c *SessionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreate) ExecX ¶
func (_c *SessionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionCreate) Mutation ¶
func (_c *SessionCreate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionCreate) Save ¶
func (_c *SessionCreate) Save(ctx context.Context) (*Session, error)
Save creates the Session in the database.
func (*SessionCreate) SaveX ¶
func (_c *SessionCreate) SaveX(ctx context.Context) *Session
SaveX calls Save and panics if Save returns an error.
func (*SessionCreate) SetAgentID ¶
func (_c *SessionCreate) SetAgentID(v string) *SessionCreate
SetAgentID sets the "agent_id" field.
func (*SessionCreate) SetChannelID ¶
func (_c *SessionCreate) SetChannelID(v string) *SessionCreate
SetChannelID sets the "channel_id" field.
func (*SessionCreate) SetChannelType ¶
func (_c *SessionCreate) SetChannelType(v string) *SessionCreate
SetChannelType sets the "channel_type" field.
func (*SessionCreate) SetCreatedAt ¶
func (_c *SessionCreate) SetCreatedAt(v time.Time) *SessionCreate
SetCreatedAt sets the "created_at" field.
func (*SessionCreate) SetKey ¶
func (_c *SessionCreate) SetKey(v string) *SessionCreate
SetKey sets the "key" field.
func (*SessionCreate) SetMetadata ¶
func (_c *SessionCreate) SetMetadata(v map[string]string) *SessionCreate
SetMetadata sets the "metadata" field.
func (*SessionCreate) SetModel ¶
func (_c *SessionCreate) SetModel(v string) *SessionCreate
SetModel sets the "model" field.
func (*SessionCreate) SetNillableAgentID ¶
func (_c *SessionCreate) SetNillableAgentID(v *string) *SessionCreate
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*SessionCreate) SetNillableChannelID ¶
func (_c *SessionCreate) SetNillableChannelID(v *string) *SessionCreate
SetNillableChannelID sets the "channel_id" field if the given value is not nil.
func (*SessionCreate) SetNillableChannelType ¶
func (_c *SessionCreate) SetNillableChannelType(v *string) *SessionCreate
SetNillableChannelType sets the "channel_type" field if the given value is not nil.
func (*SessionCreate) SetNillableCreatedAt ¶
func (_c *SessionCreate) SetNillableCreatedAt(v *time.Time) *SessionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SessionCreate) SetNillableModel ¶
func (_c *SessionCreate) SetNillableModel(v *string) *SessionCreate
SetNillableModel sets the "model" field if the given value is not nil.
func (*SessionCreate) SetNillableUpdatedAt ¶
func (_c *SessionCreate) SetNillableUpdatedAt(v *time.Time) *SessionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SessionCreate) SetUpdatedAt ¶
func (_c *SessionCreate) SetUpdatedAt(v time.Time) *SessionCreate
SetUpdatedAt sets the "updated_at" field.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating many Session entities in bulk.
func (*SessionCreateBulk) Exec ¶
func (_c *SessionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionCreateBulk) ExecX ¶
func (_c *SessionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SessionDelete ¶
type SessionDelete struct {
// contains filtered or unexported fields
}
SessionDelete is the builder for deleting a Session entity.
func (*SessionDelete) Exec ¶
func (_d *SessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SessionDelete) ExecX ¶
func (_d *SessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SessionDelete) Where ¶
func (_d *SessionDelete) Where(ps ...predicate.Session) *SessionDelete
Where appends a list predicates to the SessionDelete builder.
type SessionDeleteOne ¶
type SessionDeleteOne struct {
// contains filtered or unexported fields
}
SessionDeleteOne is the builder for deleting a single Session entity.
func (*SessionDeleteOne) Exec ¶
func (_d *SessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SessionDeleteOne) ExecX ¶
func (_d *SessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionDeleteOne) Where ¶
func (_d *SessionDeleteOne) Where(ps ...predicate.Session) *SessionDeleteOne
Where appends a list predicates to the SessionDelete builder.
type SessionEdges ¶
type SessionEdges struct {
// Messages holds the value of the messages edge.
Messages []*Message `json:"messages,omitempty"`
// contains filtered or unexported fields
}
SessionEdges holds the relations/edges for other nodes in the graph.
func (SessionEdges) MessagesOrErr ¶
func (e SessionEdges) MessagesOrErr() ([]*Message, error)
MessagesOrErr returns the Messages value or an error if the edge was not loaded in eager-loading.
type SessionGroupBy ¶
type SessionGroupBy struct {
// contains filtered or unexported fields
}
SessionGroupBy is the group-by builder for Session entities.
func (*SessionGroupBy) Aggregate ¶
func (_g *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SessionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SessionGroupBy) Scan ¶
func (_g *SessionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SessionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SessionMutation ¶
type SessionMutation struct {
// contains filtered or unexported fields
}
SessionMutation represents an operation that mutates the Session nodes in the graph.
func (*SessionMutation) AddField ¶
func (m *SessionMutation) 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 (*SessionMutation) AddMessageIDs ¶
func (m *SessionMutation) AddMessageIDs(ids ...int)
AddMessageIDs adds the "messages" edge to the Message entity by ids.
func (*SessionMutation) AddedEdges ¶
func (m *SessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SessionMutation) AddedField ¶
func (m *SessionMutation) 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 (*SessionMutation) AddedFields ¶
func (m *SessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SessionMutation) AddedIDs ¶
func (m *SessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SessionMutation) AgentID ¶
func (m *SessionMutation) AgentID() (r string, exists bool)
AgentID returns the value of the "agent_id" field in the mutation.
func (*SessionMutation) AgentIDCleared ¶
func (m *SessionMutation) AgentIDCleared() bool
AgentIDCleared returns if the "agent_id" field was cleared in this mutation.
func (*SessionMutation) ChannelID ¶
func (m *SessionMutation) ChannelID() (r string, exists bool)
ChannelID returns the value of the "channel_id" field in the mutation.
func (*SessionMutation) ChannelIDCleared ¶
func (m *SessionMutation) ChannelIDCleared() bool
ChannelIDCleared returns if the "channel_id" field was cleared in this mutation.
func (*SessionMutation) ChannelType ¶
func (m *SessionMutation) ChannelType() (r string, exists bool)
ChannelType returns the value of the "channel_type" field in the mutation.
func (*SessionMutation) ChannelTypeCleared ¶
func (m *SessionMutation) ChannelTypeCleared() bool
ChannelTypeCleared returns if the "channel_type" field was cleared in this mutation.
func (*SessionMutation) ClearAgentID ¶
func (m *SessionMutation) ClearAgentID()
ClearAgentID clears the value of the "agent_id" field.
func (*SessionMutation) ClearChannelID ¶
func (m *SessionMutation) ClearChannelID()
ClearChannelID clears the value of the "channel_id" field.
func (*SessionMutation) ClearChannelType ¶
func (m *SessionMutation) ClearChannelType()
ClearChannelType clears the value of the "channel_type" field.
func (*SessionMutation) ClearEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearField ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearMessages ¶
func (m *SessionMutation) ClearMessages()
ClearMessages clears the "messages" edge to the Message entity.
func (*SessionMutation) ClearMetadata ¶
func (m *SessionMutation) ClearMetadata()
ClearMetadata clears the value of the "metadata" field.
func (*SessionMutation) ClearModel ¶
func (m *SessionMutation) ClearModel()
ClearModel clears the value of the "model" field.
func (*SessionMutation) ClearedEdges ¶
func (m *SessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SessionMutation) ClearedFields ¶
func (m *SessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SessionMutation) Client ¶
func (m SessionMutation) 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 (*SessionMutation) CreatedAt ¶
func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SessionMutation) EdgeCleared ¶
func (m *SessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SessionMutation) Field ¶
func (m *SessionMutation) 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 (*SessionMutation) FieldCleared ¶
func (m *SessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SessionMutation) Fields ¶
func (m *SessionMutation) 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 (*SessionMutation) ID ¶
func (m *SessionMutation) 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 (*SessionMutation) IDs ¶
func (m *SessionMutation) 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 (*SessionMutation) Key ¶
func (m *SessionMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*SessionMutation) MessagesCleared ¶
func (m *SessionMutation) MessagesCleared() bool
MessagesCleared reports if the "messages" edge to the Message entity was cleared.
func (*SessionMutation) MessagesIDs ¶
func (m *SessionMutation) MessagesIDs() (ids []int)
MessagesIDs returns the "messages" edge IDs in the mutation.
func (*SessionMutation) Metadata ¶
func (m *SessionMutation) Metadata() (r map[string]string, exists bool)
Metadata returns the value of the "metadata" field in the mutation.
func (*SessionMutation) MetadataCleared ¶
func (m *SessionMutation) MetadataCleared() bool
MetadataCleared returns if the "metadata" field was cleared in this mutation.
func (*SessionMutation) Model ¶
func (m *SessionMutation) Model() (r string, exists bool)
Model returns the value of the "model" field in the mutation.
func (*SessionMutation) ModelCleared ¶
func (m *SessionMutation) ModelCleared() bool
ModelCleared returns if the "model" field was cleared in this mutation.
func (*SessionMutation) OldAgentID ¶
func (m *SessionMutation) OldAgentID(ctx context.Context) (v string, err error)
OldAgentID returns the old "agent_id" field's value of the Session entity. If the Session 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 (*SessionMutation) OldChannelID ¶
func (m *SessionMutation) OldChannelID(ctx context.Context) (v string, err error)
OldChannelID returns the old "channel_id" field's value of the Session entity. If the Session 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 (*SessionMutation) OldChannelType ¶
func (m *SessionMutation) OldChannelType(ctx context.Context) (v string, err error)
OldChannelType returns the old "channel_type" field's value of the Session entity. If the Session 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 (*SessionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Session entity. If the Session 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 (*SessionMutation) 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 (*SessionMutation) OldKey ¶
func (m *SessionMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the Session entity. If the Session 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 (*SessionMutation) OldMetadata ¶
OldMetadata returns the old "metadata" field's value of the Session entity. If the Session 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 (*SessionMutation) OldModel ¶
func (m *SessionMutation) OldModel(ctx context.Context) (v string, err error)
OldModel returns the old "model" field's value of the Session entity. If the Session 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 (*SessionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Session entity. If the Session 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 (*SessionMutation) RemoveMessageIDs ¶
func (m *SessionMutation) RemoveMessageIDs(ids ...int)
RemoveMessageIDs removes the "messages" edge to the Message entity by IDs.
func (*SessionMutation) RemovedEdges ¶
func (m *SessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SessionMutation) RemovedIDs ¶
func (m *SessionMutation) 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 (*SessionMutation) RemovedMessagesIDs ¶
func (m *SessionMutation) RemovedMessagesIDs() (ids []int)
RemovedMessages returns the removed IDs of the "messages" edge to the Message entity.
func (*SessionMutation) ResetAgentID ¶
func (m *SessionMutation) ResetAgentID()
ResetAgentID resets all changes to the "agent_id" field.
func (*SessionMutation) ResetChannelID ¶
func (m *SessionMutation) ResetChannelID()
ResetChannelID resets all changes to the "channel_id" field.
func (*SessionMutation) ResetChannelType ¶
func (m *SessionMutation) ResetChannelType()
ResetChannelType resets all changes to the "channel_type" field.
func (*SessionMutation) ResetCreatedAt ¶
func (m *SessionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SessionMutation) ResetEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetField ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetKey ¶
func (m *SessionMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*SessionMutation) ResetMessages ¶
func (m *SessionMutation) ResetMessages()
ResetMessages resets all changes to the "messages" edge.
func (*SessionMutation) ResetMetadata ¶
func (m *SessionMutation) ResetMetadata()
ResetMetadata resets all changes to the "metadata" field.
func (*SessionMutation) ResetModel ¶
func (m *SessionMutation) ResetModel()
ResetModel resets all changes to the "model" field.
func (*SessionMutation) ResetUpdatedAt ¶
func (m *SessionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SessionMutation) SetAgentID ¶
func (m *SessionMutation) SetAgentID(s string)
SetAgentID sets the "agent_id" field.
func (*SessionMutation) SetChannelID ¶
func (m *SessionMutation) SetChannelID(s string)
SetChannelID sets the "channel_id" field.
func (*SessionMutation) SetChannelType ¶
func (m *SessionMutation) SetChannelType(s string)
SetChannelType sets the "channel_type" field.
func (*SessionMutation) SetCreatedAt ¶
func (m *SessionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SessionMutation) SetField ¶
func (m *SessionMutation) 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 (*SessionMutation) SetKey ¶
func (m *SessionMutation) SetKey(s string)
SetKey sets the "key" field.
func (*SessionMutation) SetMetadata ¶
func (m *SessionMutation) SetMetadata(value map[string]string)
SetMetadata sets the "metadata" field.
func (*SessionMutation) SetModel ¶
func (m *SessionMutation) SetModel(s string)
SetModel sets the "model" field.
func (*SessionMutation) SetOp ¶
func (m *SessionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SessionMutation) SetUpdatedAt ¶
func (m *SessionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (SessionMutation) Tx ¶
func (m SessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SessionMutation) Type ¶
func (m *SessionMutation) Type() string
Type returns the node type of this mutation (Session).
func (*SessionMutation) UpdatedAt ¶
func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SessionMutation) Where ¶
func (m *SessionMutation) Where(ps ...predicate.Session)
Where appends a list predicates to the SessionMutation builder.
func (*SessionMutation) WhereP ¶
func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SessionQuery ¶
type SessionQuery struct {
// contains filtered or unexported fields
}
SessionQuery is the builder for querying Session entities.
func (*SessionQuery) Aggregate ¶
func (_q *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect
Aggregate returns a SessionSelect configured with the given aggregations.
func (*SessionQuery) All ¶
func (_q *SessionQuery) All(ctx context.Context) ([]*Session, error)
All executes the query and returns a list of Sessions.
func (*SessionQuery) AllX ¶
func (_q *SessionQuery) AllX(ctx context.Context) []*Session
AllX is like All, but panics if an error occurs.
func (*SessionQuery) Clone ¶
func (_q *SessionQuery) Clone() *SessionQuery
Clone returns a duplicate of the SessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SessionQuery) Count ¶
func (_q *SessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SessionQuery) CountX ¶
func (_q *SessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SessionQuery) Exist ¶
func (_q *SessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SessionQuery) ExistX ¶
func (_q *SessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SessionQuery) First ¶
func (_q *SessionQuery) First(ctx context.Context) (*Session, error)
First returns the first Session entity from the query. Returns a *NotFoundError when no Session was found.
func (*SessionQuery) FirstID ¶
func (_q *SessionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Session ID from the query. Returns a *NotFoundError when no Session ID was found.
func (*SessionQuery) FirstIDX ¶
func (_q *SessionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SessionQuery) FirstX ¶
func (_q *SessionQuery) FirstX(ctx context.Context) *Session
FirstX is like First, but panics if an error occurs.
func (*SessionQuery) GroupBy ¶
func (_q *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
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 {
Key string `json:"key,omitempty"`
Count int `json:"count,omitempty"`
}
client.Session.Query().
GroupBy(session.FieldKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SessionQuery) IDs ¶
func (_q *SessionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Session IDs.
func (*SessionQuery) IDsX ¶
func (_q *SessionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SessionQuery) Limit ¶
func (_q *SessionQuery) Limit(limit int) *SessionQuery
Limit the number of records to be returned by this query.
func (*SessionQuery) Offset ¶
func (_q *SessionQuery) Offset(offset int) *SessionQuery
Offset to start from.
func (*SessionQuery) Only ¶
func (_q *SessionQuery) Only(ctx context.Context) (*Session, error)
Only returns a single Session entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Session entity is found. Returns a *NotFoundError when no Session entities are found.
func (*SessionQuery) OnlyID ¶
func (_q *SessionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Session ID in the query. Returns a *NotSingularError when more than one Session ID is found. Returns a *NotFoundError when no entities are found.
func (*SessionQuery) OnlyIDX ¶
func (_q *SessionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SessionQuery) OnlyX ¶
func (_q *SessionQuery) OnlyX(ctx context.Context) *Session
OnlyX is like Only, but panics if an error occurs.
func (*SessionQuery) Order ¶
func (_q *SessionQuery) Order(o ...session.OrderOption) *SessionQuery
Order specifies how the records should be ordered.
func (*SessionQuery) QueryMessages ¶
func (_q *SessionQuery) QueryMessages() *MessageQuery
QueryMessages chains the current query on the "messages" edge.
func (*SessionQuery) Select ¶
func (_q *SessionQuery) Select(fields ...string) *SessionSelect
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 {
Key string `json:"key,omitempty"`
}
client.Session.Query().
Select(session.FieldKey).
Scan(ctx, &v)
func (*SessionQuery) Unique ¶
func (_q *SessionQuery) Unique(unique bool) *SessionQuery
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 (*SessionQuery) Where ¶
func (_q *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the SessionQuery builder.
func (*SessionQuery) WithMessages ¶
func (_q *SessionQuery) WithMessages(opts ...func(*MessageQuery)) *SessionQuery
WithMessages tells the query-builder to eager-load the nodes that are connected to the "messages" edge. The optional arguments are used to configure the query builder of the edge.
type SessionSelect ¶
type SessionSelect struct {
*SessionQuery
// contains filtered or unexported fields
}
SessionSelect is the builder for selecting fields of Session entities.
func (*SessionSelect) Aggregate ¶
func (_s *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SessionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SessionSelect) Scan ¶
func (_s *SessionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SessionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SessionUpdate ¶
type SessionUpdate struct {
// contains filtered or unexported fields
}
SessionUpdate is the builder for updating Session entities.
func (*SessionUpdate) AddMessageIDs ¶
func (_u *SessionUpdate) AddMessageIDs(ids ...int) *SessionUpdate
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*SessionUpdate) AddMessages ¶
func (_u *SessionUpdate) AddMessages(v ...*Message) *SessionUpdate
AddMessages adds the "messages" edges to the Message entity.
func (*SessionUpdate) ClearAgentID ¶
func (_u *SessionUpdate) ClearAgentID() *SessionUpdate
ClearAgentID clears the value of the "agent_id" field.
func (*SessionUpdate) ClearChannelID ¶
func (_u *SessionUpdate) ClearChannelID() *SessionUpdate
ClearChannelID clears the value of the "channel_id" field.
func (*SessionUpdate) ClearChannelType ¶
func (_u *SessionUpdate) ClearChannelType() *SessionUpdate
ClearChannelType clears the value of the "channel_type" field.
func (*SessionUpdate) ClearMessages ¶
func (_u *SessionUpdate) ClearMessages() *SessionUpdate
ClearMessages clears all "messages" edges to the Message entity.
func (*SessionUpdate) ClearMetadata ¶
func (_u *SessionUpdate) ClearMetadata() *SessionUpdate
ClearMetadata clears the value of the "metadata" field.
func (*SessionUpdate) ClearModel ¶
func (_u *SessionUpdate) ClearModel() *SessionUpdate
ClearModel clears the value of the "model" field.
func (*SessionUpdate) Exec ¶
func (_u *SessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionUpdate) ExecX ¶
func (_u *SessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdate) Mutation ¶
func (_u *SessionUpdate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdate) RemoveMessageIDs ¶
func (_u *SessionUpdate) RemoveMessageIDs(ids ...int) *SessionUpdate
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*SessionUpdate) RemoveMessages ¶
func (_u *SessionUpdate) RemoveMessages(v ...*Message) *SessionUpdate
RemoveMessages removes "messages" edges to Message entities.
func (*SessionUpdate) Save ¶
func (_u *SessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SessionUpdate) SaveX ¶
func (_u *SessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdate) SetAgentID ¶
func (_u *SessionUpdate) SetAgentID(v string) *SessionUpdate
SetAgentID sets the "agent_id" field.
func (*SessionUpdate) SetChannelID ¶
func (_u *SessionUpdate) SetChannelID(v string) *SessionUpdate
SetChannelID sets the "channel_id" field.
func (*SessionUpdate) SetChannelType ¶
func (_u *SessionUpdate) SetChannelType(v string) *SessionUpdate
SetChannelType sets the "channel_type" field.
func (*SessionUpdate) SetKey ¶
func (_u *SessionUpdate) SetKey(v string) *SessionUpdate
SetKey sets the "key" field.
func (*SessionUpdate) SetMetadata ¶
func (_u *SessionUpdate) SetMetadata(v map[string]string) *SessionUpdate
SetMetadata sets the "metadata" field.
func (*SessionUpdate) SetModel ¶
func (_u *SessionUpdate) SetModel(v string) *SessionUpdate
SetModel sets the "model" field.
func (*SessionUpdate) SetNillableAgentID ¶
func (_u *SessionUpdate) SetNillableAgentID(v *string) *SessionUpdate
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*SessionUpdate) SetNillableChannelID ¶
func (_u *SessionUpdate) SetNillableChannelID(v *string) *SessionUpdate
SetNillableChannelID sets the "channel_id" field if the given value is not nil.
func (*SessionUpdate) SetNillableChannelType ¶
func (_u *SessionUpdate) SetNillableChannelType(v *string) *SessionUpdate
SetNillableChannelType sets the "channel_type" field if the given value is not nil.
func (*SessionUpdate) SetNillableKey ¶
func (_u *SessionUpdate) SetNillableKey(v *string) *SessionUpdate
SetNillableKey sets the "key" field if the given value is not nil.
func (*SessionUpdate) SetNillableModel ¶
func (_u *SessionUpdate) SetNillableModel(v *string) *SessionUpdate
SetNillableModel sets the "model" field if the given value is not nil.
func (*SessionUpdate) SetUpdatedAt ¶
func (_u *SessionUpdate) SetUpdatedAt(v time.Time) *SessionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SessionUpdate) Where ¶
func (_u *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where appends a list predicates to the SessionUpdate builder.
type SessionUpdateOne ¶
type SessionUpdateOne struct {
// contains filtered or unexported fields
}
SessionUpdateOne is the builder for updating a single Session entity.
func (*SessionUpdateOne) AddMessageIDs ¶
func (_u *SessionUpdateOne) AddMessageIDs(ids ...int) *SessionUpdateOne
AddMessageIDs adds the "messages" edge to the Message entity by IDs.
func (*SessionUpdateOne) AddMessages ¶
func (_u *SessionUpdateOne) AddMessages(v ...*Message) *SessionUpdateOne
AddMessages adds the "messages" edges to the Message entity.
func (*SessionUpdateOne) ClearAgentID ¶
func (_u *SessionUpdateOne) ClearAgentID() *SessionUpdateOne
ClearAgentID clears the value of the "agent_id" field.
func (*SessionUpdateOne) ClearChannelID ¶
func (_u *SessionUpdateOne) ClearChannelID() *SessionUpdateOne
ClearChannelID clears the value of the "channel_id" field.
func (*SessionUpdateOne) ClearChannelType ¶
func (_u *SessionUpdateOne) ClearChannelType() *SessionUpdateOne
ClearChannelType clears the value of the "channel_type" field.
func (*SessionUpdateOne) ClearMessages ¶
func (_u *SessionUpdateOne) ClearMessages() *SessionUpdateOne
ClearMessages clears all "messages" edges to the Message entity.
func (*SessionUpdateOne) ClearMetadata ¶
func (_u *SessionUpdateOne) ClearMetadata() *SessionUpdateOne
ClearMetadata clears the value of the "metadata" field.
func (*SessionUpdateOne) ClearModel ¶
func (_u *SessionUpdateOne) ClearModel() *SessionUpdateOne
ClearModel clears the value of the "model" field.
func (*SessionUpdateOne) Exec ¶
func (_u *SessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SessionUpdateOne) ExecX ¶
func (_u *SessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdateOne) Mutation ¶
func (_u *SessionUpdateOne) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdateOne) RemoveMessageIDs ¶
func (_u *SessionUpdateOne) RemoveMessageIDs(ids ...int) *SessionUpdateOne
RemoveMessageIDs removes the "messages" edge to Message entities by IDs.
func (*SessionUpdateOne) RemoveMessages ¶
func (_u *SessionUpdateOne) RemoveMessages(v ...*Message) *SessionUpdateOne
RemoveMessages removes "messages" edges to Message entities.
func (*SessionUpdateOne) Save ¶
func (_u *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
Save executes the query and returns the updated Session entity.
func (*SessionUpdateOne) SaveX ¶
func (_u *SessionUpdateOne) SaveX(ctx context.Context) *Session
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdateOne) Select ¶
func (_u *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SessionUpdateOne) SetAgentID ¶
func (_u *SessionUpdateOne) SetAgentID(v string) *SessionUpdateOne
SetAgentID sets the "agent_id" field.
func (*SessionUpdateOne) SetChannelID ¶
func (_u *SessionUpdateOne) SetChannelID(v string) *SessionUpdateOne
SetChannelID sets the "channel_id" field.
func (*SessionUpdateOne) SetChannelType ¶
func (_u *SessionUpdateOne) SetChannelType(v string) *SessionUpdateOne
SetChannelType sets the "channel_type" field.
func (*SessionUpdateOne) SetKey ¶
func (_u *SessionUpdateOne) SetKey(v string) *SessionUpdateOne
SetKey sets the "key" field.
func (*SessionUpdateOne) SetMetadata ¶
func (_u *SessionUpdateOne) SetMetadata(v map[string]string) *SessionUpdateOne
SetMetadata sets the "metadata" field.
func (*SessionUpdateOne) SetModel ¶
func (_u *SessionUpdateOne) SetModel(v string) *SessionUpdateOne
SetModel sets the "model" field.
func (*SessionUpdateOne) SetNillableAgentID ¶
func (_u *SessionUpdateOne) SetNillableAgentID(v *string) *SessionUpdateOne
SetNillableAgentID sets the "agent_id" field if the given value is not nil.
func (*SessionUpdateOne) SetNillableChannelID ¶
func (_u *SessionUpdateOne) SetNillableChannelID(v *string) *SessionUpdateOne
SetNillableChannelID sets the "channel_id" field if the given value is not nil.
func (*SessionUpdateOne) SetNillableChannelType ¶
func (_u *SessionUpdateOne) SetNillableChannelType(v *string) *SessionUpdateOne
SetNillableChannelType sets the "channel_type" field if the given value is not nil.
func (*SessionUpdateOne) SetNillableKey ¶
func (_u *SessionUpdateOne) SetNillableKey(v *string) *SessionUpdateOne
SetNillableKey sets the "key" field if the given value is not nil.
func (*SessionUpdateOne) SetNillableModel ¶
func (_u *SessionUpdateOne) SetNillableModel(v *string) *SessionUpdateOne
SetNillableModel sets the "model" field if the given value is not nil.
func (*SessionUpdateOne) SetUpdatedAt ¶
func (_u *SessionUpdateOne) SetUpdatedAt(v time.Time) *SessionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SessionUpdateOne) Where ¶
func (_u *SessionUpdateOne) Where(ps ...predicate.Session) *SessionUpdateOne
Where appends a list predicates to the SessionUpdate builder.
type TokenUsage ¶ added in v0.5.0
type TokenUsage struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// SessionKey holds the value of the "session_key" field.
SessionKey string `json:"session_key,omitempty"`
// Provider holds the value of the "provider" field.
Provider string `json:"provider,omitempty"`
// Model holds the value of the "model" field.
Model string `json:"model,omitempty"`
// AgentName holds the value of the "agent_name" field.
AgentName string `json:"agent_name,omitempty"`
// InputTokens holds the value of the "input_tokens" field.
InputTokens int64 `json:"input_tokens,omitempty"`
// OutputTokens holds the value of the "output_tokens" field.
OutputTokens int64 `json:"output_tokens,omitempty"`
// TotalTokens holds the value of the "total_tokens" field.
TotalTokens int64 `json:"total_tokens,omitempty"`
// CacheTokens holds the value of the "cache_tokens" field.
CacheTokens int64 `json:"cache_tokens,omitempty"`
// Timestamp holds the value of the "timestamp" field.
Timestamp time.Time `json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
TokenUsage is the model entity for the TokenUsage schema.
func (*TokenUsage) String ¶ added in v0.5.0
func (_m *TokenUsage) String() string
String implements the fmt.Stringer.
func (*TokenUsage) Unwrap ¶ added in v0.5.0
func (_m *TokenUsage) Unwrap() *TokenUsage
Unwrap unwraps the TokenUsage 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 (*TokenUsage) Update ¶ added in v0.5.0
func (_m *TokenUsage) Update() *TokenUsageUpdateOne
Update returns a builder for updating this TokenUsage. Note that you need to call TokenUsage.Unwrap() before calling this method if this TokenUsage was returned from a transaction, and the transaction was committed or rolled back.
type TokenUsageClient ¶ added in v0.5.0
type TokenUsageClient struct {
// contains filtered or unexported fields
}
TokenUsageClient is a client for the TokenUsage schema.
func NewTokenUsageClient ¶ added in v0.5.0
func NewTokenUsageClient(c config) *TokenUsageClient
NewTokenUsageClient returns a client for the TokenUsage from the given config.
func (*TokenUsageClient) Create ¶ added in v0.5.0
func (c *TokenUsageClient) Create() *TokenUsageCreate
Create returns a builder for creating a TokenUsage entity.
func (*TokenUsageClient) CreateBulk ¶ added in v0.5.0
func (c *TokenUsageClient) CreateBulk(builders ...*TokenUsageCreate) *TokenUsageCreateBulk
CreateBulk returns a builder for creating a bulk of TokenUsage entities.
func (*TokenUsageClient) Delete ¶ added in v0.5.0
func (c *TokenUsageClient) Delete() *TokenUsageDelete
Delete returns a delete builder for TokenUsage.
func (*TokenUsageClient) DeleteOne ¶ added in v0.5.0
func (c *TokenUsageClient) DeleteOne(_m *TokenUsage) *TokenUsageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TokenUsageClient) DeleteOneID ¶ added in v0.5.0
func (c *TokenUsageClient) DeleteOneID(id uuid.UUID) *TokenUsageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TokenUsageClient) Get ¶ added in v0.5.0
func (c *TokenUsageClient) Get(ctx context.Context, id uuid.UUID) (*TokenUsage, error)
Get returns a TokenUsage entity by its id.
func (*TokenUsageClient) GetX ¶ added in v0.5.0
func (c *TokenUsageClient) GetX(ctx context.Context, id uuid.UUID) *TokenUsage
GetX is like Get, but panics if an error occurs.
func (*TokenUsageClient) Hooks ¶ added in v0.5.0
func (c *TokenUsageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TokenUsageClient) Intercept ¶ added in v0.5.0
func (c *TokenUsageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tokenusage.Intercept(f(g(h())))`.
func (*TokenUsageClient) Interceptors ¶ added in v0.5.0
func (c *TokenUsageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TokenUsageClient) MapCreateBulk ¶ added in v0.5.0
func (c *TokenUsageClient) MapCreateBulk(slice any, setFunc func(*TokenUsageCreate, int)) *TokenUsageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TokenUsageClient) Query ¶ added in v0.5.0
func (c *TokenUsageClient) Query() *TokenUsageQuery
Query returns a query builder for TokenUsage.
func (*TokenUsageClient) Update ¶ added in v0.5.0
func (c *TokenUsageClient) Update() *TokenUsageUpdate
Update returns an update builder for TokenUsage.
func (*TokenUsageClient) UpdateOne ¶ added in v0.5.0
func (c *TokenUsageClient) UpdateOne(_m *TokenUsage) *TokenUsageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TokenUsageClient) UpdateOneID ¶ added in v0.5.0
func (c *TokenUsageClient) UpdateOneID(id uuid.UUID) *TokenUsageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TokenUsageClient) Use ¶ added in v0.5.0
func (c *TokenUsageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tokenusage.Hooks(f(g(h())))`.
type TokenUsageCreate ¶ added in v0.5.0
type TokenUsageCreate struct {
// contains filtered or unexported fields
}
TokenUsageCreate is the builder for creating a TokenUsage entity.
func (*TokenUsageCreate) Exec ¶ added in v0.5.0
func (_c *TokenUsageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TokenUsageCreate) ExecX ¶ added in v0.5.0
func (_c *TokenUsageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUsageCreate) Mutation ¶ added in v0.5.0
func (_c *TokenUsageCreate) Mutation() *TokenUsageMutation
Mutation returns the TokenUsageMutation object of the builder.
func (*TokenUsageCreate) Save ¶ added in v0.5.0
func (_c *TokenUsageCreate) Save(ctx context.Context) (*TokenUsage, error)
Save creates the TokenUsage in the database.
func (*TokenUsageCreate) SaveX ¶ added in v0.5.0
func (_c *TokenUsageCreate) SaveX(ctx context.Context) *TokenUsage
SaveX calls Save and panics if Save returns an error.
func (*TokenUsageCreate) SetAgentName ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetAgentName(v string) *TokenUsageCreate
SetAgentName sets the "agent_name" field.
func (*TokenUsageCreate) SetCacheTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetCacheTokens(v int64) *TokenUsageCreate
SetCacheTokens sets the "cache_tokens" field.
func (*TokenUsageCreate) SetID ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetID(v uuid.UUID) *TokenUsageCreate
SetID sets the "id" field.
func (*TokenUsageCreate) SetInputTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetInputTokens(v int64) *TokenUsageCreate
SetInputTokens sets the "input_tokens" field.
func (*TokenUsageCreate) SetModel ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetModel(v string) *TokenUsageCreate
SetModel sets the "model" field.
func (*TokenUsageCreate) SetNillableAgentName ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableAgentName(v *string) *TokenUsageCreate
SetNillableAgentName sets the "agent_name" field if the given value is not nil.
func (*TokenUsageCreate) SetNillableCacheTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableCacheTokens(v *int64) *TokenUsageCreate
SetNillableCacheTokens sets the "cache_tokens" field if the given value is not nil.
func (*TokenUsageCreate) SetNillableID ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableID(v *uuid.UUID) *TokenUsageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TokenUsageCreate) SetNillableInputTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableInputTokens(v *int64) *TokenUsageCreate
SetNillableInputTokens sets the "input_tokens" field if the given value is not nil.
func (*TokenUsageCreate) SetNillableOutputTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableOutputTokens(v *int64) *TokenUsageCreate
SetNillableOutputTokens sets the "output_tokens" field if the given value is not nil.
func (*TokenUsageCreate) SetNillableSessionKey ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableSessionKey(v *string) *TokenUsageCreate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*TokenUsageCreate) SetNillableTimestamp ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableTimestamp(v *time.Time) *TokenUsageCreate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*TokenUsageCreate) SetNillableTotalTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetNillableTotalTokens(v *int64) *TokenUsageCreate
SetNillableTotalTokens sets the "total_tokens" field if the given value is not nil.
func (*TokenUsageCreate) SetOutputTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetOutputTokens(v int64) *TokenUsageCreate
SetOutputTokens sets the "output_tokens" field.
func (*TokenUsageCreate) SetProvider ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetProvider(v string) *TokenUsageCreate
SetProvider sets the "provider" field.
func (*TokenUsageCreate) SetSessionKey ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetSessionKey(v string) *TokenUsageCreate
SetSessionKey sets the "session_key" field.
func (*TokenUsageCreate) SetTimestamp ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetTimestamp(v time.Time) *TokenUsageCreate
SetTimestamp sets the "timestamp" field.
func (*TokenUsageCreate) SetTotalTokens ¶ added in v0.5.0
func (_c *TokenUsageCreate) SetTotalTokens(v int64) *TokenUsageCreate
SetTotalTokens sets the "total_tokens" field.
type TokenUsageCreateBulk ¶ added in v0.5.0
type TokenUsageCreateBulk struct {
// contains filtered or unexported fields
}
TokenUsageCreateBulk is the builder for creating many TokenUsage entities in bulk.
func (*TokenUsageCreateBulk) Exec ¶ added in v0.5.0
func (_c *TokenUsageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TokenUsageCreateBulk) ExecX ¶ added in v0.5.0
func (_c *TokenUsageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUsageCreateBulk) Save ¶ added in v0.5.0
func (_c *TokenUsageCreateBulk) Save(ctx context.Context) ([]*TokenUsage, error)
Save creates the TokenUsage entities in the database.
func (*TokenUsageCreateBulk) SaveX ¶ added in v0.5.0
func (_c *TokenUsageCreateBulk) SaveX(ctx context.Context) []*TokenUsage
SaveX is like Save, but panics if an error occurs.
type TokenUsageDelete ¶ added in v0.5.0
type TokenUsageDelete struct {
// contains filtered or unexported fields
}
TokenUsageDelete is the builder for deleting a TokenUsage entity.
func (*TokenUsageDelete) Exec ¶ added in v0.5.0
func (_d *TokenUsageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TokenUsageDelete) ExecX ¶ added in v0.5.0
func (_d *TokenUsageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TokenUsageDelete) Where ¶ added in v0.5.0
func (_d *TokenUsageDelete) Where(ps ...predicate.TokenUsage) *TokenUsageDelete
Where appends a list predicates to the TokenUsageDelete builder.
type TokenUsageDeleteOne ¶ added in v0.5.0
type TokenUsageDeleteOne struct {
// contains filtered or unexported fields
}
TokenUsageDeleteOne is the builder for deleting a single TokenUsage entity.
func (*TokenUsageDeleteOne) Exec ¶ added in v0.5.0
func (_d *TokenUsageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TokenUsageDeleteOne) ExecX ¶ added in v0.5.0
func (_d *TokenUsageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUsageDeleteOne) Where ¶ added in v0.5.0
func (_d *TokenUsageDeleteOne) Where(ps ...predicate.TokenUsage) *TokenUsageDeleteOne
Where appends a list predicates to the TokenUsageDelete builder.
type TokenUsageGroupBy ¶ added in v0.5.0
type TokenUsageGroupBy struct {
// contains filtered or unexported fields
}
TokenUsageGroupBy is the group-by builder for TokenUsage entities.
func (*TokenUsageGroupBy) Aggregate ¶ added in v0.5.0
func (_g *TokenUsageGroupBy) Aggregate(fns ...AggregateFunc) *TokenUsageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TokenUsageGroupBy) Bool ¶ added in v0.5.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TokenUsageGroupBy) BoolX ¶ added in v0.5.0
BoolX is like Bool, but panics if an error occurs.
func (*TokenUsageGroupBy) Bools ¶ added in v0.5.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TokenUsageGroupBy) BoolsX ¶ added in v0.5.0
BoolsX is like Bools, but panics if an error occurs.
func (*TokenUsageGroupBy) Float64 ¶ added in v0.5.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TokenUsageGroupBy) Float64X ¶ added in v0.5.0
Float64X is like Float64, but panics if an error occurs.
func (*TokenUsageGroupBy) Float64s ¶ added in v0.5.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TokenUsageGroupBy) Float64sX ¶ added in v0.5.0
Float64sX is like Float64s, but panics if an error occurs.
func (*TokenUsageGroupBy) Int ¶ added in v0.5.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TokenUsageGroupBy) Ints ¶ added in v0.5.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TokenUsageGroupBy) IntsX ¶ added in v0.5.0
IntsX is like Ints, but panics if an error occurs.
func (*TokenUsageGroupBy) Scan ¶ added in v0.5.0
func (_g *TokenUsageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TokenUsageGroupBy) ScanX ¶ added in v0.5.0
ScanX is like Scan, but panics if an error occurs.
func (*TokenUsageGroupBy) String ¶ added in v0.5.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TokenUsageGroupBy) StringX ¶ added in v0.5.0
StringX is like String, but panics if an error occurs.
type TokenUsageMutation ¶ added in v0.5.0
type TokenUsageMutation struct {
// contains filtered or unexported fields
}
TokenUsageMutation represents an operation that mutates the TokenUsage nodes in the graph.
func (*TokenUsageMutation) AddCacheTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddCacheTokens(i int64)
AddCacheTokens adds i to the "cache_tokens" field.
func (*TokenUsageMutation) AddField ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) AddInputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddInputTokens(i int64)
AddInputTokens adds i to the "input_tokens" field.
func (*TokenUsageMutation) AddOutputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddOutputTokens(i int64)
AddOutputTokens adds i to the "output_tokens" field.
func (*TokenUsageMutation) AddTotalTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddTotalTokens(i int64)
AddTotalTokens adds i to the "total_tokens" field.
func (*TokenUsageMutation) AddedCacheTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddedCacheTokens() (r int64, exists bool)
AddedCacheTokens returns the value that was added to the "cache_tokens" field in this mutation.
func (*TokenUsageMutation) AddedEdges ¶ added in v0.5.0
func (m *TokenUsageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TokenUsageMutation) AddedField ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) AddedFields ¶ added in v0.5.0
func (m *TokenUsageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TokenUsageMutation) AddedIDs ¶ added in v0.5.0
func (m *TokenUsageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TokenUsageMutation) AddedInputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddedInputTokens() (r int64, exists bool)
AddedInputTokens returns the value that was added to the "input_tokens" field in this mutation.
func (*TokenUsageMutation) AddedOutputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddedOutputTokens() (r int64, exists bool)
AddedOutputTokens returns the value that was added to the "output_tokens" field in this mutation.
func (*TokenUsageMutation) AddedTotalTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) AddedTotalTokens() (r int64, exists bool)
AddedTotalTokens returns the value that was added to the "total_tokens" field in this mutation.
func (*TokenUsageMutation) AgentName ¶ added in v0.5.0
func (m *TokenUsageMutation) AgentName() (r string, exists bool)
AgentName returns the value of the "agent_name" field in the mutation.
func (*TokenUsageMutation) AgentNameCleared ¶ added in v0.5.0
func (m *TokenUsageMutation) AgentNameCleared() bool
AgentNameCleared returns if the "agent_name" field was cleared in this mutation.
func (*TokenUsageMutation) CacheTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) CacheTokens() (r int64, exists bool)
CacheTokens returns the value of the "cache_tokens" field in the mutation.
func (*TokenUsageMutation) ClearAgentName ¶ added in v0.5.0
func (m *TokenUsageMutation) ClearAgentName()
ClearAgentName clears the value of the "agent_name" field.
func (*TokenUsageMutation) ClearEdge ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) ClearField ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) ClearSessionKey ¶ added in v0.5.0
func (m *TokenUsageMutation) ClearSessionKey()
ClearSessionKey clears the value of the "session_key" field.
func (*TokenUsageMutation) ClearedEdges ¶ added in v0.5.0
func (m *TokenUsageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TokenUsageMutation) ClearedFields ¶ added in v0.5.0
func (m *TokenUsageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TokenUsageMutation) Client ¶ added in v0.5.0
func (m TokenUsageMutation) 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 (*TokenUsageMutation) EdgeCleared ¶ added in v0.5.0
func (m *TokenUsageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TokenUsageMutation) Field ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) FieldCleared ¶ added in v0.5.0
func (m *TokenUsageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TokenUsageMutation) Fields ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) ID ¶ added in v0.5.0
func (m *TokenUsageMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TokenUsageMutation) IDs ¶ added in v0.5.0
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 (*TokenUsageMutation) InputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) InputTokens() (r int64, exists bool)
InputTokens returns the value of the "input_tokens" field in the mutation.
func (*TokenUsageMutation) Model ¶ added in v0.5.0
func (m *TokenUsageMutation) Model() (r string, exists bool)
Model returns the value of the "model" field in the mutation.
func (*TokenUsageMutation) OldAgentName ¶ added in v0.5.0
func (m *TokenUsageMutation) OldAgentName(ctx context.Context) (v string, err error)
OldAgentName returns the old "agent_name" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldCacheTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) OldCacheTokens(ctx context.Context) (v int64, err error)
OldCacheTokens returns the old "cache_tokens" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldField ¶ added in v0.5.0
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 (*TokenUsageMutation) OldInputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) OldInputTokens(ctx context.Context) (v int64, err error)
OldInputTokens returns the old "input_tokens" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldModel ¶ added in v0.5.0
func (m *TokenUsageMutation) OldModel(ctx context.Context) (v string, err error)
OldModel returns the old "model" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldOutputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) OldOutputTokens(ctx context.Context) (v int64, err error)
OldOutputTokens returns the old "output_tokens" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldProvider ¶ added in v0.5.0
func (m *TokenUsageMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldSessionKey ¶ added in v0.5.0
func (m *TokenUsageMutation) OldSessionKey(ctx context.Context) (v string, err error)
OldSessionKey returns the old "session_key" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldTimestamp ¶ added in v0.5.0
OldTimestamp returns the old "timestamp" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) OldTotalTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) OldTotalTokens(ctx context.Context) (v int64, err error)
OldTotalTokens returns the old "total_tokens" field's value of the TokenUsage entity. If the TokenUsage 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 (*TokenUsageMutation) Op ¶ added in v0.5.0
func (m *TokenUsageMutation) Op() Op
Op returns the operation name.
func (*TokenUsageMutation) OutputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) OutputTokens() (r int64, exists bool)
OutputTokens returns the value of the "output_tokens" field in the mutation.
func (*TokenUsageMutation) Provider ¶ added in v0.5.0
func (m *TokenUsageMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*TokenUsageMutation) RemovedEdges ¶ added in v0.5.0
func (m *TokenUsageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TokenUsageMutation) RemovedIDs ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) ResetAgentName ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetAgentName()
ResetAgentName resets all changes to the "agent_name" field.
func (*TokenUsageMutation) ResetCacheTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetCacheTokens()
ResetCacheTokens resets all changes to the "cache_tokens" field.
func (*TokenUsageMutation) ResetEdge ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) ResetField ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) ResetInputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetInputTokens()
ResetInputTokens resets all changes to the "input_tokens" field.
func (*TokenUsageMutation) ResetModel ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetModel()
ResetModel resets all changes to the "model" field.
func (*TokenUsageMutation) ResetOutputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetOutputTokens()
ResetOutputTokens resets all changes to the "output_tokens" field.
func (*TokenUsageMutation) ResetProvider ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*TokenUsageMutation) ResetSessionKey ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetSessionKey()
ResetSessionKey resets all changes to the "session_key" field.
func (*TokenUsageMutation) ResetTimestamp ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*TokenUsageMutation) ResetTotalTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) ResetTotalTokens()
ResetTotalTokens resets all changes to the "total_tokens" field.
func (*TokenUsageMutation) SessionKey ¶ added in v0.5.0
func (m *TokenUsageMutation) SessionKey() (r string, exists bool)
SessionKey returns the value of the "session_key" field in the mutation.
func (*TokenUsageMutation) SessionKeyCleared ¶ added in v0.5.0
func (m *TokenUsageMutation) SessionKeyCleared() bool
SessionKeyCleared returns if the "session_key" field was cleared in this mutation.
func (*TokenUsageMutation) SetAgentName ¶ added in v0.5.0
func (m *TokenUsageMutation) SetAgentName(s string)
SetAgentName sets the "agent_name" field.
func (*TokenUsageMutation) SetCacheTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) SetCacheTokens(i int64)
SetCacheTokens sets the "cache_tokens" field.
func (*TokenUsageMutation) SetField ¶ added in v0.5.0
func (m *TokenUsageMutation) 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 (*TokenUsageMutation) SetID ¶ added in v0.5.0
func (m *TokenUsageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TokenUsage entities.
func (*TokenUsageMutation) SetInputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) SetInputTokens(i int64)
SetInputTokens sets the "input_tokens" field.
func (*TokenUsageMutation) SetModel ¶ added in v0.5.0
func (m *TokenUsageMutation) SetModel(s string)
SetModel sets the "model" field.
func (*TokenUsageMutation) SetOp ¶ added in v0.5.0
func (m *TokenUsageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TokenUsageMutation) SetOutputTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) SetOutputTokens(i int64)
SetOutputTokens sets the "output_tokens" field.
func (*TokenUsageMutation) SetProvider ¶ added in v0.5.0
func (m *TokenUsageMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*TokenUsageMutation) SetSessionKey ¶ added in v0.5.0
func (m *TokenUsageMutation) SetSessionKey(s string)
SetSessionKey sets the "session_key" field.
func (*TokenUsageMutation) SetTimestamp ¶ added in v0.5.0
func (m *TokenUsageMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*TokenUsageMutation) SetTotalTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) SetTotalTokens(i int64)
SetTotalTokens sets the "total_tokens" field.
func (*TokenUsageMutation) Timestamp ¶ added in v0.5.0
func (m *TokenUsageMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (*TokenUsageMutation) TotalTokens ¶ added in v0.5.0
func (m *TokenUsageMutation) TotalTokens() (r int64, exists bool)
TotalTokens returns the value of the "total_tokens" field in the mutation.
func (TokenUsageMutation) Tx ¶ added in v0.5.0
func (m TokenUsageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TokenUsageMutation) Type ¶ added in v0.5.0
func (m *TokenUsageMutation) Type() string
Type returns the node type of this mutation (TokenUsage).
func (*TokenUsageMutation) Where ¶ added in v0.5.0
func (m *TokenUsageMutation) Where(ps ...predicate.TokenUsage)
Where appends a list predicates to the TokenUsageMutation builder.
func (*TokenUsageMutation) WhereP ¶ added in v0.5.0
func (m *TokenUsageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TokenUsageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TokenUsageQuery ¶ added in v0.5.0
type TokenUsageQuery struct {
// contains filtered or unexported fields
}
TokenUsageQuery is the builder for querying TokenUsage entities.
func (*TokenUsageQuery) Aggregate ¶ added in v0.5.0
func (_q *TokenUsageQuery) Aggregate(fns ...AggregateFunc) *TokenUsageSelect
Aggregate returns a TokenUsageSelect configured with the given aggregations.
func (*TokenUsageQuery) All ¶ added in v0.5.0
func (_q *TokenUsageQuery) All(ctx context.Context) ([]*TokenUsage, error)
All executes the query and returns a list of TokenUsages.
func (*TokenUsageQuery) AllX ¶ added in v0.5.0
func (_q *TokenUsageQuery) AllX(ctx context.Context) []*TokenUsage
AllX is like All, but panics if an error occurs.
func (*TokenUsageQuery) Clone ¶ added in v0.5.0
func (_q *TokenUsageQuery) Clone() *TokenUsageQuery
Clone returns a duplicate of the TokenUsageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TokenUsageQuery) Count ¶ added in v0.5.0
func (_q *TokenUsageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TokenUsageQuery) CountX ¶ added in v0.5.0
func (_q *TokenUsageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TokenUsageQuery) Exist ¶ added in v0.5.0
func (_q *TokenUsageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TokenUsageQuery) ExistX ¶ added in v0.5.0
func (_q *TokenUsageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TokenUsageQuery) First ¶ added in v0.5.0
func (_q *TokenUsageQuery) First(ctx context.Context) (*TokenUsage, error)
First returns the first TokenUsage entity from the query. Returns a *NotFoundError when no TokenUsage was found.
func (*TokenUsageQuery) FirstID ¶ added in v0.5.0
FirstID returns the first TokenUsage ID from the query. Returns a *NotFoundError when no TokenUsage ID was found.
func (*TokenUsageQuery) FirstIDX ¶ added in v0.5.0
func (_q *TokenUsageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TokenUsageQuery) FirstX ¶ added in v0.5.0
func (_q *TokenUsageQuery) FirstX(ctx context.Context) *TokenUsage
FirstX is like First, but panics if an error occurs.
func (*TokenUsageQuery) GroupBy ¶ added in v0.5.0
func (_q *TokenUsageQuery) GroupBy(field string, fields ...string) *TokenUsageGroupBy
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 {
SessionKey string `json:"session_key,omitempty"`
Count int `json:"count,omitempty"`
}
client.TokenUsage.Query().
GroupBy(tokenusage.FieldSessionKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*TokenUsageQuery) IDs ¶ added in v0.5.0
IDs executes the query and returns a list of TokenUsage IDs.
func (*TokenUsageQuery) IDsX ¶ added in v0.5.0
func (_q *TokenUsageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TokenUsageQuery) Limit ¶ added in v0.5.0
func (_q *TokenUsageQuery) Limit(limit int) *TokenUsageQuery
Limit the number of records to be returned by this query.
func (*TokenUsageQuery) Offset ¶ added in v0.5.0
func (_q *TokenUsageQuery) Offset(offset int) *TokenUsageQuery
Offset to start from.
func (*TokenUsageQuery) Only ¶ added in v0.5.0
func (_q *TokenUsageQuery) Only(ctx context.Context) (*TokenUsage, error)
Only returns a single TokenUsage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TokenUsage entity is found. Returns a *NotFoundError when no TokenUsage entities are found.
func (*TokenUsageQuery) OnlyID ¶ added in v0.5.0
OnlyID is like Only, but returns the only TokenUsage ID in the query. Returns a *NotSingularError when more than one TokenUsage ID is found. Returns a *NotFoundError when no entities are found.
func (*TokenUsageQuery) OnlyIDX ¶ added in v0.5.0
func (_q *TokenUsageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TokenUsageQuery) OnlyX ¶ added in v0.5.0
func (_q *TokenUsageQuery) OnlyX(ctx context.Context) *TokenUsage
OnlyX is like Only, but panics if an error occurs.
func (*TokenUsageQuery) Order ¶ added in v0.5.0
func (_q *TokenUsageQuery) Order(o ...tokenusage.OrderOption) *TokenUsageQuery
Order specifies how the records should be ordered.
func (*TokenUsageQuery) Select ¶ added in v0.5.0
func (_q *TokenUsageQuery) Select(fields ...string) *TokenUsageSelect
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 {
SessionKey string `json:"session_key,omitempty"`
}
client.TokenUsage.Query().
Select(tokenusage.FieldSessionKey).
Scan(ctx, &v)
func (*TokenUsageQuery) Unique ¶ added in v0.5.0
func (_q *TokenUsageQuery) Unique(unique bool) *TokenUsageQuery
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 (*TokenUsageQuery) Where ¶ added in v0.5.0
func (_q *TokenUsageQuery) Where(ps ...predicate.TokenUsage) *TokenUsageQuery
Where adds a new predicate for the TokenUsageQuery builder.
type TokenUsageSelect ¶ added in v0.5.0
type TokenUsageSelect struct {
*TokenUsageQuery
// contains filtered or unexported fields
}
TokenUsageSelect is the builder for selecting fields of TokenUsage entities.
func (*TokenUsageSelect) Aggregate ¶ added in v0.5.0
func (_s *TokenUsageSelect) Aggregate(fns ...AggregateFunc) *TokenUsageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TokenUsageSelect) Bool ¶ added in v0.5.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TokenUsageSelect) Bools ¶ added in v0.5.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TokenUsageSelect) BoolsX ¶ added in v0.5.0
BoolsX is like Bools, but panics if an error occurs.
func (*TokenUsageSelect) Float64 ¶ added in v0.5.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TokenUsageSelect) Float64X ¶ added in v0.5.0
Float64X is like Float64, but panics if an error occurs.
func (*TokenUsageSelect) Float64s ¶ added in v0.5.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TokenUsageSelect) Float64sX ¶ added in v0.5.0
Float64sX is like Float64s, but panics if an error occurs.
func (*TokenUsageSelect) Int ¶ added in v0.5.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TokenUsageSelect) Ints ¶ added in v0.5.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TokenUsageSelect) Scan ¶ added in v0.5.0
func (_s *TokenUsageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TokenUsageSelect) String ¶ added in v0.5.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*TokenUsageSelect) StringX ¶ added in v0.5.0
StringX is like String, but panics if an error occurs.
type TokenUsageUpdate ¶ added in v0.5.0
type TokenUsageUpdate struct {
// contains filtered or unexported fields
}
TokenUsageUpdate is the builder for updating TokenUsage entities.
func (*TokenUsageUpdate) AddCacheTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) AddCacheTokens(v int64) *TokenUsageUpdate
AddCacheTokens adds value to the "cache_tokens" field.
func (*TokenUsageUpdate) AddInputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) AddInputTokens(v int64) *TokenUsageUpdate
AddInputTokens adds value to the "input_tokens" field.
func (*TokenUsageUpdate) AddOutputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) AddOutputTokens(v int64) *TokenUsageUpdate
AddOutputTokens adds value to the "output_tokens" field.
func (*TokenUsageUpdate) AddTotalTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) AddTotalTokens(v int64) *TokenUsageUpdate
AddTotalTokens adds value to the "total_tokens" field.
func (*TokenUsageUpdate) ClearAgentName ¶ added in v0.5.0
func (_u *TokenUsageUpdate) ClearAgentName() *TokenUsageUpdate
ClearAgentName clears the value of the "agent_name" field.
func (*TokenUsageUpdate) ClearSessionKey ¶ added in v0.5.0
func (_u *TokenUsageUpdate) ClearSessionKey() *TokenUsageUpdate
ClearSessionKey clears the value of the "session_key" field.
func (*TokenUsageUpdate) Exec ¶ added in v0.5.0
func (_u *TokenUsageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TokenUsageUpdate) ExecX ¶ added in v0.5.0
func (_u *TokenUsageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUsageUpdate) Mutation ¶ added in v0.5.0
func (_u *TokenUsageUpdate) Mutation() *TokenUsageMutation
Mutation returns the TokenUsageMutation object of the builder.
func (*TokenUsageUpdate) Save ¶ added in v0.5.0
func (_u *TokenUsageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TokenUsageUpdate) SaveX ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TokenUsageUpdate) SetAgentName ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetAgentName(v string) *TokenUsageUpdate
SetAgentName sets the "agent_name" field.
func (*TokenUsageUpdate) SetCacheTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetCacheTokens(v int64) *TokenUsageUpdate
SetCacheTokens sets the "cache_tokens" field.
func (*TokenUsageUpdate) SetInputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetInputTokens(v int64) *TokenUsageUpdate
SetInputTokens sets the "input_tokens" field.
func (*TokenUsageUpdate) SetModel ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetModel(v string) *TokenUsageUpdate
SetModel sets the "model" field.
func (*TokenUsageUpdate) SetNillableAgentName ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableAgentName(v *string) *TokenUsageUpdate
SetNillableAgentName sets the "agent_name" field if the given value is not nil.
func (*TokenUsageUpdate) SetNillableCacheTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableCacheTokens(v *int64) *TokenUsageUpdate
SetNillableCacheTokens sets the "cache_tokens" field if the given value is not nil.
func (*TokenUsageUpdate) SetNillableInputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableInputTokens(v *int64) *TokenUsageUpdate
SetNillableInputTokens sets the "input_tokens" field if the given value is not nil.
func (*TokenUsageUpdate) SetNillableModel ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableModel(v *string) *TokenUsageUpdate
SetNillableModel sets the "model" field if the given value is not nil.
func (*TokenUsageUpdate) SetNillableOutputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableOutputTokens(v *int64) *TokenUsageUpdate
SetNillableOutputTokens sets the "output_tokens" field if the given value is not nil.
func (*TokenUsageUpdate) SetNillableProvider ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableProvider(v *string) *TokenUsageUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*TokenUsageUpdate) SetNillableSessionKey ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableSessionKey(v *string) *TokenUsageUpdate
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*TokenUsageUpdate) SetNillableTotalTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetNillableTotalTokens(v *int64) *TokenUsageUpdate
SetNillableTotalTokens sets the "total_tokens" field if the given value is not nil.
func (*TokenUsageUpdate) SetOutputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetOutputTokens(v int64) *TokenUsageUpdate
SetOutputTokens sets the "output_tokens" field.
func (*TokenUsageUpdate) SetProvider ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetProvider(v string) *TokenUsageUpdate
SetProvider sets the "provider" field.
func (*TokenUsageUpdate) SetSessionKey ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetSessionKey(v string) *TokenUsageUpdate
SetSessionKey sets the "session_key" field.
func (*TokenUsageUpdate) SetTotalTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdate) SetTotalTokens(v int64) *TokenUsageUpdate
SetTotalTokens sets the "total_tokens" field.
func (*TokenUsageUpdate) Where ¶ added in v0.5.0
func (_u *TokenUsageUpdate) Where(ps ...predicate.TokenUsage) *TokenUsageUpdate
Where appends a list predicates to the TokenUsageUpdate builder.
type TokenUsageUpdateOne ¶ added in v0.5.0
type TokenUsageUpdateOne struct {
// contains filtered or unexported fields
}
TokenUsageUpdateOne is the builder for updating a single TokenUsage entity.
func (*TokenUsageUpdateOne) AddCacheTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) AddCacheTokens(v int64) *TokenUsageUpdateOne
AddCacheTokens adds value to the "cache_tokens" field.
func (*TokenUsageUpdateOne) AddInputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) AddInputTokens(v int64) *TokenUsageUpdateOne
AddInputTokens adds value to the "input_tokens" field.
func (*TokenUsageUpdateOne) AddOutputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) AddOutputTokens(v int64) *TokenUsageUpdateOne
AddOutputTokens adds value to the "output_tokens" field.
func (*TokenUsageUpdateOne) AddTotalTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) AddTotalTokens(v int64) *TokenUsageUpdateOne
AddTotalTokens adds value to the "total_tokens" field.
func (*TokenUsageUpdateOne) ClearAgentName ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) ClearAgentName() *TokenUsageUpdateOne
ClearAgentName clears the value of the "agent_name" field.
func (*TokenUsageUpdateOne) ClearSessionKey ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) ClearSessionKey() *TokenUsageUpdateOne
ClearSessionKey clears the value of the "session_key" field.
func (*TokenUsageUpdateOne) Exec ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TokenUsageUpdateOne) ExecX ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUsageUpdateOne) Mutation ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) Mutation() *TokenUsageMutation
Mutation returns the TokenUsageMutation object of the builder.
func (*TokenUsageUpdateOne) Save ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) Save(ctx context.Context) (*TokenUsage, error)
Save executes the query and returns the updated TokenUsage entity.
func (*TokenUsageUpdateOne) SaveX ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SaveX(ctx context.Context) *TokenUsage
SaveX is like Save, but panics if an error occurs.
func (*TokenUsageUpdateOne) Select ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) Select(field string, fields ...string) *TokenUsageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TokenUsageUpdateOne) SetAgentName ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetAgentName(v string) *TokenUsageUpdateOne
SetAgentName sets the "agent_name" field.
func (*TokenUsageUpdateOne) SetCacheTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetCacheTokens(v int64) *TokenUsageUpdateOne
SetCacheTokens sets the "cache_tokens" field.
func (*TokenUsageUpdateOne) SetInputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetInputTokens(v int64) *TokenUsageUpdateOne
SetInputTokens sets the "input_tokens" field.
func (*TokenUsageUpdateOne) SetModel ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetModel(v string) *TokenUsageUpdateOne
SetModel sets the "model" field.
func (*TokenUsageUpdateOne) SetNillableAgentName ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableAgentName(v *string) *TokenUsageUpdateOne
SetNillableAgentName sets the "agent_name" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetNillableCacheTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableCacheTokens(v *int64) *TokenUsageUpdateOne
SetNillableCacheTokens sets the "cache_tokens" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetNillableInputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableInputTokens(v *int64) *TokenUsageUpdateOne
SetNillableInputTokens sets the "input_tokens" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetNillableModel ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableModel(v *string) *TokenUsageUpdateOne
SetNillableModel sets the "model" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetNillableOutputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableOutputTokens(v *int64) *TokenUsageUpdateOne
SetNillableOutputTokens sets the "output_tokens" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetNillableProvider ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableProvider(v *string) *TokenUsageUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetNillableSessionKey ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableSessionKey(v *string) *TokenUsageUpdateOne
SetNillableSessionKey sets the "session_key" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetNillableTotalTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetNillableTotalTokens(v *int64) *TokenUsageUpdateOne
SetNillableTotalTokens sets the "total_tokens" field if the given value is not nil.
func (*TokenUsageUpdateOne) SetOutputTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetOutputTokens(v int64) *TokenUsageUpdateOne
SetOutputTokens sets the "output_tokens" field.
func (*TokenUsageUpdateOne) SetProvider ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetProvider(v string) *TokenUsageUpdateOne
SetProvider sets the "provider" field.
func (*TokenUsageUpdateOne) SetSessionKey ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetSessionKey(v string) *TokenUsageUpdateOne
SetSessionKey sets the "session_key" field.
func (*TokenUsageUpdateOne) SetTotalTokens ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) SetTotalTokens(v int64) *TokenUsageUpdateOne
SetTotalTokens sets the "total_tokens" field.
func (*TokenUsageUpdateOne) Where ¶ added in v0.5.0
func (_u *TokenUsageUpdateOne) Where(ps ...predicate.TokenUsage) *TokenUsageUpdateOne
Where appends a list predicates to the TokenUsageUpdate builder.
type TokenUsages ¶ added in v0.5.0
type TokenUsages []*TokenUsage
TokenUsages is a parsable slice of TokenUsage.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// AuditLog is the client for interacting with the AuditLog builders.
AuditLog *AuditLogClient
// ConfigProfile is the client for interacting with the ConfigProfile builders.
ConfigProfile *ConfigProfileClient
// CronJob is the client for interacting with the CronJob builders.
CronJob *CronJobClient
// CronJobHistory is the client for interacting with the CronJobHistory builders.
CronJobHistory *CronJobHistoryClient
// EscrowDeal is the client for interacting with the EscrowDeal builders.
EscrowDeal *EscrowDealClient
// ExternalRef is the client for interacting with the ExternalRef builders.
ExternalRef *ExternalRefClient
// Inquiry is the client for interacting with the Inquiry builders.
Inquiry *InquiryClient
// Key is the client for interacting with the Key builders.
Key *KeyClient
// Knowledge is the client for interacting with the Knowledge builders.
Knowledge *KnowledgeClient
// Learning is the client for interacting with the Learning builders.
Learning *LearningClient
// Message is the client for interacting with the Message builders.
Message *MessageClient
// Observation is the client for interacting with the Observation builders.
Observation *ObservationClient
// PaymentTx is the client for interacting with the PaymentTx builders.
PaymentTx *PaymentTxClient
// PeerReputation is the client for interacting with the PeerReputation builders.
PeerReputation *PeerReputationClient
// Reflection is the client for interacting with the Reflection builders.
Reflection *ReflectionClient
// Secret is the client for interacting with the Secret builders.
Secret *SecretClient
// Session is the client for interacting with the Session builders.
Session *SessionClient
// TokenUsage is the client for interacting with the TokenUsage builders.
TokenUsage *TokenUsageClient
// WorkflowRun is the client for interacting with the WorkflowRun builders.
WorkflowRun *WorkflowRunClient
// WorkflowStepRun is the client for interacting with the WorkflowStepRun builders.
WorkflowStepRun *WorkflowStepRunClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type WorkflowRun ¶
type WorkflowRun struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name of the workflow being executed
WorkflowName string `json:"workflow_name,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Status holds the value of the "status" field.
Status workflowrun.Status `json:"status,omitempty"`
// TotalSteps holds the value of the "total_steps" field.
TotalSteps int `json:"total_steps,omitempty"`
// CompletedSteps holds the value of the "completed_steps" field.
CompletedSteps int `json:"completed_steps,omitempty"`
// ErrorMessage holds the value of the "error_message" field.
ErrorMessage string `json:"error_message,omitempty"`
// StartedAt holds the value of the "started_at" field.
StartedAt time.Time `json:"started_at,omitempty"`
// CompletedAt holds the value of the "completed_at" field.
CompletedAt *time.Time `json:"completed_at,omitempty"`
// contains filtered or unexported fields
}
WorkflowRun is the model entity for the WorkflowRun schema.
func (*WorkflowRun) String ¶
func (_m *WorkflowRun) String() string
String implements the fmt.Stringer.
func (*WorkflowRun) Unwrap ¶
func (_m *WorkflowRun) Unwrap() *WorkflowRun
Unwrap unwraps the WorkflowRun 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 (*WorkflowRun) Update ¶
func (_m *WorkflowRun) Update() *WorkflowRunUpdateOne
Update returns a builder for updating this WorkflowRun. Note that you need to call WorkflowRun.Unwrap() before calling this method if this WorkflowRun was returned from a transaction, and the transaction was committed or rolled back.
type WorkflowRunClient ¶
type WorkflowRunClient struct {
// contains filtered or unexported fields
}
WorkflowRunClient is a client for the WorkflowRun schema.
func NewWorkflowRunClient ¶
func NewWorkflowRunClient(c config) *WorkflowRunClient
NewWorkflowRunClient returns a client for the WorkflowRun from the given config.
func (*WorkflowRunClient) Create ¶
func (c *WorkflowRunClient) Create() *WorkflowRunCreate
Create returns a builder for creating a WorkflowRun entity.
func (*WorkflowRunClient) CreateBulk ¶
func (c *WorkflowRunClient) CreateBulk(builders ...*WorkflowRunCreate) *WorkflowRunCreateBulk
CreateBulk returns a builder for creating a bulk of WorkflowRun entities.
func (*WorkflowRunClient) Delete ¶
func (c *WorkflowRunClient) Delete() *WorkflowRunDelete
Delete returns a delete builder for WorkflowRun.
func (*WorkflowRunClient) DeleteOne ¶
func (c *WorkflowRunClient) DeleteOne(_m *WorkflowRun) *WorkflowRunDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkflowRunClient) DeleteOneID ¶
func (c *WorkflowRunClient) DeleteOneID(id uuid.UUID) *WorkflowRunDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkflowRunClient) Get ¶
func (c *WorkflowRunClient) Get(ctx context.Context, id uuid.UUID) (*WorkflowRun, error)
Get returns a WorkflowRun entity by its id.
func (*WorkflowRunClient) GetX ¶
func (c *WorkflowRunClient) GetX(ctx context.Context, id uuid.UUID) *WorkflowRun
GetX is like Get, but panics if an error occurs.
func (*WorkflowRunClient) Hooks ¶
func (c *WorkflowRunClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkflowRunClient) Intercept ¶
func (c *WorkflowRunClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowrun.Intercept(f(g(h())))`.
func (*WorkflowRunClient) Interceptors ¶
func (c *WorkflowRunClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkflowRunClient) MapCreateBulk ¶
func (c *WorkflowRunClient) MapCreateBulk(slice any, setFunc func(*WorkflowRunCreate, int)) *WorkflowRunCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*WorkflowRunClient) Query ¶
func (c *WorkflowRunClient) Query() *WorkflowRunQuery
Query returns a query builder for WorkflowRun.
func (*WorkflowRunClient) Update ¶
func (c *WorkflowRunClient) Update() *WorkflowRunUpdate
Update returns an update builder for WorkflowRun.
func (*WorkflowRunClient) UpdateOne ¶
func (c *WorkflowRunClient) UpdateOne(_m *WorkflowRun) *WorkflowRunUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkflowRunClient) UpdateOneID ¶
func (c *WorkflowRunClient) UpdateOneID(id uuid.UUID) *WorkflowRunUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkflowRunClient) Use ¶
func (c *WorkflowRunClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowrun.Hooks(f(g(h())))`.
type WorkflowRunCreate ¶
type WorkflowRunCreate struct {
// contains filtered or unexported fields
}
WorkflowRunCreate is the builder for creating a WorkflowRun entity.
func (*WorkflowRunCreate) Exec ¶
func (_c *WorkflowRunCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowRunCreate) ExecX ¶
func (_c *WorkflowRunCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowRunCreate) Mutation ¶
func (_c *WorkflowRunCreate) Mutation() *WorkflowRunMutation
Mutation returns the WorkflowRunMutation object of the builder.
func (*WorkflowRunCreate) Save ¶
func (_c *WorkflowRunCreate) Save(ctx context.Context) (*WorkflowRun, error)
Save creates the WorkflowRun in the database.
func (*WorkflowRunCreate) SaveX ¶
func (_c *WorkflowRunCreate) SaveX(ctx context.Context) *WorkflowRun
SaveX calls Save and panics if Save returns an error.
func (*WorkflowRunCreate) SetCompletedAt ¶
func (_c *WorkflowRunCreate) SetCompletedAt(v time.Time) *WorkflowRunCreate
SetCompletedAt sets the "completed_at" field.
func (*WorkflowRunCreate) SetCompletedSteps ¶
func (_c *WorkflowRunCreate) SetCompletedSteps(v int) *WorkflowRunCreate
SetCompletedSteps sets the "completed_steps" field.
func (*WorkflowRunCreate) SetDescription ¶
func (_c *WorkflowRunCreate) SetDescription(v string) *WorkflowRunCreate
SetDescription sets the "description" field.
func (*WorkflowRunCreate) SetErrorMessage ¶
func (_c *WorkflowRunCreate) SetErrorMessage(v string) *WorkflowRunCreate
SetErrorMessage sets the "error_message" field.
func (*WorkflowRunCreate) SetID ¶
func (_c *WorkflowRunCreate) SetID(v uuid.UUID) *WorkflowRunCreate
SetID sets the "id" field.
func (*WorkflowRunCreate) SetNillableCompletedAt ¶
func (_c *WorkflowRunCreate) SetNillableCompletedAt(v *time.Time) *WorkflowRunCreate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*WorkflowRunCreate) SetNillableCompletedSteps ¶
func (_c *WorkflowRunCreate) SetNillableCompletedSteps(v *int) *WorkflowRunCreate
SetNillableCompletedSteps sets the "completed_steps" field if the given value is not nil.
func (*WorkflowRunCreate) SetNillableDescription ¶
func (_c *WorkflowRunCreate) SetNillableDescription(v *string) *WorkflowRunCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowRunCreate) SetNillableErrorMessage ¶
func (_c *WorkflowRunCreate) SetNillableErrorMessage(v *string) *WorkflowRunCreate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*WorkflowRunCreate) SetNillableID ¶
func (_c *WorkflowRunCreate) SetNillableID(v *uuid.UUID) *WorkflowRunCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*WorkflowRunCreate) SetNillableStartedAt ¶
func (_c *WorkflowRunCreate) SetNillableStartedAt(v *time.Time) *WorkflowRunCreate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*WorkflowRunCreate) SetNillableStatus ¶
func (_c *WorkflowRunCreate) SetNillableStatus(v *workflowrun.Status) *WorkflowRunCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WorkflowRunCreate) SetNillableTotalSteps ¶
func (_c *WorkflowRunCreate) SetNillableTotalSteps(v *int) *WorkflowRunCreate
SetNillableTotalSteps sets the "total_steps" field if the given value is not nil.
func (*WorkflowRunCreate) SetStartedAt ¶
func (_c *WorkflowRunCreate) SetStartedAt(v time.Time) *WorkflowRunCreate
SetStartedAt sets the "started_at" field.
func (*WorkflowRunCreate) SetStatus ¶
func (_c *WorkflowRunCreate) SetStatus(v workflowrun.Status) *WorkflowRunCreate
SetStatus sets the "status" field.
func (*WorkflowRunCreate) SetTotalSteps ¶
func (_c *WorkflowRunCreate) SetTotalSteps(v int) *WorkflowRunCreate
SetTotalSteps sets the "total_steps" field.
func (*WorkflowRunCreate) SetWorkflowName ¶
func (_c *WorkflowRunCreate) SetWorkflowName(v string) *WorkflowRunCreate
SetWorkflowName sets the "workflow_name" field.
type WorkflowRunCreateBulk ¶
type WorkflowRunCreateBulk struct {
// contains filtered or unexported fields
}
WorkflowRunCreateBulk is the builder for creating many WorkflowRun entities in bulk.
func (*WorkflowRunCreateBulk) Exec ¶
func (_c *WorkflowRunCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowRunCreateBulk) ExecX ¶
func (_c *WorkflowRunCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowRunCreateBulk) Save ¶
func (_c *WorkflowRunCreateBulk) Save(ctx context.Context) ([]*WorkflowRun, error)
Save creates the WorkflowRun entities in the database.
func (*WorkflowRunCreateBulk) SaveX ¶
func (_c *WorkflowRunCreateBulk) SaveX(ctx context.Context) []*WorkflowRun
SaveX is like Save, but panics if an error occurs.
type WorkflowRunDelete ¶
type WorkflowRunDelete struct {
// contains filtered or unexported fields
}
WorkflowRunDelete is the builder for deleting a WorkflowRun entity.
func (*WorkflowRunDelete) Exec ¶
func (_d *WorkflowRunDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkflowRunDelete) ExecX ¶
func (_d *WorkflowRunDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowRunDelete) Where ¶
func (_d *WorkflowRunDelete) Where(ps ...predicate.WorkflowRun) *WorkflowRunDelete
Where appends a list predicates to the WorkflowRunDelete builder.
type WorkflowRunDeleteOne ¶
type WorkflowRunDeleteOne struct {
// contains filtered or unexported fields
}
WorkflowRunDeleteOne is the builder for deleting a single WorkflowRun entity.
func (*WorkflowRunDeleteOne) Exec ¶
func (_d *WorkflowRunDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkflowRunDeleteOne) ExecX ¶
func (_d *WorkflowRunDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowRunDeleteOne) Where ¶
func (_d *WorkflowRunDeleteOne) Where(ps ...predicate.WorkflowRun) *WorkflowRunDeleteOne
Where appends a list predicates to the WorkflowRunDelete builder.
type WorkflowRunGroupBy ¶
type WorkflowRunGroupBy struct {
// contains filtered or unexported fields
}
WorkflowRunGroupBy is the group-by builder for WorkflowRun entities.
func (*WorkflowRunGroupBy) Aggregate ¶
func (_g *WorkflowRunGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowRunGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkflowRunGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowRunGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowRunGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowRunGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowRunGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowRunGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowRunGroupBy) Scan ¶
func (_g *WorkflowRunGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowRunGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowRunMutation ¶
type WorkflowRunMutation struct {
// contains filtered or unexported fields
}
WorkflowRunMutation represents an operation that mutates the WorkflowRun nodes in the graph.
func (*WorkflowRunMutation) AddCompletedSteps ¶
func (m *WorkflowRunMutation) AddCompletedSteps(i int)
AddCompletedSteps adds i to the "completed_steps" field.
func (*WorkflowRunMutation) AddField ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) AddTotalSteps ¶
func (m *WorkflowRunMutation) AddTotalSteps(i int)
AddTotalSteps adds i to the "total_steps" field.
func (*WorkflowRunMutation) AddedCompletedSteps ¶
func (m *WorkflowRunMutation) AddedCompletedSteps() (r int, exists bool)
AddedCompletedSteps returns the value that was added to the "completed_steps" field in this mutation.
func (*WorkflowRunMutation) AddedEdges ¶
func (m *WorkflowRunMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkflowRunMutation) AddedField ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) AddedFields ¶
func (m *WorkflowRunMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkflowRunMutation) AddedIDs ¶
func (m *WorkflowRunMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkflowRunMutation) AddedTotalSteps ¶
func (m *WorkflowRunMutation) AddedTotalSteps() (r int, exists bool)
AddedTotalSteps returns the value that was added to the "total_steps" field in this mutation.
func (*WorkflowRunMutation) ClearCompletedAt ¶
func (m *WorkflowRunMutation) ClearCompletedAt()
ClearCompletedAt clears the value of the "completed_at" field.
func (*WorkflowRunMutation) ClearDescription ¶
func (m *WorkflowRunMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*WorkflowRunMutation) ClearEdge ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ClearErrorMessage ¶
func (m *WorkflowRunMutation) ClearErrorMessage()
ClearErrorMessage clears the value of the "error_message" field.
func (*WorkflowRunMutation) ClearField ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ClearedEdges ¶
func (m *WorkflowRunMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkflowRunMutation) ClearedFields ¶
func (m *WorkflowRunMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkflowRunMutation) Client ¶
func (m WorkflowRunMutation) 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 (*WorkflowRunMutation) CompletedAt ¶
func (m *WorkflowRunMutation) CompletedAt() (r time.Time, exists bool)
CompletedAt returns the value of the "completed_at" field in the mutation.
func (*WorkflowRunMutation) CompletedAtCleared ¶
func (m *WorkflowRunMutation) CompletedAtCleared() bool
CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.
func (*WorkflowRunMutation) CompletedSteps ¶
func (m *WorkflowRunMutation) CompletedSteps() (r int, exists bool)
CompletedSteps returns the value of the "completed_steps" field in the mutation.
func (*WorkflowRunMutation) Description ¶
func (m *WorkflowRunMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*WorkflowRunMutation) DescriptionCleared ¶
func (m *WorkflowRunMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*WorkflowRunMutation) EdgeCleared ¶
func (m *WorkflowRunMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkflowRunMutation) ErrorMessage ¶
func (m *WorkflowRunMutation) ErrorMessage() (r string, exists bool)
ErrorMessage returns the value of the "error_message" field in the mutation.
func (*WorkflowRunMutation) ErrorMessageCleared ¶
func (m *WorkflowRunMutation) ErrorMessageCleared() bool
ErrorMessageCleared returns if the "error_message" field was cleared in this mutation.
func (*WorkflowRunMutation) Field ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) FieldCleared ¶
func (m *WorkflowRunMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkflowRunMutation) Fields ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ID ¶
func (m *WorkflowRunMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*WorkflowRunMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*WorkflowRunMutation) OldCompletedAt ¶
OldCompletedAt returns the old "completed_at" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldCompletedSteps ¶
func (m *WorkflowRunMutation) OldCompletedSteps(ctx context.Context) (v int, err error)
OldCompletedSteps returns the old "completed_steps" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldDescription ¶
func (m *WorkflowRunMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldErrorMessage ¶
func (m *WorkflowRunMutation) OldErrorMessage(ctx context.Context) (v string, err error)
OldErrorMessage returns the old "error_message" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) 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 (*WorkflowRunMutation) OldStartedAt ¶
OldStartedAt returns the old "started_at" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldStatus ¶
func (m *WorkflowRunMutation) OldStatus(ctx context.Context) (v workflowrun.Status, err error)
OldStatus returns the old "status" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldTotalSteps ¶
func (m *WorkflowRunMutation) OldTotalSteps(ctx context.Context) (v int, err error)
OldTotalSteps returns the old "total_steps" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) OldWorkflowName ¶
func (m *WorkflowRunMutation) OldWorkflowName(ctx context.Context) (v string, err error)
OldWorkflowName returns the old "workflow_name" field's value of the WorkflowRun entity. If the WorkflowRun 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 (*WorkflowRunMutation) Op ¶
func (m *WorkflowRunMutation) Op() Op
Op returns the operation name.
func (*WorkflowRunMutation) RemovedEdges ¶
func (m *WorkflowRunMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkflowRunMutation) RemovedIDs ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ResetCompletedAt ¶
func (m *WorkflowRunMutation) ResetCompletedAt()
ResetCompletedAt resets all changes to the "completed_at" field.
func (*WorkflowRunMutation) ResetCompletedSteps ¶
func (m *WorkflowRunMutation) ResetCompletedSteps()
ResetCompletedSteps resets all changes to the "completed_steps" field.
func (*WorkflowRunMutation) ResetDescription ¶
func (m *WorkflowRunMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*WorkflowRunMutation) ResetEdge ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ResetErrorMessage ¶
func (m *WorkflowRunMutation) ResetErrorMessage()
ResetErrorMessage resets all changes to the "error_message" field.
func (*WorkflowRunMutation) ResetField ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) ResetStartedAt ¶
func (m *WorkflowRunMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "started_at" field.
func (*WorkflowRunMutation) ResetStatus ¶
func (m *WorkflowRunMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*WorkflowRunMutation) ResetTotalSteps ¶
func (m *WorkflowRunMutation) ResetTotalSteps()
ResetTotalSteps resets all changes to the "total_steps" field.
func (*WorkflowRunMutation) ResetWorkflowName ¶
func (m *WorkflowRunMutation) ResetWorkflowName()
ResetWorkflowName resets all changes to the "workflow_name" field.
func (*WorkflowRunMutation) SetCompletedAt ¶
func (m *WorkflowRunMutation) SetCompletedAt(t time.Time)
SetCompletedAt sets the "completed_at" field.
func (*WorkflowRunMutation) SetCompletedSteps ¶
func (m *WorkflowRunMutation) SetCompletedSteps(i int)
SetCompletedSteps sets the "completed_steps" field.
func (*WorkflowRunMutation) SetDescription ¶
func (m *WorkflowRunMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*WorkflowRunMutation) SetErrorMessage ¶
func (m *WorkflowRunMutation) SetErrorMessage(s string)
SetErrorMessage sets the "error_message" field.
func (*WorkflowRunMutation) SetField ¶
func (m *WorkflowRunMutation) 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 (*WorkflowRunMutation) SetID ¶
func (m *WorkflowRunMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowRun entities.
func (*WorkflowRunMutation) SetOp ¶
func (m *WorkflowRunMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WorkflowRunMutation) SetStartedAt ¶
func (m *WorkflowRunMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "started_at" field.
func (*WorkflowRunMutation) SetStatus ¶
func (m *WorkflowRunMutation) SetStatus(w workflowrun.Status)
SetStatus sets the "status" field.
func (*WorkflowRunMutation) SetTotalSteps ¶
func (m *WorkflowRunMutation) SetTotalSteps(i int)
SetTotalSteps sets the "total_steps" field.
func (*WorkflowRunMutation) SetWorkflowName ¶
func (m *WorkflowRunMutation) SetWorkflowName(s string)
SetWorkflowName sets the "workflow_name" field.
func (*WorkflowRunMutation) StartedAt ¶
func (m *WorkflowRunMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "started_at" field in the mutation.
func (*WorkflowRunMutation) Status ¶
func (m *WorkflowRunMutation) Status() (r workflowrun.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*WorkflowRunMutation) TotalSteps ¶
func (m *WorkflowRunMutation) TotalSteps() (r int, exists bool)
TotalSteps returns the value of the "total_steps" field in the mutation.
func (WorkflowRunMutation) Tx ¶
func (m WorkflowRunMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkflowRunMutation) Type ¶
func (m *WorkflowRunMutation) Type() string
Type returns the node type of this mutation (WorkflowRun).
func (*WorkflowRunMutation) Where ¶
func (m *WorkflowRunMutation) Where(ps ...predicate.WorkflowRun)
Where appends a list predicates to the WorkflowRunMutation builder.
func (*WorkflowRunMutation) WhereP ¶
func (m *WorkflowRunMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkflowRunMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*WorkflowRunMutation) WorkflowName ¶
func (m *WorkflowRunMutation) WorkflowName() (r string, exists bool)
WorkflowName returns the value of the "workflow_name" field in the mutation.
type WorkflowRunQuery ¶
type WorkflowRunQuery struct {
// contains filtered or unexported fields
}
WorkflowRunQuery is the builder for querying WorkflowRun entities.
func (*WorkflowRunQuery) Aggregate ¶
func (_q *WorkflowRunQuery) Aggregate(fns ...AggregateFunc) *WorkflowRunSelect
Aggregate returns a WorkflowRunSelect configured with the given aggregations.
func (*WorkflowRunQuery) All ¶
func (_q *WorkflowRunQuery) All(ctx context.Context) ([]*WorkflowRun, error)
All executes the query and returns a list of WorkflowRuns.
func (*WorkflowRunQuery) AllX ¶
func (_q *WorkflowRunQuery) AllX(ctx context.Context) []*WorkflowRun
AllX is like All, but panics if an error occurs.
func (*WorkflowRunQuery) Clone ¶
func (_q *WorkflowRunQuery) Clone() *WorkflowRunQuery
Clone returns a duplicate of the WorkflowRunQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkflowRunQuery) Count ¶
func (_q *WorkflowRunQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkflowRunQuery) CountX ¶
func (_q *WorkflowRunQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkflowRunQuery) Exist ¶
func (_q *WorkflowRunQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkflowRunQuery) ExistX ¶
func (_q *WorkflowRunQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkflowRunQuery) First ¶
func (_q *WorkflowRunQuery) First(ctx context.Context) (*WorkflowRun, error)
First returns the first WorkflowRun entity from the query. Returns a *NotFoundError when no WorkflowRun was found.
func (*WorkflowRunQuery) FirstID ¶
FirstID returns the first WorkflowRun ID from the query. Returns a *NotFoundError when no WorkflowRun ID was found.
func (*WorkflowRunQuery) FirstIDX ¶
func (_q *WorkflowRunQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkflowRunQuery) FirstX ¶
func (_q *WorkflowRunQuery) FirstX(ctx context.Context) *WorkflowRun
FirstX is like First, but panics if an error occurs.
func (*WorkflowRunQuery) GroupBy ¶
func (_q *WorkflowRunQuery) GroupBy(field string, fields ...string) *WorkflowRunGroupBy
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 {
WorkflowName string `json:"workflow_name,omitempty"`
Count int `json:"count,omitempty"`
}
client.WorkflowRun.Query().
GroupBy(workflowrun.FieldWorkflowName).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*WorkflowRunQuery) IDsX ¶
func (_q *WorkflowRunQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*WorkflowRunQuery) Limit ¶
func (_q *WorkflowRunQuery) Limit(limit int) *WorkflowRunQuery
Limit the number of records to be returned by this query.
func (*WorkflowRunQuery) Offset ¶
func (_q *WorkflowRunQuery) Offset(offset int) *WorkflowRunQuery
Offset to start from.
func (*WorkflowRunQuery) Only ¶
func (_q *WorkflowRunQuery) Only(ctx context.Context) (*WorkflowRun, error)
Only returns a single WorkflowRun entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowRun entity is found. Returns a *NotFoundError when no WorkflowRun entities are found.
func (*WorkflowRunQuery) OnlyID ¶
OnlyID is like Only, but returns the only WorkflowRun ID in the query. Returns a *NotSingularError when more than one WorkflowRun ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkflowRunQuery) OnlyIDX ¶
func (_q *WorkflowRunQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkflowRunQuery) OnlyX ¶
func (_q *WorkflowRunQuery) OnlyX(ctx context.Context) *WorkflowRun
OnlyX is like Only, but panics if an error occurs.
func (*WorkflowRunQuery) Order ¶
func (_q *WorkflowRunQuery) Order(o ...workflowrun.OrderOption) *WorkflowRunQuery
Order specifies how the records should be ordered.
func (*WorkflowRunQuery) Select ¶
func (_q *WorkflowRunQuery) Select(fields ...string) *WorkflowRunSelect
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 {
WorkflowName string `json:"workflow_name,omitempty"`
}
client.WorkflowRun.Query().
Select(workflowrun.FieldWorkflowName).
Scan(ctx, &v)
func (*WorkflowRunQuery) Unique ¶
func (_q *WorkflowRunQuery) Unique(unique bool) *WorkflowRunQuery
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 (*WorkflowRunQuery) Where ¶
func (_q *WorkflowRunQuery) Where(ps ...predicate.WorkflowRun) *WorkflowRunQuery
Where adds a new predicate for the WorkflowRunQuery builder.
type WorkflowRunSelect ¶
type WorkflowRunSelect struct {
*WorkflowRunQuery
// contains filtered or unexported fields
}
WorkflowRunSelect is the builder for selecting fields of WorkflowRun entities.
func (*WorkflowRunSelect) Aggregate ¶
func (_s *WorkflowRunSelect) Aggregate(fns ...AggregateFunc) *WorkflowRunSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkflowRunSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowRunSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowRunSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowRunSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowRunSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowRunSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowRunSelect) Scan ¶
func (_s *WorkflowRunSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowRunSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowRunUpdate ¶
type WorkflowRunUpdate struct {
// contains filtered or unexported fields
}
WorkflowRunUpdate is the builder for updating WorkflowRun entities.
func (*WorkflowRunUpdate) AddCompletedSteps ¶
func (_u *WorkflowRunUpdate) AddCompletedSteps(v int) *WorkflowRunUpdate
AddCompletedSteps adds value to the "completed_steps" field.
func (*WorkflowRunUpdate) AddTotalSteps ¶
func (_u *WorkflowRunUpdate) AddTotalSteps(v int) *WorkflowRunUpdate
AddTotalSteps adds value to the "total_steps" field.
func (*WorkflowRunUpdate) ClearCompletedAt ¶
func (_u *WorkflowRunUpdate) ClearCompletedAt() *WorkflowRunUpdate
ClearCompletedAt clears the value of the "completed_at" field.
func (*WorkflowRunUpdate) ClearDescription ¶
func (_u *WorkflowRunUpdate) ClearDescription() *WorkflowRunUpdate
ClearDescription clears the value of the "description" field.
func (*WorkflowRunUpdate) ClearErrorMessage ¶
func (_u *WorkflowRunUpdate) ClearErrorMessage() *WorkflowRunUpdate
ClearErrorMessage clears the value of the "error_message" field.
func (*WorkflowRunUpdate) Exec ¶
func (_u *WorkflowRunUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowRunUpdate) ExecX ¶
func (_u *WorkflowRunUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowRunUpdate) Mutation ¶
func (_u *WorkflowRunUpdate) Mutation() *WorkflowRunMutation
Mutation returns the WorkflowRunMutation object of the builder.
func (*WorkflowRunUpdate) Save ¶
func (_u *WorkflowRunUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkflowRunUpdate) SaveX ¶
func (_u *WorkflowRunUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkflowRunUpdate) SetCompletedAt ¶
func (_u *WorkflowRunUpdate) SetCompletedAt(v time.Time) *WorkflowRunUpdate
SetCompletedAt sets the "completed_at" field.
func (*WorkflowRunUpdate) SetCompletedSteps ¶
func (_u *WorkflowRunUpdate) SetCompletedSteps(v int) *WorkflowRunUpdate
SetCompletedSteps sets the "completed_steps" field.
func (*WorkflowRunUpdate) SetDescription ¶
func (_u *WorkflowRunUpdate) SetDescription(v string) *WorkflowRunUpdate
SetDescription sets the "description" field.
func (*WorkflowRunUpdate) SetErrorMessage ¶
func (_u *WorkflowRunUpdate) SetErrorMessage(v string) *WorkflowRunUpdate
SetErrorMessage sets the "error_message" field.
func (*WorkflowRunUpdate) SetNillableCompletedAt ¶
func (_u *WorkflowRunUpdate) SetNillableCompletedAt(v *time.Time) *WorkflowRunUpdate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*WorkflowRunUpdate) SetNillableCompletedSteps ¶
func (_u *WorkflowRunUpdate) SetNillableCompletedSteps(v *int) *WorkflowRunUpdate
SetNillableCompletedSteps sets the "completed_steps" field if the given value is not nil.
func (*WorkflowRunUpdate) SetNillableDescription ¶
func (_u *WorkflowRunUpdate) SetNillableDescription(v *string) *WorkflowRunUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowRunUpdate) SetNillableErrorMessage ¶
func (_u *WorkflowRunUpdate) SetNillableErrorMessage(v *string) *WorkflowRunUpdate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*WorkflowRunUpdate) SetNillableStatus ¶
func (_u *WorkflowRunUpdate) SetNillableStatus(v *workflowrun.Status) *WorkflowRunUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WorkflowRunUpdate) SetNillableTotalSteps ¶
func (_u *WorkflowRunUpdate) SetNillableTotalSteps(v *int) *WorkflowRunUpdate
SetNillableTotalSteps sets the "total_steps" field if the given value is not nil.
func (*WorkflowRunUpdate) SetNillableWorkflowName ¶
func (_u *WorkflowRunUpdate) SetNillableWorkflowName(v *string) *WorkflowRunUpdate
SetNillableWorkflowName sets the "workflow_name" field if the given value is not nil.
func (*WorkflowRunUpdate) SetStatus ¶
func (_u *WorkflowRunUpdate) SetStatus(v workflowrun.Status) *WorkflowRunUpdate
SetStatus sets the "status" field.
func (*WorkflowRunUpdate) SetTotalSteps ¶
func (_u *WorkflowRunUpdate) SetTotalSteps(v int) *WorkflowRunUpdate
SetTotalSteps sets the "total_steps" field.
func (*WorkflowRunUpdate) SetWorkflowName ¶
func (_u *WorkflowRunUpdate) SetWorkflowName(v string) *WorkflowRunUpdate
SetWorkflowName sets the "workflow_name" field.
func (*WorkflowRunUpdate) Where ¶
func (_u *WorkflowRunUpdate) Where(ps ...predicate.WorkflowRun) *WorkflowRunUpdate
Where appends a list predicates to the WorkflowRunUpdate builder.
type WorkflowRunUpdateOne ¶
type WorkflowRunUpdateOne struct {
// contains filtered or unexported fields
}
WorkflowRunUpdateOne is the builder for updating a single WorkflowRun entity.
func (*WorkflowRunUpdateOne) AddCompletedSteps ¶
func (_u *WorkflowRunUpdateOne) AddCompletedSteps(v int) *WorkflowRunUpdateOne
AddCompletedSteps adds value to the "completed_steps" field.
func (*WorkflowRunUpdateOne) AddTotalSteps ¶
func (_u *WorkflowRunUpdateOne) AddTotalSteps(v int) *WorkflowRunUpdateOne
AddTotalSteps adds value to the "total_steps" field.
func (*WorkflowRunUpdateOne) ClearCompletedAt ¶
func (_u *WorkflowRunUpdateOne) ClearCompletedAt() *WorkflowRunUpdateOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*WorkflowRunUpdateOne) ClearDescription ¶
func (_u *WorkflowRunUpdateOne) ClearDescription() *WorkflowRunUpdateOne
ClearDescription clears the value of the "description" field.
func (*WorkflowRunUpdateOne) ClearErrorMessage ¶
func (_u *WorkflowRunUpdateOne) ClearErrorMessage() *WorkflowRunUpdateOne
ClearErrorMessage clears the value of the "error_message" field.
func (*WorkflowRunUpdateOne) Exec ¶
func (_u *WorkflowRunUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkflowRunUpdateOne) ExecX ¶
func (_u *WorkflowRunUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowRunUpdateOne) Mutation ¶
func (_u *WorkflowRunUpdateOne) Mutation() *WorkflowRunMutation
Mutation returns the WorkflowRunMutation object of the builder.
func (*WorkflowRunUpdateOne) Save ¶
func (_u *WorkflowRunUpdateOne) Save(ctx context.Context) (*WorkflowRun, error)
Save executes the query and returns the updated WorkflowRun entity.
func (*WorkflowRunUpdateOne) SaveX ¶
func (_u *WorkflowRunUpdateOne) SaveX(ctx context.Context) *WorkflowRun
SaveX is like Save, but panics if an error occurs.
func (*WorkflowRunUpdateOne) Select ¶
func (_u *WorkflowRunUpdateOne) Select(field string, fields ...string) *WorkflowRunUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkflowRunUpdateOne) SetCompletedAt ¶
func (_u *WorkflowRunUpdateOne) SetCompletedAt(v time.Time) *WorkflowRunUpdateOne
SetCompletedAt sets the "completed_at" field.
func (*WorkflowRunUpdateOne) SetCompletedSteps ¶
func (_u *WorkflowRunUpdateOne) SetCompletedSteps(v int) *WorkflowRunUpdateOne
SetCompletedSteps sets the "completed_steps" field.
func (*WorkflowRunUpdateOne) SetDescription ¶
func (_u *WorkflowRunUpdateOne) SetDescription(v string) *WorkflowRunUpdateOne
SetDescription sets the "description" field.
func (*WorkflowRunUpdateOne) SetErrorMessage ¶
func (_u *WorkflowRunUpdateOne) SetErrorMessage(v string) *WorkflowRunUpdateOne
SetErrorMessage sets the "error_message" field.
func (*WorkflowRunUpdateOne) SetNillableCompletedAt ¶
func (_u *WorkflowRunUpdateOne) SetNillableCompletedAt(v *time.Time) *WorkflowRunUpdateOne
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*WorkflowRunUpdateOne) SetNillableCompletedSteps ¶
func (_u *WorkflowRunUpdateOne) SetNillableCompletedSteps(v *int) *WorkflowRunUpdateOne
SetNillableCompletedSteps sets the "completed_steps" field if the given value is not nil.
func (*WorkflowRunUpdateOne) SetNillableDescription ¶
func (_u *WorkflowRunUpdateOne) SetNillableDescription(v *string) *WorkflowRunUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*WorkflowRunUpdateOne) SetNillableErrorMessage ¶
func (_u *WorkflowRunUpdateOne) SetNillableErrorMessage(v *string) *WorkflowRunUpdateOne
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*WorkflowRunUpdateOne) SetNillableStatus ¶
func (_u *WorkflowRunUpdateOne) SetNillableStatus(v *workflowrun.Status) *WorkflowRunUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WorkflowRunUpdateOne) SetNillableTotalSteps ¶
func (_u *WorkflowRunUpdateOne) SetNillableTotalSteps(v *int) *WorkflowRunUpdateOne
SetNillableTotalSteps sets the "total_steps" field if the given value is not nil.
func (*WorkflowRunUpdateOne) SetNillableWorkflowName ¶
func (_u *WorkflowRunUpdateOne) SetNillableWorkflowName(v *string) *WorkflowRunUpdateOne
SetNillableWorkflowName sets the "workflow_name" field if the given value is not nil.
func (*WorkflowRunUpdateOne) SetStatus ¶
func (_u *WorkflowRunUpdateOne) SetStatus(v workflowrun.Status) *WorkflowRunUpdateOne
SetStatus sets the "status" field.
func (*WorkflowRunUpdateOne) SetTotalSteps ¶
func (_u *WorkflowRunUpdateOne) SetTotalSteps(v int) *WorkflowRunUpdateOne
SetTotalSteps sets the "total_steps" field.
func (*WorkflowRunUpdateOne) SetWorkflowName ¶
func (_u *WorkflowRunUpdateOne) SetWorkflowName(v string) *WorkflowRunUpdateOne
SetWorkflowName sets the "workflow_name" field.
func (*WorkflowRunUpdateOne) Where ¶
func (_u *WorkflowRunUpdateOne) Where(ps ...predicate.WorkflowRun) *WorkflowRunUpdateOne
Where appends a list predicates to the WorkflowRunUpdate builder.
type WorkflowRuns ¶
type WorkflowRuns []*WorkflowRun
WorkflowRuns is a parsable slice of WorkflowRun.
type WorkflowStepRun ¶
type WorkflowStepRun struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Reference to the parent WorkflowRun
RunID uuid.UUID `json:"run_id,omitempty"`
// Step identifier within the workflow YAML
StepID string `json:"step_id,omitempty"`
// Sub-agent that executed this step
Agent string `json:"agent,omitempty"`
// Rendered prompt (after template substitution)
Prompt string `json:"prompt,omitempty"`
// Status holds the value of the "status" field.
Status workflowsteprun.Status `json:"status,omitempty"`
// Step output/result
Result string `json:"result,omitempty"`
// ErrorMessage holds the value of the "error_message" field.
ErrorMessage string `json:"error_message,omitempty"`
// StartedAt holds the value of the "started_at" field.
StartedAt *time.Time `json:"started_at,omitempty"`
// CompletedAt holds the value of the "completed_at" field.
CompletedAt *time.Time `json:"completed_at,omitempty"`
// contains filtered or unexported fields
}
WorkflowStepRun is the model entity for the WorkflowStepRun schema.
func (*WorkflowStepRun) String ¶
func (_m *WorkflowStepRun) String() string
String implements the fmt.Stringer.
func (*WorkflowStepRun) Unwrap ¶
func (_m *WorkflowStepRun) Unwrap() *WorkflowStepRun
Unwrap unwraps the WorkflowStepRun 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 (*WorkflowStepRun) Update ¶
func (_m *WorkflowStepRun) Update() *WorkflowStepRunUpdateOne
Update returns a builder for updating this WorkflowStepRun. Note that you need to call WorkflowStepRun.Unwrap() before calling this method if this WorkflowStepRun was returned from a transaction, and the transaction was committed or rolled back.
type WorkflowStepRunClient ¶
type WorkflowStepRunClient struct {
// contains filtered or unexported fields
}
WorkflowStepRunClient is a client for the WorkflowStepRun schema.
func NewWorkflowStepRunClient ¶
func NewWorkflowStepRunClient(c config) *WorkflowStepRunClient
NewWorkflowStepRunClient returns a client for the WorkflowStepRun from the given config.
func (*WorkflowStepRunClient) Create ¶
func (c *WorkflowStepRunClient) Create() *WorkflowStepRunCreate
Create returns a builder for creating a WorkflowStepRun entity.
func (*WorkflowStepRunClient) CreateBulk ¶
func (c *WorkflowStepRunClient) CreateBulk(builders ...*WorkflowStepRunCreate) *WorkflowStepRunCreateBulk
CreateBulk returns a builder for creating a bulk of WorkflowStepRun entities.
func (*WorkflowStepRunClient) Delete ¶
func (c *WorkflowStepRunClient) Delete() *WorkflowStepRunDelete
Delete returns a delete builder for WorkflowStepRun.
func (*WorkflowStepRunClient) DeleteOne ¶
func (c *WorkflowStepRunClient) DeleteOne(_m *WorkflowStepRun) *WorkflowStepRunDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkflowStepRunClient) DeleteOneID ¶
func (c *WorkflowStepRunClient) DeleteOneID(id uuid.UUID) *WorkflowStepRunDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkflowStepRunClient) Get ¶
func (c *WorkflowStepRunClient) Get(ctx context.Context, id uuid.UUID) (*WorkflowStepRun, error)
Get returns a WorkflowStepRun entity by its id.
func (*WorkflowStepRunClient) GetX ¶
func (c *WorkflowStepRunClient) GetX(ctx context.Context, id uuid.UUID) *WorkflowStepRun
GetX is like Get, but panics if an error occurs.
func (*WorkflowStepRunClient) Hooks ¶
func (c *WorkflowStepRunClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkflowStepRunClient) Intercept ¶
func (c *WorkflowStepRunClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowsteprun.Intercept(f(g(h())))`.
func (*WorkflowStepRunClient) Interceptors ¶
func (c *WorkflowStepRunClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkflowStepRunClient) MapCreateBulk ¶
func (c *WorkflowStepRunClient) MapCreateBulk(slice any, setFunc func(*WorkflowStepRunCreate, int)) *WorkflowStepRunCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*WorkflowStepRunClient) Query ¶
func (c *WorkflowStepRunClient) Query() *WorkflowStepRunQuery
Query returns a query builder for WorkflowStepRun.
func (*WorkflowStepRunClient) Update ¶
func (c *WorkflowStepRunClient) Update() *WorkflowStepRunUpdate
Update returns an update builder for WorkflowStepRun.
func (*WorkflowStepRunClient) UpdateOne ¶
func (c *WorkflowStepRunClient) UpdateOne(_m *WorkflowStepRun) *WorkflowStepRunUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkflowStepRunClient) UpdateOneID ¶
func (c *WorkflowStepRunClient) UpdateOneID(id uuid.UUID) *WorkflowStepRunUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkflowStepRunClient) Use ¶
func (c *WorkflowStepRunClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowsteprun.Hooks(f(g(h())))`.
type WorkflowStepRunCreate ¶
type WorkflowStepRunCreate struct {
// contains filtered or unexported fields
}
WorkflowStepRunCreate is the builder for creating a WorkflowStepRun entity.
func (*WorkflowStepRunCreate) Exec ¶
func (_c *WorkflowStepRunCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowStepRunCreate) ExecX ¶
func (_c *WorkflowStepRunCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStepRunCreate) Mutation ¶
func (_c *WorkflowStepRunCreate) Mutation() *WorkflowStepRunMutation
Mutation returns the WorkflowStepRunMutation object of the builder.
func (*WorkflowStepRunCreate) Save ¶
func (_c *WorkflowStepRunCreate) Save(ctx context.Context) (*WorkflowStepRun, error)
Save creates the WorkflowStepRun in the database.
func (*WorkflowStepRunCreate) SaveX ¶
func (_c *WorkflowStepRunCreate) SaveX(ctx context.Context) *WorkflowStepRun
SaveX calls Save and panics if Save returns an error.
func (*WorkflowStepRunCreate) SetAgent ¶
func (_c *WorkflowStepRunCreate) SetAgent(v string) *WorkflowStepRunCreate
SetAgent sets the "agent" field.
func (*WorkflowStepRunCreate) SetCompletedAt ¶
func (_c *WorkflowStepRunCreate) SetCompletedAt(v time.Time) *WorkflowStepRunCreate
SetCompletedAt sets the "completed_at" field.
func (*WorkflowStepRunCreate) SetErrorMessage ¶
func (_c *WorkflowStepRunCreate) SetErrorMessage(v string) *WorkflowStepRunCreate
SetErrorMessage sets the "error_message" field.
func (*WorkflowStepRunCreate) SetID ¶
func (_c *WorkflowStepRunCreate) SetID(v uuid.UUID) *WorkflowStepRunCreate
SetID sets the "id" field.
func (*WorkflowStepRunCreate) SetNillableAgent ¶
func (_c *WorkflowStepRunCreate) SetNillableAgent(v *string) *WorkflowStepRunCreate
SetNillableAgent sets the "agent" field if the given value is not nil.
func (*WorkflowStepRunCreate) SetNillableCompletedAt ¶
func (_c *WorkflowStepRunCreate) SetNillableCompletedAt(v *time.Time) *WorkflowStepRunCreate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*WorkflowStepRunCreate) SetNillableErrorMessage ¶
func (_c *WorkflowStepRunCreate) SetNillableErrorMessage(v *string) *WorkflowStepRunCreate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*WorkflowStepRunCreate) SetNillableID ¶
func (_c *WorkflowStepRunCreate) SetNillableID(v *uuid.UUID) *WorkflowStepRunCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*WorkflowStepRunCreate) SetNillableResult ¶
func (_c *WorkflowStepRunCreate) SetNillableResult(v *string) *WorkflowStepRunCreate
SetNillableResult sets the "result" field if the given value is not nil.
func (*WorkflowStepRunCreate) SetNillableStartedAt ¶
func (_c *WorkflowStepRunCreate) SetNillableStartedAt(v *time.Time) *WorkflowStepRunCreate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*WorkflowStepRunCreate) SetNillableStatus ¶
func (_c *WorkflowStepRunCreate) SetNillableStatus(v *workflowsteprun.Status) *WorkflowStepRunCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WorkflowStepRunCreate) SetPrompt ¶
func (_c *WorkflowStepRunCreate) SetPrompt(v string) *WorkflowStepRunCreate
SetPrompt sets the "prompt" field.
func (*WorkflowStepRunCreate) SetResult ¶
func (_c *WorkflowStepRunCreate) SetResult(v string) *WorkflowStepRunCreate
SetResult sets the "result" field.
func (*WorkflowStepRunCreate) SetRunID ¶
func (_c *WorkflowStepRunCreate) SetRunID(v uuid.UUID) *WorkflowStepRunCreate
SetRunID sets the "run_id" field.
func (*WorkflowStepRunCreate) SetStartedAt ¶
func (_c *WorkflowStepRunCreate) SetStartedAt(v time.Time) *WorkflowStepRunCreate
SetStartedAt sets the "started_at" field.
func (*WorkflowStepRunCreate) SetStatus ¶
func (_c *WorkflowStepRunCreate) SetStatus(v workflowsteprun.Status) *WorkflowStepRunCreate
SetStatus sets the "status" field.
func (*WorkflowStepRunCreate) SetStepID ¶
func (_c *WorkflowStepRunCreate) SetStepID(v string) *WorkflowStepRunCreate
SetStepID sets the "step_id" field.
type WorkflowStepRunCreateBulk ¶
type WorkflowStepRunCreateBulk struct {
// contains filtered or unexported fields
}
WorkflowStepRunCreateBulk is the builder for creating many WorkflowStepRun entities in bulk.
func (*WorkflowStepRunCreateBulk) Exec ¶
func (_c *WorkflowStepRunCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowStepRunCreateBulk) ExecX ¶
func (_c *WorkflowStepRunCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStepRunCreateBulk) Save ¶
func (_c *WorkflowStepRunCreateBulk) Save(ctx context.Context) ([]*WorkflowStepRun, error)
Save creates the WorkflowStepRun entities in the database.
func (*WorkflowStepRunCreateBulk) SaveX ¶
func (_c *WorkflowStepRunCreateBulk) SaveX(ctx context.Context) []*WorkflowStepRun
SaveX is like Save, but panics if an error occurs.
type WorkflowStepRunDelete ¶
type WorkflowStepRunDelete struct {
// contains filtered or unexported fields
}
WorkflowStepRunDelete is the builder for deleting a WorkflowStepRun entity.
func (*WorkflowStepRunDelete) Exec ¶
func (_d *WorkflowStepRunDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkflowStepRunDelete) ExecX ¶
func (_d *WorkflowStepRunDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStepRunDelete) Where ¶
func (_d *WorkflowStepRunDelete) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunDelete
Where appends a list predicates to the WorkflowStepRunDelete builder.
type WorkflowStepRunDeleteOne ¶
type WorkflowStepRunDeleteOne struct {
// contains filtered or unexported fields
}
WorkflowStepRunDeleteOne is the builder for deleting a single WorkflowStepRun entity.
func (*WorkflowStepRunDeleteOne) Exec ¶
func (_d *WorkflowStepRunDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkflowStepRunDeleteOne) ExecX ¶
func (_d *WorkflowStepRunDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStepRunDeleteOne) Where ¶
func (_d *WorkflowStepRunDeleteOne) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunDeleteOne
Where appends a list predicates to the WorkflowStepRunDelete builder.
type WorkflowStepRunGroupBy ¶
type WorkflowStepRunGroupBy struct {
// contains filtered or unexported fields
}
WorkflowStepRunGroupBy is the group-by builder for WorkflowStepRun entities.
func (*WorkflowStepRunGroupBy) Aggregate ¶
func (_g *WorkflowStepRunGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowStepRunGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkflowStepRunGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowStepRunGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunGroupBy) Scan ¶
func (_g *WorkflowStepRunGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowStepRunGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowStepRunMutation ¶
type WorkflowStepRunMutation struct {
// contains filtered or unexported fields
}
WorkflowStepRunMutation represents an operation that mutates the WorkflowStepRun nodes in the graph.
func (*WorkflowStepRunMutation) AddField ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) AddedEdges ¶
func (m *WorkflowStepRunMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkflowStepRunMutation) AddedField ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) AddedFields ¶
func (m *WorkflowStepRunMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkflowStepRunMutation) AddedIDs ¶
func (m *WorkflowStepRunMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkflowStepRunMutation) Agent ¶
func (m *WorkflowStepRunMutation) Agent() (r string, exists bool)
Agent returns the value of the "agent" field in the mutation.
func (*WorkflowStepRunMutation) AgentCleared ¶
func (m *WorkflowStepRunMutation) AgentCleared() bool
AgentCleared returns if the "agent" field was cleared in this mutation.
func (*WorkflowStepRunMutation) ClearAgent ¶
func (m *WorkflowStepRunMutation) ClearAgent()
ClearAgent clears the value of the "agent" field.
func (*WorkflowStepRunMutation) ClearCompletedAt ¶
func (m *WorkflowStepRunMutation) ClearCompletedAt()
ClearCompletedAt clears the value of the "completed_at" field.
func (*WorkflowStepRunMutation) ClearEdge ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) ClearErrorMessage ¶
func (m *WorkflowStepRunMutation) ClearErrorMessage()
ClearErrorMessage clears the value of the "error_message" field.
func (*WorkflowStepRunMutation) ClearField ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) ClearResult ¶
func (m *WorkflowStepRunMutation) ClearResult()
ClearResult clears the value of the "result" field.
func (*WorkflowStepRunMutation) ClearStartedAt ¶
func (m *WorkflowStepRunMutation) ClearStartedAt()
ClearStartedAt clears the value of the "started_at" field.
func (*WorkflowStepRunMutation) ClearedEdges ¶
func (m *WorkflowStepRunMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkflowStepRunMutation) ClearedFields ¶
func (m *WorkflowStepRunMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkflowStepRunMutation) Client ¶
func (m WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) CompletedAt ¶
func (m *WorkflowStepRunMutation) CompletedAt() (r time.Time, exists bool)
CompletedAt returns the value of the "completed_at" field in the mutation.
func (*WorkflowStepRunMutation) CompletedAtCleared ¶
func (m *WorkflowStepRunMutation) CompletedAtCleared() bool
CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.
func (*WorkflowStepRunMutation) EdgeCleared ¶
func (m *WorkflowStepRunMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkflowStepRunMutation) ErrorMessage ¶
func (m *WorkflowStepRunMutation) ErrorMessage() (r string, exists bool)
ErrorMessage returns the value of the "error_message" field in the mutation.
func (*WorkflowStepRunMutation) ErrorMessageCleared ¶
func (m *WorkflowStepRunMutation) ErrorMessageCleared() bool
ErrorMessageCleared returns if the "error_message" field was cleared in this mutation.
func (*WorkflowStepRunMutation) Field ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) FieldCleared ¶
func (m *WorkflowStepRunMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkflowStepRunMutation) Fields ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) ID ¶
func (m *WorkflowStepRunMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*WorkflowStepRunMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*WorkflowStepRunMutation) OldAgent ¶
func (m *WorkflowStepRunMutation) OldAgent(ctx context.Context) (v string, err error)
OldAgent returns the old "agent" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) OldCompletedAt ¶
OldCompletedAt returns the old "completed_at" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) OldErrorMessage ¶
func (m *WorkflowStepRunMutation) OldErrorMessage(ctx context.Context) (v string, err error)
OldErrorMessage returns the old "error_message" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) OldPrompt ¶
func (m *WorkflowStepRunMutation) OldPrompt(ctx context.Context) (v string, err error)
OldPrompt returns the old "prompt" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) OldResult ¶
func (m *WorkflowStepRunMutation) OldResult(ctx context.Context) (v string, err error)
OldResult returns the old "result" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) OldRunID ¶
OldRunID returns the old "run_id" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) OldStartedAt ¶
OldStartedAt returns the old "started_at" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) OldStatus ¶
func (m *WorkflowStepRunMutation) OldStatus(ctx context.Context) (v workflowsteprun.Status, err error)
OldStatus returns the old "status" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) OldStepID ¶
func (m *WorkflowStepRunMutation) OldStepID(ctx context.Context) (v string, err error)
OldStepID returns the old "step_id" field's value of the WorkflowStepRun entity. If the WorkflowStepRun 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 (*WorkflowStepRunMutation) Op ¶
func (m *WorkflowStepRunMutation) Op() Op
Op returns the operation name.
func (*WorkflowStepRunMutation) Prompt ¶
func (m *WorkflowStepRunMutation) Prompt() (r string, exists bool)
Prompt returns the value of the "prompt" field in the mutation.
func (*WorkflowStepRunMutation) RemovedEdges ¶
func (m *WorkflowStepRunMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkflowStepRunMutation) RemovedIDs ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) ResetAgent ¶
func (m *WorkflowStepRunMutation) ResetAgent()
ResetAgent resets all changes to the "agent" field.
func (*WorkflowStepRunMutation) ResetCompletedAt ¶
func (m *WorkflowStepRunMutation) ResetCompletedAt()
ResetCompletedAt resets all changes to the "completed_at" field.
func (*WorkflowStepRunMutation) ResetEdge ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) ResetErrorMessage ¶
func (m *WorkflowStepRunMutation) ResetErrorMessage()
ResetErrorMessage resets all changes to the "error_message" field.
func (*WorkflowStepRunMutation) ResetField ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) ResetPrompt ¶
func (m *WorkflowStepRunMutation) ResetPrompt()
ResetPrompt resets all changes to the "prompt" field.
func (*WorkflowStepRunMutation) ResetResult ¶
func (m *WorkflowStepRunMutation) ResetResult()
ResetResult resets all changes to the "result" field.
func (*WorkflowStepRunMutation) ResetRunID ¶
func (m *WorkflowStepRunMutation) ResetRunID()
ResetRunID resets all changes to the "run_id" field.
func (*WorkflowStepRunMutation) ResetStartedAt ¶
func (m *WorkflowStepRunMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "started_at" field.
func (*WorkflowStepRunMutation) ResetStatus ¶
func (m *WorkflowStepRunMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*WorkflowStepRunMutation) ResetStepID ¶
func (m *WorkflowStepRunMutation) ResetStepID()
ResetStepID resets all changes to the "step_id" field.
func (*WorkflowStepRunMutation) Result ¶
func (m *WorkflowStepRunMutation) Result() (r string, exists bool)
Result returns the value of the "result" field in the mutation.
func (*WorkflowStepRunMutation) ResultCleared ¶
func (m *WorkflowStepRunMutation) ResultCleared() bool
ResultCleared returns if the "result" field was cleared in this mutation.
func (*WorkflowStepRunMutation) RunID ¶
func (m *WorkflowStepRunMutation) RunID() (r uuid.UUID, exists bool)
RunID returns the value of the "run_id" field in the mutation.
func (*WorkflowStepRunMutation) SetAgent ¶
func (m *WorkflowStepRunMutation) SetAgent(s string)
SetAgent sets the "agent" field.
func (*WorkflowStepRunMutation) SetCompletedAt ¶
func (m *WorkflowStepRunMutation) SetCompletedAt(t time.Time)
SetCompletedAt sets the "completed_at" field.
func (*WorkflowStepRunMutation) SetErrorMessage ¶
func (m *WorkflowStepRunMutation) SetErrorMessage(s string)
SetErrorMessage sets the "error_message" field.
func (*WorkflowStepRunMutation) SetField ¶
func (m *WorkflowStepRunMutation) 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 (*WorkflowStepRunMutation) SetID ¶
func (m *WorkflowStepRunMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowStepRun entities.
func (*WorkflowStepRunMutation) SetOp ¶
func (m *WorkflowStepRunMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WorkflowStepRunMutation) SetPrompt ¶
func (m *WorkflowStepRunMutation) SetPrompt(s string)
SetPrompt sets the "prompt" field.
func (*WorkflowStepRunMutation) SetResult ¶
func (m *WorkflowStepRunMutation) SetResult(s string)
SetResult sets the "result" field.
func (*WorkflowStepRunMutation) SetRunID ¶
func (m *WorkflowStepRunMutation) SetRunID(u uuid.UUID)
SetRunID sets the "run_id" field.
func (*WorkflowStepRunMutation) SetStartedAt ¶
func (m *WorkflowStepRunMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "started_at" field.
func (*WorkflowStepRunMutation) SetStatus ¶
func (m *WorkflowStepRunMutation) SetStatus(w workflowsteprun.Status)
SetStatus sets the "status" field.
func (*WorkflowStepRunMutation) SetStepID ¶
func (m *WorkflowStepRunMutation) SetStepID(s string)
SetStepID sets the "step_id" field.
func (*WorkflowStepRunMutation) StartedAt ¶
func (m *WorkflowStepRunMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "started_at" field in the mutation.
func (*WorkflowStepRunMutation) StartedAtCleared ¶
func (m *WorkflowStepRunMutation) StartedAtCleared() bool
StartedAtCleared returns if the "started_at" field was cleared in this mutation.
func (*WorkflowStepRunMutation) Status ¶
func (m *WorkflowStepRunMutation) Status() (r workflowsteprun.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*WorkflowStepRunMutation) StepID ¶
func (m *WorkflowStepRunMutation) StepID() (r string, exists bool)
StepID returns the value of the "step_id" field in the mutation.
func (WorkflowStepRunMutation) Tx ¶
func (m WorkflowStepRunMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkflowStepRunMutation) Type ¶
func (m *WorkflowStepRunMutation) Type() string
Type returns the node type of this mutation (WorkflowStepRun).
func (*WorkflowStepRunMutation) Where ¶
func (m *WorkflowStepRunMutation) Where(ps ...predicate.WorkflowStepRun)
Where appends a list predicates to the WorkflowStepRunMutation builder.
func (*WorkflowStepRunMutation) WhereP ¶
func (m *WorkflowStepRunMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkflowStepRunMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type WorkflowStepRunQuery ¶
type WorkflowStepRunQuery struct {
// contains filtered or unexported fields
}
WorkflowStepRunQuery is the builder for querying WorkflowStepRun entities.
func (*WorkflowStepRunQuery) Aggregate ¶
func (_q *WorkflowStepRunQuery) Aggregate(fns ...AggregateFunc) *WorkflowStepRunSelect
Aggregate returns a WorkflowStepRunSelect configured with the given aggregations.
func (*WorkflowStepRunQuery) All ¶
func (_q *WorkflowStepRunQuery) All(ctx context.Context) ([]*WorkflowStepRun, error)
All executes the query and returns a list of WorkflowStepRuns.
func (*WorkflowStepRunQuery) AllX ¶
func (_q *WorkflowStepRunQuery) AllX(ctx context.Context) []*WorkflowStepRun
AllX is like All, but panics if an error occurs.
func (*WorkflowStepRunQuery) Clone ¶
func (_q *WorkflowStepRunQuery) Clone() *WorkflowStepRunQuery
Clone returns a duplicate of the WorkflowStepRunQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkflowStepRunQuery) Count ¶
func (_q *WorkflowStepRunQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkflowStepRunQuery) CountX ¶
func (_q *WorkflowStepRunQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkflowStepRunQuery) Exist ¶
func (_q *WorkflowStepRunQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkflowStepRunQuery) ExistX ¶
func (_q *WorkflowStepRunQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkflowStepRunQuery) First ¶
func (_q *WorkflowStepRunQuery) First(ctx context.Context) (*WorkflowStepRun, error)
First returns the first WorkflowStepRun entity from the query. Returns a *NotFoundError when no WorkflowStepRun was found.
func (*WorkflowStepRunQuery) FirstID ¶
FirstID returns the first WorkflowStepRun ID from the query. Returns a *NotFoundError when no WorkflowStepRun ID was found.
func (*WorkflowStepRunQuery) FirstIDX ¶
func (_q *WorkflowStepRunQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkflowStepRunQuery) FirstX ¶
func (_q *WorkflowStepRunQuery) FirstX(ctx context.Context) *WorkflowStepRun
FirstX is like First, but panics if an error occurs.
func (*WorkflowStepRunQuery) GroupBy ¶
func (_q *WorkflowStepRunQuery) GroupBy(field string, fields ...string) *WorkflowStepRunGroupBy
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 {
RunID uuid.UUID `json:"run_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.WorkflowStepRun.Query().
GroupBy(workflowsteprun.FieldRunID).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*WorkflowStepRunQuery) IDs ¶
IDs executes the query and returns a list of WorkflowStepRun IDs.
func (*WorkflowStepRunQuery) IDsX ¶
func (_q *WorkflowStepRunQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*WorkflowStepRunQuery) Limit ¶
func (_q *WorkflowStepRunQuery) Limit(limit int) *WorkflowStepRunQuery
Limit the number of records to be returned by this query.
func (*WorkflowStepRunQuery) Offset ¶
func (_q *WorkflowStepRunQuery) Offset(offset int) *WorkflowStepRunQuery
Offset to start from.
func (*WorkflowStepRunQuery) Only ¶
func (_q *WorkflowStepRunQuery) Only(ctx context.Context) (*WorkflowStepRun, error)
Only returns a single WorkflowStepRun entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowStepRun entity is found. Returns a *NotFoundError when no WorkflowStepRun entities are found.
func (*WorkflowStepRunQuery) OnlyID ¶
OnlyID is like Only, but returns the only WorkflowStepRun ID in the query. Returns a *NotSingularError when more than one WorkflowStepRun ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkflowStepRunQuery) OnlyIDX ¶
func (_q *WorkflowStepRunQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkflowStepRunQuery) OnlyX ¶
func (_q *WorkflowStepRunQuery) OnlyX(ctx context.Context) *WorkflowStepRun
OnlyX is like Only, but panics if an error occurs.
func (*WorkflowStepRunQuery) Order ¶
func (_q *WorkflowStepRunQuery) Order(o ...workflowsteprun.OrderOption) *WorkflowStepRunQuery
Order specifies how the records should be ordered.
func (*WorkflowStepRunQuery) Select ¶
func (_q *WorkflowStepRunQuery) Select(fields ...string) *WorkflowStepRunSelect
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 {
RunID uuid.UUID `json:"run_id,omitempty"`
}
client.WorkflowStepRun.Query().
Select(workflowsteprun.FieldRunID).
Scan(ctx, &v)
func (*WorkflowStepRunQuery) Unique ¶
func (_q *WorkflowStepRunQuery) Unique(unique bool) *WorkflowStepRunQuery
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 (*WorkflowStepRunQuery) Where ¶
func (_q *WorkflowStepRunQuery) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunQuery
Where adds a new predicate for the WorkflowStepRunQuery builder.
type WorkflowStepRunSelect ¶
type WorkflowStepRunSelect struct {
*WorkflowStepRunQuery
// contains filtered or unexported fields
}
WorkflowStepRunSelect is the builder for selecting fields of WorkflowStepRun entities.
func (*WorkflowStepRunSelect) Aggregate ¶
func (_s *WorkflowStepRunSelect) Aggregate(fns ...AggregateFunc) *WorkflowStepRunSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkflowStepRunSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowStepRunSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowStepRunSelect) Scan ¶
func (_s *WorkflowStepRunSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowStepRunSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowStepRunUpdate ¶
type WorkflowStepRunUpdate struct {
// contains filtered or unexported fields
}
WorkflowStepRunUpdate is the builder for updating WorkflowStepRun entities.
func (*WorkflowStepRunUpdate) ClearAgent ¶
func (_u *WorkflowStepRunUpdate) ClearAgent() *WorkflowStepRunUpdate
ClearAgent clears the value of the "agent" field.
func (*WorkflowStepRunUpdate) ClearCompletedAt ¶
func (_u *WorkflowStepRunUpdate) ClearCompletedAt() *WorkflowStepRunUpdate
ClearCompletedAt clears the value of the "completed_at" field.
func (*WorkflowStepRunUpdate) ClearErrorMessage ¶
func (_u *WorkflowStepRunUpdate) ClearErrorMessage() *WorkflowStepRunUpdate
ClearErrorMessage clears the value of the "error_message" field.
func (*WorkflowStepRunUpdate) ClearResult ¶
func (_u *WorkflowStepRunUpdate) ClearResult() *WorkflowStepRunUpdate
ClearResult clears the value of the "result" field.
func (*WorkflowStepRunUpdate) ClearStartedAt ¶
func (_u *WorkflowStepRunUpdate) ClearStartedAt() *WorkflowStepRunUpdate
ClearStartedAt clears the value of the "started_at" field.
func (*WorkflowStepRunUpdate) Exec ¶
func (_u *WorkflowStepRunUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowStepRunUpdate) ExecX ¶
func (_u *WorkflowStepRunUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStepRunUpdate) Mutation ¶
func (_u *WorkflowStepRunUpdate) Mutation() *WorkflowStepRunMutation
Mutation returns the WorkflowStepRunMutation object of the builder.
func (*WorkflowStepRunUpdate) Save ¶
func (_u *WorkflowStepRunUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkflowStepRunUpdate) SaveX ¶
func (_u *WorkflowStepRunUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkflowStepRunUpdate) SetAgent ¶
func (_u *WorkflowStepRunUpdate) SetAgent(v string) *WorkflowStepRunUpdate
SetAgent sets the "agent" field.
func (*WorkflowStepRunUpdate) SetCompletedAt ¶
func (_u *WorkflowStepRunUpdate) SetCompletedAt(v time.Time) *WorkflowStepRunUpdate
SetCompletedAt sets the "completed_at" field.
func (*WorkflowStepRunUpdate) SetErrorMessage ¶
func (_u *WorkflowStepRunUpdate) SetErrorMessage(v string) *WorkflowStepRunUpdate
SetErrorMessage sets the "error_message" field.
func (*WorkflowStepRunUpdate) SetNillableAgent ¶
func (_u *WorkflowStepRunUpdate) SetNillableAgent(v *string) *WorkflowStepRunUpdate
SetNillableAgent sets the "agent" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillableCompletedAt ¶
func (_u *WorkflowStepRunUpdate) SetNillableCompletedAt(v *time.Time) *WorkflowStepRunUpdate
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillableErrorMessage ¶
func (_u *WorkflowStepRunUpdate) SetNillableErrorMessage(v *string) *WorkflowStepRunUpdate
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillablePrompt ¶
func (_u *WorkflowStepRunUpdate) SetNillablePrompt(v *string) *WorkflowStepRunUpdate
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillableResult ¶
func (_u *WorkflowStepRunUpdate) SetNillableResult(v *string) *WorkflowStepRunUpdate
SetNillableResult sets the "result" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillableRunID ¶
func (_u *WorkflowStepRunUpdate) SetNillableRunID(v *uuid.UUID) *WorkflowStepRunUpdate
SetNillableRunID sets the "run_id" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillableStartedAt ¶
func (_u *WorkflowStepRunUpdate) SetNillableStartedAt(v *time.Time) *WorkflowStepRunUpdate
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillableStatus ¶
func (_u *WorkflowStepRunUpdate) SetNillableStatus(v *workflowsteprun.Status) *WorkflowStepRunUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetNillableStepID ¶
func (_u *WorkflowStepRunUpdate) SetNillableStepID(v *string) *WorkflowStepRunUpdate
SetNillableStepID sets the "step_id" field if the given value is not nil.
func (*WorkflowStepRunUpdate) SetPrompt ¶
func (_u *WorkflowStepRunUpdate) SetPrompt(v string) *WorkflowStepRunUpdate
SetPrompt sets the "prompt" field.
func (*WorkflowStepRunUpdate) SetResult ¶
func (_u *WorkflowStepRunUpdate) SetResult(v string) *WorkflowStepRunUpdate
SetResult sets the "result" field.
func (*WorkflowStepRunUpdate) SetRunID ¶
func (_u *WorkflowStepRunUpdate) SetRunID(v uuid.UUID) *WorkflowStepRunUpdate
SetRunID sets the "run_id" field.
func (*WorkflowStepRunUpdate) SetStartedAt ¶
func (_u *WorkflowStepRunUpdate) SetStartedAt(v time.Time) *WorkflowStepRunUpdate
SetStartedAt sets the "started_at" field.
func (*WorkflowStepRunUpdate) SetStatus ¶
func (_u *WorkflowStepRunUpdate) SetStatus(v workflowsteprun.Status) *WorkflowStepRunUpdate
SetStatus sets the "status" field.
func (*WorkflowStepRunUpdate) SetStepID ¶
func (_u *WorkflowStepRunUpdate) SetStepID(v string) *WorkflowStepRunUpdate
SetStepID sets the "step_id" field.
func (*WorkflowStepRunUpdate) Where ¶
func (_u *WorkflowStepRunUpdate) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunUpdate
Where appends a list predicates to the WorkflowStepRunUpdate builder.
type WorkflowStepRunUpdateOne ¶
type WorkflowStepRunUpdateOne struct {
// contains filtered or unexported fields
}
WorkflowStepRunUpdateOne is the builder for updating a single WorkflowStepRun entity.
func (*WorkflowStepRunUpdateOne) ClearAgent ¶
func (_u *WorkflowStepRunUpdateOne) ClearAgent() *WorkflowStepRunUpdateOne
ClearAgent clears the value of the "agent" field.
func (*WorkflowStepRunUpdateOne) ClearCompletedAt ¶
func (_u *WorkflowStepRunUpdateOne) ClearCompletedAt() *WorkflowStepRunUpdateOne
ClearCompletedAt clears the value of the "completed_at" field.
func (*WorkflowStepRunUpdateOne) ClearErrorMessage ¶
func (_u *WorkflowStepRunUpdateOne) ClearErrorMessage() *WorkflowStepRunUpdateOne
ClearErrorMessage clears the value of the "error_message" field.
func (*WorkflowStepRunUpdateOne) ClearResult ¶
func (_u *WorkflowStepRunUpdateOne) ClearResult() *WorkflowStepRunUpdateOne
ClearResult clears the value of the "result" field.
func (*WorkflowStepRunUpdateOne) ClearStartedAt ¶
func (_u *WorkflowStepRunUpdateOne) ClearStartedAt() *WorkflowStepRunUpdateOne
ClearStartedAt clears the value of the "started_at" field.
func (*WorkflowStepRunUpdateOne) Exec ¶
func (_u *WorkflowStepRunUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkflowStepRunUpdateOne) ExecX ¶
func (_u *WorkflowStepRunUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStepRunUpdateOne) Mutation ¶
func (_u *WorkflowStepRunUpdateOne) Mutation() *WorkflowStepRunMutation
Mutation returns the WorkflowStepRunMutation object of the builder.
func (*WorkflowStepRunUpdateOne) Save ¶
func (_u *WorkflowStepRunUpdateOne) Save(ctx context.Context) (*WorkflowStepRun, error)
Save executes the query and returns the updated WorkflowStepRun entity.
func (*WorkflowStepRunUpdateOne) SaveX ¶
func (_u *WorkflowStepRunUpdateOne) SaveX(ctx context.Context) *WorkflowStepRun
SaveX is like Save, but panics if an error occurs.
func (*WorkflowStepRunUpdateOne) Select ¶
func (_u *WorkflowStepRunUpdateOne) Select(field string, fields ...string) *WorkflowStepRunUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkflowStepRunUpdateOne) SetAgent ¶
func (_u *WorkflowStepRunUpdateOne) SetAgent(v string) *WorkflowStepRunUpdateOne
SetAgent sets the "agent" field.
func (*WorkflowStepRunUpdateOne) SetCompletedAt ¶
func (_u *WorkflowStepRunUpdateOne) SetCompletedAt(v time.Time) *WorkflowStepRunUpdateOne
SetCompletedAt sets the "completed_at" field.
func (*WorkflowStepRunUpdateOne) SetErrorMessage ¶
func (_u *WorkflowStepRunUpdateOne) SetErrorMessage(v string) *WorkflowStepRunUpdateOne
SetErrorMessage sets the "error_message" field.
func (*WorkflowStepRunUpdateOne) SetNillableAgent ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableAgent(v *string) *WorkflowStepRunUpdateOne
SetNillableAgent sets the "agent" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillableCompletedAt ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableCompletedAt(v *time.Time) *WorkflowStepRunUpdateOne
SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillableErrorMessage ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableErrorMessage(v *string) *WorkflowStepRunUpdateOne
SetNillableErrorMessage sets the "error_message" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillablePrompt ¶
func (_u *WorkflowStepRunUpdateOne) SetNillablePrompt(v *string) *WorkflowStepRunUpdateOne
SetNillablePrompt sets the "prompt" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillableResult ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableResult(v *string) *WorkflowStepRunUpdateOne
SetNillableResult sets the "result" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillableRunID ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableRunID(v *uuid.UUID) *WorkflowStepRunUpdateOne
SetNillableRunID sets the "run_id" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillableStartedAt ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableStartedAt(v *time.Time) *WorkflowStepRunUpdateOne
SetNillableStartedAt sets the "started_at" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillableStatus ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableStatus(v *workflowsteprun.Status) *WorkflowStepRunUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetNillableStepID ¶
func (_u *WorkflowStepRunUpdateOne) SetNillableStepID(v *string) *WorkflowStepRunUpdateOne
SetNillableStepID sets the "step_id" field if the given value is not nil.
func (*WorkflowStepRunUpdateOne) SetPrompt ¶
func (_u *WorkflowStepRunUpdateOne) SetPrompt(v string) *WorkflowStepRunUpdateOne
SetPrompt sets the "prompt" field.
func (*WorkflowStepRunUpdateOne) SetResult ¶
func (_u *WorkflowStepRunUpdateOne) SetResult(v string) *WorkflowStepRunUpdateOne
SetResult sets the "result" field.
func (*WorkflowStepRunUpdateOne) SetRunID ¶
func (_u *WorkflowStepRunUpdateOne) SetRunID(v uuid.UUID) *WorkflowStepRunUpdateOne
SetRunID sets the "run_id" field.
func (*WorkflowStepRunUpdateOne) SetStartedAt ¶
func (_u *WorkflowStepRunUpdateOne) SetStartedAt(v time.Time) *WorkflowStepRunUpdateOne
SetStartedAt sets the "started_at" field.
func (*WorkflowStepRunUpdateOne) SetStatus ¶
func (_u *WorkflowStepRunUpdateOne) SetStatus(v workflowsteprun.Status) *WorkflowStepRunUpdateOne
SetStatus sets the "status" field.
func (*WorkflowStepRunUpdateOne) SetStepID ¶
func (_u *WorkflowStepRunUpdateOne) SetStepID(v string) *WorkflowStepRunUpdateOne
SetStepID sets the "step_id" field.
func (*WorkflowStepRunUpdateOne) Where ¶
func (_u *WorkflowStepRunUpdateOne) Where(ps ...predicate.WorkflowStepRun) *WorkflowStepRunUpdateOne
Where appends a list predicates to the WorkflowStepRunUpdate builder.
type WorkflowStepRuns ¶
type WorkflowStepRuns []*WorkflowStepRun
WorkflowStepRuns is a parsable slice of WorkflowStepRun.
Source Files
¶
- auditlog.go
- auditlog_create.go
- auditlog_delete.go
- auditlog_query.go
- auditlog_update.go
- client.go
- configprofile.go
- configprofile_create.go
- configprofile_delete.go
- configprofile_query.go
- configprofile_update.go
- cronjob.go
- cronjob_create.go
- cronjob_delete.go
- cronjob_query.go
- cronjob_update.go
- cronjobhistory.go
- cronjobhistory_create.go
- cronjobhistory_delete.go
- cronjobhistory_query.go
- cronjobhistory_update.go
- ent.go
- escrowdeal.go
- escrowdeal_create.go
- escrowdeal_delete.go
- escrowdeal_query.go
- escrowdeal_update.go
- externalref.go
- externalref_create.go
- externalref_delete.go
- externalref_query.go
- externalref_update.go
- generate.go
- inquiry.go
- inquiry_create.go
- inquiry_delete.go
- inquiry_query.go
- inquiry_update.go
- key.go
- key_create.go
- key_delete.go
- key_query.go
- key_update.go
- knowledge.go
- knowledge_create.go
- knowledge_delete.go
- knowledge_query.go
- knowledge_update.go
- learning.go
- learning_create.go
- learning_delete.go
- learning_query.go
- learning_update.go
- message.go
- message_create.go
- message_delete.go
- message_query.go
- message_update.go
- mutation.go
- observation.go
- observation_create.go
- observation_delete.go
- observation_query.go
- observation_update.go
- paymenttx.go
- paymenttx_create.go
- paymenttx_delete.go
- paymenttx_query.go
- paymenttx_update.go
- peerreputation.go
- peerreputation_create.go
- peerreputation_delete.go
- peerreputation_query.go
- peerreputation_update.go
- reflection.go
- reflection_create.go
- reflection_delete.go
- reflection_query.go
- reflection_update.go
- runtime.go
- secret.go
- secret_create.go
- secret_delete.go
- secret_query.go
- secret_update.go
- session.go
- session_create.go
- session_delete.go
- session_query.go
- session_update.go
- tokenusage.go
- tokenusage_create.go
- tokenusage_delete.go
- tokenusage_query.go
- tokenusage_update.go
- tx.go
- workflowrun.go
- workflowrun_create.go
- workflowrun_delete.go
- workflowrun_query.go
- workflowrun_update.go
- workflowsteprun.go
- workflowsteprun_create.go
- workflowsteprun_delete.go
- workflowsteprun_query.go
- workflowsteprun_update.go