Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Histories
- type History
- type HistoryClient
- func (c *HistoryClient) Create() *HistoryCreate
- func (c *HistoryClient) CreateBulk(builders ...*HistoryCreate) *HistoryCreateBulk
- func (c *HistoryClient) Delete() *HistoryDelete
- func (c *HistoryClient) DeleteOne(_m *History) *HistoryDeleteOne
- func (c *HistoryClient) DeleteOneID(id int) *HistoryDeleteOne
- func (c *HistoryClient) Get(ctx context.Context, id int) (*History, error)
- func (c *HistoryClient) GetX(ctx context.Context, id int) *History
- func (c *HistoryClient) Hooks() []Hook
- func (c *HistoryClient) Intercept(interceptors ...Interceptor)
- func (c *HistoryClient) Interceptors() []Interceptor
- func (c *HistoryClient) MapCreateBulk(slice any, setFunc func(*HistoryCreate, int)) *HistoryCreateBulk
- func (c *HistoryClient) Query() *HistoryQuery
- func (c *HistoryClient) QueryNode(_m *History) *NodeQuery
- func (c *HistoryClient) Update() *HistoryUpdate
- func (c *HistoryClient) UpdateOne(_m *History) *HistoryUpdateOne
- func (c *HistoryClient) UpdateOneID(id int) *HistoryUpdateOne
- func (c *HistoryClient) Use(hooks ...Hook)
- type HistoryCreate
- func (_c *HistoryCreate) Exec(ctx context.Context) error
- func (_c *HistoryCreate) ExecX(ctx context.Context)
- func (_c *HistoryCreate) Mutation() *HistoryMutation
- func (_c *HistoryCreate) Save(ctx context.Context) (*History, error)
- func (_c *HistoryCreate) SaveX(ctx context.Context) *History
- func (_c *HistoryCreate) SetComment(v string) *HistoryCreate
- func (_c *HistoryCreate) SetCreatedAt(v time.Time) *HistoryCreate
- func (_c *HistoryCreate) SetFromState(v string) *HistoryCreate
- func (_c *HistoryCreate) SetID(v int) *HistoryCreate
- func (_c *HistoryCreate) SetNid(v int) *HistoryCreate
- func (_c *HistoryCreate) SetNillableUID(v *int) *HistoryCreate
- func (_c *HistoryCreate) SetNode(v *Node) *HistoryCreate
- func (_c *HistoryCreate) SetNodeID(id int) *HistoryCreate
- func (_c *HistoryCreate) SetToState(v string) *HistoryCreate
- func (_c *HistoryCreate) SetUID(v int) *HistoryCreate
- type HistoryCreateBulk
- type HistoryDelete
- type HistoryDeleteOne
- type HistoryEdges
- type HistoryGroupBy
- func (_g *HistoryGroupBy) Aggregate(fns ...AggregateFunc) *HistoryGroupBy
- func (s *HistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *HistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *HistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HistoryGroupBy) IntX(ctx context.Context) int
- func (s *HistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HistoryGroupBy) IntsX(ctx context.Context) []int
- func (_g *HistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *HistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *HistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HistoryGroupBy) StringX(ctx context.Context) string
- func (s *HistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HistoryGroupBy) StringsX(ctx context.Context) []string
- type HistoryMutation
- func (m *HistoryMutation) AddField(name string, value ent.Value) error
- func (m *HistoryMutation) AddUID(i int)
- func (m *HistoryMutation) AddedEdges() []string
- func (m *HistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *HistoryMutation) AddedFields() []string
- func (m *HistoryMutation) AddedIDs(name string) []ent.Value
- func (m *HistoryMutation) AddedUID() (r int, exists bool)
- func (m *HistoryMutation) ClearEdge(name string) error
- func (m *HistoryMutation) ClearField(name string) error
- func (m *HistoryMutation) ClearNode()
- func (m *HistoryMutation) ClearedEdges() []string
- func (m *HistoryMutation) ClearedFields() []string
- func (m HistoryMutation) Client() *Client
- func (m *HistoryMutation) Comment() (r string, exists bool)
- func (m *HistoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *HistoryMutation) EdgeCleared(name string) bool
- func (m *HistoryMutation) Field(name string) (ent.Value, bool)
- func (m *HistoryMutation) FieldCleared(name string) bool
- func (m *HistoryMutation) Fields() []string
- func (m *HistoryMutation) FromState() (r string, exists bool)
- func (m *HistoryMutation) ID() (id int, exists bool)
- func (m *HistoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *HistoryMutation) Nid() (r int, exists bool)
- func (m *HistoryMutation) NodeCleared() bool
- func (m *HistoryMutation) NodeID() (id int, exists bool)
- func (m *HistoryMutation) NodeIDs() (ids []int)
- func (m *HistoryMutation) OldComment(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *HistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HistoryMutation) OldFromState(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldNid(ctx context.Context) (v int, err error)
- func (m *HistoryMutation) OldToState(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldUID(ctx context.Context) (v int, err error)
- func (m *HistoryMutation) Op() Op
- func (m *HistoryMutation) RemovedEdges() []string
- func (m *HistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *HistoryMutation) ResetComment()
- func (m *HistoryMutation) ResetCreatedAt()
- func (m *HistoryMutation) ResetEdge(name string) error
- func (m *HistoryMutation) ResetField(name string) error
- func (m *HistoryMutation) ResetFromState()
- func (m *HistoryMutation) ResetNid()
- func (m *HistoryMutation) ResetNode()
- func (m *HistoryMutation) ResetToState()
- func (m *HistoryMutation) ResetUID()
- func (m *HistoryMutation) SetComment(s string)
- func (m *HistoryMutation) SetCreatedAt(t time.Time)
- func (m *HistoryMutation) SetField(name string, value ent.Value) error
- func (m *HistoryMutation) SetFromState(s string)
- func (m *HistoryMutation) SetID(id int)
- func (m *HistoryMutation) SetNid(i int)
- func (m *HistoryMutation) SetNodeID(id int)
- func (m *HistoryMutation) SetOp(op Op)
- func (m *HistoryMutation) SetToState(s string)
- func (m *HistoryMutation) SetUID(i int)
- func (m *HistoryMutation) ToState() (r string, exists bool)
- func (m HistoryMutation) Tx() (*Tx, error)
- func (m *HistoryMutation) Type() string
- func (m *HistoryMutation) UID() (r int, exists bool)
- func (m *HistoryMutation) Where(ps ...predicate.History)
- func (m *HistoryMutation) WhereP(ps ...func(*sql.Selector))
- type HistoryQuery
- func (_q *HistoryQuery) Aggregate(fns ...AggregateFunc) *HistorySelect
- func (_q *HistoryQuery) All(ctx context.Context) ([]*History, error)
- func (_q *HistoryQuery) AllX(ctx context.Context) []*History
- func (_q *HistoryQuery) Clone() *HistoryQuery
- func (_q *HistoryQuery) Count(ctx context.Context) (int, error)
- func (_q *HistoryQuery) CountX(ctx context.Context) int
- func (_q *HistoryQuery) Exist(ctx context.Context) (bool, error)
- func (_q *HistoryQuery) ExistX(ctx context.Context) bool
- func (_q *HistoryQuery) First(ctx context.Context) (*History, error)
- func (_q *HistoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *HistoryQuery) FirstIDX(ctx context.Context) int
- func (_q *HistoryQuery) FirstX(ctx context.Context) *History
- func (_q *HistoryQuery) GroupBy(field string, fields ...string) *HistoryGroupBy
- func (_q *HistoryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *HistoryQuery) IDsX(ctx context.Context) []int
- func (_q *HistoryQuery) Limit(limit int) *HistoryQuery
- func (_q *HistoryQuery) Offset(offset int) *HistoryQuery
- func (_q *HistoryQuery) Only(ctx context.Context) (*History, error)
- func (_q *HistoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *HistoryQuery) OnlyIDX(ctx context.Context) int
- func (_q *HistoryQuery) OnlyX(ctx context.Context) *History
- func (_q *HistoryQuery) Order(o ...history.OrderOption) *HistoryQuery
- func (_q *HistoryQuery) QueryNode() *NodeQuery
- func (_q *HistoryQuery) Select(fields ...string) *HistorySelect
- func (_q *HistoryQuery) Unique(unique bool) *HistoryQuery
- func (_q *HistoryQuery) Where(ps ...predicate.History) *HistoryQuery
- func (_q *HistoryQuery) WithNode(opts ...func(*NodeQuery)) *HistoryQuery
- type HistorySelect
- func (_s *HistorySelect) Aggregate(fns ...AggregateFunc) *HistorySelect
- func (s *HistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HistorySelect) BoolX(ctx context.Context) bool
- func (s *HistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HistorySelect) BoolsX(ctx context.Context) []bool
- func (s *HistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HistorySelect) Float64X(ctx context.Context) float64
- func (s *HistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HistorySelect) Float64sX(ctx context.Context) []float64
- func (s *HistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *HistorySelect) IntX(ctx context.Context) int
- func (s *HistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *HistorySelect) IntsX(ctx context.Context) []int
- func (_s *HistorySelect) Scan(ctx context.Context, v any) error
- func (s *HistorySelect) ScanX(ctx context.Context, v any)
- func (s *HistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *HistorySelect) StringX(ctx context.Context) string
- func (s *HistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *HistorySelect) StringsX(ctx context.Context) []string
- type HistoryUpdate
- func (_u *HistoryUpdate) AddUID(v int) *HistoryUpdate
- func (_u *HistoryUpdate) ClearNode() *HistoryUpdate
- func (_u *HistoryUpdate) Exec(ctx context.Context) error
- func (_u *HistoryUpdate) ExecX(ctx context.Context)
- func (_u *HistoryUpdate) Mutation() *HistoryMutation
- func (_u *HistoryUpdate) Save(ctx context.Context) (int, error)
- func (_u *HistoryUpdate) SaveX(ctx context.Context) int
- func (_u *HistoryUpdate) SetComment(v string) *HistoryUpdate
- func (_u *HistoryUpdate) SetCreatedAt(v time.Time) *HistoryUpdate
- func (_u *HistoryUpdate) SetFromState(v string) *HistoryUpdate
- func (_u *HistoryUpdate) SetNid(v int) *HistoryUpdate
- func (_u *HistoryUpdate) SetNillableComment(v *string) *HistoryUpdate
- func (_u *HistoryUpdate) SetNillableCreatedAt(v *time.Time) *HistoryUpdate
- func (_u *HistoryUpdate) SetNillableFromState(v *string) *HistoryUpdate
- func (_u *HistoryUpdate) SetNillableNid(v *int) *HistoryUpdate
- func (_u *HistoryUpdate) SetNillableToState(v *string) *HistoryUpdate
- func (_u *HistoryUpdate) SetNillableUID(v *int) *HistoryUpdate
- func (_u *HistoryUpdate) SetNode(v *Node) *HistoryUpdate
- func (_u *HistoryUpdate) SetNodeID(id int) *HistoryUpdate
- func (_u *HistoryUpdate) SetToState(v string) *HistoryUpdate
- func (_u *HistoryUpdate) SetUID(v int) *HistoryUpdate
- func (_u *HistoryUpdate) Where(ps ...predicate.History) *HistoryUpdate
- type HistoryUpdateOne
- func (_u *HistoryUpdateOne) AddUID(v int) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) ClearNode() *HistoryUpdateOne
- func (_u *HistoryUpdateOne) Exec(ctx context.Context) error
- func (_u *HistoryUpdateOne) ExecX(ctx context.Context)
- func (_u *HistoryUpdateOne) Mutation() *HistoryMutation
- func (_u *HistoryUpdateOne) Save(ctx context.Context) (*History, error)
- func (_u *HistoryUpdateOne) SaveX(ctx context.Context) *History
- func (_u *HistoryUpdateOne) Select(field string, fields ...string) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetComment(v string) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetCreatedAt(v time.Time) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetFromState(v string) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNid(v int) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNillableComment(v *string) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNillableCreatedAt(v *time.Time) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNillableFromState(v *string) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNillableNid(v *int) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNillableToState(v *string) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNillableUID(v *int) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNode(v *Node) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetNodeID(id int) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetToState(v string) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) SetUID(v int) *HistoryUpdateOne
- func (_u *HistoryUpdateOne) Where(ps ...predicate.History) *HistoryUpdateOne
- type Hook
- type InterceptFunc
- type Interceptor
- type Lock
- type LockClient
- func (c *LockClient) Create() *LockCreate
- func (c *LockClient) CreateBulk(builders ...*LockCreate) *LockCreateBulk
- func (c *LockClient) Delete() *LockDelete
- func (c *LockClient) DeleteOne(_m *Lock) *LockDeleteOne
- func (c *LockClient) DeleteOneID(id int) *LockDeleteOne
- func (c *LockClient) Get(ctx context.Context, id int) (*Lock, error)
- func (c *LockClient) GetX(ctx context.Context, id int) *Lock
- func (c *LockClient) Hooks() []Hook
- func (c *LockClient) Intercept(interceptors ...Interceptor)
- func (c *LockClient) Interceptors() []Interceptor
- func (c *LockClient) MapCreateBulk(slice any, setFunc func(*LockCreate, int)) *LockCreateBulk
- func (c *LockClient) Query() *LockQuery
- func (c *LockClient) QueryNode(_m *Lock) *NodeQuery
- func (c *LockClient) Update() *LockUpdate
- func (c *LockClient) UpdateOne(_m *Lock) *LockUpdateOne
- func (c *LockClient) UpdateOneID(id int) *LockUpdateOne
- func (c *LockClient) Use(hooks ...Hook)
- type LockCreate
- func (_c *LockCreate) Exec(ctx context.Context) error
- func (_c *LockCreate) ExecX(ctx context.Context)
- func (_c *LockCreate) Mutation() *LockMutation
- func (_c *LockCreate) Save(ctx context.Context) (*Lock, error)
- func (_c *LockCreate) SaveX(ctx context.Context) *Lock
- func (_c *LockCreate) SetID(v int) *LockCreate
- func (_c *LockCreate) SetLockedAt(v time.Time) *LockCreate
- func (_c *LockCreate) SetNid(v int) *LockCreate
- func (_c *LockCreate) SetNode(v *Node) *LockCreate
- func (_c *LockCreate) SetNodeID(id int) *LockCreate
- func (_c *LockCreate) SetTouchedAt(v time.Time) *LockCreate
- func (_c *LockCreate) SetUID(v int) *LockCreate
- type LockCreateBulk
- type LockDelete
- type LockDeleteOne
- type LockEdges
- type LockGroupBy
- func (_g *LockGroupBy) Aggregate(fns ...AggregateFunc) *LockGroupBy
- func (s *LockGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LockGroupBy) BoolX(ctx context.Context) bool
- func (s *LockGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LockGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LockGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LockGroupBy) Float64X(ctx context.Context) float64
- func (s *LockGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LockGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LockGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LockGroupBy) IntX(ctx context.Context) int
- func (s *LockGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LockGroupBy) IntsX(ctx context.Context) []int
- func (_g *LockGroupBy) Scan(ctx context.Context, v any) error
- func (s *LockGroupBy) ScanX(ctx context.Context, v any)
- func (s *LockGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LockGroupBy) StringX(ctx context.Context) string
- func (s *LockGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LockGroupBy) StringsX(ctx context.Context) []string
- type LockMutation
- func (m *LockMutation) AddField(name string, value ent.Value) error
- func (m *LockMutation) AddUID(i int)
- func (m *LockMutation) AddedEdges() []string
- func (m *LockMutation) AddedField(name string) (ent.Value, bool)
- func (m *LockMutation) AddedFields() []string
- func (m *LockMutation) AddedIDs(name string) []ent.Value
- func (m *LockMutation) AddedUID() (r int, exists bool)
- func (m *LockMutation) ClearEdge(name string) error
- func (m *LockMutation) ClearField(name string) error
- func (m *LockMutation) ClearNode()
- func (m *LockMutation) ClearedEdges() []string
- func (m *LockMutation) ClearedFields() []string
- func (m LockMutation) Client() *Client
- func (m *LockMutation) EdgeCleared(name string) bool
- func (m *LockMutation) Field(name string) (ent.Value, bool)
- func (m *LockMutation) FieldCleared(name string) bool
- func (m *LockMutation) Fields() []string
- func (m *LockMutation) ID() (id int, exists bool)
- func (m *LockMutation) IDs(ctx context.Context) ([]int, error)
- func (m *LockMutation) LockedAt() (r time.Time, exists bool)
- func (m *LockMutation) Nid() (r int, exists bool)
- func (m *LockMutation) NodeCleared() bool
- func (m *LockMutation) NodeID() (id int, exists bool)
- func (m *LockMutation) NodeIDs() (ids []int)
- func (m *LockMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LockMutation) OldLockedAt(ctx context.Context) (v time.Time, err error)
- func (m *LockMutation) OldNid(ctx context.Context) (v int, err error)
- func (m *LockMutation) OldTouchedAt(ctx context.Context) (v time.Time, err error)
- func (m *LockMutation) OldUID(ctx context.Context) (v int, err error)
- func (m *LockMutation) Op() Op
- func (m *LockMutation) RemovedEdges() []string
- func (m *LockMutation) RemovedIDs(name string) []ent.Value
- func (m *LockMutation) ResetEdge(name string) error
- func (m *LockMutation) ResetField(name string) error
- func (m *LockMutation) ResetLockedAt()
- func (m *LockMutation) ResetNid()
- func (m *LockMutation) ResetNode()
- func (m *LockMutation) ResetTouchedAt()
- func (m *LockMutation) ResetUID()
- func (m *LockMutation) SetField(name string, value ent.Value) error
- func (m *LockMutation) SetID(id int)
- func (m *LockMutation) SetLockedAt(t time.Time)
- func (m *LockMutation) SetNid(i int)
- func (m *LockMutation) SetNodeID(id int)
- func (m *LockMutation) SetOp(op Op)
- func (m *LockMutation) SetTouchedAt(t time.Time)
- func (m *LockMutation) SetUID(i int)
- func (m *LockMutation) TouchedAt() (r time.Time, exists bool)
- func (m LockMutation) Tx() (*Tx, error)
- func (m *LockMutation) Type() string
- func (m *LockMutation) UID() (r int, exists bool)
- func (m *LockMutation) Where(ps ...predicate.Lock)
- func (m *LockMutation) WhereP(ps ...func(*sql.Selector))
- type LockQuery
- func (_q *LockQuery) Aggregate(fns ...AggregateFunc) *LockSelect
- func (_q *LockQuery) All(ctx context.Context) ([]*Lock, error)
- func (_q *LockQuery) AllX(ctx context.Context) []*Lock
- func (_q *LockQuery) Clone() *LockQuery
- func (_q *LockQuery) Count(ctx context.Context) (int, error)
- func (_q *LockQuery) CountX(ctx context.Context) int
- func (_q *LockQuery) Exist(ctx context.Context) (bool, error)
- func (_q *LockQuery) ExistX(ctx context.Context) bool
- func (_q *LockQuery) First(ctx context.Context) (*Lock, error)
- func (_q *LockQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *LockQuery) FirstIDX(ctx context.Context) int
- func (_q *LockQuery) FirstX(ctx context.Context) *Lock
- func (_q *LockQuery) GroupBy(field string, fields ...string) *LockGroupBy
- func (_q *LockQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *LockQuery) IDsX(ctx context.Context) []int
- func (_q *LockQuery) Limit(limit int) *LockQuery
- func (_q *LockQuery) Offset(offset int) *LockQuery
- func (_q *LockQuery) Only(ctx context.Context) (*Lock, error)
- func (_q *LockQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *LockQuery) OnlyIDX(ctx context.Context) int
- func (_q *LockQuery) OnlyX(ctx context.Context) *Lock
- func (_q *LockQuery) Order(o ...lock.OrderOption) *LockQuery
- func (_q *LockQuery) QueryNode() *NodeQuery
- func (_q *LockQuery) Select(fields ...string) *LockSelect
- func (_q *LockQuery) Unique(unique bool) *LockQuery
- func (_q *LockQuery) Where(ps ...predicate.Lock) *LockQuery
- func (_q *LockQuery) WithNode(opts ...func(*NodeQuery)) *LockQuery
- type LockSelect
- func (_s *LockSelect) Aggregate(fns ...AggregateFunc) *LockSelect
- func (s *LockSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LockSelect) BoolX(ctx context.Context) bool
- func (s *LockSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LockSelect) BoolsX(ctx context.Context) []bool
- func (s *LockSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LockSelect) Float64X(ctx context.Context) float64
- func (s *LockSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LockSelect) Float64sX(ctx context.Context) []float64
- func (s *LockSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LockSelect) IntX(ctx context.Context) int
- func (s *LockSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LockSelect) IntsX(ctx context.Context) []int
- func (_s *LockSelect) Scan(ctx context.Context, v any) error
- func (s *LockSelect) ScanX(ctx context.Context, v any)
- func (s *LockSelect) String(ctx context.Context) (_ string, err error)
- func (s *LockSelect) StringX(ctx context.Context) string
- func (s *LockSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LockSelect) StringsX(ctx context.Context) []string
- type LockUpdate
- func (_u *LockUpdate) AddUID(v int) *LockUpdate
- func (_u *LockUpdate) ClearNode() *LockUpdate
- func (_u *LockUpdate) Exec(ctx context.Context) error
- func (_u *LockUpdate) ExecX(ctx context.Context)
- func (_u *LockUpdate) Mutation() *LockMutation
- func (_u *LockUpdate) Save(ctx context.Context) (int, error)
- func (_u *LockUpdate) SaveX(ctx context.Context) int
- func (_u *LockUpdate) SetLockedAt(v time.Time) *LockUpdate
- func (_u *LockUpdate) SetNid(v int) *LockUpdate
- func (_u *LockUpdate) SetNillableLockedAt(v *time.Time) *LockUpdate
- func (_u *LockUpdate) SetNillableNid(v *int) *LockUpdate
- func (_u *LockUpdate) SetNillableTouchedAt(v *time.Time) *LockUpdate
- func (_u *LockUpdate) SetNillableUID(v *int) *LockUpdate
- func (_u *LockUpdate) SetNode(v *Node) *LockUpdate
- func (_u *LockUpdate) SetNodeID(id int) *LockUpdate
- func (_u *LockUpdate) SetTouchedAt(v time.Time) *LockUpdate
- func (_u *LockUpdate) SetUID(v int) *LockUpdate
- func (_u *LockUpdate) Where(ps ...predicate.Lock) *LockUpdate
- type LockUpdateOne
- func (_u *LockUpdateOne) AddUID(v int) *LockUpdateOne
- func (_u *LockUpdateOne) ClearNode() *LockUpdateOne
- func (_u *LockUpdateOne) Exec(ctx context.Context) error
- func (_u *LockUpdateOne) ExecX(ctx context.Context)
- func (_u *LockUpdateOne) Mutation() *LockMutation
- func (_u *LockUpdateOne) Save(ctx context.Context) (*Lock, error)
- func (_u *LockUpdateOne) SaveX(ctx context.Context) *Lock
- func (_u *LockUpdateOne) Select(field string, fields ...string) *LockUpdateOne
- func (_u *LockUpdateOne) SetLockedAt(v time.Time) *LockUpdateOne
- func (_u *LockUpdateOne) SetNid(v int) *LockUpdateOne
- func (_u *LockUpdateOne) SetNillableLockedAt(v *time.Time) *LockUpdateOne
- func (_u *LockUpdateOne) SetNillableNid(v *int) *LockUpdateOne
- func (_u *LockUpdateOne) SetNillableTouchedAt(v *time.Time) *LockUpdateOne
- func (_u *LockUpdateOne) SetNillableUID(v *int) *LockUpdateOne
- func (_u *LockUpdateOne) SetNode(v *Node) *LockUpdateOne
- func (_u *LockUpdateOne) SetNodeID(id int) *LockUpdateOne
- func (_u *LockUpdateOne) SetTouchedAt(v time.Time) *LockUpdateOne
- func (_u *LockUpdateOne) SetUID(v int) *LockUpdateOne
- func (_u *LockUpdateOne) Where(ps ...predicate.Lock) *LockUpdateOne
- type Locks
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeClient
- func (c *NodeClient) Create() *NodeCreate
- func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
- func (c *NodeClient) Delete() *NodeDelete
- func (c *NodeClient) DeleteOne(_m *Node) *NodeDeleteOne
- func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
- func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error)
- func (c *NodeClient) GetX(ctx context.Context, id int) *Node
- func (c *NodeClient) Hooks() []Hook
- func (c *NodeClient) Intercept(interceptors ...Interceptor)
- func (c *NodeClient) Interceptors() []Interceptor
- func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
- func (c *NodeClient) Query() *NodeQuery
- func (c *NodeClient) Update() *NodeUpdate
- func (c *NodeClient) UpdateOne(_m *Node) *NodeUpdateOne
- func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
- func (c *NodeClient) Use(hooks ...Hook)
- type NodeCreate
- func (_c *NodeCreate) Exec(ctx context.Context) error
- func (_c *NodeCreate) ExecX(ctx context.Context)
- func (_c *NodeCreate) Mutation() *NodeMutation
- func (_c *NodeCreate) Save(ctx context.Context) (*Node, error)
- func (_c *NodeCreate) SaveX(ctx context.Context) *Node
- func (_c *NodeCreate) SetID(v int) *NodeCreate
- type NodeCreateBulk
- type NodeDelete
- type NodeDeleteOne
- type NodeGroupBy
- func (_g *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
- func (s *NodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeGroupBy) BoolX(ctx context.Context) bool
- func (s *NodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeGroupBy) Float64X(ctx context.Context) float64
- func (s *NodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NodeGroupBy) IntX(ctx context.Context) int
- func (s *NodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NodeGroupBy) IntsX(ctx context.Context) []int
- func (_g *NodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *NodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *NodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NodeGroupBy) StringX(ctx context.Context) string
- func (s *NodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NodeGroupBy) StringsX(ctx context.Context) []string
- type NodeMutation
- func (m *NodeMutation) AddField(name string, value ent.Value) error
- func (m *NodeMutation) AddedEdges() []string
- func (m *NodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *NodeMutation) AddedFields() []string
- func (m *NodeMutation) AddedIDs(name string) []ent.Value
- func (m *NodeMutation) ClearEdge(name string) error
- func (m *NodeMutation) ClearField(name string) error
- func (m *NodeMutation) ClearedEdges() []string
- func (m *NodeMutation) ClearedFields() []string
- func (m NodeMutation) Client() *Client
- func (m *NodeMutation) EdgeCleared(name string) bool
- func (m *NodeMutation) Field(name string) (ent.Value, bool)
- func (m *NodeMutation) FieldCleared(name string) bool
- func (m *NodeMutation) Fields() []string
- func (m *NodeMutation) ID() (id int, exists bool)
- func (m *NodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NodeMutation) Op() Op
- func (m *NodeMutation) RemovedEdges() []string
- func (m *NodeMutation) RemovedIDs(name string) []ent.Value
- func (m *NodeMutation) ResetEdge(name string) error
- func (m *NodeMutation) ResetField(name string) error
- func (m *NodeMutation) SetField(name string, value ent.Value) error
- func (m *NodeMutation) SetID(id int)
- func (m *NodeMutation) SetOp(op Op)
- func (m NodeMutation) Tx() (*Tx, error)
- func (m *NodeMutation) Type() string
- func (m *NodeMutation) Where(ps ...predicate.Node)
- func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
- type NodeQuery
- func (_q *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (_q *NodeQuery) All(ctx context.Context) ([]*Node, error)
- func (_q *NodeQuery) AllX(ctx context.Context) []*Node
- func (_q *NodeQuery) Clone() *NodeQuery
- func (_q *NodeQuery) Count(ctx context.Context) (int, error)
- func (_q *NodeQuery) CountX(ctx context.Context) int
- func (_q *NodeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *NodeQuery) ExistX(ctx context.Context) bool
- func (_q *NodeQuery) First(ctx context.Context) (*Node, error)
- func (_q *NodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *NodeQuery) FirstIDX(ctx context.Context) int
- func (_q *NodeQuery) FirstX(ctx context.Context) *Node
- func (_q *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
- func (_q *NodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *NodeQuery) IDsX(ctx context.Context) []int
- func (_q *NodeQuery) Limit(limit int) *NodeQuery
- func (_q *NodeQuery) Offset(offset int) *NodeQuery
- func (_q *NodeQuery) Only(ctx context.Context) (*Node, error)
- func (_q *NodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *NodeQuery) OnlyIDX(ctx context.Context) int
- func (_q *NodeQuery) OnlyX(ctx context.Context) *Node
- func (_q *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
- func (_q *NodeQuery) Select(fields ...string) *NodeSelect
- func (_q *NodeQuery) Unique(unique bool) *NodeQuery
- func (_q *NodeQuery) Where(ps ...predicate.Node) *NodeQuery
- type NodeSelect
- func (_s *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (s *NodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeSelect) BoolX(ctx context.Context) bool
- func (s *NodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeSelect) BoolsX(ctx context.Context) []bool
- func (s *NodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeSelect) Float64X(ctx context.Context) float64
- func (s *NodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeSelect) Float64sX(ctx context.Context) []float64
- func (s *NodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NodeSelect) IntX(ctx context.Context) int
- func (s *NodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NodeSelect) IntsX(ctx context.Context) []int
- func (_s *NodeSelect) Scan(ctx context.Context, v any) error
- func (s *NodeSelect) ScanX(ctx context.Context, v any)
- func (s *NodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *NodeSelect) StringX(ctx context.Context) string
- func (s *NodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NodeSelect) StringsX(ctx context.Context) []string
- type NodeState
- type NodeStateClient
- func (c *NodeStateClient) Create() *NodeStateCreate
- func (c *NodeStateClient) CreateBulk(builders ...*NodeStateCreate) *NodeStateCreateBulk
- func (c *NodeStateClient) Delete() *NodeStateDelete
- func (c *NodeStateClient) DeleteOne(_m *NodeState) *NodeStateDeleteOne
- func (c *NodeStateClient) DeleteOneID(id int) *NodeStateDeleteOne
- func (c *NodeStateClient) Get(ctx context.Context, id int) (*NodeState, error)
- func (c *NodeStateClient) GetX(ctx context.Context, id int) *NodeState
- func (c *NodeStateClient) Hooks() []Hook
- func (c *NodeStateClient) Intercept(interceptors ...Interceptor)
- func (c *NodeStateClient) Interceptors() []Interceptor
- func (c *NodeStateClient) MapCreateBulk(slice any, setFunc func(*NodeStateCreate, int)) *NodeStateCreateBulk
- func (c *NodeStateClient) Query() *NodeStateQuery
- func (c *NodeStateClient) QueryNode(_m *NodeState) *NodeQuery
- func (c *NodeStateClient) Update() *NodeStateUpdate
- func (c *NodeStateClient) UpdateOne(_m *NodeState) *NodeStateUpdateOne
- func (c *NodeStateClient) UpdateOneID(id int) *NodeStateUpdateOne
- func (c *NodeStateClient) Use(hooks ...Hook)
- type NodeStateCreate
- func (_c *NodeStateCreate) Exec(ctx context.Context) error
- func (_c *NodeStateCreate) ExecX(ctx context.Context)
- func (_c *NodeStateCreate) Mutation() *NodeStateMutation
- func (_c *NodeStateCreate) Save(ctx context.Context) (*NodeState, error)
- func (_c *NodeStateCreate) SaveX(ctx context.Context) *NodeState
- func (_c *NodeStateCreate) SetChangedAt(v time.Time) *NodeStateCreate
- func (_c *NodeStateCreate) SetChangedBy(v int) *NodeStateCreate
- func (_c *NodeStateCreate) SetID(v int) *NodeStateCreate
- func (_c *NodeStateCreate) SetNid(v int) *NodeStateCreate
- func (_c *NodeStateCreate) SetNillableChangedBy(v *int) *NodeStateCreate
- func (_c *NodeStateCreate) SetNode(v *Node) *NodeStateCreate
- func (_c *NodeStateCreate) SetNodeID(id int) *NodeStateCreate
- func (_c *NodeStateCreate) SetState(v string) *NodeStateCreate
- type NodeStateCreateBulk
- type NodeStateDelete
- type NodeStateDeleteOne
- type NodeStateEdges
- type NodeStateGroupBy
- func (_g *NodeStateGroupBy) Aggregate(fns ...AggregateFunc) *NodeStateGroupBy
- func (s *NodeStateGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeStateGroupBy) BoolX(ctx context.Context) bool
- func (s *NodeStateGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeStateGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NodeStateGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeStateGroupBy) Float64X(ctx context.Context) float64
- func (s *NodeStateGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeStateGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NodeStateGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NodeStateGroupBy) IntX(ctx context.Context) int
- func (s *NodeStateGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NodeStateGroupBy) IntsX(ctx context.Context) []int
- func (_g *NodeStateGroupBy) Scan(ctx context.Context, v any) error
- func (s *NodeStateGroupBy) ScanX(ctx context.Context, v any)
- func (s *NodeStateGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NodeStateGroupBy) StringX(ctx context.Context) string
- func (s *NodeStateGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NodeStateGroupBy) StringsX(ctx context.Context) []string
- type NodeStateMutation
- func (m *NodeStateMutation) AddChangedBy(i int)
- func (m *NodeStateMutation) AddField(name string, value ent.Value) error
- func (m *NodeStateMutation) AddedChangedBy() (r int, exists bool)
- func (m *NodeStateMutation) AddedEdges() []string
- func (m *NodeStateMutation) AddedField(name string) (ent.Value, bool)
- func (m *NodeStateMutation) AddedFields() []string
- func (m *NodeStateMutation) AddedIDs(name string) []ent.Value
- func (m *NodeStateMutation) ChangedAt() (r time.Time, exists bool)
- func (m *NodeStateMutation) ChangedBy() (r int, exists bool)
- func (m *NodeStateMutation) ClearEdge(name string) error
- func (m *NodeStateMutation) ClearField(name string) error
- func (m *NodeStateMutation) ClearNode()
- func (m *NodeStateMutation) ClearedEdges() []string
- func (m *NodeStateMutation) ClearedFields() []string
- func (m NodeStateMutation) Client() *Client
- func (m *NodeStateMutation) EdgeCleared(name string) bool
- func (m *NodeStateMutation) Field(name string) (ent.Value, bool)
- func (m *NodeStateMutation) FieldCleared(name string) bool
- func (m *NodeStateMutation) Fields() []string
- func (m *NodeStateMutation) ID() (id int, exists bool)
- func (m *NodeStateMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NodeStateMutation) Nid() (r int, exists bool)
- func (m *NodeStateMutation) NodeCleared() bool
- func (m *NodeStateMutation) NodeID() (id int, exists bool)
- func (m *NodeStateMutation) NodeIDs() (ids []int)
- func (m *NodeStateMutation) OldChangedAt(ctx context.Context) (v time.Time, err error)
- func (m *NodeStateMutation) OldChangedBy(ctx context.Context) (v int, err error)
- func (m *NodeStateMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NodeStateMutation) OldNid(ctx context.Context) (v int, err error)
- func (m *NodeStateMutation) OldState(ctx context.Context) (v string, err error)
- func (m *NodeStateMutation) Op() Op
- func (m *NodeStateMutation) RemovedEdges() []string
- func (m *NodeStateMutation) RemovedIDs(name string) []ent.Value
- func (m *NodeStateMutation) ResetChangedAt()
- func (m *NodeStateMutation) ResetChangedBy()
- func (m *NodeStateMutation) ResetEdge(name string) error
- func (m *NodeStateMutation) ResetField(name string) error
- func (m *NodeStateMutation) ResetNid()
- func (m *NodeStateMutation) ResetNode()
- func (m *NodeStateMutation) ResetState()
- func (m *NodeStateMutation) SetChangedAt(t time.Time)
- func (m *NodeStateMutation) SetChangedBy(i int)
- func (m *NodeStateMutation) SetField(name string, value ent.Value) error
- func (m *NodeStateMutation) SetID(id int)
- func (m *NodeStateMutation) SetNid(i int)
- func (m *NodeStateMutation) SetNodeID(id int)
- func (m *NodeStateMutation) SetOp(op Op)
- func (m *NodeStateMutation) SetState(s string)
- func (m *NodeStateMutation) State() (r string, exists bool)
- func (m NodeStateMutation) Tx() (*Tx, error)
- func (m *NodeStateMutation) Type() string
- func (m *NodeStateMutation) Where(ps ...predicate.NodeState)
- func (m *NodeStateMutation) WhereP(ps ...func(*sql.Selector))
- type NodeStateQuery
- func (_q *NodeStateQuery) Aggregate(fns ...AggregateFunc) *NodeStateSelect
- func (_q *NodeStateQuery) All(ctx context.Context) ([]*NodeState, error)
- func (_q *NodeStateQuery) AllX(ctx context.Context) []*NodeState
- func (_q *NodeStateQuery) Clone() *NodeStateQuery
- func (_q *NodeStateQuery) Count(ctx context.Context) (int, error)
- func (_q *NodeStateQuery) CountX(ctx context.Context) int
- func (_q *NodeStateQuery) Exist(ctx context.Context) (bool, error)
- func (_q *NodeStateQuery) ExistX(ctx context.Context) bool
- func (_q *NodeStateQuery) First(ctx context.Context) (*NodeState, error)
- func (_q *NodeStateQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *NodeStateQuery) FirstIDX(ctx context.Context) int
- func (_q *NodeStateQuery) FirstX(ctx context.Context) *NodeState
- func (_q *NodeStateQuery) GroupBy(field string, fields ...string) *NodeStateGroupBy
- func (_q *NodeStateQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *NodeStateQuery) IDsX(ctx context.Context) []int
- func (_q *NodeStateQuery) Limit(limit int) *NodeStateQuery
- func (_q *NodeStateQuery) Offset(offset int) *NodeStateQuery
- func (_q *NodeStateQuery) Only(ctx context.Context) (*NodeState, error)
- func (_q *NodeStateQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *NodeStateQuery) OnlyIDX(ctx context.Context) int
- func (_q *NodeStateQuery) OnlyX(ctx context.Context) *NodeState
- func (_q *NodeStateQuery) Order(o ...nodestate.OrderOption) *NodeStateQuery
- func (_q *NodeStateQuery) QueryNode() *NodeQuery
- func (_q *NodeStateQuery) Select(fields ...string) *NodeStateSelect
- func (_q *NodeStateQuery) Unique(unique bool) *NodeStateQuery
- func (_q *NodeStateQuery) Where(ps ...predicate.NodeState) *NodeStateQuery
- func (_q *NodeStateQuery) WithNode(opts ...func(*NodeQuery)) *NodeStateQuery
- type NodeStateSelect
- func (_s *NodeStateSelect) Aggregate(fns ...AggregateFunc) *NodeStateSelect
- func (s *NodeStateSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeStateSelect) BoolX(ctx context.Context) bool
- func (s *NodeStateSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeStateSelect) BoolsX(ctx context.Context) []bool
- func (s *NodeStateSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeStateSelect) Float64X(ctx context.Context) float64
- func (s *NodeStateSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeStateSelect) Float64sX(ctx context.Context) []float64
- func (s *NodeStateSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NodeStateSelect) IntX(ctx context.Context) int
- func (s *NodeStateSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NodeStateSelect) IntsX(ctx context.Context) []int
- func (_s *NodeStateSelect) Scan(ctx context.Context, v any) error
- func (s *NodeStateSelect) ScanX(ctx context.Context, v any)
- func (s *NodeStateSelect) String(ctx context.Context) (_ string, err error)
- func (s *NodeStateSelect) StringX(ctx context.Context) string
- func (s *NodeStateSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NodeStateSelect) StringsX(ctx context.Context) []string
- type NodeStateUpdate
- func (_u *NodeStateUpdate) AddChangedBy(v int) *NodeStateUpdate
- func (_u *NodeStateUpdate) ClearNode() *NodeStateUpdate
- func (_u *NodeStateUpdate) Exec(ctx context.Context) error
- func (_u *NodeStateUpdate) ExecX(ctx context.Context)
- func (_u *NodeStateUpdate) Mutation() *NodeStateMutation
- func (_u *NodeStateUpdate) Save(ctx context.Context) (int, error)
- func (_u *NodeStateUpdate) SaveX(ctx context.Context) int
- func (_u *NodeStateUpdate) SetChangedAt(v time.Time) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetChangedBy(v int) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetNid(v int) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetNillableChangedAt(v *time.Time) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetNillableChangedBy(v *int) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetNillableNid(v *int) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetNillableState(v *string) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetNode(v *Node) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetNodeID(id int) *NodeStateUpdate
- func (_u *NodeStateUpdate) SetState(v string) *NodeStateUpdate
- func (_u *NodeStateUpdate) Where(ps ...predicate.NodeState) *NodeStateUpdate
- type NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) AddChangedBy(v int) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) ClearNode() *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) Exec(ctx context.Context) error
- func (_u *NodeStateUpdateOne) ExecX(ctx context.Context)
- func (_u *NodeStateUpdateOne) Mutation() *NodeStateMutation
- func (_u *NodeStateUpdateOne) Save(ctx context.Context) (*NodeState, error)
- func (_u *NodeStateUpdateOne) SaveX(ctx context.Context) *NodeState
- func (_u *NodeStateUpdateOne) Select(field string, fields ...string) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetChangedAt(v time.Time) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetChangedBy(v int) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetNid(v int) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetNillableChangedAt(v *time.Time) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetNillableChangedBy(v *int) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetNillableNid(v *int) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetNillableState(v *string) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetNode(v *Node) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetNodeID(id int) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) SetState(v string) *NodeStateUpdateOne
- func (_u *NodeStateUpdateOne) Where(ps ...predicate.NodeState) *NodeStateUpdateOne
- type NodeStates
- type NodeUpdate
- func (_u *NodeUpdate) Exec(ctx context.Context) error
- func (_u *NodeUpdate) ExecX(ctx context.Context)
- func (_u *NodeUpdate) Mutation() *NodeMutation
- func (_u *NodeUpdate) Save(ctx context.Context) (int, error)
- func (_u *NodeUpdate) SaveX(ctx context.Context) int
- func (_u *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
- type NodeUpdateOne
- func (_u *NodeUpdateOne) Exec(ctx context.Context) error
- func (_u *NodeUpdateOne) ExecX(ctx context.Context)
- func (_u *NodeUpdateOne) Mutation() *NodeMutation
- func (_u *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
- func (_u *NodeUpdateOne) SaveX(ctx context.Context) *Node
- func (_u *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
- func (_u *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
- type Nodes
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type WorkflowSettings
- type WorkflowSettingsClient
- func (c *WorkflowSettingsClient) Create() *WorkflowSettingsCreate
- func (c *WorkflowSettingsClient) CreateBulk(builders ...*WorkflowSettingsCreate) *WorkflowSettingsCreateBulk
- func (c *WorkflowSettingsClient) Delete() *WorkflowSettingsDelete
- func (c *WorkflowSettingsClient) DeleteOne(_m *WorkflowSettings) *WorkflowSettingsDeleteOne
- func (c *WorkflowSettingsClient) DeleteOneID(id int) *WorkflowSettingsDeleteOne
- func (c *WorkflowSettingsClient) Get(ctx context.Context, id int) (*WorkflowSettings, error)
- func (c *WorkflowSettingsClient) GetX(ctx context.Context, id int) *WorkflowSettings
- func (c *WorkflowSettingsClient) Hooks() []Hook
- func (c *WorkflowSettingsClient) Intercept(interceptors ...Interceptor)
- func (c *WorkflowSettingsClient) Interceptors() []Interceptor
- func (c *WorkflowSettingsClient) MapCreateBulk(slice any, setFunc func(*WorkflowSettingsCreate, int)) *WorkflowSettingsCreateBulk
- func (c *WorkflowSettingsClient) Query() *WorkflowSettingsQuery
- func (c *WorkflowSettingsClient) Update() *WorkflowSettingsUpdate
- func (c *WorkflowSettingsClient) UpdateOne(_m *WorkflowSettings) *WorkflowSettingsUpdateOne
- func (c *WorkflowSettingsClient) UpdateOneID(id int) *WorkflowSettingsUpdateOne
- func (c *WorkflowSettingsClient) Use(hooks ...Hook)
- type WorkflowSettingsCreate
- func (_c *WorkflowSettingsCreate) Exec(ctx context.Context) error
- func (_c *WorkflowSettingsCreate) ExecX(ctx context.Context)
- func (_c *WorkflowSettingsCreate) Mutation() *WorkflowSettingsMutation
- func (_c *WorkflowSettingsCreate) Save(ctx context.Context) (*WorkflowSettings, error)
- func (_c *WorkflowSettingsCreate) SaveX(ctx context.Context) *WorkflowSettings
- func (_c *WorkflowSettingsCreate) SetContentTypes(v []string) *WorkflowSettingsCreate
- func (_c *WorkflowSettingsCreate) SetID(v int) *WorkflowSettingsCreate
- func (_c *WorkflowSettingsCreate) SetLockMinutes(v int) *WorkflowSettingsCreate
- func (_c *WorkflowSettingsCreate) SetNillableLockMinutes(v *int) *WorkflowSettingsCreate
- type WorkflowSettingsCreateBulk
- func (_c *WorkflowSettingsCreateBulk) Exec(ctx context.Context) error
- func (_c *WorkflowSettingsCreateBulk) ExecX(ctx context.Context)
- func (_c *WorkflowSettingsCreateBulk) Save(ctx context.Context) ([]*WorkflowSettings, error)
- func (_c *WorkflowSettingsCreateBulk) SaveX(ctx context.Context) []*WorkflowSettings
- type WorkflowSettingsDelete
- type WorkflowSettingsDeleteOne
- type WorkflowSettingsGroupBy
- func (_g *WorkflowSettingsGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowSettingsGroupBy
- func (s *WorkflowSettingsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowSettingsGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkflowSettingsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowSettingsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkflowSettingsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowSettingsGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkflowSettingsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowSettingsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkflowSettingsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowSettingsGroupBy) IntX(ctx context.Context) int
- func (s *WorkflowSettingsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowSettingsGroupBy) IntsX(ctx context.Context) []int
- func (_g *WorkflowSettingsGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkflowSettingsGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkflowSettingsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowSettingsGroupBy) StringX(ctx context.Context) string
- func (s *WorkflowSettingsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowSettingsGroupBy) StringsX(ctx context.Context) []string
- type WorkflowSettingsMutation
- func (m *WorkflowSettingsMutation) AddField(name string, value ent.Value) error
- func (m *WorkflowSettingsMutation) AddLockMinutes(i int)
- func (m *WorkflowSettingsMutation) AddedEdges() []string
- func (m *WorkflowSettingsMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkflowSettingsMutation) AddedFields() []string
- func (m *WorkflowSettingsMutation) AddedIDs(name string) []ent.Value
- func (m *WorkflowSettingsMutation) AddedLockMinutes() (r int, exists bool)
- func (m *WorkflowSettingsMutation) AppendContentTypes(s []string)
- func (m *WorkflowSettingsMutation) AppendedContentTypes() ([]string, bool)
- func (m *WorkflowSettingsMutation) ClearContentTypes()
- func (m *WorkflowSettingsMutation) ClearEdge(name string) error
- func (m *WorkflowSettingsMutation) ClearField(name string) error
- func (m *WorkflowSettingsMutation) ClearedEdges() []string
- func (m *WorkflowSettingsMutation) ClearedFields() []string
- func (m WorkflowSettingsMutation) Client() *Client
- func (m *WorkflowSettingsMutation) ContentTypes() (r []string, exists bool)
- func (m *WorkflowSettingsMutation) ContentTypesCleared() bool
- func (m *WorkflowSettingsMutation) EdgeCleared(name string) bool
- func (m *WorkflowSettingsMutation) Field(name string) (ent.Value, bool)
- func (m *WorkflowSettingsMutation) FieldCleared(name string) bool
- func (m *WorkflowSettingsMutation) Fields() []string
- func (m *WorkflowSettingsMutation) ID() (id int, exists bool)
- func (m *WorkflowSettingsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WorkflowSettingsMutation) LockMinutes() (r int, exists bool)
- func (m *WorkflowSettingsMutation) OldContentTypes(ctx context.Context) (v []string, err error)
- func (m *WorkflowSettingsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkflowSettingsMutation) OldLockMinutes(ctx context.Context) (v int, err error)
- func (m *WorkflowSettingsMutation) Op() Op
- func (m *WorkflowSettingsMutation) RemovedEdges() []string
- func (m *WorkflowSettingsMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkflowSettingsMutation) ResetContentTypes()
- func (m *WorkflowSettingsMutation) ResetEdge(name string) error
- func (m *WorkflowSettingsMutation) ResetField(name string) error
- func (m *WorkflowSettingsMutation) ResetLockMinutes()
- func (m *WorkflowSettingsMutation) SetContentTypes(s []string)
- func (m *WorkflowSettingsMutation) SetField(name string, value ent.Value) error
- func (m *WorkflowSettingsMutation) SetID(id int)
- func (m *WorkflowSettingsMutation) SetLockMinutes(i int)
- func (m *WorkflowSettingsMutation) SetOp(op Op)
- func (m WorkflowSettingsMutation) Tx() (*Tx, error)
- func (m *WorkflowSettingsMutation) Type() string
- func (m *WorkflowSettingsMutation) Where(ps ...predicate.WorkflowSettings)
- func (m *WorkflowSettingsMutation) WhereP(ps ...func(*sql.Selector))
- type WorkflowSettingsQuery
- func (_q *WorkflowSettingsQuery) Aggregate(fns ...AggregateFunc) *WorkflowSettingsSelect
- func (_q *WorkflowSettingsQuery) All(ctx context.Context) ([]*WorkflowSettings, error)
- func (_q *WorkflowSettingsQuery) AllX(ctx context.Context) []*WorkflowSettings
- func (_q *WorkflowSettingsQuery) Clone() *WorkflowSettingsQuery
- func (_q *WorkflowSettingsQuery) Count(ctx context.Context) (int, error)
- func (_q *WorkflowSettingsQuery) CountX(ctx context.Context) int
- func (_q *WorkflowSettingsQuery) Exist(ctx context.Context) (bool, error)
- func (_q *WorkflowSettingsQuery) ExistX(ctx context.Context) bool
- func (_q *WorkflowSettingsQuery) First(ctx context.Context) (*WorkflowSettings, error)
- func (_q *WorkflowSettingsQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *WorkflowSettingsQuery) FirstIDX(ctx context.Context) int
- func (_q *WorkflowSettingsQuery) FirstX(ctx context.Context) *WorkflowSettings
- func (_q *WorkflowSettingsQuery) GroupBy(field string, fields ...string) *WorkflowSettingsGroupBy
- func (_q *WorkflowSettingsQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *WorkflowSettingsQuery) IDsX(ctx context.Context) []int
- func (_q *WorkflowSettingsQuery) Limit(limit int) *WorkflowSettingsQuery
- func (_q *WorkflowSettingsQuery) Offset(offset int) *WorkflowSettingsQuery
- func (_q *WorkflowSettingsQuery) Only(ctx context.Context) (*WorkflowSettings, error)
- func (_q *WorkflowSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *WorkflowSettingsQuery) OnlyIDX(ctx context.Context) int
- func (_q *WorkflowSettingsQuery) OnlyX(ctx context.Context) *WorkflowSettings
- func (_q *WorkflowSettingsQuery) Order(o ...workflowsettings.OrderOption) *WorkflowSettingsQuery
- func (_q *WorkflowSettingsQuery) Select(fields ...string) *WorkflowSettingsSelect
- func (_q *WorkflowSettingsQuery) Unique(unique bool) *WorkflowSettingsQuery
- func (_q *WorkflowSettingsQuery) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsQuery
- type WorkflowSettingsSelect
- func (_s *WorkflowSettingsSelect) Aggregate(fns ...AggregateFunc) *WorkflowSettingsSelect
- func (s *WorkflowSettingsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowSettingsSelect) BoolX(ctx context.Context) bool
- func (s *WorkflowSettingsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowSettingsSelect) BoolsX(ctx context.Context) []bool
- func (s *WorkflowSettingsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowSettingsSelect) Float64X(ctx context.Context) float64
- func (s *WorkflowSettingsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowSettingsSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkflowSettingsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowSettingsSelect) IntX(ctx context.Context) int
- func (s *WorkflowSettingsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowSettingsSelect) IntsX(ctx context.Context) []int
- func (_s *WorkflowSettingsSelect) Scan(ctx context.Context, v any) error
- func (s *WorkflowSettingsSelect) ScanX(ctx context.Context, v any)
- func (s *WorkflowSettingsSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowSettingsSelect) StringX(ctx context.Context) string
- func (s *WorkflowSettingsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowSettingsSelect) StringsX(ctx context.Context) []string
- type WorkflowSettingsSlice
- type WorkflowSettingsUpdate
- func (_u *WorkflowSettingsUpdate) AddLockMinutes(v int) *WorkflowSettingsUpdate
- func (_u *WorkflowSettingsUpdate) AppendContentTypes(v []string) *WorkflowSettingsUpdate
- func (_u *WorkflowSettingsUpdate) ClearContentTypes() *WorkflowSettingsUpdate
- func (_u *WorkflowSettingsUpdate) Exec(ctx context.Context) error
- func (_u *WorkflowSettingsUpdate) ExecX(ctx context.Context)
- func (_u *WorkflowSettingsUpdate) Mutation() *WorkflowSettingsMutation
- func (_u *WorkflowSettingsUpdate) Save(ctx context.Context) (int, error)
- func (_u *WorkflowSettingsUpdate) SaveX(ctx context.Context) int
- func (_u *WorkflowSettingsUpdate) SetContentTypes(v []string) *WorkflowSettingsUpdate
- func (_u *WorkflowSettingsUpdate) SetLockMinutes(v int) *WorkflowSettingsUpdate
- func (_u *WorkflowSettingsUpdate) SetNillableLockMinutes(v *int) *WorkflowSettingsUpdate
- func (_u *WorkflowSettingsUpdate) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsUpdate
- type WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) AddLockMinutes(v int) *WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) AppendContentTypes(v []string) *WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) ClearContentTypes() *WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) Exec(ctx context.Context) error
- func (_u *WorkflowSettingsUpdateOne) ExecX(ctx context.Context)
- func (_u *WorkflowSettingsUpdateOne) Mutation() *WorkflowSettingsMutation
- func (_u *WorkflowSettingsUpdateOne) Save(ctx context.Context) (*WorkflowSettings, error)
- func (_u *WorkflowSettingsUpdateOne) SaveX(ctx context.Context) *WorkflowSettings
- func (_u *WorkflowSettingsUpdateOne) Select(field string, fields ...string) *WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) SetContentTypes(v []string) *WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) SetLockMinutes(v int) *WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) SetNillableLockMinutes(v *int) *WorkflowSettingsUpdateOne
- func (_u *WorkflowSettingsUpdateOne) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsUpdateOne
- type WorkflowState
- type WorkflowStateClient
- func (c *WorkflowStateClient) Create() *WorkflowStateCreate
- func (c *WorkflowStateClient) CreateBulk(builders ...*WorkflowStateCreate) *WorkflowStateCreateBulk
- func (c *WorkflowStateClient) Delete() *WorkflowStateDelete
- func (c *WorkflowStateClient) DeleteOne(_m *WorkflowState) *WorkflowStateDeleteOne
- func (c *WorkflowStateClient) DeleteOneID(id int) *WorkflowStateDeleteOne
- func (c *WorkflowStateClient) Get(ctx context.Context, id int) (*WorkflowState, error)
- func (c *WorkflowStateClient) GetX(ctx context.Context, id int) *WorkflowState
- func (c *WorkflowStateClient) Hooks() []Hook
- func (c *WorkflowStateClient) Intercept(interceptors ...Interceptor)
- func (c *WorkflowStateClient) Interceptors() []Interceptor
- func (c *WorkflowStateClient) MapCreateBulk(slice any, setFunc func(*WorkflowStateCreate, int)) *WorkflowStateCreateBulk
- func (c *WorkflowStateClient) Query() *WorkflowStateQuery
- func (c *WorkflowStateClient) Update() *WorkflowStateUpdate
- func (c *WorkflowStateClient) UpdateOne(_m *WorkflowState) *WorkflowStateUpdateOne
- func (c *WorkflowStateClient) UpdateOneID(id int) *WorkflowStateUpdateOne
- func (c *WorkflowStateClient) Use(hooks ...Hook)
- type WorkflowStateCreate
- func (_c *WorkflowStateCreate) Exec(ctx context.Context) error
- func (_c *WorkflowStateCreate) ExecX(ctx context.Context)
- func (_c *WorkflowStateCreate) Mutation() *WorkflowStateMutation
- func (_c *WorkflowStateCreate) Save(ctx context.Context) (*WorkflowState, error)
- func (_c *WorkflowStateCreate) SaveX(ctx context.Context) *WorkflowState
- func (_c *WorkflowStateCreate) SetColor(v string) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetID(v int) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetInitial(v bool) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetLabel(v string) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetMachineName(v string) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetNillableColor(v *string) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetNillableInitial(v *bool) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetNillablePublished(v *bool) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetNillableWeight(v *int) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetPublished(v bool) *WorkflowStateCreate
- func (_c *WorkflowStateCreate) SetWeight(v int) *WorkflowStateCreate
- type WorkflowStateCreateBulk
- type WorkflowStateDelete
- type WorkflowStateDeleteOne
- type WorkflowStateGroupBy
- func (_g *WorkflowStateGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowStateGroupBy
- func (s *WorkflowStateGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowStateGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkflowStateGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowStateGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkflowStateGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowStateGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkflowStateGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowStateGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkflowStateGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowStateGroupBy) IntX(ctx context.Context) int
- func (s *WorkflowStateGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowStateGroupBy) IntsX(ctx context.Context) []int
- func (_g *WorkflowStateGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkflowStateGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkflowStateGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowStateGroupBy) StringX(ctx context.Context) string
- func (s *WorkflowStateGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowStateGroupBy) StringsX(ctx context.Context) []string
- type WorkflowStateMutation
- func (m *WorkflowStateMutation) AddField(name string, value ent.Value) error
- func (m *WorkflowStateMutation) AddWeight(i int)
- func (m *WorkflowStateMutation) AddedEdges() []string
- func (m *WorkflowStateMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkflowStateMutation) AddedFields() []string
- func (m *WorkflowStateMutation) AddedIDs(name string) []ent.Value
- func (m *WorkflowStateMutation) AddedWeight() (r int, exists bool)
- func (m *WorkflowStateMutation) ClearEdge(name string) error
- func (m *WorkflowStateMutation) ClearField(name string) error
- func (m *WorkflowStateMutation) ClearedEdges() []string
- func (m *WorkflowStateMutation) ClearedFields() []string
- func (m WorkflowStateMutation) Client() *Client
- func (m *WorkflowStateMutation) Color() (r string, exists bool)
- func (m *WorkflowStateMutation) EdgeCleared(name string) bool
- func (m *WorkflowStateMutation) Field(name string) (ent.Value, bool)
- func (m *WorkflowStateMutation) FieldCleared(name string) bool
- func (m *WorkflowStateMutation) Fields() []string
- func (m *WorkflowStateMutation) ID() (id int, exists bool)
- func (m *WorkflowStateMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WorkflowStateMutation) Initial() (r bool, exists bool)
- func (m *WorkflowStateMutation) Label() (r string, exists bool)
- func (m *WorkflowStateMutation) MachineName() (r string, exists bool)
- func (m *WorkflowStateMutation) OldColor(ctx context.Context) (v string, err error)
- func (m *WorkflowStateMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkflowStateMutation) OldInitial(ctx context.Context) (v bool, err error)
- func (m *WorkflowStateMutation) OldLabel(ctx context.Context) (v string, err error)
- func (m *WorkflowStateMutation) OldMachineName(ctx context.Context) (v string, err error)
- func (m *WorkflowStateMutation) OldPublished(ctx context.Context) (v bool, err error)
- func (m *WorkflowStateMutation) OldWeight(ctx context.Context) (v int, err error)
- func (m *WorkflowStateMutation) Op() Op
- func (m *WorkflowStateMutation) Published() (r bool, exists bool)
- func (m *WorkflowStateMutation) RemovedEdges() []string
- func (m *WorkflowStateMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkflowStateMutation) ResetColor()
- func (m *WorkflowStateMutation) ResetEdge(name string) error
- func (m *WorkflowStateMutation) ResetField(name string) error
- func (m *WorkflowStateMutation) ResetInitial()
- func (m *WorkflowStateMutation) ResetLabel()
- func (m *WorkflowStateMutation) ResetMachineName()
- func (m *WorkflowStateMutation) ResetPublished()
- func (m *WorkflowStateMutation) ResetWeight()
- func (m *WorkflowStateMutation) SetColor(s string)
- func (m *WorkflowStateMutation) SetField(name string, value ent.Value) error
- func (m *WorkflowStateMutation) SetID(id int)
- func (m *WorkflowStateMutation) SetInitial(b bool)
- func (m *WorkflowStateMutation) SetLabel(s string)
- func (m *WorkflowStateMutation) SetMachineName(s string)
- func (m *WorkflowStateMutation) SetOp(op Op)
- func (m *WorkflowStateMutation) SetPublished(b bool)
- func (m *WorkflowStateMutation) SetWeight(i int)
- func (m WorkflowStateMutation) Tx() (*Tx, error)
- func (m *WorkflowStateMutation) Type() string
- func (m *WorkflowStateMutation) Weight() (r int, exists bool)
- func (m *WorkflowStateMutation) Where(ps ...predicate.WorkflowState)
- func (m *WorkflowStateMutation) WhereP(ps ...func(*sql.Selector))
- type WorkflowStateQuery
- func (_q *WorkflowStateQuery) Aggregate(fns ...AggregateFunc) *WorkflowStateSelect
- func (_q *WorkflowStateQuery) All(ctx context.Context) ([]*WorkflowState, error)
- func (_q *WorkflowStateQuery) AllX(ctx context.Context) []*WorkflowState
- func (_q *WorkflowStateQuery) Clone() *WorkflowStateQuery
- func (_q *WorkflowStateQuery) Count(ctx context.Context) (int, error)
- func (_q *WorkflowStateQuery) CountX(ctx context.Context) int
- func (_q *WorkflowStateQuery) Exist(ctx context.Context) (bool, error)
- func (_q *WorkflowStateQuery) ExistX(ctx context.Context) bool
- func (_q *WorkflowStateQuery) First(ctx context.Context) (*WorkflowState, error)
- func (_q *WorkflowStateQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *WorkflowStateQuery) FirstIDX(ctx context.Context) int
- func (_q *WorkflowStateQuery) FirstX(ctx context.Context) *WorkflowState
- func (_q *WorkflowStateQuery) GroupBy(field string, fields ...string) *WorkflowStateGroupBy
- func (_q *WorkflowStateQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *WorkflowStateQuery) IDsX(ctx context.Context) []int
- func (_q *WorkflowStateQuery) Limit(limit int) *WorkflowStateQuery
- func (_q *WorkflowStateQuery) Offset(offset int) *WorkflowStateQuery
- func (_q *WorkflowStateQuery) Only(ctx context.Context) (*WorkflowState, error)
- func (_q *WorkflowStateQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *WorkflowStateQuery) OnlyIDX(ctx context.Context) int
- func (_q *WorkflowStateQuery) OnlyX(ctx context.Context) *WorkflowState
- func (_q *WorkflowStateQuery) Order(o ...workflowstate.OrderOption) *WorkflowStateQuery
- func (_q *WorkflowStateQuery) Select(fields ...string) *WorkflowStateSelect
- func (_q *WorkflowStateQuery) Unique(unique bool) *WorkflowStateQuery
- func (_q *WorkflowStateQuery) Where(ps ...predicate.WorkflowState) *WorkflowStateQuery
- type WorkflowStateSelect
- func (_s *WorkflowStateSelect) Aggregate(fns ...AggregateFunc) *WorkflowStateSelect
- func (s *WorkflowStateSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowStateSelect) BoolX(ctx context.Context) bool
- func (s *WorkflowStateSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowStateSelect) BoolsX(ctx context.Context) []bool
- func (s *WorkflowStateSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowStateSelect) Float64X(ctx context.Context) float64
- func (s *WorkflowStateSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowStateSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkflowStateSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowStateSelect) IntX(ctx context.Context) int
- func (s *WorkflowStateSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowStateSelect) IntsX(ctx context.Context) []int
- func (_s *WorkflowStateSelect) Scan(ctx context.Context, v any) error
- func (s *WorkflowStateSelect) ScanX(ctx context.Context, v any)
- func (s *WorkflowStateSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowStateSelect) StringX(ctx context.Context) string
- func (s *WorkflowStateSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowStateSelect) StringsX(ctx context.Context) []string
- type WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) AddWeight(v int) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) Exec(ctx context.Context) error
- func (_u *WorkflowStateUpdate) ExecX(ctx context.Context)
- func (_u *WorkflowStateUpdate) Mutation() *WorkflowStateMutation
- func (_u *WorkflowStateUpdate) Save(ctx context.Context) (int, error)
- func (_u *WorkflowStateUpdate) SaveX(ctx context.Context) int
- func (_u *WorkflowStateUpdate) SetColor(v string) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetInitial(v bool) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetLabel(v string) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetMachineName(v string) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetNillableColor(v *string) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetNillableInitial(v *bool) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetNillableLabel(v *string) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetNillableMachineName(v *string) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetNillablePublished(v *bool) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetNillableWeight(v *int) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetPublished(v bool) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) SetWeight(v int) *WorkflowStateUpdate
- func (_u *WorkflowStateUpdate) Where(ps ...predicate.WorkflowState) *WorkflowStateUpdate
- type WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) AddWeight(v int) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) Exec(ctx context.Context) error
- func (_u *WorkflowStateUpdateOne) ExecX(ctx context.Context)
- func (_u *WorkflowStateUpdateOne) Mutation() *WorkflowStateMutation
- func (_u *WorkflowStateUpdateOne) Save(ctx context.Context) (*WorkflowState, error)
- func (_u *WorkflowStateUpdateOne) SaveX(ctx context.Context) *WorkflowState
- func (_u *WorkflowStateUpdateOne) Select(field string, fields ...string) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetColor(v string) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetInitial(v bool) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetLabel(v string) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetMachineName(v string) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetNillableColor(v *string) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetNillableInitial(v *bool) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetNillableLabel(v *string) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetNillableMachineName(v *string) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetNillablePublished(v *bool) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetNillableWeight(v *int) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetPublished(v bool) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) SetWeight(v int) *WorkflowStateUpdateOne
- func (_u *WorkflowStateUpdateOne) Where(ps ...predicate.WorkflowState) *WorkflowStateUpdateOne
- type WorkflowStates
- type WorkflowTransition
- type WorkflowTransitionClient
- func (c *WorkflowTransitionClient) Create() *WorkflowTransitionCreate
- func (c *WorkflowTransitionClient) CreateBulk(builders ...*WorkflowTransitionCreate) *WorkflowTransitionCreateBulk
- func (c *WorkflowTransitionClient) Delete() *WorkflowTransitionDelete
- func (c *WorkflowTransitionClient) DeleteOne(_m *WorkflowTransition) *WorkflowTransitionDeleteOne
- func (c *WorkflowTransitionClient) DeleteOneID(id int) *WorkflowTransitionDeleteOne
- func (c *WorkflowTransitionClient) Get(ctx context.Context, id int) (*WorkflowTransition, error)
- func (c *WorkflowTransitionClient) GetX(ctx context.Context, id int) *WorkflowTransition
- func (c *WorkflowTransitionClient) Hooks() []Hook
- func (c *WorkflowTransitionClient) Intercept(interceptors ...Interceptor)
- func (c *WorkflowTransitionClient) Interceptors() []Interceptor
- func (c *WorkflowTransitionClient) MapCreateBulk(slice any, setFunc func(*WorkflowTransitionCreate, int)) *WorkflowTransitionCreateBulk
- func (c *WorkflowTransitionClient) Query() *WorkflowTransitionQuery
- func (c *WorkflowTransitionClient) Update() *WorkflowTransitionUpdate
- func (c *WorkflowTransitionClient) UpdateOne(_m *WorkflowTransition) *WorkflowTransitionUpdateOne
- func (c *WorkflowTransitionClient) UpdateOneID(id int) *WorkflowTransitionUpdateOne
- func (c *WorkflowTransitionClient) Use(hooks ...Hook)
- type WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) Exec(ctx context.Context) error
- func (_c *WorkflowTransitionCreate) ExecX(ctx context.Context)
- func (_c *WorkflowTransitionCreate) Mutation() *WorkflowTransitionMutation
- func (_c *WorkflowTransitionCreate) Save(ctx context.Context) (*WorkflowTransition, error)
- func (_c *WorkflowTransitionCreate) SaveX(ctx context.Context) *WorkflowTransition
- func (_c *WorkflowTransitionCreate) SetComment(v string) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetFromStates(v []string) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetID(v int) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetLabel(v string) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetNillableComment(v *string) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetNillableWeight(v *int) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetRoles(v []string) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetToState(v string) *WorkflowTransitionCreate
- func (_c *WorkflowTransitionCreate) SetWeight(v int) *WorkflowTransitionCreate
- type WorkflowTransitionCreateBulk
- func (_c *WorkflowTransitionCreateBulk) Exec(ctx context.Context) error
- func (_c *WorkflowTransitionCreateBulk) ExecX(ctx context.Context)
- func (_c *WorkflowTransitionCreateBulk) Save(ctx context.Context) ([]*WorkflowTransition, error)
- func (_c *WorkflowTransitionCreateBulk) SaveX(ctx context.Context) []*WorkflowTransition
- type WorkflowTransitionDelete
- type WorkflowTransitionDeleteOne
- type WorkflowTransitionGroupBy
- func (_g *WorkflowTransitionGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowTransitionGroupBy
- func (s *WorkflowTransitionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowTransitionGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkflowTransitionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowTransitionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkflowTransitionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowTransitionGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkflowTransitionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowTransitionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkflowTransitionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowTransitionGroupBy) IntX(ctx context.Context) int
- func (s *WorkflowTransitionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowTransitionGroupBy) IntsX(ctx context.Context) []int
- func (_g *WorkflowTransitionGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkflowTransitionGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkflowTransitionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowTransitionGroupBy) StringX(ctx context.Context) string
- func (s *WorkflowTransitionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowTransitionGroupBy) StringsX(ctx context.Context) []string
- type WorkflowTransitionMutation
- func (m *WorkflowTransitionMutation) AddField(name string, value ent.Value) error
- func (m *WorkflowTransitionMutation) AddWeight(i int)
- func (m *WorkflowTransitionMutation) AddedEdges() []string
- func (m *WorkflowTransitionMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkflowTransitionMutation) AddedFields() []string
- func (m *WorkflowTransitionMutation) AddedIDs(name string) []ent.Value
- func (m *WorkflowTransitionMutation) AddedWeight() (r int, exists bool)
- func (m *WorkflowTransitionMutation) AppendFromStates(s []string)
- func (m *WorkflowTransitionMutation) AppendRoles(s []string)
- func (m *WorkflowTransitionMutation) AppendedFromStates() ([]string, bool)
- func (m *WorkflowTransitionMutation) AppendedRoles() ([]string, bool)
- func (m *WorkflowTransitionMutation) ClearEdge(name string) error
- func (m *WorkflowTransitionMutation) ClearField(name string) error
- func (m *WorkflowTransitionMutation) ClearedEdges() []string
- func (m *WorkflowTransitionMutation) ClearedFields() []string
- func (m WorkflowTransitionMutation) Client() *Client
- func (m *WorkflowTransitionMutation) Comment() (r string, exists bool)
- func (m *WorkflowTransitionMutation) EdgeCleared(name string) bool
- func (m *WorkflowTransitionMutation) Field(name string) (ent.Value, bool)
- func (m *WorkflowTransitionMutation) FieldCleared(name string) bool
- func (m *WorkflowTransitionMutation) Fields() []string
- func (m *WorkflowTransitionMutation) FromStates() (r []string, exists bool)
- func (m *WorkflowTransitionMutation) ID() (id int, exists bool)
- func (m *WorkflowTransitionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *WorkflowTransitionMutation) Label() (r string, exists bool)
- func (m *WorkflowTransitionMutation) OldComment(ctx context.Context) (v string, err error)
- func (m *WorkflowTransitionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkflowTransitionMutation) OldFromStates(ctx context.Context) (v []string, err error)
- func (m *WorkflowTransitionMutation) OldLabel(ctx context.Context) (v string, err error)
- func (m *WorkflowTransitionMutation) OldRoles(ctx context.Context) (v []string, err error)
- func (m *WorkflowTransitionMutation) OldToState(ctx context.Context) (v string, err error)
- func (m *WorkflowTransitionMutation) OldWeight(ctx context.Context) (v int, err error)
- func (m *WorkflowTransitionMutation) Op() Op
- func (m *WorkflowTransitionMutation) RemovedEdges() []string
- func (m *WorkflowTransitionMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkflowTransitionMutation) ResetComment()
- func (m *WorkflowTransitionMutation) ResetEdge(name string) error
- func (m *WorkflowTransitionMutation) ResetField(name string) error
- func (m *WorkflowTransitionMutation) ResetFromStates()
- func (m *WorkflowTransitionMutation) ResetLabel()
- func (m *WorkflowTransitionMutation) ResetRoles()
- func (m *WorkflowTransitionMutation) ResetToState()
- func (m *WorkflowTransitionMutation) ResetWeight()
- func (m *WorkflowTransitionMutation) Roles() (r []string, exists bool)
- func (m *WorkflowTransitionMutation) SetComment(s string)
- func (m *WorkflowTransitionMutation) SetField(name string, value ent.Value) error
- func (m *WorkflowTransitionMutation) SetFromStates(s []string)
- func (m *WorkflowTransitionMutation) SetID(id int)
- func (m *WorkflowTransitionMutation) SetLabel(s string)
- func (m *WorkflowTransitionMutation) SetOp(op Op)
- func (m *WorkflowTransitionMutation) SetRoles(s []string)
- func (m *WorkflowTransitionMutation) SetToState(s string)
- func (m *WorkflowTransitionMutation) SetWeight(i int)
- func (m *WorkflowTransitionMutation) ToState() (r string, exists bool)
- func (m WorkflowTransitionMutation) Tx() (*Tx, error)
- func (m *WorkflowTransitionMutation) Type() string
- func (m *WorkflowTransitionMutation) Weight() (r int, exists bool)
- func (m *WorkflowTransitionMutation) Where(ps ...predicate.WorkflowTransition)
- func (m *WorkflowTransitionMutation) WhereP(ps ...func(*sql.Selector))
- type WorkflowTransitionQuery
- func (_q *WorkflowTransitionQuery) Aggregate(fns ...AggregateFunc) *WorkflowTransitionSelect
- func (_q *WorkflowTransitionQuery) All(ctx context.Context) ([]*WorkflowTransition, error)
- func (_q *WorkflowTransitionQuery) AllX(ctx context.Context) []*WorkflowTransition
- func (_q *WorkflowTransitionQuery) Clone() *WorkflowTransitionQuery
- func (_q *WorkflowTransitionQuery) Count(ctx context.Context) (int, error)
- func (_q *WorkflowTransitionQuery) CountX(ctx context.Context) int
- func (_q *WorkflowTransitionQuery) Exist(ctx context.Context) (bool, error)
- func (_q *WorkflowTransitionQuery) ExistX(ctx context.Context) bool
- func (_q *WorkflowTransitionQuery) First(ctx context.Context) (*WorkflowTransition, error)
- func (_q *WorkflowTransitionQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *WorkflowTransitionQuery) FirstIDX(ctx context.Context) int
- func (_q *WorkflowTransitionQuery) FirstX(ctx context.Context) *WorkflowTransition
- func (_q *WorkflowTransitionQuery) GroupBy(field string, fields ...string) *WorkflowTransitionGroupBy
- func (_q *WorkflowTransitionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *WorkflowTransitionQuery) IDsX(ctx context.Context) []int
- func (_q *WorkflowTransitionQuery) Limit(limit int) *WorkflowTransitionQuery
- func (_q *WorkflowTransitionQuery) Offset(offset int) *WorkflowTransitionQuery
- func (_q *WorkflowTransitionQuery) Only(ctx context.Context) (*WorkflowTransition, error)
- func (_q *WorkflowTransitionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *WorkflowTransitionQuery) OnlyIDX(ctx context.Context) int
- func (_q *WorkflowTransitionQuery) OnlyX(ctx context.Context) *WorkflowTransition
- func (_q *WorkflowTransitionQuery) Order(o ...workflowtransition.OrderOption) *WorkflowTransitionQuery
- func (_q *WorkflowTransitionQuery) Select(fields ...string) *WorkflowTransitionSelect
- func (_q *WorkflowTransitionQuery) Unique(unique bool) *WorkflowTransitionQuery
- func (_q *WorkflowTransitionQuery) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionQuery
- type WorkflowTransitionSelect
- func (_s *WorkflowTransitionSelect) Aggregate(fns ...AggregateFunc) *WorkflowTransitionSelect
- func (s *WorkflowTransitionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkflowTransitionSelect) BoolX(ctx context.Context) bool
- func (s *WorkflowTransitionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkflowTransitionSelect) BoolsX(ctx context.Context) []bool
- func (s *WorkflowTransitionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkflowTransitionSelect) Float64X(ctx context.Context) float64
- func (s *WorkflowTransitionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkflowTransitionSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkflowTransitionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkflowTransitionSelect) IntX(ctx context.Context) int
- func (s *WorkflowTransitionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkflowTransitionSelect) IntsX(ctx context.Context) []int
- func (_s *WorkflowTransitionSelect) Scan(ctx context.Context, v any) error
- func (s *WorkflowTransitionSelect) ScanX(ctx context.Context, v any)
- func (s *WorkflowTransitionSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkflowTransitionSelect) StringX(ctx context.Context) string
- func (s *WorkflowTransitionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkflowTransitionSelect) StringsX(ctx context.Context) []string
- type WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) AddWeight(v int) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) AppendFromStates(v []string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) AppendRoles(v []string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) Exec(ctx context.Context) error
- func (_u *WorkflowTransitionUpdate) ExecX(ctx context.Context)
- func (_u *WorkflowTransitionUpdate) Mutation() *WorkflowTransitionMutation
- func (_u *WorkflowTransitionUpdate) Save(ctx context.Context) (int, error)
- func (_u *WorkflowTransitionUpdate) SaveX(ctx context.Context) int
- func (_u *WorkflowTransitionUpdate) SetComment(v string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetFromStates(v []string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetLabel(v string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetNillableComment(v *string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetNillableLabel(v *string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetNillableToState(v *string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetNillableWeight(v *int) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetRoles(v []string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetToState(v string) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) SetWeight(v int) *WorkflowTransitionUpdate
- func (_u *WorkflowTransitionUpdate) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionUpdate
- type WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) AddWeight(v int) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) AppendFromStates(v []string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) AppendRoles(v []string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) Exec(ctx context.Context) error
- func (_u *WorkflowTransitionUpdateOne) ExecX(ctx context.Context)
- func (_u *WorkflowTransitionUpdateOne) Mutation() *WorkflowTransitionMutation
- func (_u *WorkflowTransitionUpdateOne) Save(ctx context.Context) (*WorkflowTransition, error)
- func (_u *WorkflowTransitionUpdateOne) SaveX(ctx context.Context) *WorkflowTransition
- func (_u *WorkflowTransitionUpdateOne) Select(field string, fields ...string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetComment(v string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetFromStates(v []string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetLabel(v string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetNillableComment(v *string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetNillableLabel(v *string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetNillableToState(v *string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetNillableWeight(v *int) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetRoles(v []string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetToState(v string) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) SetWeight(v int) *WorkflowTransitionUpdateOne
- func (_u *WorkflowTransitionUpdateOne) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionUpdateOne
- type WorkflowTransitions
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeHistory = "History" TypeLock = "Lock" TypeNode = "Node" TypeNodeState = "NodeState" TypeWorkflowSettings = "WorkflowSettings" TypeWorkflowState = "WorkflowState" TypeWorkflowTransition = "WorkflowTransition" )
Variables ¶
var ErrTxStarted = errors.New("generated: 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(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// History is the client for interacting with the History builders.
History *HistoryClient
// Lock is the client for interacting with the Lock builders.
Lock *LockClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// NodeState is the client for interacting with the NodeState builders.
NodeState *NodeStateClient
// WorkflowSettings is the client for interacting with the WorkflowSettings builders.
WorkflowSettings *WorkflowSettingsClient
// WorkflowState is the client for interacting with the WorkflowState builders.
WorkflowState *WorkflowStateClient
// WorkflowTransition is the client for interacting with the WorkflowTransition builders.
WorkflowTransition *WorkflowTransitionClient
// 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(). History. 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 History ¶
type History struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Nid holds the value of the "nid" field.
Nid int `json:"nid,omitempty"`
// FromState holds the value of the "from_state" field.
FromState string `json:"from_state,omitempty"`
// ToState holds the value of the "to_state" field.
ToState string `json:"to_state,omitempty"`
// UID holds the value of the "uid" field.
UID int `json:"uid,omitempty"`
// Comment holds the value of the "comment" field.
Comment string `json:"comment,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the HistoryQuery when eager-loading is set.
Edges HistoryEdges `json:"edges"`
// contains filtered or unexported fields
}
History is the model entity for the History schema.
func (*History) Unwrap ¶
Unwrap unwraps the History 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 (*History) Update ¶
func (_m *History) Update() *HistoryUpdateOne
Update returns a builder for updating this History. Note that you need to call History.Unwrap() before calling this method if this History was returned from a transaction, and the transaction was committed or rolled back.
type HistoryClient ¶
type HistoryClient struct {
// contains filtered or unexported fields
}
HistoryClient is a client for the History schema.
func NewHistoryClient ¶
func NewHistoryClient(c config) *HistoryClient
NewHistoryClient returns a client for the History from the given config.
func (*HistoryClient) Create ¶
func (c *HistoryClient) Create() *HistoryCreate
Create returns a builder for creating a History entity.
func (*HistoryClient) CreateBulk ¶
func (c *HistoryClient) CreateBulk(builders ...*HistoryCreate) *HistoryCreateBulk
CreateBulk returns a builder for creating a bulk of History entities.
func (*HistoryClient) Delete ¶
func (c *HistoryClient) Delete() *HistoryDelete
Delete returns a delete builder for History.
func (*HistoryClient) DeleteOne ¶
func (c *HistoryClient) DeleteOne(_m *History) *HistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HistoryClient) DeleteOneID ¶
func (c *HistoryClient) DeleteOneID(id int) *HistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*HistoryClient) GetX ¶
func (c *HistoryClient) GetX(ctx context.Context, id int) *History
GetX is like Get, but panics if an error occurs.
func (*HistoryClient) Hooks ¶
func (c *HistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*HistoryClient) Intercept ¶
func (c *HistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `history.Intercept(f(g(h())))`.
func (*HistoryClient) Interceptors ¶
func (c *HistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*HistoryClient) MapCreateBulk ¶
func (c *HistoryClient) MapCreateBulk(slice any, setFunc func(*HistoryCreate, int)) *HistoryCreateBulk
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 (*HistoryClient) Query ¶
func (c *HistoryClient) Query() *HistoryQuery
Query returns a query builder for History.
func (*HistoryClient) QueryNode ¶
func (c *HistoryClient) QueryNode(_m *History) *NodeQuery
QueryNode queries the node edge of a History.
func (*HistoryClient) Update ¶
func (c *HistoryClient) Update() *HistoryUpdate
Update returns an update builder for History.
func (*HistoryClient) UpdateOne ¶
func (c *HistoryClient) UpdateOne(_m *History) *HistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HistoryClient) UpdateOneID ¶
func (c *HistoryClient) UpdateOneID(id int) *HistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HistoryClient) Use ¶
func (c *HistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `history.Hooks(f(g(h())))`.
type HistoryCreate ¶
type HistoryCreate struct {
// contains filtered or unexported fields
}
HistoryCreate is the builder for creating a History entity.
func (*HistoryCreate) Exec ¶
func (_c *HistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryCreate) ExecX ¶
func (_c *HistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryCreate) Mutation ¶
func (_c *HistoryCreate) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryCreate) Save ¶
func (_c *HistoryCreate) Save(ctx context.Context) (*History, error)
Save creates the History in the database.
func (*HistoryCreate) SaveX ¶
func (_c *HistoryCreate) SaveX(ctx context.Context) *History
SaveX calls Save and panics if Save returns an error.
func (*HistoryCreate) SetComment ¶
func (_c *HistoryCreate) SetComment(v string) *HistoryCreate
SetComment sets the "comment" field.
func (*HistoryCreate) SetCreatedAt ¶
func (_c *HistoryCreate) SetCreatedAt(v time.Time) *HistoryCreate
SetCreatedAt sets the "created_at" field.
func (*HistoryCreate) SetFromState ¶
func (_c *HistoryCreate) SetFromState(v string) *HistoryCreate
SetFromState sets the "from_state" field.
func (*HistoryCreate) SetID ¶
func (_c *HistoryCreate) SetID(v int) *HistoryCreate
SetID sets the "id" field.
func (*HistoryCreate) SetNid ¶
func (_c *HistoryCreate) SetNid(v int) *HistoryCreate
SetNid sets the "nid" field.
func (*HistoryCreate) SetNillableUID ¶
func (_c *HistoryCreate) SetNillableUID(v *int) *HistoryCreate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*HistoryCreate) SetNode ¶
func (_c *HistoryCreate) SetNode(v *Node) *HistoryCreate
SetNode sets the "node" edge to the Node entity.
func (*HistoryCreate) SetNodeID ¶
func (_c *HistoryCreate) SetNodeID(id int) *HistoryCreate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*HistoryCreate) SetToState ¶
func (_c *HistoryCreate) SetToState(v string) *HistoryCreate
SetToState sets the "to_state" field.
func (*HistoryCreate) SetUID ¶
func (_c *HistoryCreate) SetUID(v int) *HistoryCreate
SetUID sets the "uid" field.
type HistoryCreateBulk ¶
type HistoryCreateBulk struct {
// contains filtered or unexported fields
}
HistoryCreateBulk is the builder for creating many History entities in bulk.
func (*HistoryCreateBulk) Exec ¶
func (_c *HistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryCreateBulk) ExecX ¶
func (_c *HistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HistoryDelete ¶
type HistoryDelete struct {
// contains filtered or unexported fields
}
HistoryDelete is the builder for deleting a History entity.
func (*HistoryDelete) Exec ¶
func (_d *HistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HistoryDelete) ExecX ¶
func (_d *HistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HistoryDelete) Where ¶
func (_d *HistoryDelete) Where(ps ...predicate.History) *HistoryDelete
Where appends a list predicates to the HistoryDelete builder.
type HistoryDeleteOne ¶
type HistoryDeleteOne struct {
// contains filtered or unexported fields
}
HistoryDeleteOne is the builder for deleting a single History entity.
func (*HistoryDeleteOne) Exec ¶
func (_d *HistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HistoryDeleteOne) ExecX ¶
func (_d *HistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryDeleteOne) Where ¶
func (_d *HistoryDeleteOne) Where(ps ...predicate.History) *HistoryDeleteOne
Where appends a list predicates to the HistoryDelete builder.
type HistoryEdges ¶
type HistoryEdges struct {
// Node holds the value of the node edge.
Node *Node `json:"node,omitempty"`
// contains filtered or unexported fields
}
HistoryEdges holds the relations/edges for other nodes in the graph.
func (HistoryEdges) NodeOrErr ¶
func (e HistoryEdges) NodeOrErr() (*Node, error)
NodeOrErr returns the Node value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type HistoryGroupBy ¶
type HistoryGroupBy struct {
// contains filtered or unexported fields
}
HistoryGroupBy is the group-by builder for History entities.
func (*HistoryGroupBy) Aggregate ¶
func (_g *HistoryGroupBy) Aggregate(fns ...AggregateFunc) *HistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Scan ¶
func (_g *HistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HistoryMutation ¶
type HistoryMutation struct {
// contains filtered or unexported fields
}
HistoryMutation represents an operation that mutates the History nodes in the graph.
func (*HistoryMutation) AddField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) AddUID ¶
func (m *HistoryMutation) AddUID(i int)
AddUID adds i to the "uid" field.
func (*HistoryMutation) AddedEdges ¶
func (m *HistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HistoryMutation) AddedField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) AddedFields ¶
func (m *HistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HistoryMutation) AddedIDs ¶
func (m *HistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HistoryMutation) AddedUID ¶
func (m *HistoryMutation) AddedUID() (r int, exists bool)
AddedUID returns the value that was added to the "uid" field in this mutation.
func (*HistoryMutation) ClearEdge ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ClearField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ClearNode ¶
func (m *HistoryMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*HistoryMutation) ClearedEdges ¶
func (m *HistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HistoryMutation) ClearedFields ¶
func (m *HistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HistoryMutation) Client ¶
func (m HistoryMutation) 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 (*HistoryMutation) Comment ¶
func (m *HistoryMutation) Comment() (r string, exists bool)
Comment returns the value of the "comment" field in the mutation.
func (*HistoryMutation) CreatedAt ¶
func (m *HistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*HistoryMutation) EdgeCleared ¶
func (m *HistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HistoryMutation) Field ¶
func (m *HistoryMutation) 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 (*HistoryMutation) FieldCleared ¶
func (m *HistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HistoryMutation) Fields ¶
func (m *HistoryMutation) 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 (*HistoryMutation) FromState ¶
func (m *HistoryMutation) FromState() (r string, exists bool)
FromState returns the value of the "from_state" field in the mutation.
func (*HistoryMutation) ID ¶
func (m *HistoryMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*HistoryMutation) IDs ¶
func (m *HistoryMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*HistoryMutation) Nid ¶
func (m *HistoryMutation) Nid() (r int, exists bool)
Nid returns the value of the "nid" field in the mutation.
func (*HistoryMutation) NodeCleared ¶
func (m *HistoryMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*HistoryMutation) NodeID ¶
func (m *HistoryMutation) NodeID() (id int, exists bool)
NodeID returns the "node" edge ID in the mutation.
func (*HistoryMutation) NodeIDs ¶
func (m *HistoryMutation) NodeIDs() (ids []int)
NodeIDs returns the "node" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NodeID instead. It exists only for internal usage by the builders.
func (*HistoryMutation) OldComment ¶
func (m *HistoryMutation) OldComment(ctx context.Context) (v string, err error)
OldComment returns the old "comment" field's value of the History entity. If the History object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HistoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the History entity. If the History object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HistoryMutation) 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 (*HistoryMutation) OldFromState ¶
func (m *HistoryMutation) OldFromState(ctx context.Context) (v string, err error)
OldFromState returns the old "from_state" field's value of the History entity. If the History object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HistoryMutation) OldNid ¶
func (m *HistoryMutation) OldNid(ctx context.Context) (v int, err error)
OldNid returns the old "nid" field's value of the History entity. If the History object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HistoryMutation) OldToState ¶
func (m *HistoryMutation) OldToState(ctx context.Context) (v string, err error)
OldToState returns the old "to_state" field's value of the History entity. If the History object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HistoryMutation) OldUID ¶
func (m *HistoryMutation) OldUID(ctx context.Context) (v int, err error)
OldUID returns the old "uid" field's value of the History entity. If the History object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*HistoryMutation) RemovedEdges ¶
func (m *HistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HistoryMutation) RemovedIDs ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetComment ¶
func (m *HistoryMutation) ResetComment()
ResetComment resets all changes to the "comment" field.
func (*HistoryMutation) ResetCreatedAt ¶
func (m *HistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*HistoryMutation) ResetEdge ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetFromState ¶
func (m *HistoryMutation) ResetFromState()
ResetFromState resets all changes to the "from_state" field.
func (*HistoryMutation) ResetNid ¶
func (m *HistoryMutation) ResetNid()
ResetNid resets all changes to the "nid" field.
func (*HistoryMutation) ResetNode ¶
func (m *HistoryMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*HistoryMutation) ResetToState ¶
func (m *HistoryMutation) ResetToState()
ResetToState resets all changes to the "to_state" field.
func (*HistoryMutation) ResetUID ¶
func (m *HistoryMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*HistoryMutation) SetComment ¶
func (m *HistoryMutation) SetComment(s string)
SetComment sets the "comment" field.
func (*HistoryMutation) SetCreatedAt ¶
func (m *HistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*HistoryMutation) SetField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) SetFromState ¶
func (m *HistoryMutation) SetFromState(s string)
SetFromState sets the "from_state" field.
func (*HistoryMutation) SetID ¶
func (m *HistoryMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of History entities.
func (*HistoryMutation) SetNid ¶
func (m *HistoryMutation) SetNid(i int)
SetNid sets the "nid" field.
func (*HistoryMutation) SetNodeID ¶
func (m *HistoryMutation) SetNodeID(id int)
SetNodeID sets the "node" edge to the Node entity by id.
func (*HistoryMutation) SetOp ¶
func (m *HistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*HistoryMutation) SetToState ¶
func (m *HistoryMutation) SetToState(s string)
SetToState sets the "to_state" field.
func (*HistoryMutation) SetUID ¶
func (m *HistoryMutation) SetUID(i int)
SetUID sets the "uid" field.
func (*HistoryMutation) ToState ¶
func (m *HistoryMutation) ToState() (r string, exists bool)
ToState returns the value of the "to_state" field in the mutation.
func (HistoryMutation) Tx ¶
func (m HistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HistoryMutation) Type ¶
func (m *HistoryMutation) Type() string
Type returns the node type of this mutation (History).
func (*HistoryMutation) UID ¶
func (m *HistoryMutation) UID() (r int, exists bool)
UID returns the value of the "uid" field in the mutation.
func (*HistoryMutation) Where ¶
func (m *HistoryMutation) Where(ps ...predicate.History)
Where appends a list predicates to the HistoryMutation builder.
func (*HistoryMutation) WhereP ¶
func (m *HistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type HistoryQuery ¶
type HistoryQuery struct {
// contains filtered or unexported fields
}
HistoryQuery is the builder for querying History entities.
func (*HistoryQuery) Aggregate ¶
func (_q *HistoryQuery) Aggregate(fns ...AggregateFunc) *HistorySelect
Aggregate returns a HistorySelect configured with the given aggregations.
func (*HistoryQuery) All ¶
func (_q *HistoryQuery) All(ctx context.Context) ([]*History, error)
All executes the query and returns a list of Histories.
func (*HistoryQuery) AllX ¶
func (_q *HistoryQuery) AllX(ctx context.Context) []*History
AllX is like All, but panics if an error occurs.
func (*HistoryQuery) Clone ¶
func (_q *HistoryQuery) Clone() *HistoryQuery
Clone returns a duplicate of the HistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HistoryQuery) Count ¶
func (_q *HistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*HistoryQuery) CountX ¶
func (_q *HistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*HistoryQuery) Exist ¶
func (_q *HistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*HistoryQuery) ExistX ¶
func (_q *HistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*HistoryQuery) First ¶
func (_q *HistoryQuery) First(ctx context.Context) (*History, error)
First returns the first History entity from the query. Returns a *NotFoundError when no History was found.
func (*HistoryQuery) FirstID ¶
func (_q *HistoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first History ID from the query. Returns a *NotFoundError when no History ID was found.
func (*HistoryQuery) FirstIDX ¶
func (_q *HistoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*HistoryQuery) FirstX ¶
func (_q *HistoryQuery) FirstX(ctx context.Context) *History
FirstX is like First, but panics if an error occurs.
func (*HistoryQuery) GroupBy ¶
func (_q *HistoryQuery) GroupBy(field string, fields ...string) *HistoryGroupBy
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 {
Nid int `json:"nid,omitempty"`
Count int `json:"count,omitempty"`
}
client.History.Query().
GroupBy(history.FieldNid).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*HistoryQuery) IDs ¶
func (_q *HistoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of History IDs.
func (*HistoryQuery) IDsX ¶
func (_q *HistoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*HistoryQuery) Limit ¶
func (_q *HistoryQuery) Limit(limit int) *HistoryQuery
Limit the number of records to be returned by this query.
func (*HistoryQuery) Offset ¶
func (_q *HistoryQuery) Offset(offset int) *HistoryQuery
Offset to start from.
func (*HistoryQuery) Only ¶
func (_q *HistoryQuery) Only(ctx context.Context) (*History, error)
Only returns a single History entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one History entity is found. Returns a *NotFoundError when no History entities are found.
func (*HistoryQuery) OnlyID ¶
func (_q *HistoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only History ID in the query. Returns a *NotSingularError when more than one History ID is found. Returns a *NotFoundError when no entities are found.
func (*HistoryQuery) OnlyIDX ¶
func (_q *HistoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*HistoryQuery) OnlyX ¶
func (_q *HistoryQuery) OnlyX(ctx context.Context) *History
OnlyX is like Only, but panics if an error occurs.
func (*HistoryQuery) Order ¶
func (_q *HistoryQuery) Order(o ...history.OrderOption) *HistoryQuery
Order specifies how the records should be ordered.
func (*HistoryQuery) QueryNode ¶
func (_q *HistoryQuery) QueryNode() *NodeQuery
QueryNode chains the current query on the "node" edge.
func (*HistoryQuery) Select ¶
func (_q *HistoryQuery) Select(fields ...string) *HistorySelect
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 {
Nid int `json:"nid,omitempty"`
}
client.History.Query().
Select(history.FieldNid).
Scan(ctx, &v)
func (*HistoryQuery) Unique ¶
func (_q *HistoryQuery) Unique(unique bool) *HistoryQuery
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 (*HistoryQuery) Where ¶
func (_q *HistoryQuery) Where(ps ...predicate.History) *HistoryQuery
Where adds a new predicate for the HistoryQuery builder.
func (*HistoryQuery) WithNode ¶
func (_q *HistoryQuery) WithNode(opts ...func(*NodeQuery)) *HistoryQuery
WithNode tells the query-builder to eager-load the nodes that are connected to the "node" edge. The optional arguments are used to configure the query builder of the edge.
type HistorySelect ¶
type HistorySelect struct {
*HistoryQuery
// contains filtered or unexported fields
}
HistorySelect is the builder for selecting fields of History entities.
func (*HistorySelect) Aggregate ¶
func (_s *HistorySelect) Aggregate(fns ...AggregateFunc) *HistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*HistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Scan ¶
func (_s *HistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HistoryUpdate ¶
type HistoryUpdate struct {
// contains filtered or unexported fields
}
HistoryUpdate is the builder for updating History entities.
func (*HistoryUpdate) AddUID ¶
func (_u *HistoryUpdate) AddUID(v int) *HistoryUpdate
AddUID adds value to the "uid" field.
func (*HistoryUpdate) ClearNode ¶
func (_u *HistoryUpdate) ClearNode() *HistoryUpdate
ClearNode clears the "node" edge to the Node entity.
func (*HistoryUpdate) Exec ¶
func (_u *HistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryUpdate) ExecX ¶
func (_u *HistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryUpdate) Mutation ¶
func (_u *HistoryUpdate) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryUpdate) Save ¶
func (_u *HistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HistoryUpdate) SaveX ¶
func (_u *HistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HistoryUpdate) SetComment ¶
func (_u *HistoryUpdate) SetComment(v string) *HistoryUpdate
SetComment sets the "comment" field.
func (*HistoryUpdate) SetCreatedAt ¶
func (_u *HistoryUpdate) SetCreatedAt(v time.Time) *HistoryUpdate
SetCreatedAt sets the "created_at" field.
func (*HistoryUpdate) SetFromState ¶
func (_u *HistoryUpdate) SetFromState(v string) *HistoryUpdate
SetFromState sets the "from_state" field.
func (*HistoryUpdate) SetNid ¶
func (_u *HistoryUpdate) SetNid(v int) *HistoryUpdate
SetNid sets the "nid" field.
func (*HistoryUpdate) SetNillableComment ¶
func (_u *HistoryUpdate) SetNillableComment(v *string) *HistoryUpdate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*HistoryUpdate) SetNillableCreatedAt ¶
func (_u *HistoryUpdate) SetNillableCreatedAt(v *time.Time) *HistoryUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*HistoryUpdate) SetNillableFromState ¶
func (_u *HistoryUpdate) SetNillableFromState(v *string) *HistoryUpdate
SetNillableFromState sets the "from_state" field if the given value is not nil.
func (*HistoryUpdate) SetNillableNid ¶
func (_u *HistoryUpdate) SetNillableNid(v *int) *HistoryUpdate
SetNillableNid sets the "nid" field if the given value is not nil.
func (*HistoryUpdate) SetNillableToState ¶
func (_u *HistoryUpdate) SetNillableToState(v *string) *HistoryUpdate
SetNillableToState sets the "to_state" field if the given value is not nil.
func (*HistoryUpdate) SetNillableUID ¶
func (_u *HistoryUpdate) SetNillableUID(v *int) *HistoryUpdate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*HistoryUpdate) SetNode ¶
func (_u *HistoryUpdate) SetNode(v *Node) *HistoryUpdate
SetNode sets the "node" edge to the Node entity.
func (*HistoryUpdate) SetNodeID ¶
func (_u *HistoryUpdate) SetNodeID(id int) *HistoryUpdate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*HistoryUpdate) SetToState ¶
func (_u *HistoryUpdate) SetToState(v string) *HistoryUpdate
SetToState sets the "to_state" field.
func (*HistoryUpdate) SetUID ¶
func (_u *HistoryUpdate) SetUID(v int) *HistoryUpdate
SetUID sets the "uid" field.
func (*HistoryUpdate) Where ¶
func (_u *HistoryUpdate) Where(ps ...predicate.History) *HistoryUpdate
Where appends a list predicates to the HistoryUpdate builder.
type HistoryUpdateOne ¶
type HistoryUpdateOne struct {
// contains filtered or unexported fields
}
HistoryUpdateOne is the builder for updating a single History entity.
func (*HistoryUpdateOne) AddUID ¶
func (_u *HistoryUpdateOne) AddUID(v int) *HistoryUpdateOne
AddUID adds value to the "uid" field.
func (*HistoryUpdateOne) ClearNode ¶
func (_u *HistoryUpdateOne) ClearNode() *HistoryUpdateOne
ClearNode clears the "node" edge to the Node entity.
func (*HistoryUpdateOne) Exec ¶
func (_u *HistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HistoryUpdateOne) ExecX ¶
func (_u *HistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryUpdateOne) Mutation ¶
func (_u *HistoryUpdateOne) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryUpdateOne) Save ¶
func (_u *HistoryUpdateOne) Save(ctx context.Context) (*History, error)
Save executes the query and returns the updated History entity.
func (*HistoryUpdateOne) SaveX ¶
func (_u *HistoryUpdateOne) SaveX(ctx context.Context) *History
SaveX is like Save, but panics if an error occurs.
func (*HistoryUpdateOne) Select ¶
func (_u *HistoryUpdateOne) Select(field string, fields ...string) *HistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HistoryUpdateOne) SetComment ¶
func (_u *HistoryUpdateOne) SetComment(v string) *HistoryUpdateOne
SetComment sets the "comment" field.
func (*HistoryUpdateOne) SetCreatedAt ¶
func (_u *HistoryUpdateOne) SetCreatedAt(v time.Time) *HistoryUpdateOne
SetCreatedAt sets the "created_at" field.
func (*HistoryUpdateOne) SetFromState ¶
func (_u *HistoryUpdateOne) SetFromState(v string) *HistoryUpdateOne
SetFromState sets the "from_state" field.
func (*HistoryUpdateOne) SetNid ¶
func (_u *HistoryUpdateOne) SetNid(v int) *HistoryUpdateOne
SetNid sets the "nid" field.
func (*HistoryUpdateOne) SetNillableComment ¶
func (_u *HistoryUpdateOne) SetNillableComment(v *string) *HistoryUpdateOne
SetNillableComment sets the "comment" field if the given value is not nil.
func (*HistoryUpdateOne) SetNillableCreatedAt ¶
func (_u *HistoryUpdateOne) SetNillableCreatedAt(v *time.Time) *HistoryUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*HistoryUpdateOne) SetNillableFromState ¶
func (_u *HistoryUpdateOne) SetNillableFromState(v *string) *HistoryUpdateOne
SetNillableFromState sets the "from_state" field if the given value is not nil.
func (*HistoryUpdateOne) SetNillableNid ¶
func (_u *HistoryUpdateOne) SetNillableNid(v *int) *HistoryUpdateOne
SetNillableNid sets the "nid" field if the given value is not nil.
func (*HistoryUpdateOne) SetNillableToState ¶
func (_u *HistoryUpdateOne) SetNillableToState(v *string) *HistoryUpdateOne
SetNillableToState sets the "to_state" field if the given value is not nil.
func (*HistoryUpdateOne) SetNillableUID ¶
func (_u *HistoryUpdateOne) SetNillableUID(v *int) *HistoryUpdateOne
SetNillableUID sets the "uid" field if the given value is not nil.
func (*HistoryUpdateOne) SetNode ¶
func (_u *HistoryUpdateOne) SetNode(v *Node) *HistoryUpdateOne
SetNode sets the "node" edge to the Node entity.
func (*HistoryUpdateOne) SetNodeID ¶
func (_u *HistoryUpdateOne) SetNodeID(id int) *HistoryUpdateOne
SetNodeID sets the "node" edge to the Node entity by ID.
func (*HistoryUpdateOne) SetToState ¶
func (_u *HistoryUpdateOne) SetToState(v string) *HistoryUpdateOne
SetToState sets the "to_state" field.
func (*HistoryUpdateOne) SetUID ¶
func (_u *HistoryUpdateOne) SetUID(v int) *HistoryUpdateOne
SetUID sets the "uid" field.
func (*HistoryUpdateOne) Where ¶
func (_u *HistoryUpdateOne) Where(ps ...predicate.History) *HistoryUpdateOne
Where appends a list predicates to the HistoryUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type Lock ¶
type Lock struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Nid holds the value of the "nid" field.
Nid int `json:"nid,omitempty"`
// UID holds the value of the "uid" field.
UID int `json:"uid,omitempty"`
// LockedAt holds the value of the "locked_at" field.
LockedAt time.Time `json:"locked_at,omitempty"`
// TouchedAt holds the value of the "touched_at" field.
TouchedAt time.Time `json:"touched_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the LockQuery when eager-loading is set.
Edges LockEdges `json:"edges"`
// contains filtered or unexported fields
}
Lock is the model entity for the Lock schema.
func (*Lock) Unwrap ¶
Unwrap unwraps the Lock 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 (*Lock) Update ¶
func (_m *Lock) Update() *LockUpdateOne
Update returns a builder for updating this Lock. Note that you need to call Lock.Unwrap() before calling this method if this Lock was returned from a transaction, and the transaction was committed or rolled back.
type LockClient ¶
type LockClient struct {
// contains filtered or unexported fields
}
LockClient is a client for the Lock schema.
func NewLockClient ¶
func NewLockClient(c config) *LockClient
NewLockClient returns a client for the Lock from the given config.
func (*LockClient) Create ¶
func (c *LockClient) Create() *LockCreate
Create returns a builder for creating a Lock entity.
func (*LockClient) CreateBulk ¶
func (c *LockClient) CreateBulk(builders ...*LockCreate) *LockCreateBulk
CreateBulk returns a builder for creating a bulk of Lock entities.
func (*LockClient) Delete ¶
func (c *LockClient) Delete() *LockDelete
Delete returns a delete builder for Lock.
func (*LockClient) DeleteOne ¶
func (c *LockClient) DeleteOne(_m *Lock) *LockDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LockClient) DeleteOneID ¶
func (c *LockClient) DeleteOneID(id int) *LockDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LockClient) GetX ¶
func (c *LockClient) GetX(ctx context.Context, id int) *Lock
GetX is like Get, but panics if an error occurs.
func (*LockClient) Intercept ¶
func (c *LockClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `lock.Intercept(f(g(h())))`.
func (*LockClient) Interceptors ¶
func (c *LockClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LockClient) MapCreateBulk ¶
func (c *LockClient) MapCreateBulk(slice any, setFunc func(*LockCreate, int)) *LockCreateBulk
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 (*LockClient) Query ¶
func (c *LockClient) Query() *LockQuery
Query returns a query builder for Lock.
func (*LockClient) QueryNode ¶
func (c *LockClient) QueryNode(_m *Lock) *NodeQuery
QueryNode queries the node edge of a Lock.
func (*LockClient) Update ¶
func (c *LockClient) Update() *LockUpdate
Update returns an update builder for Lock.
func (*LockClient) UpdateOne ¶
func (c *LockClient) UpdateOne(_m *Lock) *LockUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LockClient) UpdateOneID ¶
func (c *LockClient) UpdateOneID(id int) *LockUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LockClient) Use ¶
func (c *LockClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `lock.Hooks(f(g(h())))`.
type LockCreate ¶
type LockCreate struct {
// contains filtered or unexported fields
}
LockCreate is the builder for creating a Lock entity.
func (*LockCreate) Exec ¶
func (_c *LockCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LockCreate) ExecX ¶
func (_c *LockCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LockCreate) Mutation ¶
func (_c *LockCreate) Mutation() *LockMutation
Mutation returns the LockMutation object of the builder.
func (*LockCreate) Save ¶
func (_c *LockCreate) Save(ctx context.Context) (*Lock, error)
Save creates the Lock in the database.
func (*LockCreate) SaveX ¶
func (_c *LockCreate) SaveX(ctx context.Context) *Lock
SaveX calls Save and panics if Save returns an error.
func (*LockCreate) SetID ¶
func (_c *LockCreate) SetID(v int) *LockCreate
SetID sets the "id" field.
func (*LockCreate) SetLockedAt ¶
func (_c *LockCreate) SetLockedAt(v time.Time) *LockCreate
SetLockedAt sets the "locked_at" field.
func (*LockCreate) SetNid ¶
func (_c *LockCreate) SetNid(v int) *LockCreate
SetNid sets the "nid" field.
func (*LockCreate) SetNode ¶
func (_c *LockCreate) SetNode(v *Node) *LockCreate
SetNode sets the "node" edge to the Node entity.
func (*LockCreate) SetNodeID ¶
func (_c *LockCreate) SetNodeID(id int) *LockCreate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*LockCreate) SetTouchedAt ¶
func (_c *LockCreate) SetTouchedAt(v time.Time) *LockCreate
SetTouchedAt sets the "touched_at" field.
func (*LockCreate) SetUID ¶
func (_c *LockCreate) SetUID(v int) *LockCreate
SetUID sets the "uid" field.
type LockCreateBulk ¶
type LockCreateBulk struct {
// contains filtered or unexported fields
}
LockCreateBulk is the builder for creating many Lock entities in bulk.
func (*LockCreateBulk) Exec ¶
func (_c *LockCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LockCreateBulk) ExecX ¶
func (_c *LockCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LockDelete ¶
type LockDelete struct {
// contains filtered or unexported fields
}
LockDelete is the builder for deleting a Lock entity.
func (*LockDelete) Exec ¶
func (_d *LockDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LockDelete) ExecX ¶
func (_d *LockDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LockDelete) Where ¶
func (_d *LockDelete) Where(ps ...predicate.Lock) *LockDelete
Where appends a list predicates to the LockDelete builder.
type LockDeleteOne ¶
type LockDeleteOne struct {
// contains filtered or unexported fields
}
LockDeleteOne is the builder for deleting a single Lock entity.
func (*LockDeleteOne) Exec ¶
func (_d *LockDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LockDeleteOne) ExecX ¶
func (_d *LockDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LockDeleteOne) Where ¶
func (_d *LockDeleteOne) Where(ps ...predicate.Lock) *LockDeleteOne
Where appends a list predicates to the LockDelete builder.
type LockEdges ¶
type LockEdges struct {
// Node holds the value of the node edge.
Node *Node `json:"node,omitempty"`
// contains filtered or unexported fields
}
LockEdges holds the relations/edges for other nodes in the graph.
type LockGroupBy ¶
type LockGroupBy struct {
// contains filtered or unexported fields
}
LockGroupBy is the group-by builder for Lock entities.
func (*LockGroupBy) Aggregate ¶
func (_g *LockGroupBy) Aggregate(fns ...AggregateFunc) *LockGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LockGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LockGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LockGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LockGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LockGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LockGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LockGroupBy) Scan ¶
func (_g *LockGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LockGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LockMutation ¶
type LockMutation struct {
// contains filtered or unexported fields
}
LockMutation represents an operation that mutates the Lock nodes in the graph.
func (*LockMutation) AddField ¶
func (m *LockMutation) 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 (*LockMutation) AddUID ¶
func (m *LockMutation) AddUID(i int)
AddUID adds i to the "uid" field.
func (*LockMutation) AddedEdges ¶
func (m *LockMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LockMutation) AddedField ¶
func (m *LockMutation) 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 (*LockMutation) AddedFields ¶
func (m *LockMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LockMutation) AddedIDs ¶
func (m *LockMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LockMutation) AddedUID ¶
func (m *LockMutation) AddedUID() (r int, exists bool)
AddedUID returns the value that was added to the "uid" field in this mutation.
func (*LockMutation) ClearEdge ¶
func (m *LockMutation) 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 (*LockMutation) ClearField ¶
func (m *LockMutation) 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 (*LockMutation) ClearNode ¶
func (m *LockMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*LockMutation) ClearedEdges ¶
func (m *LockMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LockMutation) ClearedFields ¶
func (m *LockMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LockMutation) Client ¶
func (m LockMutation) 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 (*LockMutation) EdgeCleared ¶
func (m *LockMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LockMutation) Field ¶
func (m *LockMutation) 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 (*LockMutation) FieldCleared ¶
func (m *LockMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LockMutation) Fields ¶
func (m *LockMutation) 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 (*LockMutation) ID ¶
func (m *LockMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*LockMutation) IDs ¶
func (m *LockMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*LockMutation) LockedAt ¶
func (m *LockMutation) LockedAt() (r time.Time, exists bool)
LockedAt returns the value of the "locked_at" field in the mutation.
func (*LockMutation) Nid ¶
func (m *LockMutation) Nid() (r int, exists bool)
Nid returns the value of the "nid" field in the mutation.
func (*LockMutation) NodeCleared ¶
func (m *LockMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*LockMutation) NodeID ¶
func (m *LockMutation) NodeID() (id int, exists bool)
NodeID returns the "node" edge ID in the mutation.
func (*LockMutation) NodeIDs ¶
func (m *LockMutation) NodeIDs() (ids []int)
NodeIDs returns the "node" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NodeID instead. It exists only for internal usage by the builders.
func (*LockMutation) 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 (*LockMutation) OldLockedAt ¶
OldLockedAt returns the old "locked_at" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LockMutation) OldNid ¶
func (m *LockMutation) OldNid(ctx context.Context) (v int, err error)
OldNid returns the old "nid" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LockMutation) OldTouchedAt ¶
OldTouchedAt returns the old "touched_at" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LockMutation) OldUID ¶
func (m *LockMutation) OldUID(ctx context.Context) (v int, err error)
OldUID returns the old "uid" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*LockMutation) RemovedEdges ¶
func (m *LockMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LockMutation) RemovedIDs ¶
func (m *LockMutation) 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 (*LockMutation) ResetEdge ¶
func (m *LockMutation) 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 (*LockMutation) ResetField ¶
func (m *LockMutation) 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 (*LockMutation) ResetLockedAt ¶
func (m *LockMutation) ResetLockedAt()
ResetLockedAt resets all changes to the "locked_at" field.
func (*LockMutation) ResetNid ¶
func (m *LockMutation) ResetNid()
ResetNid resets all changes to the "nid" field.
func (*LockMutation) ResetNode ¶
func (m *LockMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*LockMutation) ResetTouchedAt ¶
func (m *LockMutation) ResetTouchedAt()
ResetTouchedAt resets all changes to the "touched_at" field.
func (*LockMutation) ResetUID ¶
func (m *LockMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*LockMutation) SetField ¶
func (m *LockMutation) 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 (*LockMutation) SetID ¶
func (m *LockMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Lock entities.
func (*LockMutation) SetLockedAt ¶
func (m *LockMutation) SetLockedAt(t time.Time)
SetLockedAt sets the "locked_at" field.
func (*LockMutation) SetNodeID ¶
func (m *LockMutation) SetNodeID(id int)
SetNodeID sets the "node" edge to the Node entity by id.
func (*LockMutation) SetOp ¶
func (m *LockMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LockMutation) SetTouchedAt ¶
func (m *LockMutation) SetTouchedAt(t time.Time)
SetTouchedAt sets the "touched_at" field.
func (*LockMutation) TouchedAt ¶
func (m *LockMutation) TouchedAt() (r time.Time, exists bool)
TouchedAt returns the value of the "touched_at" field in the mutation.
func (LockMutation) Tx ¶
func (m LockMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LockMutation) Type ¶
func (m *LockMutation) Type() string
Type returns the node type of this mutation (Lock).
func (*LockMutation) UID ¶
func (m *LockMutation) UID() (r int, exists bool)
UID returns the value of the "uid" field in the mutation.
func (*LockMutation) Where ¶
func (m *LockMutation) Where(ps ...predicate.Lock)
Where appends a list predicates to the LockMutation builder.
func (*LockMutation) WhereP ¶
func (m *LockMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LockMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LockQuery ¶
type LockQuery struct {
// contains filtered or unexported fields
}
LockQuery is the builder for querying Lock entities.
func (*LockQuery) Aggregate ¶
func (_q *LockQuery) Aggregate(fns ...AggregateFunc) *LockSelect
Aggregate returns a LockSelect configured with the given aggregations.
func (*LockQuery) Clone ¶
Clone returns a duplicate of the LockQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LockQuery) First ¶
First returns the first Lock entity from the query. Returns a *NotFoundError when no Lock was found.
func (*LockQuery) FirstID ¶
FirstID returns the first Lock ID from the query. Returns a *NotFoundError when no Lock ID was found.
func (*LockQuery) GroupBy ¶
func (_q *LockQuery) GroupBy(field string, fields ...string) *LockGroupBy
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 {
Nid int `json:"nid,omitempty"`
Count int `json:"count,omitempty"`
}
client.Lock.Query().
GroupBy(lock.FieldNid).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*LockQuery) Only ¶
Only returns a single Lock entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Lock entity is found. Returns a *NotFoundError when no Lock entities are found.
func (*LockQuery) OnlyID ¶
OnlyID is like Only, but returns the only Lock ID in the query. Returns a *NotSingularError when more than one Lock ID is found. Returns a *NotFoundError when no entities are found.
func (*LockQuery) Order ¶
func (_q *LockQuery) Order(o ...lock.OrderOption) *LockQuery
Order specifies how the records should be ordered.
func (*LockQuery) Select ¶
func (_q *LockQuery) Select(fields ...string) *LockSelect
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 {
Nid int `json:"nid,omitempty"`
}
client.Lock.Query().
Select(lock.FieldNid).
Scan(ctx, &v)
func (*LockQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type LockSelect ¶
type LockSelect struct {
*LockQuery
// contains filtered or unexported fields
}
LockSelect is the builder for selecting fields of Lock entities.
func (*LockSelect) Aggregate ¶
func (_s *LockSelect) Aggregate(fns ...AggregateFunc) *LockSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LockSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LockSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LockSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LockSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LockSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LockSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LockSelect) Scan ¶
func (_s *LockSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LockSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LockUpdate ¶
type LockUpdate struct {
// contains filtered or unexported fields
}
LockUpdate is the builder for updating Lock entities.
func (*LockUpdate) AddUID ¶
func (_u *LockUpdate) AddUID(v int) *LockUpdate
AddUID adds value to the "uid" field.
func (*LockUpdate) ClearNode ¶
func (_u *LockUpdate) ClearNode() *LockUpdate
ClearNode clears the "node" edge to the Node entity.
func (*LockUpdate) Exec ¶
func (_u *LockUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LockUpdate) ExecX ¶
func (_u *LockUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LockUpdate) Mutation ¶
func (_u *LockUpdate) Mutation() *LockMutation
Mutation returns the LockMutation object of the builder.
func (*LockUpdate) Save ¶
func (_u *LockUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LockUpdate) SaveX ¶
func (_u *LockUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LockUpdate) SetLockedAt ¶
func (_u *LockUpdate) SetLockedAt(v time.Time) *LockUpdate
SetLockedAt sets the "locked_at" field.
func (*LockUpdate) SetNid ¶
func (_u *LockUpdate) SetNid(v int) *LockUpdate
SetNid sets the "nid" field.
func (*LockUpdate) SetNillableLockedAt ¶
func (_u *LockUpdate) SetNillableLockedAt(v *time.Time) *LockUpdate
SetNillableLockedAt sets the "locked_at" field if the given value is not nil.
func (*LockUpdate) SetNillableNid ¶
func (_u *LockUpdate) SetNillableNid(v *int) *LockUpdate
SetNillableNid sets the "nid" field if the given value is not nil.
func (*LockUpdate) SetNillableTouchedAt ¶
func (_u *LockUpdate) SetNillableTouchedAt(v *time.Time) *LockUpdate
SetNillableTouchedAt sets the "touched_at" field if the given value is not nil.
func (*LockUpdate) SetNillableUID ¶
func (_u *LockUpdate) SetNillableUID(v *int) *LockUpdate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*LockUpdate) SetNode ¶
func (_u *LockUpdate) SetNode(v *Node) *LockUpdate
SetNode sets the "node" edge to the Node entity.
func (*LockUpdate) SetNodeID ¶
func (_u *LockUpdate) SetNodeID(id int) *LockUpdate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*LockUpdate) SetTouchedAt ¶
func (_u *LockUpdate) SetTouchedAt(v time.Time) *LockUpdate
SetTouchedAt sets the "touched_at" field.
func (*LockUpdate) SetUID ¶
func (_u *LockUpdate) SetUID(v int) *LockUpdate
SetUID sets the "uid" field.
func (*LockUpdate) Where ¶
func (_u *LockUpdate) Where(ps ...predicate.Lock) *LockUpdate
Where appends a list predicates to the LockUpdate builder.
type LockUpdateOne ¶
type LockUpdateOne struct {
// contains filtered or unexported fields
}
LockUpdateOne is the builder for updating a single Lock entity.
func (*LockUpdateOne) AddUID ¶
func (_u *LockUpdateOne) AddUID(v int) *LockUpdateOne
AddUID adds value to the "uid" field.
func (*LockUpdateOne) ClearNode ¶
func (_u *LockUpdateOne) ClearNode() *LockUpdateOne
ClearNode clears the "node" edge to the Node entity.
func (*LockUpdateOne) Exec ¶
func (_u *LockUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LockUpdateOne) ExecX ¶
func (_u *LockUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LockUpdateOne) Mutation ¶
func (_u *LockUpdateOne) Mutation() *LockMutation
Mutation returns the LockMutation object of the builder.
func (*LockUpdateOne) Save ¶
func (_u *LockUpdateOne) Save(ctx context.Context) (*Lock, error)
Save executes the query and returns the updated Lock entity.
func (*LockUpdateOne) SaveX ¶
func (_u *LockUpdateOne) SaveX(ctx context.Context) *Lock
SaveX is like Save, but panics if an error occurs.
func (*LockUpdateOne) Select ¶
func (_u *LockUpdateOne) Select(field string, fields ...string) *LockUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LockUpdateOne) SetLockedAt ¶
func (_u *LockUpdateOne) SetLockedAt(v time.Time) *LockUpdateOne
SetLockedAt sets the "locked_at" field.
func (*LockUpdateOne) SetNid ¶
func (_u *LockUpdateOne) SetNid(v int) *LockUpdateOne
SetNid sets the "nid" field.
func (*LockUpdateOne) SetNillableLockedAt ¶
func (_u *LockUpdateOne) SetNillableLockedAt(v *time.Time) *LockUpdateOne
SetNillableLockedAt sets the "locked_at" field if the given value is not nil.
func (*LockUpdateOne) SetNillableNid ¶
func (_u *LockUpdateOne) SetNillableNid(v *int) *LockUpdateOne
SetNillableNid sets the "nid" field if the given value is not nil.
func (*LockUpdateOne) SetNillableTouchedAt ¶
func (_u *LockUpdateOne) SetNillableTouchedAt(v *time.Time) *LockUpdateOne
SetNillableTouchedAt sets the "touched_at" field if the given value is not nil.
func (*LockUpdateOne) SetNillableUID ¶
func (_u *LockUpdateOne) SetNillableUID(v *int) *LockUpdateOne
SetNillableUID sets the "uid" field if the given value is not nil.
func (*LockUpdateOne) SetNode ¶
func (_u *LockUpdateOne) SetNode(v *Node) *LockUpdateOne
SetNode sets the "node" edge to the Node entity.
func (*LockUpdateOne) SetNodeID ¶
func (_u *LockUpdateOne) SetNodeID(id int) *LockUpdateOne
SetNodeID sets the "node" edge to the Node entity by ID.
func (*LockUpdateOne) SetTouchedAt ¶
func (_u *LockUpdateOne) SetTouchedAt(v time.Time) *LockUpdateOne
SetTouchedAt sets the "touched_at" field.
func (*LockUpdateOne) SetUID ¶
func (_u *LockUpdateOne) SetUID(v int) *LockUpdateOne
SetUID sets the "uid" field.
func (*LockUpdateOne) Where ¶
func (_u *LockUpdateOne) Where(ps ...predicate.Lock) *LockUpdateOne
Where appends a list predicates to the LockUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// contains filtered or unexported fields
}
Node is the model entity for the Node schema.
func (*Node) Unwrap ¶
Unwrap unwraps the Node 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 (*Node) Update ¶
func (_m *Node) Update() *NodeUpdateOne
Update returns a builder for updating this Node. Note that you need to call Node.Unwrap() before calling this method if this Node was returned from a transaction, and the transaction was committed or rolled back.
type NodeClient ¶
type NodeClient struct {
// contains filtered or unexported fields
}
NodeClient is a client for the Node schema.
func NewNodeClient ¶
func NewNodeClient(c config) *NodeClient
NewNodeClient returns a client for the Node from the given config.
func (*NodeClient) Create ¶
func (c *NodeClient) Create() *NodeCreate
Create returns a builder for creating a Node entity.
func (*NodeClient) CreateBulk ¶
func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
CreateBulk returns a builder for creating a bulk of Node entities.
func (*NodeClient) Delete ¶
func (c *NodeClient) Delete() *NodeDelete
Delete returns a delete builder for Node.
func (*NodeClient) DeleteOne ¶
func (c *NodeClient) DeleteOne(_m *Node) *NodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NodeClient) DeleteOneID ¶
func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NodeClient) GetX ¶
func (c *NodeClient) GetX(ctx context.Context, id int) *Node
GetX is like Get, but panics if an error occurs.
func (*NodeClient) Intercept ¶
func (c *NodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `node.Intercept(f(g(h())))`.
func (*NodeClient) Interceptors ¶
func (c *NodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NodeClient) MapCreateBulk ¶
func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
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 (*NodeClient) Query ¶
func (c *NodeClient) Query() *NodeQuery
Query returns a query builder for Node.
func (*NodeClient) Update ¶
func (c *NodeClient) Update() *NodeUpdate
Update returns an update builder for Node.
func (*NodeClient) UpdateOne ¶
func (c *NodeClient) UpdateOne(_m *Node) *NodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NodeClient) UpdateOneID ¶
func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NodeClient) Use ¶
func (c *NodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `node.Hooks(f(g(h())))`.
type NodeCreate ¶
type NodeCreate struct {
// contains filtered or unexported fields
}
NodeCreate is the builder for creating a Node entity.
func (*NodeCreate) Exec ¶
func (_c *NodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreate) ExecX ¶
func (_c *NodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeCreate) Mutation ¶
func (_c *NodeCreate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeCreate) Save ¶
func (_c *NodeCreate) Save(ctx context.Context) (*Node, error)
Save creates the Node in the database.
func (*NodeCreate) SaveX ¶
func (_c *NodeCreate) SaveX(ctx context.Context) *Node
SaveX calls Save and panics if Save returns an error.
func (*NodeCreate) SetID ¶
func (_c *NodeCreate) SetID(v int) *NodeCreate
SetID sets the "id" field.
type NodeCreateBulk ¶
type NodeCreateBulk struct {
// contains filtered or unexported fields
}
NodeCreateBulk is the builder for creating many Node entities in bulk.
func (*NodeCreateBulk) Exec ¶
func (_c *NodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreateBulk) ExecX ¶
func (_c *NodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NodeDelete ¶
type NodeDelete struct {
// contains filtered or unexported fields
}
NodeDelete is the builder for deleting a Node entity.
func (*NodeDelete) Exec ¶
func (_d *NodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NodeDelete) ExecX ¶
func (_d *NodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NodeDelete) Where ¶
func (_d *NodeDelete) Where(ps ...predicate.Node) *NodeDelete
Where appends a list predicates to the NodeDelete builder.
type NodeDeleteOne ¶
type NodeDeleteOne struct {
// contains filtered or unexported fields
}
NodeDeleteOne is the builder for deleting a single Node entity.
func (*NodeDeleteOne) Exec ¶
func (_d *NodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NodeDeleteOne) ExecX ¶
func (_d *NodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeDeleteOne) Where ¶
func (_d *NodeDeleteOne) Where(ps ...predicate.Node) *NodeDeleteOne
Where appends a list predicates to the NodeDelete builder.
type NodeGroupBy ¶
type NodeGroupBy struct {
// contains filtered or unexported fields
}
NodeGroupBy is the group-by builder for Node entities.
func (*NodeGroupBy) Aggregate ¶
func (_g *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Scan ¶
func (_g *NodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeMutation ¶
type NodeMutation struct {
// contains filtered or unexported fields
}
NodeMutation represents an operation that mutates the Node nodes in the graph.
func (*NodeMutation) AddField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddedEdges ¶
func (m *NodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NodeMutation) AddedField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddedFields ¶
func (m *NodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NodeMutation) AddedIDs ¶
func (m *NodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NodeMutation) ClearEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearField ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearedEdges ¶
func (m *NodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NodeMutation) ClearedFields ¶
func (m *NodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NodeMutation) Client ¶
func (m NodeMutation) 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 (*NodeMutation) EdgeCleared ¶
func (m *NodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NodeMutation) Field ¶
func (m *NodeMutation) 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 (*NodeMutation) FieldCleared ¶
func (m *NodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NodeMutation) Fields ¶
func (m *NodeMutation) 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 (*NodeMutation) ID ¶
func (m *NodeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NodeMutation) IDs ¶
func (m *NodeMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NodeMutation) 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 (*NodeMutation) RemovedEdges ¶
func (m *NodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NodeMutation) RemovedIDs ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetField ¶
func (m *NodeMutation) 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 (*NodeMutation) SetField ¶
func (m *NodeMutation) 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 (*NodeMutation) SetID ¶
func (m *NodeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Node entities.
func (*NodeMutation) SetOp ¶
func (m *NodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (NodeMutation) Tx ¶
func (m NodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NodeMutation) Type ¶
func (m *NodeMutation) Type() string
Type returns the node type of this mutation (Node).
func (*NodeMutation) Where ¶
func (m *NodeMutation) Where(ps ...predicate.Node)
Where appends a list predicates to the NodeMutation builder.
func (*NodeMutation) WhereP ¶
func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NodeQuery ¶
type NodeQuery struct {
// contains filtered or unexported fields
}
NodeQuery is the builder for querying Node entities.
func (*NodeQuery) Aggregate ¶
func (_q *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate returns a NodeSelect configured with the given aggregations.
func (*NodeQuery) Clone ¶
Clone returns a duplicate of the NodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NodeQuery) First ¶
First returns the first Node entity from the query. Returns a *NotFoundError when no Node was found.
func (*NodeQuery) FirstID ¶
FirstID returns the first Node ID from the query. Returns a *NotFoundError when no Node ID was found.
func (*NodeQuery) GroupBy ¶
func (_q *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
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.
func (*NodeQuery) Only ¶
Only returns a single Node entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Node entity is found. Returns a *NotFoundError when no Node entities are found.
func (*NodeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Node ID in the query. Returns a *NotSingularError when more than one Node ID is found. Returns a *NotFoundError when no entities are found.
func (*NodeQuery) Order ¶
func (_q *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
Order specifies how the records should be ordered.
func (*NodeQuery) Select ¶
func (_q *NodeQuery) Select(fields ...string) *NodeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
type NodeSelect ¶
type NodeSelect struct {
*NodeQuery
// contains filtered or unexported fields
}
NodeSelect is the builder for selecting fields of Node entities.
func (*NodeSelect) Aggregate ¶
func (_s *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Scan ¶
func (_s *NodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeState ¶
type NodeState struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Nid holds the value of the "nid" field.
Nid int `json:"nid,omitempty"`
// State holds the value of the "state" field.
State string `json:"state,omitempty"`
// ChangedAt holds the value of the "changed_at" field.
ChangedAt time.Time `json:"changed_at,omitempty"`
// ChangedBy holds the value of the "changed_by" field.
ChangedBy int `json:"changed_by,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the NodeStateQuery when eager-loading is set.
Edges NodeStateEdges `json:"edges"`
// contains filtered or unexported fields
}
NodeState is the model entity for the NodeState schema.
func (*NodeState) Unwrap ¶
Unwrap unwraps the NodeState 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 (*NodeState) Update ¶
func (_m *NodeState) Update() *NodeStateUpdateOne
Update returns a builder for updating this NodeState. Note that you need to call NodeState.Unwrap() before calling this method if this NodeState was returned from a transaction, and the transaction was committed or rolled back.
type NodeStateClient ¶
type NodeStateClient struct {
// contains filtered or unexported fields
}
NodeStateClient is a client for the NodeState schema.
func NewNodeStateClient ¶
func NewNodeStateClient(c config) *NodeStateClient
NewNodeStateClient returns a client for the NodeState from the given config.
func (*NodeStateClient) Create ¶
func (c *NodeStateClient) Create() *NodeStateCreate
Create returns a builder for creating a NodeState entity.
func (*NodeStateClient) CreateBulk ¶
func (c *NodeStateClient) CreateBulk(builders ...*NodeStateCreate) *NodeStateCreateBulk
CreateBulk returns a builder for creating a bulk of NodeState entities.
func (*NodeStateClient) Delete ¶
func (c *NodeStateClient) Delete() *NodeStateDelete
Delete returns a delete builder for NodeState.
func (*NodeStateClient) DeleteOne ¶
func (c *NodeStateClient) DeleteOne(_m *NodeState) *NodeStateDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NodeStateClient) DeleteOneID ¶
func (c *NodeStateClient) DeleteOneID(id int) *NodeStateDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NodeStateClient) GetX ¶
func (c *NodeStateClient) GetX(ctx context.Context, id int) *NodeState
GetX is like Get, but panics if an error occurs.
func (*NodeStateClient) Hooks ¶
func (c *NodeStateClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NodeStateClient) Intercept ¶
func (c *NodeStateClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `nodestate.Intercept(f(g(h())))`.
func (*NodeStateClient) Interceptors ¶
func (c *NodeStateClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NodeStateClient) MapCreateBulk ¶
func (c *NodeStateClient) MapCreateBulk(slice any, setFunc func(*NodeStateCreate, int)) *NodeStateCreateBulk
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 (*NodeStateClient) Query ¶
func (c *NodeStateClient) Query() *NodeStateQuery
Query returns a query builder for NodeState.
func (*NodeStateClient) QueryNode ¶
func (c *NodeStateClient) QueryNode(_m *NodeState) *NodeQuery
QueryNode queries the node edge of a NodeState.
func (*NodeStateClient) Update ¶
func (c *NodeStateClient) Update() *NodeStateUpdate
Update returns an update builder for NodeState.
func (*NodeStateClient) UpdateOne ¶
func (c *NodeStateClient) UpdateOne(_m *NodeState) *NodeStateUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NodeStateClient) UpdateOneID ¶
func (c *NodeStateClient) UpdateOneID(id int) *NodeStateUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NodeStateClient) Use ¶
func (c *NodeStateClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nodestate.Hooks(f(g(h())))`.
type NodeStateCreate ¶
type NodeStateCreate struct {
// contains filtered or unexported fields
}
NodeStateCreate is the builder for creating a NodeState entity.
func (*NodeStateCreate) Exec ¶
func (_c *NodeStateCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeStateCreate) ExecX ¶
func (_c *NodeStateCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeStateCreate) Mutation ¶
func (_c *NodeStateCreate) Mutation() *NodeStateMutation
Mutation returns the NodeStateMutation object of the builder.
func (*NodeStateCreate) Save ¶
func (_c *NodeStateCreate) Save(ctx context.Context) (*NodeState, error)
Save creates the NodeState in the database.
func (*NodeStateCreate) SaveX ¶
func (_c *NodeStateCreate) SaveX(ctx context.Context) *NodeState
SaveX calls Save and panics if Save returns an error.
func (*NodeStateCreate) SetChangedAt ¶
func (_c *NodeStateCreate) SetChangedAt(v time.Time) *NodeStateCreate
SetChangedAt sets the "changed_at" field.
func (*NodeStateCreate) SetChangedBy ¶
func (_c *NodeStateCreate) SetChangedBy(v int) *NodeStateCreate
SetChangedBy sets the "changed_by" field.
func (*NodeStateCreate) SetID ¶
func (_c *NodeStateCreate) SetID(v int) *NodeStateCreate
SetID sets the "id" field.
func (*NodeStateCreate) SetNid ¶
func (_c *NodeStateCreate) SetNid(v int) *NodeStateCreate
SetNid sets the "nid" field.
func (*NodeStateCreate) SetNillableChangedBy ¶
func (_c *NodeStateCreate) SetNillableChangedBy(v *int) *NodeStateCreate
SetNillableChangedBy sets the "changed_by" field if the given value is not nil.
func (*NodeStateCreate) SetNode ¶
func (_c *NodeStateCreate) SetNode(v *Node) *NodeStateCreate
SetNode sets the "node" edge to the Node entity.
func (*NodeStateCreate) SetNodeID ¶
func (_c *NodeStateCreate) SetNodeID(id int) *NodeStateCreate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*NodeStateCreate) SetState ¶
func (_c *NodeStateCreate) SetState(v string) *NodeStateCreate
SetState sets the "state" field.
type NodeStateCreateBulk ¶
type NodeStateCreateBulk struct {
// contains filtered or unexported fields
}
NodeStateCreateBulk is the builder for creating many NodeState entities in bulk.
func (*NodeStateCreateBulk) Exec ¶
func (_c *NodeStateCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeStateCreateBulk) ExecX ¶
func (_c *NodeStateCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NodeStateDelete ¶
type NodeStateDelete struct {
// contains filtered or unexported fields
}
NodeStateDelete is the builder for deleting a NodeState entity.
func (*NodeStateDelete) Exec ¶
func (_d *NodeStateDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NodeStateDelete) ExecX ¶
func (_d *NodeStateDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NodeStateDelete) Where ¶
func (_d *NodeStateDelete) Where(ps ...predicate.NodeState) *NodeStateDelete
Where appends a list predicates to the NodeStateDelete builder.
type NodeStateDeleteOne ¶
type NodeStateDeleteOne struct {
// contains filtered or unexported fields
}
NodeStateDeleteOne is the builder for deleting a single NodeState entity.
func (*NodeStateDeleteOne) Exec ¶
func (_d *NodeStateDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NodeStateDeleteOne) ExecX ¶
func (_d *NodeStateDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeStateDeleteOne) Where ¶
func (_d *NodeStateDeleteOne) Where(ps ...predicate.NodeState) *NodeStateDeleteOne
Where appends a list predicates to the NodeStateDelete builder.
type NodeStateEdges ¶
type NodeStateEdges struct {
// Node holds the value of the node edge.
Node *Node `json:"node,omitempty"`
// contains filtered or unexported fields
}
NodeStateEdges holds the relations/edges for other nodes in the graph.
func (NodeStateEdges) NodeOrErr ¶
func (e NodeStateEdges) NodeOrErr() (*Node, error)
NodeOrErr returns the Node value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NodeStateGroupBy ¶
type NodeStateGroupBy struct {
// contains filtered or unexported fields
}
NodeStateGroupBy is the group-by builder for NodeState entities.
func (*NodeStateGroupBy) Aggregate ¶
func (_g *NodeStateGroupBy) Aggregate(fns ...AggregateFunc) *NodeStateGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NodeStateGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeStateGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeStateGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeStateGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeStateGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeStateGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeStateGroupBy) Scan ¶
func (_g *NodeStateGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeStateGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeStateMutation ¶
type NodeStateMutation struct {
// contains filtered or unexported fields
}
NodeStateMutation represents an operation that mutates the NodeState nodes in the graph.
func (*NodeStateMutation) AddChangedBy ¶
func (m *NodeStateMutation) AddChangedBy(i int)
AddChangedBy adds i to the "changed_by" field.
func (*NodeStateMutation) AddField ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) AddedChangedBy ¶
func (m *NodeStateMutation) AddedChangedBy() (r int, exists bool)
AddedChangedBy returns the value that was added to the "changed_by" field in this mutation.
func (*NodeStateMutation) AddedEdges ¶
func (m *NodeStateMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NodeStateMutation) AddedField ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) AddedFields ¶
func (m *NodeStateMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NodeStateMutation) AddedIDs ¶
func (m *NodeStateMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NodeStateMutation) ChangedAt ¶
func (m *NodeStateMutation) ChangedAt() (r time.Time, exists bool)
ChangedAt returns the value of the "changed_at" field in the mutation.
func (*NodeStateMutation) ChangedBy ¶
func (m *NodeStateMutation) ChangedBy() (r int, exists bool)
ChangedBy returns the value of the "changed_by" field in the mutation.
func (*NodeStateMutation) ClearEdge ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) ClearField ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) ClearNode ¶
func (m *NodeStateMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*NodeStateMutation) ClearedEdges ¶
func (m *NodeStateMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NodeStateMutation) ClearedFields ¶
func (m *NodeStateMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NodeStateMutation) Client ¶
func (m NodeStateMutation) 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 (*NodeStateMutation) EdgeCleared ¶
func (m *NodeStateMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NodeStateMutation) Field ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) FieldCleared ¶
func (m *NodeStateMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NodeStateMutation) Fields ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) ID ¶
func (m *NodeStateMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NodeStateMutation) IDs ¶
func (m *NodeStateMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NodeStateMutation) Nid ¶
func (m *NodeStateMutation) Nid() (r int, exists bool)
Nid returns the value of the "nid" field in the mutation.
func (*NodeStateMutation) NodeCleared ¶
func (m *NodeStateMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*NodeStateMutation) NodeID ¶
func (m *NodeStateMutation) NodeID() (id int, exists bool)
NodeID returns the "node" edge ID in the mutation.
func (*NodeStateMutation) NodeIDs ¶
func (m *NodeStateMutation) NodeIDs() (ids []int)
NodeIDs returns the "node" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NodeID instead. It exists only for internal usage by the builders.
func (*NodeStateMutation) OldChangedAt ¶
OldChangedAt returns the old "changed_at" field's value of the NodeState entity. If the NodeState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NodeStateMutation) OldChangedBy ¶
func (m *NodeStateMutation) OldChangedBy(ctx context.Context) (v int, err error)
OldChangedBy returns the old "changed_by" field's value of the NodeState entity. If the NodeState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NodeStateMutation) 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 (*NodeStateMutation) OldNid ¶
func (m *NodeStateMutation) OldNid(ctx context.Context) (v int, err error)
OldNid returns the old "nid" field's value of the NodeState entity. If the NodeState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NodeStateMutation) OldState ¶
func (m *NodeStateMutation) OldState(ctx context.Context) (v string, err error)
OldState returns the old "state" field's value of the NodeState entity. If the NodeState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NodeStateMutation) RemovedEdges ¶
func (m *NodeStateMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NodeStateMutation) RemovedIDs ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) ResetChangedAt ¶
func (m *NodeStateMutation) ResetChangedAt()
ResetChangedAt resets all changes to the "changed_at" field.
func (*NodeStateMutation) ResetChangedBy ¶
func (m *NodeStateMutation) ResetChangedBy()
ResetChangedBy resets all changes to the "changed_by" field.
func (*NodeStateMutation) ResetEdge ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) ResetField ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) ResetNid ¶
func (m *NodeStateMutation) ResetNid()
ResetNid resets all changes to the "nid" field.
func (*NodeStateMutation) ResetNode ¶
func (m *NodeStateMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*NodeStateMutation) ResetState ¶
func (m *NodeStateMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*NodeStateMutation) SetChangedAt ¶
func (m *NodeStateMutation) SetChangedAt(t time.Time)
SetChangedAt sets the "changed_at" field.
func (*NodeStateMutation) SetChangedBy ¶
func (m *NodeStateMutation) SetChangedBy(i int)
SetChangedBy sets the "changed_by" field.
func (*NodeStateMutation) SetField ¶
func (m *NodeStateMutation) 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 (*NodeStateMutation) SetID ¶
func (m *NodeStateMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of NodeState entities.
func (*NodeStateMutation) SetNid ¶
func (m *NodeStateMutation) SetNid(i int)
SetNid sets the "nid" field.
func (*NodeStateMutation) SetNodeID ¶
func (m *NodeStateMutation) SetNodeID(id int)
SetNodeID sets the "node" edge to the Node entity by id.
func (*NodeStateMutation) SetOp ¶
func (m *NodeStateMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NodeStateMutation) SetState ¶
func (m *NodeStateMutation) SetState(s string)
SetState sets the "state" field.
func (*NodeStateMutation) State ¶
func (m *NodeStateMutation) State() (r string, exists bool)
State returns the value of the "state" field in the mutation.
func (NodeStateMutation) Tx ¶
func (m NodeStateMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NodeStateMutation) Type ¶
func (m *NodeStateMutation) Type() string
Type returns the node type of this mutation (NodeState).
func (*NodeStateMutation) Where ¶
func (m *NodeStateMutation) Where(ps ...predicate.NodeState)
Where appends a list predicates to the NodeStateMutation builder.
func (*NodeStateMutation) WhereP ¶
func (m *NodeStateMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NodeStateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NodeStateQuery ¶
type NodeStateQuery struct {
// contains filtered or unexported fields
}
NodeStateQuery is the builder for querying NodeState entities.
func (*NodeStateQuery) Aggregate ¶
func (_q *NodeStateQuery) Aggregate(fns ...AggregateFunc) *NodeStateSelect
Aggregate returns a NodeStateSelect configured with the given aggregations.
func (*NodeStateQuery) All ¶
func (_q *NodeStateQuery) All(ctx context.Context) ([]*NodeState, error)
All executes the query and returns a list of NodeStates.
func (*NodeStateQuery) AllX ¶
func (_q *NodeStateQuery) AllX(ctx context.Context) []*NodeState
AllX is like All, but panics if an error occurs.
func (*NodeStateQuery) Clone ¶
func (_q *NodeStateQuery) Clone() *NodeStateQuery
Clone returns a duplicate of the NodeStateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NodeStateQuery) Count ¶
func (_q *NodeStateQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NodeStateQuery) CountX ¶
func (_q *NodeStateQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NodeStateQuery) Exist ¶
func (_q *NodeStateQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NodeStateQuery) ExistX ¶
func (_q *NodeStateQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NodeStateQuery) First ¶
func (_q *NodeStateQuery) First(ctx context.Context) (*NodeState, error)
First returns the first NodeState entity from the query. Returns a *NotFoundError when no NodeState was found.
func (*NodeStateQuery) FirstID ¶
func (_q *NodeStateQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NodeState ID from the query. Returns a *NotFoundError when no NodeState ID was found.
func (*NodeStateQuery) FirstIDX ¶
func (_q *NodeStateQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NodeStateQuery) FirstX ¶
func (_q *NodeStateQuery) FirstX(ctx context.Context) *NodeState
FirstX is like First, but panics if an error occurs.
func (*NodeStateQuery) GroupBy ¶
func (_q *NodeStateQuery) GroupBy(field string, fields ...string) *NodeStateGroupBy
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 {
Nid int `json:"nid,omitempty"`
Count int `json:"count,omitempty"`
}
client.NodeState.Query().
GroupBy(nodestate.FieldNid).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*NodeStateQuery) IDs ¶
func (_q *NodeStateQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of NodeState IDs.
func (*NodeStateQuery) IDsX ¶
func (_q *NodeStateQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NodeStateQuery) Limit ¶
func (_q *NodeStateQuery) Limit(limit int) *NodeStateQuery
Limit the number of records to be returned by this query.
func (*NodeStateQuery) Offset ¶
func (_q *NodeStateQuery) Offset(offset int) *NodeStateQuery
Offset to start from.
func (*NodeStateQuery) Only ¶
func (_q *NodeStateQuery) Only(ctx context.Context) (*NodeState, error)
Only returns a single NodeState entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NodeState entity is found. Returns a *NotFoundError when no NodeState entities are found.
func (*NodeStateQuery) OnlyID ¶
func (_q *NodeStateQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NodeState ID in the query. Returns a *NotSingularError when more than one NodeState ID is found. Returns a *NotFoundError when no entities are found.
func (*NodeStateQuery) OnlyIDX ¶
func (_q *NodeStateQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NodeStateQuery) OnlyX ¶
func (_q *NodeStateQuery) OnlyX(ctx context.Context) *NodeState
OnlyX is like Only, but panics if an error occurs.
func (*NodeStateQuery) Order ¶
func (_q *NodeStateQuery) Order(o ...nodestate.OrderOption) *NodeStateQuery
Order specifies how the records should be ordered.
func (*NodeStateQuery) QueryNode ¶
func (_q *NodeStateQuery) QueryNode() *NodeQuery
QueryNode chains the current query on the "node" edge.
func (*NodeStateQuery) Select ¶
func (_q *NodeStateQuery) Select(fields ...string) *NodeStateSelect
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 {
Nid int `json:"nid,omitempty"`
}
client.NodeState.Query().
Select(nodestate.FieldNid).
Scan(ctx, &v)
func (*NodeStateQuery) Unique ¶
func (_q *NodeStateQuery) Unique(unique bool) *NodeStateQuery
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 (*NodeStateQuery) Where ¶
func (_q *NodeStateQuery) Where(ps ...predicate.NodeState) *NodeStateQuery
Where adds a new predicate for the NodeStateQuery builder.
func (*NodeStateQuery) WithNode ¶
func (_q *NodeStateQuery) WithNode(opts ...func(*NodeQuery)) *NodeStateQuery
WithNode tells the query-builder to eager-load the nodes that are connected to the "node" edge. The optional arguments are used to configure the query builder of the edge.
type NodeStateSelect ¶
type NodeStateSelect struct {
*NodeStateQuery
// contains filtered or unexported fields
}
NodeStateSelect is the builder for selecting fields of NodeState entities.
func (*NodeStateSelect) Aggregate ¶
func (_s *NodeStateSelect) Aggregate(fns ...AggregateFunc) *NodeStateSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NodeStateSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeStateSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeStateSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeStateSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeStateSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeStateSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeStateSelect) Scan ¶
func (_s *NodeStateSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeStateSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeStateUpdate ¶
type NodeStateUpdate struct {
// contains filtered or unexported fields
}
NodeStateUpdate is the builder for updating NodeState entities.
func (*NodeStateUpdate) AddChangedBy ¶
func (_u *NodeStateUpdate) AddChangedBy(v int) *NodeStateUpdate
AddChangedBy adds value to the "changed_by" field.
func (*NodeStateUpdate) ClearNode ¶
func (_u *NodeStateUpdate) ClearNode() *NodeStateUpdate
ClearNode clears the "node" edge to the Node entity.
func (*NodeStateUpdate) Exec ¶
func (_u *NodeStateUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeStateUpdate) ExecX ¶
func (_u *NodeStateUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeStateUpdate) Mutation ¶
func (_u *NodeStateUpdate) Mutation() *NodeStateMutation
Mutation returns the NodeStateMutation object of the builder.
func (*NodeStateUpdate) Save ¶
func (_u *NodeStateUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NodeStateUpdate) SaveX ¶
func (_u *NodeStateUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NodeStateUpdate) SetChangedAt ¶
func (_u *NodeStateUpdate) SetChangedAt(v time.Time) *NodeStateUpdate
SetChangedAt sets the "changed_at" field.
func (*NodeStateUpdate) SetChangedBy ¶
func (_u *NodeStateUpdate) SetChangedBy(v int) *NodeStateUpdate
SetChangedBy sets the "changed_by" field.
func (*NodeStateUpdate) SetNid ¶
func (_u *NodeStateUpdate) SetNid(v int) *NodeStateUpdate
SetNid sets the "nid" field.
func (*NodeStateUpdate) SetNillableChangedAt ¶
func (_u *NodeStateUpdate) SetNillableChangedAt(v *time.Time) *NodeStateUpdate
SetNillableChangedAt sets the "changed_at" field if the given value is not nil.
func (*NodeStateUpdate) SetNillableChangedBy ¶
func (_u *NodeStateUpdate) SetNillableChangedBy(v *int) *NodeStateUpdate
SetNillableChangedBy sets the "changed_by" field if the given value is not nil.
func (*NodeStateUpdate) SetNillableNid ¶
func (_u *NodeStateUpdate) SetNillableNid(v *int) *NodeStateUpdate
SetNillableNid sets the "nid" field if the given value is not nil.
func (*NodeStateUpdate) SetNillableState ¶
func (_u *NodeStateUpdate) SetNillableState(v *string) *NodeStateUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*NodeStateUpdate) SetNode ¶
func (_u *NodeStateUpdate) SetNode(v *Node) *NodeStateUpdate
SetNode sets the "node" edge to the Node entity.
func (*NodeStateUpdate) SetNodeID ¶
func (_u *NodeStateUpdate) SetNodeID(id int) *NodeStateUpdate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*NodeStateUpdate) SetState ¶
func (_u *NodeStateUpdate) SetState(v string) *NodeStateUpdate
SetState sets the "state" field.
func (*NodeStateUpdate) Where ¶
func (_u *NodeStateUpdate) Where(ps ...predicate.NodeState) *NodeStateUpdate
Where appends a list predicates to the NodeStateUpdate builder.
type NodeStateUpdateOne ¶
type NodeStateUpdateOne struct {
// contains filtered or unexported fields
}
NodeStateUpdateOne is the builder for updating a single NodeState entity.
func (*NodeStateUpdateOne) AddChangedBy ¶
func (_u *NodeStateUpdateOne) AddChangedBy(v int) *NodeStateUpdateOne
AddChangedBy adds value to the "changed_by" field.
func (*NodeStateUpdateOne) ClearNode ¶
func (_u *NodeStateUpdateOne) ClearNode() *NodeStateUpdateOne
ClearNode clears the "node" edge to the Node entity.
func (*NodeStateUpdateOne) Exec ¶
func (_u *NodeStateUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NodeStateUpdateOne) ExecX ¶
func (_u *NodeStateUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeStateUpdateOne) Mutation ¶
func (_u *NodeStateUpdateOne) Mutation() *NodeStateMutation
Mutation returns the NodeStateMutation object of the builder.
func (*NodeStateUpdateOne) Save ¶
func (_u *NodeStateUpdateOne) Save(ctx context.Context) (*NodeState, error)
Save executes the query and returns the updated NodeState entity.
func (*NodeStateUpdateOne) SaveX ¶
func (_u *NodeStateUpdateOne) SaveX(ctx context.Context) *NodeState
SaveX is like Save, but panics if an error occurs.
func (*NodeStateUpdateOne) Select ¶
func (_u *NodeStateUpdateOne) Select(field string, fields ...string) *NodeStateUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NodeStateUpdateOne) SetChangedAt ¶
func (_u *NodeStateUpdateOne) SetChangedAt(v time.Time) *NodeStateUpdateOne
SetChangedAt sets the "changed_at" field.
func (*NodeStateUpdateOne) SetChangedBy ¶
func (_u *NodeStateUpdateOne) SetChangedBy(v int) *NodeStateUpdateOne
SetChangedBy sets the "changed_by" field.
func (*NodeStateUpdateOne) SetNid ¶
func (_u *NodeStateUpdateOne) SetNid(v int) *NodeStateUpdateOne
SetNid sets the "nid" field.
func (*NodeStateUpdateOne) SetNillableChangedAt ¶
func (_u *NodeStateUpdateOne) SetNillableChangedAt(v *time.Time) *NodeStateUpdateOne
SetNillableChangedAt sets the "changed_at" field if the given value is not nil.
func (*NodeStateUpdateOne) SetNillableChangedBy ¶
func (_u *NodeStateUpdateOne) SetNillableChangedBy(v *int) *NodeStateUpdateOne
SetNillableChangedBy sets the "changed_by" field if the given value is not nil.
func (*NodeStateUpdateOne) SetNillableNid ¶
func (_u *NodeStateUpdateOne) SetNillableNid(v *int) *NodeStateUpdateOne
SetNillableNid sets the "nid" field if the given value is not nil.
func (*NodeStateUpdateOne) SetNillableState ¶
func (_u *NodeStateUpdateOne) SetNillableState(v *string) *NodeStateUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*NodeStateUpdateOne) SetNode ¶
func (_u *NodeStateUpdateOne) SetNode(v *Node) *NodeStateUpdateOne
SetNode sets the "node" edge to the Node entity.
func (*NodeStateUpdateOne) SetNodeID ¶
func (_u *NodeStateUpdateOne) SetNodeID(id int) *NodeStateUpdateOne
SetNodeID sets the "node" edge to the Node entity by ID.
func (*NodeStateUpdateOne) SetState ¶
func (_u *NodeStateUpdateOne) SetState(v string) *NodeStateUpdateOne
SetState sets the "state" field.
func (*NodeStateUpdateOne) Where ¶
func (_u *NodeStateUpdateOne) Where(ps ...predicate.NodeState) *NodeStateUpdateOne
Where appends a list predicates to the NodeStateUpdate builder.
type NodeUpdate ¶
type NodeUpdate struct {
// contains filtered or unexported fields
}
NodeUpdate is the builder for updating Node entities.
func (*NodeUpdate) Exec ¶
func (_u *NodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeUpdate) ExecX ¶
func (_u *NodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdate) Mutation ¶
func (_u *NodeUpdate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdate) Save ¶
func (_u *NodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NodeUpdate) SaveX ¶
func (_u *NodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdate) Where ¶
func (_u *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
Where appends a list predicates to the NodeUpdate builder.
type NodeUpdateOne ¶
type NodeUpdateOne struct {
// contains filtered or unexported fields
}
NodeUpdateOne is the builder for updating a single Node entity.
func (*NodeUpdateOne) Exec ¶
func (_u *NodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NodeUpdateOne) ExecX ¶
func (_u *NodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdateOne) Mutation ¶
func (_u *NodeUpdateOne) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdateOne) Save ¶
func (_u *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
Save executes the query and returns the updated Node entity.
func (*NodeUpdateOne) SaveX ¶
func (_u *NodeUpdateOne) SaveX(ctx context.Context) *Node
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdateOne) Select ¶
func (_u *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NodeUpdateOne) Where ¶
func (_u *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
Where appends a list predicates to the NodeUpdate builder.
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 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 {
// History is the client for interacting with the History builders.
History *HistoryClient
// Lock is the client for interacting with the Lock builders.
Lock *LockClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// NodeState is the client for interacting with the NodeState builders.
NodeState *NodeStateClient
// WorkflowSettings is the client for interacting with the WorkflowSettings builders.
WorkflowSettings *WorkflowSettingsClient
// WorkflowState is the client for interacting with the WorkflowState builders.
WorkflowState *WorkflowStateClient
// WorkflowTransition is the client for interacting with the WorkflowTransition builders.
WorkflowTransition *WorkflowTransitionClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type WorkflowSettings ¶
type WorkflowSettings struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// ContentTypes holds the value of the "content_types" field.
ContentTypes []string `json:"content_types,omitempty"`
// LockMinutes holds the value of the "lock_minutes" field.
LockMinutes int `json:"lock_minutes,omitempty"`
// contains filtered or unexported fields
}
WorkflowSettings is the model entity for the WorkflowSettings schema.
func (*WorkflowSettings) String ¶
func (_m *WorkflowSettings) String() string
String implements the fmt.Stringer.
func (*WorkflowSettings) Unwrap ¶
func (_m *WorkflowSettings) Unwrap() *WorkflowSettings
Unwrap unwraps the WorkflowSettings 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 (*WorkflowSettings) Update ¶
func (_m *WorkflowSettings) Update() *WorkflowSettingsUpdateOne
Update returns a builder for updating this WorkflowSettings. Note that you need to call WorkflowSettings.Unwrap() before calling this method if this WorkflowSettings was returned from a transaction, and the transaction was committed or rolled back.
type WorkflowSettingsClient ¶
type WorkflowSettingsClient struct {
// contains filtered or unexported fields
}
WorkflowSettingsClient is a client for the WorkflowSettings schema.
func NewWorkflowSettingsClient ¶
func NewWorkflowSettingsClient(c config) *WorkflowSettingsClient
NewWorkflowSettingsClient returns a client for the WorkflowSettings from the given config.
func (*WorkflowSettingsClient) Create ¶
func (c *WorkflowSettingsClient) Create() *WorkflowSettingsCreate
Create returns a builder for creating a WorkflowSettings entity.
func (*WorkflowSettingsClient) CreateBulk ¶
func (c *WorkflowSettingsClient) CreateBulk(builders ...*WorkflowSettingsCreate) *WorkflowSettingsCreateBulk
CreateBulk returns a builder for creating a bulk of WorkflowSettings entities.
func (*WorkflowSettingsClient) Delete ¶
func (c *WorkflowSettingsClient) Delete() *WorkflowSettingsDelete
Delete returns a delete builder for WorkflowSettings.
func (*WorkflowSettingsClient) DeleteOne ¶
func (c *WorkflowSettingsClient) DeleteOne(_m *WorkflowSettings) *WorkflowSettingsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkflowSettingsClient) DeleteOneID ¶
func (c *WorkflowSettingsClient) DeleteOneID(id int) *WorkflowSettingsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkflowSettingsClient) Get ¶
func (c *WorkflowSettingsClient) Get(ctx context.Context, id int) (*WorkflowSettings, error)
Get returns a WorkflowSettings entity by its id.
func (*WorkflowSettingsClient) GetX ¶
func (c *WorkflowSettingsClient) GetX(ctx context.Context, id int) *WorkflowSettings
GetX is like Get, but panics if an error occurs.
func (*WorkflowSettingsClient) Hooks ¶
func (c *WorkflowSettingsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkflowSettingsClient) Intercept ¶
func (c *WorkflowSettingsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowsettings.Intercept(f(g(h())))`.
func (*WorkflowSettingsClient) Interceptors ¶
func (c *WorkflowSettingsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkflowSettingsClient) MapCreateBulk ¶
func (c *WorkflowSettingsClient) MapCreateBulk(slice any, setFunc func(*WorkflowSettingsCreate, int)) *WorkflowSettingsCreateBulk
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 (*WorkflowSettingsClient) Query ¶
func (c *WorkflowSettingsClient) Query() *WorkflowSettingsQuery
Query returns a query builder for WorkflowSettings.
func (*WorkflowSettingsClient) Update ¶
func (c *WorkflowSettingsClient) Update() *WorkflowSettingsUpdate
Update returns an update builder for WorkflowSettings.
func (*WorkflowSettingsClient) UpdateOne ¶
func (c *WorkflowSettingsClient) UpdateOne(_m *WorkflowSettings) *WorkflowSettingsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkflowSettingsClient) UpdateOneID ¶
func (c *WorkflowSettingsClient) UpdateOneID(id int) *WorkflowSettingsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkflowSettingsClient) Use ¶
func (c *WorkflowSettingsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowsettings.Hooks(f(g(h())))`.
type WorkflowSettingsCreate ¶
type WorkflowSettingsCreate struct {
// contains filtered or unexported fields
}
WorkflowSettingsCreate is the builder for creating a WorkflowSettings entity.
func (*WorkflowSettingsCreate) Exec ¶
func (_c *WorkflowSettingsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowSettingsCreate) ExecX ¶
func (_c *WorkflowSettingsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowSettingsCreate) Mutation ¶
func (_c *WorkflowSettingsCreate) Mutation() *WorkflowSettingsMutation
Mutation returns the WorkflowSettingsMutation object of the builder.
func (*WorkflowSettingsCreate) Save ¶
func (_c *WorkflowSettingsCreate) Save(ctx context.Context) (*WorkflowSettings, error)
Save creates the WorkflowSettings in the database.
func (*WorkflowSettingsCreate) SaveX ¶
func (_c *WorkflowSettingsCreate) SaveX(ctx context.Context) *WorkflowSettings
SaveX calls Save and panics if Save returns an error.
func (*WorkflowSettingsCreate) SetContentTypes ¶
func (_c *WorkflowSettingsCreate) SetContentTypes(v []string) *WorkflowSettingsCreate
SetContentTypes sets the "content_types" field.
func (*WorkflowSettingsCreate) SetID ¶
func (_c *WorkflowSettingsCreate) SetID(v int) *WorkflowSettingsCreate
SetID sets the "id" field.
func (*WorkflowSettingsCreate) SetLockMinutes ¶
func (_c *WorkflowSettingsCreate) SetLockMinutes(v int) *WorkflowSettingsCreate
SetLockMinutes sets the "lock_minutes" field.
func (*WorkflowSettingsCreate) SetNillableLockMinutes ¶
func (_c *WorkflowSettingsCreate) SetNillableLockMinutes(v *int) *WorkflowSettingsCreate
SetNillableLockMinutes sets the "lock_minutes" field if the given value is not nil.
type WorkflowSettingsCreateBulk ¶
type WorkflowSettingsCreateBulk struct {
// contains filtered or unexported fields
}
WorkflowSettingsCreateBulk is the builder for creating many WorkflowSettings entities in bulk.
func (*WorkflowSettingsCreateBulk) Exec ¶
func (_c *WorkflowSettingsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowSettingsCreateBulk) ExecX ¶
func (_c *WorkflowSettingsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowSettingsCreateBulk) Save ¶
func (_c *WorkflowSettingsCreateBulk) Save(ctx context.Context) ([]*WorkflowSettings, error)
Save creates the WorkflowSettings entities in the database.
func (*WorkflowSettingsCreateBulk) SaveX ¶
func (_c *WorkflowSettingsCreateBulk) SaveX(ctx context.Context) []*WorkflowSettings
SaveX is like Save, but panics if an error occurs.
type WorkflowSettingsDelete ¶
type WorkflowSettingsDelete struct {
// contains filtered or unexported fields
}
WorkflowSettingsDelete is the builder for deleting a WorkflowSettings entity.
func (*WorkflowSettingsDelete) Exec ¶
func (_d *WorkflowSettingsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkflowSettingsDelete) ExecX ¶
func (_d *WorkflowSettingsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowSettingsDelete) Where ¶
func (_d *WorkflowSettingsDelete) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsDelete
Where appends a list predicates to the WorkflowSettingsDelete builder.
type WorkflowSettingsDeleteOne ¶
type WorkflowSettingsDeleteOne struct {
// contains filtered or unexported fields
}
WorkflowSettingsDeleteOne is the builder for deleting a single WorkflowSettings entity.
func (*WorkflowSettingsDeleteOne) Exec ¶
func (_d *WorkflowSettingsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkflowSettingsDeleteOne) ExecX ¶
func (_d *WorkflowSettingsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowSettingsDeleteOne) Where ¶
func (_d *WorkflowSettingsDeleteOne) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsDeleteOne
Where appends a list predicates to the WorkflowSettingsDelete builder.
type WorkflowSettingsGroupBy ¶
type WorkflowSettingsGroupBy struct {
// contains filtered or unexported fields
}
WorkflowSettingsGroupBy is the group-by builder for WorkflowSettings entities.
func (*WorkflowSettingsGroupBy) Aggregate ¶
func (_g *WorkflowSettingsGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowSettingsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkflowSettingsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowSettingsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsGroupBy) Scan ¶
func (_g *WorkflowSettingsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowSettingsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowSettingsMutation ¶
type WorkflowSettingsMutation struct {
// contains filtered or unexported fields
}
WorkflowSettingsMutation represents an operation that mutates the WorkflowSettings nodes in the graph.
func (*WorkflowSettingsMutation) AddField ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) AddLockMinutes ¶
func (m *WorkflowSettingsMutation) AddLockMinutes(i int)
AddLockMinutes adds i to the "lock_minutes" field.
func (*WorkflowSettingsMutation) AddedEdges ¶
func (m *WorkflowSettingsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkflowSettingsMutation) AddedField ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) AddedFields ¶
func (m *WorkflowSettingsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkflowSettingsMutation) AddedIDs ¶
func (m *WorkflowSettingsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkflowSettingsMutation) AddedLockMinutes ¶
func (m *WorkflowSettingsMutation) AddedLockMinutes() (r int, exists bool)
AddedLockMinutes returns the value that was added to the "lock_minutes" field in this mutation.
func (*WorkflowSettingsMutation) AppendContentTypes ¶
func (m *WorkflowSettingsMutation) AppendContentTypes(s []string)
AppendContentTypes adds s to the "content_types" field.
func (*WorkflowSettingsMutation) AppendedContentTypes ¶
func (m *WorkflowSettingsMutation) AppendedContentTypes() ([]string, bool)
AppendedContentTypes returns the list of values that were appended to the "content_types" field in this mutation.
func (*WorkflowSettingsMutation) ClearContentTypes ¶
func (m *WorkflowSettingsMutation) ClearContentTypes()
ClearContentTypes clears the value of the "content_types" field.
func (*WorkflowSettingsMutation) ClearEdge ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) ClearField ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) ClearedEdges ¶
func (m *WorkflowSettingsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkflowSettingsMutation) ClearedFields ¶
func (m *WorkflowSettingsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkflowSettingsMutation) Client ¶
func (m WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) ContentTypes ¶
func (m *WorkflowSettingsMutation) ContentTypes() (r []string, exists bool)
ContentTypes returns the value of the "content_types" field in the mutation.
func (*WorkflowSettingsMutation) ContentTypesCleared ¶
func (m *WorkflowSettingsMutation) ContentTypesCleared() bool
ContentTypesCleared returns if the "content_types" field was cleared in this mutation.
func (*WorkflowSettingsMutation) EdgeCleared ¶
func (m *WorkflowSettingsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkflowSettingsMutation) Field ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) FieldCleared ¶
func (m *WorkflowSettingsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkflowSettingsMutation) Fields ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) ID ¶
func (m *WorkflowSettingsMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*WorkflowSettingsMutation) IDs ¶
func (m *WorkflowSettingsMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*WorkflowSettingsMutation) LockMinutes ¶
func (m *WorkflowSettingsMutation) LockMinutes() (r int, exists bool)
LockMinutes returns the value of the "lock_minutes" field in the mutation.
func (*WorkflowSettingsMutation) OldContentTypes ¶
func (m *WorkflowSettingsMutation) OldContentTypes(ctx context.Context) (v []string, err error)
OldContentTypes returns the old "content_types" field's value of the WorkflowSettings entity. If the WorkflowSettings object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) OldLockMinutes ¶
func (m *WorkflowSettingsMutation) OldLockMinutes(ctx context.Context) (v int, err error)
OldLockMinutes returns the old "lock_minutes" field's value of the WorkflowSettings entity. If the WorkflowSettings object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowSettingsMutation) Op ¶
func (m *WorkflowSettingsMutation) Op() Op
Op returns the operation name.
func (*WorkflowSettingsMutation) RemovedEdges ¶
func (m *WorkflowSettingsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkflowSettingsMutation) RemovedIDs ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) ResetContentTypes ¶
func (m *WorkflowSettingsMutation) ResetContentTypes()
ResetContentTypes resets all changes to the "content_types" field.
func (*WorkflowSettingsMutation) ResetEdge ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) ResetField ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) ResetLockMinutes ¶
func (m *WorkflowSettingsMutation) ResetLockMinutes()
ResetLockMinutes resets all changes to the "lock_minutes" field.
func (*WorkflowSettingsMutation) SetContentTypes ¶
func (m *WorkflowSettingsMutation) SetContentTypes(s []string)
SetContentTypes sets the "content_types" field.
func (*WorkflowSettingsMutation) SetField ¶
func (m *WorkflowSettingsMutation) 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 (*WorkflowSettingsMutation) SetID ¶
func (m *WorkflowSettingsMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowSettings entities.
func (*WorkflowSettingsMutation) SetLockMinutes ¶
func (m *WorkflowSettingsMutation) SetLockMinutes(i int)
SetLockMinutes sets the "lock_minutes" field.
func (*WorkflowSettingsMutation) SetOp ¶
func (m *WorkflowSettingsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (WorkflowSettingsMutation) Tx ¶
func (m WorkflowSettingsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkflowSettingsMutation) Type ¶
func (m *WorkflowSettingsMutation) Type() string
Type returns the node type of this mutation (WorkflowSettings).
func (*WorkflowSettingsMutation) Where ¶
func (m *WorkflowSettingsMutation) Where(ps ...predicate.WorkflowSettings)
Where appends a list predicates to the WorkflowSettingsMutation builder.
func (*WorkflowSettingsMutation) WhereP ¶
func (m *WorkflowSettingsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkflowSettingsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type WorkflowSettingsQuery ¶
type WorkflowSettingsQuery struct {
// contains filtered or unexported fields
}
WorkflowSettingsQuery is the builder for querying WorkflowSettings entities.
func (*WorkflowSettingsQuery) Aggregate ¶
func (_q *WorkflowSettingsQuery) Aggregate(fns ...AggregateFunc) *WorkflowSettingsSelect
Aggregate returns a WorkflowSettingsSelect configured with the given aggregations.
func (*WorkflowSettingsQuery) All ¶
func (_q *WorkflowSettingsQuery) All(ctx context.Context) ([]*WorkflowSettings, error)
All executes the query and returns a list of WorkflowSettingsSlice.
func (*WorkflowSettingsQuery) AllX ¶
func (_q *WorkflowSettingsQuery) AllX(ctx context.Context) []*WorkflowSettings
AllX is like All, but panics if an error occurs.
func (*WorkflowSettingsQuery) Clone ¶
func (_q *WorkflowSettingsQuery) Clone() *WorkflowSettingsQuery
Clone returns a duplicate of the WorkflowSettingsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkflowSettingsQuery) Count ¶
func (_q *WorkflowSettingsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkflowSettingsQuery) CountX ¶
func (_q *WorkflowSettingsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkflowSettingsQuery) Exist ¶
func (_q *WorkflowSettingsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkflowSettingsQuery) ExistX ¶
func (_q *WorkflowSettingsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkflowSettingsQuery) First ¶
func (_q *WorkflowSettingsQuery) First(ctx context.Context) (*WorkflowSettings, error)
First returns the first WorkflowSettings entity from the query. Returns a *NotFoundError when no WorkflowSettings was found.
func (*WorkflowSettingsQuery) FirstID ¶
func (_q *WorkflowSettingsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WorkflowSettings ID from the query. Returns a *NotFoundError when no WorkflowSettings ID was found.
func (*WorkflowSettingsQuery) FirstIDX ¶
func (_q *WorkflowSettingsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkflowSettingsQuery) FirstX ¶
func (_q *WorkflowSettingsQuery) FirstX(ctx context.Context) *WorkflowSettings
FirstX is like First, but panics if an error occurs.
func (*WorkflowSettingsQuery) GroupBy ¶
func (_q *WorkflowSettingsQuery) GroupBy(field string, fields ...string) *WorkflowSettingsGroupBy
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 {
ContentTypes []string `json:"content_types,omitempty"`
Count int `json:"count,omitempty"`
}
client.WorkflowSettings.Query().
GroupBy(workflowsettings.FieldContentTypes).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*WorkflowSettingsQuery) IDs ¶
func (_q *WorkflowSettingsQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of WorkflowSettings IDs.
func (*WorkflowSettingsQuery) IDsX ¶
func (_q *WorkflowSettingsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WorkflowSettingsQuery) Limit ¶
func (_q *WorkflowSettingsQuery) Limit(limit int) *WorkflowSettingsQuery
Limit the number of records to be returned by this query.
func (*WorkflowSettingsQuery) Offset ¶
func (_q *WorkflowSettingsQuery) Offset(offset int) *WorkflowSettingsQuery
Offset to start from.
func (*WorkflowSettingsQuery) Only ¶
func (_q *WorkflowSettingsQuery) Only(ctx context.Context) (*WorkflowSettings, error)
Only returns a single WorkflowSettings entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowSettings entity is found. Returns a *NotFoundError when no WorkflowSettings entities are found.
func (*WorkflowSettingsQuery) OnlyID ¶
func (_q *WorkflowSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WorkflowSettings ID in the query. Returns a *NotSingularError when more than one WorkflowSettings ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkflowSettingsQuery) OnlyIDX ¶
func (_q *WorkflowSettingsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkflowSettingsQuery) OnlyX ¶
func (_q *WorkflowSettingsQuery) OnlyX(ctx context.Context) *WorkflowSettings
OnlyX is like Only, but panics if an error occurs.
func (*WorkflowSettingsQuery) Order ¶
func (_q *WorkflowSettingsQuery) Order(o ...workflowsettings.OrderOption) *WorkflowSettingsQuery
Order specifies how the records should be ordered.
func (*WorkflowSettingsQuery) Select ¶
func (_q *WorkflowSettingsQuery) Select(fields ...string) *WorkflowSettingsSelect
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 {
ContentTypes []string `json:"content_types,omitempty"`
}
client.WorkflowSettings.Query().
Select(workflowsettings.FieldContentTypes).
Scan(ctx, &v)
func (*WorkflowSettingsQuery) Unique ¶
func (_q *WorkflowSettingsQuery) Unique(unique bool) *WorkflowSettingsQuery
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 (*WorkflowSettingsQuery) Where ¶
func (_q *WorkflowSettingsQuery) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsQuery
Where adds a new predicate for the WorkflowSettingsQuery builder.
type WorkflowSettingsSelect ¶
type WorkflowSettingsSelect struct {
*WorkflowSettingsQuery
// contains filtered or unexported fields
}
WorkflowSettingsSelect is the builder for selecting fields of WorkflowSettings entities.
func (*WorkflowSettingsSelect) Aggregate ¶
func (_s *WorkflowSettingsSelect) Aggregate(fns ...AggregateFunc) *WorkflowSettingsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkflowSettingsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowSettingsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowSettingsSelect) Scan ¶
func (_s *WorkflowSettingsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowSettingsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowSettingsSlice ¶
type WorkflowSettingsSlice []*WorkflowSettings
WorkflowSettingsSlice is a parsable slice of WorkflowSettings.
type WorkflowSettingsUpdate ¶
type WorkflowSettingsUpdate struct {
// contains filtered or unexported fields
}
WorkflowSettingsUpdate is the builder for updating WorkflowSettings entities.
func (*WorkflowSettingsUpdate) AddLockMinutes ¶
func (_u *WorkflowSettingsUpdate) AddLockMinutes(v int) *WorkflowSettingsUpdate
AddLockMinutes adds value to the "lock_minutes" field.
func (*WorkflowSettingsUpdate) AppendContentTypes ¶
func (_u *WorkflowSettingsUpdate) AppendContentTypes(v []string) *WorkflowSettingsUpdate
AppendContentTypes appends value to the "content_types" field.
func (*WorkflowSettingsUpdate) ClearContentTypes ¶
func (_u *WorkflowSettingsUpdate) ClearContentTypes() *WorkflowSettingsUpdate
ClearContentTypes clears the value of the "content_types" field.
func (*WorkflowSettingsUpdate) Exec ¶
func (_u *WorkflowSettingsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowSettingsUpdate) ExecX ¶
func (_u *WorkflowSettingsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowSettingsUpdate) Mutation ¶
func (_u *WorkflowSettingsUpdate) Mutation() *WorkflowSettingsMutation
Mutation returns the WorkflowSettingsMutation object of the builder.
func (*WorkflowSettingsUpdate) Save ¶
func (_u *WorkflowSettingsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkflowSettingsUpdate) SaveX ¶
func (_u *WorkflowSettingsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkflowSettingsUpdate) SetContentTypes ¶
func (_u *WorkflowSettingsUpdate) SetContentTypes(v []string) *WorkflowSettingsUpdate
SetContentTypes sets the "content_types" field.
func (*WorkflowSettingsUpdate) SetLockMinutes ¶
func (_u *WorkflowSettingsUpdate) SetLockMinutes(v int) *WorkflowSettingsUpdate
SetLockMinutes sets the "lock_minutes" field.
func (*WorkflowSettingsUpdate) SetNillableLockMinutes ¶
func (_u *WorkflowSettingsUpdate) SetNillableLockMinutes(v *int) *WorkflowSettingsUpdate
SetNillableLockMinutes sets the "lock_minutes" field if the given value is not nil.
func (*WorkflowSettingsUpdate) Where ¶
func (_u *WorkflowSettingsUpdate) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsUpdate
Where appends a list predicates to the WorkflowSettingsUpdate builder.
type WorkflowSettingsUpdateOne ¶
type WorkflowSettingsUpdateOne struct {
// contains filtered or unexported fields
}
WorkflowSettingsUpdateOne is the builder for updating a single WorkflowSettings entity.
func (*WorkflowSettingsUpdateOne) AddLockMinutes ¶
func (_u *WorkflowSettingsUpdateOne) AddLockMinutes(v int) *WorkflowSettingsUpdateOne
AddLockMinutes adds value to the "lock_minutes" field.
func (*WorkflowSettingsUpdateOne) AppendContentTypes ¶
func (_u *WorkflowSettingsUpdateOne) AppendContentTypes(v []string) *WorkflowSettingsUpdateOne
AppendContentTypes appends value to the "content_types" field.
func (*WorkflowSettingsUpdateOne) ClearContentTypes ¶
func (_u *WorkflowSettingsUpdateOne) ClearContentTypes() *WorkflowSettingsUpdateOne
ClearContentTypes clears the value of the "content_types" field.
func (*WorkflowSettingsUpdateOne) Exec ¶
func (_u *WorkflowSettingsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkflowSettingsUpdateOne) ExecX ¶
func (_u *WorkflowSettingsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowSettingsUpdateOne) Mutation ¶
func (_u *WorkflowSettingsUpdateOne) Mutation() *WorkflowSettingsMutation
Mutation returns the WorkflowSettingsMutation object of the builder.
func (*WorkflowSettingsUpdateOne) Save ¶
func (_u *WorkflowSettingsUpdateOne) Save(ctx context.Context) (*WorkflowSettings, error)
Save executes the query and returns the updated WorkflowSettings entity.
func (*WorkflowSettingsUpdateOne) SaveX ¶
func (_u *WorkflowSettingsUpdateOne) SaveX(ctx context.Context) *WorkflowSettings
SaveX is like Save, but panics if an error occurs.
func (*WorkflowSettingsUpdateOne) Select ¶
func (_u *WorkflowSettingsUpdateOne) Select(field string, fields ...string) *WorkflowSettingsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkflowSettingsUpdateOne) SetContentTypes ¶
func (_u *WorkflowSettingsUpdateOne) SetContentTypes(v []string) *WorkflowSettingsUpdateOne
SetContentTypes sets the "content_types" field.
func (*WorkflowSettingsUpdateOne) SetLockMinutes ¶
func (_u *WorkflowSettingsUpdateOne) SetLockMinutes(v int) *WorkflowSettingsUpdateOne
SetLockMinutes sets the "lock_minutes" field.
func (*WorkflowSettingsUpdateOne) SetNillableLockMinutes ¶
func (_u *WorkflowSettingsUpdateOne) SetNillableLockMinutes(v *int) *WorkflowSettingsUpdateOne
SetNillableLockMinutes sets the "lock_minutes" field if the given value is not nil.
func (*WorkflowSettingsUpdateOne) Where ¶
func (_u *WorkflowSettingsUpdateOne) Where(ps ...predicate.WorkflowSettings) *WorkflowSettingsUpdateOne
Where appends a list predicates to the WorkflowSettingsUpdate builder.
type WorkflowState ¶
type WorkflowState struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// MachineName holds the value of the "machine_name" field.
MachineName string `json:"machine_name,omitempty"`
// Label holds the value of the "label" field.
Label string `json:"label,omitempty"`
// Published holds the value of the "published" field.
Published bool `json:"published,omitempty"`
// Color holds the value of the "color" field.
Color string `json:"color,omitempty"`
// Initial holds the value of the "initial" field.
Initial bool `json:"initial,omitempty"`
// Weight holds the value of the "weight" field.
Weight int `json:"weight,omitempty"`
// contains filtered or unexported fields
}
WorkflowState is the model entity for the WorkflowState schema.
func (*WorkflowState) String ¶
func (_m *WorkflowState) String() string
String implements the fmt.Stringer.
func (*WorkflowState) Unwrap ¶
func (_m *WorkflowState) Unwrap() *WorkflowState
Unwrap unwraps the WorkflowState 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 (*WorkflowState) Update ¶
func (_m *WorkflowState) Update() *WorkflowStateUpdateOne
Update returns a builder for updating this WorkflowState. Note that you need to call WorkflowState.Unwrap() before calling this method if this WorkflowState was returned from a transaction, and the transaction was committed or rolled back.
type WorkflowStateClient ¶
type WorkflowStateClient struct {
// contains filtered or unexported fields
}
WorkflowStateClient is a client for the WorkflowState schema.
func NewWorkflowStateClient ¶
func NewWorkflowStateClient(c config) *WorkflowStateClient
NewWorkflowStateClient returns a client for the WorkflowState from the given config.
func (*WorkflowStateClient) Create ¶
func (c *WorkflowStateClient) Create() *WorkflowStateCreate
Create returns a builder for creating a WorkflowState entity.
func (*WorkflowStateClient) CreateBulk ¶
func (c *WorkflowStateClient) CreateBulk(builders ...*WorkflowStateCreate) *WorkflowStateCreateBulk
CreateBulk returns a builder for creating a bulk of WorkflowState entities.
func (*WorkflowStateClient) Delete ¶
func (c *WorkflowStateClient) Delete() *WorkflowStateDelete
Delete returns a delete builder for WorkflowState.
func (*WorkflowStateClient) DeleteOne ¶
func (c *WorkflowStateClient) DeleteOne(_m *WorkflowState) *WorkflowStateDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkflowStateClient) DeleteOneID ¶
func (c *WorkflowStateClient) DeleteOneID(id int) *WorkflowStateDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkflowStateClient) Get ¶
func (c *WorkflowStateClient) Get(ctx context.Context, id int) (*WorkflowState, error)
Get returns a WorkflowState entity by its id.
func (*WorkflowStateClient) GetX ¶
func (c *WorkflowStateClient) GetX(ctx context.Context, id int) *WorkflowState
GetX is like Get, but panics if an error occurs.
func (*WorkflowStateClient) Hooks ¶
func (c *WorkflowStateClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkflowStateClient) Intercept ¶
func (c *WorkflowStateClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowstate.Intercept(f(g(h())))`.
func (*WorkflowStateClient) Interceptors ¶
func (c *WorkflowStateClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkflowStateClient) MapCreateBulk ¶
func (c *WorkflowStateClient) MapCreateBulk(slice any, setFunc func(*WorkflowStateCreate, int)) *WorkflowStateCreateBulk
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 (*WorkflowStateClient) Query ¶
func (c *WorkflowStateClient) Query() *WorkflowStateQuery
Query returns a query builder for WorkflowState.
func (*WorkflowStateClient) Update ¶
func (c *WorkflowStateClient) Update() *WorkflowStateUpdate
Update returns an update builder for WorkflowState.
func (*WorkflowStateClient) UpdateOne ¶
func (c *WorkflowStateClient) UpdateOne(_m *WorkflowState) *WorkflowStateUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkflowStateClient) UpdateOneID ¶
func (c *WorkflowStateClient) UpdateOneID(id int) *WorkflowStateUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkflowStateClient) Use ¶
func (c *WorkflowStateClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowstate.Hooks(f(g(h())))`.
type WorkflowStateCreate ¶
type WorkflowStateCreate struct {
// contains filtered or unexported fields
}
WorkflowStateCreate is the builder for creating a WorkflowState entity.
func (*WorkflowStateCreate) Exec ¶
func (_c *WorkflowStateCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowStateCreate) ExecX ¶
func (_c *WorkflowStateCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStateCreate) Mutation ¶
func (_c *WorkflowStateCreate) Mutation() *WorkflowStateMutation
Mutation returns the WorkflowStateMutation object of the builder.
func (*WorkflowStateCreate) Save ¶
func (_c *WorkflowStateCreate) Save(ctx context.Context) (*WorkflowState, error)
Save creates the WorkflowState in the database.
func (*WorkflowStateCreate) SaveX ¶
func (_c *WorkflowStateCreate) SaveX(ctx context.Context) *WorkflowState
SaveX calls Save and panics if Save returns an error.
func (*WorkflowStateCreate) SetColor ¶
func (_c *WorkflowStateCreate) SetColor(v string) *WorkflowStateCreate
SetColor sets the "color" field.
func (*WorkflowStateCreate) SetID ¶
func (_c *WorkflowStateCreate) SetID(v int) *WorkflowStateCreate
SetID sets the "id" field.
func (*WorkflowStateCreate) SetInitial ¶
func (_c *WorkflowStateCreate) SetInitial(v bool) *WorkflowStateCreate
SetInitial sets the "initial" field.
func (*WorkflowStateCreate) SetLabel ¶
func (_c *WorkflowStateCreate) SetLabel(v string) *WorkflowStateCreate
SetLabel sets the "label" field.
func (*WorkflowStateCreate) SetMachineName ¶
func (_c *WorkflowStateCreate) SetMachineName(v string) *WorkflowStateCreate
SetMachineName sets the "machine_name" field.
func (*WorkflowStateCreate) SetNillableColor ¶
func (_c *WorkflowStateCreate) SetNillableColor(v *string) *WorkflowStateCreate
SetNillableColor sets the "color" field if the given value is not nil.
func (*WorkflowStateCreate) SetNillableInitial ¶
func (_c *WorkflowStateCreate) SetNillableInitial(v *bool) *WorkflowStateCreate
SetNillableInitial sets the "initial" field if the given value is not nil.
func (*WorkflowStateCreate) SetNillablePublished ¶
func (_c *WorkflowStateCreate) SetNillablePublished(v *bool) *WorkflowStateCreate
SetNillablePublished sets the "published" field if the given value is not nil.
func (*WorkflowStateCreate) SetNillableWeight ¶
func (_c *WorkflowStateCreate) SetNillableWeight(v *int) *WorkflowStateCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*WorkflowStateCreate) SetPublished ¶
func (_c *WorkflowStateCreate) SetPublished(v bool) *WorkflowStateCreate
SetPublished sets the "published" field.
func (*WorkflowStateCreate) SetWeight ¶
func (_c *WorkflowStateCreate) SetWeight(v int) *WorkflowStateCreate
SetWeight sets the "weight" field.
type WorkflowStateCreateBulk ¶
type WorkflowStateCreateBulk struct {
// contains filtered or unexported fields
}
WorkflowStateCreateBulk is the builder for creating many WorkflowState entities in bulk.
func (*WorkflowStateCreateBulk) Exec ¶
func (_c *WorkflowStateCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowStateCreateBulk) ExecX ¶
func (_c *WorkflowStateCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStateCreateBulk) Save ¶
func (_c *WorkflowStateCreateBulk) Save(ctx context.Context) ([]*WorkflowState, error)
Save creates the WorkflowState entities in the database.
func (*WorkflowStateCreateBulk) SaveX ¶
func (_c *WorkflowStateCreateBulk) SaveX(ctx context.Context) []*WorkflowState
SaveX is like Save, but panics if an error occurs.
type WorkflowStateDelete ¶
type WorkflowStateDelete struct {
// contains filtered or unexported fields
}
WorkflowStateDelete is the builder for deleting a WorkflowState entity.
func (*WorkflowStateDelete) Exec ¶
func (_d *WorkflowStateDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkflowStateDelete) ExecX ¶
func (_d *WorkflowStateDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStateDelete) Where ¶
func (_d *WorkflowStateDelete) Where(ps ...predicate.WorkflowState) *WorkflowStateDelete
Where appends a list predicates to the WorkflowStateDelete builder.
type WorkflowStateDeleteOne ¶
type WorkflowStateDeleteOne struct {
// contains filtered or unexported fields
}
WorkflowStateDeleteOne is the builder for deleting a single WorkflowState entity.
func (*WorkflowStateDeleteOne) Exec ¶
func (_d *WorkflowStateDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkflowStateDeleteOne) ExecX ¶
func (_d *WorkflowStateDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStateDeleteOne) Where ¶
func (_d *WorkflowStateDeleteOne) Where(ps ...predicate.WorkflowState) *WorkflowStateDeleteOne
Where appends a list predicates to the WorkflowStateDelete builder.
type WorkflowStateGroupBy ¶
type WorkflowStateGroupBy struct {
// contains filtered or unexported fields
}
WorkflowStateGroupBy is the group-by builder for WorkflowState entities.
func (*WorkflowStateGroupBy) Aggregate ¶
func (_g *WorkflowStateGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowStateGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkflowStateGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowStateGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowStateGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowStateGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowStateGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowStateGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowStateGroupBy) Scan ¶
func (_g *WorkflowStateGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowStateGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowStateMutation ¶
type WorkflowStateMutation struct {
// contains filtered or unexported fields
}
WorkflowStateMutation represents an operation that mutates the WorkflowState nodes in the graph.
func (*WorkflowStateMutation) AddField ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) AddWeight ¶
func (m *WorkflowStateMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*WorkflowStateMutation) AddedEdges ¶
func (m *WorkflowStateMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkflowStateMutation) AddedField ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) AddedFields ¶
func (m *WorkflowStateMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkflowStateMutation) AddedIDs ¶
func (m *WorkflowStateMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkflowStateMutation) AddedWeight ¶
func (m *WorkflowStateMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*WorkflowStateMutation) ClearEdge ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) ClearField ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) ClearedEdges ¶
func (m *WorkflowStateMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkflowStateMutation) ClearedFields ¶
func (m *WorkflowStateMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkflowStateMutation) Client ¶
func (m WorkflowStateMutation) 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 (*WorkflowStateMutation) Color ¶
func (m *WorkflowStateMutation) Color() (r string, exists bool)
Color returns the value of the "color" field in the mutation.
func (*WorkflowStateMutation) EdgeCleared ¶
func (m *WorkflowStateMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkflowStateMutation) Field ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) FieldCleared ¶
func (m *WorkflowStateMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkflowStateMutation) Fields ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) ID ¶
func (m *WorkflowStateMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*WorkflowStateMutation) IDs ¶
func (m *WorkflowStateMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*WorkflowStateMutation) Initial ¶
func (m *WorkflowStateMutation) Initial() (r bool, exists bool)
Initial returns the value of the "initial" field in the mutation.
func (*WorkflowStateMutation) Label ¶
func (m *WorkflowStateMutation) Label() (r string, exists bool)
Label returns the value of the "label" field in the mutation.
func (*WorkflowStateMutation) MachineName ¶
func (m *WorkflowStateMutation) MachineName() (r string, exists bool)
MachineName returns the value of the "machine_name" field in the mutation.
func (*WorkflowStateMutation) OldColor ¶
func (m *WorkflowStateMutation) OldColor(ctx context.Context) (v string, err error)
OldColor returns the old "color" field's value of the WorkflowState entity. If the WorkflowState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowStateMutation) 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 (*WorkflowStateMutation) OldInitial ¶
func (m *WorkflowStateMutation) OldInitial(ctx context.Context) (v bool, err error)
OldInitial returns the old "initial" field's value of the WorkflowState entity. If the WorkflowState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowStateMutation) OldLabel ¶
func (m *WorkflowStateMutation) OldLabel(ctx context.Context) (v string, err error)
OldLabel returns the old "label" field's value of the WorkflowState entity. If the WorkflowState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowStateMutation) OldMachineName ¶
func (m *WorkflowStateMutation) OldMachineName(ctx context.Context) (v string, err error)
OldMachineName returns the old "machine_name" field's value of the WorkflowState entity. If the WorkflowState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowStateMutation) OldPublished ¶
func (m *WorkflowStateMutation) OldPublished(ctx context.Context) (v bool, err error)
OldPublished returns the old "published" field's value of the WorkflowState entity. If the WorkflowState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowStateMutation) OldWeight ¶
func (m *WorkflowStateMutation) OldWeight(ctx context.Context) (v int, err error)
OldWeight returns the old "weight" field's value of the WorkflowState entity. If the WorkflowState object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowStateMutation) Op ¶
func (m *WorkflowStateMutation) Op() Op
Op returns the operation name.
func (*WorkflowStateMutation) Published ¶
func (m *WorkflowStateMutation) Published() (r bool, exists bool)
Published returns the value of the "published" field in the mutation.
func (*WorkflowStateMutation) RemovedEdges ¶
func (m *WorkflowStateMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkflowStateMutation) RemovedIDs ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) ResetColor ¶
func (m *WorkflowStateMutation) ResetColor()
ResetColor resets all changes to the "color" field.
func (*WorkflowStateMutation) ResetEdge ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) ResetField ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) ResetInitial ¶
func (m *WorkflowStateMutation) ResetInitial()
ResetInitial resets all changes to the "initial" field.
func (*WorkflowStateMutation) ResetLabel ¶
func (m *WorkflowStateMutation) ResetLabel()
ResetLabel resets all changes to the "label" field.
func (*WorkflowStateMutation) ResetMachineName ¶
func (m *WorkflowStateMutation) ResetMachineName()
ResetMachineName resets all changes to the "machine_name" field.
func (*WorkflowStateMutation) ResetPublished ¶
func (m *WorkflowStateMutation) ResetPublished()
ResetPublished resets all changes to the "published" field.
func (*WorkflowStateMutation) ResetWeight ¶
func (m *WorkflowStateMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*WorkflowStateMutation) SetColor ¶
func (m *WorkflowStateMutation) SetColor(s string)
SetColor sets the "color" field.
func (*WorkflowStateMutation) SetField ¶
func (m *WorkflowStateMutation) 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 (*WorkflowStateMutation) SetID ¶
func (m *WorkflowStateMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowState entities.
func (*WorkflowStateMutation) SetInitial ¶
func (m *WorkflowStateMutation) SetInitial(b bool)
SetInitial sets the "initial" field.
func (*WorkflowStateMutation) SetLabel ¶
func (m *WorkflowStateMutation) SetLabel(s string)
SetLabel sets the "label" field.
func (*WorkflowStateMutation) SetMachineName ¶
func (m *WorkflowStateMutation) SetMachineName(s string)
SetMachineName sets the "machine_name" field.
func (*WorkflowStateMutation) SetOp ¶
func (m *WorkflowStateMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WorkflowStateMutation) SetPublished ¶
func (m *WorkflowStateMutation) SetPublished(b bool)
SetPublished sets the "published" field.
func (*WorkflowStateMutation) SetWeight ¶
func (m *WorkflowStateMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (WorkflowStateMutation) Tx ¶
func (m WorkflowStateMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkflowStateMutation) Type ¶
func (m *WorkflowStateMutation) Type() string
Type returns the node type of this mutation (WorkflowState).
func (*WorkflowStateMutation) Weight ¶
func (m *WorkflowStateMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*WorkflowStateMutation) Where ¶
func (m *WorkflowStateMutation) Where(ps ...predicate.WorkflowState)
Where appends a list predicates to the WorkflowStateMutation builder.
func (*WorkflowStateMutation) WhereP ¶
func (m *WorkflowStateMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkflowStateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type WorkflowStateQuery ¶
type WorkflowStateQuery struct {
// contains filtered or unexported fields
}
WorkflowStateQuery is the builder for querying WorkflowState entities.
func (*WorkflowStateQuery) Aggregate ¶
func (_q *WorkflowStateQuery) Aggregate(fns ...AggregateFunc) *WorkflowStateSelect
Aggregate returns a WorkflowStateSelect configured with the given aggregations.
func (*WorkflowStateQuery) All ¶
func (_q *WorkflowStateQuery) All(ctx context.Context) ([]*WorkflowState, error)
All executes the query and returns a list of WorkflowStates.
func (*WorkflowStateQuery) AllX ¶
func (_q *WorkflowStateQuery) AllX(ctx context.Context) []*WorkflowState
AllX is like All, but panics if an error occurs.
func (*WorkflowStateQuery) Clone ¶
func (_q *WorkflowStateQuery) Clone() *WorkflowStateQuery
Clone returns a duplicate of the WorkflowStateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkflowStateQuery) Count ¶
func (_q *WorkflowStateQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkflowStateQuery) CountX ¶
func (_q *WorkflowStateQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkflowStateQuery) Exist ¶
func (_q *WorkflowStateQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkflowStateQuery) ExistX ¶
func (_q *WorkflowStateQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkflowStateQuery) First ¶
func (_q *WorkflowStateQuery) First(ctx context.Context) (*WorkflowState, error)
First returns the first WorkflowState entity from the query. Returns a *NotFoundError when no WorkflowState was found.
func (*WorkflowStateQuery) FirstID ¶
func (_q *WorkflowStateQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WorkflowState ID from the query. Returns a *NotFoundError when no WorkflowState ID was found.
func (*WorkflowStateQuery) FirstIDX ¶
func (_q *WorkflowStateQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkflowStateQuery) FirstX ¶
func (_q *WorkflowStateQuery) FirstX(ctx context.Context) *WorkflowState
FirstX is like First, but panics if an error occurs.
func (*WorkflowStateQuery) GroupBy ¶
func (_q *WorkflowStateQuery) GroupBy(field string, fields ...string) *WorkflowStateGroupBy
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 {
MachineName string `json:"machine_name,omitempty"`
Count int `json:"count,omitempty"`
}
client.WorkflowState.Query().
GroupBy(workflowstate.FieldMachineName).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*WorkflowStateQuery) IDs ¶
func (_q *WorkflowStateQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of WorkflowState IDs.
func (*WorkflowStateQuery) IDsX ¶
func (_q *WorkflowStateQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WorkflowStateQuery) Limit ¶
func (_q *WorkflowStateQuery) Limit(limit int) *WorkflowStateQuery
Limit the number of records to be returned by this query.
func (*WorkflowStateQuery) Offset ¶
func (_q *WorkflowStateQuery) Offset(offset int) *WorkflowStateQuery
Offset to start from.
func (*WorkflowStateQuery) Only ¶
func (_q *WorkflowStateQuery) Only(ctx context.Context) (*WorkflowState, error)
Only returns a single WorkflowState entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowState entity is found. Returns a *NotFoundError when no WorkflowState entities are found.
func (*WorkflowStateQuery) OnlyID ¶
func (_q *WorkflowStateQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WorkflowState ID in the query. Returns a *NotSingularError when more than one WorkflowState ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkflowStateQuery) OnlyIDX ¶
func (_q *WorkflowStateQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkflowStateQuery) OnlyX ¶
func (_q *WorkflowStateQuery) OnlyX(ctx context.Context) *WorkflowState
OnlyX is like Only, but panics if an error occurs.
func (*WorkflowStateQuery) Order ¶
func (_q *WorkflowStateQuery) Order(o ...workflowstate.OrderOption) *WorkflowStateQuery
Order specifies how the records should be ordered.
func (*WorkflowStateQuery) Select ¶
func (_q *WorkflowStateQuery) Select(fields ...string) *WorkflowStateSelect
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 {
MachineName string `json:"machine_name,omitempty"`
}
client.WorkflowState.Query().
Select(workflowstate.FieldMachineName).
Scan(ctx, &v)
func (*WorkflowStateQuery) Unique ¶
func (_q *WorkflowStateQuery) Unique(unique bool) *WorkflowStateQuery
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 (*WorkflowStateQuery) Where ¶
func (_q *WorkflowStateQuery) Where(ps ...predicate.WorkflowState) *WorkflowStateQuery
Where adds a new predicate for the WorkflowStateQuery builder.
type WorkflowStateSelect ¶
type WorkflowStateSelect struct {
*WorkflowStateQuery
// contains filtered or unexported fields
}
WorkflowStateSelect is the builder for selecting fields of WorkflowState entities.
func (*WorkflowStateSelect) Aggregate ¶
func (_s *WorkflowStateSelect) Aggregate(fns ...AggregateFunc) *WorkflowStateSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkflowStateSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowStateSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowStateSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowStateSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowStateSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowStateSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowStateSelect) Scan ¶
func (_s *WorkflowStateSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowStateSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowStateUpdate ¶
type WorkflowStateUpdate struct {
// contains filtered or unexported fields
}
WorkflowStateUpdate is the builder for updating WorkflowState entities.
func (*WorkflowStateUpdate) AddWeight ¶
func (_u *WorkflowStateUpdate) AddWeight(v int) *WorkflowStateUpdate
AddWeight adds value to the "weight" field.
func (*WorkflowStateUpdate) Exec ¶
func (_u *WorkflowStateUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowStateUpdate) ExecX ¶
func (_u *WorkflowStateUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStateUpdate) Mutation ¶
func (_u *WorkflowStateUpdate) Mutation() *WorkflowStateMutation
Mutation returns the WorkflowStateMutation object of the builder.
func (*WorkflowStateUpdate) Save ¶
func (_u *WorkflowStateUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkflowStateUpdate) SaveX ¶
func (_u *WorkflowStateUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkflowStateUpdate) SetColor ¶
func (_u *WorkflowStateUpdate) SetColor(v string) *WorkflowStateUpdate
SetColor sets the "color" field.
func (*WorkflowStateUpdate) SetInitial ¶
func (_u *WorkflowStateUpdate) SetInitial(v bool) *WorkflowStateUpdate
SetInitial sets the "initial" field.
func (*WorkflowStateUpdate) SetLabel ¶
func (_u *WorkflowStateUpdate) SetLabel(v string) *WorkflowStateUpdate
SetLabel sets the "label" field.
func (*WorkflowStateUpdate) SetMachineName ¶
func (_u *WorkflowStateUpdate) SetMachineName(v string) *WorkflowStateUpdate
SetMachineName sets the "machine_name" field.
func (*WorkflowStateUpdate) SetNillableColor ¶
func (_u *WorkflowStateUpdate) SetNillableColor(v *string) *WorkflowStateUpdate
SetNillableColor sets the "color" field if the given value is not nil.
func (*WorkflowStateUpdate) SetNillableInitial ¶
func (_u *WorkflowStateUpdate) SetNillableInitial(v *bool) *WorkflowStateUpdate
SetNillableInitial sets the "initial" field if the given value is not nil.
func (*WorkflowStateUpdate) SetNillableLabel ¶
func (_u *WorkflowStateUpdate) SetNillableLabel(v *string) *WorkflowStateUpdate
SetNillableLabel sets the "label" field if the given value is not nil.
func (*WorkflowStateUpdate) SetNillableMachineName ¶
func (_u *WorkflowStateUpdate) SetNillableMachineName(v *string) *WorkflowStateUpdate
SetNillableMachineName sets the "machine_name" field if the given value is not nil.
func (*WorkflowStateUpdate) SetNillablePublished ¶
func (_u *WorkflowStateUpdate) SetNillablePublished(v *bool) *WorkflowStateUpdate
SetNillablePublished sets the "published" field if the given value is not nil.
func (*WorkflowStateUpdate) SetNillableWeight ¶
func (_u *WorkflowStateUpdate) SetNillableWeight(v *int) *WorkflowStateUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*WorkflowStateUpdate) SetPublished ¶
func (_u *WorkflowStateUpdate) SetPublished(v bool) *WorkflowStateUpdate
SetPublished sets the "published" field.
func (*WorkflowStateUpdate) SetWeight ¶
func (_u *WorkflowStateUpdate) SetWeight(v int) *WorkflowStateUpdate
SetWeight sets the "weight" field.
func (*WorkflowStateUpdate) Where ¶
func (_u *WorkflowStateUpdate) Where(ps ...predicate.WorkflowState) *WorkflowStateUpdate
Where appends a list predicates to the WorkflowStateUpdate builder.
type WorkflowStateUpdateOne ¶
type WorkflowStateUpdateOne struct {
// contains filtered or unexported fields
}
WorkflowStateUpdateOne is the builder for updating a single WorkflowState entity.
func (*WorkflowStateUpdateOne) AddWeight ¶
func (_u *WorkflowStateUpdateOne) AddWeight(v int) *WorkflowStateUpdateOne
AddWeight adds value to the "weight" field.
func (*WorkflowStateUpdateOne) Exec ¶
func (_u *WorkflowStateUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkflowStateUpdateOne) ExecX ¶
func (_u *WorkflowStateUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowStateUpdateOne) Mutation ¶
func (_u *WorkflowStateUpdateOne) Mutation() *WorkflowStateMutation
Mutation returns the WorkflowStateMutation object of the builder.
func (*WorkflowStateUpdateOne) Save ¶
func (_u *WorkflowStateUpdateOne) Save(ctx context.Context) (*WorkflowState, error)
Save executes the query and returns the updated WorkflowState entity.
func (*WorkflowStateUpdateOne) SaveX ¶
func (_u *WorkflowStateUpdateOne) SaveX(ctx context.Context) *WorkflowState
SaveX is like Save, but panics if an error occurs.
func (*WorkflowStateUpdateOne) Select ¶
func (_u *WorkflowStateUpdateOne) Select(field string, fields ...string) *WorkflowStateUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkflowStateUpdateOne) SetColor ¶
func (_u *WorkflowStateUpdateOne) SetColor(v string) *WorkflowStateUpdateOne
SetColor sets the "color" field.
func (*WorkflowStateUpdateOne) SetInitial ¶
func (_u *WorkflowStateUpdateOne) SetInitial(v bool) *WorkflowStateUpdateOne
SetInitial sets the "initial" field.
func (*WorkflowStateUpdateOne) SetLabel ¶
func (_u *WorkflowStateUpdateOne) SetLabel(v string) *WorkflowStateUpdateOne
SetLabel sets the "label" field.
func (*WorkflowStateUpdateOne) SetMachineName ¶
func (_u *WorkflowStateUpdateOne) SetMachineName(v string) *WorkflowStateUpdateOne
SetMachineName sets the "machine_name" field.
func (*WorkflowStateUpdateOne) SetNillableColor ¶
func (_u *WorkflowStateUpdateOne) SetNillableColor(v *string) *WorkflowStateUpdateOne
SetNillableColor sets the "color" field if the given value is not nil.
func (*WorkflowStateUpdateOne) SetNillableInitial ¶
func (_u *WorkflowStateUpdateOne) SetNillableInitial(v *bool) *WorkflowStateUpdateOne
SetNillableInitial sets the "initial" field if the given value is not nil.
func (*WorkflowStateUpdateOne) SetNillableLabel ¶
func (_u *WorkflowStateUpdateOne) SetNillableLabel(v *string) *WorkflowStateUpdateOne
SetNillableLabel sets the "label" field if the given value is not nil.
func (*WorkflowStateUpdateOne) SetNillableMachineName ¶
func (_u *WorkflowStateUpdateOne) SetNillableMachineName(v *string) *WorkflowStateUpdateOne
SetNillableMachineName sets the "machine_name" field if the given value is not nil.
func (*WorkflowStateUpdateOne) SetNillablePublished ¶
func (_u *WorkflowStateUpdateOne) SetNillablePublished(v *bool) *WorkflowStateUpdateOne
SetNillablePublished sets the "published" field if the given value is not nil.
func (*WorkflowStateUpdateOne) SetNillableWeight ¶
func (_u *WorkflowStateUpdateOne) SetNillableWeight(v *int) *WorkflowStateUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*WorkflowStateUpdateOne) SetPublished ¶
func (_u *WorkflowStateUpdateOne) SetPublished(v bool) *WorkflowStateUpdateOne
SetPublished sets the "published" field.
func (*WorkflowStateUpdateOne) SetWeight ¶
func (_u *WorkflowStateUpdateOne) SetWeight(v int) *WorkflowStateUpdateOne
SetWeight sets the "weight" field.
func (*WorkflowStateUpdateOne) Where ¶
func (_u *WorkflowStateUpdateOne) Where(ps ...predicate.WorkflowState) *WorkflowStateUpdateOne
Where appends a list predicates to the WorkflowStateUpdate builder.
type WorkflowStates ¶
type WorkflowStates []*WorkflowState
WorkflowStates is a parsable slice of WorkflowState.
type WorkflowTransition ¶
type WorkflowTransition struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// FromStates holds the value of the "from_states" field.
FromStates []string `json:"from_states,omitempty"`
// ToState holds the value of the "to_state" field.
ToState string `json:"to_state,omitempty"`
// Label holds the value of the "label" field.
Label string `json:"label,omitempty"`
// Roles holds the value of the "roles" field.
Roles []string `json:"roles,omitempty"`
// Comment holds the value of the "comment" field.
Comment string `json:"comment,omitempty"`
// Weight holds the value of the "weight" field.
Weight int `json:"weight,omitempty"`
// contains filtered or unexported fields
}
WorkflowTransition is the model entity for the WorkflowTransition schema.
func (*WorkflowTransition) String ¶
func (_m *WorkflowTransition) String() string
String implements the fmt.Stringer.
func (*WorkflowTransition) Unwrap ¶
func (_m *WorkflowTransition) Unwrap() *WorkflowTransition
Unwrap unwraps the WorkflowTransition 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 (*WorkflowTransition) Update ¶
func (_m *WorkflowTransition) Update() *WorkflowTransitionUpdateOne
Update returns a builder for updating this WorkflowTransition. Note that you need to call WorkflowTransition.Unwrap() before calling this method if this WorkflowTransition was returned from a transaction, and the transaction was committed or rolled back.
type WorkflowTransitionClient ¶
type WorkflowTransitionClient struct {
// contains filtered or unexported fields
}
WorkflowTransitionClient is a client for the WorkflowTransition schema.
func NewWorkflowTransitionClient ¶
func NewWorkflowTransitionClient(c config) *WorkflowTransitionClient
NewWorkflowTransitionClient returns a client for the WorkflowTransition from the given config.
func (*WorkflowTransitionClient) Create ¶
func (c *WorkflowTransitionClient) Create() *WorkflowTransitionCreate
Create returns a builder for creating a WorkflowTransition entity.
func (*WorkflowTransitionClient) CreateBulk ¶
func (c *WorkflowTransitionClient) CreateBulk(builders ...*WorkflowTransitionCreate) *WorkflowTransitionCreateBulk
CreateBulk returns a builder for creating a bulk of WorkflowTransition entities.
func (*WorkflowTransitionClient) Delete ¶
func (c *WorkflowTransitionClient) Delete() *WorkflowTransitionDelete
Delete returns a delete builder for WorkflowTransition.
func (*WorkflowTransitionClient) DeleteOne ¶
func (c *WorkflowTransitionClient) DeleteOne(_m *WorkflowTransition) *WorkflowTransitionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkflowTransitionClient) DeleteOneID ¶
func (c *WorkflowTransitionClient) DeleteOneID(id int) *WorkflowTransitionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkflowTransitionClient) Get ¶
func (c *WorkflowTransitionClient) Get(ctx context.Context, id int) (*WorkflowTransition, error)
Get returns a WorkflowTransition entity by its id.
func (*WorkflowTransitionClient) GetX ¶
func (c *WorkflowTransitionClient) GetX(ctx context.Context, id int) *WorkflowTransition
GetX is like Get, but panics if an error occurs.
func (*WorkflowTransitionClient) Hooks ¶
func (c *WorkflowTransitionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkflowTransitionClient) Intercept ¶
func (c *WorkflowTransitionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workflowtransition.Intercept(f(g(h())))`.
func (*WorkflowTransitionClient) Interceptors ¶
func (c *WorkflowTransitionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkflowTransitionClient) MapCreateBulk ¶
func (c *WorkflowTransitionClient) MapCreateBulk(slice any, setFunc func(*WorkflowTransitionCreate, int)) *WorkflowTransitionCreateBulk
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 (*WorkflowTransitionClient) Query ¶
func (c *WorkflowTransitionClient) Query() *WorkflowTransitionQuery
Query returns a query builder for WorkflowTransition.
func (*WorkflowTransitionClient) Update ¶
func (c *WorkflowTransitionClient) Update() *WorkflowTransitionUpdate
Update returns an update builder for WorkflowTransition.
func (*WorkflowTransitionClient) UpdateOne ¶
func (c *WorkflowTransitionClient) UpdateOne(_m *WorkflowTransition) *WorkflowTransitionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkflowTransitionClient) UpdateOneID ¶
func (c *WorkflowTransitionClient) UpdateOneID(id int) *WorkflowTransitionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkflowTransitionClient) Use ¶
func (c *WorkflowTransitionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workflowtransition.Hooks(f(g(h())))`.
type WorkflowTransitionCreate ¶
type WorkflowTransitionCreate struct {
// contains filtered or unexported fields
}
WorkflowTransitionCreate is the builder for creating a WorkflowTransition entity.
func (*WorkflowTransitionCreate) Exec ¶
func (_c *WorkflowTransitionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowTransitionCreate) ExecX ¶
func (_c *WorkflowTransitionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowTransitionCreate) Mutation ¶
func (_c *WorkflowTransitionCreate) Mutation() *WorkflowTransitionMutation
Mutation returns the WorkflowTransitionMutation object of the builder.
func (*WorkflowTransitionCreate) Save ¶
func (_c *WorkflowTransitionCreate) Save(ctx context.Context) (*WorkflowTransition, error)
Save creates the WorkflowTransition in the database.
func (*WorkflowTransitionCreate) SaveX ¶
func (_c *WorkflowTransitionCreate) SaveX(ctx context.Context) *WorkflowTransition
SaveX calls Save and panics if Save returns an error.
func (*WorkflowTransitionCreate) SetComment ¶
func (_c *WorkflowTransitionCreate) SetComment(v string) *WorkflowTransitionCreate
SetComment sets the "comment" field.
func (*WorkflowTransitionCreate) SetFromStates ¶
func (_c *WorkflowTransitionCreate) SetFromStates(v []string) *WorkflowTransitionCreate
SetFromStates sets the "from_states" field.
func (*WorkflowTransitionCreate) SetID ¶
func (_c *WorkflowTransitionCreate) SetID(v int) *WorkflowTransitionCreate
SetID sets the "id" field.
func (*WorkflowTransitionCreate) SetLabel ¶
func (_c *WorkflowTransitionCreate) SetLabel(v string) *WorkflowTransitionCreate
SetLabel sets the "label" field.
func (*WorkflowTransitionCreate) SetNillableComment ¶
func (_c *WorkflowTransitionCreate) SetNillableComment(v *string) *WorkflowTransitionCreate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*WorkflowTransitionCreate) SetNillableWeight ¶
func (_c *WorkflowTransitionCreate) SetNillableWeight(v *int) *WorkflowTransitionCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*WorkflowTransitionCreate) SetRoles ¶
func (_c *WorkflowTransitionCreate) SetRoles(v []string) *WorkflowTransitionCreate
SetRoles sets the "roles" field.
func (*WorkflowTransitionCreate) SetToState ¶
func (_c *WorkflowTransitionCreate) SetToState(v string) *WorkflowTransitionCreate
SetToState sets the "to_state" field.
func (*WorkflowTransitionCreate) SetWeight ¶
func (_c *WorkflowTransitionCreate) SetWeight(v int) *WorkflowTransitionCreate
SetWeight sets the "weight" field.
type WorkflowTransitionCreateBulk ¶
type WorkflowTransitionCreateBulk struct {
// contains filtered or unexported fields
}
WorkflowTransitionCreateBulk is the builder for creating many WorkflowTransition entities in bulk.
func (*WorkflowTransitionCreateBulk) Exec ¶
func (_c *WorkflowTransitionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowTransitionCreateBulk) ExecX ¶
func (_c *WorkflowTransitionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowTransitionCreateBulk) Save ¶
func (_c *WorkflowTransitionCreateBulk) Save(ctx context.Context) ([]*WorkflowTransition, error)
Save creates the WorkflowTransition entities in the database.
func (*WorkflowTransitionCreateBulk) SaveX ¶
func (_c *WorkflowTransitionCreateBulk) SaveX(ctx context.Context) []*WorkflowTransition
SaveX is like Save, but panics if an error occurs.
type WorkflowTransitionDelete ¶
type WorkflowTransitionDelete struct {
// contains filtered or unexported fields
}
WorkflowTransitionDelete is the builder for deleting a WorkflowTransition entity.
func (*WorkflowTransitionDelete) Exec ¶
func (_d *WorkflowTransitionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkflowTransitionDelete) ExecX ¶
func (_d *WorkflowTransitionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowTransitionDelete) Where ¶
func (_d *WorkflowTransitionDelete) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionDelete
Where appends a list predicates to the WorkflowTransitionDelete builder.
type WorkflowTransitionDeleteOne ¶
type WorkflowTransitionDeleteOne struct {
// contains filtered or unexported fields
}
WorkflowTransitionDeleteOne is the builder for deleting a single WorkflowTransition entity.
func (*WorkflowTransitionDeleteOne) Exec ¶
func (_d *WorkflowTransitionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkflowTransitionDeleteOne) ExecX ¶
func (_d *WorkflowTransitionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowTransitionDeleteOne) Where ¶
func (_d *WorkflowTransitionDeleteOne) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionDeleteOne
Where appends a list predicates to the WorkflowTransitionDelete builder.
type WorkflowTransitionGroupBy ¶
type WorkflowTransitionGroupBy struct {
// contains filtered or unexported fields
}
WorkflowTransitionGroupBy is the group-by builder for WorkflowTransition entities.
func (*WorkflowTransitionGroupBy) Aggregate ¶
func (_g *WorkflowTransitionGroupBy) Aggregate(fns ...AggregateFunc) *WorkflowTransitionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkflowTransitionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*WorkflowTransitionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowTransitionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionGroupBy) Scan ¶
func (_g *WorkflowTransitionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowTransitionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowTransitionMutation ¶
type WorkflowTransitionMutation struct {
// contains filtered or unexported fields
}
WorkflowTransitionMutation represents an operation that mutates the WorkflowTransition nodes in the graph.
func (*WorkflowTransitionMutation) AddField ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) AddWeight ¶
func (m *WorkflowTransitionMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*WorkflowTransitionMutation) AddedEdges ¶
func (m *WorkflowTransitionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkflowTransitionMutation) AddedField ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) AddedFields ¶
func (m *WorkflowTransitionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkflowTransitionMutation) AddedIDs ¶
func (m *WorkflowTransitionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkflowTransitionMutation) AddedWeight ¶
func (m *WorkflowTransitionMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*WorkflowTransitionMutation) AppendFromStates ¶
func (m *WorkflowTransitionMutation) AppendFromStates(s []string)
AppendFromStates adds s to the "from_states" field.
func (*WorkflowTransitionMutation) AppendRoles ¶
func (m *WorkflowTransitionMutation) AppendRoles(s []string)
AppendRoles adds s to the "roles" field.
func (*WorkflowTransitionMutation) AppendedFromStates ¶
func (m *WorkflowTransitionMutation) AppendedFromStates() ([]string, bool)
AppendedFromStates returns the list of values that were appended to the "from_states" field in this mutation.
func (*WorkflowTransitionMutation) AppendedRoles ¶
func (m *WorkflowTransitionMutation) AppendedRoles() ([]string, bool)
AppendedRoles returns the list of values that were appended to the "roles" field in this mutation.
func (*WorkflowTransitionMutation) ClearEdge ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) ClearField ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) ClearedEdges ¶
func (m *WorkflowTransitionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkflowTransitionMutation) ClearedFields ¶
func (m *WorkflowTransitionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkflowTransitionMutation) Client ¶
func (m WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) Comment ¶
func (m *WorkflowTransitionMutation) Comment() (r string, exists bool)
Comment returns the value of the "comment" field in the mutation.
func (*WorkflowTransitionMutation) EdgeCleared ¶
func (m *WorkflowTransitionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkflowTransitionMutation) Field ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) FieldCleared ¶
func (m *WorkflowTransitionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkflowTransitionMutation) Fields ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) FromStates ¶
func (m *WorkflowTransitionMutation) FromStates() (r []string, exists bool)
FromStates returns the value of the "from_states" field in the mutation.
func (*WorkflowTransitionMutation) ID ¶
func (m *WorkflowTransitionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*WorkflowTransitionMutation) IDs ¶
func (m *WorkflowTransitionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*WorkflowTransitionMutation) Label ¶
func (m *WorkflowTransitionMutation) Label() (r string, exists bool)
Label returns the value of the "label" field in the mutation.
func (*WorkflowTransitionMutation) OldComment ¶
func (m *WorkflowTransitionMutation) OldComment(ctx context.Context) (v string, err error)
OldComment returns the old "comment" field's value of the WorkflowTransition entity. If the WorkflowTransition object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) OldFromStates ¶
func (m *WorkflowTransitionMutation) OldFromStates(ctx context.Context) (v []string, err error)
OldFromStates returns the old "from_states" field's value of the WorkflowTransition entity. If the WorkflowTransition object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowTransitionMutation) OldLabel ¶
func (m *WorkflowTransitionMutation) OldLabel(ctx context.Context) (v string, err error)
OldLabel returns the old "label" field's value of the WorkflowTransition entity. If the WorkflowTransition object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowTransitionMutation) OldRoles ¶
func (m *WorkflowTransitionMutation) OldRoles(ctx context.Context) (v []string, err error)
OldRoles returns the old "roles" field's value of the WorkflowTransition entity. If the WorkflowTransition object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowTransitionMutation) OldToState ¶
func (m *WorkflowTransitionMutation) OldToState(ctx context.Context) (v string, err error)
OldToState returns the old "to_state" field's value of the WorkflowTransition entity. If the WorkflowTransition object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowTransitionMutation) OldWeight ¶
func (m *WorkflowTransitionMutation) OldWeight(ctx context.Context) (v int, err error)
OldWeight returns the old "weight" field's value of the WorkflowTransition entity. If the WorkflowTransition object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*WorkflowTransitionMutation) Op ¶
func (m *WorkflowTransitionMutation) Op() Op
Op returns the operation name.
func (*WorkflowTransitionMutation) RemovedEdges ¶
func (m *WorkflowTransitionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkflowTransitionMutation) RemovedIDs ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) ResetComment ¶
func (m *WorkflowTransitionMutation) ResetComment()
ResetComment resets all changes to the "comment" field.
func (*WorkflowTransitionMutation) ResetEdge ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) ResetField ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) ResetFromStates ¶
func (m *WorkflowTransitionMutation) ResetFromStates()
ResetFromStates resets all changes to the "from_states" field.
func (*WorkflowTransitionMutation) ResetLabel ¶
func (m *WorkflowTransitionMutation) ResetLabel()
ResetLabel resets all changes to the "label" field.
func (*WorkflowTransitionMutation) ResetRoles ¶
func (m *WorkflowTransitionMutation) ResetRoles()
ResetRoles resets all changes to the "roles" field.
func (*WorkflowTransitionMutation) ResetToState ¶
func (m *WorkflowTransitionMutation) ResetToState()
ResetToState resets all changes to the "to_state" field.
func (*WorkflowTransitionMutation) ResetWeight ¶
func (m *WorkflowTransitionMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*WorkflowTransitionMutation) Roles ¶
func (m *WorkflowTransitionMutation) Roles() (r []string, exists bool)
Roles returns the value of the "roles" field in the mutation.
func (*WorkflowTransitionMutation) SetComment ¶
func (m *WorkflowTransitionMutation) SetComment(s string)
SetComment sets the "comment" field.
func (*WorkflowTransitionMutation) SetField ¶
func (m *WorkflowTransitionMutation) 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 (*WorkflowTransitionMutation) SetFromStates ¶
func (m *WorkflowTransitionMutation) SetFromStates(s []string)
SetFromStates sets the "from_states" field.
func (*WorkflowTransitionMutation) SetID ¶
func (m *WorkflowTransitionMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkflowTransition entities.
func (*WorkflowTransitionMutation) SetLabel ¶
func (m *WorkflowTransitionMutation) SetLabel(s string)
SetLabel sets the "label" field.
func (*WorkflowTransitionMutation) SetOp ¶
func (m *WorkflowTransitionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WorkflowTransitionMutation) SetRoles ¶
func (m *WorkflowTransitionMutation) SetRoles(s []string)
SetRoles sets the "roles" field.
func (*WorkflowTransitionMutation) SetToState ¶
func (m *WorkflowTransitionMutation) SetToState(s string)
SetToState sets the "to_state" field.
func (*WorkflowTransitionMutation) SetWeight ¶
func (m *WorkflowTransitionMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (*WorkflowTransitionMutation) ToState ¶
func (m *WorkflowTransitionMutation) ToState() (r string, exists bool)
ToState returns the value of the "to_state" field in the mutation.
func (WorkflowTransitionMutation) Tx ¶
func (m WorkflowTransitionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkflowTransitionMutation) Type ¶
func (m *WorkflowTransitionMutation) Type() string
Type returns the node type of this mutation (WorkflowTransition).
func (*WorkflowTransitionMutation) Weight ¶
func (m *WorkflowTransitionMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*WorkflowTransitionMutation) Where ¶
func (m *WorkflowTransitionMutation) Where(ps ...predicate.WorkflowTransition)
Where appends a list predicates to the WorkflowTransitionMutation builder.
func (*WorkflowTransitionMutation) WhereP ¶
func (m *WorkflowTransitionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkflowTransitionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type WorkflowTransitionQuery ¶
type WorkflowTransitionQuery struct {
// contains filtered or unexported fields
}
WorkflowTransitionQuery is the builder for querying WorkflowTransition entities.
func (*WorkflowTransitionQuery) Aggregate ¶
func (_q *WorkflowTransitionQuery) Aggregate(fns ...AggregateFunc) *WorkflowTransitionSelect
Aggregate returns a WorkflowTransitionSelect configured with the given aggregations.
func (*WorkflowTransitionQuery) All ¶
func (_q *WorkflowTransitionQuery) All(ctx context.Context) ([]*WorkflowTransition, error)
All executes the query and returns a list of WorkflowTransitions.
func (*WorkflowTransitionQuery) AllX ¶
func (_q *WorkflowTransitionQuery) AllX(ctx context.Context) []*WorkflowTransition
AllX is like All, but panics if an error occurs.
func (*WorkflowTransitionQuery) Clone ¶
func (_q *WorkflowTransitionQuery) Clone() *WorkflowTransitionQuery
Clone returns a duplicate of the WorkflowTransitionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkflowTransitionQuery) Count ¶
func (_q *WorkflowTransitionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkflowTransitionQuery) CountX ¶
func (_q *WorkflowTransitionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkflowTransitionQuery) Exist ¶
func (_q *WorkflowTransitionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkflowTransitionQuery) ExistX ¶
func (_q *WorkflowTransitionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkflowTransitionQuery) First ¶
func (_q *WorkflowTransitionQuery) First(ctx context.Context) (*WorkflowTransition, error)
First returns the first WorkflowTransition entity from the query. Returns a *NotFoundError when no WorkflowTransition was found.
func (*WorkflowTransitionQuery) FirstID ¶
func (_q *WorkflowTransitionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first WorkflowTransition ID from the query. Returns a *NotFoundError when no WorkflowTransition ID was found.
func (*WorkflowTransitionQuery) FirstIDX ¶
func (_q *WorkflowTransitionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkflowTransitionQuery) FirstX ¶
func (_q *WorkflowTransitionQuery) FirstX(ctx context.Context) *WorkflowTransition
FirstX is like First, but panics if an error occurs.
func (*WorkflowTransitionQuery) GroupBy ¶
func (_q *WorkflowTransitionQuery) GroupBy(field string, fields ...string) *WorkflowTransitionGroupBy
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 {
FromStates []string `json:"from_states,omitempty"`
Count int `json:"count,omitempty"`
}
client.WorkflowTransition.Query().
GroupBy(workflowtransition.FieldFromStates).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*WorkflowTransitionQuery) IDs ¶
func (_q *WorkflowTransitionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of WorkflowTransition IDs.
func (*WorkflowTransitionQuery) IDsX ¶
func (_q *WorkflowTransitionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*WorkflowTransitionQuery) Limit ¶
func (_q *WorkflowTransitionQuery) Limit(limit int) *WorkflowTransitionQuery
Limit the number of records to be returned by this query.
func (*WorkflowTransitionQuery) Offset ¶
func (_q *WorkflowTransitionQuery) Offset(offset int) *WorkflowTransitionQuery
Offset to start from.
func (*WorkflowTransitionQuery) Only ¶
func (_q *WorkflowTransitionQuery) Only(ctx context.Context) (*WorkflowTransition, error)
Only returns a single WorkflowTransition entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkflowTransition entity is found. Returns a *NotFoundError when no WorkflowTransition entities are found.
func (*WorkflowTransitionQuery) OnlyID ¶
func (_q *WorkflowTransitionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only WorkflowTransition ID in the query. Returns a *NotSingularError when more than one WorkflowTransition ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkflowTransitionQuery) OnlyIDX ¶
func (_q *WorkflowTransitionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkflowTransitionQuery) OnlyX ¶
func (_q *WorkflowTransitionQuery) OnlyX(ctx context.Context) *WorkflowTransition
OnlyX is like Only, but panics if an error occurs.
func (*WorkflowTransitionQuery) Order ¶
func (_q *WorkflowTransitionQuery) Order(o ...workflowtransition.OrderOption) *WorkflowTransitionQuery
Order specifies how the records should be ordered.
func (*WorkflowTransitionQuery) Select ¶
func (_q *WorkflowTransitionQuery) Select(fields ...string) *WorkflowTransitionSelect
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 {
FromStates []string `json:"from_states,omitempty"`
}
client.WorkflowTransition.Query().
Select(workflowtransition.FieldFromStates).
Scan(ctx, &v)
func (*WorkflowTransitionQuery) Unique ¶
func (_q *WorkflowTransitionQuery) Unique(unique bool) *WorkflowTransitionQuery
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 (*WorkflowTransitionQuery) Where ¶
func (_q *WorkflowTransitionQuery) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionQuery
Where adds a new predicate for the WorkflowTransitionQuery builder.
type WorkflowTransitionSelect ¶
type WorkflowTransitionSelect struct {
*WorkflowTransitionQuery
// contains filtered or unexported fields
}
WorkflowTransitionSelect is the builder for selecting fields of WorkflowTransition entities.
func (*WorkflowTransitionSelect) Aggregate ¶
func (_s *WorkflowTransitionSelect) Aggregate(fns ...AggregateFunc) *WorkflowTransitionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkflowTransitionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*WorkflowTransitionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkflowTransitionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkflowTransitionSelect) Scan ¶
func (_s *WorkflowTransitionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkflowTransitionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkflowTransitionUpdate ¶
type WorkflowTransitionUpdate struct {
// contains filtered or unexported fields
}
WorkflowTransitionUpdate is the builder for updating WorkflowTransition entities.
func (*WorkflowTransitionUpdate) AddWeight ¶
func (_u *WorkflowTransitionUpdate) AddWeight(v int) *WorkflowTransitionUpdate
AddWeight adds value to the "weight" field.
func (*WorkflowTransitionUpdate) AppendFromStates ¶
func (_u *WorkflowTransitionUpdate) AppendFromStates(v []string) *WorkflowTransitionUpdate
AppendFromStates appends value to the "from_states" field.
func (*WorkflowTransitionUpdate) AppendRoles ¶
func (_u *WorkflowTransitionUpdate) AppendRoles(v []string) *WorkflowTransitionUpdate
AppendRoles appends value to the "roles" field.
func (*WorkflowTransitionUpdate) Exec ¶
func (_u *WorkflowTransitionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkflowTransitionUpdate) ExecX ¶
func (_u *WorkflowTransitionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowTransitionUpdate) Mutation ¶
func (_u *WorkflowTransitionUpdate) Mutation() *WorkflowTransitionMutation
Mutation returns the WorkflowTransitionMutation object of the builder.
func (*WorkflowTransitionUpdate) Save ¶
func (_u *WorkflowTransitionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkflowTransitionUpdate) SaveX ¶
func (_u *WorkflowTransitionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkflowTransitionUpdate) SetComment ¶
func (_u *WorkflowTransitionUpdate) SetComment(v string) *WorkflowTransitionUpdate
SetComment sets the "comment" field.
func (*WorkflowTransitionUpdate) SetFromStates ¶
func (_u *WorkflowTransitionUpdate) SetFromStates(v []string) *WorkflowTransitionUpdate
SetFromStates sets the "from_states" field.
func (*WorkflowTransitionUpdate) SetLabel ¶
func (_u *WorkflowTransitionUpdate) SetLabel(v string) *WorkflowTransitionUpdate
SetLabel sets the "label" field.
func (*WorkflowTransitionUpdate) SetNillableComment ¶
func (_u *WorkflowTransitionUpdate) SetNillableComment(v *string) *WorkflowTransitionUpdate
SetNillableComment sets the "comment" field if the given value is not nil.
func (*WorkflowTransitionUpdate) SetNillableLabel ¶
func (_u *WorkflowTransitionUpdate) SetNillableLabel(v *string) *WorkflowTransitionUpdate
SetNillableLabel sets the "label" field if the given value is not nil.
func (*WorkflowTransitionUpdate) SetNillableToState ¶
func (_u *WorkflowTransitionUpdate) SetNillableToState(v *string) *WorkflowTransitionUpdate
SetNillableToState sets the "to_state" field if the given value is not nil.
func (*WorkflowTransitionUpdate) SetNillableWeight ¶
func (_u *WorkflowTransitionUpdate) SetNillableWeight(v *int) *WorkflowTransitionUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*WorkflowTransitionUpdate) SetRoles ¶
func (_u *WorkflowTransitionUpdate) SetRoles(v []string) *WorkflowTransitionUpdate
SetRoles sets the "roles" field.
func (*WorkflowTransitionUpdate) SetToState ¶
func (_u *WorkflowTransitionUpdate) SetToState(v string) *WorkflowTransitionUpdate
SetToState sets the "to_state" field.
func (*WorkflowTransitionUpdate) SetWeight ¶
func (_u *WorkflowTransitionUpdate) SetWeight(v int) *WorkflowTransitionUpdate
SetWeight sets the "weight" field.
func (*WorkflowTransitionUpdate) Where ¶
func (_u *WorkflowTransitionUpdate) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionUpdate
Where appends a list predicates to the WorkflowTransitionUpdate builder.
type WorkflowTransitionUpdateOne ¶
type WorkflowTransitionUpdateOne struct {
// contains filtered or unexported fields
}
WorkflowTransitionUpdateOne is the builder for updating a single WorkflowTransition entity.
func (*WorkflowTransitionUpdateOne) AddWeight ¶
func (_u *WorkflowTransitionUpdateOne) AddWeight(v int) *WorkflowTransitionUpdateOne
AddWeight adds value to the "weight" field.
func (*WorkflowTransitionUpdateOne) AppendFromStates ¶
func (_u *WorkflowTransitionUpdateOne) AppendFromStates(v []string) *WorkflowTransitionUpdateOne
AppendFromStates appends value to the "from_states" field.
func (*WorkflowTransitionUpdateOne) AppendRoles ¶
func (_u *WorkflowTransitionUpdateOne) AppendRoles(v []string) *WorkflowTransitionUpdateOne
AppendRoles appends value to the "roles" field.
func (*WorkflowTransitionUpdateOne) Exec ¶
func (_u *WorkflowTransitionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkflowTransitionUpdateOne) ExecX ¶
func (_u *WorkflowTransitionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkflowTransitionUpdateOne) Mutation ¶
func (_u *WorkflowTransitionUpdateOne) Mutation() *WorkflowTransitionMutation
Mutation returns the WorkflowTransitionMutation object of the builder.
func (*WorkflowTransitionUpdateOne) Save ¶
func (_u *WorkflowTransitionUpdateOne) Save(ctx context.Context) (*WorkflowTransition, error)
Save executes the query and returns the updated WorkflowTransition entity.
func (*WorkflowTransitionUpdateOne) SaveX ¶
func (_u *WorkflowTransitionUpdateOne) SaveX(ctx context.Context) *WorkflowTransition
SaveX is like Save, but panics if an error occurs.
func (*WorkflowTransitionUpdateOne) Select ¶
func (_u *WorkflowTransitionUpdateOne) Select(field string, fields ...string) *WorkflowTransitionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkflowTransitionUpdateOne) SetComment ¶
func (_u *WorkflowTransitionUpdateOne) SetComment(v string) *WorkflowTransitionUpdateOne
SetComment sets the "comment" field.
func (*WorkflowTransitionUpdateOne) SetFromStates ¶
func (_u *WorkflowTransitionUpdateOne) SetFromStates(v []string) *WorkflowTransitionUpdateOne
SetFromStates sets the "from_states" field.
func (*WorkflowTransitionUpdateOne) SetLabel ¶
func (_u *WorkflowTransitionUpdateOne) SetLabel(v string) *WorkflowTransitionUpdateOne
SetLabel sets the "label" field.
func (*WorkflowTransitionUpdateOne) SetNillableComment ¶
func (_u *WorkflowTransitionUpdateOne) SetNillableComment(v *string) *WorkflowTransitionUpdateOne
SetNillableComment sets the "comment" field if the given value is not nil.
func (*WorkflowTransitionUpdateOne) SetNillableLabel ¶
func (_u *WorkflowTransitionUpdateOne) SetNillableLabel(v *string) *WorkflowTransitionUpdateOne
SetNillableLabel sets the "label" field if the given value is not nil.
func (*WorkflowTransitionUpdateOne) SetNillableToState ¶
func (_u *WorkflowTransitionUpdateOne) SetNillableToState(v *string) *WorkflowTransitionUpdateOne
SetNillableToState sets the "to_state" field if the given value is not nil.
func (*WorkflowTransitionUpdateOne) SetNillableWeight ¶
func (_u *WorkflowTransitionUpdateOne) SetNillableWeight(v *int) *WorkflowTransitionUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*WorkflowTransitionUpdateOne) SetRoles ¶
func (_u *WorkflowTransitionUpdateOne) SetRoles(v []string) *WorkflowTransitionUpdateOne
SetRoles sets the "roles" field.
func (*WorkflowTransitionUpdateOne) SetToState ¶
func (_u *WorkflowTransitionUpdateOne) SetToState(v string) *WorkflowTransitionUpdateOne
SetToState sets the "to_state" field.
func (*WorkflowTransitionUpdateOne) SetWeight ¶
func (_u *WorkflowTransitionUpdateOne) SetWeight(v int) *WorkflowTransitionUpdateOne
SetWeight sets the "weight" field.
func (*WorkflowTransitionUpdateOne) Where ¶
func (_u *WorkflowTransitionUpdateOne) Where(ps ...predicate.WorkflowTransition) *WorkflowTransitionUpdateOne
Where appends a list predicates to the WorkflowTransitionUpdate builder.
type WorkflowTransitions ¶
type WorkflowTransitions []*WorkflowTransition
WorkflowTransitions is a parsable slice of WorkflowTransition.
Source Files
¶
- client.go
- ent.go
- history.go
- history_create.go
- history_delete.go
- history_query.go
- history_update.go
- lock.go
- lock_create.go
- lock_delete.go
- lock_query.go
- lock_update.go
- mutation.go
- node.go
- node_create.go
- node_delete.go
- node_query.go
- node_update.go
- nodestate.go
- nodestate_create.go
- nodestate_delete.go
- nodestate_query.go
- nodestate_update.go
- runtime.go
- tx.go
- workflowsettings.go
- workflowsettings_create.go
- workflowsettings_delete.go
- workflowsettings_query.go
- workflowsettings_update.go
- workflowstate.go
- workflowstate_create.go
- workflowstate_delete.go
- workflowstate_query.go
- workflowstate_update.go
- workflowtransition.go
- workflowtransition_create.go
- workflowtransition_delete.go
- workflowtransition_query.go
- workflowtransition_update.go