Documentation ¶
Index ¶
- Constants
- 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 Agent
- type AgentClient
- func (c *AgentClient) Create() *AgentCreate
- func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk
- func (c *AgentClient) Delete() *AgentDelete
- func (c *AgentClient) DeleteOne(a *Agent) *AgentDeleteOne
- func (c *AgentClient) DeleteOneID(id uuid.UUID) *AgentDeleteOne
- func (c *AgentClient) Get(ctx context.Context, id uuid.UUID) (*Agent, error)
- func (c *AgentClient) GetX(ctx context.Context, id uuid.UUID) *Agent
- func (c *AgentClient) Hooks() []Hook
- func (c *AgentClient) Intercept(interceptors ...Interceptor)
- func (c *AgentClient) Interceptors() []Interceptor
- func (c *AgentClient) Query() *AgentQuery
- func (c *AgentClient) Update() *AgentUpdate
- func (c *AgentClient) UpdateOne(a *Agent) *AgentUpdateOne
- func (c *AgentClient) UpdateOneID(id uuid.UUID) *AgentUpdateOne
- func (c *AgentClient) Use(hooks ...Hook)
- type AgentCreate
- func (ac *AgentCreate) Exec(ctx context.Context) error
- func (ac *AgentCreate) ExecX(ctx context.Context)
- func (ac *AgentCreate) Mutation() *AgentMutation
- func (ac *AgentCreate) Save(ctx context.Context) (*Agent, error)
- func (ac *AgentCreate) SaveX(ctx context.Context) *Agent
- func (ac *AgentCreate) SetActive(b bool) *AgentCreate
- func (ac *AgentCreate) SetID(u uuid.UUID) *AgentCreate
- func (ac *AgentCreate) SetLastUpdateTime(t time.Time) *AgentCreate
- func (ac *AgentCreate) SetNillableActive(b *bool) *AgentCreate
- func (ac *AgentCreate) SetNillableID(u *uuid.UUID) *AgentCreate
- func (ac *AgentCreate) SetNillableLastUpdateTime(t *time.Time) *AgentCreate
- func (ac *AgentCreate) SetPeerID(s string) *AgentCreate
- type AgentCreateBulk
- type AgentDelete
- type AgentDeleteOne
- type AgentGroupBy
- func (agb *AgentGroupBy) Aggregate(fns ...AggregateFunc) *AgentGroupBy
- func (s *AgentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgentGroupBy) BoolX(ctx context.Context) bool
- func (s *AgentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AgentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AgentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgentGroupBy) Float64X(ctx context.Context) float64
- func (s *AgentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AgentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AgentGroupBy) IntX(ctx context.Context) int
- func (s *AgentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AgentGroupBy) IntsX(ctx context.Context) []int
- func (agb *AgentGroupBy) Scan(ctx context.Context, v any) error
- func (s *AgentGroupBy) ScanX(ctx context.Context, v any)
- func (s *AgentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AgentGroupBy) StringX(ctx context.Context) string
- func (s *AgentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AgentGroupBy) StringsX(ctx context.Context) []string
- type AgentMutation
- func (m *AgentMutation) Active() (r bool, exists bool)
- func (m *AgentMutation) AddField(name string, value ent.Value) error
- func (m *AgentMutation) AddedEdges() []string
- func (m *AgentMutation) AddedField(name string) (ent.Value, bool)
- func (m *AgentMutation) AddedFields() []string
- func (m *AgentMutation) AddedIDs(name string) []ent.Value
- func (m *AgentMutation) ClearEdge(name string) error
- func (m *AgentMutation) ClearField(name string) error
- func (m *AgentMutation) ClearedEdges() []string
- func (m *AgentMutation) ClearedFields() []string
- func (m AgentMutation) Client() *Client
- func (m *AgentMutation) EdgeCleared(name string) bool
- func (m *AgentMutation) Field(name string) (ent.Value, bool)
- func (m *AgentMutation) FieldCleared(name string) bool
- func (m *AgentMutation) Fields() []string
- func (m *AgentMutation) ID() (id uuid.UUID, exists bool)
- func (m *AgentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AgentMutation) LastUpdateTime() (r time.Time, exists bool)
- func (m *AgentMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *AgentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AgentMutation) OldLastUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *AgentMutation) OldPeerID(ctx context.Context) (v string, err error)
- func (m *AgentMutation) Op() Op
- func (m *AgentMutation) PeerID() (r string, exists bool)
- func (m *AgentMutation) RemovedEdges() []string
- func (m *AgentMutation) RemovedIDs(name string) []ent.Value
- func (m *AgentMutation) ResetActive()
- func (m *AgentMutation) ResetEdge(name string) error
- func (m *AgentMutation) ResetField(name string) error
- func (m *AgentMutation) ResetLastUpdateTime()
- func (m *AgentMutation) ResetPeerID()
- func (m *AgentMutation) SetActive(b bool)
- func (m *AgentMutation) SetField(name string, value ent.Value) error
- func (m *AgentMutation) SetID(id uuid.UUID)
- func (m *AgentMutation) SetLastUpdateTime(t time.Time)
- func (m *AgentMutation) SetOp(op Op)
- func (m *AgentMutation) SetPeerID(s string)
- func (m AgentMutation) Tx() (*Tx, error)
- func (m *AgentMutation) Type() string
- func (m *AgentMutation) Where(ps ...predicate.Agent)
- func (m *AgentMutation) WhereP(ps ...func(*sql.Selector))
- type AgentQuery
- func (aq *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
- func (aq *AgentQuery) All(ctx context.Context) ([]*Agent, error)
- func (aq *AgentQuery) AllX(ctx context.Context) []*Agent
- func (aq *AgentQuery) Clone() *AgentQuery
- func (aq *AgentQuery) Count(ctx context.Context) (int, error)
- func (aq *AgentQuery) CountX(ctx context.Context) int
- func (aq *AgentQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AgentQuery) ExistX(ctx context.Context) bool
- func (aq *AgentQuery) First(ctx context.Context) (*Agent, error)
- func (aq *AgentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AgentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (aq *AgentQuery) FirstX(ctx context.Context) *Agent
- func (aq *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy
- func (aq *AgentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (aq *AgentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AgentQuery) Limit(limit int) *AgentQuery
- func (aq *AgentQuery) Offset(offset int) *AgentQuery
- func (aq *AgentQuery) Only(ctx context.Context) (*Agent, error)
- func (aq *AgentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AgentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (aq *AgentQuery) OnlyX(ctx context.Context) *Agent
- func (aq *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
- func (aq *AgentQuery) Select(fields ...string) *AgentSelect
- func (aq *AgentQuery) Unique(unique bool) *AgentQuery
- func (aq *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery
- type AgentSelect
- func (as *AgentSelect) Aggregate(fns ...AggregateFunc) *AgentSelect
- func (s *AgentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgentSelect) BoolX(ctx context.Context) bool
- func (s *AgentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AgentSelect) BoolsX(ctx context.Context) []bool
- func (s *AgentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgentSelect) Float64X(ctx context.Context) float64
- func (s *AgentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgentSelect) Float64sX(ctx context.Context) []float64
- func (s *AgentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AgentSelect) IntX(ctx context.Context) int
- func (s *AgentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AgentSelect) IntsX(ctx context.Context) []int
- func (as *AgentSelect) Scan(ctx context.Context, v any) error
- func (s *AgentSelect) ScanX(ctx context.Context, v any)
- func (s *AgentSelect) String(ctx context.Context) (_ string, err error)
- func (s *AgentSelect) StringX(ctx context.Context) string
- func (s *AgentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AgentSelect) StringsX(ctx context.Context) []string
- type AgentUpdate
- func (au *AgentUpdate) Exec(ctx context.Context) error
- func (au *AgentUpdate) ExecX(ctx context.Context)
- func (au *AgentUpdate) Mutation() *AgentMutation
- func (au *AgentUpdate) Save(ctx context.Context) (int, error)
- func (au *AgentUpdate) SaveX(ctx context.Context) int
- func (au *AgentUpdate) SetActive(b bool) *AgentUpdate
- func (au *AgentUpdate) SetLastUpdateTime(t time.Time) *AgentUpdate
- func (au *AgentUpdate) SetNillableActive(b *bool) *AgentUpdate
- func (au *AgentUpdate) SetPeerID(s string) *AgentUpdate
- func (au *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate
- type AgentUpdateOne
- func (auo *AgentUpdateOne) Exec(ctx context.Context) error
- func (auo *AgentUpdateOne) ExecX(ctx context.Context)
- func (auo *AgentUpdateOne) Mutation() *AgentMutation
- func (auo *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
- func (auo *AgentUpdateOne) SaveX(ctx context.Context) *Agent
- func (auo *AgentUpdateOne) Select(field string, fields ...string) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetActive(b bool) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetLastUpdateTime(t time.Time) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetNillableActive(b *bool) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetPeerID(s string) *AgentUpdateOne
- func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne
- type Agents
- 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 ComputeImage
- type ComputeImageClient
- func (c *ComputeImageClient) Create() *ComputeImageCreate
- func (c *ComputeImageClient) CreateBulk(builders ...*ComputeImageCreate) *ComputeImageCreateBulk
- func (c *ComputeImageClient) Delete() *ComputeImageDelete
- func (c *ComputeImageClient) DeleteOne(ci *ComputeImage) *ComputeImageDeleteOne
- func (c *ComputeImageClient) DeleteOneID(id int32) *ComputeImageDeleteOne
- func (c *ComputeImageClient) Get(ctx context.Context, id int32) (*ComputeImage, error)
- func (c *ComputeImageClient) GetX(ctx context.Context, id int32) *ComputeImage
- func (c *ComputeImageClient) Hooks() []Hook
- func (c *ComputeImageClient) Intercept(interceptors ...Interceptor)
- func (c *ComputeImageClient) Interceptors() []Interceptor
- func (c *ComputeImageClient) Query() *ComputeImageQuery
- func (c *ComputeImageClient) Update() *ComputeImageUpdate
- func (c *ComputeImageClient) UpdateOne(ci *ComputeImage) *ComputeImageUpdateOne
- func (c *ComputeImageClient) UpdateOneID(id int32) *ComputeImageUpdateOne
- func (c *ComputeImageClient) Use(hooks ...Hook)
- type ComputeImageCreate
- func (cic *ComputeImageCreate) Exec(ctx context.Context) error
- func (cic *ComputeImageCreate) ExecX(ctx context.Context)
- func (cic *ComputeImageCreate) Mutation() *ComputeImageMutation
- func (cic *ComputeImageCreate) Save(ctx context.Context) (*ComputeImage, error)
- func (cic *ComputeImageCreate) SaveX(ctx context.Context) *ComputeImage
- func (cic *ComputeImageCreate) SetCommand(s string) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetID(i int32) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetImage(s string) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetName(s string) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetPort(i int32) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetTag(s string) *ComputeImageCreate
- type ComputeImageCreateBulk
- type ComputeImageDelete
- type ComputeImageDeleteOne
- type ComputeImageGroupBy
- func (cigb *ComputeImageGroupBy) Aggregate(fns ...AggregateFunc) *ComputeImageGroupBy
- func (s *ComputeImageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeImageGroupBy) BoolX(ctx context.Context) bool
- func (s *ComputeImageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeImageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ComputeImageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeImageGroupBy) Float64X(ctx context.Context) float64
- func (s *ComputeImageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeImageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ComputeImageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeImageGroupBy) IntX(ctx context.Context) int
- func (s *ComputeImageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeImageGroupBy) IntsX(ctx context.Context) []int
- func (cigb *ComputeImageGroupBy) Scan(ctx context.Context, v any) error
- func (s *ComputeImageGroupBy) ScanX(ctx context.Context, v any)
- func (s *ComputeImageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ComputeImageGroupBy) StringX(ctx context.Context) string
- func (s *ComputeImageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeImageGroupBy) StringsX(ctx context.Context) []string
- type ComputeImageMutation
- func (m *ComputeImageMutation) AddField(name string, value ent.Value) error
- func (m *ComputeImageMutation) AddPort(i int32)
- func (m *ComputeImageMutation) AddedEdges() []string
- func (m *ComputeImageMutation) AddedField(name string) (ent.Value, bool)
- func (m *ComputeImageMutation) AddedFields() []string
- func (m *ComputeImageMutation) AddedIDs(name string) []ent.Value
- func (m *ComputeImageMutation) AddedPort() (r int32, exists bool)
- func (m *ComputeImageMutation) ClearEdge(name string) error
- func (m *ComputeImageMutation) ClearField(name string) error
- func (m *ComputeImageMutation) ClearedEdges() []string
- func (m *ComputeImageMutation) ClearedFields() []string
- func (m ComputeImageMutation) Client() *Client
- func (m *ComputeImageMutation) Command() (r string, exists bool)
- func (m *ComputeImageMutation) EdgeCleared(name string) bool
- func (m *ComputeImageMutation) Field(name string) (ent.Value, bool)
- func (m *ComputeImageMutation) FieldCleared(name string) bool
- func (m *ComputeImageMutation) Fields() []string
- func (m *ComputeImageMutation) ID() (id int32, exists bool)
- func (m *ComputeImageMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ComputeImageMutation) Image() (r string, exists bool)
- func (m *ComputeImageMutation) Name() (r string, exists bool)
- func (m *ComputeImageMutation) OldCommand(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeImageMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldPort(ctx context.Context) (v int32, err error)
- func (m *ComputeImageMutation) OldTag(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) Op() Op
- func (m *ComputeImageMutation) Port() (r int32, exists bool)
- func (m *ComputeImageMutation) RemovedEdges() []string
- func (m *ComputeImageMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeImageMutation) ResetCommand()
- func (m *ComputeImageMutation) ResetEdge(name string) error
- func (m *ComputeImageMutation) ResetField(name string) error
- func (m *ComputeImageMutation) ResetImage()
- func (m *ComputeImageMutation) ResetName()
- func (m *ComputeImageMutation) ResetPort()
- func (m *ComputeImageMutation) ResetTag()
- func (m *ComputeImageMutation) SetCommand(s string)
- func (m *ComputeImageMutation) SetField(name string, value ent.Value) error
- func (m *ComputeImageMutation) SetID(id int32)
- func (m *ComputeImageMutation) SetImage(s string)
- func (m *ComputeImageMutation) SetName(s string)
- func (m *ComputeImageMutation) SetOp(op Op)
- func (m *ComputeImageMutation) SetPort(i int32)
- func (m *ComputeImageMutation) SetTag(s string)
- func (m *ComputeImageMutation) Tag() (r string, exists bool)
- func (m ComputeImageMutation) Tx() (*Tx, error)
- func (m *ComputeImageMutation) Type() string
- func (m *ComputeImageMutation) Where(ps ...predicate.ComputeImage)
- func (m *ComputeImageMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeImageQuery
- func (ciq *ComputeImageQuery) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
- func (ciq *ComputeImageQuery) All(ctx context.Context) ([]*ComputeImage, error)
- func (ciq *ComputeImageQuery) AllX(ctx context.Context) []*ComputeImage
- func (ciq *ComputeImageQuery) Clone() *ComputeImageQuery
- func (ciq *ComputeImageQuery) Count(ctx context.Context) (int, error)
- func (ciq *ComputeImageQuery) CountX(ctx context.Context) int
- func (ciq *ComputeImageQuery) Exist(ctx context.Context) (bool, error)
- func (ciq *ComputeImageQuery) ExistX(ctx context.Context) bool
- func (ciq *ComputeImageQuery) First(ctx context.Context) (*ComputeImage, error)
- func (ciq *ComputeImageQuery) FirstID(ctx context.Context) (id int32, err error)
- func (ciq *ComputeImageQuery) FirstIDX(ctx context.Context) int32
- func (ciq *ComputeImageQuery) FirstX(ctx context.Context) *ComputeImage
- func (ciq *ComputeImageQuery) GroupBy(field string, fields ...string) *ComputeImageGroupBy
- func (ciq *ComputeImageQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (ciq *ComputeImageQuery) IDsX(ctx context.Context) []int32
- func (ciq *ComputeImageQuery) Limit(limit int) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Offset(offset int) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Only(ctx context.Context) (*ComputeImage, error)
- func (ciq *ComputeImageQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (ciq *ComputeImageQuery) OnlyIDX(ctx context.Context) int32
- func (ciq *ComputeImageQuery) OnlyX(ctx context.Context) *ComputeImage
- func (ciq *ComputeImageQuery) Order(o ...computeimage.OrderOption) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Select(fields ...string) *ComputeImageSelect
- func (ciq *ComputeImageQuery) Unique(unique bool) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Where(ps ...predicate.ComputeImage) *ComputeImageQuery
- type ComputeImageSelect
- func (cis *ComputeImageSelect) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
- func (s *ComputeImageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeImageSelect) BoolX(ctx context.Context) bool
- func (s *ComputeImageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeImageSelect) BoolsX(ctx context.Context) []bool
- func (s *ComputeImageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeImageSelect) Float64X(ctx context.Context) float64
- func (s *ComputeImageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeImageSelect) Float64sX(ctx context.Context) []float64
- func (s *ComputeImageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeImageSelect) IntX(ctx context.Context) int
- func (s *ComputeImageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeImageSelect) IntsX(ctx context.Context) []int
- func (cis *ComputeImageSelect) Scan(ctx context.Context, v any) error
- func (s *ComputeImageSelect) ScanX(ctx context.Context, v any)
- func (s *ComputeImageSelect) String(ctx context.Context) (_ string, err error)
- func (s *ComputeImageSelect) StringX(ctx context.Context) string
- func (s *ComputeImageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeImageSelect) StringsX(ctx context.Context) []string
- type ComputeImageUpdate
- func (ciu *ComputeImageUpdate) AddPort(i int32) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) Exec(ctx context.Context) error
- func (ciu *ComputeImageUpdate) ExecX(ctx context.Context)
- func (ciu *ComputeImageUpdate) Mutation() *ComputeImageMutation
- func (ciu *ComputeImageUpdate) Save(ctx context.Context) (int, error)
- func (ciu *ComputeImageUpdate) SaveX(ctx context.Context) int
- func (ciu *ComputeImageUpdate) SetCommand(s string) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) SetImage(s string) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) SetName(s string) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) SetPort(i int32) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) SetTag(s string) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) Where(ps ...predicate.ComputeImage) *ComputeImageUpdate
- type ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) AddPort(i int32) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) Exec(ctx context.Context) error
- func (ciuo *ComputeImageUpdateOne) ExecX(ctx context.Context)
- func (ciuo *ComputeImageUpdateOne) Mutation() *ComputeImageMutation
- func (ciuo *ComputeImageUpdateOne) Save(ctx context.Context) (*ComputeImage, error)
- func (ciuo *ComputeImageUpdateOne) SaveX(ctx context.Context) *ComputeImage
- func (ciuo *ComputeImageUpdateOne) Select(field string, fields ...string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetCommand(s string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetImage(s string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetName(s string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetPort(i int32) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetTag(s string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) Where(ps ...predicate.ComputeImage) *ComputeImageUpdateOne
- type ComputeImages
- type ComputeInstance
- type ComputeInstanceClient
- func (c *ComputeInstanceClient) Create() *ComputeInstanceCreate
- func (c *ComputeInstanceClient) CreateBulk(builders ...*ComputeInstanceCreate) *ComputeInstanceCreateBulk
- func (c *ComputeInstanceClient) Delete() *ComputeInstanceDelete
- func (c *ComputeInstanceClient) DeleteOne(ci *ComputeInstance) *ComputeInstanceDeleteOne
- func (c *ComputeInstanceClient) DeleteOneID(id uuid.UUID) *ComputeInstanceDeleteOne
- func (c *ComputeInstanceClient) Get(ctx context.Context, id uuid.UUID) (*ComputeInstance, error)
- func (c *ComputeInstanceClient) GetX(ctx context.Context, id uuid.UUID) *ComputeInstance
- func (c *ComputeInstanceClient) Hooks() []Hook
- func (c *ComputeInstanceClient) Intercept(interceptors ...Interceptor)
- func (c *ComputeInstanceClient) Interceptors() []Interceptor
- func (c *ComputeInstanceClient) Query() *ComputeInstanceQuery
- func (c *ComputeInstanceClient) Update() *ComputeInstanceUpdate
- func (c *ComputeInstanceClient) UpdateOne(ci *ComputeInstance) *ComputeInstanceUpdateOne
- func (c *ComputeInstanceClient) UpdateOneID(id uuid.UUID) *ComputeInstanceUpdateOne
- func (c *ComputeInstanceClient) Use(hooks ...Hook)
- type ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) Exec(ctx context.Context) error
- func (cic *ComputeInstanceCreate) ExecX(ctx context.Context)
- func (cic *ComputeInstanceCreate) Mutation() *ComputeInstanceMutation
- func (cic *ComputeInstanceCreate) Save(ctx context.Context) (*ComputeInstance, error)
- func (cic *ComputeInstanceCreate) SaveX(ctx context.Context) *ComputeInstance
- func (cic *ComputeInstanceCreate) SetCommand(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetContainerID(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetCore(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetExpirationTime(t time.Time) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetID(u uuid.UUID) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetImage(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetMemory(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetName(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillableCommand(s *string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillableContainerID(s *string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillableID(u *uuid.UUID) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillablePeerID(s *string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillablePort(s *string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetOwner(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetPeerID(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetPort(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetStatus(i int8) *ComputeInstanceCreate
- type ComputeInstanceCreateBulk
- func (cicb *ComputeInstanceCreateBulk) Exec(ctx context.Context) error
- func (cicb *ComputeInstanceCreateBulk) ExecX(ctx context.Context)
- func (cicb *ComputeInstanceCreateBulk) Save(ctx context.Context) ([]*ComputeInstance, error)
- func (cicb *ComputeInstanceCreateBulk) SaveX(ctx context.Context) []*ComputeInstance
- type ComputeInstanceDelete
- type ComputeInstanceDeleteOne
- type ComputeInstanceGroupBy
- func (cigb *ComputeInstanceGroupBy) Aggregate(fns ...AggregateFunc) *ComputeInstanceGroupBy
- func (s *ComputeInstanceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeInstanceGroupBy) BoolX(ctx context.Context) bool
- func (s *ComputeInstanceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeInstanceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ComputeInstanceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeInstanceGroupBy) Float64X(ctx context.Context) float64
- func (s *ComputeInstanceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeInstanceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ComputeInstanceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeInstanceGroupBy) IntX(ctx context.Context) int
- func (s *ComputeInstanceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeInstanceGroupBy) IntsX(ctx context.Context) []int
- func (cigb *ComputeInstanceGroupBy) Scan(ctx context.Context, v any) error
- func (s *ComputeInstanceGroupBy) ScanX(ctx context.Context, v any)
- func (s *ComputeInstanceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ComputeInstanceGroupBy) StringX(ctx context.Context) string
- func (s *ComputeInstanceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeInstanceGroupBy) StringsX(ctx context.Context) []string
- type ComputeInstanceMutation
- func (m *ComputeInstanceMutation) AddField(name string, value ent.Value) error
- func (m *ComputeInstanceMutation) AddStatus(i int8)
- func (m *ComputeInstanceMutation) AddedEdges() []string
- func (m *ComputeInstanceMutation) AddedField(name string) (ent.Value, bool)
- func (m *ComputeInstanceMutation) AddedFields() []string
- func (m *ComputeInstanceMutation) AddedIDs(name string) []ent.Value
- func (m *ComputeInstanceMutation) AddedStatus() (r int8, exists bool)
- func (m *ComputeInstanceMutation) ClearCommand()
- func (m *ComputeInstanceMutation) ClearContainerID()
- func (m *ComputeInstanceMutation) ClearEdge(name string) error
- func (m *ComputeInstanceMutation) ClearField(name string) error
- func (m *ComputeInstanceMutation) ClearPeerID()
- func (m *ComputeInstanceMutation) ClearPort()
- func (m *ComputeInstanceMutation) ClearedEdges() []string
- func (m *ComputeInstanceMutation) ClearedFields() []string
- func (m ComputeInstanceMutation) Client() *Client
- func (m *ComputeInstanceMutation) Command() (r string, exists bool)
- func (m *ComputeInstanceMutation) CommandCleared() bool
- func (m *ComputeInstanceMutation) ContainerID() (r string, exists bool)
- func (m *ComputeInstanceMutation) ContainerIDCleared() bool
- func (m *ComputeInstanceMutation) Core() (r string, exists bool)
- func (m *ComputeInstanceMutation) EdgeCleared(name string) bool
- func (m *ComputeInstanceMutation) ExpirationTime() (r time.Time, exists bool)
- func (m *ComputeInstanceMutation) Field(name string) (ent.Value, bool)
- func (m *ComputeInstanceMutation) FieldCleared(name string) bool
- func (m *ComputeInstanceMutation) Fields() []string
- func (m *ComputeInstanceMutation) ID() (id uuid.UUID, exists bool)
- func (m *ComputeInstanceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ComputeInstanceMutation) Image() (r string, exists bool)
- func (m *ComputeInstanceMutation) Memory() (r string, exists bool)
- func (m *ComputeInstanceMutation) Name() (r string, exists bool)
- func (m *ComputeInstanceMutation) OldCommand(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldContainerID(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldCore(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldExpirationTime(ctx context.Context) (v time.Time, err error)
- func (m *ComputeInstanceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeInstanceMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldMemory(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldOwner(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldPeerID(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldPort(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldStatus(ctx context.Context) (v int8, err error)
- func (m *ComputeInstanceMutation) Op() Op
- func (m *ComputeInstanceMutation) Owner() (r string, exists bool)
- func (m *ComputeInstanceMutation) PeerID() (r string, exists bool)
- func (m *ComputeInstanceMutation) PeerIDCleared() bool
- func (m *ComputeInstanceMutation) Port() (r string, exists bool)
- func (m *ComputeInstanceMutation) PortCleared() bool
- func (m *ComputeInstanceMutation) RemovedEdges() []string
- func (m *ComputeInstanceMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeInstanceMutation) ResetCommand()
- func (m *ComputeInstanceMutation) ResetContainerID()
- func (m *ComputeInstanceMutation) ResetCore()
- func (m *ComputeInstanceMutation) ResetEdge(name string) error
- func (m *ComputeInstanceMutation) ResetExpirationTime()
- func (m *ComputeInstanceMutation) ResetField(name string) error
- func (m *ComputeInstanceMutation) ResetImage()
- func (m *ComputeInstanceMutation) ResetMemory()
- func (m *ComputeInstanceMutation) ResetName()
- func (m *ComputeInstanceMutation) ResetOwner()
- func (m *ComputeInstanceMutation) ResetPeerID()
- func (m *ComputeInstanceMutation) ResetPort()
- func (m *ComputeInstanceMutation) ResetStatus()
- func (m *ComputeInstanceMutation) SetCommand(s string)
- func (m *ComputeInstanceMutation) SetContainerID(s string)
- func (m *ComputeInstanceMutation) SetCore(s string)
- func (m *ComputeInstanceMutation) SetExpirationTime(t time.Time)
- func (m *ComputeInstanceMutation) SetField(name string, value ent.Value) error
- func (m *ComputeInstanceMutation) SetID(id uuid.UUID)
- func (m *ComputeInstanceMutation) SetImage(s string)
- func (m *ComputeInstanceMutation) SetMemory(s string)
- func (m *ComputeInstanceMutation) SetName(s string)
- func (m *ComputeInstanceMutation) SetOp(op Op)
- func (m *ComputeInstanceMutation) SetOwner(s string)
- func (m *ComputeInstanceMutation) SetPeerID(s string)
- func (m *ComputeInstanceMutation) SetPort(s string)
- func (m *ComputeInstanceMutation) SetStatus(i int8)
- func (m *ComputeInstanceMutation) Status() (r int8, exists bool)
- func (m ComputeInstanceMutation) Tx() (*Tx, error)
- func (m *ComputeInstanceMutation) Type() string
- func (m *ComputeInstanceMutation) Where(ps ...predicate.ComputeInstance)
- func (m *ComputeInstanceMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
- func (ciq *ComputeInstanceQuery) All(ctx context.Context) ([]*ComputeInstance, error)
- func (ciq *ComputeInstanceQuery) AllX(ctx context.Context) []*ComputeInstance
- func (ciq *ComputeInstanceQuery) Clone() *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Count(ctx context.Context) (int, error)
- func (ciq *ComputeInstanceQuery) CountX(ctx context.Context) int
- func (ciq *ComputeInstanceQuery) Exist(ctx context.Context) (bool, error)
- func (ciq *ComputeInstanceQuery) ExistX(ctx context.Context) bool
- func (ciq *ComputeInstanceQuery) First(ctx context.Context) (*ComputeInstance, error)
- func (ciq *ComputeInstanceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ciq *ComputeInstanceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ciq *ComputeInstanceQuery) FirstX(ctx context.Context) *ComputeInstance
- func (ciq *ComputeInstanceQuery) GroupBy(field string, fields ...string) *ComputeInstanceGroupBy
- func (ciq *ComputeInstanceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (ciq *ComputeInstanceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ciq *ComputeInstanceQuery) Limit(limit int) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Offset(offset int) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Only(ctx context.Context) (*ComputeInstance, error)
- func (ciq *ComputeInstanceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ciq *ComputeInstanceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ciq *ComputeInstanceQuery) OnlyX(ctx context.Context) *ComputeInstance
- func (ciq *ComputeInstanceQuery) Order(o ...computeinstance.OrderOption) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Select(fields ...string) *ComputeInstanceSelect
- func (ciq *ComputeInstanceQuery) Unique(unique bool) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Where(ps ...predicate.ComputeInstance) *ComputeInstanceQuery
- type ComputeInstanceSelect
- func (cis *ComputeInstanceSelect) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
- func (s *ComputeInstanceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeInstanceSelect) BoolX(ctx context.Context) bool
- func (s *ComputeInstanceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeInstanceSelect) BoolsX(ctx context.Context) []bool
- func (s *ComputeInstanceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeInstanceSelect) Float64X(ctx context.Context) float64
- func (s *ComputeInstanceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeInstanceSelect) Float64sX(ctx context.Context) []float64
- func (s *ComputeInstanceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeInstanceSelect) IntX(ctx context.Context) int
- func (s *ComputeInstanceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeInstanceSelect) IntsX(ctx context.Context) []int
- func (cis *ComputeInstanceSelect) Scan(ctx context.Context, v any) error
- func (s *ComputeInstanceSelect) ScanX(ctx context.Context, v any)
- func (s *ComputeInstanceSelect) String(ctx context.Context) (_ string, err error)
- func (s *ComputeInstanceSelect) StringX(ctx context.Context) string
- func (s *ComputeInstanceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeInstanceSelect) StringsX(ctx context.Context) []string
- type ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) AddStatus(i int8) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) ClearCommand() *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) ClearContainerID() *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) ClearPeerID() *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) ClearPort() *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) Exec(ctx context.Context) error
- func (ciu *ComputeInstanceUpdate) ExecX(ctx context.Context)
- func (ciu *ComputeInstanceUpdate) Mutation() *ComputeInstanceMutation
- func (ciu *ComputeInstanceUpdate) Save(ctx context.Context) (int, error)
- func (ciu *ComputeInstanceUpdate) SaveX(ctx context.Context) int
- func (ciu *ComputeInstanceUpdate) SetCommand(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetContainerID(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetCore(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetExpirationTime(t time.Time) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetImage(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetMemory(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetName(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetNillableCommand(s *string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetNillableContainerID(s *string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetNillablePeerID(s *string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetNillablePort(s *string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetOwner(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetPeerID(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetPort(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetStatus(i int8) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdate
- type ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) AddStatus(i int8) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) ClearCommand() *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) ClearContainerID() *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) ClearPeerID() *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) ClearPort() *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) Exec(ctx context.Context) error
- func (ciuo *ComputeInstanceUpdateOne) ExecX(ctx context.Context)
- func (ciuo *ComputeInstanceUpdateOne) Mutation() *ComputeInstanceMutation
- func (ciuo *ComputeInstanceUpdateOne) Save(ctx context.Context) (*ComputeInstance, error)
- func (ciuo *ComputeInstanceUpdateOne) SaveX(ctx context.Context) *ComputeInstance
- func (ciuo *ComputeInstanceUpdateOne) Select(field string, fields ...string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetCommand(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetContainerID(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetCore(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetExpirationTime(t time.Time) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetImage(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetMemory(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetName(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetNillableCommand(s *string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetNillableContainerID(s *string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetNillablePeerID(s *string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetNillablePort(s *string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetOwner(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetPeerID(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetPort(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetStatus(i int8) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdateOne
- type ComputeInstances
- type ComputeSpec
- type ComputeSpecClient
- func (c *ComputeSpecClient) Create() *ComputeSpecCreate
- func (c *ComputeSpecClient) CreateBulk(builders ...*ComputeSpecCreate) *ComputeSpecCreateBulk
- func (c *ComputeSpecClient) Delete() *ComputeSpecDelete
- func (c *ComputeSpecClient) DeleteOne(cs *ComputeSpec) *ComputeSpecDeleteOne
- func (c *ComputeSpecClient) DeleteOneID(id int32) *ComputeSpecDeleteOne
- func (c *ComputeSpecClient) Get(ctx context.Context, id int32) (*ComputeSpec, error)
- func (c *ComputeSpecClient) GetX(ctx context.Context, id int32) *ComputeSpec
- func (c *ComputeSpecClient) Hooks() []Hook
- func (c *ComputeSpecClient) Intercept(interceptors ...Interceptor)
- func (c *ComputeSpecClient) Interceptors() []Interceptor
- func (c *ComputeSpecClient) Query() *ComputeSpecQuery
- func (c *ComputeSpecClient) Update() *ComputeSpecUpdate
- func (c *ComputeSpecClient) UpdateOne(cs *ComputeSpec) *ComputeSpecUpdateOne
- func (c *ComputeSpecClient) UpdateOneID(id int32) *ComputeSpecUpdateOne
- func (c *ComputeSpecClient) Use(hooks ...Hook)
- type ComputeSpecCreate
- func (csc *ComputeSpecCreate) Exec(ctx context.Context) error
- func (csc *ComputeSpecCreate) ExecX(ctx context.Context)
- func (csc *ComputeSpecCreate) Mutation() *ComputeSpecMutation
- func (csc *ComputeSpecCreate) Save(ctx context.Context) (*ComputeSpec, error)
- func (csc *ComputeSpecCreate) SaveX(ctx context.Context) *ComputeSpec
- func (csc *ComputeSpecCreate) SetCore(s string) *ComputeSpecCreate
- func (csc *ComputeSpecCreate) SetID(i int32) *ComputeSpecCreate
- func (csc *ComputeSpecCreate) SetMemory(s string) *ComputeSpecCreate
- type ComputeSpecCreateBulk
- type ComputeSpecDelete
- type ComputeSpecDeleteOne
- type ComputeSpecGroupBy
- func (csgb *ComputeSpecGroupBy) Aggregate(fns ...AggregateFunc) *ComputeSpecGroupBy
- func (s *ComputeSpecGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeSpecGroupBy) BoolX(ctx context.Context) bool
- func (s *ComputeSpecGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeSpecGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ComputeSpecGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeSpecGroupBy) Float64X(ctx context.Context) float64
- func (s *ComputeSpecGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeSpecGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ComputeSpecGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeSpecGroupBy) IntX(ctx context.Context) int
- func (s *ComputeSpecGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeSpecGroupBy) IntsX(ctx context.Context) []int
- func (csgb *ComputeSpecGroupBy) Scan(ctx context.Context, v any) error
- func (s *ComputeSpecGroupBy) ScanX(ctx context.Context, v any)
- func (s *ComputeSpecGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ComputeSpecGroupBy) StringX(ctx context.Context) string
- func (s *ComputeSpecGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeSpecGroupBy) StringsX(ctx context.Context) []string
- type ComputeSpecMutation
- func (m *ComputeSpecMutation) AddField(name string, value ent.Value) error
- func (m *ComputeSpecMutation) AddedEdges() []string
- func (m *ComputeSpecMutation) AddedField(name string) (ent.Value, bool)
- func (m *ComputeSpecMutation) AddedFields() []string
- func (m *ComputeSpecMutation) AddedIDs(name string) []ent.Value
- func (m *ComputeSpecMutation) ClearEdge(name string) error
- func (m *ComputeSpecMutation) ClearField(name string) error
- func (m *ComputeSpecMutation) ClearedEdges() []string
- func (m *ComputeSpecMutation) ClearedFields() []string
- func (m ComputeSpecMutation) Client() *Client
- func (m *ComputeSpecMutation) Core() (r string, exists bool)
- func (m *ComputeSpecMutation) EdgeCleared(name string) bool
- func (m *ComputeSpecMutation) Field(name string) (ent.Value, bool)
- func (m *ComputeSpecMutation) FieldCleared(name string) bool
- func (m *ComputeSpecMutation) Fields() []string
- func (m *ComputeSpecMutation) ID() (id int32, exists bool)
- func (m *ComputeSpecMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ComputeSpecMutation) Memory() (r string, exists bool)
- func (m *ComputeSpecMutation) OldCore(ctx context.Context) (v string, err error)
- func (m *ComputeSpecMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeSpecMutation) OldMemory(ctx context.Context) (v string, err error)
- func (m *ComputeSpecMutation) Op() Op
- func (m *ComputeSpecMutation) RemovedEdges() []string
- func (m *ComputeSpecMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeSpecMutation) ResetCore()
- func (m *ComputeSpecMutation) ResetEdge(name string) error
- func (m *ComputeSpecMutation) ResetField(name string) error
- func (m *ComputeSpecMutation) ResetMemory()
- func (m *ComputeSpecMutation) SetCore(s string)
- func (m *ComputeSpecMutation) SetField(name string, value ent.Value) error
- func (m *ComputeSpecMutation) SetID(id int32)
- func (m *ComputeSpecMutation) SetMemory(s string)
- func (m *ComputeSpecMutation) SetOp(op Op)
- func (m ComputeSpecMutation) Tx() (*Tx, error)
- func (m *ComputeSpecMutation) Type() string
- func (m *ComputeSpecMutation) Where(ps ...predicate.ComputeSpec)
- func (m *ComputeSpecMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeSpecQuery
- func (csq *ComputeSpecQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
- func (csq *ComputeSpecQuery) All(ctx context.Context) ([]*ComputeSpec, error)
- func (csq *ComputeSpecQuery) AllX(ctx context.Context) []*ComputeSpec
- func (csq *ComputeSpecQuery) Clone() *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Count(ctx context.Context) (int, error)
- func (csq *ComputeSpecQuery) CountX(ctx context.Context) int
- func (csq *ComputeSpecQuery) Exist(ctx context.Context) (bool, error)
- func (csq *ComputeSpecQuery) ExistX(ctx context.Context) bool
- func (csq *ComputeSpecQuery) First(ctx context.Context) (*ComputeSpec, error)
- func (csq *ComputeSpecQuery) FirstID(ctx context.Context) (id int32, err error)
- func (csq *ComputeSpecQuery) FirstIDX(ctx context.Context) int32
- func (csq *ComputeSpecQuery) FirstX(ctx context.Context) *ComputeSpec
- func (csq *ComputeSpecQuery) GroupBy(field string, fields ...string) *ComputeSpecGroupBy
- func (csq *ComputeSpecQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (csq *ComputeSpecQuery) IDsX(ctx context.Context) []int32
- func (csq *ComputeSpecQuery) Limit(limit int) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Offset(offset int) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Only(ctx context.Context) (*ComputeSpec, error)
- func (csq *ComputeSpecQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (csq *ComputeSpecQuery) OnlyIDX(ctx context.Context) int32
- func (csq *ComputeSpecQuery) OnlyX(ctx context.Context) *ComputeSpec
- func (csq *ComputeSpecQuery) Order(o ...computespec.OrderOption) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Select(fields ...string) *ComputeSpecSelect
- func (csq *ComputeSpecQuery) Unique(unique bool) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Where(ps ...predicate.ComputeSpec) *ComputeSpecQuery
- type ComputeSpecSelect
- func (css *ComputeSpecSelect) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
- func (s *ComputeSpecSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeSpecSelect) BoolX(ctx context.Context) bool
- func (s *ComputeSpecSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeSpecSelect) BoolsX(ctx context.Context) []bool
- func (s *ComputeSpecSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeSpecSelect) Float64X(ctx context.Context) float64
- func (s *ComputeSpecSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeSpecSelect) Float64sX(ctx context.Context) []float64
- func (s *ComputeSpecSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeSpecSelect) IntX(ctx context.Context) int
- func (s *ComputeSpecSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeSpecSelect) IntsX(ctx context.Context) []int
- func (css *ComputeSpecSelect) Scan(ctx context.Context, v any) error
- func (s *ComputeSpecSelect) ScanX(ctx context.Context, v any)
- func (s *ComputeSpecSelect) String(ctx context.Context) (_ string, err error)
- func (s *ComputeSpecSelect) StringX(ctx context.Context) string
- func (s *ComputeSpecSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeSpecSelect) StringsX(ctx context.Context) []string
- type ComputeSpecUpdate
- func (csu *ComputeSpecUpdate) Exec(ctx context.Context) error
- func (csu *ComputeSpecUpdate) ExecX(ctx context.Context)
- func (csu *ComputeSpecUpdate) Mutation() *ComputeSpecMutation
- func (csu *ComputeSpecUpdate) Save(ctx context.Context) (int, error)
- func (csu *ComputeSpecUpdate) SaveX(ctx context.Context) int
- func (csu *ComputeSpecUpdate) SetCore(s string) *ComputeSpecUpdate
- func (csu *ComputeSpecUpdate) SetMemory(s string) *ComputeSpecUpdate
- func (csu *ComputeSpecUpdate) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdate
- type ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) Exec(ctx context.Context) error
- func (csuo *ComputeSpecUpdateOne) ExecX(ctx context.Context)
- func (csuo *ComputeSpecUpdateOne) Mutation() *ComputeSpecMutation
- func (csuo *ComputeSpecUpdateOne) Save(ctx context.Context) (*ComputeSpec, error)
- func (csuo *ComputeSpecUpdateOne) SaveX(ctx context.Context) *ComputeSpec
- func (csuo *ComputeSpecUpdateOne) Select(field string, fields ...string) *ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) SetCore(s string) *ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) SetMemory(s string) *ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdateOne
- type ComputeSpecs
- type ConstraintError
- type Employee
- type EmployeeClient
- func (c *EmployeeClient) Create() *EmployeeCreate
- func (c *EmployeeClient) CreateBulk(builders ...*EmployeeCreate) *EmployeeCreateBulk
- func (c *EmployeeClient) Delete() *EmployeeDelete
- func (c *EmployeeClient) DeleteOne(e *Employee) *EmployeeDeleteOne
- func (c *EmployeeClient) DeleteOneID(id int) *EmployeeDeleteOne
- func (c *EmployeeClient) Get(ctx context.Context, id int) (*Employee, error)
- func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee
- func (c *EmployeeClient) Hooks() []Hook
- func (c *EmployeeClient) Intercept(interceptors ...Interceptor)
- func (c *EmployeeClient) Interceptors() []Interceptor
- func (c *EmployeeClient) Query() *EmployeeQuery
- func (c *EmployeeClient) Update() *EmployeeUpdate
- func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne
- func (c *EmployeeClient) UpdateOneID(id int) *EmployeeUpdateOne
- func (c *EmployeeClient) Use(hooks ...Hook)
- type EmployeeCreate
- func (ec *EmployeeCreate) Exec(ctx context.Context) error
- func (ec *EmployeeCreate) ExecX(ctx context.Context)
- func (ec *EmployeeCreate) Mutation() *EmployeeMutation
- func (ec *EmployeeCreate) Save(ctx context.Context) (*Employee, error)
- func (ec *EmployeeCreate) SaveX(ctx context.Context) *Employee
- func (ec *EmployeeCreate) SetAge(i int32) *EmployeeCreate
- func (ec *EmployeeCreate) SetName(s string) *EmployeeCreate
- func (ec *EmployeeCreate) SetNillableAge(i *int32) *EmployeeCreate
- type EmployeeCreateBulk
- type EmployeeDelete
- type EmployeeDeleteOne
- type EmployeeGroupBy
- func (egb *EmployeeGroupBy) Aggregate(fns ...AggregateFunc) *EmployeeGroupBy
- func (s *EmployeeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmployeeGroupBy) BoolX(ctx context.Context) bool
- func (s *EmployeeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EmployeeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EmployeeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmployeeGroupBy) Float64X(ctx context.Context) float64
- func (s *EmployeeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmployeeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EmployeeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EmployeeGroupBy) IntX(ctx context.Context) int
- func (s *EmployeeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EmployeeGroupBy) IntsX(ctx context.Context) []int
- func (egb *EmployeeGroupBy) Scan(ctx context.Context, v any) error
- func (s *EmployeeGroupBy) ScanX(ctx context.Context, v any)
- func (s *EmployeeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EmployeeGroupBy) StringX(ctx context.Context) string
- func (s *EmployeeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EmployeeGroupBy) StringsX(ctx context.Context) []string
- type EmployeeMutation
- func (m *EmployeeMutation) AddAge(i int32)
- func (m *EmployeeMutation) AddField(name string, value ent.Value) error
- func (m *EmployeeMutation) AddedAge() (r int32, exists bool)
- func (m *EmployeeMutation) AddedEdges() []string
- func (m *EmployeeMutation) AddedField(name string) (ent.Value, bool)
- func (m *EmployeeMutation) AddedFields() []string
- func (m *EmployeeMutation) AddedIDs(name string) []ent.Value
- func (m *EmployeeMutation) Age() (r int32, exists bool)
- func (m *EmployeeMutation) AgeCleared() bool
- func (m *EmployeeMutation) ClearAge()
- func (m *EmployeeMutation) ClearEdge(name string) error
- func (m *EmployeeMutation) ClearField(name string) error
- func (m *EmployeeMutation) ClearedEdges() []string
- func (m *EmployeeMutation) ClearedFields() []string
- func (m EmployeeMutation) Client() *Client
- func (m *EmployeeMutation) EdgeCleared(name string) bool
- func (m *EmployeeMutation) Field(name string) (ent.Value, bool)
- func (m *EmployeeMutation) FieldCleared(name string) bool
- func (m *EmployeeMutation) Fields() []string
- func (m *EmployeeMutation) ID() (id int, exists bool)
- func (m *EmployeeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EmployeeMutation) Name() (r string, exists bool)
- func (m *EmployeeMutation) OldAge(ctx context.Context) (v int32, err error)
- func (m *EmployeeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EmployeeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *EmployeeMutation) Op() Op
- func (m *EmployeeMutation) RemovedEdges() []string
- func (m *EmployeeMutation) RemovedIDs(name string) []ent.Value
- func (m *EmployeeMutation) ResetAge()
- func (m *EmployeeMutation) ResetEdge(name string) error
- func (m *EmployeeMutation) ResetField(name string) error
- func (m *EmployeeMutation) ResetName()
- func (m *EmployeeMutation) SetAge(i int32)
- func (m *EmployeeMutation) SetField(name string, value ent.Value) error
- func (m *EmployeeMutation) SetName(s string)
- func (m *EmployeeMutation) SetOp(op Op)
- func (m EmployeeMutation) Tx() (*Tx, error)
- func (m *EmployeeMutation) Type() string
- func (m *EmployeeMutation) Where(ps ...predicate.Employee)
- func (m *EmployeeMutation) WhereP(ps ...func(*sql.Selector))
- type EmployeeQuery
- func (eq *EmployeeQuery) Aggregate(fns ...AggregateFunc) *EmployeeSelect
- func (eq *EmployeeQuery) All(ctx context.Context) ([]*Employee, error)
- func (eq *EmployeeQuery) AllX(ctx context.Context) []*Employee
- func (eq *EmployeeQuery) Clone() *EmployeeQuery
- func (eq *EmployeeQuery) Count(ctx context.Context) (int, error)
- func (eq *EmployeeQuery) CountX(ctx context.Context) int
- func (eq *EmployeeQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EmployeeQuery) ExistX(ctx context.Context) bool
- func (eq *EmployeeQuery) First(ctx context.Context) (*Employee, error)
- func (eq *EmployeeQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *EmployeeQuery) FirstIDX(ctx context.Context) int
- func (eq *EmployeeQuery) FirstX(ctx context.Context) *Employee
- func (eq *EmployeeQuery) GroupBy(field string, fields ...string) *EmployeeGroupBy
- func (eq *EmployeeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (eq *EmployeeQuery) IDsX(ctx context.Context) []int
- func (eq *EmployeeQuery) Limit(limit int) *EmployeeQuery
- func (eq *EmployeeQuery) Offset(offset int) *EmployeeQuery
- func (eq *EmployeeQuery) Only(ctx context.Context) (*Employee, error)
- func (eq *EmployeeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *EmployeeQuery) OnlyIDX(ctx context.Context) int
- func (eq *EmployeeQuery) OnlyX(ctx context.Context) *Employee
- func (eq *EmployeeQuery) Order(o ...employee.OrderOption) *EmployeeQuery
- func (eq *EmployeeQuery) Select(fields ...string) *EmployeeSelect
- func (eq *EmployeeQuery) Unique(unique bool) *EmployeeQuery
- func (eq *EmployeeQuery) Where(ps ...predicate.Employee) *EmployeeQuery
- type EmployeeSelect
- func (es *EmployeeSelect) Aggregate(fns ...AggregateFunc) *EmployeeSelect
- func (s *EmployeeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmployeeSelect) BoolX(ctx context.Context) bool
- func (s *EmployeeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EmployeeSelect) BoolsX(ctx context.Context) []bool
- func (s *EmployeeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmployeeSelect) Float64X(ctx context.Context) float64
- func (s *EmployeeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmployeeSelect) Float64sX(ctx context.Context) []float64
- func (s *EmployeeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EmployeeSelect) IntX(ctx context.Context) int
- func (s *EmployeeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EmployeeSelect) IntsX(ctx context.Context) []int
- func (es *EmployeeSelect) Scan(ctx context.Context, v any) error
- func (s *EmployeeSelect) ScanX(ctx context.Context, v any)
- func (s *EmployeeSelect) String(ctx context.Context) (_ string, err error)
- func (s *EmployeeSelect) StringX(ctx context.Context) string
- func (s *EmployeeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EmployeeSelect) StringsX(ctx context.Context) []string
- type EmployeeUpdate
- func (eu *EmployeeUpdate) AddAge(i int32) *EmployeeUpdate
- func (eu *EmployeeUpdate) ClearAge() *EmployeeUpdate
- func (eu *EmployeeUpdate) Exec(ctx context.Context) error
- func (eu *EmployeeUpdate) ExecX(ctx context.Context)
- func (eu *EmployeeUpdate) Mutation() *EmployeeMutation
- func (eu *EmployeeUpdate) Save(ctx context.Context) (int, error)
- func (eu *EmployeeUpdate) SaveX(ctx context.Context) int
- func (eu *EmployeeUpdate) SetAge(i int32) *EmployeeUpdate
- func (eu *EmployeeUpdate) SetName(s string) *EmployeeUpdate
- func (eu *EmployeeUpdate) SetNillableAge(i *int32) *EmployeeUpdate
- func (eu *EmployeeUpdate) Where(ps ...predicate.Employee) *EmployeeUpdate
- type EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) AddAge(i int32) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) ClearAge() *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) Exec(ctx context.Context) error
- func (euo *EmployeeUpdateOne) ExecX(ctx context.Context)
- func (euo *EmployeeUpdateOne) Mutation() *EmployeeMutation
- func (euo *EmployeeUpdateOne) Save(ctx context.Context) (*Employee, error)
- func (euo *EmployeeUpdateOne) SaveX(ctx context.Context) *Employee
- func (euo *EmployeeUpdateOne) Select(field string, fields ...string) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) SetAge(i int32) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) SetName(s string) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) SetNillableAge(i *int32) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) Where(ps ...predicate.Employee) *EmployeeUpdateOne
- type Employees
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- 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 Script
- type ScriptClient
- func (c *ScriptClient) Create() *ScriptCreate
- func (c *ScriptClient) CreateBulk(builders ...*ScriptCreate) *ScriptCreateBulk
- func (c *ScriptClient) Delete() *ScriptDelete
- func (c *ScriptClient) DeleteOne(s *Script) *ScriptDeleteOne
- func (c *ScriptClient) DeleteOneID(id int32) *ScriptDeleteOne
- func (c *ScriptClient) Get(ctx context.Context, id int32) (*Script, error)
- func (c *ScriptClient) GetX(ctx context.Context, id int32) *Script
- func (c *ScriptClient) Hooks() []Hook
- func (c *ScriptClient) Intercept(interceptors ...Interceptor)
- func (c *ScriptClient) Interceptors() []Interceptor
- func (c *ScriptClient) Query() *ScriptQuery
- func (c *ScriptClient) QueryScriptExecutionRecords(s *Script) *ScriptExecutionRecordQuery
- func (c *ScriptClient) Update() *ScriptUpdate
- func (c *ScriptClient) UpdateOne(s *Script) *ScriptUpdateOne
- func (c *ScriptClient) UpdateOneID(id int32) *ScriptUpdateOne
- func (c *ScriptClient) Use(hooks ...Hook)
- type ScriptCreate
- func (sc *ScriptCreate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptCreate
- func (sc *ScriptCreate) AddScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptCreate
- func (sc *ScriptCreate) Exec(ctx context.Context) error
- func (sc *ScriptCreate) ExecX(ctx context.Context)
- func (sc *ScriptCreate) Mutation() *ScriptMutation
- func (sc *ScriptCreate) Save(ctx context.Context) (*Script, error)
- func (sc *ScriptCreate) SaveX(ctx context.Context) *Script
- func (sc *ScriptCreate) SetCreateTime(t time.Time) *ScriptCreate
- func (sc *ScriptCreate) SetFileAddress(s string) *ScriptCreate
- func (sc *ScriptCreate) SetID(i int32) *ScriptCreate
- func (sc *ScriptCreate) SetNillableCreateTime(t *time.Time) *ScriptCreate
- func (sc *ScriptCreate) SetNillableUpdateTime(t *time.Time) *ScriptCreate
- func (sc *ScriptCreate) SetScriptContent(s string) *ScriptCreate
- func (sc *ScriptCreate) SetScriptName(s string) *ScriptCreate
- func (sc *ScriptCreate) SetTaskNumber(i int32) *ScriptCreate
- func (sc *ScriptCreate) SetUpdateTime(t time.Time) *ScriptCreate
- func (sc *ScriptCreate) SetUserID(s string) *ScriptCreate
- type ScriptCreateBulk
- type ScriptDelete
- type ScriptDeleteOne
- type ScriptEdges
- type ScriptExecutionRecord
- func (ser *ScriptExecutionRecord) QueryScript() *ScriptQuery
- func (ser *ScriptExecutionRecord) String() string
- func (ser *ScriptExecutionRecord) Unwrap() *ScriptExecutionRecord
- func (ser *ScriptExecutionRecord) Update() *ScriptExecutionRecordUpdateOne
- func (ser *ScriptExecutionRecord) Value(name string) (ent.Value, error)
- type ScriptExecutionRecordClient
- func (c *ScriptExecutionRecordClient) Create() *ScriptExecutionRecordCreate
- func (c *ScriptExecutionRecordClient) CreateBulk(builders ...*ScriptExecutionRecordCreate) *ScriptExecutionRecordCreateBulk
- func (c *ScriptExecutionRecordClient) Delete() *ScriptExecutionRecordDelete
- func (c *ScriptExecutionRecordClient) DeleteOne(ser *ScriptExecutionRecord) *ScriptExecutionRecordDeleteOne
- func (c *ScriptExecutionRecordClient) DeleteOneID(id int32) *ScriptExecutionRecordDeleteOne
- func (c *ScriptExecutionRecordClient) Get(ctx context.Context, id int32) (*ScriptExecutionRecord, error)
- func (c *ScriptExecutionRecordClient) GetX(ctx context.Context, id int32) *ScriptExecutionRecord
- func (c *ScriptExecutionRecordClient) Hooks() []Hook
- func (c *ScriptExecutionRecordClient) Intercept(interceptors ...Interceptor)
- func (c *ScriptExecutionRecordClient) Interceptors() []Interceptor
- func (c *ScriptExecutionRecordClient) Query() *ScriptExecutionRecordQuery
- func (c *ScriptExecutionRecordClient) QueryScript(ser *ScriptExecutionRecord) *ScriptQuery
- func (c *ScriptExecutionRecordClient) Update() *ScriptExecutionRecordUpdate
- func (c *ScriptExecutionRecordClient) UpdateOne(ser *ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
- func (c *ScriptExecutionRecordClient) UpdateOneID(id int32) *ScriptExecutionRecordUpdateOne
- func (c *ScriptExecutionRecordClient) Use(hooks ...Hook)
- type ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) Exec(ctx context.Context) error
- func (serc *ScriptExecutionRecordCreate) ExecX(ctx context.Context)
- func (serc *ScriptExecutionRecordCreate) Mutation() *ScriptExecutionRecordMutation
- func (serc *ScriptExecutionRecordCreate) Save(ctx context.Context) (*ScriptExecutionRecord, error)
- func (serc *ScriptExecutionRecordCreate) SaveX(ctx context.Context) *ScriptExecutionRecord
- func (serc *ScriptExecutionRecordCreate) SetCreateTime(t time.Time) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetExecuteResult(s string) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetExecuteState(i int32) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetFileAddress(s string) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetFkScriptID(i int32) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetID(i int32) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetNillableCreateTime(t *time.Time) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetNillableScriptID(id *int32) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetNillableUpdateTime(t *time.Time) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetScript(s *Script) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetScriptContent(s string) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetScriptID(id int32) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetScriptName(s string) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetTaskNumber(i int32) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetUpdateTime(t time.Time) *ScriptExecutionRecordCreate
- func (serc *ScriptExecutionRecordCreate) SetUserID(s string) *ScriptExecutionRecordCreate
- type ScriptExecutionRecordCreateBulk
- func (sercb *ScriptExecutionRecordCreateBulk) Exec(ctx context.Context) error
- func (sercb *ScriptExecutionRecordCreateBulk) ExecX(ctx context.Context)
- func (sercb *ScriptExecutionRecordCreateBulk) Save(ctx context.Context) ([]*ScriptExecutionRecord, error)
- func (sercb *ScriptExecutionRecordCreateBulk) SaveX(ctx context.Context) []*ScriptExecutionRecord
- type ScriptExecutionRecordDelete
- type ScriptExecutionRecordDeleteOne
- type ScriptExecutionRecordEdges
- type ScriptExecutionRecordGroupBy
- func (sergb *ScriptExecutionRecordGroupBy) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordGroupBy
- func (s *ScriptExecutionRecordGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptExecutionRecordGroupBy) BoolX(ctx context.Context) bool
- func (s *ScriptExecutionRecordGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptExecutionRecordGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScriptExecutionRecordGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptExecutionRecordGroupBy) Float64X(ctx context.Context) float64
- func (s *ScriptExecutionRecordGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptExecutionRecordGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScriptExecutionRecordGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptExecutionRecordGroupBy) IntX(ctx context.Context) int
- func (s *ScriptExecutionRecordGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptExecutionRecordGroupBy) IntsX(ctx context.Context) []int
- func (sergb *ScriptExecutionRecordGroupBy) Scan(ctx context.Context, v any) error
- func (s *ScriptExecutionRecordGroupBy) ScanX(ctx context.Context, v any)
- func (s *ScriptExecutionRecordGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScriptExecutionRecordGroupBy) StringX(ctx context.Context) string
- func (s *ScriptExecutionRecordGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptExecutionRecordGroupBy) StringsX(ctx context.Context) []string
- type ScriptExecutionRecordMutation
- func (m *ScriptExecutionRecordMutation) AddExecuteState(i int32)
- func (m *ScriptExecutionRecordMutation) AddField(name string, value ent.Value) error
- func (m *ScriptExecutionRecordMutation) AddFkScriptID(i int32)
- func (m *ScriptExecutionRecordMutation) AddTaskNumber(i int32)
- func (m *ScriptExecutionRecordMutation) AddedEdges() []string
- func (m *ScriptExecutionRecordMutation) AddedExecuteState() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScriptExecutionRecordMutation) AddedFields() []string
- func (m *ScriptExecutionRecordMutation) AddedFkScriptID() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) AddedIDs(name string) []ent.Value
- func (m *ScriptExecutionRecordMutation) AddedTaskNumber() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) ClearEdge(name string) error
- func (m *ScriptExecutionRecordMutation) ClearField(name string) error
- func (m *ScriptExecutionRecordMutation) ClearScript()
- func (m *ScriptExecutionRecordMutation) ClearedEdges() []string
- func (m *ScriptExecutionRecordMutation) ClearedFields() []string
- func (m ScriptExecutionRecordMutation) Client() *Client
- func (m *ScriptExecutionRecordMutation) CreateTime() (r time.Time, exists bool)
- func (m *ScriptExecutionRecordMutation) EdgeCleared(name string) bool
- func (m *ScriptExecutionRecordMutation) ExecuteResult() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) ExecuteState() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) Field(name string) (ent.Value, bool)
- func (m *ScriptExecutionRecordMutation) FieldCleared(name string) bool
- func (m *ScriptExecutionRecordMutation) Fields() []string
- func (m *ScriptExecutionRecordMutation) FileAddress() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) FkScriptID() (r int32, exists bool)
- func (m *ScriptExecutionRecordMutation) ID() (id int32, exists bool)
- func (m *ScriptExecutionRecordMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ScriptExecutionRecordMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptExecutionRecordMutation) OldExecuteResult(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldExecuteState(ctx context.Context) (v int32, err error)
- func (m *ScriptExecutionRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScriptExecutionRecordMutation) OldFileAddress(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldFkScriptID(ctx context.Context) (v int32, err error)
- func (m *ScriptExecutionRecordMutation) OldScriptContent(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldScriptName(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
- func (m *ScriptExecutionRecordMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptExecutionRecordMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *ScriptExecutionRecordMutation) Op() Op
- func (m *ScriptExecutionRecordMutation) RemovedEdges() []string
- func (m *ScriptExecutionRecordMutation) RemovedIDs(name string) []ent.Value
- func (m *ScriptExecutionRecordMutation) ResetCreateTime()
- func (m *ScriptExecutionRecordMutation) ResetEdge(name string) error
- func (m *ScriptExecutionRecordMutation) ResetExecuteResult()
- func (m *ScriptExecutionRecordMutation) ResetExecuteState()
- func (m *ScriptExecutionRecordMutation) ResetField(name string) error
- func (m *ScriptExecutionRecordMutation) ResetFileAddress()
- func (m *ScriptExecutionRecordMutation) ResetFkScriptID()
- func (m *ScriptExecutionRecordMutation) ResetScript()
- func (m *ScriptExecutionRecordMutation) ResetScriptContent()
- func (m *ScriptExecutionRecordMutation) ResetScriptName()
- func (m *ScriptExecutionRecordMutation) ResetTaskNumber()
- func (m *ScriptExecutionRecordMutation) ResetUpdateTime()
- func (m *ScriptExecutionRecordMutation) ResetUserID()
- func (m *ScriptExecutionRecordMutation) ScriptCleared() bool
- func (m *ScriptExecutionRecordMutation) ScriptContent() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) ScriptID() (id int32, exists bool)
- func (m *ScriptExecutionRecordMutation) ScriptIDs() (ids []int32)
- func (m *ScriptExecutionRecordMutation) ScriptName() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) SetCreateTime(t time.Time)
- func (m *ScriptExecutionRecordMutation) SetExecuteResult(s string)
- func (m *ScriptExecutionRecordMutation) SetExecuteState(i int32)
- func (m *ScriptExecutionRecordMutation) SetField(name string, value ent.Value) error
- func (m *ScriptExecutionRecordMutation) SetFileAddress(s string)
- func (m *ScriptExecutionRecordMutation) SetFkScriptID(i int32)
- func (m *ScriptExecutionRecordMutation) SetID(id int32)
- func (m *ScriptExecutionRecordMutation) SetOp(op Op)
- func (m *ScriptExecutionRecordMutation) SetScriptContent(s string)
- func (m *ScriptExecutionRecordMutation) SetScriptID(id int32)
- func (m *ScriptExecutionRecordMutation) SetScriptName(s string)
- func (m *ScriptExecutionRecordMutation) SetTaskNumber(i int32)
- func (m *ScriptExecutionRecordMutation) SetUpdateTime(t time.Time)
- func (m *ScriptExecutionRecordMutation) SetUserID(s string)
- func (m *ScriptExecutionRecordMutation) TaskNumber() (r int32, exists bool)
- func (m ScriptExecutionRecordMutation) Tx() (*Tx, error)
- func (m *ScriptExecutionRecordMutation) Type() string
- func (m *ScriptExecutionRecordMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ScriptExecutionRecordMutation) UserID() (r string, exists bool)
- func (m *ScriptExecutionRecordMutation) Where(ps ...predicate.ScriptExecutionRecord)
- func (m *ScriptExecutionRecordMutation) WhereP(ps ...func(*sql.Selector))
- type ScriptExecutionRecordQuery
- func (serq *ScriptExecutionRecordQuery) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
- func (serq *ScriptExecutionRecordQuery) All(ctx context.Context) ([]*ScriptExecutionRecord, error)
- func (serq *ScriptExecutionRecordQuery) AllX(ctx context.Context) []*ScriptExecutionRecord
- func (serq *ScriptExecutionRecordQuery) Clone() *ScriptExecutionRecordQuery
- func (serq *ScriptExecutionRecordQuery) Count(ctx context.Context) (int, error)
- func (serq *ScriptExecutionRecordQuery) CountX(ctx context.Context) int
- func (serq *ScriptExecutionRecordQuery) Exist(ctx context.Context) (bool, error)
- func (serq *ScriptExecutionRecordQuery) ExistX(ctx context.Context) bool
- func (serq *ScriptExecutionRecordQuery) First(ctx context.Context) (*ScriptExecutionRecord, error)
- func (serq *ScriptExecutionRecordQuery) FirstID(ctx context.Context) (id int32, err error)
- func (serq *ScriptExecutionRecordQuery) FirstIDX(ctx context.Context) int32
- func (serq *ScriptExecutionRecordQuery) FirstX(ctx context.Context) *ScriptExecutionRecord
- func (serq *ScriptExecutionRecordQuery) GroupBy(field string, fields ...string) *ScriptExecutionRecordGroupBy
- func (serq *ScriptExecutionRecordQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (serq *ScriptExecutionRecordQuery) IDsX(ctx context.Context) []int32
- func (serq *ScriptExecutionRecordQuery) Limit(limit int) *ScriptExecutionRecordQuery
- func (serq *ScriptExecutionRecordQuery) Offset(offset int) *ScriptExecutionRecordQuery
- func (serq *ScriptExecutionRecordQuery) Only(ctx context.Context) (*ScriptExecutionRecord, error)
- func (serq *ScriptExecutionRecordQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (serq *ScriptExecutionRecordQuery) OnlyIDX(ctx context.Context) int32
- func (serq *ScriptExecutionRecordQuery) OnlyX(ctx context.Context) *ScriptExecutionRecord
- func (serq *ScriptExecutionRecordQuery) Order(o ...scriptexecutionrecord.OrderOption) *ScriptExecutionRecordQuery
- func (serq *ScriptExecutionRecordQuery) QueryScript() *ScriptQuery
- func (serq *ScriptExecutionRecordQuery) Select(fields ...string) *ScriptExecutionRecordSelect
- func (serq *ScriptExecutionRecordQuery) Unique(unique bool) *ScriptExecutionRecordQuery
- func (serq *ScriptExecutionRecordQuery) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordQuery
- func (serq *ScriptExecutionRecordQuery) WithScript(opts ...func(*ScriptQuery)) *ScriptExecutionRecordQuery
- type ScriptExecutionRecordSelect
- func (sers *ScriptExecutionRecordSelect) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
- func (s *ScriptExecutionRecordSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptExecutionRecordSelect) BoolX(ctx context.Context) bool
- func (s *ScriptExecutionRecordSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptExecutionRecordSelect) BoolsX(ctx context.Context) []bool
- func (s *ScriptExecutionRecordSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptExecutionRecordSelect) Float64X(ctx context.Context) float64
- func (s *ScriptExecutionRecordSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptExecutionRecordSelect) Float64sX(ctx context.Context) []float64
- func (s *ScriptExecutionRecordSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptExecutionRecordSelect) IntX(ctx context.Context) int
- func (s *ScriptExecutionRecordSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptExecutionRecordSelect) IntsX(ctx context.Context) []int
- func (sers *ScriptExecutionRecordSelect) Scan(ctx context.Context, v any) error
- func (s *ScriptExecutionRecordSelect) ScanX(ctx context.Context, v any)
- func (s *ScriptExecutionRecordSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScriptExecutionRecordSelect) StringX(ctx context.Context) string
- func (s *ScriptExecutionRecordSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptExecutionRecordSelect) StringsX(ctx context.Context) []string
- type ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) AddExecuteState(i int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) AddFkScriptID(i int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) AddTaskNumber(i int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) ClearScript() *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) Exec(ctx context.Context) error
- func (seru *ScriptExecutionRecordUpdate) ExecX(ctx context.Context)
- func (seru *ScriptExecutionRecordUpdate) Mutation() *ScriptExecutionRecordMutation
- func (seru *ScriptExecutionRecordUpdate) Save(ctx context.Context) (int, error)
- func (seru *ScriptExecutionRecordUpdate) SaveX(ctx context.Context) int
- func (seru *ScriptExecutionRecordUpdate) SetCreateTime(t time.Time) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetExecuteResult(s string) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetExecuteState(i int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetFileAddress(s string) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetFkScriptID(i int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetNillableCreateTime(t *time.Time) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetNillableUpdateTime(t *time.Time) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetScript(s *Script) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetScriptContent(s string) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetScriptID(id int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetScriptName(s string) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetTaskNumber(i int32) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetUpdateTime(t time.Time) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) SetUserID(s string) *ScriptExecutionRecordUpdate
- func (seru *ScriptExecutionRecordUpdate) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdate
- type ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) AddExecuteState(i int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) AddFkScriptID(i int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) AddTaskNumber(i int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) ClearScript() *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) Exec(ctx context.Context) error
- func (seruo *ScriptExecutionRecordUpdateOne) ExecX(ctx context.Context)
- func (seruo *ScriptExecutionRecordUpdateOne) Mutation() *ScriptExecutionRecordMutation
- func (seruo *ScriptExecutionRecordUpdateOne) Save(ctx context.Context) (*ScriptExecutionRecord, error)
- func (seruo *ScriptExecutionRecordUpdateOne) SaveX(ctx context.Context) *ScriptExecutionRecord
- func (seruo *ScriptExecutionRecordUpdateOne) Select(field string, fields ...string) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetCreateTime(t time.Time) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetExecuteResult(s string) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetExecuteState(i int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetFileAddress(s string) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetFkScriptID(i int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetNillableCreateTime(t *time.Time) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetNillableUpdateTime(t *time.Time) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetScript(s *Script) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetScriptContent(s string) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetScriptID(id int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetScriptName(s string) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetTaskNumber(i int32) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetUpdateTime(t time.Time) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) SetUserID(s string) *ScriptExecutionRecordUpdateOne
- func (seruo *ScriptExecutionRecordUpdateOne) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
- type ScriptExecutionRecords
- type ScriptGroupBy
- func (sgb *ScriptGroupBy) Aggregate(fns ...AggregateFunc) *ScriptGroupBy
- func (s *ScriptGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptGroupBy) BoolX(ctx context.Context) bool
- func (s *ScriptGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScriptGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptGroupBy) Float64X(ctx context.Context) float64
- func (s *ScriptGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScriptGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptGroupBy) IntX(ctx context.Context) int
- func (s *ScriptGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ScriptGroupBy) Scan(ctx context.Context, v any) error
- func (s *ScriptGroupBy) ScanX(ctx context.Context, v any)
- func (s *ScriptGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScriptGroupBy) StringX(ctx context.Context) string
- func (s *ScriptGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptGroupBy) StringsX(ctx context.Context) []string
- type ScriptMutation
- func (m *ScriptMutation) AddField(name string, value ent.Value) error
- func (m *ScriptMutation) AddScriptExecutionRecordIDs(ids ...int32)
- func (m *ScriptMutation) AddTaskNumber(i int32)
- func (m *ScriptMutation) AddedEdges() []string
- func (m *ScriptMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScriptMutation) AddedFields() []string
- func (m *ScriptMutation) AddedIDs(name string) []ent.Value
- func (m *ScriptMutation) AddedTaskNumber() (r int32, exists bool)
- func (m *ScriptMutation) ClearEdge(name string) error
- func (m *ScriptMutation) ClearField(name string) error
- func (m *ScriptMutation) ClearScriptExecutionRecords()
- func (m *ScriptMutation) ClearedEdges() []string
- func (m *ScriptMutation) ClearedFields() []string
- func (m ScriptMutation) Client() *Client
- func (m *ScriptMutation) CreateTime() (r time.Time, exists bool)
- func (m *ScriptMutation) EdgeCleared(name string) bool
- func (m *ScriptMutation) Field(name string) (ent.Value, bool)
- func (m *ScriptMutation) FieldCleared(name string) bool
- func (m *ScriptMutation) Fields() []string
- func (m *ScriptMutation) FileAddress() (r string, exists bool)
- func (m *ScriptMutation) ID() (id int32, exists bool)
- func (m *ScriptMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ScriptMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScriptMutation) OldFileAddress(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldScriptContent(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldScriptName(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
- func (m *ScriptMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ScriptMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) Op() Op
- func (m *ScriptMutation) RemoveScriptExecutionRecordIDs(ids ...int32)
- func (m *ScriptMutation) RemovedEdges() []string
- func (m *ScriptMutation) RemovedIDs(name string) []ent.Value
- func (m *ScriptMutation) RemovedScriptExecutionRecordsIDs() (ids []int32)
- func (m *ScriptMutation) ResetCreateTime()
- func (m *ScriptMutation) ResetEdge(name string) error
- func (m *ScriptMutation) ResetField(name string) error
- func (m *ScriptMutation) ResetFileAddress()
- func (m *ScriptMutation) ResetScriptContent()
- func (m *ScriptMutation) ResetScriptExecutionRecords()
- func (m *ScriptMutation) ResetScriptName()
- func (m *ScriptMutation) ResetTaskNumber()
- func (m *ScriptMutation) ResetUpdateTime()
- func (m *ScriptMutation) ResetUserID()
- func (m *ScriptMutation) ScriptContent() (r string, exists bool)
- func (m *ScriptMutation) ScriptExecutionRecordsCleared() bool
- func (m *ScriptMutation) ScriptExecutionRecordsIDs() (ids []int32)
- func (m *ScriptMutation) ScriptName() (r string, exists bool)
- func (m *ScriptMutation) SetCreateTime(t time.Time)
- func (m *ScriptMutation) SetField(name string, value ent.Value) error
- func (m *ScriptMutation) SetFileAddress(s string)
- func (m *ScriptMutation) SetID(id int32)
- func (m *ScriptMutation) SetOp(op Op)
- func (m *ScriptMutation) SetScriptContent(s string)
- func (m *ScriptMutation) SetScriptName(s string)
- func (m *ScriptMutation) SetTaskNumber(i int32)
- func (m *ScriptMutation) SetUpdateTime(t time.Time)
- func (m *ScriptMutation) SetUserID(s string)
- func (m *ScriptMutation) TaskNumber() (r int32, exists bool)
- func (m ScriptMutation) Tx() (*Tx, error)
- func (m *ScriptMutation) Type() string
- func (m *ScriptMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ScriptMutation) UserID() (r string, exists bool)
- func (m *ScriptMutation) Where(ps ...predicate.Script)
- func (m *ScriptMutation) WhereP(ps ...func(*sql.Selector))
- type ScriptQuery
- func (sq *ScriptQuery) Aggregate(fns ...AggregateFunc) *ScriptSelect
- func (sq *ScriptQuery) All(ctx context.Context) ([]*Script, error)
- func (sq *ScriptQuery) AllX(ctx context.Context) []*Script
- func (sq *ScriptQuery) Clone() *ScriptQuery
- func (sq *ScriptQuery) Count(ctx context.Context) (int, error)
- func (sq *ScriptQuery) CountX(ctx context.Context) int
- func (sq *ScriptQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ScriptQuery) ExistX(ctx context.Context) bool
- func (sq *ScriptQuery) First(ctx context.Context) (*Script, error)
- func (sq *ScriptQuery) FirstID(ctx context.Context) (id int32, err error)
- func (sq *ScriptQuery) FirstIDX(ctx context.Context) int32
- func (sq *ScriptQuery) FirstX(ctx context.Context) *Script
- func (sq *ScriptQuery) GroupBy(field string, fields ...string) *ScriptGroupBy
- func (sq *ScriptQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (sq *ScriptQuery) IDsX(ctx context.Context) []int32
- func (sq *ScriptQuery) Limit(limit int) *ScriptQuery
- func (sq *ScriptQuery) Offset(offset int) *ScriptQuery
- func (sq *ScriptQuery) Only(ctx context.Context) (*Script, error)
- func (sq *ScriptQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (sq *ScriptQuery) OnlyIDX(ctx context.Context) int32
- func (sq *ScriptQuery) OnlyX(ctx context.Context) *Script
- func (sq *ScriptQuery) Order(o ...script.OrderOption) *ScriptQuery
- func (sq *ScriptQuery) QueryScriptExecutionRecords() *ScriptExecutionRecordQuery
- func (sq *ScriptQuery) Select(fields ...string) *ScriptSelect
- func (sq *ScriptQuery) Unique(unique bool) *ScriptQuery
- func (sq *ScriptQuery) Where(ps ...predicate.Script) *ScriptQuery
- func (sq *ScriptQuery) WithScriptExecutionRecords(opts ...func(*ScriptExecutionRecordQuery)) *ScriptQuery
- type ScriptSelect
- func (ss *ScriptSelect) Aggregate(fns ...AggregateFunc) *ScriptSelect
- func (s *ScriptSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptSelect) BoolX(ctx context.Context) bool
- func (s *ScriptSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptSelect) BoolsX(ctx context.Context) []bool
- func (s *ScriptSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptSelect) Float64X(ctx context.Context) float64
- func (s *ScriptSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptSelect) Float64sX(ctx context.Context) []float64
- func (s *ScriptSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptSelect) IntX(ctx context.Context) int
- func (s *ScriptSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptSelect) IntsX(ctx context.Context) []int
- func (ss *ScriptSelect) Scan(ctx context.Context, v any) error
- func (s *ScriptSelect) ScanX(ctx context.Context, v any)
- func (s *ScriptSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScriptSelect) StringX(ctx context.Context) string
- func (s *ScriptSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptSelect) StringsX(ctx context.Context) []string
- type ScriptUpdate
- func (su *ScriptUpdate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
- func (su *ScriptUpdate) AddScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdate
- func (su *ScriptUpdate) AddTaskNumber(i int32) *ScriptUpdate
- func (su *ScriptUpdate) ClearScriptExecutionRecords() *ScriptUpdate
- func (su *ScriptUpdate) Exec(ctx context.Context) error
- func (su *ScriptUpdate) ExecX(ctx context.Context)
- func (su *ScriptUpdate) Mutation() *ScriptMutation
- func (su *ScriptUpdate) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
- func (su *ScriptUpdate) RemoveScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdate
- func (su *ScriptUpdate) Save(ctx context.Context) (int, error)
- func (su *ScriptUpdate) SaveX(ctx context.Context) int
- func (su *ScriptUpdate) SetCreateTime(t time.Time) *ScriptUpdate
- func (su *ScriptUpdate) SetFileAddress(s string) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableCreateTime(t *time.Time) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableUpdateTime(t *time.Time) *ScriptUpdate
- func (su *ScriptUpdate) SetScriptContent(s string) *ScriptUpdate
- func (su *ScriptUpdate) SetScriptName(s string) *ScriptUpdate
- func (su *ScriptUpdate) SetTaskNumber(i int32) *ScriptUpdate
- func (su *ScriptUpdate) SetUpdateTime(t time.Time) *ScriptUpdate
- func (su *ScriptUpdate) SetUserID(s string) *ScriptUpdate
- func (su *ScriptUpdate) Where(ps ...predicate.Script) *ScriptUpdate
- type ScriptUpdateOne
- func (suo *ScriptUpdateOne) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) AddScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) AddTaskNumber(i int32) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) ClearScriptExecutionRecords() *ScriptUpdateOne
- func (suo *ScriptUpdateOne) Exec(ctx context.Context) error
- func (suo *ScriptUpdateOne) ExecX(ctx context.Context)
- func (suo *ScriptUpdateOne) Mutation() *ScriptMutation
- func (suo *ScriptUpdateOne) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) RemoveScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) Save(ctx context.Context) (*Script, error)
- func (suo *ScriptUpdateOne) SaveX(ctx context.Context) *Script
- func (suo *ScriptUpdateOne) Select(field string, fields ...string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetCreateTime(t time.Time) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetFileAddress(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableCreateTime(t *time.Time) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableUpdateTime(t *time.Time) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetScriptContent(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetScriptName(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetTaskNumber(i int32) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetUpdateTime(t time.Time) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetUserID(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) Where(ps ...predicate.Script) *ScriptUpdateOne
- type Scripts
- type Storage
- type StorageClient
- func (c *StorageClient) Create() *StorageCreate
- func (c *StorageClient) CreateBulk(builders ...*StorageCreate) *StorageCreateBulk
- func (c *StorageClient) Delete() *StorageDelete
- func (c *StorageClient) DeleteOne(s *Storage) *StorageDeleteOne
- func (c *StorageClient) DeleteOneID(id uuid.UUID) *StorageDeleteOne
- func (c *StorageClient) Get(ctx context.Context, id uuid.UUID) (*Storage, error)
- func (c *StorageClient) GetX(ctx context.Context, id uuid.UUID) *Storage
- func (c *StorageClient) Hooks() []Hook
- func (c *StorageClient) Intercept(interceptors ...Interceptor)
- func (c *StorageClient) Interceptors() []Interceptor
- func (c *StorageClient) Query() *StorageQuery
- func (c *StorageClient) Update() *StorageUpdate
- func (c *StorageClient) UpdateOne(s *Storage) *StorageUpdateOne
- func (c *StorageClient) UpdateOneID(id uuid.UUID) *StorageUpdateOne
- func (c *StorageClient) Use(hooks ...Hook)
- type StorageCreate
- func (sc *StorageCreate) Exec(ctx context.Context) error
- func (sc *StorageCreate) ExecX(ctx context.Context)
- func (sc *StorageCreate) Mutation() *StorageMutation
- func (sc *StorageCreate) Save(ctx context.Context) (*Storage, error)
- func (sc *StorageCreate) SaveX(ctx context.Context) *Storage
- func (sc *StorageCreate) SetCid(s string) *StorageCreate
- func (sc *StorageCreate) SetID(u uuid.UUID) *StorageCreate
- func (sc *StorageCreate) SetLastModify(t time.Time) *StorageCreate
- func (sc *StorageCreate) SetName(s string) *StorageCreate
- func (sc *StorageCreate) SetNillableID(u *uuid.UUID) *StorageCreate
- func (sc *StorageCreate) SetNillableLastModify(t *time.Time) *StorageCreate
- func (sc *StorageCreate) SetNillableType(i *int32) *StorageCreate
- func (sc *StorageCreate) SetOwner(s string) *StorageCreate
- func (sc *StorageCreate) SetParentID(s string) *StorageCreate
- func (sc *StorageCreate) SetSize(i int32) *StorageCreate
- func (sc *StorageCreate) SetType(i int32) *StorageCreate
- type StorageCreateBulk
- type StorageDelete
- type StorageDeleteOne
- type StorageGroupBy
- func (sgb *StorageGroupBy) Aggregate(fns ...AggregateFunc) *StorageGroupBy
- func (s *StorageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageGroupBy) BoolX(ctx context.Context) bool
- func (s *StorageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StorageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageGroupBy) Float64X(ctx context.Context) float64
- func (s *StorageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StorageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StorageGroupBy) IntX(ctx context.Context) int
- func (s *StorageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StorageGroupBy) IntsX(ctx context.Context) []int
- func (sgb *StorageGroupBy) Scan(ctx context.Context, v any) error
- func (s *StorageGroupBy) ScanX(ctx context.Context, v any)
- func (s *StorageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StorageGroupBy) StringX(ctx context.Context) string
- func (s *StorageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StorageGroupBy) StringsX(ctx context.Context) []string
- type StorageMutation
- func (m *StorageMutation) AddField(name string, value ent.Value) error
- func (m *StorageMutation) AddSize(i int32)
- func (m *StorageMutation) AddType(i int32)
- func (m *StorageMutation) AddedEdges() []string
- func (m *StorageMutation) AddedField(name string) (ent.Value, bool)
- func (m *StorageMutation) AddedFields() []string
- func (m *StorageMutation) AddedIDs(name string) []ent.Value
- func (m *StorageMutation) AddedSize() (r int32, exists bool)
- func (m *StorageMutation) AddedType() (r int32, exists bool)
- func (m *StorageMutation) Cid() (r string, exists bool)
- func (m *StorageMutation) ClearEdge(name string) error
- func (m *StorageMutation) ClearField(name string) error
- func (m *StorageMutation) ClearedEdges() []string
- func (m *StorageMutation) ClearedFields() []string
- func (m StorageMutation) Client() *Client
- func (m *StorageMutation) EdgeCleared(name string) bool
- func (m *StorageMutation) Field(name string) (ent.Value, bool)
- func (m *StorageMutation) FieldCleared(name string) bool
- func (m *StorageMutation) Fields() []string
- func (m *StorageMutation) GetType() (r int32, exists bool)
- func (m *StorageMutation) ID() (id uuid.UUID, exists bool)
- func (m *StorageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *StorageMutation) LastModify() (r time.Time, exists bool)
- func (m *StorageMutation) Name() (r string, exists bool)
- func (m *StorageMutation) OldCid(ctx context.Context) (v *string, err error)
- func (m *StorageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StorageMutation) OldLastModify(ctx context.Context) (v time.Time, err error)
- func (m *StorageMutation) OldName(ctx context.Context) (v string, err error)
- func (m *StorageMutation) OldOwner(ctx context.Context) (v string, err error)
- func (m *StorageMutation) OldParentID(ctx context.Context) (v string, err error)
- func (m *StorageMutation) OldSize(ctx context.Context) (v int32, err error)
- func (m *StorageMutation) OldType(ctx context.Context) (v int32, err error)
- func (m *StorageMutation) Op() Op
- func (m *StorageMutation) Owner() (r string, exists bool)
- func (m *StorageMutation) ParentID() (r string, exists bool)
- func (m *StorageMutation) RemovedEdges() []string
- func (m *StorageMutation) RemovedIDs(name string) []ent.Value
- func (m *StorageMutation) ResetCid()
- func (m *StorageMutation) ResetEdge(name string) error
- func (m *StorageMutation) ResetField(name string) error
- func (m *StorageMutation) ResetLastModify()
- func (m *StorageMutation) ResetName()
- func (m *StorageMutation) ResetOwner()
- func (m *StorageMutation) ResetParentID()
- func (m *StorageMutation) ResetSize()
- func (m *StorageMutation) ResetType()
- func (m *StorageMutation) SetCid(s string)
- func (m *StorageMutation) SetField(name string, value ent.Value) error
- func (m *StorageMutation) SetID(id uuid.UUID)
- func (m *StorageMutation) SetLastModify(t time.Time)
- func (m *StorageMutation) SetName(s string)
- func (m *StorageMutation) SetOp(op Op)
- func (m *StorageMutation) SetOwner(s string)
- func (m *StorageMutation) SetParentID(s string)
- func (m *StorageMutation) SetSize(i int32)
- func (m *StorageMutation) SetType(i int32)
- func (m *StorageMutation) Size() (r int32, exists bool)
- func (m StorageMutation) Tx() (*Tx, error)
- func (m *StorageMutation) Type() string
- func (m *StorageMutation) Where(ps ...predicate.Storage)
- func (m *StorageMutation) WhereP(ps ...func(*sql.Selector))
- type StorageQuery
- func (sq *StorageQuery) Aggregate(fns ...AggregateFunc) *StorageSelect
- func (sq *StorageQuery) All(ctx context.Context) ([]*Storage, error)
- func (sq *StorageQuery) AllX(ctx context.Context) []*Storage
- func (sq *StorageQuery) Clone() *StorageQuery
- func (sq *StorageQuery) Count(ctx context.Context) (int, error)
- func (sq *StorageQuery) CountX(ctx context.Context) int
- func (sq *StorageQuery) Exist(ctx context.Context) (bool, error)
- func (sq *StorageQuery) ExistX(ctx context.Context) bool
- func (sq *StorageQuery) First(ctx context.Context) (*Storage, error)
- func (sq *StorageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *StorageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *StorageQuery) FirstX(ctx context.Context) *Storage
- func (sq *StorageQuery) GroupBy(field string, fields ...string) *StorageGroupBy
- func (sq *StorageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *StorageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *StorageQuery) Limit(limit int) *StorageQuery
- func (sq *StorageQuery) Offset(offset int) *StorageQuery
- func (sq *StorageQuery) Only(ctx context.Context) (*Storage, error)
- func (sq *StorageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *StorageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *StorageQuery) OnlyX(ctx context.Context) *Storage
- func (sq *StorageQuery) Order(o ...storage.OrderOption) *StorageQuery
- func (sq *StorageQuery) Select(fields ...string) *StorageSelect
- func (sq *StorageQuery) Unique(unique bool) *StorageQuery
- func (sq *StorageQuery) Where(ps ...predicate.Storage) *StorageQuery
- type StorageSelect
- func (ss *StorageSelect) Aggregate(fns ...AggregateFunc) *StorageSelect
- func (s *StorageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageSelect) BoolX(ctx context.Context) bool
- func (s *StorageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageSelect) BoolsX(ctx context.Context) []bool
- func (s *StorageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageSelect) Float64X(ctx context.Context) float64
- func (s *StorageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageSelect) Float64sX(ctx context.Context) []float64
- func (s *StorageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StorageSelect) IntX(ctx context.Context) int
- func (s *StorageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StorageSelect) IntsX(ctx context.Context) []int
- func (ss *StorageSelect) Scan(ctx context.Context, v any) error
- func (s *StorageSelect) ScanX(ctx context.Context, v any)
- func (s *StorageSelect) String(ctx context.Context) (_ string, err error)
- func (s *StorageSelect) StringX(ctx context.Context) string
- func (s *StorageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StorageSelect) StringsX(ctx context.Context) []string
- type StorageUpdate
- func (su *StorageUpdate) AddSize(i int32) *StorageUpdate
- func (su *StorageUpdate) AddType(i int32) *StorageUpdate
- func (su *StorageUpdate) Exec(ctx context.Context) error
- func (su *StorageUpdate) ExecX(ctx context.Context)
- func (su *StorageUpdate) Mutation() *StorageMutation
- func (su *StorageUpdate) Save(ctx context.Context) (int, error)
- func (su *StorageUpdate) SaveX(ctx context.Context) int
- func (su *StorageUpdate) SetCid(s string) *StorageUpdate
- func (su *StorageUpdate) SetLastModify(t time.Time) *StorageUpdate
- func (su *StorageUpdate) SetName(s string) *StorageUpdate
- func (su *StorageUpdate) SetNillableLastModify(t *time.Time) *StorageUpdate
- func (su *StorageUpdate) SetNillableType(i *int32) *StorageUpdate
- func (su *StorageUpdate) SetOwner(s string) *StorageUpdate
- func (su *StorageUpdate) SetParentID(s string) *StorageUpdate
- func (su *StorageUpdate) SetSize(i int32) *StorageUpdate
- func (su *StorageUpdate) SetType(i int32) *StorageUpdate
- func (su *StorageUpdate) Where(ps ...predicate.Storage) *StorageUpdate
- type StorageUpdateOne
- func (suo *StorageUpdateOne) AddSize(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) AddType(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) Exec(ctx context.Context) error
- func (suo *StorageUpdateOne) ExecX(ctx context.Context)
- func (suo *StorageUpdateOne) Mutation() *StorageMutation
- func (suo *StorageUpdateOne) Save(ctx context.Context) (*Storage, error)
- func (suo *StorageUpdateOne) SaveX(ctx context.Context) *Storage
- func (suo *StorageUpdateOne) Select(field string, fields ...string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetCid(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetLastModify(t time.Time) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetName(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetNillableLastModify(t *time.Time) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetNillableType(i *int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetOwner(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetParentID(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetSize(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetType(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) Where(ps ...predicate.Storage) *StorageUpdateOne
- type Storages
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCountryCallCoding(s string) *UserCreate
- func (uc *UserCreate) SetCreateDate(t time.Time) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetIcon(s string) *UserCreate
- func (uc *UserCreate) SetLastLoginDate(t time.Time) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreateDate(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableLastLoginDate(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillablePwdConfig(b *bool) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetPwdConfig(b bool) *UserCreate
- func (uc *UserCreate) SetTelephoneNumber(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CountryCallCoding() (r string, exists bool)
- func (m *UserMutation) CreateDate() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) Icon() (r string, exists bool)
- func (m *UserMutation) LastLoginDate() (r time.Time, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldCountryCallCoding(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldCreateDate(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIcon(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLastLoginDate(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPwdConfig(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldTelephoneNumber(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PwdConfig() (r bool, exists bool)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCountryCallCoding()
- func (m *UserMutation) ResetCreateDate()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIcon()
- func (m *UserMutation) ResetLastLoginDate()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPwdConfig()
- func (m *UserMutation) ResetTelephoneNumber()
- func (m *UserMutation) SetCountryCallCoding(s string)
- func (m *UserMutation) SetCreateDate(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetIcon(s string)
- func (m *UserMutation) SetLastLoginDate(t time.Time)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetPwdConfig(b bool)
- func (m *UserMutation) SetTelephoneNumber(s string)
- func (m *UserMutation) TelephoneNumber() (r string, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCountryCallCoding(s string) *UserUpdate
- func (uu *UserUpdate) SetCreateDate(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetIcon(s string) *UserUpdate
- func (uu *UserUpdate) SetLastLoginDate(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableCreateDate(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLastLoginDate(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillablePwdConfig(b *bool) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetPwdConfig(b bool) *UserUpdate
- func (uu *UserUpdate) SetTelephoneNumber(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCountryCallCoding(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreateDate(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIcon(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastLoginDate(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreateDate(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastLoginDate(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePwdConfig(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPwdConfig(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTelephoneNumber(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAgent = "Agent" TypeComputeImage = "ComputeImage" TypeComputeInstance = "ComputeInstance" TypeComputeSpec = "ComputeSpec" TypeEmployee = "Employee" TypeScript = "Script" TypeScriptExecutionRecord = "ScriptExecutionRecord" TypeStorage = "Storage" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Agent ¶
type Agent struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // PeerID holds the value of the "peer_id" field. PeerID string `json:"peer_id,omitempty"` // 是否活动 Active bool `json:"active,omitempty"` // 最后更新时间 LastUpdateTime time.Time `json:"last_update_time,omitempty"` // contains filtered or unexported fields }
Agent is the model entity for the Agent schema.
func (*Agent) Unwrap ¶
Unwrap unwraps the Agent 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 (*Agent) Update ¶
func (a *Agent) Update() *AgentUpdateOne
Update returns a builder for updating this Agent. Note that you need to call Agent.Unwrap() before calling this method if this Agent was returned from a transaction, and the transaction was committed or rolled back.
type AgentClient ¶
type AgentClient struct {
// contains filtered or unexported fields
}
AgentClient is a client for the Agent schema.
func NewAgentClient ¶
func NewAgentClient(c config) *AgentClient
NewAgentClient returns a client for the Agent from the given config.
func (*AgentClient) Create ¶
func (c *AgentClient) Create() *AgentCreate
Create returns a builder for creating a Agent entity.
func (*AgentClient) CreateBulk ¶
func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk
CreateBulk returns a builder for creating a bulk of Agent entities.
func (*AgentClient) Delete ¶
func (c *AgentClient) Delete() *AgentDelete
Delete returns a delete builder for Agent.
func (*AgentClient) DeleteOne ¶
func (c *AgentClient) DeleteOne(a *Agent) *AgentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AgentClient) DeleteOneID ¶
func (c *AgentClient) DeleteOneID(id uuid.UUID) *AgentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AgentClient) Intercept ¶
func (c *AgentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `agent.Intercept(f(g(h())))`.
func (*AgentClient) Interceptors ¶
func (c *AgentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AgentClient) Query ¶
func (c *AgentClient) Query() *AgentQuery
Query returns a query builder for Agent.
func (*AgentClient) Update ¶
func (c *AgentClient) Update() *AgentUpdate
Update returns an update builder for Agent.
func (*AgentClient) UpdateOne ¶
func (c *AgentClient) UpdateOne(a *Agent) *AgentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AgentClient) UpdateOneID ¶
func (c *AgentClient) UpdateOneID(id uuid.UUID) *AgentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AgentClient) Use ¶
func (c *AgentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `agent.Hooks(f(g(h())))`.
type AgentCreate ¶
type AgentCreate struct {
// contains filtered or unexported fields
}
AgentCreate is the builder for creating a Agent entity.
func (*AgentCreate) Exec ¶
func (ac *AgentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreate) ExecX ¶
func (ac *AgentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentCreate) Mutation ¶
func (ac *AgentCreate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentCreate) Save ¶
func (ac *AgentCreate) Save(ctx context.Context) (*Agent, error)
Save creates the Agent in the database.
func (*AgentCreate) SaveX ¶
func (ac *AgentCreate) SaveX(ctx context.Context) *Agent
SaveX calls Save and panics if Save returns an error.
func (*AgentCreate) SetActive ¶ added in v0.0.2
func (ac *AgentCreate) SetActive(b bool) *AgentCreate
SetActive sets the "active" field.
func (*AgentCreate) SetID ¶
func (ac *AgentCreate) SetID(u uuid.UUID) *AgentCreate
SetID sets the "id" field.
func (*AgentCreate) SetLastUpdateTime ¶ added in v0.0.2
func (ac *AgentCreate) SetLastUpdateTime(t time.Time) *AgentCreate
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentCreate) SetNillableActive ¶ added in v0.0.2
func (ac *AgentCreate) SetNillableActive(b *bool) *AgentCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*AgentCreate) SetNillableID ¶
func (ac *AgentCreate) SetNillableID(u *uuid.UUID) *AgentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AgentCreate) SetNillableLastUpdateTime ¶ added in v0.0.2
func (ac *AgentCreate) SetNillableLastUpdateTime(t *time.Time) *AgentCreate
SetNillableLastUpdateTime sets the "last_update_time" field if the given value is not nil.
func (*AgentCreate) SetPeerID ¶ added in v0.0.2
func (ac *AgentCreate) SetPeerID(s string) *AgentCreate
SetPeerID sets the "peer_id" field.
type AgentCreateBulk ¶
type AgentCreateBulk struct {
// contains filtered or unexported fields
}
AgentCreateBulk is the builder for creating many Agent entities in bulk.
func (*AgentCreateBulk) Exec ¶
func (acb *AgentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreateBulk) ExecX ¶
func (acb *AgentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AgentDelete ¶
type AgentDelete struct {
// contains filtered or unexported fields
}
AgentDelete is the builder for deleting a Agent entity.
func (*AgentDelete) Exec ¶
func (ad *AgentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AgentDelete) ExecX ¶
func (ad *AgentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AgentDelete) Where ¶
func (ad *AgentDelete) Where(ps ...predicate.Agent) *AgentDelete
Where appends a list predicates to the AgentDelete builder.
type AgentDeleteOne ¶
type AgentDeleteOne struct {
// contains filtered or unexported fields
}
AgentDeleteOne is the builder for deleting a single Agent entity.
func (*AgentDeleteOne) Exec ¶
func (ado *AgentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AgentDeleteOne) ExecX ¶
func (ado *AgentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentDeleteOne) Where ¶
func (ado *AgentDeleteOne) Where(ps ...predicate.Agent) *AgentDeleteOne
Where appends a list predicates to the AgentDelete builder.
type AgentGroupBy ¶
type AgentGroupBy struct {
// contains filtered or unexported fields
}
AgentGroupBy is the group-by builder for Agent entities.
func (*AgentGroupBy) Aggregate ¶
func (agb *AgentGroupBy) Aggregate(fns ...AggregateFunc) *AgentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AgentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Scan ¶
func (agb *AgentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgentMutation ¶
type AgentMutation struct {
// contains filtered or unexported fields
}
AgentMutation represents an operation that mutates the Agent nodes in the graph.
func (*AgentMutation) Active ¶ added in v0.0.2
func (m *AgentMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*AgentMutation) AddField ¶
func (m *AgentMutation) 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 (*AgentMutation) AddedEdges ¶
func (m *AgentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AgentMutation) AddedField ¶
func (m *AgentMutation) 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 (*AgentMutation) AddedFields ¶
func (m *AgentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AgentMutation) AddedIDs ¶
func (m *AgentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AgentMutation) ClearEdge ¶
func (m *AgentMutation) 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 (*AgentMutation) ClearField ¶
func (m *AgentMutation) 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 (*AgentMutation) ClearedEdges ¶
func (m *AgentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AgentMutation) ClearedFields ¶
func (m *AgentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AgentMutation) Client ¶
func (m AgentMutation) 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 (*AgentMutation) EdgeCleared ¶
func (m *AgentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AgentMutation) Field ¶
func (m *AgentMutation) 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 (*AgentMutation) FieldCleared ¶
func (m *AgentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AgentMutation) Fields ¶
func (m *AgentMutation) 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 (*AgentMutation) ID ¶
func (m *AgentMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AgentMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AgentMutation) LastUpdateTime ¶ added in v0.0.2
func (m *AgentMutation) LastUpdateTime() (r time.Time, exists bool)
LastUpdateTime returns the value of the "last_update_time" field in the mutation.
func (*AgentMutation) OldActive ¶ added in v0.0.2
func (m *AgentMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the Agent entity. If the Agent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AgentMutation) 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 (*AgentMutation) OldLastUpdateTime ¶ added in v0.0.2
OldLastUpdateTime returns the old "last_update_time" field's value of the Agent entity. If the Agent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AgentMutation) OldPeerID ¶ added in v0.0.2
func (m *AgentMutation) OldPeerID(ctx context.Context) (v string, err error)
OldPeerID returns the old "peer_id" field's value of the Agent entity. If the Agent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AgentMutation) PeerID ¶ added in v0.0.2
func (m *AgentMutation) PeerID() (r string, exists bool)
PeerID returns the value of the "peer_id" field in the mutation.
func (*AgentMutation) RemovedEdges ¶
func (m *AgentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AgentMutation) RemovedIDs ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetActive ¶ added in v0.0.2
func (m *AgentMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*AgentMutation) ResetEdge ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetField ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetLastUpdateTime ¶ added in v0.0.2
func (m *AgentMutation) ResetLastUpdateTime()
ResetLastUpdateTime resets all changes to the "last_update_time" field.
func (*AgentMutation) ResetPeerID ¶ added in v0.0.2
func (m *AgentMutation) ResetPeerID()
ResetPeerID resets all changes to the "peer_id" field.
func (*AgentMutation) SetActive ¶ added in v0.0.2
func (m *AgentMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*AgentMutation) SetField ¶
func (m *AgentMutation) 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 (*AgentMutation) SetID ¶
func (m *AgentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Agent entities.
func (*AgentMutation) SetLastUpdateTime ¶ added in v0.0.2
func (m *AgentMutation) SetLastUpdateTime(t time.Time)
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentMutation) SetOp ¶
func (m *AgentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AgentMutation) SetPeerID ¶ added in v0.0.2
func (m *AgentMutation) SetPeerID(s string)
SetPeerID sets the "peer_id" field.
func (AgentMutation) Tx ¶
func (m AgentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AgentMutation) Type ¶
func (m *AgentMutation) Type() string
Type returns the node type of this mutation (Agent).
func (*AgentMutation) Where ¶
func (m *AgentMutation) Where(ps ...predicate.Agent)
Where appends a list predicates to the AgentMutation builder.
func (*AgentMutation) WhereP ¶
func (m *AgentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AgentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AgentQuery ¶
type AgentQuery struct {
// contains filtered or unexported fields
}
AgentQuery is the builder for querying Agent entities.
func (*AgentQuery) Aggregate ¶
func (aq *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
Aggregate returns a AgentSelect configured with the given aggregations.
func (*AgentQuery) All ¶
func (aq *AgentQuery) All(ctx context.Context) ([]*Agent, error)
All executes the query and returns a list of Agents.
func (*AgentQuery) AllX ¶
func (aq *AgentQuery) AllX(ctx context.Context) []*Agent
AllX is like All, but panics if an error occurs.
func (*AgentQuery) Clone ¶
func (aq *AgentQuery) Clone() *AgentQuery
Clone returns a duplicate of the AgentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AgentQuery) Count ¶
func (aq *AgentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AgentQuery) CountX ¶
func (aq *AgentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AgentQuery) Exist ¶
func (aq *AgentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AgentQuery) ExistX ¶
func (aq *AgentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AgentQuery) First ¶
func (aq *AgentQuery) First(ctx context.Context) (*Agent, error)
First returns the first Agent entity from the query. Returns a *NotFoundError when no Agent was found.
func (*AgentQuery) FirstID ¶
FirstID returns the first Agent ID from the query. Returns a *NotFoundError when no Agent ID was found.
func (*AgentQuery) FirstIDX ¶
func (aq *AgentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AgentQuery) FirstX ¶
func (aq *AgentQuery) FirstX(ctx context.Context) *Agent
FirstX is like First, but panics if an error occurs.
func (*AgentQuery) GroupBy ¶
func (aq *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy
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 { PeerID string `json:"peer_id,omitempty"` Count int `json:"count,omitempty"` } client.Agent.Query(). GroupBy(agent.FieldPeerID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AgentQuery) IDsX ¶
func (aq *AgentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AgentQuery) Limit ¶
func (aq *AgentQuery) Limit(limit int) *AgentQuery
Limit the number of records to be returned by this query.
func (*AgentQuery) Offset ¶
func (aq *AgentQuery) Offset(offset int) *AgentQuery
Offset to start from.
func (*AgentQuery) Only ¶
func (aq *AgentQuery) Only(ctx context.Context) (*Agent, error)
Only returns a single Agent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Agent entity is found. Returns a *NotFoundError when no Agent entities are found.
func (*AgentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Agent ID in the query. Returns a *NotSingularError when more than one Agent ID is found. Returns a *NotFoundError when no entities are found.
func (*AgentQuery) OnlyIDX ¶
func (aq *AgentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AgentQuery) OnlyX ¶
func (aq *AgentQuery) OnlyX(ctx context.Context) *Agent
OnlyX is like Only, but panics if an error occurs.
func (*AgentQuery) Order ¶
func (aq *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
Order specifies how the records should be ordered.
func (*AgentQuery) Select ¶
func (aq *AgentQuery) Select(fields ...string) *AgentSelect
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 { PeerID string `json:"peer_id,omitempty"` } client.Agent.Query(). Select(agent.FieldPeerID). Scan(ctx, &v)
func (*AgentQuery) Unique ¶
func (aq *AgentQuery) Unique(unique bool) *AgentQuery
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 (*AgentQuery) Where ¶
func (aq *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery
Where adds a new predicate for the AgentQuery builder.
type AgentSelect ¶
type AgentSelect struct { *AgentQuery // contains filtered or unexported fields }
AgentSelect is the builder for selecting fields of Agent entities.
func (*AgentSelect) Aggregate ¶
func (as *AgentSelect) Aggregate(fns ...AggregateFunc) *AgentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AgentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Scan ¶
func (as *AgentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgentUpdate ¶
type AgentUpdate struct {
// contains filtered or unexported fields
}
AgentUpdate is the builder for updating Agent entities.
func (*AgentUpdate) Exec ¶
func (au *AgentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentUpdate) ExecX ¶
func (au *AgentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdate) Mutation ¶
func (au *AgentUpdate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdate) Save ¶
func (au *AgentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AgentUpdate) SaveX ¶
func (au *AgentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdate) SetActive ¶ added in v0.0.2
func (au *AgentUpdate) SetActive(b bool) *AgentUpdate
SetActive sets the "active" field.
func (*AgentUpdate) SetLastUpdateTime ¶ added in v0.0.2
func (au *AgentUpdate) SetLastUpdateTime(t time.Time) *AgentUpdate
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentUpdate) SetNillableActive ¶ added in v0.0.2
func (au *AgentUpdate) SetNillableActive(b *bool) *AgentUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*AgentUpdate) SetPeerID ¶ added in v0.0.2
func (au *AgentUpdate) SetPeerID(s string) *AgentUpdate
SetPeerID sets the "peer_id" field.
func (*AgentUpdate) Where ¶
func (au *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate
Where appends a list predicates to the AgentUpdate builder.
type AgentUpdateOne ¶
type AgentUpdateOne struct {
// contains filtered or unexported fields
}
AgentUpdateOne is the builder for updating a single Agent entity.
func (*AgentUpdateOne) Exec ¶
func (auo *AgentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AgentUpdateOne) ExecX ¶
func (auo *AgentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdateOne) Mutation ¶
func (auo *AgentUpdateOne) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdateOne) Save ¶
func (auo *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
Save executes the query and returns the updated Agent entity.
func (*AgentUpdateOne) SaveX ¶
func (auo *AgentUpdateOne) SaveX(ctx context.Context) *Agent
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdateOne) Select ¶
func (auo *AgentUpdateOne) Select(field string, fields ...string) *AgentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AgentUpdateOne) SetActive ¶ added in v0.0.2
func (auo *AgentUpdateOne) SetActive(b bool) *AgentUpdateOne
SetActive sets the "active" field.
func (*AgentUpdateOne) SetLastUpdateTime ¶ added in v0.0.2
func (auo *AgentUpdateOne) SetLastUpdateTime(t time.Time) *AgentUpdateOne
SetLastUpdateTime sets the "last_update_time" field.
func (*AgentUpdateOne) SetNillableActive ¶ added in v0.0.2
func (auo *AgentUpdateOne) SetNillableActive(b *bool) *AgentUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*AgentUpdateOne) SetPeerID ¶ added in v0.0.2
func (auo *AgentUpdateOne) SetPeerID(s string) *AgentUpdateOne
SetPeerID sets the "peer_id" field.
func (*AgentUpdateOne) Where ¶
func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne
Where appends a list predicates to the AgentUpdate builder.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Agent is the client for interacting with the Agent builders. Agent *AgentClient // ComputeImage is the client for interacting with the ComputeImage builders. ComputeImage *ComputeImageClient // ComputeInstance is the client for interacting with the ComputeInstance builders. ComputeInstance *ComputeInstanceClient // ComputeSpec is the client for interacting with the ComputeSpec builders. ComputeSpec *ComputeSpecClient // Employee is the client for interacting with the Employee builders. Employee *EmployeeClient // Script is the client for interacting with the Script builders. Script *ScriptClient // ScriptExecutionRecord is the client for interacting with the ScriptExecutionRecord builders. ScriptExecutionRecord *ScriptExecutionRecordClient // Storage is the client for interacting with the Storage builders. Storage *StorageClient // User is the client for interacting with the User builders. User *UserClient // 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(). Agent. 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 ComputeImage ¶
type ComputeImage struct { // ID of the ent. ID int32 `json:"id,omitempty"` // 显示名 Name string `json:"name,omitempty"` // 镜像名 Image string `json:"image,omitempty"` // 版本名 Tag string `json:"tag,omitempty"` // 端口号 Port int32 `json:"port,omitempty"` // 容器命令 Command string `json:"command,omitempty"` // contains filtered or unexported fields }
ComputeImage is the model entity for the ComputeImage schema.
func (*ComputeImage) String ¶
func (ci *ComputeImage) String() string
String implements the fmt.Stringer.
func (*ComputeImage) Unwrap ¶
func (ci *ComputeImage) Unwrap() *ComputeImage
Unwrap unwraps the ComputeImage 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 (*ComputeImage) Update ¶
func (ci *ComputeImage) Update() *ComputeImageUpdateOne
Update returns a builder for updating this ComputeImage. Note that you need to call ComputeImage.Unwrap() before calling this method if this ComputeImage was returned from a transaction, and the transaction was committed or rolled back.
type ComputeImageClient ¶
type ComputeImageClient struct {
// contains filtered or unexported fields
}
ComputeImageClient is a client for the ComputeImage schema.
func NewComputeImageClient ¶
func NewComputeImageClient(c config) *ComputeImageClient
NewComputeImageClient returns a client for the ComputeImage from the given config.
func (*ComputeImageClient) Create ¶
func (c *ComputeImageClient) Create() *ComputeImageCreate
Create returns a builder for creating a ComputeImage entity.
func (*ComputeImageClient) CreateBulk ¶
func (c *ComputeImageClient) CreateBulk(builders ...*ComputeImageCreate) *ComputeImageCreateBulk
CreateBulk returns a builder for creating a bulk of ComputeImage entities.
func (*ComputeImageClient) Delete ¶
func (c *ComputeImageClient) Delete() *ComputeImageDelete
Delete returns a delete builder for ComputeImage.
func (*ComputeImageClient) DeleteOne ¶
func (c *ComputeImageClient) DeleteOne(ci *ComputeImage) *ComputeImageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ComputeImageClient) DeleteOneID ¶
func (c *ComputeImageClient) DeleteOneID(id int32) *ComputeImageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ComputeImageClient) Get ¶
func (c *ComputeImageClient) Get(ctx context.Context, id int32) (*ComputeImage, error)
Get returns a ComputeImage entity by its id.
func (*ComputeImageClient) GetX ¶
func (c *ComputeImageClient) GetX(ctx context.Context, id int32) *ComputeImage
GetX is like Get, but panics if an error occurs.
func (*ComputeImageClient) Hooks ¶
func (c *ComputeImageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ComputeImageClient) Intercept ¶
func (c *ComputeImageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `computeimage.Intercept(f(g(h())))`.
func (*ComputeImageClient) Interceptors ¶
func (c *ComputeImageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ComputeImageClient) Query ¶
func (c *ComputeImageClient) Query() *ComputeImageQuery
Query returns a query builder for ComputeImage.
func (*ComputeImageClient) Update ¶
func (c *ComputeImageClient) Update() *ComputeImageUpdate
Update returns an update builder for ComputeImage.
func (*ComputeImageClient) UpdateOne ¶
func (c *ComputeImageClient) UpdateOne(ci *ComputeImage) *ComputeImageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ComputeImageClient) UpdateOneID ¶
func (c *ComputeImageClient) UpdateOneID(id int32) *ComputeImageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ComputeImageClient) Use ¶
func (c *ComputeImageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `computeimage.Hooks(f(g(h())))`.
type ComputeImageCreate ¶
type ComputeImageCreate struct {
// contains filtered or unexported fields
}
ComputeImageCreate is the builder for creating a ComputeImage entity.
func (*ComputeImageCreate) Exec ¶
func (cic *ComputeImageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageCreate) ExecX ¶
func (cic *ComputeImageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageCreate) Mutation ¶
func (cic *ComputeImageCreate) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageCreate) Save ¶
func (cic *ComputeImageCreate) Save(ctx context.Context) (*ComputeImage, error)
Save creates the ComputeImage in the database.
func (*ComputeImageCreate) SaveX ¶
func (cic *ComputeImageCreate) SaveX(ctx context.Context) *ComputeImage
SaveX calls Save and panics if Save returns an error.
func (*ComputeImageCreate) SetCommand ¶ added in v0.0.3
func (cic *ComputeImageCreate) SetCommand(s string) *ComputeImageCreate
SetCommand sets the "command" field.
func (*ComputeImageCreate) SetID ¶
func (cic *ComputeImageCreate) SetID(i int32) *ComputeImageCreate
SetID sets the "id" field.
func (*ComputeImageCreate) SetImage ¶
func (cic *ComputeImageCreate) SetImage(s string) *ComputeImageCreate
SetImage sets the "image" field.
func (*ComputeImageCreate) SetName ¶
func (cic *ComputeImageCreate) SetName(s string) *ComputeImageCreate
SetName sets the "name" field.
func (*ComputeImageCreate) SetPort ¶
func (cic *ComputeImageCreate) SetPort(i int32) *ComputeImageCreate
SetPort sets the "port" field.
func (*ComputeImageCreate) SetTag ¶
func (cic *ComputeImageCreate) SetTag(s string) *ComputeImageCreate
SetTag sets the "tag" field.
type ComputeImageCreateBulk ¶
type ComputeImageCreateBulk struct {
// contains filtered or unexported fields
}
ComputeImageCreateBulk is the builder for creating many ComputeImage entities in bulk.
func (*ComputeImageCreateBulk) Exec ¶
func (cicb *ComputeImageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageCreateBulk) ExecX ¶
func (cicb *ComputeImageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageCreateBulk) Save ¶
func (cicb *ComputeImageCreateBulk) Save(ctx context.Context) ([]*ComputeImage, error)
Save creates the ComputeImage entities in the database.
func (*ComputeImageCreateBulk) SaveX ¶
func (cicb *ComputeImageCreateBulk) SaveX(ctx context.Context) []*ComputeImage
SaveX is like Save, but panics if an error occurs.
type ComputeImageDelete ¶
type ComputeImageDelete struct {
// contains filtered or unexported fields
}
ComputeImageDelete is the builder for deleting a ComputeImage entity.
func (*ComputeImageDelete) Exec ¶
func (cid *ComputeImageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeImageDelete) ExecX ¶
func (cid *ComputeImageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageDelete) Where ¶
func (cid *ComputeImageDelete) Where(ps ...predicate.ComputeImage) *ComputeImageDelete
Where appends a list predicates to the ComputeImageDelete builder.
type ComputeImageDeleteOne ¶
type ComputeImageDeleteOne struct {
// contains filtered or unexported fields
}
ComputeImageDeleteOne is the builder for deleting a single ComputeImage entity.
func (*ComputeImageDeleteOne) Exec ¶
func (cido *ComputeImageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeImageDeleteOne) ExecX ¶
func (cido *ComputeImageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageDeleteOne) Where ¶
func (cido *ComputeImageDeleteOne) Where(ps ...predicate.ComputeImage) *ComputeImageDeleteOne
Where appends a list predicates to the ComputeImageDelete builder.
type ComputeImageGroupBy ¶
type ComputeImageGroupBy struct {
// contains filtered or unexported fields
}
ComputeImageGroupBy is the group-by builder for ComputeImage entities.
func (*ComputeImageGroupBy) Aggregate ¶
func (cigb *ComputeImageGroupBy) Aggregate(fns ...AggregateFunc) *ComputeImageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ComputeImageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Scan ¶
func (cigb *ComputeImageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeImageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeImageMutation ¶
type ComputeImageMutation struct {
// contains filtered or unexported fields
}
ComputeImageMutation represents an operation that mutates the ComputeImage nodes in the graph.
func (*ComputeImageMutation) AddField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) AddPort ¶
func (m *ComputeImageMutation) AddPort(i int32)
AddPort adds i to the "port" field.
func (*ComputeImageMutation) AddedEdges ¶
func (m *ComputeImageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ComputeImageMutation) AddedField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) AddedFields ¶
func (m *ComputeImageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ComputeImageMutation) AddedIDs ¶
func (m *ComputeImageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ComputeImageMutation) AddedPort ¶
func (m *ComputeImageMutation) AddedPort() (r int32, exists bool)
AddedPort returns the value that was added to the "port" field in this mutation.
func (*ComputeImageMutation) ClearEdge ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ClearField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ClearedEdges ¶
func (m *ComputeImageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ComputeImageMutation) ClearedFields ¶
func (m *ComputeImageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ComputeImageMutation) Client ¶
func (m ComputeImageMutation) 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 (*ComputeImageMutation) Command ¶ added in v0.0.3
func (m *ComputeImageMutation) Command() (r string, exists bool)
Command returns the value of the "command" field in the mutation.
func (*ComputeImageMutation) EdgeCleared ¶
func (m *ComputeImageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ComputeImageMutation) Field ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) FieldCleared ¶
func (m *ComputeImageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ComputeImageMutation) Fields ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ID ¶
func (m *ComputeImageMutation) ID() (id int32, 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 (*ComputeImageMutation) IDs ¶
func (m *ComputeImageMutation) IDs(ctx context.Context) ([]int32, 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 (*ComputeImageMutation) Image ¶
func (m *ComputeImageMutation) Image() (r string, exists bool)
Image returns the value of the "image" field in the mutation.
func (*ComputeImageMutation) Name ¶
func (m *ComputeImageMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ComputeImageMutation) OldCommand ¶ added in v0.0.3
func (m *ComputeImageMutation) OldCommand(ctx context.Context) (v string, err error)
OldCommand returns the old "command" field's value of the ComputeImage entity. If the ComputeImage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeImageMutation) 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 (*ComputeImageMutation) OldImage ¶
func (m *ComputeImageMutation) OldImage(ctx context.Context) (v string, err error)
OldImage returns the old "image" field's value of the ComputeImage entity. If the ComputeImage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeImageMutation) OldName ¶
func (m *ComputeImageMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ComputeImage entity. If the ComputeImage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeImageMutation) OldPort ¶
func (m *ComputeImageMutation) OldPort(ctx context.Context) (v int32, err error)
OldPort returns the old "port" field's value of the ComputeImage entity. If the ComputeImage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeImageMutation) OldTag ¶
func (m *ComputeImageMutation) OldTag(ctx context.Context) (v string, err error)
OldTag returns the old "tag" field's value of the ComputeImage entity. If the ComputeImage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeImageMutation) Op ¶
func (m *ComputeImageMutation) Op() Op
Op returns the operation name.
func (*ComputeImageMutation) Port ¶
func (m *ComputeImageMutation) Port() (r int32, exists bool)
Port returns the value of the "port" field in the mutation.
func (*ComputeImageMutation) RemovedEdges ¶
func (m *ComputeImageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ComputeImageMutation) RemovedIDs ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ResetCommand ¶ added in v0.0.3
func (m *ComputeImageMutation) ResetCommand()
ResetCommand resets all changes to the "command" field.
func (*ComputeImageMutation) ResetEdge ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ResetField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ResetImage ¶
func (m *ComputeImageMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*ComputeImageMutation) ResetName ¶
func (m *ComputeImageMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ComputeImageMutation) ResetPort ¶
func (m *ComputeImageMutation) ResetPort()
ResetPort resets all changes to the "port" field.
func (*ComputeImageMutation) ResetTag ¶
func (m *ComputeImageMutation) ResetTag()
ResetTag resets all changes to the "tag" field.
func (*ComputeImageMutation) SetCommand ¶ added in v0.0.3
func (m *ComputeImageMutation) SetCommand(s string)
SetCommand sets the "command" field.
func (*ComputeImageMutation) SetField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) SetID ¶
func (m *ComputeImageMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ComputeImage entities.
func (*ComputeImageMutation) SetImage ¶
func (m *ComputeImageMutation) SetImage(s string)
SetImage sets the "image" field.
func (*ComputeImageMutation) SetName ¶
func (m *ComputeImageMutation) SetName(s string)
SetName sets the "name" field.
func (*ComputeImageMutation) SetOp ¶
func (m *ComputeImageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ComputeImageMutation) SetPort ¶
func (m *ComputeImageMutation) SetPort(i int32)
SetPort sets the "port" field.
func (*ComputeImageMutation) SetTag ¶
func (m *ComputeImageMutation) SetTag(s string)
SetTag sets the "tag" field.
func (*ComputeImageMutation) Tag ¶
func (m *ComputeImageMutation) Tag() (r string, exists bool)
Tag returns the value of the "tag" field in the mutation.
func (ComputeImageMutation) Tx ¶
func (m ComputeImageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ComputeImageMutation) Type ¶
func (m *ComputeImageMutation) Type() string
Type returns the node type of this mutation (ComputeImage).
func (*ComputeImageMutation) Where ¶
func (m *ComputeImageMutation) Where(ps ...predicate.ComputeImage)
Where appends a list predicates to the ComputeImageMutation builder.
func (*ComputeImageMutation) WhereP ¶
func (m *ComputeImageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ComputeImageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ComputeImageQuery ¶
type ComputeImageQuery struct {
// contains filtered or unexported fields
}
ComputeImageQuery is the builder for querying ComputeImage entities.
func (*ComputeImageQuery) Aggregate ¶
func (ciq *ComputeImageQuery) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
Aggregate returns a ComputeImageSelect configured with the given aggregations.
func (*ComputeImageQuery) All ¶
func (ciq *ComputeImageQuery) All(ctx context.Context) ([]*ComputeImage, error)
All executes the query and returns a list of ComputeImages.
func (*ComputeImageQuery) AllX ¶
func (ciq *ComputeImageQuery) AllX(ctx context.Context) []*ComputeImage
AllX is like All, but panics if an error occurs.
func (*ComputeImageQuery) Clone ¶
func (ciq *ComputeImageQuery) Clone() *ComputeImageQuery
Clone returns a duplicate of the ComputeImageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ComputeImageQuery) Count ¶
func (ciq *ComputeImageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeImageQuery) CountX ¶
func (ciq *ComputeImageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeImageQuery) Exist ¶
func (ciq *ComputeImageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeImageQuery) ExistX ¶
func (ciq *ComputeImageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeImageQuery) First ¶
func (ciq *ComputeImageQuery) First(ctx context.Context) (*ComputeImage, error)
First returns the first ComputeImage entity from the query. Returns a *NotFoundError when no ComputeImage was found.
func (*ComputeImageQuery) FirstID ¶
func (ciq *ComputeImageQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first ComputeImage ID from the query. Returns a *NotFoundError when no ComputeImage ID was found.
func (*ComputeImageQuery) FirstIDX ¶
func (ciq *ComputeImageQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeImageQuery) FirstX ¶
func (ciq *ComputeImageQuery) FirstX(ctx context.Context) *ComputeImage
FirstX is like First, but panics if an error occurs.
func (*ComputeImageQuery) GroupBy ¶
func (ciq *ComputeImageQuery) GroupBy(field string, fields ...string) *ComputeImageGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.ComputeImage.Query(). GroupBy(computeimage.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ComputeImageQuery) IDs ¶
func (ciq *ComputeImageQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ComputeImage IDs.
func (*ComputeImageQuery) IDsX ¶
func (ciq *ComputeImageQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ComputeImageQuery) Limit ¶
func (ciq *ComputeImageQuery) Limit(limit int) *ComputeImageQuery
Limit the number of records to be returned by this query.
func (*ComputeImageQuery) Offset ¶
func (ciq *ComputeImageQuery) Offset(offset int) *ComputeImageQuery
Offset to start from.
func (*ComputeImageQuery) Only ¶
func (ciq *ComputeImageQuery) Only(ctx context.Context) (*ComputeImage, error)
Only returns a single ComputeImage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ComputeImage entity is found. Returns a *NotFoundError when no ComputeImage entities are found.
func (*ComputeImageQuery) OnlyID ¶
func (ciq *ComputeImageQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only ComputeImage ID in the query. Returns a *NotSingularError when more than one ComputeImage ID is found. Returns a *NotFoundError when no entities are found.
func (*ComputeImageQuery) OnlyIDX ¶
func (ciq *ComputeImageQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeImageQuery) OnlyX ¶
func (ciq *ComputeImageQuery) OnlyX(ctx context.Context) *ComputeImage
OnlyX is like Only, but panics if an error occurs.
func (*ComputeImageQuery) Order ¶
func (ciq *ComputeImageQuery) Order(o ...computeimage.OrderOption) *ComputeImageQuery
Order specifies how the records should be ordered.
func (*ComputeImageQuery) Select ¶
func (ciq *ComputeImageQuery) Select(fields ...string) *ComputeImageSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.ComputeImage.Query(). Select(computeimage.FieldName). Scan(ctx, &v)
func (*ComputeImageQuery) Unique ¶
func (ciq *ComputeImageQuery) Unique(unique bool) *ComputeImageQuery
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 (*ComputeImageQuery) Where ¶
func (ciq *ComputeImageQuery) Where(ps ...predicate.ComputeImage) *ComputeImageQuery
Where adds a new predicate for the ComputeImageQuery builder.
type ComputeImageSelect ¶
type ComputeImageSelect struct { *ComputeImageQuery // contains filtered or unexported fields }
ComputeImageSelect is the builder for selecting fields of ComputeImage entities.
func (*ComputeImageSelect) Aggregate ¶
func (cis *ComputeImageSelect) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ComputeImageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Scan ¶
func (cis *ComputeImageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeImageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeImageUpdate ¶
type ComputeImageUpdate struct {
// contains filtered or unexported fields
}
ComputeImageUpdate is the builder for updating ComputeImage entities.
func (*ComputeImageUpdate) AddPort ¶
func (ciu *ComputeImageUpdate) AddPort(i int32) *ComputeImageUpdate
AddPort adds i to the "port" field.
func (*ComputeImageUpdate) Exec ¶
func (ciu *ComputeImageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageUpdate) ExecX ¶
func (ciu *ComputeImageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageUpdate) Mutation ¶
func (ciu *ComputeImageUpdate) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageUpdate) Save ¶
func (ciu *ComputeImageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ComputeImageUpdate) SaveX ¶
func (ciu *ComputeImageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeImageUpdate) SetCommand ¶ added in v0.0.3
func (ciu *ComputeImageUpdate) SetCommand(s string) *ComputeImageUpdate
SetCommand sets the "command" field.
func (*ComputeImageUpdate) SetImage ¶
func (ciu *ComputeImageUpdate) SetImage(s string) *ComputeImageUpdate
SetImage sets the "image" field.
func (*ComputeImageUpdate) SetName ¶
func (ciu *ComputeImageUpdate) SetName(s string) *ComputeImageUpdate
SetName sets the "name" field.
func (*ComputeImageUpdate) SetPort ¶
func (ciu *ComputeImageUpdate) SetPort(i int32) *ComputeImageUpdate
SetPort sets the "port" field.
func (*ComputeImageUpdate) SetTag ¶
func (ciu *ComputeImageUpdate) SetTag(s string) *ComputeImageUpdate
SetTag sets the "tag" field.
func (*ComputeImageUpdate) Where ¶
func (ciu *ComputeImageUpdate) Where(ps ...predicate.ComputeImage) *ComputeImageUpdate
Where appends a list predicates to the ComputeImageUpdate builder.
type ComputeImageUpdateOne ¶
type ComputeImageUpdateOne struct {
// contains filtered or unexported fields
}
ComputeImageUpdateOne is the builder for updating a single ComputeImage entity.
func (*ComputeImageUpdateOne) AddPort ¶
func (ciuo *ComputeImageUpdateOne) AddPort(i int32) *ComputeImageUpdateOne
AddPort adds i to the "port" field.
func (*ComputeImageUpdateOne) Exec ¶
func (ciuo *ComputeImageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeImageUpdateOne) ExecX ¶
func (ciuo *ComputeImageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageUpdateOne) Mutation ¶
func (ciuo *ComputeImageUpdateOne) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageUpdateOne) Save ¶
func (ciuo *ComputeImageUpdateOne) Save(ctx context.Context) (*ComputeImage, error)
Save executes the query and returns the updated ComputeImage entity.
func (*ComputeImageUpdateOne) SaveX ¶
func (ciuo *ComputeImageUpdateOne) SaveX(ctx context.Context) *ComputeImage
SaveX is like Save, but panics if an error occurs.
func (*ComputeImageUpdateOne) Select ¶
func (ciuo *ComputeImageUpdateOne) Select(field string, fields ...string) *ComputeImageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ComputeImageUpdateOne) SetCommand ¶ added in v0.0.3
func (ciuo *ComputeImageUpdateOne) SetCommand(s string) *ComputeImageUpdateOne
SetCommand sets the "command" field.
func (*ComputeImageUpdateOne) SetImage ¶
func (ciuo *ComputeImageUpdateOne) SetImage(s string) *ComputeImageUpdateOne
SetImage sets the "image" field.
func (*ComputeImageUpdateOne) SetName ¶
func (ciuo *ComputeImageUpdateOne) SetName(s string) *ComputeImageUpdateOne
SetName sets the "name" field.
func (*ComputeImageUpdateOne) SetPort ¶
func (ciuo *ComputeImageUpdateOne) SetPort(i int32) *ComputeImageUpdateOne
SetPort sets the "port" field.
func (*ComputeImageUpdateOne) SetTag ¶
func (ciuo *ComputeImageUpdateOne) SetTag(s string) *ComputeImageUpdateOne
SetTag sets the "tag" field.
func (*ComputeImageUpdateOne) Where ¶
func (ciuo *ComputeImageUpdateOne) Where(ps ...predicate.ComputeImage) *ComputeImageUpdateOne
Where appends a list predicates to the ComputeImageUpdate builder.
type ComputeImages ¶
type ComputeImages []*ComputeImage
ComputeImages is a parsable slice of ComputeImage.
type ComputeInstance ¶
type ComputeInstance struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Owner holds the value of the "owner" field. Owner string `json:"owner,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Core holds the value of the "core" field. Core string `json:"core,omitempty"` // Memory holds the value of the "memory" field. Memory string `json:"memory,omitempty"` // Image holds the value of the "image" field. Image string `json:"image,omitempty"` // 容器端口 Port string `json:"port,omitempty"` // ExpirationTime holds the value of the "expiration_time" field. ExpirationTime time.Time `json:"expiration_time,omitempty"` // 0: 启动中,1:运行中,2:连接中断, 3:过期 Status int8 `json:"status,omitempty"` // 容器id ContainerID string `json:"container_id,omitempty"` // p2p agent Id PeerID string `json:"peer_id,omitempty"` // 容器启动命令 Command string `json:"command,omitempty"` // contains filtered or unexported fields }
ComputeInstance is the model entity for the ComputeInstance schema.
func (*ComputeInstance) String ¶
func (ci *ComputeInstance) String() string
String implements the fmt.Stringer.
func (*ComputeInstance) Unwrap ¶
func (ci *ComputeInstance) Unwrap() *ComputeInstance
Unwrap unwraps the ComputeInstance 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 (*ComputeInstance) Update ¶
func (ci *ComputeInstance) Update() *ComputeInstanceUpdateOne
Update returns a builder for updating this ComputeInstance. Note that you need to call ComputeInstance.Unwrap() before calling this method if this ComputeInstance was returned from a transaction, and the transaction was committed or rolled back.
type ComputeInstanceClient ¶
type ComputeInstanceClient struct {
// contains filtered or unexported fields
}
ComputeInstanceClient is a client for the ComputeInstance schema.
func NewComputeInstanceClient ¶
func NewComputeInstanceClient(c config) *ComputeInstanceClient
NewComputeInstanceClient returns a client for the ComputeInstance from the given config.
func (*ComputeInstanceClient) Create ¶
func (c *ComputeInstanceClient) Create() *ComputeInstanceCreate
Create returns a builder for creating a ComputeInstance entity.
func (*ComputeInstanceClient) CreateBulk ¶
func (c *ComputeInstanceClient) CreateBulk(builders ...*ComputeInstanceCreate) *ComputeInstanceCreateBulk
CreateBulk returns a builder for creating a bulk of ComputeInstance entities.
func (*ComputeInstanceClient) Delete ¶
func (c *ComputeInstanceClient) Delete() *ComputeInstanceDelete
Delete returns a delete builder for ComputeInstance.
func (*ComputeInstanceClient) DeleteOne ¶
func (c *ComputeInstanceClient) DeleteOne(ci *ComputeInstance) *ComputeInstanceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ComputeInstanceClient) DeleteOneID ¶
func (c *ComputeInstanceClient) DeleteOneID(id uuid.UUID) *ComputeInstanceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ComputeInstanceClient) Get ¶
func (c *ComputeInstanceClient) Get(ctx context.Context, id uuid.UUID) (*ComputeInstance, error)
Get returns a ComputeInstance entity by its id.
func (*ComputeInstanceClient) GetX ¶
func (c *ComputeInstanceClient) GetX(ctx context.Context, id uuid.UUID) *ComputeInstance
GetX is like Get, but panics if an error occurs.
func (*ComputeInstanceClient) Hooks ¶
func (c *ComputeInstanceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ComputeInstanceClient) Intercept ¶
func (c *ComputeInstanceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `computeinstance.Intercept(f(g(h())))`.
func (*ComputeInstanceClient) Interceptors ¶
func (c *ComputeInstanceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ComputeInstanceClient) Query ¶
func (c *ComputeInstanceClient) Query() *ComputeInstanceQuery
Query returns a query builder for ComputeInstance.
func (*ComputeInstanceClient) Update ¶
func (c *ComputeInstanceClient) Update() *ComputeInstanceUpdate
Update returns an update builder for ComputeInstance.
func (*ComputeInstanceClient) UpdateOne ¶
func (c *ComputeInstanceClient) UpdateOne(ci *ComputeInstance) *ComputeInstanceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ComputeInstanceClient) UpdateOneID ¶
func (c *ComputeInstanceClient) UpdateOneID(id uuid.UUID) *ComputeInstanceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ComputeInstanceClient) Use ¶
func (c *ComputeInstanceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `computeinstance.Hooks(f(g(h())))`.
type ComputeInstanceCreate ¶
type ComputeInstanceCreate struct {
// contains filtered or unexported fields
}
ComputeInstanceCreate is the builder for creating a ComputeInstance entity.
func (*ComputeInstanceCreate) Exec ¶
func (cic *ComputeInstanceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceCreate) ExecX ¶
func (cic *ComputeInstanceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceCreate) Mutation ¶
func (cic *ComputeInstanceCreate) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceCreate) Save ¶
func (cic *ComputeInstanceCreate) Save(ctx context.Context) (*ComputeInstance, error)
Save creates the ComputeInstance in the database.
func (*ComputeInstanceCreate) SaveX ¶
func (cic *ComputeInstanceCreate) SaveX(ctx context.Context) *ComputeInstance
SaveX calls Save and panics if Save returns an error.
func (*ComputeInstanceCreate) SetCommand ¶ added in v0.0.3
func (cic *ComputeInstanceCreate) SetCommand(s string) *ComputeInstanceCreate
SetCommand sets the "command" field.
func (*ComputeInstanceCreate) SetContainerID ¶
func (cic *ComputeInstanceCreate) SetContainerID(s string) *ComputeInstanceCreate
SetContainerID sets the "container_id" field.
func (*ComputeInstanceCreate) SetCore ¶
func (cic *ComputeInstanceCreate) SetCore(s string) *ComputeInstanceCreate
SetCore sets the "core" field.
func (*ComputeInstanceCreate) SetExpirationTime ¶
func (cic *ComputeInstanceCreate) SetExpirationTime(t time.Time) *ComputeInstanceCreate
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceCreate) SetID ¶
func (cic *ComputeInstanceCreate) SetID(u uuid.UUID) *ComputeInstanceCreate
SetID sets the "id" field.
func (*ComputeInstanceCreate) SetImage ¶
func (cic *ComputeInstanceCreate) SetImage(s string) *ComputeInstanceCreate
SetImage sets the "image" field.
func (*ComputeInstanceCreate) SetMemory ¶
func (cic *ComputeInstanceCreate) SetMemory(s string) *ComputeInstanceCreate
SetMemory sets the "memory" field.
func (*ComputeInstanceCreate) SetName ¶
func (cic *ComputeInstanceCreate) SetName(s string) *ComputeInstanceCreate
SetName sets the "name" field.
func (*ComputeInstanceCreate) SetNillableCommand ¶ added in v0.0.3
func (cic *ComputeInstanceCreate) SetNillableCommand(s *string) *ComputeInstanceCreate
SetNillableCommand sets the "command" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillableContainerID ¶
func (cic *ComputeInstanceCreate) SetNillableContainerID(s *string) *ComputeInstanceCreate
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillableID ¶
func (cic *ComputeInstanceCreate) SetNillableID(u *uuid.UUID) *ComputeInstanceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillablePeerID ¶
func (cic *ComputeInstanceCreate) SetNillablePeerID(s *string) *ComputeInstanceCreate
SetNillablePeerID sets the "peer_id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillablePort ¶ added in v0.0.2
func (cic *ComputeInstanceCreate) SetNillablePort(s *string) *ComputeInstanceCreate
SetNillablePort sets the "port" field if the given value is not nil.
func (*ComputeInstanceCreate) SetOwner ¶
func (cic *ComputeInstanceCreate) SetOwner(s string) *ComputeInstanceCreate
SetOwner sets the "owner" field.
func (*ComputeInstanceCreate) SetPeerID ¶
func (cic *ComputeInstanceCreate) SetPeerID(s string) *ComputeInstanceCreate
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceCreate) SetPort ¶ added in v0.0.2
func (cic *ComputeInstanceCreate) SetPort(s string) *ComputeInstanceCreate
SetPort sets the "port" field.
func (*ComputeInstanceCreate) SetStatus ¶
func (cic *ComputeInstanceCreate) SetStatus(i int8) *ComputeInstanceCreate
SetStatus sets the "status" field.
type ComputeInstanceCreateBulk ¶
type ComputeInstanceCreateBulk struct {
// contains filtered or unexported fields
}
ComputeInstanceCreateBulk is the builder for creating many ComputeInstance entities in bulk.
func (*ComputeInstanceCreateBulk) Exec ¶
func (cicb *ComputeInstanceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceCreateBulk) ExecX ¶
func (cicb *ComputeInstanceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceCreateBulk) Save ¶
func (cicb *ComputeInstanceCreateBulk) Save(ctx context.Context) ([]*ComputeInstance, error)
Save creates the ComputeInstance entities in the database.
func (*ComputeInstanceCreateBulk) SaveX ¶
func (cicb *ComputeInstanceCreateBulk) SaveX(ctx context.Context) []*ComputeInstance
SaveX is like Save, but panics if an error occurs.
type ComputeInstanceDelete ¶
type ComputeInstanceDelete struct {
// contains filtered or unexported fields
}
ComputeInstanceDelete is the builder for deleting a ComputeInstance entity.
func (*ComputeInstanceDelete) Exec ¶
func (cid *ComputeInstanceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeInstanceDelete) ExecX ¶
func (cid *ComputeInstanceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceDelete) Where ¶
func (cid *ComputeInstanceDelete) Where(ps ...predicate.ComputeInstance) *ComputeInstanceDelete
Where appends a list predicates to the ComputeInstanceDelete builder.
type ComputeInstanceDeleteOne ¶
type ComputeInstanceDeleteOne struct {
// contains filtered or unexported fields
}
ComputeInstanceDeleteOne is the builder for deleting a single ComputeInstance entity.
func (*ComputeInstanceDeleteOne) Exec ¶
func (cido *ComputeInstanceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeInstanceDeleteOne) ExecX ¶
func (cido *ComputeInstanceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceDeleteOne) Where ¶
func (cido *ComputeInstanceDeleteOne) Where(ps ...predicate.ComputeInstance) *ComputeInstanceDeleteOne
Where appends a list predicates to the ComputeInstanceDelete builder.
type ComputeInstanceGroupBy ¶
type ComputeInstanceGroupBy struct {
// contains filtered or unexported fields
}
ComputeInstanceGroupBy is the group-by builder for ComputeInstance entities.
func (*ComputeInstanceGroupBy) Aggregate ¶
func (cigb *ComputeInstanceGroupBy) Aggregate(fns ...AggregateFunc) *ComputeInstanceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ComputeInstanceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ComputeInstanceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Scan ¶
func (cigb *ComputeInstanceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeInstanceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeInstanceMutation ¶
type ComputeInstanceMutation struct {
// contains filtered or unexported fields
}
ComputeInstanceMutation represents an operation that mutates the ComputeInstance nodes in the graph.
func (*ComputeInstanceMutation) AddField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) AddStatus ¶
func (m *ComputeInstanceMutation) AddStatus(i int8)
AddStatus adds i to the "status" field.
func (*ComputeInstanceMutation) AddedEdges ¶
func (m *ComputeInstanceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ComputeInstanceMutation) AddedField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) AddedFields ¶
func (m *ComputeInstanceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ComputeInstanceMutation) AddedIDs ¶
func (m *ComputeInstanceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ComputeInstanceMutation) AddedStatus ¶
func (m *ComputeInstanceMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*ComputeInstanceMutation) ClearCommand ¶ added in v0.0.3
func (m *ComputeInstanceMutation) ClearCommand()
ClearCommand clears the value of the "command" field.
func (*ComputeInstanceMutation) ClearContainerID ¶
func (m *ComputeInstanceMutation) ClearContainerID()
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceMutation) ClearEdge ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ClearField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ClearPeerID ¶
func (m *ComputeInstanceMutation) ClearPeerID()
ClearPeerID clears the value of the "peer_id" field.
func (*ComputeInstanceMutation) ClearPort ¶ added in v0.0.2
func (m *ComputeInstanceMutation) ClearPort()
ClearPort clears the value of the "port" field.
func (*ComputeInstanceMutation) ClearedEdges ¶
func (m *ComputeInstanceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ComputeInstanceMutation) ClearedFields ¶
func (m *ComputeInstanceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ComputeInstanceMutation) Client ¶
func (m ComputeInstanceMutation) 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 (*ComputeInstanceMutation) Command ¶ added in v0.0.3
func (m *ComputeInstanceMutation) Command() (r string, exists bool)
Command returns the value of the "command" field in the mutation.
func (*ComputeInstanceMutation) CommandCleared ¶ added in v0.0.3
func (m *ComputeInstanceMutation) CommandCleared() bool
CommandCleared returns if the "command" field was cleared in this mutation.
func (*ComputeInstanceMutation) ContainerID ¶
func (m *ComputeInstanceMutation) ContainerID() (r string, exists bool)
ContainerID returns the value of the "container_id" field in the mutation.
func (*ComputeInstanceMutation) ContainerIDCleared ¶
func (m *ComputeInstanceMutation) ContainerIDCleared() bool
ContainerIDCleared returns if the "container_id" field was cleared in this mutation.
func (*ComputeInstanceMutation) Core ¶
func (m *ComputeInstanceMutation) Core() (r string, exists bool)
Core returns the value of the "core" field in the mutation.
func (*ComputeInstanceMutation) EdgeCleared ¶
func (m *ComputeInstanceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ComputeInstanceMutation) ExpirationTime ¶
func (m *ComputeInstanceMutation) ExpirationTime() (r time.Time, exists bool)
ExpirationTime returns the value of the "expiration_time" field in the mutation.
func (*ComputeInstanceMutation) Field ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) FieldCleared ¶
func (m *ComputeInstanceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ComputeInstanceMutation) Fields ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ID ¶
func (m *ComputeInstanceMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ComputeInstanceMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ComputeInstanceMutation) Image ¶
func (m *ComputeInstanceMutation) Image() (r string, exists bool)
Image returns the value of the "image" field in the mutation.
func (*ComputeInstanceMutation) Memory ¶
func (m *ComputeInstanceMutation) Memory() (r string, exists bool)
Memory returns the value of the "memory" field in the mutation.
func (*ComputeInstanceMutation) Name ¶
func (m *ComputeInstanceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ComputeInstanceMutation) OldCommand ¶ added in v0.0.3
func (m *ComputeInstanceMutation) OldCommand(ctx context.Context) (v string, err error)
OldCommand returns the old "command" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldContainerID ¶
func (m *ComputeInstanceMutation) OldContainerID(ctx context.Context) (v string, err error)
OldContainerID returns the old "container_id" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldCore ¶
func (m *ComputeInstanceMutation) OldCore(ctx context.Context) (v string, err error)
OldCore returns the old "core" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldExpirationTime ¶
OldExpirationTime returns the old "expiration_time" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) 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 (*ComputeInstanceMutation) OldImage ¶
func (m *ComputeInstanceMutation) OldImage(ctx context.Context) (v string, err error)
OldImage returns the old "image" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldMemory ¶
func (m *ComputeInstanceMutation) OldMemory(ctx context.Context) (v string, err error)
OldMemory returns the old "memory" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldName ¶
func (m *ComputeInstanceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldOwner ¶
func (m *ComputeInstanceMutation) OldOwner(ctx context.Context) (v string, err error)
OldOwner returns the old "owner" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldPeerID ¶
func (m *ComputeInstanceMutation) OldPeerID(ctx context.Context) (v string, err error)
OldPeerID returns the old "peer_id" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldPort ¶ added in v0.0.2
func (m *ComputeInstanceMutation) OldPort(ctx context.Context) (v string, err error)
OldPort returns the old "port" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) OldStatus ¶
func (m *ComputeInstanceMutation) OldStatus(ctx context.Context) (v int8, err error)
OldStatus returns the old "status" field's value of the ComputeInstance entity. If the ComputeInstance object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeInstanceMutation) Op ¶
func (m *ComputeInstanceMutation) Op() Op
Op returns the operation name.
func (*ComputeInstanceMutation) Owner ¶
func (m *ComputeInstanceMutation) Owner() (r string, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*ComputeInstanceMutation) PeerID ¶
func (m *ComputeInstanceMutation) PeerID() (r string, exists bool)
PeerID returns the value of the "peer_id" field in the mutation.
func (*ComputeInstanceMutation) PeerIDCleared ¶
func (m *ComputeInstanceMutation) PeerIDCleared() bool
PeerIDCleared returns if the "peer_id" field was cleared in this mutation.
func (*ComputeInstanceMutation) Port ¶ added in v0.0.2
func (m *ComputeInstanceMutation) Port() (r string, exists bool)
Port returns the value of the "port" field in the mutation.
func (*ComputeInstanceMutation) PortCleared ¶ added in v0.0.2
func (m *ComputeInstanceMutation) PortCleared() bool
PortCleared returns if the "port" field was cleared in this mutation.
func (*ComputeInstanceMutation) RemovedEdges ¶
func (m *ComputeInstanceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ComputeInstanceMutation) RemovedIDs ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ResetCommand ¶ added in v0.0.3
func (m *ComputeInstanceMutation) ResetCommand()
ResetCommand resets all changes to the "command" field.
func (*ComputeInstanceMutation) ResetContainerID ¶
func (m *ComputeInstanceMutation) ResetContainerID()
ResetContainerID resets all changes to the "container_id" field.
func (*ComputeInstanceMutation) ResetCore ¶
func (m *ComputeInstanceMutation) ResetCore()
ResetCore resets all changes to the "core" field.
func (*ComputeInstanceMutation) ResetEdge ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ResetExpirationTime ¶
func (m *ComputeInstanceMutation) ResetExpirationTime()
ResetExpirationTime resets all changes to the "expiration_time" field.
func (*ComputeInstanceMutation) ResetField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ResetImage ¶
func (m *ComputeInstanceMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*ComputeInstanceMutation) ResetMemory ¶
func (m *ComputeInstanceMutation) ResetMemory()
ResetMemory resets all changes to the "memory" field.
func (*ComputeInstanceMutation) ResetName ¶
func (m *ComputeInstanceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ComputeInstanceMutation) ResetOwner ¶
func (m *ComputeInstanceMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*ComputeInstanceMutation) ResetPeerID ¶
func (m *ComputeInstanceMutation) ResetPeerID()
ResetPeerID resets all changes to the "peer_id" field.
func (*ComputeInstanceMutation) ResetPort ¶ added in v0.0.2
func (m *ComputeInstanceMutation) ResetPort()
ResetPort resets all changes to the "port" field.
func (*ComputeInstanceMutation) ResetStatus ¶
func (m *ComputeInstanceMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*ComputeInstanceMutation) SetCommand ¶ added in v0.0.3
func (m *ComputeInstanceMutation) SetCommand(s string)
SetCommand sets the "command" field.
func (*ComputeInstanceMutation) SetContainerID ¶
func (m *ComputeInstanceMutation) SetContainerID(s string)
SetContainerID sets the "container_id" field.
func (*ComputeInstanceMutation) SetCore ¶
func (m *ComputeInstanceMutation) SetCore(s string)
SetCore sets the "core" field.
func (*ComputeInstanceMutation) SetExpirationTime ¶
func (m *ComputeInstanceMutation) SetExpirationTime(t time.Time)
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceMutation) SetField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) SetID ¶
func (m *ComputeInstanceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ComputeInstance entities.
func (*ComputeInstanceMutation) SetImage ¶
func (m *ComputeInstanceMutation) SetImage(s string)
SetImage sets the "image" field.
func (*ComputeInstanceMutation) SetMemory ¶
func (m *ComputeInstanceMutation) SetMemory(s string)
SetMemory sets the "memory" field.
func (*ComputeInstanceMutation) SetName ¶
func (m *ComputeInstanceMutation) SetName(s string)
SetName sets the "name" field.
func (*ComputeInstanceMutation) SetOp ¶
func (m *ComputeInstanceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ComputeInstanceMutation) SetOwner ¶
func (m *ComputeInstanceMutation) SetOwner(s string)
SetOwner sets the "owner" field.
func (*ComputeInstanceMutation) SetPeerID ¶
func (m *ComputeInstanceMutation) SetPeerID(s string)
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceMutation) SetPort ¶ added in v0.0.2
func (m *ComputeInstanceMutation) SetPort(s string)
SetPort sets the "port" field.
func (*ComputeInstanceMutation) SetStatus ¶
func (m *ComputeInstanceMutation) SetStatus(i int8)
SetStatus sets the "status" field.
func (*ComputeInstanceMutation) Status ¶
func (m *ComputeInstanceMutation) Status() (r int8, exists bool)
Status returns the value of the "status" field in the mutation.
func (ComputeInstanceMutation) Tx ¶
func (m ComputeInstanceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ComputeInstanceMutation) Type ¶
func (m *ComputeInstanceMutation) Type() string
Type returns the node type of this mutation (ComputeInstance).
func (*ComputeInstanceMutation) Where ¶
func (m *ComputeInstanceMutation) Where(ps ...predicate.ComputeInstance)
Where appends a list predicates to the ComputeInstanceMutation builder.
func (*ComputeInstanceMutation) WhereP ¶
func (m *ComputeInstanceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ComputeInstanceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ComputeInstanceQuery ¶
type ComputeInstanceQuery struct {
// contains filtered or unexported fields
}
ComputeInstanceQuery is the builder for querying ComputeInstance entities.
func (*ComputeInstanceQuery) Aggregate ¶
func (ciq *ComputeInstanceQuery) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
Aggregate returns a ComputeInstanceSelect configured with the given aggregations.
func (*ComputeInstanceQuery) All ¶
func (ciq *ComputeInstanceQuery) All(ctx context.Context) ([]*ComputeInstance, error)
All executes the query and returns a list of ComputeInstances.
func (*ComputeInstanceQuery) AllX ¶
func (ciq *ComputeInstanceQuery) AllX(ctx context.Context) []*ComputeInstance
AllX is like All, but panics if an error occurs.
func (*ComputeInstanceQuery) Clone ¶
func (ciq *ComputeInstanceQuery) Clone() *ComputeInstanceQuery
Clone returns a duplicate of the ComputeInstanceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ComputeInstanceQuery) Count ¶
func (ciq *ComputeInstanceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeInstanceQuery) CountX ¶
func (ciq *ComputeInstanceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeInstanceQuery) Exist ¶
func (ciq *ComputeInstanceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeInstanceQuery) ExistX ¶
func (ciq *ComputeInstanceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeInstanceQuery) First ¶
func (ciq *ComputeInstanceQuery) First(ctx context.Context) (*ComputeInstance, error)
First returns the first ComputeInstance entity from the query. Returns a *NotFoundError when no ComputeInstance was found.
func (*ComputeInstanceQuery) FirstID ¶
FirstID returns the first ComputeInstance ID from the query. Returns a *NotFoundError when no ComputeInstance ID was found.
func (*ComputeInstanceQuery) FirstIDX ¶
func (ciq *ComputeInstanceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeInstanceQuery) FirstX ¶
func (ciq *ComputeInstanceQuery) FirstX(ctx context.Context) *ComputeInstance
FirstX is like First, but panics if an error occurs.
func (*ComputeInstanceQuery) GroupBy ¶
func (ciq *ComputeInstanceQuery) GroupBy(field string, fields ...string) *ComputeInstanceGroupBy
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 { Owner string `json:"owner,omitempty"` Count int `json:"count,omitempty"` } client.ComputeInstance.Query(). GroupBy(computeinstance.FieldOwner). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ComputeInstanceQuery) IDs ¶
IDs executes the query and returns a list of ComputeInstance IDs.
func (*ComputeInstanceQuery) IDsX ¶
func (ciq *ComputeInstanceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ComputeInstanceQuery) Limit ¶
func (ciq *ComputeInstanceQuery) Limit(limit int) *ComputeInstanceQuery
Limit the number of records to be returned by this query.
func (*ComputeInstanceQuery) Offset ¶
func (ciq *ComputeInstanceQuery) Offset(offset int) *ComputeInstanceQuery
Offset to start from.
func (*ComputeInstanceQuery) Only ¶
func (ciq *ComputeInstanceQuery) Only(ctx context.Context) (*ComputeInstance, error)
Only returns a single ComputeInstance entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ComputeInstance entity is found. Returns a *NotFoundError when no ComputeInstance entities are found.
func (*ComputeInstanceQuery) OnlyID ¶
OnlyID is like Only, but returns the only ComputeInstance ID in the query. Returns a *NotSingularError when more than one ComputeInstance ID is found. Returns a *NotFoundError when no entities are found.
func (*ComputeInstanceQuery) OnlyIDX ¶
func (ciq *ComputeInstanceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeInstanceQuery) OnlyX ¶
func (ciq *ComputeInstanceQuery) OnlyX(ctx context.Context) *ComputeInstance
OnlyX is like Only, but panics if an error occurs.
func (*ComputeInstanceQuery) Order ¶
func (ciq *ComputeInstanceQuery) Order(o ...computeinstance.OrderOption) *ComputeInstanceQuery
Order specifies how the records should be ordered.
func (*ComputeInstanceQuery) Select ¶
func (ciq *ComputeInstanceQuery) Select(fields ...string) *ComputeInstanceSelect
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 { Owner string `json:"owner,omitempty"` } client.ComputeInstance.Query(). Select(computeinstance.FieldOwner). Scan(ctx, &v)
func (*ComputeInstanceQuery) Unique ¶
func (ciq *ComputeInstanceQuery) Unique(unique bool) *ComputeInstanceQuery
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 (*ComputeInstanceQuery) Where ¶
func (ciq *ComputeInstanceQuery) Where(ps ...predicate.ComputeInstance) *ComputeInstanceQuery
Where adds a new predicate for the ComputeInstanceQuery builder.
type ComputeInstanceSelect ¶
type ComputeInstanceSelect struct { *ComputeInstanceQuery // contains filtered or unexported fields }
ComputeInstanceSelect is the builder for selecting fields of ComputeInstance entities.
func (*ComputeInstanceSelect) Aggregate ¶
func (cis *ComputeInstanceSelect) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ComputeInstanceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ComputeInstanceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Scan ¶
func (cis *ComputeInstanceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeInstanceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeInstanceUpdate ¶
type ComputeInstanceUpdate struct {
// contains filtered or unexported fields
}
ComputeInstanceUpdate is the builder for updating ComputeInstance entities.
func (*ComputeInstanceUpdate) AddStatus ¶
func (ciu *ComputeInstanceUpdate) AddStatus(i int8) *ComputeInstanceUpdate
AddStatus adds i to the "status" field.
func (*ComputeInstanceUpdate) ClearCommand ¶ added in v0.0.3
func (ciu *ComputeInstanceUpdate) ClearCommand() *ComputeInstanceUpdate
ClearCommand clears the value of the "command" field.
func (*ComputeInstanceUpdate) ClearContainerID ¶
func (ciu *ComputeInstanceUpdate) ClearContainerID() *ComputeInstanceUpdate
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceUpdate) ClearPeerID ¶
func (ciu *ComputeInstanceUpdate) ClearPeerID() *ComputeInstanceUpdate
ClearPeerID clears the value of the "peer_id" field.
func (*ComputeInstanceUpdate) ClearPort ¶ added in v0.0.2
func (ciu *ComputeInstanceUpdate) ClearPort() *ComputeInstanceUpdate
ClearPort clears the value of the "port" field.
func (*ComputeInstanceUpdate) Exec ¶
func (ciu *ComputeInstanceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceUpdate) ExecX ¶
func (ciu *ComputeInstanceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceUpdate) Mutation ¶
func (ciu *ComputeInstanceUpdate) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceUpdate) Save ¶
func (ciu *ComputeInstanceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ComputeInstanceUpdate) SaveX ¶
func (ciu *ComputeInstanceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeInstanceUpdate) SetCommand ¶ added in v0.0.3
func (ciu *ComputeInstanceUpdate) SetCommand(s string) *ComputeInstanceUpdate
SetCommand sets the "command" field.
func (*ComputeInstanceUpdate) SetContainerID ¶
func (ciu *ComputeInstanceUpdate) SetContainerID(s string) *ComputeInstanceUpdate
SetContainerID sets the "container_id" field.
func (*ComputeInstanceUpdate) SetCore ¶
func (ciu *ComputeInstanceUpdate) SetCore(s string) *ComputeInstanceUpdate
SetCore sets the "core" field.
func (*ComputeInstanceUpdate) SetExpirationTime ¶
func (ciu *ComputeInstanceUpdate) SetExpirationTime(t time.Time) *ComputeInstanceUpdate
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceUpdate) SetImage ¶
func (ciu *ComputeInstanceUpdate) SetImage(s string) *ComputeInstanceUpdate
SetImage sets the "image" field.
func (*ComputeInstanceUpdate) SetMemory ¶
func (ciu *ComputeInstanceUpdate) SetMemory(s string) *ComputeInstanceUpdate
SetMemory sets the "memory" field.
func (*ComputeInstanceUpdate) SetName ¶
func (ciu *ComputeInstanceUpdate) SetName(s string) *ComputeInstanceUpdate
SetName sets the "name" field.
func (*ComputeInstanceUpdate) SetNillableCommand ¶ added in v0.0.3
func (ciu *ComputeInstanceUpdate) SetNillableCommand(s *string) *ComputeInstanceUpdate
SetNillableCommand sets the "command" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillableContainerID ¶
func (ciu *ComputeInstanceUpdate) SetNillableContainerID(s *string) *ComputeInstanceUpdate
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillablePeerID ¶
func (ciu *ComputeInstanceUpdate) SetNillablePeerID(s *string) *ComputeInstanceUpdate
SetNillablePeerID sets the "peer_id" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillablePort ¶ added in v0.0.2
func (ciu *ComputeInstanceUpdate) SetNillablePort(s *string) *ComputeInstanceUpdate
SetNillablePort sets the "port" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetOwner ¶
func (ciu *ComputeInstanceUpdate) SetOwner(s string) *ComputeInstanceUpdate
SetOwner sets the "owner" field.
func (*ComputeInstanceUpdate) SetPeerID ¶
func (ciu *ComputeInstanceUpdate) SetPeerID(s string) *ComputeInstanceUpdate
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceUpdate) SetPort ¶ added in v0.0.2
func (ciu *ComputeInstanceUpdate) SetPort(s string) *ComputeInstanceUpdate
SetPort sets the "port" field.
func (*ComputeInstanceUpdate) SetStatus ¶
func (ciu *ComputeInstanceUpdate) SetStatus(i int8) *ComputeInstanceUpdate
SetStatus sets the "status" field.
func (*ComputeInstanceUpdate) Where ¶
func (ciu *ComputeInstanceUpdate) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdate
Where appends a list predicates to the ComputeInstanceUpdate builder.
type ComputeInstanceUpdateOne ¶
type ComputeInstanceUpdateOne struct {
// contains filtered or unexported fields
}
ComputeInstanceUpdateOne is the builder for updating a single ComputeInstance entity.
func (*ComputeInstanceUpdateOne) AddStatus ¶
func (ciuo *ComputeInstanceUpdateOne) AddStatus(i int8) *ComputeInstanceUpdateOne
AddStatus adds i to the "status" field.
func (*ComputeInstanceUpdateOne) ClearCommand ¶ added in v0.0.3
func (ciuo *ComputeInstanceUpdateOne) ClearCommand() *ComputeInstanceUpdateOne
ClearCommand clears the value of the "command" field.
func (*ComputeInstanceUpdateOne) ClearContainerID ¶
func (ciuo *ComputeInstanceUpdateOne) ClearContainerID() *ComputeInstanceUpdateOne
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceUpdateOne) ClearPeerID ¶
func (ciuo *ComputeInstanceUpdateOne) ClearPeerID() *ComputeInstanceUpdateOne
ClearPeerID clears the value of the "peer_id" field.
func (*ComputeInstanceUpdateOne) ClearPort ¶ added in v0.0.2
func (ciuo *ComputeInstanceUpdateOne) ClearPort() *ComputeInstanceUpdateOne
ClearPort clears the value of the "port" field.
func (*ComputeInstanceUpdateOne) Exec ¶
func (ciuo *ComputeInstanceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeInstanceUpdateOne) ExecX ¶
func (ciuo *ComputeInstanceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceUpdateOne) Mutation ¶
func (ciuo *ComputeInstanceUpdateOne) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceUpdateOne) Save ¶
func (ciuo *ComputeInstanceUpdateOne) Save(ctx context.Context) (*ComputeInstance, error)
Save executes the query and returns the updated ComputeInstance entity.
func (*ComputeInstanceUpdateOne) SaveX ¶
func (ciuo *ComputeInstanceUpdateOne) SaveX(ctx context.Context) *ComputeInstance
SaveX is like Save, but panics if an error occurs.
func (*ComputeInstanceUpdateOne) Select ¶
func (ciuo *ComputeInstanceUpdateOne) Select(field string, fields ...string) *ComputeInstanceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ComputeInstanceUpdateOne) SetCommand ¶ added in v0.0.3
func (ciuo *ComputeInstanceUpdateOne) SetCommand(s string) *ComputeInstanceUpdateOne
SetCommand sets the "command" field.
func (*ComputeInstanceUpdateOne) SetContainerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetContainerID(s string) *ComputeInstanceUpdateOne
SetContainerID sets the "container_id" field.
func (*ComputeInstanceUpdateOne) SetCore ¶
func (ciuo *ComputeInstanceUpdateOne) SetCore(s string) *ComputeInstanceUpdateOne
SetCore sets the "core" field.
func (*ComputeInstanceUpdateOne) SetExpirationTime ¶
func (ciuo *ComputeInstanceUpdateOne) SetExpirationTime(t time.Time) *ComputeInstanceUpdateOne
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceUpdateOne) SetImage ¶
func (ciuo *ComputeInstanceUpdateOne) SetImage(s string) *ComputeInstanceUpdateOne
SetImage sets the "image" field.
func (*ComputeInstanceUpdateOne) SetMemory ¶
func (ciuo *ComputeInstanceUpdateOne) SetMemory(s string) *ComputeInstanceUpdateOne
SetMemory sets the "memory" field.
func (*ComputeInstanceUpdateOne) SetName ¶
func (ciuo *ComputeInstanceUpdateOne) SetName(s string) *ComputeInstanceUpdateOne
SetName sets the "name" field.
func (*ComputeInstanceUpdateOne) SetNillableCommand ¶ added in v0.0.3
func (ciuo *ComputeInstanceUpdateOne) SetNillableCommand(s *string) *ComputeInstanceUpdateOne
SetNillableCommand sets the "command" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillableContainerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetNillableContainerID(s *string) *ComputeInstanceUpdateOne
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillablePeerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetNillablePeerID(s *string) *ComputeInstanceUpdateOne
SetNillablePeerID sets the "peer_id" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillablePort ¶ added in v0.0.2
func (ciuo *ComputeInstanceUpdateOne) SetNillablePort(s *string) *ComputeInstanceUpdateOne
SetNillablePort sets the "port" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetOwner ¶
func (ciuo *ComputeInstanceUpdateOne) SetOwner(s string) *ComputeInstanceUpdateOne
SetOwner sets the "owner" field.
func (*ComputeInstanceUpdateOne) SetPeerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetPeerID(s string) *ComputeInstanceUpdateOne
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceUpdateOne) SetPort ¶ added in v0.0.2
func (ciuo *ComputeInstanceUpdateOne) SetPort(s string) *ComputeInstanceUpdateOne
SetPort sets the "port" field.
func (*ComputeInstanceUpdateOne) SetStatus ¶
func (ciuo *ComputeInstanceUpdateOne) SetStatus(i int8) *ComputeInstanceUpdateOne
SetStatus sets the "status" field.
func (*ComputeInstanceUpdateOne) Where ¶
func (ciuo *ComputeInstanceUpdateOne) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdateOne
Where appends a list predicates to the ComputeInstanceUpdate builder.
type ComputeInstances ¶
type ComputeInstances []*ComputeInstance
ComputeInstances is a parsable slice of ComputeInstance.
type ComputeSpec ¶
type ComputeSpec struct { // ID of the ent. ID int32 `json:"id,omitempty"` // Core holds the value of the "core" field. Core string `json:"core,omitempty"` // Memory holds the value of the "memory" field. Memory string `json:"memory,omitempty"` // contains filtered or unexported fields }
ComputeSpec is the model entity for the ComputeSpec schema.
func (*ComputeSpec) String ¶
func (cs *ComputeSpec) String() string
String implements the fmt.Stringer.
func (*ComputeSpec) Unwrap ¶
func (cs *ComputeSpec) Unwrap() *ComputeSpec
Unwrap unwraps the ComputeSpec 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 (*ComputeSpec) Update ¶
func (cs *ComputeSpec) Update() *ComputeSpecUpdateOne
Update returns a builder for updating this ComputeSpec. Note that you need to call ComputeSpec.Unwrap() before calling this method if this ComputeSpec was returned from a transaction, and the transaction was committed or rolled back.
type ComputeSpecClient ¶
type ComputeSpecClient struct {
// contains filtered or unexported fields
}
ComputeSpecClient is a client for the ComputeSpec schema.
func NewComputeSpecClient ¶
func NewComputeSpecClient(c config) *ComputeSpecClient
NewComputeSpecClient returns a client for the ComputeSpec from the given config.
func (*ComputeSpecClient) Create ¶
func (c *ComputeSpecClient) Create() *ComputeSpecCreate
Create returns a builder for creating a ComputeSpec entity.
func (*ComputeSpecClient) CreateBulk ¶
func (c *ComputeSpecClient) CreateBulk(builders ...*ComputeSpecCreate) *ComputeSpecCreateBulk
CreateBulk returns a builder for creating a bulk of ComputeSpec entities.
func (*ComputeSpecClient) Delete ¶
func (c *ComputeSpecClient) Delete() *ComputeSpecDelete
Delete returns a delete builder for ComputeSpec.
func (*ComputeSpecClient) DeleteOne ¶
func (c *ComputeSpecClient) DeleteOne(cs *ComputeSpec) *ComputeSpecDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ComputeSpecClient) DeleteOneID ¶
func (c *ComputeSpecClient) DeleteOneID(id int32) *ComputeSpecDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ComputeSpecClient) Get ¶
func (c *ComputeSpecClient) Get(ctx context.Context, id int32) (*ComputeSpec, error)
Get returns a ComputeSpec entity by its id.
func (*ComputeSpecClient) GetX ¶
func (c *ComputeSpecClient) GetX(ctx context.Context, id int32) *ComputeSpec
GetX is like Get, but panics if an error occurs.
func (*ComputeSpecClient) Hooks ¶
func (c *ComputeSpecClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ComputeSpecClient) Intercept ¶
func (c *ComputeSpecClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `computespec.Intercept(f(g(h())))`.
func (*ComputeSpecClient) Interceptors ¶
func (c *ComputeSpecClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ComputeSpecClient) Query ¶
func (c *ComputeSpecClient) Query() *ComputeSpecQuery
Query returns a query builder for ComputeSpec.
func (*ComputeSpecClient) Update ¶
func (c *ComputeSpecClient) Update() *ComputeSpecUpdate
Update returns an update builder for ComputeSpec.
func (*ComputeSpecClient) UpdateOne ¶
func (c *ComputeSpecClient) UpdateOne(cs *ComputeSpec) *ComputeSpecUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ComputeSpecClient) UpdateOneID ¶
func (c *ComputeSpecClient) UpdateOneID(id int32) *ComputeSpecUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ComputeSpecClient) Use ¶
func (c *ComputeSpecClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `computespec.Hooks(f(g(h())))`.
type ComputeSpecCreate ¶
type ComputeSpecCreate struct {
// contains filtered or unexported fields
}
ComputeSpecCreate is the builder for creating a ComputeSpec entity.
func (*ComputeSpecCreate) Exec ¶
func (csc *ComputeSpecCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecCreate) ExecX ¶
func (csc *ComputeSpecCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecCreate) Mutation ¶
func (csc *ComputeSpecCreate) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecCreate) Save ¶
func (csc *ComputeSpecCreate) Save(ctx context.Context) (*ComputeSpec, error)
Save creates the ComputeSpec in the database.
func (*ComputeSpecCreate) SaveX ¶
func (csc *ComputeSpecCreate) SaveX(ctx context.Context) *ComputeSpec
SaveX calls Save and panics if Save returns an error.
func (*ComputeSpecCreate) SetCore ¶
func (csc *ComputeSpecCreate) SetCore(s string) *ComputeSpecCreate
SetCore sets the "core" field.
func (*ComputeSpecCreate) SetID ¶
func (csc *ComputeSpecCreate) SetID(i int32) *ComputeSpecCreate
SetID sets the "id" field.
func (*ComputeSpecCreate) SetMemory ¶
func (csc *ComputeSpecCreate) SetMemory(s string) *ComputeSpecCreate
SetMemory sets the "memory" field.
type ComputeSpecCreateBulk ¶
type ComputeSpecCreateBulk struct {
// contains filtered or unexported fields
}
ComputeSpecCreateBulk is the builder for creating many ComputeSpec entities in bulk.
func (*ComputeSpecCreateBulk) Exec ¶
func (cscb *ComputeSpecCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecCreateBulk) ExecX ¶
func (cscb *ComputeSpecCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecCreateBulk) Save ¶
func (cscb *ComputeSpecCreateBulk) Save(ctx context.Context) ([]*ComputeSpec, error)
Save creates the ComputeSpec entities in the database.
func (*ComputeSpecCreateBulk) SaveX ¶
func (cscb *ComputeSpecCreateBulk) SaveX(ctx context.Context) []*ComputeSpec
SaveX is like Save, but panics if an error occurs.
type ComputeSpecDelete ¶
type ComputeSpecDelete struct {
// contains filtered or unexported fields
}
ComputeSpecDelete is the builder for deleting a ComputeSpec entity.
func (*ComputeSpecDelete) Exec ¶
func (csd *ComputeSpecDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeSpecDelete) ExecX ¶
func (csd *ComputeSpecDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecDelete) Where ¶
func (csd *ComputeSpecDelete) Where(ps ...predicate.ComputeSpec) *ComputeSpecDelete
Where appends a list predicates to the ComputeSpecDelete builder.
type ComputeSpecDeleteOne ¶
type ComputeSpecDeleteOne struct {
// contains filtered or unexported fields
}
ComputeSpecDeleteOne is the builder for deleting a single ComputeSpec entity.
func (*ComputeSpecDeleteOne) Exec ¶
func (csdo *ComputeSpecDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeSpecDeleteOne) ExecX ¶
func (csdo *ComputeSpecDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecDeleteOne) Where ¶
func (csdo *ComputeSpecDeleteOne) Where(ps ...predicate.ComputeSpec) *ComputeSpecDeleteOne
Where appends a list predicates to the ComputeSpecDelete builder.
type ComputeSpecGroupBy ¶
type ComputeSpecGroupBy struct {
// contains filtered or unexported fields
}
ComputeSpecGroupBy is the group-by builder for ComputeSpec entities.
func (*ComputeSpecGroupBy) Aggregate ¶
func (csgb *ComputeSpecGroupBy) Aggregate(fns ...AggregateFunc) *ComputeSpecGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ComputeSpecGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Scan ¶
func (csgb *ComputeSpecGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeSpecGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeSpecMutation ¶
type ComputeSpecMutation struct {
// contains filtered or unexported fields
}
ComputeSpecMutation represents an operation that mutates the ComputeSpec nodes in the graph.
func (*ComputeSpecMutation) AddField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) AddedEdges ¶
func (m *ComputeSpecMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ComputeSpecMutation) AddedField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) AddedFields ¶
func (m *ComputeSpecMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ComputeSpecMutation) AddedIDs ¶
func (m *ComputeSpecMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ComputeSpecMutation) ClearEdge ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ClearField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ClearedEdges ¶
func (m *ComputeSpecMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ComputeSpecMutation) ClearedFields ¶
func (m *ComputeSpecMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ComputeSpecMutation) Client ¶
func (m ComputeSpecMutation) 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 (*ComputeSpecMutation) Core ¶
func (m *ComputeSpecMutation) Core() (r string, exists bool)
Core returns the value of the "core" field in the mutation.
func (*ComputeSpecMutation) EdgeCleared ¶
func (m *ComputeSpecMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ComputeSpecMutation) Field ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) FieldCleared ¶
func (m *ComputeSpecMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ComputeSpecMutation) Fields ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ID ¶
func (m *ComputeSpecMutation) ID() (id int32, 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 (*ComputeSpecMutation) IDs ¶
func (m *ComputeSpecMutation) IDs(ctx context.Context) ([]int32, 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 (*ComputeSpecMutation) Memory ¶
func (m *ComputeSpecMutation) Memory() (r string, exists bool)
Memory returns the value of the "memory" field in the mutation.
func (*ComputeSpecMutation) OldCore ¶
func (m *ComputeSpecMutation) OldCore(ctx context.Context) (v string, err error)
OldCore returns the old "core" field's value of the ComputeSpec entity. If the ComputeSpec object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeSpecMutation) 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 (*ComputeSpecMutation) OldMemory ¶
func (m *ComputeSpecMutation) OldMemory(ctx context.Context) (v string, err error)
OldMemory returns the old "memory" field's value of the ComputeSpec entity. If the ComputeSpec object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ComputeSpecMutation) Op ¶
func (m *ComputeSpecMutation) Op() Op
Op returns the operation name.
func (*ComputeSpecMutation) RemovedEdges ¶
func (m *ComputeSpecMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ComputeSpecMutation) RemovedIDs ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ResetCore ¶
func (m *ComputeSpecMutation) ResetCore()
ResetCore resets all changes to the "core" field.
func (*ComputeSpecMutation) ResetEdge ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ResetField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ResetMemory ¶
func (m *ComputeSpecMutation) ResetMemory()
ResetMemory resets all changes to the "memory" field.
func (*ComputeSpecMutation) SetCore ¶
func (m *ComputeSpecMutation) SetCore(s string)
SetCore sets the "core" field.
func (*ComputeSpecMutation) SetField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) SetID ¶
func (m *ComputeSpecMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ComputeSpec entities.
func (*ComputeSpecMutation) SetMemory ¶
func (m *ComputeSpecMutation) SetMemory(s string)
SetMemory sets the "memory" field.
func (*ComputeSpecMutation) SetOp ¶
func (m *ComputeSpecMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ComputeSpecMutation) Tx ¶
func (m ComputeSpecMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ComputeSpecMutation) Type ¶
func (m *ComputeSpecMutation) Type() string
Type returns the node type of this mutation (ComputeSpec).
func (*ComputeSpecMutation) Where ¶
func (m *ComputeSpecMutation) Where(ps ...predicate.ComputeSpec)
Where appends a list predicates to the ComputeSpecMutation builder.
func (*ComputeSpecMutation) WhereP ¶
func (m *ComputeSpecMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ComputeSpecMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ComputeSpecQuery ¶
type ComputeSpecQuery struct {
// contains filtered or unexported fields
}
ComputeSpecQuery is the builder for querying ComputeSpec entities.
func (*ComputeSpecQuery) Aggregate ¶
func (csq *ComputeSpecQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
Aggregate returns a ComputeSpecSelect configured with the given aggregations.
func (*ComputeSpecQuery) All ¶
func (csq *ComputeSpecQuery) All(ctx context.Context) ([]*ComputeSpec, error)
All executes the query and returns a list of ComputeSpecs.
func (*ComputeSpecQuery) AllX ¶
func (csq *ComputeSpecQuery) AllX(ctx context.Context) []*ComputeSpec
AllX is like All, but panics if an error occurs.
func (*ComputeSpecQuery) Clone ¶
func (csq *ComputeSpecQuery) Clone() *ComputeSpecQuery
Clone returns a duplicate of the ComputeSpecQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ComputeSpecQuery) Count ¶
func (csq *ComputeSpecQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeSpecQuery) CountX ¶
func (csq *ComputeSpecQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeSpecQuery) Exist ¶
func (csq *ComputeSpecQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeSpecQuery) ExistX ¶
func (csq *ComputeSpecQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeSpecQuery) First ¶
func (csq *ComputeSpecQuery) First(ctx context.Context) (*ComputeSpec, error)
First returns the first ComputeSpec entity from the query. Returns a *NotFoundError when no ComputeSpec was found.
func (*ComputeSpecQuery) FirstID ¶
func (csq *ComputeSpecQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first ComputeSpec ID from the query. Returns a *NotFoundError when no ComputeSpec ID was found.
func (*ComputeSpecQuery) FirstIDX ¶
func (csq *ComputeSpecQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeSpecQuery) FirstX ¶
func (csq *ComputeSpecQuery) FirstX(ctx context.Context) *ComputeSpec
FirstX is like First, but panics if an error occurs.
func (*ComputeSpecQuery) GroupBy ¶
func (csq *ComputeSpecQuery) GroupBy(field string, fields ...string) *ComputeSpecGroupBy
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 { Core string `json:"core,omitempty"` Count int `json:"count,omitempty"` } client.ComputeSpec.Query(). GroupBy(computespec.FieldCore). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ComputeSpecQuery) IDs ¶
func (csq *ComputeSpecQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ComputeSpec IDs.
func (*ComputeSpecQuery) IDsX ¶
func (csq *ComputeSpecQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ComputeSpecQuery) Limit ¶
func (csq *ComputeSpecQuery) Limit(limit int) *ComputeSpecQuery
Limit the number of records to be returned by this query.
func (*ComputeSpecQuery) Offset ¶
func (csq *ComputeSpecQuery) Offset(offset int) *ComputeSpecQuery
Offset to start from.
func (*ComputeSpecQuery) Only ¶
func (csq *ComputeSpecQuery) Only(ctx context.Context) (*ComputeSpec, error)
Only returns a single ComputeSpec entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ComputeSpec entity is found. Returns a *NotFoundError when no ComputeSpec entities are found.
func (*ComputeSpecQuery) OnlyID ¶
func (csq *ComputeSpecQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only ComputeSpec ID in the query. Returns a *NotSingularError when more than one ComputeSpec ID is found. Returns a *NotFoundError when no entities are found.
func (*ComputeSpecQuery) OnlyIDX ¶
func (csq *ComputeSpecQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeSpecQuery) OnlyX ¶
func (csq *ComputeSpecQuery) OnlyX(ctx context.Context) *ComputeSpec
OnlyX is like Only, but panics if an error occurs.
func (*ComputeSpecQuery) Order ¶
func (csq *ComputeSpecQuery) Order(o ...computespec.OrderOption) *ComputeSpecQuery
Order specifies how the records should be ordered.
func (*ComputeSpecQuery) Select ¶
func (csq *ComputeSpecQuery) Select(fields ...string) *ComputeSpecSelect
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 { Core string `json:"core,omitempty"` } client.ComputeSpec.Query(). Select(computespec.FieldCore). Scan(ctx, &v)
func (*ComputeSpecQuery) Unique ¶
func (csq *ComputeSpecQuery) Unique(unique bool) *ComputeSpecQuery
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 (*ComputeSpecQuery) Where ¶
func (csq *ComputeSpecQuery) Where(ps ...predicate.ComputeSpec) *ComputeSpecQuery
Where adds a new predicate for the ComputeSpecQuery builder.
type ComputeSpecSelect ¶
type ComputeSpecSelect struct { *ComputeSpecQuery // contains filtered or unexported fields }
ComputeSpecSelect is the builder for selecting fields of ComputeSpec entities.
func (*ComputeSpecSelect) Aggregate ¶
func (css *ComputeSpecSelect) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ComputeSpecSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Scan ¶
func (css *ComputeSpecSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeSpecSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeSpecUpdate ¶
type ComputeSpecUpdate struct {
// contains filtered or unexported fields
}
ComputeSpecUpdate is the builder for updating ComputeSpec entities.
func (*ComputeSpecUpdate) Exec ¶
func (csu *ComputeSpecUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecUpdate) ExecX ¶
func (csu *ComputeSpecUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecUpdate) Mutation ¶
func (csu *ComputeSpecUpdate) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecUpdate) Save ¶
func (csu *ComputeSpecUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ComputeSpecUpdate) SaveX ¶
func (csu *ComputeSpecUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecUpdate) SetCore ¶
func (csu *ComputeSpecUpdate) SetCore(s string) *ComputeSpecUpdate
SetCore sets the "core" field.
func (*ComputeSpecUpdate) SetMemory ¶
func (csu *ComputeSpecUpdate) SetMemory(s string) *ComputeSpecUpdate
SetMemory sets the "memory" field.
func (*ComputeSpecUpdate) Where ¶
func (csu *ComputeSpecUpdate) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdate
Where appends a list predicates to the ComputeSpecUpdate builder.
type ComputeSpecUpdateOne ¶
type ComputeSpecUpdateOne struct {
// contains filtered or unexported fields
}
ComputeSpecUpdateOne is the builder for updating a single ComputeSpec entity.
func (*ComputeSpecUpdateOne) Exec ¶
func (csuo *ComputeSpecUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeSpecUpdateOne) ExecX ¶
func (csuo *ComputeSpecUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecUpdateOne) Mutation ¶
func (csuo *ComputeSpecUpdateOne) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecUpdateOne) Save ¶
func (csuo *ComputeSpecUpdateOne) Save(ctx context.Context) (*ComputeSpec, error)
Save executes the query and returns the updated ComputeSpec entity.
func (*ComputeSpecUpdateOne) SaveX ¶
func (csuo *ComputeSpecUpdateOne) SaveX(ctx context.Context) *ComputeSpec
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecUpdateOne) Select ¶
func (csuo *ComputeSpecUpdateOne) Select(field string, fields ...string) *ComputeSpecUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ComputeSpecUpdateOne) SetCore ¶
func (csuo *ComputeSpecUpdateOne) SetCore(s string) *ComputeSpecUpdateOne
SetCore sets the "core" field.
func (*ComputeSpecUpdateOne) SetMemory ¶
func (csuo *ComputeSpecUpdateOne) SetMemory(s string) *ComputeSpecUpdateOne
SetMemory sets the "memory" field.
func (*ComputeSpecUpdateOne) Where ¶
func (csuo *ComputeSpecUpdateOne) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdateOne
Where appends a list predicates to the ComputeSpecUpdate builder.
type ComputeSpecs ¶
type ComputeSpecs []*ComputeSpec
ComputeSpecs is a parsable slice of ComputeSpec.
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 Employee ¶
type Employee struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Age holds the value of the "age" field. Age int32 `json:"age,omitempty"` // contains filtered or unexported fields }
Employee is the model entity for the Employee schema.
func (*Employee) Unwrap ¶
Unwrap unwraps the Employee 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 (*Employee) Update ¶
func (e *Employee) Update() *EmployeeUpdateOne
Update returns a builder for updating this Employee. Note that you need to call Employee.Unwrap() before calling this method if this Employee was returned from a transaction, and the transaction was committed or rolled back.
type EmployeeClient ¶
type EmployeeClient struct {
// contains filtered or unexported fields
}
EmployeeClient is a client for the Employee schema.
func NewEmployeeClient ¶
func NewEmployeeClient(c config) *EmployeeClient
NewEmployeeClient returns a client for the Employee from the given config.
func (*EmployeeClient) Create ¶
func (c *EmployeeClient) Create() *EmployeeCreate
Create returns a builder for creating a Employee entity.
func (*EmployeeClient) CreateBulk ¶
func (c *EmployeeClient) CreateBulk(builders ...*EmployeeCreate) *EmployeeCreateBulk
CreateBulk returns a builder for creating a bulk of Employee entities.
func (*EmployeeClient) Delete ¶
func (c *EmployeeClient) Delete() *EmployeeDelete
Delete returns a delete builder for Employee.
func (*EmployeeClient) DeleteOne ¶
func (c *EmployeeClient) DeleteOne(e *Employee) *EmployeeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EmployeeClient) DeleteOneID ¶
func (c *EmployeeClient) DeleteOneID(id int) *EmployeeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EmployeeClient) GetX ¶
func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee
GetX is like Get, but panics if an error occurs.
func (*EmployeeClient) Hooks ¶
func (c *EmployeeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EmployeeClient) Intercept ¶
func (c *EmployeeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `employee.Intercept(f(g(h())))`.
func (*EmployeeClient) Interceptors ¶
func (c *EmployeeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EmployeeClient) Query ¶
func (c *EmployeeClient) Query() *EmployeeQuery
Query returns a query builder for Employee.
func (*EmployeeClient) Update ¶
func (c *EmployeeClient) Update() *EmployeeUpdate
Update returns an update builder for Employee.
func (*EmployeeClient) UpdateOne ¶
func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EmployeeClient) UpdateOneID ¶
func (c *EmployeeClient) UpdateOneID(id int) *EmployeeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EmployeeClient) Use ¶
func (c *EmployeeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `employee.Hooks(f(g(h())))`.
type EmployeeCreate ¶
type EmployeeCreate struct {
// contains filtered or unexported fields
}
EmployeeCreate is the builder for creating a Employee entity.
func (*EmployeeCreate) Exec ¶
func (ec *EmployeeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeCreate) ExecX ¶
func (ec *EmployeeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeCreate) Mutation ¶
func (ec *EmployeeCreate) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeCreate) Save ¶
func (ec *EmployeeCreate) Save(ctx context.Context) (*Employee, error)
Save creates the Employee in the database.
func (*EmployeeCreate) SaveX ¶
func (ec *EmployeeCreate) SaveX(ctx context.Context) *Employee
SaveX calls Save and panics if Save returns an error.
func (*EmployeeCreate) SetAge ¶
func (ec *EmployeeCreate) SetAge(i int32) *EmployeeCreate
SetAge sets the "age" field.
func (*EmployeeCreate) SetName ¶
func (ec *EmployeeCreate) SetName(s string) *EmployeeCreate
SetName sets the "name" field.
func (*EmployeeCreate) SetNillableAge ¶
func (ec *EmployeeCreate) SetNillableAge(i *int32) *EmployeeCreate
SetNillableAge sets the "age" field if the given value is not nil.
type EmployeeCreateBulk ¶
type EmployeeCreateBulk struct {
// contains filtered or unexported fields
}
EmployeeCreateBulk is the builder for creating many Employee entities in bulk.
func (*EmployeeCreateBulk) Exec ¶
func (ecb *EmployeeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeCreateBulk) ExecX ¶
func (ecb *EmployeeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EmployeeDelete ¶
type EmployeeDelete struct {
// contains filtered or unexported fields
}
EmployeeDelete is the builder for deleting a Employee entity.
func (*EmployeeDelete) Exec ¶
func (ed *EmployeeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EmployeeDelete) ExecX ¶
func (ed *EmployeeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeDelete) Where ¶
func (ed *EmployeeDelete) Where(ps ...predicate.Employee) *EmployeeDelete
Where appends a list predicates to the EmployeeDelete builder.
type EmployeeDeleteOne ¶
type EmployeeDeleteOne struct {
// contains filtered or unexported fields
}
EmployeeDeleteOne is the builder for deleting a single Employee entity.
func (*EmployeeDeleteOne) Exec ¶
func (edo *EmployeeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EmployeeDeleteOne) ExecX ¶
func (edo *EmployeeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeDeleteOne) Where ¶
func (edo *EmployeeDeleteOne) Where(ps ...predicate.Employee) *EmployeeDeleteOne
Where appends a list predicates to the EmployeeDelete builder.
type EmployeeGroupBy ¶
type EmployeeGroupBy struct {
// contains filtered or unexported fields
}
EmployeeGroupBy is the group-by builder for Employee entities.
func (*EmployeeGroupBy) Aggregate ¶
func (egb *EmployeeGroupBy) Aggregate(fns ...AggregateFunc) *EmployeeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EmployeeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Scan ¶
func (egb *EmployeeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmployeeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmployeeMutation ¶
type EmployeeMutation struct {
// contains filtered or unexported fields
}
EmployeeMutation represents an operation that mutates the Employee nodes in the graph.
func (*EmployeeMutation) AddAge ¶
func (m *EmployeeMutation) AddAge(i int32)
AddAge adds i to the "age" field.
func (*EmployeeMutation) AddField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) AddedAge ¶
func (m *EmployeeMutation) AddedAge() (r int32, exists bool)
AddedAge returns the value that was added to the "age" field in this mutation.
func (*EmployeeMutation) AddedEdges ¶
func (m *EmployeeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EmployeeMutation) AddedField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) AddedFields ¶
func (m *EmployeeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EmployeeMutation) AddedIDs ¶
func (m *EmployeeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EmployeeMutation) Age ¶
func (m *EmployeeMutation) Age() (r int32, exists bool)
Age returns the value of the "age" field in the mutation.
func (*EmployeeMutation) AgeCleared ¶
func (m *EmployeeMutation) AgeCleared() bool
AgeCleared returns if the "age" field was cleared in this mutation.
func (*EmployeeMutation) ClearAge ¶
func (m *EmployeeMutation) ClearAge()
ClearAge clears the value of the "age" field.
func (*EmployeeMutation) ClearEdge ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ClearField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ClearedEdges ¶
func (m *EmployeeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EmployeeMutation) ClearedFields ¶
func (m *EmployeeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EmployeeMutation) Client ¶
func (m EmployeeMutation) 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 (*EmployeeMutation) EdgeCleared ¶
func (m *EmployeeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EmployeeMutation) Field ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) FieldCleared ¶
func (m *EmployeeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EmployeeMutation) Fields ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ID ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) IDs ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) Name ¶
func (m *EmployeeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*EmployeeMutation) OldAge ¶
func (m *EmployeeMutation) OldAge(ctx context.Context) (v int32, err error)
OldAge returns the old "age" field's value of the Employee entity. If the Employee object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EmployeeMutation) 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 (*EmployeeMutation) OldName ¶
func (m *EmployeeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Employee entity. If the Employee object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EmployeeMutation) RemovedEdges ¶
func (m *EmployeeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EmployeeMutation) RemovedIDs ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ResetAge ¶
func (m *EmployeeMutation) ResetAge()
ResetAge resets all changes to the "age" field.
func (*EmployeeMutation) ResetEdge ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ResetField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ResetName ¶
func (m *EmployeeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*EmployeeMutation) SetAge ¶
func (m *EmployeeMutation) SetAge(i int32)
SetAge sets the "age" field.
func (*EmployeeMutation) SetField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) SetName ¶
func (m *EmployeeMutation) SetName(s string)
SetName sets the "name" field.
func (*EmployeeMutation) SetOp ¶
func (m *EmployeeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (EmployeeMutation) Tx ¶
func (m EmployeeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EmployeeMutation) Type ¶
func (m *EmployeeMutation) Type() string
Type returns the node type of this mutation (Employee).
func (*EmployeeMutation) Where ¶
func (m *EmployeeMutation) Where(ps ...predicate.Employee)
Where appends a list predicates to the EmployeeMutation builder.
func (*EmployeeMutation) WhereP ¶
func (m *EmployeeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EmployeeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EmployeeQuery ¶
type EmployeeQuery struct {
// contains filtered or unexported fields
}
EmployeeQuery is the builder for querying Employee entities.
func (*EmployeeQuery) Aggregate ¶
func (eq *EmployeeQuery) Aggregate(fns ...AggregateFunc) *EmployeeSelect
Aggregate returns a EmployeeSelect configured with the given aggregations.
func (*EmployeeQuery) All ¶
func (eq *EmployeeQuery) All(ctx context.Context) ([]*Employee, error)
All executes the query and returns a list of Employees.
func (*EmployeeQuery) AllX ¶
func (eq *EmployeeQuery) AllX(ctx context.Context) []*Employee
AllX is like All, but panics if an error occurs.
func (*EmployeeQuery) Clone ¶
func (eq *EmployeeQuery) Clone() *EmployeeQuery
Clone returns a duplicate of the EmployeeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EmployeeQuery) Count ¶
func (eq *EmployeeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EmployeeQuery) CountX ¶
func (eq *EmployeeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EmployeeQuery) Exist ¶
func (eq *EmployeeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EmployeeQuery) ExistX ¶
func (eq *EmployeeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EmployeeQuery) First ¶
func (eq *EmployeeQuery) First(ctx context.Context) (*Employee, error)
First returns the first Employee entity from the query. Returns a *NotFoundError when no Employee was found.
func (*EmployeeQuery) FirstID ¶
func (eq *EmployeeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Employee ID from the query. Returns a *NotFoundError when no Employee ID was found.
func (*EmployeeQuery) FirstIDX ¶
func (eq *EmployeeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EmployeeQuery) FirstX ¶
func (eq *EmployeeQuery) FirstX(ctx context.Context) *Employee
FirstX is like First, but panics if an error occurs.
func (*EmployeeQuery) GroupBy ¶
func (eq *EmployeeQuery) GroupBy(field string, fields ...string) *EmployeeGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Employee.Query(). GroupBy(employee.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EmployeeQuery) IDs ¶
func (eq *EmployeeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Employee IDs.
func (*EmployeeQuery) IDsX ¶
func (eq *EmployeeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EmployeeQuery) Limit ¶
func (eq *EmployeeQuery) Limit(limit int) *EmployeeQuery
Limit the number of records to be returned by this query.
func (*EmployeeQuery) Offset ¶
func (eq *EmployeeQuery) Offset(offset int) *EmployeeQuery
Offset to start from.
func (*EmployeeQuery) Only ¶
func (eq *EmployeeQuery) Only(ctx context.Context) (*Employee, error)
Only returns a single Employee entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Employee entity is found. Returns a *NotFoundError when no Employee entities are found.
func (*EmployeeQuery) OnlyID ¶
func (eq *EmployeeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Employee ID in the query. Returns a *NotSingularError when more than one Employee ID is found. Returns a *NotFoundError when no entities are found.
func (*EmployeeQuery) OnlyIDX ¶
func (eq *EmployeeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EmployeeQuery) OnlyX ¶
func (eq *EmployeeQuery) OnlyX(ctx context.Context) *Employee
OnlyX is like Only, but panics if an error occurs.
func (*EmployeeQuery) Order ¶
func (eq *EmployeeQuery) Order(o ...employee.OrderOption) *EmployeeQuery
Order specifies how the records should be ordered.
func (*EmployeeQuery) Select ¶
func (eq *EmployeeQuery) Select(fields ...string) *EmployeeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Employee.Query(). Select(employee.FieldName). Scan(ctx, &v)
func (*EmployeeQuery) Unique ¶
func (eq *EmployeeQuery) Unique(unique bool) *EmployeeQuery
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 (*EmployeeQuery) Where ¶
func (eq *EmployeeQuery) Where(ps ...predicate.Employee) *EmployeeQuery
Where adds a new predicate for the EmployeeQuery builder.
type EmployeeSelect ¶
type EmployeeSelect struct { *EmployeeQuery // contains filtered or unexported fields }
EmployeeSelect is the builder for selecting fields of Employee entities.
func (*EmployeeSelect) Aggregate ¶
func (es *EmployeeSelect) Aggregate(fns ...AggregateFunc) *EmployeeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EmployeeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Scan ¶
func (es *EmployeeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmployeeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmployeeUpdate ¶
type EmployeeUpdate struct {
// contains filtered or unexported fields
}
EmployeeUpdate is the builder for updating Employee entities.
func (*EmployeeUpdate) AddAge ¶
func (eu *EmployeeUpdate) AddAge(i int32) *EmployeeUpdate
AddAge adds i to the "age" field.
func (*EmployeeUpdate) ClearAge ¶
func (eu *EmployeeUpdate) ClearAge() *EmployeeUpdate
ClearAge clears the value of the "age" field.
func (*EmployeeUpdate) Exec ¶
func (eu *EmployeeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeUpdate) ExecX ¶
func (eu *EmployeeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeUpdate) Mutation ¶
func (eu *EmployeeUpdate) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeUpdate) Save ¶
func (eu *EmployeeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EmployeeUpdate) SaveX ¶
func (eu *EmployeeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EmployeeUpdate) SetAge ¶
func (eu *EmployeeUpdate) SetAge(i int32) *EmployeeUpdate
SetAge sets the "age" field.
func (*EmployeeUpdate) SetName ¶
func (eu *EmployeeUpdate) SetName(s string) *EmployeeUpdate
SetName sets the "name" field.
func (*EmployeeUpdate) SetNillableAge ¶
func (eu *EmployeeUpdate) SetNillableAge(i *int32) *EmployeeUpdate
SetNillableAge sets the "age" field if the given value is not nil.
func (*EmployeeUpdate) Where ¶
func (eu *EmployeeUpdate) Where(ps ...predicate.Employee) *EmployeeUpdate
Where appends a list predicates to the EmployeeUpdate builder.
type EmployeeUpdateOne ¶
type EmployeeUpdateOne struct {
// contains filtered or unexported fields
}
EmployeeUpdateOne is the builder for updating a single Employee entity.
func (*EmployeeUpdateOne) AddAge ¶
func (euo *EmployeeUpdateOne) AddAge(i int32) *EmployeeUpdateOne
AddAge adds i to the "age" field.
func (*EmployeeUpdateOne) ClearAge ¶
func (euo *EmployeeUpdateOne) ClearAge() *EmployeeUpdateOne
ClearAge clears the value of the "age" field.
func (*EmployeeUpdateOne) Exec ¶
func (euo *EmployeeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EmployeeUpdateOne) ExecX ¶
func (euo *EmployeeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeUpdateOne) Mutation ¶
func (euo *EmployeeUpdateOne) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeUpdateOne) Save ¶
func (euo *EmployeeUpdateOne) Save(ctx context.Context) (*Employee, error)
Save executes the query and returns the updated Employee entity.
func (*EmployeeUpdateOne) SaveX ¶
func (euo *EmployeeUpdateOne) SaveX(ctx context.Context) *Employee
SaveX is like Save, but panics if an error occurs.
func (*EmployeeUpdateOne) Select ¶
func (euo *EmployeeUpdateOne) Select(field string, fields ...string) *EmployeeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EmployeeUpdateOne) SetAge ¶
func (euo *EmployeeUpdateOne) SetAge(i int32) *EmployeeUpdateOne
SetAge sets the "age" field.
func (*EmployeeUpdateOne) SetName ¶
func (euo *EmployeeUpdateOne) SetName(s string) *EmployeeUpdateOne
SetName sets the "name" field.
func (*EmployeeUpdateOne) SetNillableAge ¶
func (euo *EmployeeUpdateOne) SetNillableAge(i *int32) *EmployeeUpdateOne
SetNillableAge sets the "age" field if the given value is not nil.
func (*EmployeeUpdateOne) Where ¶
func (euo *EmployeeUpdateOne) Where(ps ...predicate.Employee) *EmployeeUpdateOne
Where appends a list predicates to the EmployeeUpdate 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 MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type 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 Script ¶ added in v0.0.3
type Script struct { // ID of the ent. ID int32 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // TaskNumber holds the value of the "task_number" field. TaskNumber int32 `json:"task_number,omitempty"` // ScriptName holds the value of the "script_name" field. ScriptName string `json:"script_name,omitempty"` // FileAddress holds the value of the "file_address" field. FileAddress string `json:"file_address,omitempty"` // ScriptContent holds the value of the "script_content" field. ScriptContent string `json:"script_content,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ScriptQuery when eager-loading is set. Edges ScriptEdges `json:"edges"` // contains filtered or unexported fields }
Script is the model entity for the Script schema.
func (*Script) QueryScriptExecutionRecords ¶ added in v0.0.3
func (s *Script) QueryScriptExecutionRecords() *ScriptExecutionRecordQuery
QueryScriptExecutionRecords queries the "scriptExecutionRecords" edge of the Script entity.
func (*Script) Unwrap ¶ added in v0.0.3
Unwrap unwraps the Script 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 (*Script) Update ¶ added in v0.0.3
func (s *Script) Update() *ScriptUpdateOne
Update returns a builder for updating this Script. Note that you need to call Script.Unwrap() before calling this method if this Script was returned from a transaction, and the transaction was committed or rolled back.
type ScriptClient ¶ added in v0.0.3
type ScriptClient struct {
// contains filtered or unexported fields
}
ScriptClient is a client for the Script schema.
func NewScriptClient ¶ added in v0.0.3
func NewScriptClient(c config) *ScriptClient
NewScriptClient returns a client for the Script from the given config.
func (*ScriptClient) Create ¶ added in v0.0.3
func (c *ScriptClient) Create() *ScriptCreate
Create returns a builder for creating a Script entity.
func (*ScriptClient) CreateBulk ¶ added in v0.0.3
func (c *ScriptClient) CreateBulk(builders ...*ScriptCreate) *ScriptCreateBulk
CreateBulk returns a builder for creating a bulk of Script entities.
func (*ScriptClient) Delete ¶ added in v0.0.3
func (c *ScriptClient) Delete() *ScriptDelete
Delete returns a delete builder for Script.
func (*ScriptClient) DeleteOne ¶ added in v0.0.3
func (c *ScriptClient) DeleteOne(s *Script) *ScriptDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScriptClient) DeleteOneID ¶ added in v0.0.3
func (c *ScriptClient) DeleteOneID(id int32) *ScriptDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ScriptClient) GetX ¶ added in v0.0.3
func (c *ScriptClient) GetX(ctx context.Context, id int32) *Script
GetX is like Get, but panics if an error occurs.
func (*ScriptClient) Hooks ¶ added in v0.0.3
func (c *ScriptClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ScriptClient) Intercept ¶ added in v0.0.3
func (c *ScriptClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `script.Intercept(f(g(h())))`.
func (*ScriptClient) Interceptors ¶ added in v0.0.3
func (c *ScriptClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ScriptClient) Query ¶ added in v0.0.3
func (c *ScriptClient) Query() *ScriptQuery
Query returns a query builder for Script.
func (*ScriptClient) QueryScriptExecutionRecords ¶ added in v0.0.3
func (c *ScriptClient) QueryScriptExecutionRecords(s *Script) *ScriptExecutionRecordQuery
QueryScriptExecutionRecords queries the scriptExecutionRecords edge of a Script.
func (*ScriptClient) Update ¶ added in v0.0.3
func (c *ScriptClient) Update() *ScriptUpdate
Update returns an update builder for Script.
func (*ScriptClient) UpdateOne ¶ added in v0.0.3
func (c *ScriptClient) UpdateOne(s *Script) *ScriptUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScriptClient) UpdateOneID ¶ added in v0.0.3
func (c *ScriptClient) UpdateOneID(id int32) *ScriptUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScriptClient) Use ¶ added in v0.0.3
func (c *ScriptClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `script.Hooks(f(g(h())))`.
type ScriptCreate ¶ added in v0.0.3
type ScriptCreate struct {
// contains filtered or unexported fields
}
ScriptCreate is the builder for creating a Script entity.
func (*ScriptCreate) AddScriptExecutionRecordIDs ¶ added in v0.0.3
func (sc *ScriptCreate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptCreate
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptCreate) AddScriptExecutionRecords ¶ added in v0.0.3
func (sc *ScriptCreate) AddScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptCreate
AddScriptExecutionRecords adds the "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptCreate) Exec ¶ added in v0.0.3
func (sc *ScriptCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptCreate) ExecX ¶ added in v0.0.3
func (sc *ScriptCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptCreate) Mutation ¶ added in v0.0.3
func (sc *ScriptCreate) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptCreate) Save ¶ added in v0.0.3
func (sc *ScriptCreate) Save(ctx context.Context) (*Script, error)
Save creates the Script in the database.
func (*ScriptCreate) SaveX ¶ added in v0.0.3
func (sc *ScriptCreate) SaveX(ctx context.Context) *Script
SaveX calls Save and panics if Save returns an error.
func (*ScriptCreate) SetCreateTime ¶ added in v0.0.3
func (sc *ScriptCreate) SetCreateTime(t time.Time) *ScriptCreate
SetCreateTime sets the "create_time" field.
func (*ScriptCreate) SetFileAddress ¶ added in v0.0.3
func (sc *ScriptCreate) SetFileAddress(s string) *ScriptCreate
SetFileAddress sets the "file_address" field.
func (*ScriptCreate) SetID ¶ added in v0.0.3
func (sc *ScriptCreate) SetID(i int32) *ScriptCreate
SetID sets the "id" field.
func (*ScriptCreate) SetNillableCreateTime ¶ added in v0.0.3
func (sc *ScriptCreate) SetNillableCreateTime(t *time.Time) *ScriptCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptCreate) SetNillableUpdateTime ¶ added in v0.0.3
func (sc *ScriptCreate) SetNillableUpdateTime(t *time.Time) *ScriptCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptCreate) SetScriptContent ¶ added in v0.0.3
func (sc *ScriptCreate) SetScriptContent(s string) *ScriptCreate
SetScriptContent sets the "script_content" field.
func (*ScriptCreate) SetScriptName ¶ added in v0.0.3
func (sc *ScriptCreate) SetScriptName(s string) *ScriptCreate
SetScriptName sets the "script_name" field.
func (*ScriptCreate) SetTaskNumber ¶ added in v0.0.3
func (sc *ScriptCreate) SetTaskNumber(i int32) *ScriptCreate
SetTaskNumber sets the "task_number" field.
func (*ScriptCreate) SetUpdateTime ¶ added in v0.0.3
func (sc *ScriptCreate) SetUpdateTime(t time.Time) *ScriptCreate
SetUpdateTime sets the "update_time" field.
func (*ScriptCreate) SetUserID ¶ added in v0.0.3
func (sc *ScriptCreate) SetUserID(s string) *ScriptCreate
SetUserID sets the "user_id" field.
type ScriptCreateBulk ¶ added in v0.0.3
type ScriptCreateBulk struct {
// contains filtered or unexported fields
}
ScriptCreateBulk is the builder for creating many Script entities in bulk.
func (*ScriptCreateBulk) Exec ¶ added in v0.0.3
func (scb *ScriptCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptCreateBulk) ExecX ¶ added in v0.0.3
func (scb *ScriptCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScriptDelete ¶ added in v0.0.3
type ScriptDelete struct {
// contains filtered or unexported fields
}
ScriptDelete is the builder for deleting a Script entity.
func (*ScriptDelete) Exec ¶ added in v0.0.3
func (sd *ScriptDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScriptDelete) ExecX ¶ added in v0.0.3
func (sd *ScriptDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScriptDelete) Where ¶ added in v0.0.3
func (sd *ScriptDelete) Where(ps ...predicate.Script) *ScriptDelete
Where appends a list predicates to the ScriptDelete builder.
type ScriptDeleteOne ¶ added in v0.0.3
type ScriptDeleteOne struct {
// contains filtered or unexported fields
}
ScriptDeleteOne is the builder for deleting a single Script entity.
func (*ScriptDeleteOne) Exec ¶ added in v0.0.3
func (sdo *ScriptDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScriptDeleteOne) ExecX ¶ added in v0.0.3
func (sdo *ScriptDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptDeleteOne) Where ¶ added in v0.0.3
func (sdo *ScriptDeleteOne) Where(ps ...predicate.Script) *ScriptDeleteOne
Where appends a list predicates to the ScriptDelete builder.
type ScriptEdges ¶ added in v0.0.3
type ScriptEdges struct { // ScriptExecutionRecords holds the value of the scriptExecutionRecords edge. ScriptExecutionRecords []*ScriptExecutionRecord `json:"scriptExecutionRecords,omitempty"` // contains filtered or unexported fields }
ScriptEdges holds the relations/edges for other nodes in the graph.
func (ScriptEdges) ScriptExecutionRecordsOrErr ¶ added in v0.0.3
func (e ScriptEdges) ScriptExecutionRecordsOrErr() ([]*ScriptExecutionRecord, error)
ScriptExecutionRecordsOrErr returns the ScriptExecutionRecords value or an error if the edge was not loaded in eager-loading.
type ScriptExecutionRecord ¶ added in v0.0.3
type ScriptExecutionRecord struct { // ID of the ent. ID int32 `json:"id,omitempty"` // UserID holds the value of the "user_id" field. UserID string `json:"user_id,omitempty"` // FkScriptID holds the value of the "fk_script_id" field. FkScriptID int32 `json:"fk_script_id,omitempty"` // ScriptContent holds the value of the "script_content" field. ScriptContent string `json:"script_content,omitempty"` // TaskNumber holds the value of the "task_number" field. TaskNumber int32 `json:"task_number,omitempty"` // ScriptName holds the value of the "script_name" field. ScriptName string `json:"script_name,omitempty"` // FileAddress holds the value of the "file_address" field. FileAddress string `json:"file_address,omitempty"` // ExecuteState holds the value of the "execute_state" field. ExecuteState int32 `json:"execute_state,omitempty"` // ExecuteResult holds the value of the "execute_result" field. ExecuteResult string `json:"execute_result,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ScriptExecutionRecordQuery when eager-loading is set. Edges ScriptExecutionRecordEdges `json:"edges"` // contains filtered or unexported fields }
ScriptExecutionRecord is the model entity for the ScriptExecutionRecord schema.
func (*ScriptExecutionRecord) QueryScript ¶ added in v0.0.3
func (ser *ScriptExecutionRecord) QueryScript() *ScriptQuery
QueryScript queries the "script" edge of the ScriptExecutionRecord entity.
func (*ScriptExecutionRecord) String ¶ added in v0.0.3
func (ser *ScriptExecutionRecord) String() string
String implements the fmt.Stringer.
func (*ScriptExecutionRecord) Unwrap ¶ added in v0.0.3
func (ser *ScriptExecutionRecord) Unwrap() *ScriptExecutionRecord
Unwrap unwraps the ScriptExecutionRecord 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 (*ScriptExecutionRecord) Update ¶ added in v0.0.3
func (ser *ScriptExecutionRecord) Update() *ScriptExecutionRecordUpdateOne
Update returns a builder for updating this ScriptExecutionRecord. Note that you need to call ScriptExecutionRecord.Unwrap() before calling this method if this ScriptExecutionRecord was returned from a transaction, and the transaction was committed or rolled back.
type ScriptExecutionRecordClient ¶ added in v0.0.3
type ScriptExecutionRecordClient struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordClient is a client for the ScriptExecutionRecord schema.
func NewScriptExecutionRecordClient ¶ added in v0.0.3
func NewScriptExecutionRecordClient(c config) *ScriptExecutionRecordClient
NewScriptExecutionRecordClient returns a client for the ScriptExecutionRecord from the given config.
func (*ScriptExecutionRecordClient) Create ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Create() *ScriptExecutionRecordCreate
Create returns a builder for creating a ScriptExecutionRecord entity.
func (*ScriptExecutionRecordClient) CreateBulk ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) CreateBulk(builders ...*ScriptExecutionRecordCreate) *ScriptExecutionRecordCreateBulk
CreateBulk returns a builder for creating a bulk of ScriptExecutionRecord entities.
func (*ScriptExecutionRecordClient) Delete ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Delete() *ScriptExecutionRecordDelete
Delete returns a delete builder for ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) DeleteOne ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) DeleteOne(ser *ScriptExecutionRecord) *ScriptExecutionRecordDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScriptExecutionRecordClient) DeleteOneID ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) DeleteOneID(id int32) *ScriptExecutionRecordDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ScriptExecutionRecordClient) Get ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Get(ctx context.Context, id int32) (*ScriptExecutionRecord, error)
Get returns a ScriptExecutionRecord entity by its id.
func (*ScriptExecutionRecordClient) GetX ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) GetX(ctx context.Context, id int32) *ScriptExecutionRecord
GetX is like Get, but panics if an error occurs.
func (*ScriptExecutionRecordClient) Hooks ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ScriptExecutionRecordClient) Intercept ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `scriptexecutionrecord.Intercept(f(g(h())))`.
func (*ScriptExecutionRecordClient) Interceptors ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ScriptExecutionRecordClient) Query ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Query() *ScriptExecutionRecordQuery
Query returns a query builder for ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) QueryScript ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) QueryScript(ser *ScriptExecutionRecord) *ScriptQuery
QueryScript queries the script edge of a ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) Update ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Update() *ScriptExecutionRecordUpdate
Update returns an update builder for ScriptExecutionRecord.
func (*ScriptExecutionRecordClient) UpdateOne ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) UpdateOne(ser *ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScriptExecutionRecordClient) UpdateOneID ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) UpdateOneID(id int32) *ScriptExecutionRecordUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScriptExecutionRecordClient) Use ¶ added in v0.0.3
func (c *ScriptExecutionRecordClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scriptexecutionrecord.Hooks(f(g(h())))`.
type ScriptExecutionRecordCreate ¶ added in v0.0.3
type ScriptExecutionRecordCreate struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordCreate is the builder for creating a ScriptExecutionRecord entity.
func (*ScriptExecutionRecordCreate) Exec ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptExecutionRecordCreate) ExecX ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordCreate) Mutation ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) Mutation() *ScriptExecutionRecordMutation
Mutation returns the ScriptExecutionRecordMutation object of the builder.
func (*ScriptExecutionRecordCreate) Save ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) Save(ctx context.Context) (*ScriptExecutionRecord, error)
Save creates the ScriptExecutionRecord in the database.
func (*ScriptExecutionRecordCreate) SaveX ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SaveX(ctx context.Context) *ScriptExecutionRecord
SaveX calls Save and panics if Save returns an error.
func (*ScriptExecutionRecordCreate) SetCreateTime ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetCreateTime(t time.Time) *ScriptExecutionRecordCreate
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordCreate) SetExecuteResult ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetExecuteResult(s string) *ScriptExecutionRecordCreate
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordCreate) SetExecuteState ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetExecuteState(i int32) *ScriptExecutionRecordCreate
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordCreate) SetFileAddress ¶ added in v0.0.5
func (serc *ScriptExecutionRecordCreate) SetFileAddress(s string) *ScriptExecutionRecordCreate
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordCreate) SetFkScriptID ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetFkScriptID(i int32) *ScriptExecutionRecordCreate
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordCreate) SetID ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetID(i int32) *ScriptExecutionRecordCreate
SetID sets the "id" field.
func (*ScriptExecutionRecordCreate) SetNillableCreateTime ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetNillableCreateTime(t *time.Time) *ScriptExecutionRecordCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptExecutionRecordCreate) SetNillableScriptID ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetNillableScriptID(id *int32) *ScriptExecutionRecordCreate
SetNillableScriptID sets the "script" edge to the Script entity by ID if the given value is not nil.
func (*ScriptExecutionRecordCreate) SetNillableUpdateTime ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetNillableUpdateTime(t *time.Time) *ScriptExecutionRecordCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptExecutionRecordCreate) SetScript ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetScript(s *Script) *ScriptExecutionRecordCreate
SetScript sets the "script" edge to the Script entity.
func (*ScriptExecutionRecordCreate) SetScriptContent ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetScriptContent(s string) *ScriptExecutionRecordCreate
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordCreate) SetScriptID ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetScriptID(id int32) *ScriptExecutionRecordCreate
SetScriptID sets the "script" edge to the Script entity by ID.
func (*ScriptExecutionRecordCreate) SetScriptName ¶ added in v0.0.5
func (serc *ScriptExecutionRecordCreate) SetScriptName(s string) *ScriptExecutionRecordCreate
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordCreate) SetTaskNumber ¶ added in v0.0.5
func (serc *ScriptExecutionRecordCreate) SetTaskNumber(i int32) *ScriptExecutionRecordCreate
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordCreate) SetUpdateTime ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetUpdateTime(t time.Time) *ScriptExecutionRecordCreate
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordCreate) SetUserID ¶ added in v0.0.3
func (serc *ScriptExecutionRecordCreate) SetUserID(s string) *ScriptExecutionRecordCreate
SetUserID sets the "user_id" field.
type ScriptExecutionRecordCreateBulk ¶ added in v0.0.3
type ScriptExecutionRecordCreateBulk struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordCreateBulk is the builder for creating many ScriptExecutionRecord entities in bulk.
func (*ScriptExecutionRecordCreateBulk) Exec ¶ added in v0.0.3
func (sercb *ScriptExecutionRecordCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptExecutionRecordCreateBulk) ExecX ¶ added in v0.0.3
func (sercb *ScriptExecutionRecordCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordCreateBulk) Save ¶ added in v0.0.3
func (sercb *ScriptExecutionRecordCreateBulk) Save(ctx context.Context) ([]*ScriptExecutionRecord, error)
Save creates the ScriptExecutionRecord entities in the database.
func (*ScriptExecutionRecordCreateBulk) SaveX ¶ added in v0.0.3
func (sercb *ScriptExecutionRecordCreateBulk) SaveX(ctx context.Context) []*ScriptExecutionRecord
SaveX is like Save, but panics if an error occurs.
type ScriptExecutionRecordDelete ¶ added in v0.0.3
type ScriptExecutionRecordDelete struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordDelete is the builder for deleting a ScriptExecutionRecord entity.
func (*ScriptExecutionRecordDelete) Exec ¶ added in v0.0.3
func (serd *ScriptExecutionRecordDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScriptExecutionRecordDelete) ExecX ¶ added in v0.0.3
func (serd *ScriptExecutionRecordDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordDelete) Where ¶ added in v0.0.3
func (serd *ScriptExecutionRecordDelete) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordDelete
Where appends a list predicates to the ScriptExecutionRecordDelete builder.
type ScriptExecutionRecordDeleteOne ¶ added in v0.0.3
type ScriptExecutionRecordDeleteOne struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordDeleteOne is the builder for deleting a single ScriptExecutionRecord entity.
func (*ScriptExecutionRecordDeleteOne) Exec ¶ added in v0.0.3
func (serdo *ScriptExecutionRecordDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScriptExecutionRecordDeleteOne) ExecX ¶ added in v0.0.3
func (serdo *ScriptExecutionRecordDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordDeleteOne) Where ¶ added in v0.0.3
func (serdo *ScriptExecutionRecordDeleteOne) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordDeleteOne
Where appends a list predicates to the ScriptExecutionRecordDelete builder.
type ScriptExecutionRecordEdges ¶ added in v0.0.3
type ScriptExecutionRecordEdges struct { // Script holds the value of the script edge. Script *Script `json:"script,omitempty"` // contains filtered or unexported fields }
ScriptExecutionRecordEdges holds the relations/edges for other nodes in the graph.
func (ScriptExecutionRecordEdges) ScriptOrErr ¶ added in v0.0.3
func (e ScriptExecutionRecordEdges) ScriptOrErr() (*Script, error)
ScriptOrErr returns the Script value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ScriptExecutionRecordGroupBy ¶ added in v0.0.3
type ScriptExecutionRecordGroupBy struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordGroupBy is the group-by builder for ScriptExecutionRecord entities.
func (*ScriptExecutionRecordGroupBy) Aggregate ¶ added in v0.0.3
func (sergb *ScriptExecutionRecordGroupBy) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScriptExecutionRecordGroupBy) Bool ¶ added in v0.0.3
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) BoolX ¶ added in v0.0.3
BoolX is like Bool, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Bools ¶ added in v0.0.3
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) BoolsX ¶ added in v0.0.3
BoolsX is like Bools, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Float64 ¶ added in v0.0.3
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Float64X ¶ added in v0.0.3
Float64X is like Float64, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Float64s ¶ added in v0.0.3
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) Float64sX ¶ added in v0.0.3
Float64sX is like Float64s, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Int ¶ added in v0.0.3
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) IntX ¶ added in v0.0.3
IntX is like Int, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Ints ¶ added in v0.0.3
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) IntsX ¶ added in v0.0.3
IntsX is like Ints, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) Scan ¶ added in v0.0.3
func (sergb *ScriptExecutionRecordGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptExecutionRecordGroupBy) ScanX ¶ added in v0.0.3
ScanX is like Scan, but panics if an error occurs.
func (*ScriptExecutionRecordGroupBy) String ¶ added in v0.0.3
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordGroupBy) StringX ¶ added in v0.0.3
StringX is like String, but panics if an error occurs.
type ScriptExecutionRecordMutation ¶ added in v0.0.3
type ScriptExecutionRecordMutation struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordMutation represents an operation that mutates the ScriptExecutionRecord nodes in the graph.
func (*ScriptExecutionRecordMutation) AddExecuteState ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) AddExecuteState(i int32)
AddExecuteState adds i to the "execute_state" field.
func (*ScriptExecutionRecordMutation) AddField ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) AddFkScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) AddFkScriptID(i int32)
AddFkScriptID adds i to the "fk_script_id" field.
func (*ScriptExecutionRecordMutation) AddTaskNumber ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) AddTaskNumber(i int32)
AddTaskNumber adds i to the "task_number" field.
func (*ScriptExecutionRecordMutation) AddedEdges ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScriptExecutionRecordMutation) AddedExecuteState ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) AddedExecuteState() (r int32, exists bool)
AddedExecuteState returns the value that was added to the "execute_state" field in this mutation.
func (*ScriptExecutionRecordMutation) AddedField ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) AddedFields ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScriptExecutionRecordMutation) AddedFkScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) AddedFkScriptID() (r int32, exists bool)
AddedFkScriptID returns the value that was added to the "fk_script_id" field in this mutation.
func (*ScriptExecutionRecordMutation) AddedIDs ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScriptExecutionRecordMutation) AddedTaskNumber ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) AddedTaskNumber() (r int32, exists bool)
AddedTaskNumber returns the value that was added to the "task_number" field in this mutation.
func (*ScriptExecutionRecordMutation) ClearEdge ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ClearField ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ClearScript ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ClearScript()
ClearScript clears the "script" edge to the Script entity.
func (*ScriptExecutionRecordMutation) ClearedEdges ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScriptExecutionRecordMutation) ClearedFields ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScriptExecutionRecordMutation) Client ¶ added in v0.0.3
func (m ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) CreateTime ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ScriptExecutionRecordMutation) EdgeCleared ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScriptExecutionRecordMutation) ExecuteResult ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ExecuteResult() (r string, exists bool)
ExecuteResult returns the value of the "execute_result" field in the mutation.
func (*ScriptExecutionRecordMutation) ExecuteState ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ExecuteState() (r int32, exists bool)
ExecuteState returns the value of the "execute_state" field in the mutation.
func (*ScriptExecutionRecordMutation) Field ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) FieldCleared ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScriptExecutionRecordMutation) Fields ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) FileAddress ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) FileAddress() (r string, exists bool)
FileAddress returns the value of the "file_address" field in the mutation.
func (*ScriptExecutionRecordMutation) FkScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) FkScriptID() (r int32, exists bool)
FkScriptID returns the value of the "fk_script_id" field in the mutation.
func (*ScriptExecutionRecordMutation) ID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ID() (id int32, 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 (*ScriptExecutionRecordMutation) IDs ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) IDs(ctx context.Context) ([]int32, 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 (*ScriptExecutionRecordMutation) OldCreateTime ¶ added in v0.0.3
OldCreateTime returns the old "create_time" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldExecuteResult ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) OldExecuteResult(ctx context.Context) (v string, err error)
OldExecuteResult returns the old "execute_result" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldExecuteState ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) OldExecuteState(ctx context.Context) (v int32, err error)
OldExecuteState returns the old "execute_state" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldField ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)
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 (*ScriptExecutionRecordMutation) OldFileAddress ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) OldFileAddress(ctx context.Context) (v string, err error)
OldFileAddress returns the old "file_address" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldFkScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) OldFkScriptID(ctx context.Context) (v int32, err error)
OldFkScriptID returns the old "fk_script_id" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldScriptContent ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) OldScriptContent(ctx context.Context) (v string, err error)
OldScriptContent returns the old "script_content" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldScriptName ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) OldScriptName(ctx context.Context) (v string, err error)
OldScriptName returns the old "script_name" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldTaskNumber ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
OldTaskNumber returns the old "task_number" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldUpdateTime ¶ added in v0.0.3
OldUpdateTime returns the old "update_time" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) OldUserID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the ScriptExecutionRecord entity. If the ScriptExecutionRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptExecutionRecordMutation) Op ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) Op() Op
Op returns the operation name.
func (*ScriptExecutionRecordMutation) RemovedEdges ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScriptExecutionRecordMutation) RemovedIDs ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ResetCreateTime ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ScriptExecutionRecordMutation) ResetEdge ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ResetExecuteResult ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetExecuteResult()
ResetExecuteResult resets all changes to the "execute_result" field.
func (*ScriptExecutionRecordMutation) ResetExecuteState ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetExecuteState()
ResetExecuteState resets all changes to the "execute_state" field.
func (*ScriptExecutionRecordMutation) ResetField ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) ResetFileAddress ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) ResetFileAddress()
ResetFileAddress resets all changes to the "file_address" field.
func (*ScriptExecutionRecordMutation) ResetFkScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetFkScriptID()
ResetFkScriptID resets all changes to the "fk_script_id" field.
func (*ScriptExecutionRecordMutation) ResetScript ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetScript()
ResetScript resets all changes to the "script" edge.
func (*ScriptExecutionRecordMutation) ResetScriptContent ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetScriptContent()
ResetScriptContent resets all changes to the "script_content" field.
func (*ScriptExecutionRecordMutation) ResetScriptName ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) ResetScriptName()
ResetScriptName resets all changes to the "script_name" field.
func (*ScriptExecutionRecordMutation) ResetTaskNumber ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) ResetTaskNumber()
ResetTaskNumber resets all changes to the "task_number" field.
func (*ScriptExecutionRecordMutation) ResetUpdateTime ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ScriptExecutionRecordMutation) ResetUserID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ScriptExecutionRecordMutation) ScriptCleared ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ScriptCleared() bool
ScriptCleared reports if the "script" edge to the Script entity was cleared.
func (*ScriptExecutionRecordMutation) ScriptContent ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ScriptContent() (r string, exists bool)
ScriptContent returns the value of the "script_content" field in the mutation.
func (*ScriptExecutionRecordMutation) ScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ScriptID() (id int32, exists bool)
ScriptID returns the "script" edge ID in the mutation.
func (*ScriptExecutionRecordMutation) ScriptIDs ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) ScriptIDs() (ids []int32)
ScriptIDs returns the "script" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScriptID instead. It exists only for internal usage by the builders.
func (*ScriptExecutionRecordMutation) ScriptName ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) ScriptName() (r string, exists bool)
ScriptName returns the value of the "script_name" field in the mutation.
func (*ScriptExecutionRecordMutation) SetCreateTime ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordMutation) SetExecuteResult ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetExecuteResult(s string)
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordMutation) SetExecuteState ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetExecuteState(i int32)
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordMutation) SetField ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) 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 (*ScriptExecutionRecordMutation) SetFileAddress ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) SetFileAddress(s string)
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordMutation) SetFkScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetFkScriptID(i int32)
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordMutation) SetID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ScriptExecutionRecord entities.
func (*ScriptExecutionRecordMutation) SetOp ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ScriptExecutionRecordMutation) SetScriptContent ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetScriptContent(s string)
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordMutation) SetScriptID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetScriptID(id int32)
SetScriptID sets the "script" edge to the Script entity by id.
func (*ScriptExecutionRecordMutation) SetScriptName ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) SetScriptName(s string)
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordMutation) SetTaskNumber ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) SetTaskNumber(i int32)
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordMutation) SetUpdateTime ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordMutation) SetUserID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*ScriptExecutionRecordMutation) TaskNumber ¶ added in v0.0.5
func (m *ScriptExecutionRecordMutation) TaskNumber() (r int32, exists bool)
TaskNumber returns the value of the "task_number" field in the mutation.
func (ScriptExecutionRecordMutation) Tx ¶ added in v0.0.3
func (m ScriptExecutionRecordMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScriptExecutionRecordMutation) Type ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) Type() string
Type returns the node type of this mutation (ScriptExecutionRecord).
func (*ScriptExecutionRecordMutation) UpdateTime ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ScriptExecutionRecordMutation) UserID ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ScriptExecutionRecordMutation) Where ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) Where(ps ...predicate.ScriptExecutionRecord)
Where appends a list predicates to the ScriptExecutionRecordMutation builder.
func (*ScriptExecutionRecordMutation) WhereP ¶ added in v0.0.3
func (m *ScriptExecutionRecordMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ScriptExecutionRecordMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ScriptExecutionRecordQuery ¶ added in v0.0.3
type ScriptExecutionRecordQuery struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordQuery is the builder for querying ScriptExecutionRecord entities.
func (*ScriptExecutionRecordQuery) Aggregate ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
Aggregate returns a ScriptExecutionRecordSelect configured with the given aggregations.
func (*ScriptExecutionRecordQuery) All ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) All(ctx context.Context) ([]*ScriptExecutionRecord, error)
All executes the query and returns a list of ScriptExecutionRecords.
func (*ScriptExecutionRecordQuery) AllX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) AllX(ctx context.Context) []*ScriptExecutionRecord
AllX is like All, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Clone ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Clone() *ScriptExecutionRecordQuery
Clone returns a duplicate of the ScriptExecutionRecordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScriptExecutionRecordQuery) Count ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScriptExecutionRecordQuery) CountX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Exist ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScriptExecutionRecordQuery) ExistX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) First ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) First(ctx context.Context) (*ScriptExecutionRecord, error)
First returns the first ScriptExecutionRecord entity from the query. Returns a *NotFoundError when no ScriptExecutionRecord was found.
func (*ScriptExecutionRecordQuery) FirstID ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first ScriptExecutionRecord ID from the query. Returns a *NotFoundError when no ScriptExecutionRecord ID was found.
func (*ScriptExecutionRecordQuery) FirstIDX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) FirstX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) FirstX(ctx context.Context) *ScriptExecutionRecord
FirstX is like First, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) GroupBy ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) GroupBy(field string, fields ...string) *ScriptExecutionRecordGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.ScriptExecutionRecord.Query(). GroupBy(scriptexecutionrecord.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScriptExecutionRecordQuery) IDs ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ScriptExecutionRecord IDs.
func (*ScriptExecutionRecordQuery) IDsX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Limit ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Limit(limit int) *ScriptExecutionRecordQuery
Limit the number of records to be returned by this query.
func (*ScriptExecutionRecordQuery) Offset ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Offset(offset int) *ScriptExecutionRecordQuery
Offset to start from.
func (*ScriptExecutionRecordQuery) Only ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Only(ctx context.Context) (*ScriptExecutionRecord, error)
Only returns a single ScriptExecutionRecord entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ScriptExecutionRecord entity is found. Returns a *NotFoundError when no ScriptExecutionRecord entities are found.
func (*ScriptExecutionRecordQuery) OnlyID ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only ScriptExecutionRecord ID in the query. Returns a *NotSingularError when more than one ScriptExecutionRecord ID is found. Returns a *NotFoundError when no entities are found.
func (*ScriptExecutionRecordQuery) OnlyIDX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) OnlyX ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) OnlyX(ctx context.Context) *ScriptExecutionRecord
OnlyX is like Only, but panics if an error occurs.
func (*ScriptExecutionRecordQuery) Order ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Order(o ...scriptexecutionrecord.OrderOption) *ScriptExecutionRecordQuery
Order specifies how the records should be ordered.
func (*ScriptExecutionRecordQuery) QueryScript ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) QueryScript() *ScriptQuery
QueryScript chains the current query on the "script" edge.
func (*ScriptExecutionRecordQuery) Select ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Select(fields ...string) *ScriptExecutionRecordSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` } client.ScriptExecutionRecord.Query(). Select(scriptexecutionrecord.FieldUserID). Scan(ctx, &v)
func (*ScriptExecutionRecordQuery) Unique ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Unique(unique bool) *ScriptExecutionRecordQuery
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 (*ScriptExecutionRecordQuery) Where ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordQuery
Where adds a new predicate for the ScriptExecutionRecordQuery builder.
func (*ScriptExecutionRecordQuery) WithScript ¶ added in v0.0.3
func (serq *ScriptExecutionRecordQuery) WithScript(opts ...func(*ScriptQuery)) *ScriptExecutionRecordQuery
WithScript tells the query-builder to eager-load the nodes that are connected to the "script" edge. The optional arguments are used to configure the query builder of the edge.
type ScriptExecutionRecordSelect ¶ added in v0.0.3
type ScriptExecutionRecordSelect struct { *ScriptExecutionRecordQuery // contains filtered or unexported fields }
ScriptExecutionRecordSelect is the builder for selecting fields of ScriptExecutionRecord entities.
func (*ScriptExecutionRecordSelect) Aggregate ¶ added in v0.0.3
func (sers *ScriptExecutionRecordSelect) Aggregate(fns ...AggregateFunc) *ScriptExecutionRecordSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ScriptExecutionRecordSelect) Bool ¶ added in v0.0.3
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) BoolX ¶ added in v0.0.3
BoolX is like Bool, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Bools ¶ added in v0.0.3
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) BoolsX ¶ added in v0.0.3
BoolsX is like Bools, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Float64 ¶ added in v0.0.3
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Float64X ¶ added in v0.0.3
Float64X is like Float64, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Float64s ¶ added in v0.0.3
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) Float64sX ¶ added in v0.0.3
Float64sX is like Float64s, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Int ¶ added in v0.0.3
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) IntX ¶ added in v0.0.3
IntX is like Int, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Ints ¶ added in v0.0.3
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) IntsX ¶ added in v0.0.3
IntsX is like Ints, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) Scan ¶ added in v0.0.3
func (sers *ScriptExecutionRecordSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptExecutionRecordSelect) ScanX ¶ added in v0.0.3
ScanX is like Scan, but panics if an error occurs.
func (*ScriptExecutionRecordSelect) String ¶ added in v0.0.3
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ScriptExecutionRecordSelect) StringX ¶ added in v0.0.3
StringX is like String, but panics if an error occurs.
type ScriptExecutionRecordUpdate ¶ added in v0.0.3
type ScriptExecutionRecordUpdate struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordUpdate is the builder for updating ScriptExecutionRecord entities.
func (*ScriptExecutionRecordUpdate) AddExecuteState ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) AddExecuteState(i int32) *ScriptExecutionRecordUpdate
AddExecuteState adds i to the "execute_state" field.
func (*ScriptExecutionRecordUpdate) AddFkScriptID ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) AddFkScriptID(i int32) *ScriptExecutionRecordUpdate
AddFkScriptID adds i to the "fk_script_id" field.
func (*ScriptExecutionRecordUpdate) AddTaskNumber ¶ added in v0.0.5
func (seru *ScriptExecutionRecordUpdate) AddTaskNumber(i int32) *ScriptExecutionRecordUpdate
AddTaskNumber adds i to the "task_number" field.
func (*ScriptExecutionRecordUpdate) ClearScript ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) ClearScript() *ScriptExecutionRecordUpdate
ClearScript clears the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdate) Exec ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptExecutionRecordUpdate) ExecX ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordUpdate) Mutation ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) Mutation() *ScriptExecutionRecordMutation
Mutation returns the ScriptExecutionRecordMutation object of the builder.
func (*ScriptExecutionRecordUpdate) Save ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScriptExecutionRecordUpdate) SaveX ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScriptExecutionRecordUpdate) SetCreateTime ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetCreateTime(t time.Time) *ScriptExecutionRecordUpdate
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordUpdate) SetExecuteResult ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetExecuteResult(s string) *ScriptExecutionRecordUpdate
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordUpdate) SetExecuteState ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetExecuteState(i int32) *ScriptExecutionRecordUpdate
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordUpdate) SetFileAddress ¶ added in v0.0.5
func (seru *ScriptExecutionRecordUpdate) SetFileAddress(s string) *ScriptExecutionRecordUpdate
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordUpdate) SetFkScriptID ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetFkScriptID(i int32) *ScriptExecutionRecordUpdate
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordUpdate) SetNillableCreateTime ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetNillableCreateTime(t *time.Time) *ScriptExecutionRecordUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableScriptID ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdate
SetNillableScriptID sets the "script" edge to the Script entity by ID if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetNillableUpdateTime ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetNillableUpdateTime(t *time.Time) *ScriptExecutionRecordUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdate) SetScript ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetScript(s *Script) *ScriptExecutionRecordUpdate
SetScript sets the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdate) SetScriptContent ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetScriptContent(s string) *ScriptExecutionRecordUpdate
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordUpdate) SetScriptID ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetScriptID(id int32) *ScriptExecutionRecordUpdate
SetScriptID sets the "script" edge to the Script entity by ID.
func (*ScriptExecutionRecordUpdate) SetScriptName ¶ added in v0.0.5
func (seru *ScriptExecutionRecordUpdate) SetScriptName(s string) *ScriptExecutionRecordUpdate
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordUpdate) SetTaskNumber ¶ added in v0.0.5
func (seru *ScriptExecutionRecordUpdate) SetTaskNumber(i int32) *ScriptExecutionRecordUpdate
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordUpdate) SetUpdateTime ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetUpdateTime(t time.Time) *ScriptExecutionRecordUpdate
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordUpdate) SetUserID ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) SetUserID(s string) *ScriptExecutionRecordUpdate
SetUserID sets the "user_id" field.
func (*ScriptExecutionRecordUpdate) Where ¶ added in v0.0.3
func (seru *ScriptExecutionRecordUpdate) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdate
Where appends a list predicates to the ScriptExecutionRecordUpdate builder.
type ScriptExecutionRecordUpdateOne ¶ added in v0.0.3
type ScriptExecutionRecordUpdateOne struct {
// contains filtered or unexported fields
}
ScriptExecutionRecordUpdateOne is the builder for updating a single ScriptExecutionRecord entity.
func (*ScriptExecutionRecordUpdateOne) AddExecuteState ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) AddExecuteState(i int32) *ScriptExecutionRecordUpdateOne
AddExecuteState adds i to the "execute_state" field.
func (*ScriptExecutionRecordUpdateOne) AddFkScriptID ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) AddFkScriptID(i int32) *ScriptExecutionRecordUpdateOne
AddFkScriptID adds i to the "fk_script_id" field.
func (*ScriptExecutionRecordUpdateOne) AddTaskNumber ¶ added in v0.0.5
func (seruo *ScriptExecutionRecordUpdateOne) AddTaskNumber(i int32) *ScriptExecutionRecordUpdateOne
AddTaskNumber adds i to the "task_number" field.
func (*ScriptExecutionRecordUpdateOne) ClearScript ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) ClearScript() *ScriptExecutionRecordUpdateOne
ClearScript clears the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdateOne) Exec ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScriptExecutionRecordUpdateOne) ExecX ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptExecutionRecordUpdateOne) Mutation ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) Mutation() *ScriptExecutionRecordMutation
Mutation returns the ScriptExecutionRecordMutation object of the builder.
func (*ScriptExecutionRecordUpdateOne) Save ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) Save(ctx context.Context) (*ScriptExecutionRecord, error)
Save executes the query and returns the updated ScriptExecutionRecord entity.
func (*ScriptExecutionRecordUpdateOne) SaveX ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SaveX(ctx context.Context) *ScriptExecutionRecord
SaveX is like Save, but panics if an error occurs.
func (*ScriptExecutionRecordUpdateOne) Select ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) Select(field string, fields ...string) *ScriptExecutionRecordUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScriptExecutionRecordUpdateOne) SetCreateTime ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetCreateTime(t time.Time) *ScriptExecutionRecordUpdateOne
SetCreateTime sets the "create_time" field.
func (*ScriptExecutionRecordUpdateOne) SetExecuteResult ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetExecuteResult(s string) *ScriptExecutionRecordUpdateOne
SetExecuteResult sets the "execute_result" field.
func (*ScriptExecutionRecordUpdateOne) SetExecuteState ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetExecuteState(i int32) *ScriptExecutionRecordUpdateOne
SetExecuteState sets the "execute_state" field.
func (*ScriptExecutionRecordUpdateOne) SetFileAddress ¶ added in v0.0.5
func (seruo *ScriptExecutionRecordUpdateOne) SetFileAddress(s string) *ScriptExecutionRecordUpdateOne
SetFileAddress sets the "file_address" field.
func (*ScriptExecutionRecordUpdateOne) SetFkScriptID ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetFkScriptID(i int32) *ScriptExecutionRecordUpdateOne
SetFkScriptID sets the "fk_script_id" field.
func (*ScriptExecutionRecordUpdateOne) SetNillableCreateTime ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetNillableCreateTime(t *time.Time) *ScriptExecutionRecordUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableScriptID ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetNillableScriptID(id *int32) *ScriptExecutionRecordUpdateOne
SetNillableScriptID sets the "script" edge to the Script entity by ID if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetNillableUpdateTime ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetNillableUpdateTime(t *time.Time) *ScriptExecutionRecordUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptExecutionRecordUpdateOne) SetScript ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetScript(s *Script) *ScriptExecutionRecordUpdateOne
SetScript sets the "script" edge to the Script entity.
func (*ScriptExecutionRecordUpdateOne) SetScriptContent ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetScriptContent(s string) *ScriptExecutionRecordUpdateOne
SetScriptContent sets the "script_content" field.
func (*ScriptExecutionRecordUpdateOne) SetScriptID ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetScriptID(id int32) *ScriptExecutionRecordUpdateOne
SetScriptID sets the "script" edge to the Script entity by ID.
func (*ScriptExecutionRecordUpdateOne) SetScriptName ¶ added in v0.0.5
func (seruo *ScriptExecutionRecordUpdateOne) SetScriptName(s string) *ScriptExecutionRecordUpdateOne
SetScriptName sets the "script_name" field.
func (*ScriptExecutionRecordUpdateOne) SetTaskNumber ¶ added in v0.0.5
func (seruo *ScriptExecutionRecordUpdateOne) SetTaskNumber(i int32) *ScriptExecutionRecordUpdateOne
SetTaskNumber sets the "task_number" field.
func (*ScriptExecutionRecordUpdateOne) SetUpdateTime ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetUpdateTime(t time.Time) *ScriptExecutionRecordUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ScriptExecutionRecordUpdateOne) SetUserID ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) SetUserID(s string) *ScriptExecutionRecordUpdateOne
SetUserID sets the "user_id" field.
func (*ScriptExecutionRecordUpdateOne) Where ¶ added in v0.0.3
func (seruo *ScriptExecutionRecordUpdateOne) Where(ps ...predicate.ScriptExecutionRecord) *ScriptExecutionRecordUpdateOne
Where appends a list predicates to the ScriptExecutionRecordUpdate builder.
type ScriptExecutionRecords ¶ added in v0.0.3
type ScriptExecutionRecords []*ScriptExecutionRecord
ScriptExecutionRecords is a parsable slice of ScriptExecutionRecord.
type ScriptGroupBy ¶ added in v0.0.3
type ScriptGroupBy struct {
// contains filtered or unexported fields
}
ScriptGroupBy is the group-by builder for Script entities.
func (*ScriptGroupBy) Aggregate ¶ added in v0.0.3
func (sgb *ScriptGroupBy) Aggregate(fns ...AggregateFunc) *ScriptGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScriptGroupBy) Bool ¶ added in v0.0.3
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Bools ¶ added in v0.0.3
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Float64 ¶ added in v0.0.3
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Float64X ¶ added in v0.0.3
Float64X is like Float64, but panics if an error occurs.
func (*ScriptGroupBy) Float64s ¶ added in v0.0.3
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Float64sX ¶ added in v0.0.3
Float64sX is like Float64s, but panics if an error occurs.
func (*ScriptGroupBy) Int ¶ added in v0.0.3
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Ints ¶ added in v0.0.3
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Scan ¶ added in v0.0.3
func (sgb *ScriptGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptGroupBy) String ¶ added in v0.0.3
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) StringX ¶ added in v0.0.3
StringX is like String, but panics if an error occurs.
type ScriptMutation ¶ added in v0.0.3
type ScriptMutation struct {
// contains filtered or unexported fields
}
ScriptMutation represents an operation that mutates the Script nodes in the graph.
func (*ScriptMutation) AddField ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) AddScriptExecutionRecordIDs ¶ added in v0.0.3
func (m *ScriptMutation) AddScriptExecutionRecordIDs(ids ...int32)
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by ids.
func (*ScriptMutation) AddTaskNumber ¶ added in v0.0.3
func (m *ScriptMutation) AddTaskNumber(i int32)
AddTaskNumber adds i to the "task_number" field.
func (*ScriptMutation) AddedEdges ¶ added in v0.0.3
func (m *ScriptMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScriptMutation) AddedField ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) AddedFields ¶ added in v0.0.3
func (m *ScriptMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScriptMutation) AddedIDs ¶ added in v0.0.3
func (m *ScriptMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScriptMutation) AddedTaskNumber ¶ added in v0.0.3
func (m *ScriptMutation) AddedTaskNumber() (r int32, exists bool)
AddedTaskNumber returns the value that was added to the "task_number" field in this mutation.
func (*ScriptMutation) ClearEdge ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) ClearField ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) ClearScriptExecutionRecords ¶ added in v0.0.3
func (m *ScriptMutation) ClearScriptExecutionRecords()
ClearScriptExecutionRecords clears the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity.
func (*ScriptMutation) ClearedEdges ¶ added in v0.0.3
func (m *ScriptMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScriptMutation) ClearedFields ¶ added in v0.0.3
func (m *ScriptMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScriptMutation) Client ¶ added in v0.0.3
func (m ScriptMutation) 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 (*ScriptMutation) CreateTime ¶ added in v0.0.3
func (m *ScriptMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ScriptMutation) EdgeCleared ¶ added in v0.0.3
func (m *ScriptMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScriptMutation) Field ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) FieldCleared ¶ added in v0.0.3
func (m *ScriptMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScriptMutation) Fields ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) FileAddress ¶ added in v0.0.3
func (m *ScriptMutation) FileAddress() (r string, exists bool)
FileAddress returns the value of the "file_address" field in the mutation.
func (*ScriptMutation) ID ¶ added in v0.0.3
func (m *ScriptMutation) ID() (id int32, 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 (*ScriptMutation) IDs ¶ added in v0.0.3
func (m *ScriptMutation) IDs(ctx context.Context) ([]int32, 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 (*ScriptMutation) OldCreateTime ¶ added in v0.0.3
OldCreateTime returns the old "create_time" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldField ¶ added in v0.0.3
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 (*ScriptMutation) OldFileAddress ¶ added in v0.0.3
func (m *ScriptMutation) OldFileAddress(ctx context.Context) (v string, err error)
OldFileAddress returns the old "file_address" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldScriptContent ¶ added in v0.0.3
func (m *ScriptMutation) OldScriptContent(ctx context.Context) (v string, err error)
OldScriptContent returns the old "script_content" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldScriptName ¶ added in v0.0.3
func (m *ScriptMutation) OldScriptName(ctx context.Context) (v string, err error)
OldScriptName returns the old "script_name" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldTaskNumber ¶ added in v0.0.3
func (m *ScriptMutation) OldTaskNumber(ctx context.Context) (v int32, err error)
OldTaskNumber returns the old "task_number" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldUpdateTime ¶ added in v0.0.3
OldUpdateTime returns the old "update_time" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) OldUserID ¶ added in v0.0.3
func (m *ScriptMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the Script entity. If the Script object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ScriptMutation) Op ¶ added in v0.0.3
func (m *ScriptMutation) Op() Op
Op returns the operation name.
func (*ScriptMutation) RemoveScriptExecutionRecordIDs ¶ added in v0.0.3
func (m *ScriptMutation) RemoveScriptExecutionRecordIDs(ids ...int32)
RemoveScriptExecutionRecordIDs removes the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptMutation) RemovedEdges ¶ added in v0.0.3
func (m *ScriptMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScriptMutation) RemovedIDs ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) RemovedScriptExecutionRecordsIDs ¶ added in v0.0.3
func (m *ScriptMutation) RemovedScriptExecutionRecordsIDs() (ids []int32)
RemovedScriptExecutionRecords returns the removed IDs of the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity.
func (*ScriptMutation) ResetCreateTime ¶ added in v0.0.3
func (m *ScriptMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ScriptMutation) ResetEdge ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) ResetField ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) ResetFileAddress ¶ added in v0.0.3
func (m *ScriptMutation) ResetFileAddress()
ResetFileAddress resets all changes to the "file_address" field.
func (*ScriptMutation) ResetScriptContent ¶ added in v0.0.3
func (m *ScriptMutation) ResetScriptContent()
ResetScriptContent resets all changes to the "script_content" field.
func (*ScriptMutation) ResetScriptExecutionRecords ¶ added in v0.0.3
func (m *ScriptMutation) ResetScriptExecutionRecords()
ResetScriptExecutionRecords resets all changes to the "scriptExecutionRecords" edge.
func (*ScriptMutation) ResetScriptName ¶ added in v0.0.3
func (m *ScriptMutation) ResetScriptName()
ResetScriptName resets all changes to the "script_name" field.
func (*ScriptMutation) ResetTaskNumber ¶ added in v0.0.3
func (m *ScriptMutation) ResetTaskNumber()
ResetTaskNumber resets all changes to the "task_number" field.
func (*ScriptMutation) ResetUpdateTime ¶ added in v0.0.3
func (m *ScriptMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ScriptMutation) ResetUserID ¶ added in v0.0.3
func (m *ScriptMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ScriptMutation) ScriptContent ¶ added in v0.0.3
func (m *ScriptMutation) ScriptContent() (r string, exists bool)
ScriptContent returns the value of the "script_content" field in the mutation.
func (*ScriptMutation) ScriptExecutionRecordsCleared ¶ added in v0.0.3
func (m *ScriptMutation) ScriptExecutionRecordsCleared() bool
ScriptExecutionRecordsCleared reports if the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity was cleared.
func (*ScriptMutation) ScriptExecutionRecordsIDs ¶ added in v0.0.3
func (m *ScriptMutation) ScriptExecutionRecordsIDs() (ids []int32)
ScriptExecutionRecordsIDs returns the "scriptExecutionRecords" edge IDs in the mutation.
func (*ScriptMutation) ScriptName ¶ added in v0.0.3
func (m *ScriptMutation) ScriptName() (r string, exists bool)
ScriptName returns the value of the "script_name" field in the mutation.
func (*ScriptMutation) SetCreateTime ¶ added in v0.0.3
func (m *ScriptMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ScriptMutation) SetField ¶ added in v0.0.3
func (m *ScriptMutation) 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 (*ScriptMutation) SetFileAddress ¶ added in v0.0.3
func (m *ScriptMutation) SetFileAddress(s string)
SetFileAddress sets the "file_address" field.
func (*ScriptMutation) SetID ¶ added in v0.0.3
func (m *ScriptMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Script entities.
func (*ScriptMutation) SetOp ¶ added in v0.0.3
func (m *ScriptMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ScriptMutation) SetScriptContent ¶ added in v0.0.3
func (m *ScriptMutation) SetScriptContent(s string)
SetScriptContent sets the "script_content" field.
func (*ScriptMutation) SetScriptName ¶ added in v0.0.3
func (m *ScriptMutation) SetScriptName(s string)
SetScriptName sets the "script_name" field.
func (*ScriptMutation) SetTaskNumber ¶ added in v0.0.3
func (m *ScriptMutation) SetTaskNumber(i int32)
SetTaskNumber sets the "task_number" field.
func (*ScriptMutation) SetUpdateTime ¶ added in v0.0.3
func (m *ScriptMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ScriptMutation) SetUserID ¶ added in v0.0.3
func (m *ScriptMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*ScriptMutation) TaskNumber ¶ added in v0.0.3
func (m *ScriptMutation) TaskNumber() (r int32, exists bool)
TaskNumber returns the value of the "task_number" field in the mutation.
func (ScriptMutation) Tx ¶ added in v0.0.3
func (m ScriptMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScriptMutation) Type ¶ added in v0.0.3
func (m *ScriptMutation) Type() string
Type returns the node type of this mutation (Script).
func (*ScriptMutation) UpdateTime ¶ added in v0.0.3
func (m *ScriptMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ScriptMutation) UserID ¶ added in v0.0.3
func (m *ScriptMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ScriptMutation) Where ¶ added in v0.0.3
func (m *ScriptMutation) Where(ps ...predicate.Script)
Where appends a list predicates to the ScriptMutation builder.
func (*ScriptMutation) WhereP ¶ added in v0.0.3
func (m *ScriptMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ScriptMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ScriptQuery ¶ added in v0.0.3
type ScriptQuery struct {
// contains filtered or unexported fields
}
ScriptQuery is the builder for querying Script entities.
func (*ScriptQuery) Aggregate ¶ added in v0.0.3
func (sq *ScriptQuery) Aggregate(fns ...AggregateFunc) *ScriptSelect
Aggregate returns a ScriptSelect configured with the given aggregations.
func (*ScriptQuery) All ¶ added in v0.0.3
func (sq *ScriptQuery) All(ctx context.Context) ([]*Script, error)
All executes the query and returns a list of Scripts.
func (*ScriptQuery) AllX ¶ added in v0.0.3
func (sq *ScriptQuery) AllX(ctx context.Context) []*Script
AllX is like All, but panics if an error occurs.
func (*ScriptQuery) Clone ¶ added in v0.0.3
func (sq *ScriptQuery) Clone() *ScriptQuery
Clone returns a duplicate of the ScriptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScriptQuery) Count ¶ added in v0.0.3
func (sq *ScriptQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScriptQuery) CountX ¶ added in v0.0.3
func (sq *ScriptQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScriptQuery) Exist ¶ added in v0.0.3
func (sq *ScriptQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScriptQuery) ExistX ¶ added in v0.0.3
func (sq *ScriptQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScriptQuery) First ¶ added in v0.0.3
func (sq *ScriptQuery) First(ctx context.Context) (*Script, error)
First returns the first Script entity from the query. Returns a *NotFoundError when no Script was found.
func (*ScriptQuery) FirstID ¶ added in v0.0.3
func (sq *ScriptQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first Script ID from the query. Returns a *NotFoundError when no Script ID was found.
func (*ScriptQuery) FirstIDX ¶ added in v0.0.3
func (sq *ScriptQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScriptQuery) FirstX ¶ added in v0.0.3
func (sq *ScriptQuery) FirstX(ctx context.Context) *Script
FirstX is like First, but panics if an error occurs.
func (*ScriptQuery) GroupBy ¶ added in v0.0.3
func (sq *ScriptQuery) GroupBy(field string, fields ...string) *ScriptGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Script.Query(). GroupBy(script.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScriptQuery) IDs ¶ added in v0.0.3
func (sq *ScriptQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of Script IDs.
func (*ScriptQuery) IDsX ¶ added in v0.0.3
func (sq *ScriptQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ScriptQuery) Limit ¶ added in v0.0.3
func (sq *ScriptQuery) Limit(limit int) *ScriptQuery
Limit the number of records to be returned by this query.
func (*ScriptQuery) Offset ¶ added in v0.0.3
func (sq *ScriptQuery) Offset(offset int) *ScriptQuery
Offset to start from.
func (*ScriptQuery) Only ¶ added in v0.0.3
func (sq *ScriptQuery) Only(ctx context.Context) (*Script, error)
Only returns a single Script entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Script entity is found. Returns a *NotFoundError when no Script entities are found.
func (*ScriptQuery) OnlyID ¶ added in v0.0.3
func (sq *ScriptQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only Script ID in the query. Returns a *NotSingularError when more than one Script ID is found. Returns a *NotFoundError when no entities are found.
func (*ScriptQuery) OnlyIDX ¶ added in v0.0.3
func (sq *ScriptQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScriptQuery) OnlyX ¶ added in v0.0.3
func (sq *ScriptQuery) OnlyX(ctx context.Context) *Script
OnlyX is like Only, but panics if an error occurs.
func (*ScriptQuery) Order ¶ added in v0.0.3
func (sq *ScriptQuery) Order(o ...script.OrderOption) *ScriptQuery
Order specifies how the records should be ordered.
func (*ScriptQuery) QueryScriptExecutionRecords ¶ added in v0.0.3
func (sq *ScriptQuery) QueryScriptExecutionRecords() *ScriptExecutionRecordQuery
QueryScriptExecutionRecords chains the current query on the "scriptExecutionRecords" edge.
func (*ScriptQuery) Select ¶ added in v0.0.3
func (sq *ScriptQuery) Select(fields ...string) *ScriptSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserID string `json:"user_id,omitempty"` } client.Script.Query(). Select(script.FieldUserID). Scan(ctx, &v)
func (*ScriptQuery) Unique ¶ added in v0.0.3
func (sq *ScriptQuery) Unique(unique bool) *ScriptQuery
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 (*ScriptQuery) Where ¶ added in v0.0.3
func (sq *ScriptQuery) Where(ps ...predicate.Script) *ScriptQuery
Where adds a new predicate for the ScriptQuery builder.
func (*ScriptQuery) WithScriptExecutionRecords ¶ added in v0.0.3
func (sq *ScriptQuery) WithScriptExecutionRecords(opts ...func(*ScriptExecutionRecordQuery)) *ScriptQuery
WithScriptExecutionRecords tells the query-builder to eager-load the nodes that are connected to the "scriptExecutionRecords" edge. The optional arguments are used to configure the query builder of the edge.
type ScriptSelect ¶ added in v0.0.3
type ScriptSelect struct { *ScriptQuery // contains filtered or unexported fields }
ScriptSelect is the builder for selecting fields of Script entities.
func (*ScriptSelect) Aggregate ¶ added in v0.0.3
func (ss *ScriptSelect) Aggregate(fns ...AggregateFunc) *ScriptSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ScriptSelect) Bool ¶ added in v0.0.3
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Bools ¶ added in v0.0.3
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Float64 ¶ added in v0.0.3
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Float64X ¶ added in v0.0.3
Float64X is like Float64, but panics if an error occurs.
func (*ScriptSelect) Float64s ¶ added in v0.0.3
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Float64sX ¶ added in v0.0.3
Float64sX is like Float64s, but panics if an error occurs.
func (*ScriptSelect) Int ¶ added in v0.0.3
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Ints ¶ added in v0.0.3
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Scan ¶ added in v0.0.3
func (ss *ScriptSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptSelect) String ¶ added in v0.0.3
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) StringX ¶ added in v0.0.3
StringX is like String, but panics if an error occurs.
type ScriptUpdate ¶ added in v0.0.3
type ScriptUpdate struct {
// contains filtered or unexported fields
}
ScriptUpdate is the builder for updating Script entities.
func (*ScriptUpdate) AddScriptExecutionRecordIDs ¶ added in v0.0.3
func (su *ScriptUpdate) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptUpdate) AddScriptExecutionRecords ¶ added in v0.0.3
func (su *ScriptUpdate) AddScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdate
AddScriptExecutionRecords adds the "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdate) AddTaskNumber ¶ added in v0.0.3
func (su *ScriptUpdate) AddTaskNumber(i int32) *ScriptUpdate
AddTaskNumber adds i to the "task_number" field.
func (*ScriptUpdate) ClearScriptExecutionRecords ¶ added in v0.0.3
func (su *ScriptUpdate) ClearScriptExecutionRecords() *ScriptUpdate
ClearScriptExecutionRecords clears all "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdate) Exec ¶ added in v0.0.3
func (su *ScriptUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptUpdate) ExecX ¶ added in v0.0.3
func (su *ScriptUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptUpdate) Mutation ¶ added in v0.0.3
func (su *ScriptUpdate) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptUpdate) RemoveScriptExecutionRecordIDs ¶ added in v0.0.3
func (su *ScriptUpdate) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdate
RemoveScriptExecutionRecordIDs removes the "scriptExecutionRecords" edge to ScriptExecutionRecord entities by IDs.
func (*ScriptUpdate) RemoveScriptExecutionRecords ¶ added in v0.0.3
func (su *ScriptUpdate) RemoveScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdate
RemoveScriptExecutionRecords removes "scriptExecutionRecords" edges to ScriptExecutionRecord entities.
func (*ScriptUpdate) Save ¶ added in v0.0.3
func (su *ScriptUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScriptUpdate) SaveX ¶ added in v0.0.3
func (su *ScriptUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScriptUpdate) SetCreateTime ¶ added in v0.0.3
func (su *ScriptUpdate) SetCreateTime(t time.Time) *ScriptUpdate
SetCreateTime sets the "create_time" field.
func (*ScriptUpdate) SetFileAddress ¶ added in v0.0.3
func (su *ScriptUpdate) SetFileAddress(s string) *ScriptUpdate
SetFileAddress sets the "file_address" field.
func (*ScriptUpdate) SetNillableCreateTime ¶ added in v0.0.3
func (su *ScriptUpdate) SetNillableCreateTime(t *time.Time) *ScriptUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptUpdate) SetNillableUpdateTime ¶ added in v0.0.3
func (su *ScriptUpdate) SetNillableUpdateTime(t *time.Time) *ScriptUpdate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptUpdate) SetScriptContent ¶ added in v0.0.3
func (su *ScriptUpdate) SetScriptContent(s string) *ScriptUpdate
SetScriptContent sets the "script_content" field.
func (*ScriptUpdate) SetScriptName ¶ added in v0.0.3
func (su *ScriptUpdate) SetScriptName(s string) *ScriptUpdate
SetScriptName sets the "script_name" field.
func (*ScriptUpdate) SetTaskNumber ¶ added in v0.0.3
func (su *ScriptUpdate) SetTaskNumber(i int32) *ScriptUpdate
SetTaskNumber sets the "task_number" field.
func (*ScriptUpdate) SetUpdateTime ¶ added in v0.0.3
func (su *ScriptUpdate) SetUpdateTime(t time.Time) *ScriptUpdate
SetUpdateTime sets the "update_time" field.
func (*ScriptUpdate) SetUserID ¶ added in v0.0.3
func (su *ScriptUpdate) SetUserID(s string) *ScriptUpdate
SetUserID sets the "user_id" field.
func (*ScriptUpdate) Where ¶ added in v0.0.3
func (su *ScriptUpdate) Where(ps ...predicate.Script) *ScriptUpdate
Where appends a list predicates to the ScriptUpdate builder.
type ScriptUpdateOne ¶ added in v0.0.3
type ScriptUpdateOne struct {
// contains filtered or unexported fields
}
ScriptUpdateOne is the builder for updating a single Script entity.
func (*ScriptUpdateOne) AddScriptExecutionRecordIDs ¶ added in v0.0.3
func (suo *ScriptUpdateOne) AddScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
AddScriptExecutionRecordIDs adds the "scriptExecutionRecords" edge to the ScriptExecutionRecord entity by IDs.
func (*ScriptUpdateOne) AddScriptExecutionRecords ¶ added in v0.0.3
func (suo *ScriptUpdateOne) AddScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdateOne
AddScriptExecutionRecords adds the "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdateOne) AddTaskNumber ¶ added in v0.0.3
func (suo *ScriptUpdateOne) AddTaskNumber(i int32) *ScriptUpdateOne
AddTaskNumber adds i to the "task_number" field.
func (*ScriptUpdateOne) ClearScriptExecutionRecords ¶ added in v0.0.3
func (suo *ScriptUpdateOne) ClearScriptExecutionRecords() *ScriptUpdateOne
ClearScriptExecutionRecords clears all "scriptExecutionRecords" edges to the ScriptExecutionRecord entity.
func (*ScriptUpdateOne) Exec ¶ added in v0.0.3
func (suo *ScriptUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScriptUpdateOne) ExecX ¶ added in v0.0.3
func (suo *ScriptUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptUpdateOne) Mutation ¶ added in v0.0.3
func (suo *ScriptUpdateOne) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptUpdateOne) RemoveScriptExecutionRecordIDs ¶ added in v0.0.3
func (suo *ScriptUpdateOne) RemoveScriptExecutionRecordIDs(ids ...int32) *ScriptUpdateOne
RemoveScriptExecutionRecordIDs removes the "scriptExecutionRecords" edge to ScriptExecutionRecord entities by IDs.
func (*ScriptUpdateOne) RemoveScriptExecutionRecords ¶ added in v0.0.3
func (suo *ScriptUpdateOne) RemoveScriptExecutionRecords(s ...*ScriptExecutionRecord) *ScriptUpdateOne
RemoveScriptExecutionRecords removes "scriptExecutionRecords" edges to ScriptExecutionRecord entities.
func (*ScriptUpdateOne) Save ¶ added in v0.0.3
func (suo *ScriptUpdateOne) Save(ctx context.Context) (*Script, error)
Save executes the query and returns the updated Script entity.
func (*ScriptUpdateOne) SaveX ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SaveX(ctx context.Context) *Script
SaveX is like Save, but panics if an error occurs.
func (*ScriptUpdateOne) Select ¶ added in v0.0.3
func (suo *ScriptUpdateOne) Select(field string, fields ...string) *ScriptUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScriptUpdateOne) SetCreateTime ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetCreateTime(t time.Time) *ScriptUpdateOne
SetCreateTime sets the "create_time" field.
func (*ScriptUpdateOne) SetFileAddress ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetFileAddress(s string) *ScriptUpdateOne
SetFileAddress sets the "file_address" field.
func (*ScriptUpdateOne) SetNillableCreateTime ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetNillableCreateTime(t *time.Time) *ScriptUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableUpdateTime ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetNillableUpdateTime(t *time.Time) *ScriptUpdateOne
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ScriptUpdateOne) SetScriptContent ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetScriptContent(s string) *ScriptUpdateOne
SetScriptContent sets the "script_content" field.
func (*ScriptUpdateOne) SetScriptName ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetScriptName(s string) *ScriptUpdateOne
SetScriptName sets the "script_name" field.
func (*ScriptUpdateOne) SetTaskNumber ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetTaskNumber(i int32) *ScriptUpdateOne
SetTaskNumber sets the "task_number" field.
func (*ScriptUpdateOne) SetUpdateTime ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetUpdateTime(t time.Time) *ScriptUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ScriptUpdateOne) SetUserID ¶ added in v0.0.3
func (suo *ScriptUpdateOne) SetUserID(s string) *ScriptUpdateOne
SetUserID sets the "user_id" field.
func (*ScriptUpdateOne) Where ¶ added in v0.0.3
func (suo *ScriptUpdateOne) Where(ps ...predicate.Script) *ScriptUpdateOne
Where appends a list predicates to the ScriptUpdate builder.
type Storage ¶
type Storage struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Owner holds the value of the "owner" field. Owner string `json:"owner,omitempty"` // 0: DIR, 1:file Type int32 `json:"type,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Cid holds the value of the "cid" field. Cid *string `json:"cid,omitempty"` // size Size int32 `json:"size,omitempty"` // LastModify holds the value of the "last_modify" field. LastModify time.Time `json:"last_modify,omitempty"` // ParentID holds the value of the "parent_id" field. ParentID string `json:"parent_id,omitempty"` // contains filtered or unexported fields }
Storage is the model entity for the Storage schema.
func (*Storage) Unwrap ¶
Unwrap unwraps the Storage 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 (*Storage) Update ¶
func (s *Storage) Update() *StorageUpdateOne
Update returns a builder for updating this Storage. Note that you need to call Storage.Unwrap() before calling this method if this Storage was returned from a transaction, and the transaction was committed or rolled back.
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
StorageClient is a client for the Storage schema.
func NewStorageClient ¶
func NewStorageClient(c config) *StorageClient
NewStorageClient returns a client for the Storage from the given config.
func (*StorageClient) Create ¶
func (c *StorageClient) Create() *StorageCreate
Create returns a builder for creating a Storage entity.
func (*StorageClient) CreateBulk ¶
func (c *StorageClient) CreateBulk(builders ...*StorageCreate) *StorageCreateBulk
CreateBulk returns a builder for creating a bulk of Storage entities.
func (*StorageClient) Delete ¶
func (c *StorageClient) Delete() *StorageDelete
Delete returns a delete builder for Storage.
func (*StorageClient) DeleteOne ¶
func (c *StorageClient) DeleteOne(s *Storage) *StorageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StorageClient) DeleteOneID ¶
func (c *StorageClient) DeleteOneID(id uuid.UUID) *StorageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StorageClient) Hooks ¶
func (c *StorageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StorageClient) Intercept ¶
func (c *StorageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `storage.Intercept(f(g(h())))`.
func (*StorageClient) Interceptors ¶
func (c *StorageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StorageClient) Query ¶
func (c *StorageClient) Query() *StorageQuery
Query returns a query builder for Storage.
func (*StorageClient) Update ¶
func (c *StorageClient) Update() *StorageUpdate
Update returns an update builder for Storage.
func (*StorageClient) UpdateOne ¶
func (c *StorageClient) UpdateOne(s *Storage) *StorageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StorageClient) UpdateOneID ¶
func (c *StorageClient) UpdateOneID(id uuid.UUID) *StorageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StorageClient) Use ¶
func (c *StorageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `storage.Hooks(f(g(h())))`.
type StorageCreate ¶
type StorageCreate struct {
// contains filtered or unexported fields
}
StorageCreate is the builder for creating a Storage entity.
func (*StorageCreate) Exec ¶
func (sc *StorageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageCreate) ExecX ¶
func (sc *StorageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageCreate) Mutation ¶
func (sc *StorageCreate) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageCreate) Save ¶
func (sc *StorageCreate) Save(ctx context.Context) (*Storage, error)
Save creates the Storage in the database.
func (*StorageCreate) SaveX ¶
func (sc *StorageCreate) SaveX(ctx context.Context) *Storage
SaveX calls Save and panics if Save returns an error.
func (*StorageCreate) SetCid ¶
func (sc *StorageCreate) SetCid(s string) *StorageCreate
SetCid sets the "cid" field.
func (*StorageCreate) SetID ¶
func (sc *StorageCreate) SetID(u uuid.UUID) *StorageCreate
SetID sets the "id" field.
func (*StorageCreate) SetLastModify ¶
func (sc *StorageCreate) SetLastModify(t time.Time) *StorageCreate
SetLastModify sets the "last_modify" field.
func (*StorageCreate) SetName ¶
func (sc *StorageCreate) SetName(s string) *StorageCreate
SetName sets the "name" field.
func (*StorageCreate) SetNillableID ¶
func (sc *StorageCreate) SetNillableID(u *uuid.UUID) *StorageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*StorageCreate) SetNillableLastModify ¶
func (sc *StorageCreate) SetNillableLastModify(t *time.Time) *StorageCreate
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageCreate) SetNillableType ¶
func (sc *StorageCreate) SetNillableType(i *int32) *StorageCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageCreate) SetOwner ¶
func (sc *StorageCreate) SetOwner(s string) *StorageCreate
SetOwner sets the "owner" field.
func (*StorageCreate) SetParentID ¶
func (sc *StorageCreate) SetParentID(s string) *StorageCreate
SetParentID sets the "parent_id" field.
func (*StorageCreate) SetSize ¶
func (sc *StorageCreate) SetSize(i int32) *StorageCreate
SetSize sets the "size" field.
func (*StorageCreate) SetType ¶
func (sc *StorageCreate) SetType(i int32) *StorageCreate
SetType sets the "type" field.
type StorageCreateBulk ¶
type StorageCreateBulk struct {
// contains filtered or unexported fields
}
StorageCreateBulk is the builder for creating many Storage entities in bulk.
func (*StorageCreateBulk) Exec ¶
func (scb *StorageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageCreateBulk) ExecX ¶
func (scb *StorageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type StorageDelete ¶
type StorageDelete struct {
// contains filtered or unexported fields
}
StorageDelete is the builder for deleting a Storage entity.
func (*StorageDelete) Exec ¶
func (sd *StorageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StorageDelete) ExecX ¶
func (sd *StorageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StorageDelete) Where ¶
func (sd *StorageDelete) Where(ps ...predicate.Storage) *StorageDelete
Where appends a list predicates to the StorageDelete builder.
type StorageDeleteOne ¶
type StorageDeleteOne struct {
// contains filtered or unexported fields
}
StorageDeleteOne is the builder for deleting a single Storage entity.
func (*StorageDeleteOne) Exec ¶
func (sdo *StorageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StorageDeleteOne) ExecX ¶
func (sdo *StorageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageDeleteOne) Where ¶
func (sdo *StorageDeleteOne) Where(ps ...predicate.Storage) *StorageDeleteOne
Where appends a list predicates to the StorageDelete builder.
type StorageGroupBy ¶
type StorageGroupBy struct {
// contains filtered or unexported fields
}
StorageGroupBy is the group-by builder for Storage entities.
func (*StorageGroupBy) Aggregate ¶
func (sgb *StorageGroupBy) Aggregate(fns ...AggregateFunc) *StorageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StorageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Scan ¶
func (sgb *StorageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageMutation ¶
type StorageMutation struct {
// contains filtered or unexported fields
}
StorageMutation represents an operation that mutates the Storage nodes in the graph.
func (*StorageMutation) AddField ¶
func (m *StorageMutation) 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 (*StorageMutation) AddSize ¶
func (m *StorageMutation) AddSize(i int32)
AddSize adds i to the "size" field.
func (*StorageMutation) AddType ¶
func (m *StorageMutation) AddType(i int32)
AddType adds i to the "type" field.
func (*StorageMutation) AddedEdges ¶
func (m *StorageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StorageMutation) AddedField ¶
func (m *StorageMutation) 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 (*StorageMutation) AddedFields ¶
func (m *StorageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StorageMutation) AddedIDs ¶
func (m *StorageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StorageMutation) AddedSize ¶
func (m *StorageMutation) AddedSize() (r int32, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*StorageMutation) AddedType ¶
func (m *StorageMutation) AddedType() (r int32, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*StorageMutation) Cid ¶
func (m *StorageMutation) Cid() (r string, exists bool)
Cid returns the value of the "cid" field in the mutation.
func (*StorageMutation) ClearEdge ¶
func (m *StorageMutation) 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 (*StorageMutation) ClearField ¶
func (m *StorageMutation) 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 (*StorageMutation) ClearedEdges ¶
func (m *StorageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StorageMutation) ClearedFields ¶
func (m *StorageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StorageMutation) Client ¶
func (m StorageMutation) 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 (*StorageMutation) EdgeCleared ¶
func (m *StorageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StorageMutation) Field ¶
func (m *StorageMutation) 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 (*StorageMutation) FieldCleared ¶
func (m *StorageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StorageMutation) Fields ¶
func (m *StorageMutation) 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 (*StorageMutation) GetType ¶
func (m *StorageMutation) GetType() (r int32, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*StorageMutation) ID ¶
func (m *StorageMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*StorageMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*StorageMutation) LastModify ¶
func (m *StorageMutation) LastModify() (r time.Time, exists bool)
LastModify returns the value of the "last_modify" field in the mutation.
func (*StorageMutation) Name ¶
func (m *StorageMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*StorageMutation) OldCid ¶
func (m *StorageMutation) OldCid(ctx context.Context) (v *string, err error)
OldCid returns the old "cid" field's value of the Storage entity. If the Storage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StorageMutation) 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 (*StorageMutation) OldLastModify ¶
OldLastModify returns the old "last_modify" field's value of the Storage entity. If the Storage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StorageMutation) OldName ¶
func (m *StorageMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Storage entity. If the Storage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StorageMutation) OldOwner ¶
func (m *StorageMutation) OldOwner(ctx context.Context) (v string, err error)
OldOwner returns the old "owner" field's value of the Storage entity. If the Storage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StorageMutation) OldParentID ¶
func (m *StorageMutation) OldParentID(ctx context.Context) (v string, err error)
OldParentID returns the old "parent_id" field's value of the Storage entity. If the Storage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StorageMutation) OldSize ¶
func (m *StorageMutation) OldSize(ctx context.Context) (v int32, err error)
OldSize returns the old "size" field's value of the Storage entity. If the Storage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StorageMutation) OldType ¶
func (m *StorageMutation) OldType(ctx context.Context) (v int32, err error)
OldType returns the old "type" field's value of the Storage entity. If the Storage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StorageMutation) Owner ¶
func (m *StorageMutation) Owner() (r string, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*StorageMutation) ParentID ¶
func (m *StorageMutation) ParentID() (r string, exists bool)
ParentID returns the value of the "parent_id" field in the mutation.
func (*StorageMutation) RemovedEdges ¶
func (m *StorageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StorageMutation) RemovedIDs ¶
func (m *StorageMutation) 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 (*StorageMutation) ResetCid ¶
func (m *StorageMutation) ResetCid()
ResetCid resets all changes to the "cid" field.
func (*StorageMutation) ResetEdge ¶
func (m *StorageMutation) 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 (*StorageMutation) ResetField ¶
func (m *StorageMutation) 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 (*StorageMutation) ResetLastModify ¶
func (m *StorageMutation) ResetLastModify()
ResetLastModify resets all changes to the "last_modify" field.
func (*StorageMutation) ResetName ¶
func (m *StorageMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*StorageMutation) ResetOwner ¶
func (m *StorageMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*StorageMutation) ResetParentID ¶
func (m *StorageMutation) ResetParentID()
ResetParentID resets all changes to the "parent_id" field.
func (*StorageMutation) ResetSize ¶
func (m *StorageMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*StorageMutation) ResetType ¶
func (m *StorageMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*StorageMutation) SetCid ¶
func (m *StorageMutation) SetCid(s string)
SetCid sets the "cid" field.
func (*StorageMutation) SetField ¶
func (m *StorageMutation) 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 (*StorageMutation) SetID ¶
func (m *StorageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Storage entities.
func (*StorageMutation) SetLastModify ¶
func (m *StorageMutation) SetLastModify(t time.Time)
SetLastModify sets the "last_modify" field.
func (*StorageMutation) SetName ¶
func (m *StorageMutation) SetName(s string)
SetName sets the "name" field.
func (*StorageMutation) SetOp ¶
func (m *StorageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StorageMutation) SetOwner ¶
func (m *StorageMutation) SetOwner(s string)
SetOwner sets the "owner" field.
func (*StorageMutation) SetParentID ¶
func (m *StorageMutation) SetParentID(s string)
SetParentID sets the "parent_id" field.
func (*StorageMutation) SetSize ¶
func (m *StorageMutation) SetSize(i int32)
SetSize sets the "size" field.
func (*StorageMutation) SetType ¶
func (m *StorageMutation) SetType(i int32)
SetType sets the "type" field.
func (*StorageMutation) Size ¶
func (m *StorageMutation) Size() (r int32, exists bool)
Size returns the value of the "size" field in the mutation.
func (StorageMutation) Tx ¶
func (m StorageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StorageMutation) Type ¶
func (m *StorageMutation) Type() string
Type returns the node type of this mutation (Storage).
func (*StorageMutation) Where ¶
func (m *StorageMutation) Where(ps ...predicate.Storage)
Where appends a list predicates to the StorageMutation builder.
func (*StorageMutation) WhereP ¶
func (m *StorageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StorageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StorageQuery ¶
type StorageQuery struct {
// contains filtered or unexported fields
}
StorageQuery is the builder for querying Storage entities.
func (*StorageQuery) Aggregate ¶
func (sq *StorageQuery) Aggregate(fns ...AggregateFunc) *StorageSelect
Aggregate returns a StorageSelect configured with the given aggregations.
func (*StorageQuery) All ¶
func (sq *StorageQuery) All(ctx context.Context) ([]*Storage, error)
All executes the query and returns a list of Storages.
func (*StorageQuery) AllX ¶
func (sq *StorageQuery) AllX(ctx context.Context) []*Storage
AllX is like All, but panics if an error occurs.
func (*StorageQuery) Clone ¶
func (sq *StorageQuery) Clone() *StorageQuery
Clone returns a duplicate of the StorageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StorageQuery) Count ¶
func (sq *StorageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StorageQuery) CountX ¶
func (sq *StorageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StorageQuery) Exist ¶
func (sq *StorageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StorageQuery) ExistX ¶
func (sq *StorageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StorageQuery) First ¶
func (sq *StorageQuery) First(ctx context.Context) (*Storage, error)
First returns the first Storage entity from the query. Returns a *NotFoundError when no Storage was found.
func (*StorageQuery) FirstID ¶
FirstID returns the first Storage ID from the query. Returns a *NotFoundError when no Storage ID was found.
func (*StorageQuery) FirstIDX ¶
func (sq *StorageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*StorageQuery) FirstX ¶
func (sq *StorageQuery) FirstX(ctx context.Context) *Storage
FirstX is like First, but panics if an error occurs.
func (*StorageQuery) GroupBy ¶
func (sq *StorageQuery) GroupBy(field string, fields ...string) *StorageGroupBy
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 { Owner string `json:"owner,omitempty"` Count int `json:"count,omitempty"` } client.Storage.Query(). GroupBy(storage.FieldOwner). Aggregate(ent.Count()). Scan(ctx, &v)
func (*StorageQuery) IDsX ¶
func (sq *StorageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*StorageQuery) Limit ¶
func (sq *StorageQuery) Limit(limit int) *StorageQuery
Limit the number of records to be returned by this query.
func (*StorageQuery) Offset ¶
func (sq *StorageQuery) Offset(offset int) *StorageQuery
Offset to start from.
func (*StorageQuery) Only ¶
func (sq *StorageQuery) Only(ctx context.Context) (*Storage, error)
Only returns a single Storage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Storage entity is found. Returns a *NotFoundError when no Storage entities are found.
func (*StorageQuery) OnlyID ¶
OnlyID is like Only, but returns the only Storage ID in the query. Returns a *NotSingularError when more than one Storage ID is found. Returns a *NotFoundError when no entities are found.
func (*StorageQuery) OnlyIDX ¶
func (sq *StorageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StorageQuery) OnlyX ¶
func (sq *StorageQuery) OnlyX(ctx context.Context) *Storage
OnlyX is like Only, but panics if an error occurs.
func (*StorageQuery) Order ¶
func (sq *StorageQuery) Order(o ...storage.OrderOption) *StorageQuery
Order specifies how the records should be ordered.
func (*StorageQuery) Select ¶
func (sq *StorageQuery) Select(fields ...string) *StorageSelect
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 { Owner string `json:"owner,omitempty"` } client.Storage.Query(). Select(storage.FieldOwner). Scan(ctx, &v)
func (*StorageQuery) Unique ¶
func (sq *StorageQuery) Unique(unique bool) *StorageQuery
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 (*StorageQuery) Where ¶
func (sq *StorageQuery) Where(ps ...predicate.Storage) *StorageQuery
Where adds a new predicate for the StorageQuery builder.
type StorageSelect ¶
type StorageSelect struct { *StorageQuery // contains filtered or unexported fields }
StorageSelect is the builder for selecting fields of Storage entities.
func (*StorageSelect) Aggregate ¶
func (ss *StorageSelect) Aggregate(fns ...AggregateFunc) *StorageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StorageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Scan ¶
func (ss *StorageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageUpdate ¶
type StorageUpdate struct {
// contains filtered or unexported fields
}
StorageUpdate is the builder for updating Storage entities.
func (*StorageUpdate) AddSize ¶
func (su *StorageUpdate) AddSize(i int32) *StorageUpdate
AddSize adds i to the "size" field.
func (*StorageUpdate) AddType ¶
func (su *StorageUpdate) AddType(i int32) *StorageUpdate
AddType adds i to the "type" field.
func (*StorageUpdate) Exec ¶
func (su *StorageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageUpdate) ExecX ¶
func (su *StorageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageUpdate) Mutation ¶
func (su *StorageUpdate) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageUpdate) Save ¶
func (su *StorageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StorageUpdate) SaveX ¶
func (su *StorageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StorageUpdate) SetCid ¶
func (su *StorageUpdate) SetCid(s string) *StorageUpdate
SetCid sets the "cid" field.
func (*StorageUpdate) SetLastModify ¶
func (su *StorageUpdate) SetLastModify(t time.Time) *StorageUpdate
SetLastModify sets the "last_modify" field.
func (*StorageUpdate) SetName ¶
func (su *StorageUpdate) SetName(s string) *StorageUpdate
SetName sets the "name" field.
func (*StorageUpdate) SetNillableLastModify ¶
func (su *StorageUpdate) SetNillableLastModify(t *time.Time) *StorageUpdate
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageUpdate) SetNillableType ¶
func (su *StorageUpdate) SetNillableType(i *int32) *StorageUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageUpdate) SetOwner ¶
func (su *StorageUpdate) SetOwner(s string) *StorageUpdate
SetOwner sets the "owner" field.
func (*StorageUpdate) SetParentID ¶
func (su *StorageUpdate) SetParentID(s string) *StorageUpdate
SetParentID sets the "parent_id" field.
func (*StorageUpdate) SetSize ¶
func (su *StorageUpdate) SetSize(i int32) *StorageUpdate
SetSize sets the "size" field.
func (*StorageUpdate) SetType ¶
func (su *StorageUpdate) SetType(i int32) *StorageUpdate
SetType sets the "type" field.
func (*StorageUpdate) Where ¶
func (su *StorageUpdate) Where(ps ...predicate.Storage) *StorageUpdate
Where appends a list predicates to the StorageUpdate builder.
type StorageUpdateOne ¶
type StorageUpdateOne struct {
// contains filtered or unexported fields
}
StorageUpdateOne is the builder for updating a single Storage entity.
func (*StorageUpdateOne) AddSize ¶
func (suo *StorageUpdateOne) AddSize(i int32) *StorageUpdateOne
AddSize adds i to the "size" field.
func (*StorageUpdateOne) AddType ¶
func (suo *StorageUpdateOne) AddType(i int32) *StorageUpdateOne
AddType adds i to the "type" field.
func (*StorageUpdateOne) Exec ¶
func (suo *StorageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StorageUpdateOne) ExecX ¶
func (suo *StorageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageUpdateOne) Mutation ¶
func (suo *StorageUpdateOne) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageUpdateOne) Save ¶
func (suo *StorageUpdateOne) Save(ctx context.Context) (*Storage, error)
Save executes the query and returns the updated Storage entity.
func (*StorageUpdateOne) SaveX ¶
func (suo *StorageUpdateOne) SaveX(ctx context.Context) *Storage
SaveX is like Save, but panics if an error occurs.
func (*StorageUpdateOne) Select ¶
func (suo *StorageUpdateOne) Select(field string, fields ...string) *StorageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StorageUpdateOne) SetCid ¶
func (suo *StorageUpdateOne) SetCid(s string) *StorageUpdateOne
SetCid sets the "cid" field.
func (*StorageUpdateOne) SetLastModify ¶
func (suo *StorageUpdateOne) SetLastModify(t time.Time) *StorageUpdateOne
SetLastModify sets the "last_modify" field.
func (*StorageUpdateOne) SetName ¶
func (suo *StorageUpdateOne) SetName(s string) *StorageUpdateOne
SetName sets the "name" field.
func (*StorageUpdateOne) SetNillableLastModify ¶
func (suo *StorageUpdateOne) SetNillableLastModify(t *time.Time) *StorageUpdateOne
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableType ¶
func (suo *StorageUpdateOne) SetNillableType(i *int32) *StorageUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageUpdateOne) SetOwner ¶
func (suo *StorageUpdateOne) SetOwner(s string) *StorageUpdateOne
SetOwner sets the "owner" field.
func (*StorageUpdateOne) SetParentID ¶
func (suo *StorageUpdateOne) SetParentID(s string) *StorageUpdateOne
SetParentID sets the "parent_id" field.
func (*StorageUpdateOne) SetSize ¶
func (suo *StorageUpdateOne) SetSize(i int32) *StorageUpdateOne
SetSize sets the "size" field.
func (*StorageUpdateOne) SetType ¶
func (suo *StorageUpdateOne) SetType(i int32) *StorageUpdateOne
SetType sets the "type" field.
func (*StorageUpdateOne) Where ¶
func (suo *StorageUpdateOne) Where(ps ...predicate.Storage) *StorageUpdateOne
Where appends a list predicates to the StorageUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Agent is the client for interacting with the Agent builders. Agent *AgentClient // ComputeImage is the client for interacting with the ComputeImage builders. ComputeImage *ComputeImageClient // ComputeInstance is the client for interacting with the ComputeInstance builders. ComputeInstance *ComputeInstanceClient // ComputeSpec is the client for interacting with the ComputeSpec builders. ComputeSpec *ComputeSpecClient // Employee is the client for interacting with the Employee builders. Employee *EmployeeClient // Script is the client for interacting with the Script builders. Script *ScriptClient // ScriptExecutionRecord is the client for interacting with the ScriptExecutionRecord builders. ScriptExecutionRecord *ScriptExecutionRecordClient // Storage is the client for interacting with the Storage builders. Storage *StorageClient // User is the client for interacting with the User builders. User *UserClient // 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 User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CountryCallCoding holds the value of the "country_call_coding" field. CountryCallCoding string `json:"country_call_coding,omitempty"` // TelephoneNumber holds the value of the "telephone_number" field. TelephoneNumber string `json:"telephone_number,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // CreateDate holds the value of the "create_date" field. CreateDate time.Time `json:"create_date,omitempty"` // LastLoginDate holds the value of the "last_login_date" field. LastLoginDate time.Time `json:"last_login_date,omitempty"` // 用户名 Name string `json:"name,omitempty"` // 头像地址 Icon string `json:"icon,omitempty"` // 是否配置过密码 PwdConfig bool `json:"pwd_config,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCountryCallCoding ¶
func (uc *UserCreate) SetCountryCallCoding(s string) *UserCreate
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserCreate) SetCreateDate ¶
func (uc *UserCreate) SetCreateDate(t time.Time) *UserCreate
SetCreateDate sets the "create_date" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIcon ¶
func (uc *UserCreate) SetIcon(s string) *UserCreate
SetIcon sets the "icon" field.
func (*UserCreate) SetLastLoginDate ¶
func (uc *UserCreate) SetLastLoginDate(t time.Time) *UserCreate
SetLastLoginDate sets the "last_login_date" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableCreateDate ¶
func (uc *UserCreate) SetNillableCreateDate(t *time.Time) *UserCreate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableLastLoginDate ¶
func (uc *UserCreate) SetNillableLastLoginDate(t *time.Time) *UserCreate
SetNillableLastLoginDate sets the "last_login_date" field if the given value is not nil.
func (*UserCreate) SetNillablePwdConfig ¶ added in v0.0.3
func (uc *UserCreate) SetNillablePwdConfig(b *bool) *UserCreate
SetNillablePwdConfig sets the "pwd_config" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPwdConfig ¶ added in v0.0.3
func (uc *UserCreate) SetPwdConfig(b bool) *UserCreate
SetPwdConfig sets the "pwd_config" field.
func (*UserCreate) SetTelephoneNumber ¶
func (uc *UserCreate) SetTelephoneNumber(s string) *UserCreate
SetTelephoneNumber sets the "telephone_number" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CountryCallCoding ¶
func (m *UserMutation) CountryCallCoding() (r string, exists bool)
CountryCallCoding returns the value of the "country_call_coding" field in the mutation.
func (*UserMutation) CreateDate ¶
func (m *UserMutation) CreateDate() (r time.Time, exists bool)
CreateDate returns the value of the "create_date" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) Icon ¶
func (m *UserMutation) Icon() (r string, exists bool)
Icon returns the value of the "icon" field in the mutation.
func (*UserMutation) LastLoginDate ¶
func (m *UserMutation) LastLoginDate() (r time.Time, exists bool)
LastLoginDate returns the value of the "last_login_date" field in the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldCountryCallCoding ¶
func (m *UserMutation) OldCountryCallCoding(ctx context.Context) (v string, err error)
OldCountryCallCoding returns the old "country_call_coding" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreateDate ¶
OldCreateDate returns the old "create_date" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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 (*UserMutation) OldIcon ¶
func (m *UserMutation) OldIcon(ctx context.Context) (v string, err error)
OldIcon returns the old "icon" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLastLoginDate ¶
OldLastLoginDate returns the old "last_login_date" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPwdConfig ¶ added in v0.0.3
func (m *UserMutation) OldPwdConfig(ctx context.Context) (v bool, err error)
OldPwdConfig returns the old "pwd_config" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldTelephoneNumber ¶
func (m *UserMutation) OldTelephoneNumber(ctx context.Context) (v string, err error)
OldTelephoneNumber returns the old "telephone_number" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PwdConfig ¶ added in v0.0.3
func (m *UserMutation) PwdConfig() (r bool, exists bool)
PwdConfig returns the value of the "pwd_config" field in the mutation.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) ResetCountryCallCoding ¶
func (m *UserMutation) ResetCountryCallCoding()
ResetCountryCallCoding resets all changes to the "country_call_coding" field.
func (*UserMutation) ResetCreateDate ¶
func (m *UserMutation) ResetCreateDate()
ResetCreateDate resets all changes to the "create_date" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetIcon ¶
func (m *UserMutation) ResetIcon()
ResetIcon resets all changes to the "icon" field.
func (*UserMutation) ResetLastLoginDate ¶
func (m *UserMutation) ResetLastLoginDate()
ResetLastLoginDate resets all changes to the "last_login_date" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPwdConfig ¶ added in v0.0.3
func (m *UserMutation) ResetPwdConfig()
ResetPwdConfig resets all changes to the "pwd_config" field.
func (*UserMutation) ResetTelephoneNumber ¶
func (m *UserMutation) ResetTelephoneNumber()
ResetTelephoneNumber resets all changes to the "telephone_number" field.
func (*UserMutation) SetCountryCallCoding ¶
func (m *UserMutation) SetCountryCallCoding(s string)
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserMutation) SetCreateDate ¶
func (m *UserMutation) SetCreateDate(t time.Time)
SetCreateDate sets the "create_date" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIcon ¶
func (m *UserMutation) SetIcon(s string)
SetIcon sets the "icon" field.
func (*UserMutation) SetLastLoginDate ¶
func (m *UserMutation) SetLastLoginDate(t time.Time)
SetLastLoginDate sets the "last_login_date" field.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetPwdConfig ¶ added in v0.0.3
func (m *UserMutation) SetPwdConfig(b bool)
SetPwdConfig sets the "pwd_config" field.
func (*UserMutation) SetTelephoneNumber ¶
func (m *UserMutation) SetTelephoneNumber(s string)
SetTelephoneNumber sets the "telephone_number" field.
func (*UserMutation) TelephoneNumber ¶
func (m *UserMutation) TelephoneNumber() (r string, exists bool)
TelephoneNumber returns the value of the "telephone_number" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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 { CountryCallCoding string `json:"country_call_coding,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCountryCallCoding). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
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 { CountryCallCoding string `json:"country_call_coding,omitempty"` } client.User.Query(). Select(user.FieldCountryCallCoding). Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetCountryCallCoding ¶
func (uu *UserUpdate) SetCountryCallCoding(s string) *UserUpdate
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserUpdate) SetCreateDate ¶
func (uu *UserUpdate) SetCreateDate(t time.Time) *UserUpdate
SetCreateDate sets the "create_date" field.
func (*UserUpdate) SetIcon ¶
func (uu *UserUpdate) SetIcon(s string) *UserUpdate
SetIcon sets the "icon" field.
func (*UserUpdate) SetLastLoginDate ¶
func (uu *UserUpdate) SetLastLoginDate(t time.Time) *UserUpdate
SetLastLoginDate sets the "last_login_date" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableCreateDate ¶
func (uu *UserUpdate) SetNillableCreateDate(t *time.Time) *UserUpdate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdate) SetNillableLastLoginDate ¶
func (uu *UserUpdate) SetNillableLastLoginDate(t *time.Time) *UserUpdate
SetNillableLastLoginDate sets the "last_login_date" field if the given value is not nil.
func (*UserUpdate) SetNillablePwdConfig ¶ added in v0.0.3
func (uu *UserUpdate) SetNillablePwdConfig(b *bool) *UserUpdate
SetNillablePwdConfig sets the "pwd_config" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetPwdConfig ¶ added in v0.0.3
func (uu *UserUpdate) SetPwdConfig(b bool) *UserUpdate
SetPwdConfig sets the "pwd_config" field.
func (*UserUpdate) SetTelephoneNumber ¶
func (uu *UserUpdate) SetTelephoneNumber(s string) *UserUpdate
SetTelephoneNumber sets the "telephone_number" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetCountryCallCoding ¶
func (uuo *UserUpdateOne) SetCountryCallCoding(s string) *UserUpdateOne
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserUpdateOne) SetCreateDate ¶
func (uuo *UserUpdateOne) SetCreateDate(t time.Time) *UserUpdateOne
SetCreateDate sets the "create_date" field.
func (*UserUpdateOne) SetIcon ¶
func (uuo *UserUpdateOne) SetIcon(s string) *UserUpdateOne
SetIcon sets the "icon" field.
func (*UserUpdateOne) SetLastLoginDate ¶
func (uuo *UserUpdateOne) SetLastLoginDate(t time.Time) *UserUpdateOne
SetLastLoginDate sets the "last_login_date" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableCreateDate ¶
func (uuo *UserUpdateOne) SetNillableCreateDate(t *time.Time) *UserUpdateOne
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastLoginDate ¶
func (uuo *UserUpdateOne) SetNillableLastLoginDate(t *time.Time) *UserUpdateOne
SetNillableLastLoginDate sets the "last_login_date" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePwdConfig ¶ added in v0.0.3
func (uuo *UserUpdateOne) SetNillablePwdConfig(b *bool) *UserUpdateOne
SetNillablePwdConfig sets the "pwd_config" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetPwdConfig ¶ added in v0.0.3
func (uuo *UserUpdateOne) SetPwdConfig(b bool) *UserUpdateOne
SetPwdConfig sets the "pwd_config" field.
func (*UserUpdateOne) SetTelephoneNumber ¶
func (uuo *UserUpdateOne) SetTelephoneNumber(s string) *UserUpdateOne
SetTelephoneNumber sets the "telephone_number" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- agent.go
- agent_create.go
- agent_delete.go
- agent_query.go
- agent_update.go
- client.go
- computeimage.go
- computeimage_create.go
- computeimage_delete.go
- computeimage_query.go
- computeimage_update.go
- computeinstance.go
- computeinstance_create.go
- computeinstance_delete.go
- computeinstance_query.go
- computeinstance_update.go
- computespec.go
- computespec_create.go
- computespec_delete.go
- computespec_query.go
- computespec_update.go
- employee.go
- employee_create.go
- employee_delete.go
- employee_query.go
- employee_update.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- script.go
- script_create.go
- script_delete.go
- script_query.go
- script_update.go
- scriptexecutionrecord.go
- scriptexecutionrecord_create.go
- scriptexecutionrecord_delete.go
- scriptexecutionrecord_query.go
- scriptexecutionrecord_update.go
- storage.go
- storage_create.go
- storage_delete.go
- storage_query.go
- storage_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go