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 Certification
- type CertificationClient
- func (c *CertificationClient) Create() *CertificationCreate
- func (c *CertificationClient) CreateBulk(builders ...*CertificationCreate) *CertificationCreateBulk
- func (c *CertificationClient) Delete() *CertificationDelete
- func (c *CertificationClient) DeleteOne(ce *Certification) *CertificationDeleteOne
- func (c *CertificationClient) DeleteOneID(id uuid.UUID) *CertificationDeleteOne
- func (c *CertificationClient) Get(ctx context.Context, id uuid.UUID) (*Certification, error)
- func (c *CertificationClient) GetX(ctx context.Context, id uuid.UUID) *Certification
- func (c *CertificationClient) Hooks() []Hook
- func (c *CertificationClient) Intercept(interceptors ...Interceptor)
- func (c *CertificationClient) Interceptors() []Interceptor
- func (c *CertificationClient) MapCreateBulk(slice any, setFunc func(*CertificationCreate, int)) *CertificationCreateBulk
- func (c *CertificationClient) Query() *CertificationQuery
- func (c *CertificationClient) Update() *CertificationUpdate
- func (c *CertificationClient) UpdateOne(ce *Certification) *CertificationUpdateOne
- func (c *CertificationClient) UpdateOneID(id uuid.UUID) *CertificationUpdateOne
- func (c *CertificationClient) Use(hooks ...Hook)
- type CertificationCreate
- func (cc *CertificationCreate) Exec(ctx context.Context) error
- func (cc *CertificationCreate) ExecX(ctx context.Context)
- func (cc *CertificationCreate) Mutation() *CertificationMutation
- func (cc *CertificationCreate) Save(ctx context.Context) (*Certification, error)
- func (cc *CertificationCreate) SaveX(ctx context.Context) *Certification
- func (cc *CertificationCreate) SetAnchorID(i int) *CertificationCreate
- func (cc *CertificationCreate) SetDataID(s string) *CertificationCreate
- func (cc *CertificationCreate) SetHash(s string) *CertificationCreate
- func (cc *CertificationCreate) SetID(u uuid.UUID) *CertificationCreate
- func (cc *CertificationCreate) SetNillableID(u *uuid.UUID) *CertificationCreate
- type CertificationCreateBulk
- type CertificationDelete
- type CertificationDeleteOne
- type CertificationGroupBy
- func (cgb *CertificationGroupBy) Aggregate(fns ...AggregateFunc) *CertificationGroupBy
- func (s *CertificationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CertificationGroupBy) BoolX(ctx context.Context) bool
- func (s *CertificationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CertificationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CertificationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CertificationGroupBy) Float64X(ctx context.Context) float64
- func (s *CertificationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CertificationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CertificationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CertificationGroupBy) IntX(ctx context.Context) int
- func (s *CertificationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CertificationGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CertificationGroupBy) Scan(ctx context.Context, v any) error
- func (s *CertificationGroupBy) ScanX(ctx context.Context, v any)
- func (s *CertificationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CertificationGroupBy) StringX(ctx context.Context) string
- func (s *CertificationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CertificationGroupBy) StringsX(ctx context.Context) []string
- type CertificationMutation
- func (m *CertificationMutation) AddAnchorID(i int)
- func (m *CertificationMutation) AddField(name string, value ent.Value) error
- func (m *CertificationMutation) AddedAnchorID() (r int, exists bool)
- func (m *CertificationMutation) AddedEdges() []string
- func (m *CertificationMutation) AddedField(name string) (ent.Value, bool)
- func (m *CertificationMutation) AddedFields() []string
- func (m *CertificationMutation) AddedIDs(name string) []ent.Value
- func (m *CertificationMutation) AnchorID() (r int, exists bool)
- func (m *CertificationMutation) ClearEdge(name string) error
- func (m *CertificationMutation) ClearField(name string) error
- func (m *CertificationMutation) ClearedEdges() []string
- func (m *CertificationMutation) ClearedFields() []string
- func (m CertificationMutation) Client() *Client
- func (m *CertificationMutation) DataID() (r string, exists bool)
- func (m *CertificationMutation) EdgeCleared(name string) bool
- func (m *CertificationMutation) Field(name string) (ent.Value, bool)
- func (m *CertificationMutation) FieldCleared(name string) bool
- func (m *CertificationMutation) Fields() []string
- func (m *CertificationMutation) Hash() (r string, exists bool)
- func (m *CertificationMutation) ID() (id uuid.UUID, exists bool)
- func (m *CertificationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CertificationMutation) OldAnchorID(ctx context.Context) (v int, err error)
- func (m *CertificationMutation) OldDataID(ctx context.Context) (v string, err error)
- func (m *CertificationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CertificationMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *CertificationMutation) Op() Op
- func (m *CertificationMutation) RemovedEdges() []string
- func (m *CertificationMutation) RemovedIDs(name string) []ent.Value
- func (m *CertificationMutation) ResetAnchorID()
- func (m *CertificationMutation) ResetDataID()
- func (m *CertificationMutation) ResetEdge(name string) error
- func (m *CertificationMutation) ResetField(name string) error
- func (m *CertificationMutation) ResetHash()
- func (m *CertificationMutation) SetAnchorID(i int)
- func (m *CertificationMutation) SetDataID(s string)
- func (m *CertificationMutation) SetField(name string, value ent.Value) error
- func (m *CertificationMutation) SetHash(s string)
- func (m *CertificationMutation) SetID(id uuid.UUID)
- func (m *CertificationMutation) SetOp(op Op)
- func (m CertificationMutation) Tx() (*Tx, error)
- func (m *CertificationMutation) Type() string
- func (m *CertificationMutation) Where(ps ...predicate.Certification)
- func (m *CertificationMutation) WhereP(ps ...func(*sql.Selector))
- type CertificationQuery
- func (cq *CertificationQuery) Aggregate(fns ...AggregateFunc) *CertificationSelect
- func (cq *CertificationQuery) All(ctx context.Context) ([]*Certification, error)
- func (cq *CertificationQuery) AllX(ctx context.Context) []*Certification
- func (cq *CertificationQuery) Clone() *CertificationQuery
- func (cq *CertificationQuery) Count(ctx context.Context) (int, error)
- func (cq *CertificationQuery) CountX(ctx context.Context) int
- func (cq *CertificationQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CertificationQuery) ExistX(ctx context.Context) bool
- func (cq *CertificationQuery) First(ctx context.Context) (*Certification, error)
- func (cq *CertificationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CertificationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *CertificationQuery) FirstX(ctx context.Context) *Certification
- func (cq *CertificationQuery) GroupBy(field string, fields ...string) *CertificationGroupBy
- func (cq *CertificationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *CertificationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *CertificationQuery) Limit(limit int) *CertificationQuery
- func (cq *CertificationQuery) Offset(offset int) *CertificationQuery
- func (cq *CertificationQuery) Only(ctx context.Context) (*Certification, error)
- func (cq *CertificationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *CertificationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *CertificationQuery) OnlyX(ctx context.Context) *Certification
- func (cq *CertificationQuery) Order(o ...certification.OrderOption) *CertificationQuery
- func (cq *CertificationQuery) Select(fields ...string) *CertificationSelect
- func (cq *CertificationQuery) Unique(unique bool) *CertificationQuery
- func (cq *CertificationQuery) Where(ps ...predicate.Certification) *CertificationQuery
- type CertificationSelect
- func (cs *CertificationSelect) Aggregate(fns ...AggregateFunc) *CertificationSelect
- func (s *CertificationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CertificationSelect) BoolX(ctx context.Context) bool
- func (s *CertificationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CertificationSelect) BoolsX(ctx context.Context) []bool
- func (s *CertificationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CertificationSelect) Float64X(ctx context.Context) float64
- func (s *CertificationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CertificationSelect) Float64sX(ctx context.Context) []float64
- func (s *CertificationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CertificationSelect) IntX(ctx context.Context) int
- func (s *CertificationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CertificationSelect) IntsX(ctx context.Context) []int
- func (cs *CertificationSelect) Scan(ctx context.Context, v any) error
- func (s *CertificationSelect) ScanX(ctx context.Context, v any)
- func (s *CertificationSelect) String(ctx context.Context) (_ string, err error)
- func (s *CertificationSelect) StringX(ctx context.Context) string
- func (s *CertificationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CertificationSelect) StringsX(ctx context.Context) []string
- type CertificationUpdate
- func (cu *CertificationUpdate) AddAnchorID(i int) *CertificationUpdate
- func (cu *CertificationUpdate) Exec(ctx context.Context) error
- func (cu *CertificationUpdate) ExecX(ctx context.Context)
- func (cu *CertificationUpdate) Mutation() *CertificationMutation
- func (cu *CertificationUpdate) Save(ctx context.Context) (int, error)
- func (cu *CertificationUpdate) SaveX(ctx context.Context) int
- func (cu *CertificationUpdate) SetAnchorID(i int) *CertificationUpdate
- func (cu *CertificationUpdate) SetDataID(s string) *CertificationUpdate
- func (cu *CertificationUpdate) SetHash(s string) *CertificationUpdate
- func (cu *CertificationUpdate) Where(ps ...predicate.Certification) *CertificationUpdate
- type CertificationUpdateOne
- func (cuo *CertificationUpdateOne) AddAnchorID(i int) *CertificationUpdateOne
- func (cuo *CertificationUpdateOne) Exec(ctx context.Context) error
- func (cuo *CertificationUpdateOne) ExecX(ctx context.Context)
- func (cuo *CertificationUpdateOne) Mutation() *CertificationMutation
- func (cuo *CertificationUpdateOne) Save(ctx context.Context) (*Certification, error)
- func (cuo *CertificationUpdateOne) SaveX(ctx context.Context) *Certification
- func (cuo *CertificationUpdateOne) Select(field string, fields ...string) *CertificationUpdateOne
- func (cuo *CertificationUpdateOne) SetAnchorID(i int) *CertificationUpdateOne
- func (cuo *CertificationUpdateOne) SetDataID(s string) *CertificationUpdateOne
- func (cuo *CertificationUpdateOne) SetHash(s string) *CertificationUpdateOne
- func (cuo *CertificationUpdateOne) Where(ps ...predicate.Certification) *CertificationUpdateOne
- type Certifications
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type LocalKey
- type LocalKeyClient
- func (c *LocalKeyClient) Create() *LocalKeyCreate
- func (c *LocalKeyClient) CreateBulk(builders ...*LocalKeyCreate) *LocalKeyCreateBulk
- func (c *LocalKeyClient) Delete() *LocalKeyDelete
- func (c *LocalKeyClient) DeleteOne(lk *LocalKey) *LocalKeyDeleteOne
- func (c *LocalKeyClient) DeleteOneID(id uuid.UUID) *LocalKeyDeleteOne
- func (c *LocalKeyClient) Get(ctx context.Context, id uuid.UUID) (*LocalKey, error)
- func (c *LocalKeyClient) GetX(ctx context.Context, id uuid.UUID) *LocalKey
- func (c *LocalKeyClient) Hooks() []Hook
- func (c *LocalKeyClient) Intercept(interceptors ...Interceptor)
- func (c *LocalKeyClient) Interceptors() []Interceptor
- func (c *LocalKeyClient) MapCreateBulk(slice any, setFunc func(*LocalKeyCreate, int)) *LocalKeyCreateBulk
- func (c *LocalKeyClient) Query() *LocalKeyQuery
- func (c *LocalKeyClient) Update() *LocalKeyUpdate
- func (c *LocalKeyClient) UpdateOne(lk *LocalKey) *LocalKeyUpdateOne
- func (c *LocalKeyClient) UpdateOneID(id uuid.UUID) *LocalKeyUpdateOne
- func (c *LocalKeyClient) Use(hooks ...Hook)
- type LocalKeyCreate
- func (lkc *LocalKeyCreate) Exec(ctx context.Context) error
- func (lkc *LocalKeyCreate) ExecX(ctx context.Context)
- func (lkc *LocalKeyCreate) Mutation() *LocalKeyMutation
- func (lkc *LocalKeyCreate) Save(ctx context.Context) (*LocalKey, error)
- func (lkc *LocalKeyCreate) SaveX(ctx context.Context) *LocalKey
- func (lkc *LocalKeyCreate) SetID(u uuid.UUID) *LocalKeyCreate
- func (lkc *LocalKeyCreate) SetKeyType(s string) *LocalKeyCreate
- func (lkc *LocalKeyCreate) SetLocalKey(kk *key.LocalKey) *LocalKeyCreate
- func (lkc *LocalKeyCreate) SetNillableID(u *uuid.UUID) *LocalKeyCreate
- type LocalKeyCreateBulk
- type LocalKeyDelete
- type LocalKeyDeleteOne
- type LocalKeyGroupBy
- func (lkgb *LocalKeyGroupBy) Aggregate(fns ...AggregateFunc) *LocalKeyGroupBy
- func (s *LocalKeyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocalKeyGroupBy) BoolX(ctx context.Context) bool
- func (s *LocalKeyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LocalKeyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LocalKeyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocalKeyGroupBy) Float64X(ctx context.Context) float64
- func (s *LocalKeyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocalKeyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LocalKeyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LocalKeyGroupBy) IntX(ctx context.Context) int
- func (s *LocalKeyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LocalKeyGroupBy) IntsX(ctx context.Context) []int
- func (lkgb *LocalKeyGroupBy) Scan(ctx context.Context, v any) error
- func (s *LocalKeyGroupBy) ScanX(ctx context.Context, v any)
- func (s *LocalKeyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LocalKeyGroupBy) StringX(ctx context.Context) string
- func (s *LocalKeyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LocalKeyGroupBy) StringsX(ctx context.Context) []string
- type LocalKeyMutation
- func (m *LocalKeyMutation) AddField(name string, value ent.Value) error
- func (m *LocalKeyMutation) AddedEdges() []string
- func (m *LocalKeyMutation) AddedField(name string) (ent.Value, bool)
- func (m *LocalKeyMutation) AddedFields() []string
- func (m *LocalKeyMutation) AddedIDs(name string) []ent.Value
- func (m *LocalKeyMutation) ClearEdge(name string) error
- func (m *LocalKeyMutation) ClearField(name string) error
- func (m *LocalKeyMutation) ClearedEdges() []string
- func (m *LocalKeyMutation) ClearedFields() []string
- func (m LocalKeyMutation) Client() *Client
- func (m *LocalKeyMutation) EdgeCleared(name string) bool
- func (m *LocalKeyMutation) Field(name string) (ent.Value, bool)
- func (m *LocalKeyMutation) FieldCleared(name string) bool
- func (m *LocalKeyMutation) Fields() []string
- func (m *LocalKeyMutation) ID() (id uuid.UUID, exists bool)
- func (m *LocalKeyMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *LocalKeyMutation) KeyType() (r string, exists bool)
- func (m *LocalKeyMutation) LocalKey() (r *key.LocalKey, exists bool)
- func (m *LocalKeyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LocalKeyMutation) OldKeyType(ctx context.Context) (v string, err error)
- func (m *LocalKeyMutation) OldLocalKey(ctx context.Context) (v *key.LocalKey, err error)
- func (m *LocalKeyMutation) Op() Op
- func (m *LocalKeyMutation) RemovedEdges() []string
- func (m *LocalKeyMutation) RemovedIDs(name string) []ent.Value
- func (m *LocalKeyMutation) ResetEdge(name string) error
- func (m *LocalKeyMutation) ResetField(name string) error
- func (m *LocalKeyMutation) ResetKeyType()
- func (m *LocalKeyMutation) ResetLocalKey()
- func (m *LocalKeyMutation) SetField(name string, value ent.Value) error
- func (m *LocalKeyMutation) SetID(id uuid.UUID)
- func (m *LocalKeyMutation) SetKeyType(s string)
- func (m *LocalKeyMutation) SetLocalKey(kk *key.LocalKey)
- func (m *LocalKeyMutation) SetOp(op Op)
- func (m LocalKeyMutation) Tx() (*Tx, error)
- func (m *LocalKeyMutation) Type() string
- func (m *LocalKeyMutation) Where(ps ...predicate.LocalKey)
- func (m *LocalKeyMutation) WhereP(ps ...func(*sql.Selector))
- type LocalKeyQuery
- func (lkq *LocalKeyQuery) Aggregate(fns ...AggregateFunc) *LocalKeySelect
- func (lkq *LocalKeyQuery) All(ctx context.Context) ([]*LocalKey, error)
- func (lkq *LocalKeyQuery) AllX(ctx context.Context) []*LocalKey
- func (lkq *LocalKeyQuery) Clone() *LocalKeyQuery
- func (lkq *LocalKeyQuery) Count(ctx context.Context) (int, error)
- func (lkq *LocalKeyQuery) CountX(ctx context.Context) int
- func (lkq *LocalKeyQuery) Exist(ctx context.Context) (bool, error)
- func (lkq *LocalKeyQuery) ExistX(ctx context.Context) bool
- func (lkq *LocalKeyQuery) First(ctx context.Context) (*LocalKey, error)
- func (lkq *LocalKeyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (lkq *LocalKeyQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (lkq *LocalKeyQuery) FirstX(ctx context.Context) *LocalKey
- func (lkq *LocalKeyQuery) GroupBy(field string, fields ...string) *LocalKeyGroupBy
- func (lkq *LocalKeyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (lkq *LocalKeyQuery) IDsX(ctx context.Context) []uuid.UUID
- func (lkq *LocalKeyQuery) Limit(limit int) *LocalKeyQuery
- func (lkq *LocalKeyQuery) Offset(offset int) *LocalKeyQuery
- func (lkq *LocalKeyQuery) Only(ctx context.Context) (*LocalKey, error)
- func (lkq *LocalKeyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (lkq *LocalKeyQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (lkq *LocalKeyQuery) OnlyX(ctx context.Context) *LocalKey
- func (lkq *LocalKeyQuery) Order(o ...localkey.OrderOption) *LocalKeyQuery
- func (lkq *LocalKeyQuery) Select(fields ...string) *LocalKeySelect
- func (lkq *LocalKeyQuery) Unique(unique bool) *LocalKeyQuery
- func (lkq *LocalKeyQuery) Where(ps ...predicate.LocalKey) *LocalKeyQuery
- type LocalKeySelect
- func (lks *LocalKeySelect) Aggregate(fns ...AggregateFunc) *LocalKeySelect
- func (s *LocalKeySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LocalKeySelect) BoolX(ctx context.Context) bool
- func (s *LocalKeySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LocalKeySelect) BoolsX(ctx context.Context) []bool
- func (s *LocalKeySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LocalKeySelect) Float64X(ctx context.Context) float64
- func (s *LocalKeySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LocalKeySelect) Float64sX(ctx context.Context) []float64
- func (s *LocalKeySelect) Int(ctx context.Context) (_ int, err error)
- func (s *LocalKeySelect) IntX(ctx context.Context) int
- func (s *LocalKeySelect) Ints(ctx context.Context) ([]int, error)
- func (s *LocalKeySelect) IntsX(ctx context.Context) []int
- func (lks *LocalKeySelect) Scan(ctx context.Context, v any) error
- func (s *LocalKeySelect) ScanX(ctx context.Context, v any)
- func (s *LocalKeySelect) String(ctx context.Context) (_ string, err error)
- func (s *LocalKeySelect) StringX(ctx context.Context) string
- func (s *LocalKeySelect) Strings(ctx context.Context) ([]string, error)
- func (s *LocalKeySelect) StringsX(ctx context.Context) []string
- type LocalKeyUpdate
- func (lku *LocalKeyUpdate) Exec(ctx context.Context) error
- func (lku *LocalKeyUpdate) ExecX(ctx context.Context)
- func (lku *LocalKeyUpdate) Mutation() *LocalKeyMutation
- func (lku *LocalKeyUpdate) Save(ctx context.Context) (int, error)
- func (lku *LocalKeyUpdate) SaveX(ctx context.Context) int
- func (lku *LocalKeyUpdate) SetKeyType(s string) *LocalKeyUpdate
- func (lku *LocalKeyUpdate) SetLocalKey(kk *key.LocalKey) *LocalKeyUpdate
- func (lku *LocalKeyUpdate) Where(ps ...predicate.LocalKey) *LocalKeyUpdate
- type LocalKeyUpdateOne
- func (lkuo *LocalKeyUpdateOne) Exec(ctx context.Context) error
- func (lkuo *LocalKeyUpdateOne) ExecX(ctx context.Context)
- func (lkuo *LocalKeyUpdateOne) Mutation() *LocalKeyMutation
- func (lkuo *LocalKeyUpdateOne) Save(ctx context.Context) (*LocalKey, error)
- func (lkuo *LocalKeyUpdateOne) SaveX(ctx context.Context) *LocalKey
- func (lkuo *LocalKeyUpdateOne) Select(field string, fields ...string) *LocalKeyUpdateOne
- func (lkuo *LocalKeyUpdateOne) SetKeyType(s string) *LocalKeyUpdateOne
- func (lkuo *LocalKeyUpdateOne) SetLocalKey(kk *key.LocalKey) *LocalKeyUpdateOne
- func (lkuo *LocalKeyUpdateOne) Where(ps ...predicate.LocalKey) *LocalKeyUpdateOne
- type LocalKeys
- type Message
- type MessageClient
- func (c *MessageClient) Create() *MessageCreate
- func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
- func (c *MessageClient) Delete() *MessageDelete
- func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
- func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
- func (c *MessageClient) Get(ctx context.Context, id uuid.UUID) (*Message, error)
- func (c *MessageClient) GetX(ctx context.Context, id uuid.UUID) *Message
- func (c *MessageClient) Hooks() []Hook
- func (c *MessageClient) Intercept(interceptors ...Interceptor)
- func (c *MessageClient) Interceptors() []Interceptor
- func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
- func (c *MessageClient) Query() *MessageQuery
- func (c *MessageClient) Update() *MessageUpdate
- func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
- func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
- func (c *MessageClient) Use(hooks ...Hook)
- type MessageCreate
- func (mc *MessageCreate) Exec(ctx context.Context) error
- func (mc *MessageCreate) ExecX(ctx context.Context)
- func (mc *MessageCreate) Mutation() *MessageMutation
- func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
- func (mc *MessageCreate) SaveX(ctx context.Context) *Message
- func (mc *MessageCreate) SetAnchorID(i int) *MessageCreate
- func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetMessage(s string) *MessageCreate
- func (mc *MessageCreate) SetNillableAnchorID(i *int) *MessageCreate
- func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetNillableRoot(s *string) *MessageCreate
- func (mc *MessageCreate) SetProof(jm json.RawMessage) *MessageCreate
- func (mc *MessageCreate) SetRoot(s string) *MessageCreate
- type MessageCreateBulk
- type MessageDelete
- type MessageDeleteOne
- type MessageGroupBy
- func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
- func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageGroupBy) BoolX(ctx context.Context) bool
- func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageGroupBy) Float64X(ctx context.Context) float64
- func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MessageGroupBy) IntX(ctx context.Context) int
- func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MessageGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *MessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MessageGroupBy) StringX(ctx context.Context) string
- func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MessageGroupBy) StringsX(ctx context.Context) []string
- type MessageMutation
- func (m *MessageMutation) AddAnchorID(i int)
- func (m *MessageMutation) AddField(name string, value ent.Value) error
- func (m *MessageMutation) AddedAnchorID() (r int, exists bool)
- 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) AnchorID() (r int, exists bool)
- func (m *MessageMutation) AppendProof(jm json.RawMessage)
- func (m *MessageMutation) AppendedProof() (json.RawMessage, bool)
- func (m *MessageMutation) ClearEdge(name string) error
- func (m *MessageMutation) ClearField(name string) error
- func (m *MessageMutation) ClearProof()
- func (m *MessageMutation) ClearedEdges() []string
- func (m *MessageMutation) ClearedFields() []string
- func (m MessageMutation) Client() *Client
- 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 uuid.UUID, exists bool)
- func (m *MessageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *MessageMutation) Message() (r string, exists bool)
- func (m *MessageMutation) OldAnchorID(ctx context.Context) (v int, err error)
- func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MessageMutation) OldMessage(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldProof(ctx context.Context) (v json.RawMessage, err error)
- func (m *MessageMutation) OldRoot(ctx context.Context) (v string, err error)
- func (m *MessageMutation) Op() Op
- func (m *MessageMutation) Proof() (r json.RawMessage, exists bool)
- func (m *MessageMutation) ProofCleared() bool
- func (m *MessageMutation) RemovedEdges() []string
- func (m *MessageMutation) RemovedIDs(name string) []ent.Value
- func (m *MessageMutation) ResetAnchorID()
- func (m *MessageMutation) ResetEdge(name string) error
- func (m *MessageMutation) ResetField(name string) error
- func (m *MessageMutation) ResetMessage()
- func (m *MessageMutation) ResetProof()
- func (m *MessageMutation) ResetRoot()
- func (m *MessageMutation) Root() (r string, exists bool)
- func (m *MessageMutation) SetAnchorID(i int)
- func (m *MessageMutation) SetField(name string, value ent.Value) error
- func (m *MessageMutation) SetID(id uuid.UUID)
- func (m *MessageMutation) SetMessage(s string)
- func (m *MessageMutation) SetOp(op Op)
- func (m *MessageMutation) SetProof(jm json.RawMessage)
- func (m *MessageMutation) SetRoot(s string)
- 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 (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
- func (mq *MessageQuery) AllX(ctx context.Context) []*Message
- func (mq *MessageQuery) Clone() *MessageQuery
- func (mq *MessageQuery) Count(ctx context.Context) (int, error)
- func (mq *MessageQuery) CountX(ctx context.Context) int
- func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MessageQuery) ExistX(ctx context.Context) bool
- func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) FirstX(ctx context.Context) *Message
- func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
- func (mq *MessageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (mq *MessageQuery) Limit(limit int) *MessageQuery
- func (mq *MessageQuery) Offset(offset int) *MessageQuery
- func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
- func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
- func (mq *MessageQuery) Select(fields ...string) *MessageSelect
- func (mq *MessageQuery) Unique(unique bool) *MessageQuery
- func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
- type MessageSelect
- func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageSelect) BoolX(ctx context.Context) bool
- func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageSelect) BoolsX(ctx context.Context) []bool
- func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageSelect) Float64X(ctx context.Context) float64
- func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageSelect) Float64sX(ctx context.Context) []float64
- func (s *MessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MessageSelect) IntX(ctx context.Context) int
- func (s *MessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MessageSelect) IntsX(ctx context.Context) []int
- func (ms *MessageSelect) Scan(ctx context.Context, v any) error
- func (s *MessageSelect) ScanX(ctx context.Context, v any)
- func (s *MessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *MessageSelect) StringX(ctx context.Context) string
- func (s *MessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MessageSelect) StringsX(ctx context.Context) []string
- type MessageUpdate
- func (mu *MessageUpdate) AddAnchorID(i int) *MessageUpdate
- func (mu *MessageUpdate) AppendProof(jm json.RawMessage) *MessageUpdate
- func (mu *MessageUpdate) ClearProof() *MessageUpdate
- func (mu *MessageUpdate) Exec(ctx context.Context) error
- func (mu *MessageUpdate) ExecX(ctx context.Context)
- func (mu *MessageUpdate) Mutation() *MessageMutation
- func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
- func (mu *MessageUpdate) SaveX(ctx context.Context) int
- func (mu *MessageUpdate) SetAnchorID(i int) *MessageUpdate
- func (mu *MessageUpdate) SetMessage(s string) *MessageUpdate
- func (mu *MessageUpdate) SetNillableAnchorID(i *int) *MessageUpdate
- func (mu *MessageUpdate) SetNillableRoot(s *string) *MessageUpdate
- func (mu *MessageUpdate) SetProof(jm json.RawMessage) *MessageUpdate
- func (mu *MessageUpdate) SetRoot(s string) *MessageUpdate
- func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
- type MessageUpdateOne
- func (muo *MessageUpdateOne) AddAnchorID(i int) *MessageUpdateOne
- func (muo *MessageUpdateOne) AppendProof(jm json.RawMessage) *MessageUpdateOne
- func (muo *MessageUpdateOne) ClearProof() *MessageUpdateOne
- func (muo *MessageUpdateOne) Exec(ctx context.Context) error
- func (muo *MessageUpdateOne) ExecX(ctx context.Context)
- func (muo *MessageUpdateOne) Mutation() *MessageMutation
- func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
- func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
- func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetAnchorID(i int) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetMessage(s string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableAnchorID(i *int) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableRoot(s *string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetProof(jm json.RawMessage) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetRoot(s string) *MessageUpdateOne
- func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
- type Messages
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Process
- type ProcessClient
- func (c *ProcessClient) Create() *ProcessCreate
- func (c *ProcessClient) CreateBulk(builders ...*ProcessCreate) *ProcessCreateBulk
- func (c *ProcessClient) Delete() *ProcessDelete
- func (c *ProcessClient) DeleteOne(pr *Process) *ProcessDeleteOne
- func (c *ProcessClient) DeleteOneID(id uuid.UUID) *ProcessDeleteOne
- func (c *ProcessClient) Get(ctx context.Context, id uuid.UUID) (*Process, error)
- func (c *ProcessClient) GetX(ctx context.Context, id uuid.UUID) *Process
- func (c *ProcessClient) Hooks() []Hook
- func (c *ProcessClient) Intercept(interceptors ...Interceptor)
- func (c *ProcessClient) Interceptors() []Interceptor
- func (c *ProcessClient) MapCreateBulk(slice any, setFunc func(*ProcessCreate, int)) *ProcessCreateBulk
- func (c *ProcessClient) Query() *ProcessQuery
- func (c *ProcessClient) Update() *ProcessUpdate
- func (c *ProcessClient) UpdateOne(pr *Process) *ProcessUpdateOne
- func (c *ProcessClient) UpdateOneID(id uuid.UUID) *ProcessUpdateOne
- func (c *ProcessClient) Use(hooks ...Hook)
- type ProcessCreate
- func (pc *ProcessCreate) Exec(ctx context.Context) error
- func (pc *ProcessCreate) ExecX(ctx context.Context)
- func (pc *ProcessCreate) Mutation() *ProcessMutation
- func (pc *ProcessCreate) Save(ctx context.Context) (*Process, error)
- func (pc *ProcessCreate) SaveX(ctx context.Context) *Process
- func (pc *ProcessCreate) SetAnchorID(i int) *ProcessCreate
- func (pc *ProcessCreate) SetCreatedAt(t time.Time) *ProcessCreate
- func (pc *ProcessCreate) SetFilename(s string) *ProcessCreate
- func (pc *ProcessCreate) SetHash(s string) *ProcessCreate
- func (pc *ProcessCreate) SetID(u uuid.UUID) *ProcessCreate
- func (pc *ProcessCreate) SetIsAggregated(b bool) *ProcessCreate
- func (pc *ProcessCreate) SetNillableAnchorID(i *int) *ProcessCreate
- func (pc *ProcessCreate) SetNillableCreatedAt(t *time.Time) *ProcessCreate
- func (pc *ProcessCreate) SetNillableID(u *uuid.UUID) *ProcessCreate
- func (pc *ProcessCreate) SetNillableIsAggregated(b *bool) *ProcessCreate
- func (pc *ProcessCreate) SetNillableStatus(b *bool) *ProcessCreate
- func (pc *ProcessCreate) SetProcessResponse(jm json.RawMessage) *ProcessCreate
- func (pc *ProcessCreate) SetStatus(b bool) *ProcessCreate
- type ProcessCreateBulk
- type ProcessDelete
- type ProcessDeleteOne
- type ProcessGroupBy
- func (pgb *ProcessGroupBy) Aggregate(fns ...AggregateFunc) *ProcessGroupBy
- func (s *ProcessGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProcessGroupBy) BoolX(ctx context.Context) bool
- func (s *ProcessGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProcessGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProcessGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProcessGroupBy) Float64X(ctx context.Context) float64
- func (s *ProcessGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProcessGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProcessGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProcessGroupBy) IntX(ctx context.Context) int
- func (s *ProcessGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProcessGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProcessGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProcessGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProcessGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProcessGroupBy) StringX(ctx context.Context) string
- func (s *ProcessGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProcessGroupBy) StringsX(ctx context.Context) []string
- type ProcessMutation
- func (m *ProcessMutation) AddAnchorID(i int)
- func (m *ProcessMutation) AddField(name string, value ent.Value) error
- func (m *ProcessMutation) AddedAnchorID() (r int, exists bool)
- func (m *ProcessMutation) AddedEdges() []string
- func (m *ProcessMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProcessMutation) AddedFields() []string
- func (m *ProcessMutation) AddedIDs(name string) []ent.Value
- func (m *ProcessMutation) AnchorID() (r int, exists bool)
- func (m *ProcessMutation) AnchorIDCleared() bool
- func (m *ProcessMutation) AppendProcessResponse(jm json.RawMessage)
- func (m *ProcessMutation) AppendedProcessResponse() (json.RawMessage, bool)
- func (m *ProcessMutation) ClearAnchorID()
- func (m *ProcessMutation) ClearEdge(name string) error
- func (m *ProcessMutation) ClearField(name string) error
- func (m *ProcessMutation) ClearProcessResponse()
- func (m *ProcessMutation) ClearedEdges() []string
- func (m *ProcessMutation) ClearedFields() []string
- func (m ProcessMutation) Client() *Client
- func (m *ProcessMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProcessMutation) EdgeCleared(name string) bool
- func (m *ProcessMutation) Field(name string) (ent.Value, bool)
- func (m *ProcessMutation) FieldCleared(name string) bool
- func (m *ProcessMutation) Fields() []string
- func (m *ProcessMutation) Filename() (r string, exists bool)
- func (m *ProcessMutation) Hash() (r string, exists bool)
- func (m *ProcessMutation) ID() (id uuid.UUID, exists bool)
- func (m *ProcessMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ProcessMutation) IsAggregated() (r bool, exists bool)
- func (m *ProcessMutation) OldAnchorID(ctx context.Context) (v int, err error)
- func (m *ProcessMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProcessMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProcessMutation) OldFilename(ctx context.Context) (v string, err error)
- func (m *ProcessMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *ProcessMutation) OldIsAggregated(ctx context.Context) (v bool, err error)
- func (m *ProcessMutation) OldProcessResponse(ctx context.Context) (v json.RawMessage, err error)
- func (m *ProcessMutation) OldStatus(ctx context.Context) (v bool, err error)
- func (m *ProcessMutation) Op() Op
- func (m *ProcessMutation) ProcessResponse() (r json.RawMessage, exists bool)
- func (m *ProcessMutation) ProcessResponseCleared() bool
- func (m *ProcessMutation) RemovedEdges() []string
- func (m *ProcessMutation) RemovedIDs(name string) []ent.Value
- func (m *ProcessMutation) ResetAnchorID()
- func (m *ProcessMutation) ResetCreatedAt()
- func (m *ProcessMutation) ResetEdge(name string) error
- func (m *ProcessMutation) ResetField(name string) error
- func (m *ProcessMutation) ResetFilename()
- func (m *ProcessMutation) ResetHash()
- func (m *ProcessMutation) ResetIsAggregated()
- func (m *ProcessMutation) ResetProcessResponse()
- func (m *ProcessMutation) ResetStatus()
- func (m *ProcessMutation) SetAnchorID(i int)
- func (m *ProcessMutation) SetCreatedAt(t time.Time)
- func (m *ProcessMutation) SetField(name string, value ent.Value) error
- func (m *ProcessMutation) SetFilename(s string)
- func (m *ProcessMutation) SetHash(s string)
- func (m *ProcessMutation) SetID(id uuid.UUID)
- func (m *ProcessMutation) SetIsAggregated(b bool)
- func (m *ProcessMutation) SetOp(op Op)
- func (m *ProcessMutation) SetProcessResponse(jm json.RawMessage)
- func (m *ProcessMutation) SetStatus(b bool)
- func (m *ProcessMutation) Status() (r bool, exists bool)
- func (m ProcessMutation) Tx() (*Tx, error)
- func (m *ProcessMutation) Type() string
- func (m *ProcessMutation) Where(ps ...predicate.Process)
- func (m *ProcessMutation) WhereP(ps ...func(*sql.Selector))
- type ProcessQuery
- func (pq *ProcessQuery) Aggregate(fns ...AggregateFunc) *ProcessSelect
- func (pq *ProcessQuery) All(ctx context.Context) ([]*Process, error)
- func (pq *ProcessQuery) AllX(ctx context.Context) []*Process
- func (pq *ProcessQuery) Clone() *ProcessQuery
- func (pq *ProcessQuery) Count(ctx context.Context) (int, error)
- func (pq *ProcessQuery) CountX(ctx context.Context) int
- func (pq *ProcessQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProcessQuery) ExistX(ctx context.Context) bool
- func (pq *ProcessQuery) First(ctx context.Context) (*Process, error)
- func (pq *ProcessQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProcessQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *ProcessQuery) FirstX(ctx context.Context) *Process
- func (pq *ProcessQuery) GroupBy(field string, fields ...string) *ProcessGroupBy
- func (pq *ProcessQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pq *ProcessQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *ProcessQuery) Limit(limit int) *ProcessQuery
- func (pq *ProcessQuery) Offset(offset int) *ProcessQuery
- func (pq *ProcessQuery) Only(ctx context.Context) (*Process, error)
- func (pq *ProcessQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProcessQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *ProcessQuery) OnlyX(ctx context.Context) *Process
- func (pq *ProcessQuery) Order(o ...process.OrderOption) *ProcessQuery
- func (pq *ProcessQuery) Select(fields ...string) *ProcessSelect
- func (pq *ProcessQuery) Unique(unique bool) *ProcessQuery
- func (pq *ProcessQuery) Where(ps ...predicate.Process) *ProcessQuery
- type ProcessSelect
- func (ps *ProcessSelect) Aggregate(fns ...AggregateFunc) *ProcessSelect
- func (s *ProcessSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProcessSelect) BoolX(ctx context.Context) bool
- func (s *ProcessSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProcessSelect) BoolsX(ctx context.Context) []bool
- func (s *ProcessSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProcessSelect) Float64X(ctx context.Context) float64
- func (s *ProcessSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProcessSelect) Float64sX(ctx context.Context) []float64
- func (s *ProcessSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProcessSelect) IntX(ctx context.Context) int
- func (s *ProcessSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProcessSelect) IntsX(ctx context.Context) []int
- func (ps *ProcessSelect) Scan(ctx context.Context, v any) error
- func (s *ProcessSelect) ScanX(ctx context.Context, v any)
- func (s *ProcessSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProcessSelect) StringX(ctx context.Context) string
- func (s *ProcessSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProcessSelect) StringsX(ctx context.Context) []string
- type ProcessUpdate
- func (pu *ProcessUpdate) AddAnchorID(i int) *ProcessUpdate
- func (pu *ProcessUpdate) AppendProcessResponse(jm json.RawMessage) *ProcessUpdate
- func (pu *ProcessUpdate) ClearAnchorID() *ProcessUpdate
- func (pu *ProcessUpdate) ClearProcessResponse() *ProcessUpdate
- func (pu *ProcessUpdate) Exec(ctx context.Context) error
- func (pu *ProcessUpdate) ExecX(ctx context.Context)
- func (pu *ProcessUpdate) Mutation() *ProcessMutation
- func (pu *ProcessUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProcessUpdate) SaveX(ctx context.Context) int
- func (pu *ProcessUpdate) SetAnchorID(i int) *ProcessUpdate
- func (pu *ProcessUpdate) SetCreatedAt(t time.Time) *ProcessUpdate
- func (pu *ProcessUpdate) SetFilename(s string) *ProcessUpdate
- func (pu *ProcessUpdate) SetHash(s string) *ProcessUpdate
- func (pu *ProcessUpdate) SetIsAggregated(b bool) *ProcessUpdate
- func (pu *ProcessUpdate) SetNillableAnchorID(i *int) *ProcessUpdate
- func (pu *ProcessUpdate) SetNillableCreatedAt(t *time.Time) *ProcessUpdate
- func (pu *ProcessUpdate) SetNillableIsAggregated(b *bool) *ProcessUpdate
- func (pu *ProcessUpdate) SetNillableStatus(b *bool) *ProcessUpdate
- func (pu *ProcessUpdate) SetProcessResponse(jm json.RawMessage) *ProcessUpdate
- func (pu *ProcessUpdate) SetStatus(b bool) *ProcessUpdate
- func (pu *ProcessUpdate) Where(ps ...predicate.Process) *ProcessUpdate
- type ProcessUpdateOne
- func (puo *ProcessUpdateOne) AddAnchorID(i int) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) AppendProcessResponse(jm json.RawMessage) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) ClearAnchorID() *ProcessUpdateOne
- func (puo *ProcessUpdateOne) ClearProcessResponse() *ProcessUpdateOne
- func (puo *ProcessUpdateOne) Exec(ctx context.Context) error
- func (puo *ProcessUpdateOne) ExecX(ctx context.Context)
- func (puo *ProcessUpdateOne) Mutation() *ProcessMutation
- func (puo *ProcessUpdateOne) Save(ctx context.Context) (*Process, error)
- func (puo *ProcessUpdateOne) SaveX(ctx context.Context) *Process
- func (puo *ProcessUpdateOne) Select(field string, fields ...string) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetAnchorID(i int) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetCreatedAt(t time.Time) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetFilename(s string) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetHash(s string) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetIsAggregated(b bool) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetNillableAnchorID(i *int) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetNillableCreatedAt(t *time.Time) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetNillableIsAggregated(b *bool) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetNillableStatus(b *bool) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetProcessResponse(jm json.RawMessage) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) SetStatus(b bool) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) Where(ps ...predicate.Process) *ProcessUpdateOne
- type Processes
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCertification = "Certification" TypeLocalKey = "LocalKey" TypeMessage = "Message" TypeProcess = "Process" )
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 Certification ¶
type Certification struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // AnchorID holds the value of the "anchor_id" field. AnchorID int `json:"anchor_id,omitempty"` // Hash holds the value of the "hash" field. Hash string `json:"hash,omitempty"` // DataID holds the value of the "data_id" field. DataID string `json:"data_id,omitempty"` // contains filtered or unexported fields }
Certification is the model entity for the Certification schema.
func (*Certification) String ¶
func (c *Certification) String() string
String implements the fmt.Stringer.
func (*Certification) Unwrap ¶
func (c *Certification) Unwrap() *Certification
Unwrap unwraps the Certification 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 (*Certification) Update ¶
func (c *Certification) Update() *CertificationUpdateOne
Update returns a builder for updating this Certification. Note that you need to call Certification.Unwrap() before calling this method if this Certification was returned from a transaction, and the transaction was committed or rolled back.
type CertificationClient ¶
type CertificationClient struct {
// contains filtered or unexported fields
}
CertificationClient is a client for the Certification schema.
func NewCertificationClient ¶
func NewCertificationClient(c config) *CertificationClient
NewCertificationClient returns a client for the Certification from the given config.
func (*CertificationClient) Create ¶
func (c *CertificationClient) Create() *CertificationCreate
Create returns a builder for creating a Certification entity.
func (*CertificationClient) CreateBulk ¶
func (c *CertificationClient) CreateBulk(builders ...*CertificationCreate) *CertificationCreateBulk
CreateBulk returns a builder for creating a bulk of Certification entities.
func (*CertificationClient) Delete ¶
func (c *CertificationClient) Delete() *CertificationDelete
Delete returns a delete builder for Certification.
func (*CertificationClient) DeleteOne ¶
func (c *CertificationClient) DeleteOne(ce *Certification) *CertificationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CertificationClient) DeleteOneID ¶
func (c *CertificationClient) DeleteOneID(id uuid.UUID) *CertificationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CertificationClient) Get ¶
func (c *CertificationClient) Get(ctx context.Context, id uuid.UUID) (*Certification, error)
Get returns a Certification entity by its id.
func (*CertificationClient) GetX ¶
func (c *CertificationClient) GetX(ctx context.Context, id uuid.UUID) *Certification
GetX is like Get, but panics if an error occurs.
func (*CertificationClient) Hooks ¶
func (c *CertificationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CertificationClient) Intercept ¶
func (c *CertificationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `certification.Intercept(f(g(h())))`.
func (*CertificationClient) Interceptors ¶
func (c *CertificationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CertificationClient) MapCreateBulk ¶
func (c *CertificationClient) MapCreateBulk(slice any, setFunc func(*CertificationCreate, int)) *CertificationCreateBulk
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 (*CertificationClient) Query ¶
func (c *CertificationClient) Query() *CertificationQuery
Query returns a query builder for Certification.
func (*CertificationClient) Update ¶
func (c *CertificationClient) Update() *CertificationUpdate
Update returns an update builder for Certification.
func (*CertificationClient) UpdateOne ¶
func (c *CertificationClient) UpdateOne(ce *Certification) *CertificationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CertificationClient) UpdateOneID ¶
func (c *CertificationClient) UpdateOneID(id uuid.UUID) *CertificationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CertificationClient) Use ¶
func (c *CertificationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `certification.Hooks(f(g(h())))`.
type CertificationCreate ¶
type CertificationCreate struct {
// contains filtered or unexported fields
}
CertificationCreate is the builder for creating a Certification entity.
func (*CertificationCreate) Exec ¶
func (cc *CertificationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CertificationCreate) ExecX ¶
func (cc *CertificationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CertificationCreate) Mutation ¶
func (cc *CertificationCreate) Mutation() *CertificationMutation
Mutation returns the CertificationMutation object of the builder.
func (*CertificationCreate) Save ¶
func (cc *CertificationCreate) Save(ctx context.Context) (*Certification, error)
Save creates the Certification in the database.
func (*CertificationCreate) SaveX ¶
func (cc *CertificationCreate) SaveX(ctx context.Context) *Certification
SaveX calls Save and panics if Save returns an error.
func (*CertificationCreate) SetAnchorID ¶
func (cc *CertificationCreate) SetAnchorID(i int) *CertificationCreate
SetAnchorID sets the "anchor_id" field.
func (*CertificationCreate) SetDataID ¶
func (cc *CertificationCreate) SetDataID(s string) *CertificationCreate
SetDataID sets the "data_id" field.
func (*CertificationCreate) SetHash ¶
func (cc *CertificationCreate) SetHash(s string) *CertificationCreate
SetHash sets the "hash" field.
func (*CertificationCreate) SetID ¶
func (cc *CertificationCreate) SetID(u uuid.UUID) *CertificationCreate
SetID sets the "id" field.
func (*CertificationCreate) SetNillableID ¶
func (cc *CertificationCreate) SetNillableID(u *uuid.UUID) *CertificationCreate
SetNillableID sets the "id" field if the given value is not nil.
type CertificationCreateBulk ¶
type CertificationCreateBulk struct {
// contains filtered or unexported fields
}
CertificationCreateBulk is the builder for creating many Certification entities in bulk.
func (*CertificationCreateBulk) Exec ¶
func (ccb *CertificationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CertificationCreateBulk) ExecX ¶
func (ccb *CertificationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CertificationCreateBulk) Save ¶
func (ccb *CertificationCreateBulk) Save(ctx context.Context) ([]*Certification, error)
Save creates the Certification entities in the database.
func (*CertificationCreateBulk) SaveX ¶
func (ccb *CertificationCreateBulk) SaveX(ctx context.Context) []*Certification
SaveX is like Save, but panics if an error occurs.
type CertificationDelete ¶
type CertificationDelete struct {
// contains filtered or unexported fields
}
CertificationDelete is the builder for deleting a Certification entity.
func (*CertificationDelete) Exec ¶
func (cd *CertificationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CertificationDelete) ExecX ¶
func (cd *CertificationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CertificationDelete) Where ¶
func (cd *CertificationDelete) Where(ps ...predicate.Certification) *CertificationDelete
Where appends a list predicates to the CertificationDelete builder.
type CertificationDeleteOne ¶
type CertificationDeleteOne struct {
// contains filtered or unexported fields
}
CertificationDeleteOne is the builder for deleting a single Certification entity.
func (*CertificationDeleteOne) Exec ¶
func (cdo *CertificationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CertificationDeleteOne) ExecX ¶
func (cdo *CertificationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CertificationDeleteOne) Where ¶
func (cdo *CertificationDeleteOne) Where(ps ...predicate.Certification) *CertificationDeleteOne
Where appends a list predicates to the CertificationDelete builder.
type CertificationGroupBy ¶
type CertificationGroupBy struct {
// contains filtered or unexported fields
}
CertificationGroupBy is the group-by builder for Certification entities.
func (*CertificationGroupBy) Aggregate ¶
func (cgb *CertificationGroupBy) Aggregate(fns ...AggregateFunc) *CertificationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CertificationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CertificationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CertificationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CertificationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CertificationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CertificationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CertificationGroupBy) Scan ¶
func (cgb *CertificationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CertificationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CertificationMutation ¶
type CertificationMutation struct {
// contains filtered or unexported fields
}
CertificationMutation represents an operation that mutates the Certification nodes in the graph.
func (*CertificationMutation) AddAnchorID ¶
func (m *CertificationMutation) AddAnchorID(i int)
AddAnchorID adds i to the "anchor_id" field.
func (*CertificationMutation) AddField ¶
func (m *CertificationMutation) 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 (*CertificationMutation) AddedAnchorID ¶
func (m *CertificationMutation) AddedAnchorID() (r int, exists bool)
AddedAnchorID returns the value that was added to the "anchor_id" field in this mutation.
func (*CertificationMutation) AddedEdges ¶
func (m *CertificationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CertificationMutation) AddedField ¶
func (m *CertificationMutation) 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 (*CertificationMutation) AddedFields ¶
func (m *CertificationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CertificationMutation) AddedIDs ¶
func (m *CertificationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CertificationMutation) AnchorID ¶
func (m *CertificationMutation) AnchorID() (r int, exists bool)
AnchorID returns the value of the "anchor_id" field in the mutation.
func (*CertificationMutation) ClearEdge ¶
func (m *CertificationMutation) 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 (*CertificationMutation) ClearField ¶
func (m *CertificationMutation) 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 (*CertificationMutation) ClearedEdges ¶
func (m *CertificationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CertificationMutation) ClearedFields ¶
func (m *CertificationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CertificationMutation) Client ¶
func (m CertificationMutation) 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 (*CertificationMutation) DataID ¶
func (m *CertificationMutation) DataID() (r string, exists bool)
DataID returns the value of the "data_id" field in the mutation.
func (*CertificationMutation) EdgeCleared ¶
func (m *CertificationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CertificationMutation) Field ¶
func (m *CertificationMutation) 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 (*CertificationMutation) FieldCleared ¶
func (m *CertificationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CertificationMutation) Fields ¶
func (m *CertificationMutation) 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 (*CertificationMutation) Hash ¶
func (m *CertificationMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*CertificationMutation) ID ¶
func (m *CertificationMutation) 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 (*CertificationMutation) 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 (*CertificationMutation) OldAnchorID ¶
func (m *CertificationMutation) OldAnchorID(ctx context.Context) (v int, err error)
OldAnchorID returns the old "anchor_id" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CertificationMutation) OldDataID ¶
func (m *CertificationMutation) OldDataID(ctx context.Context) (v string, err error)
OldDataID returns the old "data_id" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CertificationMutation) 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 (*CertificationMutation) OldHash ¶
func (m *CertificationMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the Certification entity. If the Certification object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CertificationMutation) Op ¶
func (m *CertificationMutation) Op() Op
Op returns the operation name.
func (*CertificationMutation) RemovedEdges ¶
func (m *CertificationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CertificationMutation) RemovedIDs ¶
func (m *CertificationMutation) 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 (*CertificationMutation) ResetAnchorID ¶
func (m *CertificationMutation) ResetAnchorID()
ResetAnchorID resets all changes to the "anchor_id" field.
func (*CertificationMutation) ResetDataID ¶
func (m *CertificationMutation) ResetDataID()
ResetDataID resets all changes to the "data_id" field.
func (*CertificationMutation) ResetEdge ¶
func (m *CertificationMutation) 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 (*CertificationMutation) ResetField ¶
func (m *CertificationMutation) 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 (*CertificationMutation) ResetHash ¶
func (m *CertificationMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*CertificationMutation) SetAnchorID ¶
func (m *CertificationMutation) SetAnchorID(i int)
SetAnchorID sets the "anchor_id" field.
func (*CertificationMutation) SetDataID ¶
func (m *CertificationMutation) SetDataID(s string)
SetDataID sets the "data_id" field.
func (*CertificationMutation) SetField ¶
func (m *CertificationMutation) 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 (*CertificationMutation) SetHash ¶
func (m *CertificationMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*CertificationMutation) SetID ¶
func (m *CertificationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Certification entities.
func (*CertificationMutation) SetOp ¶
func (m *CertificationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (CertificationMutation) Tx ¶
func (m CertificationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CertificationMutation) Type ¶
func (m *CertificationMutation) Type() string
Type returns the node type of this mutation (Certification).
func (*CertificationMutation) Where ¶
func (m *CertificationMutation) Where(ps ...predicate.Certification)
Where appends a list predicates to the CertificationMutation builder.
func (*CertificationMutation) WhereP ¶
func (m *CertificationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CertificationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CertificationQuery ¶
type CertificationQuery struct {
// contains filtered or unexported fields
}
CertificationQuery is the builder for querying Certification entities.
func (*CertificationQuery) Aggregate ¶
func (cq *CertificationQuery) Aggregate(fns ...AggregateFunc) *CertificationSelect
Aggregate returns a CertificationSelect configured with the given aggregations.
func (*CertificationQuery) All ¶
func (cq *CertificationQuery) All(ctx context.Context) ([]*Certification, error)
All executes the query and returns a list of Certifications.
func (*CertificationQuery) AllX ¶
func (cq *CertificationQuery) AllX(ctx context.Context) []*Certification
AllX is like All, but panics if an error occurs.
func (*CertificationQuery) Clone ¶
func (cq *CertificationQuery) Clone() *CertificationQuery
Clone returns a duplicate of the CertificationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CertificationQuery) Count ¶
func (cq *CertificationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CertificationQuery) CountX ¶
func (cq *CertificationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CertificationQuery) Exist ¶
func (cq *CertificationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CertificationQuery) ExistX ¶
func (cq *CertificationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CertificationQuery) First ¶
func (cq *CertificationQuery) First(ctx context.Context) (*Certification, error)
First returns the first Certification entity from the query. Returns a *NotFoundError when no Certification was found.
func (*CertificationQuery) FirstID ¶
FirstID returns the first Certification ID from the query. Returns a *NotFoundError when no Certification ID was found.
func (*CertificationQuery) FirstIDX ¶
func (cq *CertificationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CertificationQuery) FirstX ¶
func (cq *CertificationQuery) FirstX(ctx context.Context) *Certification
FirstX is like First, but panics if an error occurs.
func (*CertificationQuery) GroupBy ¶
func (cq *CertificationQuery) GroupBy(field string, fields ...string) *CertificationGroupBy
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 { AnchorID int `json:"anchor_id,omitempty"` Count int `json:"count,omitempty"` } client.Certification.Query(). GroupBy(certification.FieldAnchorID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CertificationQuery) IDsX ¶
func (cq *CertificationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CertificationQuery) Limit ¶
func (cq *CertificationQuery) Limit(limit int) *CertificationQuery
Limit the number of records to be returned by this query.
func (*CertificationQuery) Offset ¶
func (cq *CertificationQuery) Offset(offset int) *CertificationQuery
Offset to start from.
func (*CertificationQuery) Only ¶
func (cq *CertificationQuery) Only(ctx context.Context) (*Certification, error)
Only returns a single Certification entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Certification entity is found. Returns a *NotFoundError when no Certification entities are found.
func (*CertificationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Certification ID in the query. Returns a *NotSingularError when more than one Certification ID is found. Returns a *NotFoundError when no entities are found.
func (*CertificationQuery) OnlyIDX ¶
func (cq *CertificationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CertificationQuery) OnlyX ¶
func (cq *CertificationQuery) OnlyX(ctx context.Context) *Certification
OnlyX is like Only, but panics if an error occurs.
func (*CertificationQuery) Order ¶
func (cq *CertificationQuery) Order(o ...certification.OrderOption) *CertificationQuery
Order specifies how the records should be ordered.
func (*CertificationQuery) Select ¶
func (cq *CertificationQuery) Select(fields ...string) *CertificationSelect
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 { AnchorID int `json:"anchor_id,omitempty"` } client.Certification.Query(). Select(certification.FieldAnchorID). Scan(ctx, &v)
func (*CertificationQuery) Unique ¶
func (cq *CertificationQuery) Unique(unique bool) *CertificationQuery
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 (*CertificationQuery) Where ¶
func (cq *CertificationQuery) Where(ps ...predicate.Certification) *CertificationQuery
Where adds a new predicate for the CertificationQuery builder.
type CertificationSelect ¶
type CertificationSelect struct { *CertificationQuery // contains filtered or unexported fields }
CertificationSelect is the builder for selecting fields of Certification entities.
func (*CertificationSelect) Aggregate ¶
func (cs *CertificationSelect) Aggregate(fns ...AggregateFunc) *CertificationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CertificationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CertificationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CertificationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CertificationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CertificationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CertificationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CertificationSelect) Scan ¶
func (cs *CertificationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CertificationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CertificationUpdate ¶
type CertificationUpdate struct {
// contains filtered or unexported fields
}
CertificationUpdate is the builder for updating Certification entities.
func (*CertificationUpdate) AddAnchorID ¶
func (cu *CertificationUpdate) AddAnchorID(i int) *CertificationUpdate
AddAnchorID adds i to the "anchor_id" field.
func (*CertificationUpdate) Exec ¶
func (cu *CertificationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CertificationUpdate) ExecX ¶
func (cu *CertificationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CertificationUpdate) Mutation ¶
func (cu *CertificationUpdate) Mutation() *CertificationMutation
Mutation returns the CertificationMutation object of the builder.
func (*CertificationUpdate) Save ¶
func (cu *CertificationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CertificationUpdate) SaveX ¶
func (cu *CertificationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CertificationUpdate) SetAnchorID ¶
func (cu *CertificationUpdate) SetAnchorID(i int) *CertificationUpdate
SetAnchorID sets the "anchor_id" field.
func (*CertificationUpdate) SetDataID ¶
func (cu *CertificationUpdate) SetDataID(s string) *CertificationUpdate
SetDataID sets the "data_id" field.
func (*CertificationUpdate) SetHash ¶
func (cu *CertificationUpdate) SetHash(s string) *CertificationUpdate
SetHash sets the "hash" field.
func (*CertificationUpdate) Where ¶
func (cu *CertificationUpdate) Where(ps ...predicate.Certification) *CertificationUpdate
Where appends a list predicates to the CertificationUpdate builder.
type CertificationUpdateOne ¶
type CertificationUpdateOne struct {
// contains filtered or unexported fields
}
CertificationUpdateOne is the builder for updating a single Certification entity.
func (*CertificationUpdateOne) AddAnchorID ¶
func (cuo *CertificationUpdateOne) AddAnchorID(i int) *CertificationUpdateOne
AddAnchorID adds i to the "anchor_id" field.
func (*CertificationUpdateOne) Exec ¶
func (cuo *CertificationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CertificationUpdateOne) ExecX ¶
func (cuo *CertificationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CertificationUpdateOne) Mutation ¶
func (cuo *CertificationUpdateOne) Mutation() *CertificationMutation
Mutation returns the CertificationMutation object of the builder.
func (*CertificationUpdateOne) Save ¶
func (cuo *CertificationUpdateOne) Save(ctx context.Context) (*Certification, error)
Save executes the query and returns the updated Certification entity.
func (*CertificationUpdateOne) SaveX ¶
func (cuo *CertificationUpdateOne) SaveX(ctx context.Context) *Certification
SaveX is like Save, but panics if an error occurs.
func (*CertificationUpdateOne) Select ¶
func (cuo *CertificationUpdateOne) Select(field string, fields ...string) *CertificationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CertificationUpdateOne) SetAnchorID ¶
func (cuo *CertificationUpdateOne) SetAnchorID(i int) *CertificationUpdateOne
SetAnchorID sets the "anchor_id" field.
func (*CertificationUpdateOne) SetDataID ¶
func (cuo *CertificationUpdateOne) SetDataID(s string) *CertificationUpdateOne
SetDataID sets the "data_id" field.
func (*CertificationUpdateOne) SetHash ¶
func (cuo *CertificationUpdateOne) SetHash(s string) *CertificationUpdateOne
SetHash sets the "hash" field.
func (*CertificationUpdateOne) Where ¶
func (cuo *CertificationUpdateOne) Where(ps ...predicate.Certification) *CertificationUpdateOne
Where appends a list predicates to the CertificationUpdate builder.
type Certifications ¶
type Certifications []*Certification
Certifications is a parsable slice of Certification.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Certification is the client for interacting with the Certification builders. Certification *CertificationClient // LocalKey is the client for interacting with the LocalKey builders. LocalKey *LocalKeyClient // Message is the client for interacting with the Message builders. Message *MessageClient // Process is the client for interacting with the Process builders. Process *ProcessClient // 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(). Certification. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type LocalKey ¶
type LocalKey struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // LocalKey holds the value of the "local_key" field. LocalKey *key.LocalKey `json:"local_key,omitempty"` // KeyType holds the value of the "key_type" field. KeyType string `json:"key_type,omitempty"` // contains filtered or unexported fields }
LocalKey is the model entity for the LocalKey schema.
func (*LocalKey) Unwrap ¶
Unwrap unwraps the LocalKey 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 (*LocalKey) Update ¶
func (lk *LocalKey) Update() *LocalKeyUpdateOne
Update returns a builder for updating this LocalKey. Note that you need to call LocalKey.Unwrap() before calling this method if this LocalKey was returned from a transaction, and the transaction was committed or rolled back.
type LocalKeyClient ¶
type LocalKeyClient struct {
// contains filtered or unexported fields
}
LocalKeyClient is a client for the LocalKey schema.
func NewLocalKeyClient ¶
func NewLocalKeyClient(c config) *LocalKeyClient
NewLocalKeyClient returns a client for the LocalKey from the given config.
func (*LocalKeyClient) Create ¶
func (c *LocalKeyClient) Create() *LocalKeyCreate
Create returns a builder for creating a LocalKey entity.
func (*LocalKeyClient) CreateBulk ¶
func (c *LocalKeyClient) CreateBulk(builders ...*LocalKeyCreate) *LocalKeyCreateBulk
CreateBulk returns a builder for creating a bulk of LocalKey entities.
func (*LocalKeyClient) Delete ¶
func (c *LocalKeyClient) Delete() *LocalKeyDelete
Delete returns a delete builder for LocalKey.
func (*LocalKeyClient) DeleteOne ¶
func (c *LocalKeyClient) DeleteOne(lk *LocalKey) *LocalKeyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LocalKeyClient) DeleteOneID ¶
func (c *LocalKeyClient) DeleteOneID(id uuid.UUID) *LocalKeyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LocalKeyClient) Hooks ¶
func (c *LocalKeyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LocalKeyClient) Intercept ¶
func (c *LocalKeyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `localkey.Intercept(f(g(h())))`.
func (*LocalKeyClient) Interceptors ¶
func (c *LocalKeyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LocalKeyClient) MapCreateBulk ¶
func (c *LocalKeyClient) MapCreateBulk(slice any, setFunc func(*LocalKeyCreate, int)) *LocalKeyCreateBulk
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 (*LocalKeyClient) Query ¶
func (c *LocalKeyClient) Query() *LocalKeyQuery
Query returns a query builder for LocalKey.
func (*LocalKeyClient) Update ¶
func (c *LocalKeyClient) Update() *LocalKeyUpdate
Update returns an update builder for LocalKey.
func (*LocalKeyClient) UpdateOne ¶
func (c *LocalKeyClient) UpdateOne(lk *LocalKey) *LocalKeyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LocalKeyClient) UpdateOneID ¶
func (c *LocalKeyClient) UpdateOneID(id uuid.UUID) *LocalKeyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LocalKeyClient) Use ¶
func (c *LocalKeyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `localkey.Hooks(f(g(h())))`.
type LocalKeyCreate ¶
type LocalKeyCreate struct {
// contains filtered or unexported fields
}
LocalKeyCreate is the builder for creating a LocalKey entity.
func (*LocalKeyCreate) Exec ¶
func (lkc *LocalKeyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocalKeyCreate) ExecX ¶
func (lkc *LocalKeyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalKeyCreate) Mutation ¶
func (lkc *LocalKeyCreate) Mutation() *LocalKeyMutation
Mutation returns the LocalKeyMutation object of the builder.
func (*LocalKeyCreate) Save ¶
func (lkc *LocalKeyCreate) Save(ctx context.Context) (*LocalKey, error)
Save creates the LocalKey in the database.
func (*LocalKeyCreate) SaveX ¶
func (lkc *LocalKeyCreate) SaveX(ctx context.Context) *LocalKey
SaveX calls Save and panics if Save returns an error.
func (*LocalKeyCreate) SetID ¶
func (lkc *LocalKeyCreate) SetID(u uuid.UUID) *LocalKeyCreate
SetID sets the "id" field.
func (*LocalKeyCreate) SetKeyType ¶
func (lkc *LocalKeyCreate) SetKeyType(s string) *LocalKeyCreate
SetKeyType sets the "key_type" field.
func (*LocalKeyCreate) SetLocalKey ¶
func (lkc *LocalKeyCreate) SetLocalKey(kk *key.LocalKey) *LocalKeyCreate
SetLocalKey sets the "local_key" field.
func (*LocalKeyCreate) SetNillableID ¶
func (lkc *LocalKeyCreate) SetNillableID(u *uuid.UUID) *LocalKeyCreate
SetNillableID sets the "id" field if the given value is not nil.
type LocalKeyCreateBulk ¶
type LocalKeyCreateBulk struct {
// contains filtered or unexported fields
}
LocalKeyCreateBulk is the builder for creating many LocalKey entities in bulk.
func (*LocalKeyCreateBulk) Exec ¶
func (lkcb *LocalKeyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LocalKeyCreateBulk) ExecX ¶
func (lkcb *LocalKeyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LocalKeyDelete ¶
type LocalKeyDelete struct {
// contains filtered or unexported fields
}
LocalKeyDelete is the builder for deleting a LocalKey entity.
func (*LocalKeyDelete) Exec ¶
func (lkd *LocalKeyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LocalKeyDelete) ExecX ¶
func (lkd *LocalKeyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LocalKeyDelete) Where ¶
func (lkd *LocalKeyDelete) Where(ps ...predicate.LocalKey) *LocalKeyDelete
Where appends a list predicates to the LocalKeyDelete builder.
type LocalKeyDeleteOne ¶
type LocalKeyDeleteOne struct {
// contains filtered or unexported fields
}
LocalKeyDeleteOne is the builder for deleting a single LocalKey entity.
func (*LocalKeyDeleteOne) Exec ¶
func (lkdo *LocalKeyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LocalKeyDeleteOne) ExecX ¶
func (lkdo *LocalKeyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalKeyDeleteOne) Where ¶
func (lkdo *LocalKeyDeleteOne) Where(ps ...predicate.LocalKey) *LocalKeyDeleteOne
Where appends a list predicates to the LocalKeyDelete builder.
type LocalKeyGroupBy ¶
type LocalKeyGroupBy struct {
// contains filtered or unexported fields
}
LocalKeyGroupBy is the group-by builder for LocalKey entities.
func (*LocalKeyGroupBy) Aggregate ¶
func (lkgb *LocalKeyGroupBy) Aggregate(fns ...AggregateFunc) *LocalKeyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LocalKeyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocalKeyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocalKeyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocalKeyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocalKeyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocalKeyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocalKeyGroupBy) Scan ¶
func (lkgb *LocalKeyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocalKeyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocalKeyMutation ¶
type LocalKeyMutation struct {
// contains filtered or unexported fields
}
LocalKeyMutation represents an operation that mutates the LocalKey nodes in the graph.
func (*LocalKeyMutation) AddField ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) AddedEdges ¶
func (m *LocalKeyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LocalKeyMutation) AddedField ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) AddedFields ¶
func (m *LocalKeyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LocalKeyMutation) AddedIDs ¶
func (m *LocalKeyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LocalKeyMutation) ClearEdge ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) ClearField ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) ClearedEdges ¶
func (m *LocalKeyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LocalKeyMutation) ClearedFields ¶
func (m *LocalKeyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LocalKeyMutation) Client ¶
func (m LocalKeyMutation) 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 (*LocalKeyMutation) EdgeCleared ¶
func (m *LocalKeyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LocalKeyMutation) Field ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) FieldCleared ¶
func (m *LocalKeyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LocalKeyMutation) Fields ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) ID ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) 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 (*LocalKeyMutation) KeyType ¶
func (m *LocalKeyMutation) KeyType() (r string, exists bool)
KeyType returns the value of the "key_type" field in the mutation.
func (*LocalKeyMutation) LocalKey ¶
func (m *LocalKeyMutation) LocalKey() (r *key.LocalKey, exists bool)
LocalKey returns the value of the "local_key" field in the mutation.
func (*LocalKeyMutation) 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 (*LocalKeyMutation) OldKeyType ¶
func (m *LocalKeyMutation) OldKeyType(ctx context.Context) (v string, err error)
OldKeyType returns the old "key_type" field's value of the LocalKey entity. If the LocalKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LocalKeyMutation) OldLocalKey ¶
OldLocalKey returns the old "local_key" field's value of the LocalKey entity. If the LocalKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LocalKeyMutation) RemovedEdges ¶
func (m *LocalKeyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LocalKeyMutation) RemovedIDs ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) ResetEdge ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) ResetField ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) ResetKeyType ¶
func (m *LocalKeyMutation) ResetKeyType()
ResetKeyType resets all changes to the "key_type" field.
func (*LocalKeyMutation) ResetLocalKey ¶
func (m *LocalKeyMutation) ResetLocalKey()
ResetLocalKey resets all changes to the "local_key" field.
func (*LocalKeyMutation) SetField ¶
func (m *LocalKeyMutation) 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 (*LocalKeyMutation) SetID ¶
func (m *LocalKeyMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of LocalKey entities.
func (*LocalKeyMutation) SetKeyType ¶
func (m *LocalKeyMutation) SetKeyType(s string)
SetKeyType sets the "key_type" field.
func (*LocalKeyMutation) SetLocalKey ¶
func (m *LocalKeyMutation) SetLocalKey(kk *key.LocalKey)
SetLocalKey sets the "local_key" field.
func (*LocalKeyMutation) SetOp ¶
func (m *LocalKeyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (LocalKeyMutation) Tx ¶
func (m LocalKeyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LocalKeyMutation) Type ¶
func (m *LocalKeyMutation) Type() string
Type returns the node type of this mutation (LocalKey).
func (*LocalKeyMutation) Where ¶
func (m *LocalKeyMutation) Where(ps ...predicate.LocalKey)
Where appends a list predicates to the LocalKeyMutation builder.
func (*LocalKeyMutation) WhereP ¶
func (m *LocalKeyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LocalKeyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LocalKeyQuery ¶
type LocalKeyQuery struct {
// contains filtered or unexported fields
}
LocalKeyQuery is the builder for querying LocalKey entities.
func (*LocalKeyQuery) Aggregate ¶
func (lkq *LocalKeyQuery) Aggregate(fns ...AggregateFunc) *LocalKeySelect
Aggregate returns a LocalKeySelect configured with the given aggregations.
func (*LocalKeyQuery) All ¶
func (lkq *LocalKeyQuery) All(ctx context.Context) ([]*LocalKey, error)
All executes the query and returns a list of LocalKeys.
func (*LocalKeyQuery) AllX ¶
func (lkq *LocalKeyQuery) AllX(ctx context.Context) []*LocalKey
AllX is like All, but panics if an error occurs.
func (*LocalKeyQuery) Clone ¶
func (lkq *LocalKeyQuery) Clone() *LocalKeyQuery
Clone returns a duplicate of the LocalKeyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LocalKeyQuery) Count ¶
func (lkq *LocalKeyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LocalKeyQuery) CountX ¶
func (lkq *LocalKeyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LocalKeyQuery) Exist ¶
func (lkq *LocalKeyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LocalKeyQuery) ExistX ¶
func (lkq *LocalKeyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LocalKeyQuery) First ¶
func (lkq *LocalKeyQuery) First(ctx context.Context) (*LocalKey, error)
First returns the first LocalKey entity from the query. Returns a *NotFoundError when no LocalKey was found.
func (*LocalKeyQuery) FirstID ¶
FirstID returns the first LocalKey ID from the query. Returns a *NotFoundError when no LocalKey ID was found.
func (*LocalKeyQuery) FirstIDX ¶
func (lkq *LocalKeyQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*LocalKeyQuery) FirstX ¶
func (lkq *LocalKeyQuery) FirstX(ctx context.Context) *LocalKey
FirstX is like First, but panics if an error occurs.
func (*LocalKeyQuery) GroupBy ¶
func (lkq *LocalKeyQuery) GroupBy(field string, fields ...string) *LocalKeyGroupBy
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 { LocalKey *key.LocalKey `json:"local_key,omitempty"` Count int `json:"count,omitempty"` } client.LocalKey.Query(). GroupBy(localkey.FieldLocalKey). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LocalKeyQuery) IDsX ¶
func (lkq *LocalKeyQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*LocalKeyQuery) Limit ¶
func (lkq *LocalKeyQuery) Limit(limit int) *LocalKeyQuery
Limit the number of records to be returned by this query.
func (*LocalKeyQuery) Offset ¶
func (lkq *LocalKeyQuery) Offset(offset int) *LocalKeyQuery
Offset to start from.
func (*LocalKeyQuery) Only ¶
func (lkq *LocalKeyQuery) Only(ctx context.Context) (*LocalKey, error)
Only returns a single LocalKey entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one LocalKey entity is found. Returns a *NotFoundError when no LocalKey entities are found.
func (*LocalKeyQuery) OnlyID ¶
OnlyID is like Only, but returns the only LocalKey ID in the query. Returns a *NotSingularError when more than one LocalKey ID is found. Returns a *NotFoundError when no entities are found.
func (*LocalKeyQuery) OnlyIDX ¶
func (lkq *LocalKeyQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LocalKeyQuery) OnlyX ¶
func (lkq *LocalKeyQuery) OnlyX(ctx context.Context) *LocalKey
OnlyX is like Only, but panics if an error occurs.
func (*LocalKeyQuery) Order ¶
func (lkq *LocalKeyQuery) Order(o ...localkey.OrderOption) *LocalKeyQuery
Order specifies how the records should be ordered.
func (*LocalKeyQuery) Select ¶
func (lkq *LocalKeyQuery) Select(fields ...string) *LocalKeySelect
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 { LocalKey *key.LocalKey `json:"local_key,omitempty"` } client.LocalKey.Query(). Select(localkey.FieldLocalKey). Scan(ctx, &v)
func (*LocalKeyQuery) Unique ¶
func (lkq *LocalKeyQuery) Unique(unique bool) *LocalKeyQuery
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 (*LocalKeyQuery) Where ¶
func (lkq *LocalKeyQuery) Where(ps ...predicate.LocalKey) *LocalKeyQuery
Where adds a new predicate for the LocalKeyQuery builder.
type LocalKeySelect ¶
type LocalKeySelect struct { *LocalKeyQuery // contains filtered or unexported fields }
LocalKeySelect is the builder for selecting fields of LocalKey entities.
func (*LocalKeySelect) Aggregate ¶
func (lks *LocalKeySelect) Aggregate(fns ...AggregateFunc) *LocalKeySelect
Aggregate adds the given aggregation functions to the selector query.
func (*LocalKeySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LocalKeySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LocalKeySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LocalKeySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LocalKeySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LocalKeySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LocalKeySelect) Scan ¶
func (lks *LocalKeySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LocalKeySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LocalKeyUpdate ¶
type LocalKeyUpdate struct {
// contains filtered or unexported fields
}
LocalKeyUpdate is the builder for updating LocalKey entities.
func (*LocalKeyUpdate) Exec ¶
func (lku *LocalKeyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LocalKeyUpdate) ExecX ¶
func (lku *LocalKeyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalKeyUpdate) Mutation ¶
func (lku *LocalKeyUpdate) Mutation() *LocalKeyMutation
Mutation returns the LocalKeyMutation object of the builder.
func (*LocalKeyUpdate) Save ¶
func (lku *LocalKeyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LocalKeyUpdate) SaveX ¶
func (lku *LocalKeyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LocalKeyUpdate) SetKeyType ¶
func (lku *LocalKeyUpdate) SetKeyType(s string) *LocalKeyUpdate
SetKeyType sets the "key_type" field.
func (*LocalKeyUpdate) SetLocalKey ¶
func (lku *LocalKeyUpdate) SetLocalKey(kk *key.LocalKey) *LocalKeyUpdate
SetLocalKey sets the "local_key" field.
func (*LocalKeyUpdate) Where ¶
func (lku *LocalKeyUpdate) Where(ps ...predicate.LocalKey) *LocalKeyUpdate
Where appends a list predicates to the LocalKeyUpdate builder.
type LocalKeyUpdateOne ¶
type LocalKeyUpdateOne struct {
// contains filtered or unexported fields
}
LocalKeyUpdateOne is the builder for updating a single LocalKey entity.
func (*LocalKeyUpdateOne) Exec ¶
func (lkuo *LocalKeyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LocalKeyUpdateOne) ExecX ¶
func (lkuo *LocalKeyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LocalKeyUpdateOne) Mutation ¶
func (lkuo *LocalKeyUpdateOne) Mutation() *LocalKeyMutation
Mutation returns the LocalKeyMutation object of the builder.
func (*LocalKeyUpdateOne) Save ¶
func (lkuo *LocalKeyUpdateOne) Save(ctx context.Context) (*LocalKey, error)
Save executes the query and returns the updated LocalKey entity.
func (*LocalKeyUpdateOne) SaveX ¶
func (lkuo *LocalKeyUpdateOne) SaveX(ctx context.Context) *LocalKey
SaveX is like Save, but panics if an error occurs.
func (*LocalKeyUpdateOne) Select ¶
func (lkuo *LocalKeyUpdateOne) Select(field string, fields ...string) *LocalKeyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LocalKeyUpdateOne) SetKeyType ¶
func (lkuo *LocalKeyUpdateOne) SetKeyType(s string) *LocalKeyUpdateOne
SetKeyType sets the "key_type" field.
func (*LocalKeyUpdateOne) SetLocalKey ¶
func (lkuo *LocalKeyUpdateOne) SetLocalKey(kk *key.LocalKey) *LocalKeyUpdateOne
SetLocalKey sets the "local_key" field.
func (*LocalKeyUpdateOne) Where ¶
func (lkuo *LocalKeyUpdateOne) Where(ps ...predicate.LocalKey) *LocalKeyUpdateOne
Where appends a list predicates to the LocalKeyUpdate builder.
type Message ¶ added in v1.3.0
type Message struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Message holds the value of the "message" field. Message string `json:"message,omitempty"` // Root holds the value of the "root" field. Root string `json:"root,omitempty"` // AnchorID holds the value of the "anchor_id" field. AnchorID int `json:"anchor_id,omitempty"` // Proof holds the value of the "proof" field. Proof json.RawMessage `json:"proof,omitempty"` // contains filtered or unexported fields }
Message is the model entity for the Message schema.
func (*Message) Unwrap ¶ added in v1.3.0
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 ¶ added in v1.3.0
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 ¶ added in v1.3.0
type MessageClient struct {
// contains filtered or unexported fields
}
MessageClient is a client for the Message schema.
func NewMessageClient ¶ added in v1.3.0
func NewMessageClient(c config) *MessageClient
NewMessageClient returns a client for the Message from the given config.
func (*MessageClient) Create ¶ added in v1.3.0
func (c *MessageClient) Create() *MessageCreate
Create returns a builder for creating a Message entity.
func (*MessageClient) CreateBulk ¶ added in v1.3.0
func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
CreateBulk returns a builder for creating a bulk of Message entities.
func (*MessageClient) Delete ¶ added in v1.3.0
func (c *MessageClient) Delete() *MessageDelete
Delete returns a delete builder for Message.
func (*MessageClient) DeleteOne ¶ added in v1.3.0
func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MessageClient) DeleteOneID ¶ added in v1.3.0
func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MessageClient) Hooks ¶ added in v1.3.0
func (c *MessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MessageClient) Intercept ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (c *MessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MessageClient) MapCreateBulk ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (c *MessageClient) Query() *MessageQuery
Query returns a query builder for Message.
func (*MessageClient) Update ¶ added in v1.3.0
func (c *MessageClient) Update() *MessageUpdate
Update returns an update builder for Message.
func (*MessageClient) UpdateOne ¶ added in v1.3.0
func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MessageClient) UpdateOneID ¶ added in v1.3.0
func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MessageClient) Use ¶ added in v1.3.0
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 ¶ added in v1.3.0
type MessageCreate struct {
// contains filtered or unexported fields
}
MessageCreate is the builder for creating a Message entity.
func (*MessageCreate) Exec ¶ added in v1.3.0
func (mc *MessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreate) ExecX ¶ added in v1.3.0
func (mc *MessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreate) Mutation ¶ added in v1.3.0
func (mc *MessageCreate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageCreate) Save ¶ added in v1.3.0
func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
Save creates the Message in the database.
func (*MessageCreate) SaveX ¶ added in v1.3.0
func (mc *MessageCreate) SaveX(ctx context.Context) *Message
SaveX calls Save and panics if Save returns an error.
func (*MessageCreate) SetAnchorID ¶ added in v1.3.0
func (mc *MessageCreate) SetAnchorID(i int) *MessageCreate
SetAnchorID sets the "anchor_id" field.
func (*MessageCreate) SetID ¶ added in v1.3.0
func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
SetID sets the "id" field.
func (*MessageCreate) SetMessage ¶ added in v1.3.0
func (mc *MessageCreate) SetMessage(s string) *MessageCreate
SetMessage sets the "message" field.
func (*MessageCreate) SetNillableAnchorID ¶ added in v1.3.0
func (mc *MessageCreate) SetNillableAnchorID(i *int) *MessageCreate
SetNillableAnchorID sets the "anchor_id" field if the given value is not nil.
func (*MessageCreate) SetNillableID ¶ added in v1.3.0
func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MessageCreate) SetNillableRoot ¶ added in v1.3.0
func (mc *MessageCreate) SetNillableRoot(s *string) *MessageCreate
SetNillableRoot sets the "root" field if the given value is not nil.
func (*MessageCreate) SetProof ¶ added in v1.3.0
func (mc *MessageCreate) SetProof(jm json.RawMessage) *MessageCreate
SetProof sets the "proof" field.
func (*MessageCreate) SetRoot ¶ added in v1.3.0
func (mc *MessageCreate) SetRoot(s string) *MessageCreate
SetRoot sets the "root" field.
type MessageCreateBulk ¶ added in v1.3.0
type MessageCreateBulk struct {
// contains filtered or unexported fields
}
MessageCreateBulk is the builder for creating many Message entities in bulk.
func (*MessageCreateBulk) Exec ¶ added in v1.3.0
func (mcb *MessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreateBulk) ExecX ¶ added in v1.3.0
func (mcb *MessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MessageDelete ¶ added in v1.3.0
type MessageDelete struct {
// contains filtered or unexported fields
}
MessageDelete is the builder for deleting a Message entity.
func (*MessageDelete) Exec ¶ added in v1.3.0
func (md *MessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MessageDelete) ExecX ¶ added in v1.3.0
func (md *MessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MessageDelete) Where ¶ added in v1.3.0
func (md *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
Where appends a list predicates to the MessageDelete builder.
type MessageDeleteOne ¶ added in v1.3.0
type MessageDeleteOne struct {
// contains filtered or unexported fields
}
MessageDeleteOne is the builder for deleting a single Message entity.
func (*MessageDeleteOne) Exec ¶ added in v1.3.0
func (mdo *MessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MessageDeleteOne) ExecX ¶ added in v1.3.0
func (mdo *MessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageDeleteOne) Where ¶ added in v1.3.0
func (mdo *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne
Where appends a list predicates to the MessageDelete builder.
type MessageGroupBy ¶ added in v1.3.0
type MessageGroupBy struct {
// contains filtered or unexported fields
}
MessageGroupBy is the group-by builder for Message entities.
func (*MessageGroupBy) Aggregate ¶ added in v1.3.0
func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MessageGroupBy) Bool ¶ added in v1.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Bools ¶ added in v1.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) BoolsX ¶ added in v1.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*MessageGroupBy) Float64 ¶ added in v1.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64X ¶ added in v1.3.0
Float64X is like Float64, but panics if an error occurs.
func (*MessageGroupBy) Float64s ¶ added in v1.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64sX ¶ added in v1.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*MessageGroupBy) Int ¶ added in v1.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Ints ¶ added in v1.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Scan ¶ added in v1.3.0
func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageGroupBy) String ¶ added in v1.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) StringX ¶ added in v1.3.0
StringX is like String, but panics if an error occurs.
type MessageMutation ¶ added in v1.3.0
type MessageMutation struct {
// contains filtered or unexported fields
}
MessageMutation represents an operation that mutates the Message nodes in the graph.
func (*MessageMutation) AddAnchorID ¶ added in v1.3.0
func (m *MessageMutation) AddAnchorID(i int)
AddAnchorID adds i to the "anchor_id" field.
func (*MessageMutation) AddField ¶ added in v1.3.0
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) AddedAnchorID ¶ added in v1.3.0
func (m *MessageMutation) AddedAnchorID() (r int, exists bool)
AddedAnchorID returns the value that was added to the "anchor_id" field in this mutation.
func (*MessageMutation) AddedEdges ¶ added in v1.3.0
func (m *MessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MessageMutation) AddedField ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (m *MessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MessageMutation) AddedIDs ¶ added in v1.3.0
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) AnchorID ¶ added in v1.3.0
func (m *MessageMutation) AnchorID() (r int, exists bool)
AnchorID returns the value of the "anchor_id" field in the mutation.
func (*MessageMutation) AppendProof ¶ added in v1.3.0
func (m *MessageMutation) AppendProof(jm json.RawMessage)
AppendProof adds jm to the "proof" field.
func (*MessageMutation) AppendedProof ¶ added in v1.3.0
func (m *MessageMutation) AppendedProof() (json.RawMessage, bool)
AppendedProof returns the list of values that were appended to the "proof" field in this mutation.
func (*MessageMutation) ClearEdge ¶ added in v1.3.0
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 ¶ added in v1.3.0
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) ClearProof ¶ added in v1.3.0
func (m *MessageMutation) ClearProof()
ClearProof clears the value of the "proof" field.
func (*MessageMutation) ClearedEdges ¶ added in v1.3.0
func (m *MessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MessageMutation) ClearedFields ¶ added in v1.3.0
func (m *MessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MessageMutation) Client ¶ added in v1.3.0
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) EdgeCleared ¶ added in v1.3.0
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 ¶ added in v1.3.0
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 ¶ added in v1.3.0
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 ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (m *MessageMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MessageMutation) IDs ¶ added in v1.3.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 (*MessageMutation) Message ¶ added in v1.3.0
func (m *MessageMutation) Message() (r string, exists bool)
Message returns the value of the "message" field in the mutation.
func (*MessageMutation) OldAnchorID ¶ added in v1.3.0
func (m *MessageMutation) OldAnchorID(ctx context.Context) (v int, err error)
OldAnchorID returns the old "anchor_id" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldField ¶ added in v1.3.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 (*MessageMutation) OldMessage ¶ added in v1.3.0
func (m *MessageMutation) OldMessage(ctx context.Context) (v string, err error)
OldMessage returns the old "message" 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) OldProof ¶ added in v1.3.0
func (m *MessageMutation) OldProof(ctx context.Context) (v json.RawMessage, err error)
OldProof returns the old "proof" 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) OldRoot ¶ added in v1.3.0
func (m *MessageMutation) OldRoot(ctx context.Context) (v string, err error)
OldRoot returns the old "root" 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) Op ¶ added in v1.3.0
func (m *MessageMutation) Op() Op
Op returns the operation name.
func (*MessageMutation) Proof ¶ added in v1.3.0
func (m *MessageMutation) Proof() (r json.RawMessage, exists bool)
Proof returns the value of the "proof" field in the mutation.
func (*MessageMutation) ProofCleared ¶ added in v1.3.0
func (m *MessageMutation) ProofCleared() bool
ProofCleared returns if the "proof" field was cleared in this mutation.
func (*MessageMutation) RemovedEdges ¶ added in v1.3.0
func (m *MessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MessageMutation) RemovedIDs ¶ added in v1.3.0
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) ResetAnchorID ¶ added in v1.3.0
func (m *MessageMutation) ResetAnchorID()
ResetAnchorID resets all changes to the "anchor_id" field.
func (*MessageMutation) ResetEdge ¶ added in v1.3.0
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 ¶ added in v1.3.0
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) ResetMessage ¶ added in v1.3.0
func (m *MessageMutation) ResetMessage()
ResetMessage resets all changes to the "message" field.
func (*MessageMutation) ResetProof ¶ added in v1.3.0
func (m *MessageMutation) ResetProof()
ResetProof resets all changes to the "proof" field.
func (*MessageMutation) ResetRoot ¶ added in v1.3.0
func (m *MessageMutation) ResetRoot()
ResetRoot resets all changes to the "root" field.
func (*MessageMutation) Root ¶ added in v1.3.0
func (m *MessageMutation) Root() (r string, exists bool)
Root returns the value of the "root" field in the mutation.
func (*MessageMutation) SetAnchorID ¶ added in v1.3.0
func (m *MessageMutation) SetAnchorID(i int)
SetAnchorID sets the "anchor_id" field.
func (*MessageMutation) SetField ¶ added in v1.3.0
func (m *MessageMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MessageMutation) SetID ¶ added in v1.3.0
func (m *MessageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Message entities.
func (*MessageMutation) SetMessage ¶ added in v1.3.0
func (m *MessageMutation) SetMessage(s string)
SetMessage sets the "message" field.
func (*MessageMutation) SetOp ¶ added in v1.3.0
func (m *MessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MessageMutation) SetProof ¶ added in v1.3.0
func (m *MessageMutation) SetProof(jm json.RawMessage)
SetProof sets the "proof" field.
func (*MessageMutation) SetRoot ¶ added in v1.3.0
func (m *MessageMutation) SetRoot(s string)
SetRoot sets the "root" field.
func (MessageMutation) Tx ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (m *MessageMutation) Type() string
Type returns the node type of this mutation (Message).
func (*MessageMutation) Where ¶ added in v1.3.0
func (m *MessageMutation) Where(ps ...predicate.Message)
Where appends a list predicates to the MessageMutation builder.
func (*MessageMutation) WhereP ¶ added in v1.3.0
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 ¶ added in v1.3.0
type MessageQuery struct {
// contains filtered or unexported fields
}
MessageQuery is the builder for querying Message entities.
func (*MessageQuery) Aggregate ¶ added in v1.3.0
func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate returns a MessageSelect configured with the given aggregations.
func (*MessageQuery) All ¶ added in v1.3.0
func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
All executes the query and returns a list of Messages.
func (*MessageQuery) AllX ¶ added in v1.3.0
func (mq *MessageQuery) AllX(ctx context.Context) []*Message
AllX is like All, but panics if an error occurs.
func (*MessageQuery) Clone ¶ added in v1.3.0
func (mq *MessageQuery) Clone() *MessageQuery
Clone returns a duplicate of the MessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MessageQuery) Count ¶ added in v1.3.0
func (mq *MessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MessageQuery) CountX ¶ added in v1.3.0
func (mq *MessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MessageQuery) Exist ¶ added in v1.3.0
func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MessageQuery) ExistX ¶ added in v1.3.0
func (mq *MessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MessageQuery) First ¶ added in v1.3.0
func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
First returns the first Message entity from the query. Returns a *NotFoundError when no Message was found.
func (*MessageQuery) FirstID ¶ added in v1.3.0
FirstID returns the first Message ID from the query. Returns a *NotFoundError when no Message ID was found.
func (*MessageQuery) FirstIDX ¶ added in v1.3.0
func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*MessageQuery) FirstX ¶ added in v1.3.0
func (mq *MessageQuery) FirstX(ctx context.Context) *Message
FirstX is like First, but panics if an error occurs.
func (*MessageQuery) GroupBy ¶ added in v1.3.0
func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Message string `json:"message,omitempty"` Count int `json:"count,omitempty"` } client.Message.Query(). GroupBy(message.FieldMessage). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MessageQuery) IDs ¶ added in v1.3.0
IDs executes the query and returns a list of Message IDs.
func (*MessageQuery) IDsX ¶ added in v1.3.0
func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*MessageQuery) Limit ¶ added in v1.3.0
func (mq *MessageQuery) Limit(limit int) *MessageQuery
Limit the number of records to be returned by this query.
func (*MessageQuery) Offset ¶ added in v1.3.0
func (mq *MessageQuery) Offset(offset int) *MessageQuery
Offset to start from.
func (*MessageQuery) Only ¶ added in v1.3.0
func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
Only returns a single Message entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Message entity is found. Returns a *NotFoundError when no Message entities are found.
func (*MessageQuery) OnlyID ¶ added in v1.3.0
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 ¶ added in v1.3.0
func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MessageQuery) OnlyX ¶ added in v1.3.0
func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
OnlyX is like Only, but panics if an error occurs.
func (*MessageQuery) Order ¶ added in v1.3.0
func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
Order specifies how the records should be ordered.
func (*MessageQuery) Select ¶ added in v1.3.0
func (mq *MessageQuery) Select(fields ...string) *MessageSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Message string `json:"message,omitempty"` } client.Message.Query(). Select(message.FieldMessage). Scan(ctx, &v)
func (*MessageQuery) Unique ¶ added in v1.3.0
func (mq *MessageQuery) Unique(unique bool) *MessageQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MessageQuery) Where ¶ added in v1.3.0
func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
Where adds a new predicate for the MessageQuery builder.
type MessageSelect ¶ added in v1.3.0
type MessageSelect struct { *MessageQuery // contains filtered or unexported fields }
MessageSelect is the builder for selecting fields of Message entities.
func (*MessageSelect) Aggregate ¶ added in v1.3.0
func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MessageSelect) Bool ¶ added in v1.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Bools ¶ added in v1.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64 ¶ added in v1.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64X ¶ added in v1.3.0
Float64X is like Float64, but panics if an error occurs.
func (*MessageSelect) Float64s ¶ added in v1.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64sX ¶ added in v1.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*MessageSelect) Int ¶ added in v1.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Ints ¶ added in v1.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Scan ¶ added in v1.3.0
func (ms *MessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageSelect) String ¶ added in v1.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*MessageSelect) StringX ¶ added in v1.3.0
StringX is like String, but panics if an error occurs.
type MessageUpdate ¶ added in v1.3.0
type MessageUpdate struct {
// contains filtered or unexported fields
}
MessageUpdate is the builder for updating Message entities.
func (*MessageUpdate) AddAnchorID ¶ added in v1.3.0
func (mu *MessageUpdate) AddAnchorID(i int) *MessageUpdate
AddAnchorID adds i to the "anchor_id" field.
func (*MessageUpdate) AppendProof ¶ added in v1.3.0
func (mu *MessageUpdate) AppendProof(jm json.RawMessage) *MessageUpdate
AppendProof appends jm to the "proof" field.
func (*MessageUpdate) ClearProof ¶ added in v1.3.0
func (mu *MessageUpdate) ClearProof() *MessageUpdate
ClearProof clears the value of the "proof" field.
func (*MessageUpdate) Exec ¶ added in v1.3.0
func (mu *MessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpdate) ExecX ¶ added in v1.3.0
func (mu *MessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdate) Mutation ¶ added in v1.3.0
func (mu *MessageUpdate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdate) Save ¶ added in v1.3.0
func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MessageUpdate) SaveX ¶ added in v1.3.0
func (mu *MessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdate) SetAnchorID ¶ added in v1.3.0
func (mu *MessageUpdate) SetAnchorID(i int) *MessageUpdate
SetAnchorID sets the "anchor_id" field.
func (*MessageUpdate) SetMessage ¶ added in v1.3.0
func (mu *MessageUpdate) SetMessage(s string) *MessageUpdate
SetMessage sets the "message" field.
func (*MessageUpdate) SetNillableAnchorID ¶ added in v1.3.0
func (mu *MessageUpdate) SetNillableAnchorID(i *int) *MessageUpdate
SetNillableAnchorID sets the "anchor_id" field if the given value is not nil.
func (*MessageUpdate) SetNillableRoot ¶ added in v1.3.0
func (mu *MessageUpdate) SetNillableRoot(s *string) *MessageUpdate
SetNillableRoot sets the "root" field if the given value is not nil.
func (*MessageUpdate) SetProof ¶ added in v1.3.0
func (mu *MessageUpdate) SetProof(jm json.RawMessage) *MessageUpdate
SetProof sets the "proof" field.
func (*MessageUpdate) SetRoot ¶ added in v1.3.0
func (mu *MessageUpdate) SetRoot(s string) *MessageUpdate
SetRoot sets the "root" field.
func (*MessageUpdate) Where ¶ added in v1.3.0
func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
Where appends a list predicates to the MessageUpdate builder.
type MessageUpdateOne ¶ added in v1.3.0
type MessageUpdateOne struct {
// contains filtered or unexported fields
}
MessageUpdateOne is the builder for updating a single Message entity.
func (*MessageUpdateOne) AddAnchorID ¶ added in v1.3.0
func (muo *MessageUpdateOne) AddAnchorID(i int) *MessageUpdateOne
AddAnchorID adds i to the "anchor_id" field.
func (*MessageUpdateOne) AppendProof ¶ added in v1.3.0
func (muo *MessageUpdateOne) AppendProof(jm json.RawMessage) *MessageUpdateOne
AppendProof appends jm to the "proof" field.
func (*MessageUpdateOne) ClearProof ¶ added in v1.3.0
func (muo *MessageUpdateOne) ClearProof() *MessageUpdateOne
ClearProof clears the value of the "proof" field.
func (*MessageUpdateOne) Exec ¶ added in v1.3.0
func (muo *MessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MessageUpdateOne) ExecX ¶ added in v1.3.0
func (muo *MessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdateOne) Mutation ¶ added in v1.3.0
func (muo *MessageUpdateOne) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdateOne) Save ¶ added in v1.3.0
func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
Save executes the query and returns the updated Message entity.
func (*MessageUpdateOne) SaveX ¶ added in v1.3.0
func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdateOne) Select ¶ added in v1.3.0
func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MessageUpdateOne) SetAnchorID ¶ added in v1.3.0
func (muo *MessageUpdateOne) SetAnchorID(i int) *MessageUpdateOne
SetAnchorID sets the "anchor_id" field.
func (*MessageUpdateOne) SetMessage ¶ added in v1.3.0
func (muo *MessageUpdateOne) SetMessage(s string) *MessageUpdateOne
SetMessage sets the "message" field.
func (*MessageUpdateOne) SetNillableAnchorID ¶ added in v1.3.0
func (muo *MessageUpdateOne) SetNillableAnchorID(i *int) *MessageUpdateOne
SetNillableAnchorID sets the "anchor_id" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableRoot ¶ added in v1.3.0
func (muo *MessageUpdateOne) SetNillableRoot(s *string) *MessageUpdateOne
SetNillableRoot sets the "root" field if the given value is not nil.
func (*MessageUpdateOne) SetProof ¶ added in v1.3.0
func (muo *MessageUpdateOne) SetProof(jm json.RawMessage) *MessageUpdateOne
SetProof sets the "proof" field.
func (*MessageUpdateOne) SetRoot ¶ added in v1.3.0
func (muo *MessageUpdateOne) SetRoot(s string) *MessageUpdateOne
SetRoot sets the "root" field.
func (*MessageUpdateOne) Where ¶ added in v1.3.0
func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
Where appends a list predicates to the MessageUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Process ¶ added in v1.3.0
type Process struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Filename holds the value of the "filename" field. Filename string `json:"filename,omitempty"` // Status holds the value of the "status" field. Status bool `json:"status,omitempty"` // Hash holds the value of the "hash" field. Hash string `json:"hash,omitempty"` // ProcessResponse holds the value of the "process_response" field. ProcessResponse json.RawMessage `json:"process_response,omitempty"` // AnchorID holds the value of the "anchor_id" field. AnchorID int `json:"anchor_id,omitempty"` // IsAggregated holds the value of the "is_aggregated" field. IsAggregated bool `json:"is_aggregated,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // contains filtered or unexported fields }
Process is the model entity for the Process schema.
func (*Process) Unwrap ¶ added in v1.3.0
Unwrap unwraps the Process 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 (*Process) Update ¶ added in v1.3.0
func (pr *Process) Update() *ProcessUpdateOne
Update returns a builder for updating this Process. Note that you need to call Process.Unwrap() before calling this method if this Process was returned from a transaction, and the transaction was committed or rolled back.
type ProcessClient ¶ added in v1.3.0
type ProcessClient struct {
// contains filtered or unexported fields
}
ProcessClient is a client for the Process schema.
func NewProcessClient ¶ added in v1.3.0
func NewProcessClient(c config) *ProcessClient
NewProcessClient returns a client for the Process from the given config.
func (*ProcessClient) Create ¶ added in v1.3.0
func (c *ProcessClient) Create() *ProcessCreate
Create returns a builder for creating a Process entity.
func (*ProcessClient) CreateBulk ¶ added in v1.3.0
func (c *ProcessClient) CreateBulk(builders ...*ProcessCreate) *ProcessCreateBulk
CreateBulk returns a builder for creating a bulk of Process entities.
func (*ProcessClient) Delete ¶ added in v1.3.0
func (c *ProcessClient) Delete() *ProcessDelete
Delete returns a delete builder for Process.
func (*ProcessClient) DeleteOne ¶ added in v1.3.0
func (c *ProcessClient) DeleteOne(pr *Process) *ProcessDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProcessClient) DeleteOneID ¶ added in v1.3.0
func (c *ProcessClient) DeleteOneID(id uuid.UUID) *ProcessDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProcessClient) Hooks ¶ added in v1.3.0
func (c *ProcessClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProcessClient) Intercept ¶ added in v1.3.0
func (c *ProcessClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `process.Intercept(f(g(h())))`.
func (*ProcessClient) Interceptors ¶ added in v1.3.0
func (c *ProcessClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProcessClient) MapCreateBulk ¶ added in v1.3.0
func (c *ProcessClient) MapCreateBulk(slice any, setFunc func(*ProcessCreate, int)) *ProcessCreateBulk
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 (*ProcessClient) Query ¶ added in v1.3.0
func (c *ProcessClient) Query() *ProcessQuery
Query returns a query builder for Process.
func (*ProcessClient) Update ¶ added in v1.3.0
func (c *ProcessClient) Update() *ProcessUpdate
Update returns an update builder for Process.
func (*ProcessClient) UpdateOne ¶ added in v1.3.0
func (c *ProcessClient) UpdateOne(pr *Process) *ProcessUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProcessClient) UpdateOneID ¶ added in v1.3.0
func (c *ProcessClient) UpdateOneID(id uuid.UUID) *ProcessUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProcessClient) Use ¶ added in v1.3.0
func (c *ProcessClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `process.Hooks(f(g(h())))`.
type ProcessCreate ¶ added in v1.3.0
type ProcessCreate struct {
// contains filtered or unexported fields
}
ProcessCreate is the builder for creating a Process entity.
func (*ProcessCreate) Exec ¶ added in v1.3.0
func (pc *ProcessCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessCreate) ExecX ¶ added in v1.3.0
func (pc *ProcessCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessCreate) Mutation ¶ added in v1.3.0
func (pc *ProcessCreate) Mutation() *ProcessMutation
Mutation returns the ProcessMutation object of the builder.
func (*ProcessCreate) Save ¶ added in v1.3.0
func (pc *ProcessCreate) Save(ctx context.Context) (*Process, error)
Save creates the Process in the database.
func (*ProcessCreate) SaveX ¶ added in v1.3.0
func (pc *ProcessCreate) SaveX(ctx context.Context) *Process
SaveX calls Save and panics if Save returns an error.
func (*ProcessCreate) SetAnchorID ¶ added in v1.3.0
func (pc *ProcessCreate) SetAnchorID(i int) *ProcessCreate
SetAnchorID sets the "anchor_id" field.
func (*ProcessCreate) SetCreatedAt ¶ added in v1.3.0
func (pc *ProcessCreate) SetCreatedAt(t time.Time) *ProcessCreate
SetCreatedAt sets the "created_at" field.
func (*ProcessCreate) SetFilename ¶ added in v1.3.0
func (pc *ProcessCreate) SetFilename(s string) *ProcessCreate
SetFilename sets the "filename" field.
func (*ProcessCreate) SetHash ¶ added in v1.3.0
func (pc *ProcessCreate) SetHash(s string) *ProcessCreate
SetHash sets the "hash" field.
func (*ProcessCreate) SetID ¶ added in v1.3.0
func (pc *ProcessCreate) SetID(u uuid.UUID) *ProcessCreate
SetID sets the "id" field.
func (*ProcessCreate) SetIsAggregated ¶ added in v1.3.0
func (pc *ProcessCreate) SetIsAggregated(b bool) *ProcessCreate
SetIsAggregated sets the "is_aggregated" field.
func (*ProcessCreate) SetNillableAnchorID ¶ added in v1.3.0
func (pc *ProcessCreate) SetNillableAnchorID(i *int) *ProcessCreate
SetNillableAnchorID sets the "anchor_id" field if the given value is not nil.
func (*ProcessCreate) SetNillableCreatedAt ¶ added in v1.3.0
func (pc *ProcessCreate) SetNillableCreatedAt(t *time.Time) *ProcessCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProcessCreate) SetNillableID ¶ added in v1.3.0
func (pc *ProcessCreate) SetNillableID(u *uuid.UUID) *ProcessCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProcessCreate) SetNillableIsAggregated ¶ added in v1.3.0
func (pc *ProcessCreate) SetNillableIsAggregated(b *bool) *ProcessCreate
SetNillableIsAggregated sets the "is_aggregated" field if the given value is not nil.
func (*ProcessCreate) SetNillableStatus ¶ added in v1.3.0
func (pc *ProcessCreate) SetNillableStatus(b *bool) *ProcessCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ProcessCreate) SetProcessResponse ¶ added in v1.3.0
func (pc *ProcessCreate) SetProcessResponse(jm json.RawMessage) *ProcessCreate
SetProcessResponse sets the "process_response" field.
func (*ProcessCreate) SetStatus ¶ added in v1.3.0
func (pc *ProcessCreate) SetStatus(b bool) *ProcessCreate
SetStatus sets the "status" field.
type ProcessCreateBulk ¶ added in v1.3.0
type ProcessCreateBulk struct {
// contains filtered or unexported fields
}
ProcessCreateBulk is the builder for creating many Process entities in bulk.
func (*ProcessCreateBulk) Exec ¶ added in v1.3.0
func (pcb *ProcessCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessCreateBulk) ExecX ¶ added in v1.3.0
func (pcb *ProcessCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProcessDelete ¶ added in v1.3.0
type ProcessDelete struct {
// contains filtered or unexported fields
}
ProcessDelete is the builder for deleting a Process entity.
func (*ProcessDelete) Exec ¶ added in v1.3.0
func (pd *ProcessDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProcessDelete) ExecX ¶ added in v1.3.0
func (pd *ProcessDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProcessDelete) Where ¶ added in v1.3.0
func (pd *ProcessDelete) Where(ps ...predicate.Process) *ProcessDelete
Where appends a list predicates to the ProcessDelete builder.
type ProcessDeleteOne ¶ added in v1.3.0
type ProcessDeleteOne struct {
// contains filtered or unexported fields
}
ProcessDeleteOne is the builder for deleting a single Process entity.
func (*ProcessDeleteOne) Exec ¶ added in v1.3.0
func (pdo *ProcessDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProcessDeleteOne) ExecX ¶ added in v1.3.0
func (pdo *ProcessDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessDeleteOne) Where ¶ added in v1.3.0
func (pdo *ProcessDeleteOne) Where(ps ...predicate.Process) *ProcessDeleteOne
Where appends a list predicates to the ProcessDelete builder.
type ProcessGroupBy ¶ added in v1.3.0
type ProcessGroupBy struct {
// contains filtered or unexported fields
}
ProcessGroupBy is the group-by builder for Process entities.
func (*ProcessGroupBy) Aggregate ¶ added in v1.3.0
func (pgb *ProcessGroupBy) Aggregate(fns ...AggregateFunc) *ProcessGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProcessGroupBy) Bool ¶ added in v1.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Bools ¶ added in v1.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) BoolsX ¶ added in v1.3.0
BoolsX is like Bools, but panics if an error occurs.
func (*ProcessGroupBy) Float64 ¶ added in v1.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Float64X ¶ added in v1.3.0
Float64X is like Float64, but panics if an error occurs.
func (*ProcessGroupBy) Float64s ¶ added in v1.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Float64sX ¶ added in v1.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ProcessGroupBy) Int ¶ added in v1.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Ints ¶ added in v1.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Scan ¶ added in v1.3.0
func (pgb *ProcessGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProcessGroupBy) String ¶ added in v1.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) StringX ¶ added in v1.3.0
StringX is like String, but panics if an error occurs.
type ProcessMutation ¶ added in v1.3.0
type ProcessMutation struct {
// contains filtered or unexported fields
}
ProcessMutation represents an operation that mutates the Process nodes in the graph.
func (*ProcessMutation) AddAnchorID ¶ added in v1.3.0
func (m *ProcessMutation) AddAnchorID(i int)
AddAnchorID adds i to the "anchor_id" field.
func (*ProcessMutation) AddField ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) AddedAnchorID ¶ added in v1.3.0
func (m *ProcessMutation) AddedAnchorID() (r int, exists bool)
AddedAnchorID returns the value that was added to the "anchor_id" field in this mutation.
func (*ProcessMutation) AddedEdges ¶ added in v1.3.0
func (m *ProcessMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProcessMutation) AddedField ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) AddedFields ¶ added in v1.3.0
func (m *ProcessMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProcessMutation) AddedIDs ¶ added in v1.3.0
func (m *ProcessMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProcessMutation) AnchorID ¶ added in v1.3.0
func (m *ProcessMutation) AnchorID() (r int, exists bool)
AnchorID returns the value of the "anchor_id" field in the mutation.
func (*ProcessMutation) AnchorIDCleared ¶ added in v1.3.0
func (m *ProcessMutation) AnchorIDCleared() bool
AnchorIDCleared returns if the "anchor_id" field was cleared in this mutation.
func (*ProcessMutation) AppendProcessResponse ¶ added in v1.3.0
func (m *ProcessMutation) AppendProcessResponse(jm json.RawMessage)
AppendProcessResponse adds jm to the "process_response" field.
func (*ProcessMutation) AppendedProcessResponse ¶ added in v1.3.0
func (m *ProcessMutation) AppendedProcessResponse() (json.RawMessage, bool)
AppendedProcessResponse returns the list of values that were appended to the "process_response" field in this mutation.
func (*ProcessMutation) ClearAnchorID ¶ added in v1.3.0
func (m *ProcessMutation) ClearAnchorID()
ClearAnchorID clears the value of the "anchor_id" field.
func (*ProcessMutation) ClearEdge ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) ClearField ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) ClearProcessResponse ¶ added in v1.3.0
func (m *ProcessMutation) ClearProcessResponse()
ClearProcessResponse clears the value of the "process_response" field.
func (*ProcessMutation) ClearedEdges ¶ added in v1.3.0
func (m *ProcessMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProcessMutation) ClearedFields ¶ added in v1.3.0
func (m *ProcessMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProcessMutation) Client ¶ added in v1.3.0
func (m ProcessMutation) 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 (*ProcessMutation) CreatedAt ¶ added in v1.3.0
func (m *ProcessMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProcessMutation) EdgeCleared ¶ added in v1.3.0
func (m *ProcessMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProcessMutation) Field ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) FieldCleared ¶ added in v1.3.0
func (m *ProcessMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProcessMutation) Fields ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) Filename ¶ added in v1.3.0
func (m *ProcessMutation) Filename() (r string, exists bool)
Filename returns the value of the "filename" field in the mutation.
func (*ProcessMutation) Hash ¶ added in v1.3.0
func (m *ProcessMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*ProcessMutation) ID ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) IDs ¶ added in v1.3.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 (*ProcessMutation) IsAggregated ¶ added in v1.3.0
func (m *ProcessMutation) IsAggregated() (r bool, exists bool)
IsAggregated returns the value of the "is_aggregated" field in the mutation.
func (*ProcessMutation) OldAnchorID ¶ added in v1.3.0
func (m *ProcessMutation) OldAnchorID(ctx context.Context) (v int, err error)
OldAnchorID returns the old "anchor_id" field's value of the Process entity. If the Process object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProcessMutation) OldCreatedAt ¶ added in v1.3.0
OldCreatedAt returns the old "created_at" field's value of the Process entity. If the Process object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProcessMutation) OldField ¶ added in v1.3.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 (*ProcessMutation) OldFilename ¶ added in v1.3.0
func (m *ProcessMutation) OldFilename(ctx context.Context) (v string, err error)
OldFilename returns the old "filename" field's value of the Process entity. If the Process object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProcessMutation) OldHash ¶ added in v1.3.0
func (m *ProcessMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the Process entity. If the Process object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProcessMutation) OldIsAggregated ¶ added in v1.3.0
func (m *ProcessMutation) OldIsAggregated(ctx context.Context) (v bool, err error)
OldIsAggregated returns the old "is_aggregated" field's value of the Process entity. If the Process object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProcessMutation) OldProcessResponse ¶ added in v1.3.0
func (m *ProcessMutation) OldProcessResponse(ctx context.Context) (v json.RawMessage, err error)
OldProcessResponse returns the old "process_response" field's value of the Process entity. If the Process object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProcessMutation) OldStatus ¶ added in v1.3.0
func (m *ProcessMutation) OldStatus(ctx context.Context) (v bool, err error)
OldStatus returns the old "status" field's value of the Process entity. If the Process object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProcessMutation) Op ¶ added in v1.3.0
func (m *ProcessMutation) Op() Op
Op returns the operation name.
func (*ProcessMutation) ProcessResponse ¶ added in v1.3.0
func (m *ProcessMutation) ProcessResponse() (r json.RawMessage, exists bool)
ProcessResponse returns the value of the "process_response" field in the mutation.
func (*ProcessMutation) ProcessResponseCleared ¶ added in v1.3.0
func (m *ProcessMutation) ProcessResponseCleared() bool
ProcessResponseCleared returns if the "process_response" field was cleared in this mutation.
func (*ProcessMutation) RemovedEdges ¶ added in v1.3.0
func (m *ProcessMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProcessMutation) RemovedIDs ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) ResetAnchorID ¶ added in v1.3.0
func (m *ProcessMutation) ResetAnchorID()
ResetAnchorID resets all changes to the "anchor_id" field.
func (*ProcessMutation) ResetCreatedAt ¶ added in v1.3.0
func (m *ProcessMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProcessMutation) ResetEdge ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) ResetField ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) ResetFilename ¶ added in v1.3.0
func (m *ProcessMutation) ResetFilename()
ResetFilename resets all changes to the "filename" field.
func (*ProcessMutation) ResetHash ¶ added in v1.3.0
func (m *ProcessMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*ProcessMutation) ResetIsAggregated ¶ added in v1.3.0
func (m *ProcessMutation) ResetIsAggregated()
ResetIsAggregated resets all changes to the "is_aggregated" field.
func (*ProcessMutation) ResetProcessResponse ¶ added in v1.3.0
func (m *ProcessMutation) ResetProcessResponse()
ResetProcessResponse resets all changes to the "process_response" field.
func (*ProcessMutation) ResetStatus ¶ added in v1.3.0
func (m *ProcessMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*ProcessMutation) SetAnchorID ¶ added in v1.3.0
func (m *ProcessMutation) SetAnchorID(i int)
SetAnchorID sets the "anchor_id" field.
func (*ProcessMutation) SetCreatedAt ¶ added in v1.3.0
func (m *ProcessMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProcessMutation) SetField ¶ added in v1.3.0
func (m *ProcessMutation) 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 (*ProcessMutation) SetFilename ¶ added in v1.3.0
func (m *ProcessMutation) SetFilename(s string)
SetFilename sets the "filename" field.
func (*ProcessMutation) SetHash ¶ added in v1.3.0
func (m *ProcessMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*ProcessMutation) SetID ¶ added in v1.3.0
func (m *ProcessMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Process entities.
func (*ProcessMutation) SetIsAggregated ¶ added in v1.3.0
func (m *ProcessMutation) SetIsAggregated(b bool)
SetIsAggregated sets the "is_aggregated" field.
func (*ProcessMutation) SetOp ¶ added in v1.3.0
func (m *ProcessMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProcessMutation) SetProcessResponse ¶ added in v1.3.0
func (m *ProcessMutation) SetProcessResponse(jm json.RawMessage)
SetProcessResponse sets the "process_response" field.
func (*ProcessMutation) SetStatus ¶ added in v1.3.0
func (m *ProcessMutation) SetStatus(b bool)
SetStatus sets the "status" field.
func (*ProcessMutation) Status ¶ added in v1.3.0
func (m *ProcessMutation) Status() (r bool, exists bool)
Status returns the value of the "status" field in the mutation.
func (ProcessMutation) Tx ¶ added in v1.3.0
func (m ProcessMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProcessMutation) Type ¶ added in v1.3.0
func (m *ProcessMutation) Type() string
Type returns the node type of this mutation (Process).
func (*ProcessMutation) Where ¶ added in v1.3.0
func (m *ProcessMutation) Where(ps ...predicate.Process)
Where appends a list predicates to the ProcessMutation builder.
func (*ProcessMutation) WhereP ¶ added in v1.3.0
func (m *ProcessMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProcessMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProcessQuery ¶ added in v1.3.0
type ProcessQuery struct {
// contains filtered or unexported fields
}
ProcessQuery is the builder for querying Process entities.
func (*ProcessQuery) Aggregate ¶ added in v1.3.0
func (pq *ProcessQuery) Aggregate(fns ...AggregateFunc) *ProcessSelect
Aggregate returns a ProcessSelect configured with the given aggregations.
func (*ProcessQuery) All ¶ added in v1.3.0
func (pq *ProcessQuery) All(ctx context.Context) ([]*Process, error)
All executes the query and returns a list of Processes.
func (*ProcessQuery) AllX ¶ added in v1.3.0
func (pq *ProcessQuery) AllX(ctx context.Context) []*Process
AllX is like All, but panics if an error occurs.
func (*ProcessQuery) Clone ¶ added in v1.3.0
func (pq *ProcessQuery) Clone() *ProcessQuery
Clone returns a duplicate of the ProcessQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProcessQuery) Count ¶ added in v1.3.0
func (pq *ProcessQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProcessQuery) CountX ¶ added in v1.3.0
func (pq *ProcessQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProcessQuery) Exist ¶ added in v1.3.0
func (pq *ProcessQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProcessQuery) ExistX ¶ added in v1.3.0
func (pq *ProcessQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProcessQuery) First ¶ added in v1.3.0
func (pq *ProcessQuery) First(ctx context.Context) (*Process, error)
First returns the first Process entity from the query. Returns a *NotFoundError when no Process was found.
func (*ProcessQuery) FirstID ¶ added in v1.3.0
FirstID returns the first Process ID from the query. Returns a *NotFoundError when no Process ID was found.
func (*ProcessQuery) FirstIDX ¶ added in v1.3.0
func (pq *ProcessQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProcessQuery) FirstX ¶ added in v1.3.0
func (pq *ProcessQuery) FirstX(ctx context.Context) *Process
FirstX is like First, but panics if an error occurs.
func (*ProcessQuery) GroupBy ¶ added in v1.3.0
func (pq *ProcessQuery) GroupBy(field string, fields ...string) *ProcessGroupBy
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 { Filename string `json:"filename,omitempty"` Count int `json:"count,omitempty"` } client.Process.Query(). GroupBy(process.FieldFilename). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProcessQuery) IDs ¶ added in v1.3.0
IDs executes the query and returns a list of Process IDs.
func (*ProcessQuery) IDsX ¶ added in v1.3.0
func (pq *ProcessQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ProcessQuery) Limit ¶ added in v1.3.0
func (pq *ProcessQuery) Limit(limit int) *ProcessQuery
Limit the number of records to be returned by this query.
func (*ProcessQuery) Offset ¶ added in v1.3.0
func (pq *ProcessQuery) Offset(offset int) *ProcessQuery
Offset to start from.
func (*ProcessQuery) Only ¶ added in v1.3.0
func (pq *ProcessQuery) Only(ctx context.Context) (*Process, error)
Only returns a single Process entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Process entity is found. Returns a *NotFoundError when no Process entities are found.
func (*ProcessQuery) OnlyID ¶ added in v1.3.0
OnlyID is like Only, but returns the only Process ID in the query. Returns a *NotSingularError when more than one Process ID is found. Returns a *NotFoundError when no entities are found.
func (*ProcessQuery) OnlyIDX ¶ added in v1.3.0
func (pq *ProcessQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProcessQuery) OnlyX ¶ added in v1.3.0
func (pq *ProcessQuery) OnlyX(ctx context.Context) *Process
OnlyX is like Only, but panics if an error occurs.
func (*ProcessQuery) Order ¶ added in v1.3.0
func (pq *ProcessQuery) Order(o ...process.OrderOption) *ProcessQuery
Order specifies how the records should be ordered.
func (*ProcessQuery) Select ¶ added in v1.3.0
func (pq *ProcessQuery) Select(fields ...string) *ProcessSelect
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 { Filename string `json:"filename,omitempty"` } client.Process.Query(). Select(process.FieldFilename). Scan(ctx, &v)
func (*ProcessQuery) Unique ¶ added in v1.3.0
func (pq *ProcessQuery) Unique(unique bool) *ProcessQuery
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 (*ProcessQuery) Where ¶ added in v1.3.0
func (pq *ProcessQuery) Where(ps ...predicate.Process) *ProcessQuery
Where adds a new predicate for the ProcessQuery builder.
type ProcessSelect ¶ added in v1.3.0
type ProcessSelect struct { *ProcessQuery // contains filtered or unexported fields }
ProcessSelect is the builder for selecting fields of Process entities.
func (*ProcessSelect) Aggregate ¶ added in v1.3.0
func (ps *ProcessSelect) Aggregate(fns ...AggregateFunc) *ProcessSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProcessSelect) Bool ¶ added in v1.3.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Bools ¶ added in v1.3.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Float64 ¶ added in v1.3.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Float64X ¶ added in v1.3.0
Float64X is like Float64, but panics if an error occurs.
func (*ProcessSelect) Float64s ¶ added in v1.3.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Float64sX ¶ added in v1.3.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ProcessSelect) Int ¶ added in v1.3.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Ints ¶ added in v1.3.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Scan ¶ added in v1.3.0
func (ps *ProcessSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProcessSelect) String ¶ added in v1.3.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) StringX ¶ added in v1.3.0
StringX is like String, but panics if an error occurs.
type ProcessUpdate ¶ added in v1.3.0
type ProcessUpdate struct {
// contains filtered or unexported fields
}
ProcessUpdate is the builder for updating Process entities.
func (*ProcessUpdate) AddAnchorID ¶ added in v1.3.0
func (pu *ProcessUpdate) AddAnchorID(i int) *ProcessUpdate
AddAnchorID adds i to the "anchor_id" field.
func (*ProcessUpdate) AppendProcessResponse ¶ added in v1.3.0
func (pu *ProcessUpdate) AppendProcessResponse(jm json.RawMessage) *ProcessUpdate
AppendProcessResponse appends jm to the "process_response" field.
func (*ProcessUpdate) ClearAnchorID ¶ added in v1.3.0
func (pu *ProcessUpdate) ClearAnchorID() *ProcessUpdate
ClearAnchorID clears the value of the "anchor_id" field.
func (*ProcessUpdate) ClearProcessResponse ¶ added in v1.3.0
func (pu *ProcessUpdate) ClearProcessResponse() *ProcessUpdate
ClearProcessResponse clears the value of the "process_response" field.
func (*ProcessUpdate) Exec ¶ added in v1.3.0
func (pu *ProcessUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessUpdate) ExecX ¶ added in v1.3.0
func (pu *ProcessUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessUpdate) Mutation ¶ added in v1.3.0
func (pu *ProcessUpdate) Mutation() *ProcessMutation
Mutation returns the ProcessMutation object of the builder.
func (*ProcessUpdate) Save ¶ added in v1.3.0
func (pu *ProcessUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProcessUpdate) SaveX ¶ added in v1.3.0
func (pu *ProcessUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProcessUpdate) SetAnchorID ¶ added in v1.3.0
func (pu *ProcessUpdate) SetAnchorID(i int) *ProcessUpdate
SetAnchorID sets the "anchor_id" field.
func (*ProcessUpdate) SetCreatedAt ¶ added in v1.3.0
func (pu *ProcessUpdate) SetCreatedAt(t time.Time) *ProcessUpdate
SetCreatedAt sets the "created_at" field.
func (*ProcessUpdate) SetFilename ¶ added in v1.3.0
func (pu *ProcessUpdate) SetFilename(s string) *ProcessUpdate
SetFilename sets the "filename" field.
func (*ProcessUpdate) SetHash ¶ added in v1.3.0
func (pu *ProcessUpdate) SetHash(s string) *ProcessUpdate
SetHash sets the "hash" field.
func (*ProcessUpdate) SetIsAggregated ¶ added in v1.3.0
func (pu *ProcessUpdate) SetIsAggregated(b bool) *ProcessUpdate
SetIsAggregated sets the "is_aggregated" field.
func (*ProcessUpdate) SetNillableAnchorID ¶ added in v1.3.0
func (pu *ProcessUpdate) SetNillableAnchorID(i *int) *ProcessUpdate
SetNillableAnchorID sets the "anchor_id" field if the given value is not nil.
func (*ProcessUpdate) SetNillableCreatedAt ¶ added in v1.3.0
func (pu *ProcessUpdate) SetNillableCreatedAt(t *time.Time) *ProcessUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProcessUpdate) SetNillableIsAggregated ¶ added in v1.3.0
func (pu *ProcessUpdate) SetNillableIsAggregated(b *bool) *ProcessUpdate
SetNillableIsAggregated sets the "is_aggregated" field if the given value is not nil.
func (*ProcessUpdate) SetNillableStatus ¶ added in v1.3.0
func (pu *ProcessUpdate) SetNillableStatus(b *bool) *ProcessUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ProcessUpdate) SetProcessResponse ¶ added in v1.3.0
func (pu *ProcessUpdate) SetProcessResponse(jm json.RawMessage) *ProcessUpdate
SetProcessResponse sets the "process_response" field.
func (*ProcessUpdate) SetStatus ¶ added in v1.3.0
func (pu *ProcessUpdate) SetStatus(b bool) *ProcessUpdate
SetStatus sets the "status" field.
func (*ProcessUpdate) Where ¶ added in v1.3.0
func (pu *ProcessUpdate) Where(ps ...predicate.Process) *ProcessUpdate
Where appends a list predicates to the ProcessUpdate builder.
type ProcessUpdateOne ¶ added in v1.3.0
type ProcessUpdateOne struct {
// contains filtered or unexported fields
}
ProcessUpdateOne is the builder for updating a single Process entity.
func (*ProcessUpdateOne) AddAnchorID ¶ added in v1.3.0
func (puo *ProcessUpdateOne) AddAnchorID(i int) *ProcessUpdateOne
AddAnchorID adds i to the "anchor_id" field.
func (*ProcessUpdateOne) AppendProcessResponse ¶ added in v1.3.0
func (puo *ProcessUpdateOne) AppendProcessResponse(jm json.RawMessage) *ProcessUpdateOne
AppendProcessResponse appends jm to the "process_response" field.
func (*ProcessUpdateOne) ClearAnchorID ¶ added in v1.3.0
func (puo *ProcessUpdateOne) ClearAnchorID() *ProcessUpdateOne
ClearAnchorID clears the value of the "anchor_id" field.
func (*ProcessUpdateOne) ClearProcessResponse ¶ added in v1.3.0
func (puo *ProcessUpdateOne) ClearProcessResponse() *ProcessUpdateOne
ClearProcessResponse clears the value of the "process_response" field.
func (*ProcessUpdateOne) Exec ¶ added in v1.3.0
func (puo *ProcessUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProcessUpdateOne) ExecX ¶ added in v1.3.0
func (puo *ProcessUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessUpdateOne) Mutation ¶ added in v1.3.0
func (puo *ProcessUpdateOne) Mutation() *ProcessMutation
Mutation returns the ProcessMutation object of the builder.
func (*ProcessUpdateOne) Save ¶ added in v1.3.0
func (puo *ProcessUpdateOne) Save(ctx context.Context) (*Process, error)
Save executes the query and returns the updated Process entity.
func (*ProcessUpdateOne) SaveX ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SaveX(ctx context.Context) *Process
SaveX is like Save, but panics if an error occurs.
func (*ProcessUpdateOne) Select ¶ added in v1.3.0
func (puo *ProcessUpdateOne) Select(field string, fields ...string) *ProcessUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProcessUpdateOne) SetAnchorID ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetAnchorID(i int) *ProcessUpdateOne
SetAnchorID sets the "anchor_id" field.
func (*ProcessUpdateOne) SetCreatedAt ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetCreatedAt(t time.Time) *ProcessUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ProcessUpdateOne) SetFilename ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetFilename(s string) *ProcessUpdateOne
SetFilename sets the "filename" field.
func (*ProcessUpdateOne) SetHash ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetHash(s string) *ProcessUpdateOne
SetHash sets the "hash" field.
func (*ProcessUpdateOne) SetIsAggregated ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetIsAggregated(b bool) *ProcessUpdateOne
SetIsAggregated sets the "is_aggregated" field.
func (*ProcessUpdateOne) SetNillableAnchorID ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetNillableAnchorID(i *int) *ProcessUpdateOne
SetNillableAnchorID sets the "anchor_id" field if the given value is not nil.
func (*ProcessUpdateOne) SetNillableCreatedAt ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetNillableCreatedAt(t *time.Time) *ProcessUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProcessUpdateOne) SetNillableIsAggregated ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetNillableIsAggregated(b *bool) *ProcessUpdateOne
SetNillableIsAggregated sets the "is_aggregated" field if the given value is not nil.
func (*ProcessUpdateOne) SetNillableStatus ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetNillableStatus(b *bool) *ProcessUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*ProcessUpdateOne) SetProcessResponse ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetProcessResponse(jm json.RawMessage) *ProcessUpdateOne
SetProcessResponse sets the "process_response" field.
func (*ProcessUpdateOne) SetStatus ¶ added in v1.3.0
func (puo *ProcessUpdateOne) SetStatus(b bool) *ProcessUpdateOne
SetStatus sets the "status" field.
func (*ProcessUpdateOne) Where ¶ added in v1.3.0
func (puo *ProcessUpdateOne) Where(ps ...predicate.Process) *ProcessUpdateOne
Where appends a list predicates to the ProcessUpdate builder.
type Processes ¶ added in v1.3.0
type Processes []*Process
Processes is a parsable slice of Process.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Certification is the client for interacting with the Certification builders. Certification *CertificationClient // LocalKey is the client for interacting with the LocalKey builders. LocalKey *LocalKeyClient // Message is the client for interacting with the Message builders. Message *MessageClient // Process is the client for interacting with the Process builders. Process *ProcessClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- certification.go
- certification_create.go
- certification_delete.go
- certification_query.go
- certification_update.go
- client.go
- ent.go
- localkey.go
- localkey_create.go
- localkey_delete.go
- localkey_query.go
- localkey_update.go
- message.go
- message_create.go
- message_delete.go
- message_query.go
- message_update.go
- mutation.go
- process.go
- process_create.go
- process_delete.go
- process_query.go
- process_update.go
- runtime.go
- tx.go