Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Project
- type ProjectClient
- func (c *ProjectClient) Create() *ProjectCreate
- func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk
- func (c *ProjectClient) Delete() *ProjectDelete
- func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne
- func (c *ProjectClient) DeleteOneID(id uuid.UUID) *ProjectDeleteOne
- func (c *ProjectClient) Get(ctx context.Context, id uuid.UUID) (*Project, error)
- func (c *ProjectClient) GetX(ctx context.Context, id uuid.UUID) *Project
- func (c *ProjectClient) Hooks() []Hook
- func (c *ProjectClient) Query() *ProjectQuery
- func (c *ProjectClient) QueryRequests(pr *Project) *RequestQuery
- func (c *ProjectClient) Update() *ProjectUpdate
- func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne
- func (c *ProjectClient) UpdateOneID(id uuid.UUID) *ProjectUpdateOne
- func (c *ProjectClient) Use(hooks ...Hook)
- type ProjectCreate
- func (pc *ProjectCreate) AddRequestIDs(ids ...uuid.UUID) *ProjectCreate
- func (pc *ProjectCreate) AddRequests(r ...*Request) *ProjectCreate
- func (pc *ProjectCreate) Exec(ctx context.Context) error
- func (pc *ProjectCreate) ExecX(ctx context.Context)
- func (pc *ProjectCreate) Mutation() *ProjectMutation
- func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)
- func (pc *ProjectCreate) SaveX(ctx context.Context) *Project
- func (pc *ProjectCreate) SetCreateTime(t time.Time) *ProjectCreate
- func (pc *ProjectCreate) SetID(u uuid.UUID) *ProjectCreate
- func (pc *ProjectCreate) SetName(s string) *ProjectCreate
- func (pc *ProjectCreate) SetNillableCreateTime(t *time.Time) *ProjectCreate
- func (pc *ProjectCreate) SetNillableID(u *uuid.UUID) *ProjectCreate
- func (pc *ProjectCreate) SetNillableUpdateTime(t *time.Time) *ProjectCreate
- func (pc *ProjectCreate) SetUpdateTime(t time.Time) *ProjectCreate
- type ProjectCreateBulk
- type ProjectDelete
- type ProjectDeleteOne
- type ProjectEdges
- type ProjectGroupBy
- func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy
- func (s *ProjectGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProjectGroupBy) BoolX(ctx context.Context) bool
- func (s *ProjectGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProjectGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProjectGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProjectGroupBy) Float64X(ctx context.Context) float64
- func (s *ProjectGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProjectGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProjectGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProjectGroupBy) IntX(ctx context.Context) int
- func (s *ProjectGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProjectGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProjectGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProjectGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProjectGroupBy) StringX(ctx context.Context) string
- func (s *ProjectGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProjectGroupBy) StringsX(ctx context.Context) []string
- type ProjectMutation
- func (m *ProjectMutation) AddField(name string, value ent.Value) error
- func (m *ProjectMutation) AddRequestIDs(ids ...uuid.UUID)
- func (m *ProjectMutation) AddedEdges() []string
- func (m *ProjectMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProjectMutation) AddedFields() []string
- func (m *ProjectMutation) AddedIDs(name string) []ent.Value
- func (m *ProjectMutation) ClearEdge(name string) error
- func (m *ProjectMutation) ClearField(name string) error
- func (m *ProjectMutation) ClearRequests()
- func (m *ProjectMutation) ClearedEdges() []string
- func (m *ProjectMutation) ClearedFields() []string
- func (m ProjectMutation) Client() *Client
- func (m *ProjectMutation) CreateTime() (r time.Time, exists bool)
- func (m *ProjectMutation) EdgeCleared(name string) bool
- func (m *ProjectMutation) Field(name string) (ent.Value, bool)
- func (m *ProjectMutation) FieldCleared(name string) bool
- func (m *ProjectMutation) Fields() []string
- func (m *ProjectMutation) ID() (id uuid.UUID, exists bool)
- func (m *ProjectMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ProjectMutation) Name() (r string, exists bool)
- func (m *ProjectMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ProjectMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProjectMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProjectMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ProjectMutation) Op() Op
- func (m *ProjectMutation) RemoveRequestIDs(ids ...uuid.UUID)
- func (m *ProjectMutation) RemovedEdges() []string
- func (m *ProjectMutation) RemovedIDs(name string) []ent.Value
- func (m *ProjectMutation) RemovedRequestsIDs() (ids []uuid.UUID)
- func (m *ProjectMutation) RequestsCleared() bool
- func (m *ProjectMutation) RequestsIDs() (ids []uuid.UUID)
- func (m *ProjectMutation) ResetCreateTime()
- func (m *ProjectMutation) ResetEdge(name string) error
- func (m *ProjectMutation) ResetField(name string) error
- func (m *ProjectMutation) ResetName()
- func (m *ProjectMutation) ResetRequests()
- func (m *ProjectMutation) ResetUpdateTime()
- func (m *ProjectMutation) SetCreateTime(t time.Time)
- func (m *ProjectMutation) SetField(name string, value ent.Value) error
- func (m *ProjectMutation) SetID(id uuid.UUID)
- func (m *ProjectMutation) SetName(s string)
- func (m *ProjectMutation) SetUpdateTime(t time.Time)
- func (m ProjectMutation) Tx() (*Tx, error)
- func (m *ProjectMutation) Type() string
- func (m *ProjectMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ProjectMutation) Where(ps ...predicate.Project)
- type ProjectQuery
- func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)
- func (pq *ProjectQuery) AllX(ctx context.Context) []*Project
- func (pq *ProjectQuery) Clone() *ProjectQuery
- func (pq *ProjectQuery) Count(ctx context.Context) (int, error)
- func (pq *ProjectQuery) CountX(ctx context.Context) int
- func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProjectQuery) ExistX(ctx context.Context) bool
- func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)
- func (pq *ProjectQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProjectQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *ProjectQuery) FirstX(ctx context.Context) *Project
- func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy
- func (pq *ProjectQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (pq *ProjectQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *ProjectQuery) Limit(limit int) *ProjectQuery
- func (pq *ProjectQuery) Offset(offset int) *ProjectQuery
- func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)
- func (pq *ProjectQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *ProjectQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project
- func (pq *ProjectQuery) Order(o ...OrderFunc) *ProjectQuery
- func (pq *ProjectQuery) QueryRequests() *RequestQuery
- func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect
- func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery
- func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery
- func (pq *ProjectQuery) WithRequests(opts ...func(*RequestQuery)) *ProjectQuery
- type ProjectSelect
- func (s *ProjectSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProjectSelect) BoolX(ctx context.Context) bool
- func (s *ProjectSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProjectSelect) BoolsX(ctx context.Context) []bool
- func (s *ProjectSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProjectSelect) Float64X(ctx context.Context) float64
- func (s *ProjectSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProjectSelect) Float64sX(ctx context.Context) []float64
- func (s *ProjectSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProjectSelect) IntX(ctx context.Context) int
- func (s *ProjectSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProjectSelect) IntsX(ctx context.Context) []int
- func (ps *ProjectSelect) Scan(ctx context.Context, v any) error
- func (s *ProjectSelect) ScanX(ctx context.Context, v any)
- func (s *ProjectSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProjectSelect) StringX(ctx context.Context) string
- func (s *ProjectSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProjectSelect) StringsX(ctx context.Context) []string
- type ProjectUpdate
- func (pu *ProjectUpdate) AddRequestIDs(ids ...uuid.UUID) *ProjectUpdate
- func (pu *ProjectUpdate) AddRequests(r ...*Request) *ProjectUpdate
- func (pu *ProjectUpdate) ClearRequests() *ProjectUpdate
- func (pu *ProjectUpdate) Exec(ctx context.Context) error
- func (pu *ProjectUpdate) ExecX(ctx context.Context)
- func (pu *ProjectUpdate) Mutation() *ProjectMutation
- func (pu *ProjectUpdate) RemoveRequestIDs(ids ...uuid.UUID) *ProjectUpdate
- func (pu *ProjectUpdate) RemoveRequests(r ...*Request) *ProjectUpdate
- func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProjectUpdate) SaveX(ctx context.Context) int
- func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate
- func (pu *ProjectUpdate) SetUpdateTime(t time.Time) *ProjectUpdate
- func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate
- type ProjectUpdateOne
- func (puo *ProjectUpdateOne) AddRequestIDs(ids ...uuid.UUID) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) AddRequests(r ...*Request) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) ClearRequests() *ProjectUpdateOne
- func (puo *ProjectUpdateOne) Exec(ctx context.Context) error
- func (puo *ProjectUpdateOne) ExecX(ctx context.Context)
- func (puo *ProjectUpdateOne) Mutation() *ProjectMutation
- func (puo *ProjectUpdateOne) RemoveRequestIDs(ids ...uuid.UUID) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) RemoveRequests(r ...*Request) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)
- func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project
- func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) SetUpdateTime(t time.Time) *ProjectUpdateOne
- type Projects
- type Query
- type Request
- type RequestClient
- func (c *RequestClient) Create() *RequestCreate
- func (c *RequestClient) CreateBulk(builders ...*RequestCreate) *RequestCreateBulk
- func (c *RequestClient) Delete() *RequestDelete
- func (c *RequestClient) DeleteOne(r *Request) *RequestDeleteOne
- func (c *RequestClient) DeleteOneID(id uuid.UUID) *RequestDeleteOne
- func (c *RequestClient) Get(ctx context.Context, id uuid.UUID) (*Request, error)
- func (c *RequestClient) GetX(ctx context.Context, id uuid.UUID) *Request
- func (c *RequestClient) Hooks() []Hook
- func (c *RequestClient) Query() *RequestQuery
- func (c *RequestClient) QueryProject(r *Request) *ProjectQuery
- func (c *RequestClient) QueryReviews(r *Request) *ReviewQuery
- func (c *RequestClient) QueryService(r *Request) *ServiceQuery
- func (c *RequestClient) Update() *RequestUpdate
- func (c *RequestClient) UpdateOne(r *Request) *RequestUpdateOne
- func (c *RequestClient) UpdateOneID(id uuid.UUID) *RequestUpdateOne
- func (c *RequestClient) Use(hooks ...Hook)
- type RequestCreate
- func (rc *RequestCreate) AddReviewIDs(ids ...uuid.UUID) *RequestCreate
- func (rc *RequestCreate) AddReviews(r ...*Review) *RequestCreate
- func (rc *RequestCreate) Exec(ctx context.Context) error
- func (rc *RequestCreate) ExecX(ctx context.Context)
- func (rc *RequestCreate) Mutation() *RequestMutation
- func (rc *RequestCreate) Save(ctx context.Context) (*Request, error)
- func (rc *RequestCreate) SaveX(ctx context.Context) *Request
- func (rc *RequestCreate) SetCreateTime(t time.Time) *RequestCreate
- func (rc *RequestCreate) SetID(u uuid.UUID) *RequestCreate
- func (rc *RequestCreate) SetNillableCreateTime(t *time.Time) *RequestCreate
- func (rc *RequestCreate) SetNillableID(u *uuid.UUID) *RequestCreate
- func (rc *RequestCreate) SetNillableStatus(r *request.Status) *RequestCreate
- func (rc *RequestCreate) SetNillableUpdateTime(t *time.Time) *RequestCreate
- func (rc *RequestCreate) SetProject(p *Project) *RequestCreate
- func (rc *RequestCreate) SetProjectID(id uuid.UUID) *RequestCreate
- func (rc *RequestCreate) SetRequestedBy(s string) *RequestCreate
- func (rc *RequestCreate) SetService(s *Service) *RequestCreate
- func (rc *RequestCreate) SetServiceID(id uuid.UUID) *RequestCreate
- func (rc *RequestCreate) SetSpec(ss schema.RequestSpec) *RequestCreate
- func (rc *RequestCreate) SetStatus(r request.Status) *RequestCreate
- func (rc *RequestCreate) SetType(s string) *RequestCreate
- func (rc *RequestCreate) SetUpdateTime(t time.Time) *RequestCreate
- type RequestCreateBulk
- type RequestDelete
- type RequestDeleteOne
- type RequestEdges
- type RequestGroupBy
- func (rgb *RequestGroupBy) Aggregate(fns ...AggregateFunc) *RequestGroupBy
- func (s *RequestGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RequestGroupBy) BoolX(ctx context.Context) bool
- func (s *RequestGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RequestGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RequestGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RequestGroupBy) Float64X(ctx context.Context) float64
- func (s *RequestGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RequestGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RequestGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RequestGroupBy) IntX(ctx context.Context) int
- func (s *RequestGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RequestGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RequestGroupBy) Scan(ctx context.Context, v any) error
- func (s *RequestGroupBy) ScanX(ctx context.Context, v any)
- func (s *RequestGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RequestGroupBy) StringX(ctx context.Context) string
- func (s *RequestGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RequestGroupBy) StringsX(ctx context.Context) []string
- type RequestMutation
- func (m *RequestMutation) AddField(name string, value ent.Value) error
- func (m *RequestMutation) AddReviewIDs(ids ...uuid.UUID)
- func (m *RequestMutation) AddedEdges() []string
- func (m *RequestMutation) AddedField(name string) (ent.Value, bool)
- func (m *RequestMutation) AddedFields() []string
- func (m *RequestMutation) AddedIDs(name string) []ent.Value
- func (m *RequestMutation) ClearEdge(name string) error
- func (m *RequestMutation) ClearField(name string) error
- func (m *RequestMutation) ClearProject()
- func (m *RequestMutation) ClearReviews()
- func (m *RequestMutation) ClearService()
- func (m *RequestMutation) ClearedEdges() []string
- func (m *RequestMutation) ClearedFields() []string
- func (m RequestMutation) Client() *Client
- func (m *RequestMutation) CreateTime() (r time.Time, exists bool)
- func (m *RequestMutation) EdgeCleared(name string) bool
- func (m *RequestMutation) Field(name string) (ent.Value, bool)
- func (m *RequestMutation) FieldCleared(name string) bool
- func (m *RequestMutation) Fields() []string
- func (m *RequestMutation) GetType() (r string, exists bool)
- func (m *RequestMutation) ID() (id uuid.UUID, exists bool)
- func (m *RequestMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *RequestMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *RequestMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RequestMutation) OldRequestedBy(ctx context.Context) (v string, err error)
- func (m *RequestMutation) OldSpec(ctx context.Context) (v schema.RequestSpec, err error)
- func (m *RequestMutation) OldStatus(ctx context.Context) (v request.Status, err error)
- func (m *RequestMutation) OldType(ctx context.Context) (v string, err error)
- func (m *RequestMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *RequestMutation) Op() Op
- func (m *RequestMutation) ProjectCleared() bool
- func (m *RequestMutation) ProjectID() (id uuid.UUID, exists bool)
- func (m *RequestMutation) ProjectIDs() (ids []uuid.UUID)
- func (m *RequestMutation) RemoveReviewIDs(ids ...uuid.UUID)
- func (m *RequestMutation) RemovedEdges() []string
- func (m *RequestMutation) RemovedIDs(name string) []ent.Value
- func (m *RequestMutation) RemovedReviewsIDs() (ids []uuid.UUID)
- func (m *RequestMutation) RequestedBy() (r string, exists bool)
- func (m *RequestMutation) ResetCreateTime()
- func (m *RequestMutation) ResetEdge(name string) error
- func (m *RequestMutation) ResetField(name string) error
- func (m *RequestMutation) ResetProject()
- func (m *RequestMutation) ResetRequestedBy()
- func (m *RequestMutation) ResetReviews()
- func (m *RequestMutation) ResetService()
- func (m *RequestMutation) ResetSpec()
- func (m *RequestMutation) ResetStatus()
- func (m *RequestMutation) ResetType()
- func (m *RequestMutation) ResetUpdateTime()
- func (m *RequestMutation) ReviewsCleared() bool
- func (m *RequestMutation) ReviewsIDs() (ids []uuid.UUID)
- func (m *RequestMutation) ServiceCleared() bool
- func (m *RequestMutation) ServiceID() (id uuid.UUID, exists bool)
- func (m *RequestMutation) ServiceIDs() (ids []uuid.UUID)
- func (m *RequestMutation) SetCreateTime(t time.Time)
- func (m *RequestMutation) SetField(name string, value ent.Value) error
- func (m *RequestMutation) SetID(id uuid.UUID)
- func (m *RequestMutation) SetProjectID(id uuid.UUID)
- func (m *RequestMutation) SetRequestedBy(s string)
- func (m *RequestMutation) SetServiceID(id uuid.UUID)
- func (m *RequestMutation) SetSpec(ss schema.RequestSpec)
- func (m *RequestMutation) SetStatus(r request.Status)
- func (m *RequestMutation) SetType(s string)
- func (m *RequestMutation) SetUpdateTime(t time.Time)
- func (m *RequestMutation) Spec() (r schema.RequestSpec, exists bool)
- func (m *RequestMutation) Status() (r request.Status, exists bool)
- func (m RequestMutation) Tx() (*Tx, error)
- func (m *RequestMutation) Type() string
- func (m *RequestMutation) UpdateTime() (r time.Time, exists bool)
- func (m *RequestMutation) Where(ps ...predicate.Request)
- type RequestQuery
- func (rq *RequestQuery) All(ctx context.Context) ([]*Request, error)
- func (rq *RequestQuery) AllX(ctx context.Context) []*Request
- func (rq *RequestQuery) Clone() *RequestQuery
- func (rq *RequestQuery) Count(ctx context.Context) (int, error)
- func (rq *RequestQuery) CountX(ctx context.Context) int
- func (rq *RequestQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RequestQuery) ExistX(ctx context.Context) bool
- func (rq *RequestQuery) First(ctx context.Context) (*Request, error)
- func (rq *RequestQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RequestQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *RequestQuery) FirstX(ctx context.Context) *Request
- func (rq *RequestQuery) GroupBy(field string, fields ...string) *RequestGroupBy
- func (rq *RequestQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (rq *RequestQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *RequestQuery) Limit(limit int) *RequestQuery
- func (rq *RequestQuery) Offset(offset int) *RequestQuery
- func (rq *RequestQuery) Only(ctx context.Context) (*Request, error)
- func (rq *RequestQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RequestQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *RequestQuery) OnlyX(ctx context.Context) *Request
- func (rq *RequestQuery) Order(o ...OrderFunc) *RequestQuery
- func (rq *RequestQuery) QueryProject() *ProjectQuery
- func (rq *RequestQuery) QueryReviews() *ReviewQuery
- func (rq *RequestQuery) QueryService() *ServiceQuery
- func (rq *RequestQuery) Select(fields ...string) *RequestSelect
- func (rq *RequestQuery) Unique(unique bool) *RequestQuery
- func (rq *RequestQuery) Where(ps ...predicate.Request) *RequestQuery
- func (rq *RequestQuery) WithProject(opts ...func(*ProjectQuery)) *RequestQuery
- func (rq *RequestQuery) WithReviews(opts ...func(*ReviewQuery)) *RequestQuery
- func (rq *RequestQuery) WithService(opts ...func(*ServiceQuery)) *RequestQuery
- type RequestSelect
- func (s *RequestSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RequestSelect) BoolX(ctx context.Context) bool
- func (s *RequestSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RequestSelect) BoolsX(ctx context.Context) []bool
- func (s *RequestSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RequestSelect) Float64X(ctx context.Context) float64
- func (s *RequestSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RequestSelect) Float64sX(ctx context.Context) []float64
- func (s *RequestSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RequestSelect) IntX(ctx context.Context) int
- func (s *RequestSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RequestSelect) IntsX(ctx context.Context) []int
- func (rs *RequestSelect) Scan(ctx context.Context, v any) error
- func (s *RequestSelect) ScanX(ctx context.Context, v any)
- func (s *RequestSelect) String(ctx context.Context) (_ string, err error)
- func (s *RequestSelect) StringX(ctx context.Context) string
- func (s *RequestSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RequestSelect) StringsX(ctx context.Context) []string
- type RequestUpdate
- func (ru *RequestUpdate) AddReviewIDs(ids ...uuid.UUID) *RequestUpdate
- func (ru *RequestUpdate) AddReviews(r ...*Review) *RequestUpdate
- func (ru *RequestUpdate) ClearProject() *RequestUpdate
- func (ru *RequestUpdate) ClearReviews() *RequestUpdate
- func (ru *RequestUpdate) ClearService() *RequestUpdate
- func (ru *RequestUpdate) Exec(ctx context.Context) error
- func (ru *RequestUpdate) ExecX(ctx context.Context)
- func (ru *RequestUpdate) Mutation() *RequestMutation
- func (ru *RequestUpdate) RemoveReviewIDs(ids ...uuid.UUID) *RequestUpdate
- func (ru *RequestUpdate) RemoveReviews(r ...*Review) *RequestUpdate
- func (ru *RequestUpdate) Save(ctx context.Context) (int, error)
- func (ru *RequestUpdate) SaveX(ctx context.Context) int
- func (ru *RequestUpdate) SetNillableStatus(r *request.Status) *RequestUpdate
- func (ru *RequestUpdate) SetProject(p *Project) *RequestUpdate
- func (ru *RequestUpdate) SetProjectID(id uuid.UUID) *RequestUpdate
- func (ru *RequestUpdate) SetRequestedBy(s string) *RequestUpdate
- func (ru *RequestUpdate) SetService(s *Service) *RequestUpdate
- func (ru *RequestUpdate) SetServiceID(id uuid.UUID) *RequestUpdate
- func (ru *RequestUpdate) SetSpec(ss schema.RequestSpec) *RequestUpdate
- func (ru *RequestUpdate) SetStatus(r request.Status) *RequestUpdate
- func (ru *RequestUpdate) SetType(s string) *RequestUpdate
- func (ru *RequestUpdate) SetUpdateTime(t time.Time) *RequestUpdate
- func (ru *RequestUpdate) Where(ps ...predicate.Request) *RequestUpdate
- type RequestUpdateOne
- func (ruo *RequestUpdateOne) AddReviewIDs(ids ...uuid.UUID) *RequestUpdateOne
- func (ruo *RequestUpdateOne) AddReviews(r ...*Review) *RequestUpdateOne
- func (ruo *RequestUpdateOne) ClearProject() *RequestUpdateOne
- func (ruo *RequestUpdateOne) ClearReviews() *RequestUpdateOne
- func (ruo *RequestUpdateOne) ClearService() *RequestUpdateOne
- func (ruo *RequestUpdateOne) Exec(ctx context.Context) error
- func (ruo *RequestUpdateOne) ExecX(ctx context.Context)
- func (ruo *RequestUpdateOne) Mutation() *RequestMutation
- func (ruo *RequestUpdateOne) RemoveReviewIDs(ids ...uuid.UUID) *RequestUpdateOne
- func (ruo *RequestUpdateOne) RemoveReviews(r ...*Review) *RequestUpdateOne
- func (ruo *RequestUpdateOne) Save(ctx context.Context) (*Request, error)
- func (ruo *RequestUpdateOne) SaveX(ctx context.Context) *Request
- func (ruo *RequestUpdateOne) Select(field string, fields ...string) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetNillableStatus(r *request.Status) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetProject(p *Project) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetProjectID(id uuid.UUID) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetRequestedBy(s string) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetService(s *Service) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetServiceID(id uuid.UUID) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetSpec(ss schema.RequestSpec) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetStatus(r request.Status) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetType(s string) *RequestUpdateOne
- func (ruo *RequestUpdateOne) SetUpdateTime(t time.Time) *RequestUpdateOne
- type Requests
- type Review
- type ReviewClient
- func (c *ReviewClient) Create() *ReviewCreate
- func (c *ReviewClient) CreateBulk(builders ...*ReviewCreate) *ReviewCreateBulk
- func (c *ReviewClient) Delete() *ReviewDelete
- func (c *ReviewClient) DeleteOne(r *Review) *ReviewDeleteOne
- func (c *ReviewClient) DeleteOneID(id uuid.UUID) *ReviewDeleteOne
- func (c *ReviewClient) Get(ctx context.Context, id uuid.UUID) (*Review, error)
- func (c *ReviewClient) GetX(ctx context.Context, id uuid.UUID) *Review
- func (c *ReviewClient) Hooks() []Hook
- func (c *ReviewClient) Query() *ReviewQuery
- func (c *ReviewClient) QueryRequest(r *Review) *RequestQuery
- func (c *ReviewClient) Update() *ReviewUpdate
- func (c *ReviewClient) UpdateOne(r *Review) *ReviewUpdateOne
- func (c *ReviewClient) UpdateOneID(id uuid.UUID) *ReviewUpdateOne
- func (c *ReviewClient) Use(hooks ...Hook)
- type ReviewCreate
- func (rc *ReviewCreate) Exec(ctx context.Context) error
- func (rc *ReviewCreate) ExecX(ctx context.Context)
- func (rc *ReviewCreate) Mutation() *ReviewMutation
- func (rc *ReviewCreate) Save(ctx context.Context) (*Review, error)
- func (rc *ReviewCreate) SaveX(ctx context.Context) *Review
- func (rc *ReviewCreate) SetCreateTime(t time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetID(u uuid.UUID) *ReviewCreate
- func (rc *ReviewCreate) SetNillableCreateTime(t *time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetNillableID(u *uuid.UUID) *ReviewCreate
- func (rc *ReviewCreate) SetNillableType(r *review.Type) *ReviewCreate
- func (rc *ReviewCreate) SetNillableUpdateTime(t *time.Time) *ReviewCreate
- func (rc *ReviewCreate) SetRequest(r *Request) *ReviewCreate
- func (rc *ReviewCreate) SetRequestID(id uuid.UUID) *ReviewCreate
- func (rc *ReviewCreate) SetStatus(r review.Status) *ReviewCreate
- func (rc *ReviewCreate) SetType(r review.Type) *ReviewCreate
- func (rc *ReviewCreate) SetUpdateTime(t time.Time) *ReviewCreate
- type ReviewCreateBulk
- type ReviewDelete
- type ReviewDeleteOne
- type ReviewEdges
- type ReviewGroupBy
- func (rgb *ReviewGroupBy) Aggregate(fns ...AggregateFunc) *ReviewGroupBy
- func (s *ReviewGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReviewGroupBy) BoolX(ctx context.Context) bool
- func (s *ReviewGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReviewGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReviewGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReviewGroupBy) Float64X(ctx context.Context) float64
- func (s *ReviewGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReviewGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReviewGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReviewGroupBy) IntX(ctx context.Context) int
- func (s *ReviewGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReviewGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReviewGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReviewGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReviewGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReviewGroupBy) StringX(ctx context.Context) string
- func (s *ReviewGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReviewGroupBy) StringsX(ctx context.Context) []string
- type ReviewMutation
- func (m *ReviewMutation) AddField(name string, value ent.Value) error
- func (m *ReviewMutation) AddedEdges() []string
- func (m *ReviewMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReviewMutation) AddedFields() []string
- func (m *ReviewMutation) AddedIDs(name string) []ent.Value
- func (m *ReviewMutation) ClearEdge(name string) error
- func (m *ReviewMutation) ClearField(name string) error
- func (m *ReviewMutation) ClearRequest()
- func (m *ReviewMutation) ClearedEdges() []string
- func (m *ReviewMutation) ClearedFields() []string
- func (m ReviewMutation) Client() *Client
- func (m *ReviewMutation) CreateTime() (r time.Time, exists bool)
- func (m *ReviewMutation) EdgeCleared(name string) bool
- func (m *ReviewMutation) Field(name string) (ent.Value, bool)
- func (m *ReviewMutation) FieldCleared(name string) bool
- func (m *ReviewMutation) Fields() []string
- func (m *ReviewMutation) GetType() (r review.Type, exists bool)
- func (m *ReviewMutation) ID() (id uuid.UUID, exists bool)
- func (m *ReviewMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ReviewMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ReviewMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReviewMutation) OldStatus(ctx context.Context) (v review.Status, err error)
- func (m *ReviewMutation) OldType(ctx context.Context) (v review.Type, err error)
- func (m *ReviewMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ReviewMutation) Op() Op
- func (m *ReviewMutation) RemovedEdges() []string
- func (m *ReviewMutation) RemovedIDs(name string) []ent.Value
- func (m *ReviewMutation) RequestCleared() bool
- func (m *ReviewMutation) RequestID() (id uuid.UUID, exists bool)
- func (m *ReviewMutation) RequestIDs() (ids []uuid.UUID)
- func (m *ReviewMutation) ResetCreateTime()
- func (m *ReviewMutation) ResetEdge(name string) error
- func (m *ReviewMutation) ResetField(name string) error
- func (m *ReviewMutation) ResetRequest()
- func (m *ReviewMutation) ResetStatus()
- func (m *ReviewMutation) ResetType()
- func (m *ReviewMutation) ResetUpdateTime()
- func (m *ReviewMutation) SetCreateTime(t time.Time)
- func (m *ReviewMutation) SetField(name string, value ent.Value) error
- func (m *ReviewMutation) SetID(id uuid.UUID)
- func (m *ReviewMutation) SetRequestID(id uuid.UUID)
- func (m *ReviewMutation) SetStatus(r review.Status)
- func (m *ReviewMutation) SetType(r review.Type)
- func (m *ReviewMutation) SetUpdateTime(t time.Time)
- func (m *ReviewMutation) Status() (r review.Status, exists bool)
- func (m ReviewMutation) Tx() (*Tx, error)
- func (m *ReviewMutation) Type() string
- func (m *ReviewMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ReviewMutation) Where(ps ...predicate.Review)
- type ReviewQuery
- func (rq *ReviewQuery) All(ctx context.Context) ([]*Review, error)
- func (rq *ReviewQuery) AllX(ctx context.Context) []*Review
- func (rq *ReviewQuery) Clone() *ReviewQuery
- func (rq *ReviewQuery) Count(ctx context.Context) (int, error)
- func (rq *ReviewQuery) CountX(ctx context.Context) int
- func (rq *ReviewQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReviewQuery) ExistX(ctx context.Context) bool
- func (rq *ReviewQuery) First(ctx context.Context) (*Review, error)
- func (rq *ReviewQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReviewQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *ReviewQuery) FirstX(ctx context.Context) *Review
- func (rq *ReviewQuery) GroupBy(field string, fields ...string) *ReviewGroupBy
- func (rq *ReviewQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (rq *ReviewQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *ReviewQuery) Limit(limit int) *ReviewQuery
- func (rq *ReviewQuery) Offset(offset int) *ReviewQuery
- func (rq *ReviewQuery) Only(ctx context.Context) (*Review, error)
- func (rq *ReviewQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *ReviewQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *ReviewQuery) OnlyX(ctx context.Context) *Review
- func (rq *ReviewQuery) Order(o ...OrderFunc) *ReviewQuery
- func (rq *ReviewQuery) QueryRequest() *RequestQuery
- func (rq *ReviewQuery) Select(fields ...string) *ReviewSelect
- func (rq *ReviewQuery) Unique(unique bool) *ReviewQuery
- func (rq *ReviewQuery) Where(ps ...predicate.Review) *ReviewQuery
- func (rq *ReviewQuery) WithRequest(opts ...func(*RequestQuery)) *ReviewQuery
- type ReviewSelect
- func (s *ReviewSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReviewSelect) BoolX(ctx context.Context) bool
- func (s *ReviewSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReviewSelect) BoolsX(ctx context.Context) []bool
- func (s *ReviewSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReviewSelect) Float64X(ctx context.Context) float64
- func (s *ReviewSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReviewSelect) Float64sX(ctx context.Context) []float64
- func (s *ReviewSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReviewSelect) IntX(ctx context.Context) int
- func (s *ReviewSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReviewSelect) IntsX(ctx context.Context) []int
- func (rs *ReviewSelect) Scan(ctx context.Context, v any) error
- func (s *ReviewSelect) ScanX(ctx context.Context, v any)
- func (s *ReviewSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReviewSelect) StringX(ctx context.Context) string
- func (s *ReviewSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReviewSelect) StringsX(ctx context.Context) []string
- type ReviewUpdate
- func (ru *ReviewUpdate) ClearRequest() *ReviewUpdate
- func (ru *ReviewUpdate) Exec(ctx context.Context) error
- func (ru *ReviewUpdate) ExecX(ctx context.Context)
- func (ru *ReviewUpdate) Mutation() *ReviewMutation
- func (ru *ReviewUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReviewUpdate) SaveX(ctx context.Context) int
- func (ru *ReviewUpdate) SetNillableType(r *review.Type) *ReviewUpdate
- func (ru *ReviewUpdate) SetRequest(r *Request) *ReviewUpdate
- func (ru *ReviewUpdate) SetRequestID(id uuid.UUID) *ReviewUpdate
- func (ru *ReviewUpdate) SetStatus(r review.Status) *ReviewUpdate
- func (ru *ReviewUpdate) SetType(r review.Type) *ReviewUpdate
- func (ru *ReviewUpdate) SetUpdateTime(t time.Time) *ReviewUpdate
- func (ru *ReviewUpdate) Where(ps ...predicate.Review) *ReviewUpdate
- type ReviewUpdateOne
- func (ruo *ReviewUpdateOne) ClearRequest() *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReviewUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReviewUpdateOne) Mutation() *ReviewMutation
- func (ruo *ReviewUpdateOne) Save(ctx context.Context) (*Review, error)
- func (ruo *ReviewUpdateOne) SaveX(ctx context.Context) *Review
- func (ruo *ReviewUpdateOne) Select(field string, fields ...string) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetNillableType(r *review.Type) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetRequest(r *Request) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetRequestID(id uuid.UUID) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetStatus(r review.Status) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetType(r review.Type) *ReviewUpdateOne
- func (ruo *ReviewUpdateOne) SetUpdateTime(t time.Time) *ReviewUpdateOne
- type Reviews
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Service
- type ServiceClient
- func (c *ServiceClient) Create() *ServiceCreate
- func (c *ServiceClient) CreateBulk(builders ...*ServiceCreate) *ServiceCreateBulk
- func (c *ServiceClient) Delete() *ServiceDelete
- func (c *ServiceClient) DeleteOne(s *Service) *ServiceDeleteOne
- func (c *ServiceClient) DeleteOneID(id uuid.UUID) *ServiceDeleteOne
- func (c *ServiceClient) Get(ctx context.Context, id uuid.UUID) (*Service, error)
- func (c *ServiceClient) GetX(ctx context.Context, id uuid.UUID) *Service
- func (c *ServiceClient) Hooks() []Hook
- func (c *ServiceClient) Query() *ServiceQuery
- func (c *ServiceClient) QueryRequests(s *Service) *RequestQuery
- func (c *ServiceClient) Update() *ServiceUpdate
- func (c *ServiceClient) UpdateOne(s *Service) *ServiceUpdateOne
- func (c *ServiceClient) UpdateOneID(id uuid.UUID) *ServiceUpdateOne
- func (c *ServiceClient) Use(hooks ...Hook)
- type ServiceCreate
- func (sc *ServiceCreate) AddRequestIDs(ids ...uuid.UUID) *ServiceCreate
- func (sc *ServiceCreate) AddRequests(r ...*Request) *ServiceCreate
- func (sc *ServiceCreate) Exec(ctx context.Context) error
- func (sc *ServiceCreate) ExecX(ctx context.Context)
- func (sc *ServiceCreate) Mutation() *ServiceMutation
- func (sc *ServiceCreate) Save(ctx context.Context) (*Service, error)
- func (sc *ServiceCreate) SaveX(ctx context.Context) *Service
- func (sc *ServiceCreate) SetCreateTime(t time.Time) *ServiceCreate
- func (sc *ServiceCreate) SetID(u uuid.UUID) *ServiceCreate
- func (sc *ServiceCreate) SetName(s string) *ServiceCreate
- func (sc *ServiceCreate) SetNillableCreateTime(t *time.Time) *ServiceCreate
- func (sc *ServiceCreate) SetNillableID(u *uuid.UUID) *ServiceCreate
- func (sc *ServiceCreate) SetNillableUpdateTime(t *time.Time) *ServiceCreate
- func (sc *ServiceCreate) SetUpdateTime(t time.Time) *ServiceCreate
- type ServiceCreateBulk
- type ServiceDelete
- type ServiceDeleteOne
- type ServiceEdges
- type ServiceGroupBy
- func (sgb *ServiceGroupBy) Aggregate(fns ...AggregateFunc) *ServiceGroupBy
- func (s *ServiceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ServiceGroupBy) BoolX(ctx context.Context) bool
- func (s *ServiceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ServiceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ServiceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ServiceGroupBy) Float64X(ctx context.Context) float64
- func (s *ServiceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ServiceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ServiceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ServiceGroupBy) IntX(ctx context.Context) int
- func (s *ServiceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ServiceGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ServiceGroupBy) Scan(ctx context.Context, v any) error
- func (s *ServiceGroupBy) ScanX(ctx context.Context, v any)
- func (s *ServiceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ServiceGroupBy) StringX(ctx context.Context) string
- func (s *ServiceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ServiceGroupBy) StringsX(ctx context.Context) []string
- type ServiceMutation
- func (m *ServiceMutation) AddField(name string, value ent.Value) error
- func (m *ServiceMutation) AddRequestIDs(ids ...uuid.UUID)
- func (m *ServiceMutation) AddedEdges() []string
- func (m *ServiceMutation) AddedField(name string) (ent.Value, bool)
- func (m *ServiceMutation) AddedFields() []string
- func (m *ServiceMutation) AddedIDs(name string) []ent.Value
- func (m *ServiceMutation) ClearEdge(name string) error
- func (m *ServiceMutation) ClearField(name string) error
- func (m *ServiceMutation) ClearRequests()
- func (m *ServiceMutation) ClearedEdges() []string
- func (m *ServiceMutation) ClearedFields() []string
- func (m ServiceMutation) Client() *Client
- func (m *ServiceMutation) CreateTime() (r time.Time, exists bool)
- func (m *ServiceMutation) EdgeCleared(name string) bool
- func (m *ServiceMutation) Field(name string) (ent.Value, bool)
- func (m *ServiceMutation) FieldCleared(name string) bool
- func (m *ServiceMutation) Fields() []string
- func (m *ServiceMutation) ID() (id uuid.UUID, exists bool)
- func (m *ServiceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ServiceMutation) Name() (r string, exists bool)
- func (m *ServiceMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ServiceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ServiceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ServiceMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ServiceMutation) Op() Op
- func (m *ServiceMutation) RemoveRequestIDs(ids ...uuid.UUID)
- func (m *ServiceMutation) RemovedEdges() []string
- func (m *ServiceMutation) RemovedIDs(name string) []ent.Value
- func (m *ServiceMutation) RemovedRequestsIDs() (ids []uuid.UUID)
- func (m *ServiceMutation) RequestsCleared() bool
- func (m *ServiceMutation) RequestsIDs() (ids []uuid.UUID)
- func (m *ServiceMutation) ResetCreateTime()
- func (m *ServiceMutation) ResetEdge(name string) error
- func (m *ServiceMutation) ResetField(name string) error
- func (m *ServiceMutation) ResetName()
- func (m *ServiceMutation) ResetRequests()
- func (m *ServiceMutation) ResetUpdateTime()
- func (m *ServiceMutation) SetCreateTime(t time.Time)
- func (m *ServiceMutation) SetField(name string, value ent.Value) error
- func (m *ServiceMutation) SetID(id uuid.UUID)
- func (m *ServiceMutation) SetName(s string)
- func (m *ServiceMutation) SetUpdateTime(t time.Time)
- func (m ServiceMutation) Tx() (*Tx, error)
- func (m *ServiceMutation) Type() string
- func (m *ServiceMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ServiceMutation) Where(ps ...predicate.Service)
- type ServiceQuery
- func (sq *ServiceQuery) All(ctx context.Context) ([]*Service, error)
- func (sq *ServiceQuery) AllX(ctx context.Context) []*Service
- func (sq *ServiceQuery) Clone() *ServiceQuery
- func (sq *ServiceQuery) Count(ctx context.Context) (int, error)
- func (sq *ServiceQuery) CountX(ctx context.Context) int
- func (sq *ServiceQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ServiceQuery) ExistX(ctx context.Context) bool
- func (sq *ServiceQuery) First(ctx context.Context) (*Service, error)
- func (sq *ServiceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *ServiceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *ServiceQuery) FirstX(ctx context.Context) *Service
- func (sq *ServiceQuery) GroupBy(field string, fields ...string) *ServiceGroupBy
- func (sq *ServiceQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (sq *ServiceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *ServiceQuery) Limit(limit int) *ServiceQuery
- func (sq *ServiceQuery) Offset(offset int) *ServiceQuery
- func (sq *ServiceQuery) Only(ctx context.Context) (*Service, error)
- func (sq *ServiceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *ServiceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *ServiceQuery) OnlyX(ctx context.Context) *Service
- func (sq *ServiceQuery) Order(o ...OrderFunc) *ServiceQuery
- func (sq *ServiceQuery) QueryRequests() *RequestQuery
- func (sq *ServiceQuery) Select(fields ...string) *ServiceSelect
- func (sq *ServiceQuery) Unique(unique bool) *ServiceQuery
- func (sq *ServiceQuery) Where(ps ...predicate.Service) *ServiceQuery
- func (sq *ServiceQuery) WithRequests(opts ...func(*RequestQuery)) *ServiceQuery
- type ServiceSelect
- func (s *ServiceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ServiceSelect) BoolX(ctx context.Context) bool
- func (s *ServiceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ServiceSelect) BoolsX(ctx context.Context) []bool
- func (s *ServiceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ServiceSelect) Float64X(ctx context.Context) float64
- func (s *ServiceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ServiceSelect) Float64sX(ctx context.Context) []float64
- func (s *ServiceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ServiceSelect) IntX(ctx context.Context) int
- func (s *ServiceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ServiceSelect) IntsX(ctx context.Context) []int
- func (ss *ServiceSelect) Scan(ctx context.Context, v any) error
- func (s *ServiceSelect) ScanX(ctx context.Context, v any)
- func (s *ServiceSelect) String(ctx context.Context) (_ string, err error)
- func (s *ServiceSelect) StringX(ctx context.Context) string
- func (s *ServiceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ServiceSelect) StringsX(ctx context.Context) []string
- type ServiceUpdate
- func (su *ServiceUpdate) AddRequestIDs(ids ...uuid.UUID) *ServiceUpdate
- func (su *ServiceUpdate) AddRequests(r ...*Request) *ServiceUpdate
- func (su *ServiceUpdate) ClearRequests() *ServiceUpdate
- func (su *ServiceUpdate) Exec(ctx context.Context) error
- func (su *ServiceUpdate) ExecX(ctx context.Context)
- func (su *ServiceUpdate) Mutation() *ServiceMutation
- func (su *ServiceUpdate) RemoveRequestIDs(ids ...uuid.UUID) *ServiceUpdate
- func (su *ServiceUpdate) RemoveRequests(r ...*Request) *ServiceUpdate
- func (su *ServiceUpdate) Save(ctx context.Context) (int, error)
- func (su *ServiceUpdate) SaveX(ctx context.Context) int
- func (su *ServiceUpdate) SetName(s string) *ServiceUpdate
- func (su *ServiceUpdate) SetUpdateTime(t time.Time) *ServiceUpdate
- func (su *ServiceUpdate) Where(ps ...predicate.Service) *ServiceUpdate
- type ServiceUpdateOne
- func (suo *ServiceUpdateOne) AddRequestIDs(ids ...uuid.UUID) *ServiceUpdateOne
- func (suo *ServiceUpdateOne) AddRequests(r ...*Request) *ServiceUpdateOne
- func (suo *ServiceUpdateOne) ClearRequests() *ServiceUpdateOne
- func (suo *ServiceUpdateOne) Exec(ctx context.Context) error
- func (suo *ServiceUpdateOne) ExecX(ctx context.Context)
- func (suo *ServiceUpdateOne) Mutation() *ServiceMutation
- func (suo *ServiceUpdateOne) RemoveRequestIDs(ids ...uuid.UUID) *ServiceUpdateOne
- func (suo *ServiceUpdateOne) RemoveRequests(r ...*Request) *ServiceUpdateOne
- func (suo *ServiceUpdateOne) Save(ctx context.Context) (*Service, error)
- func (suo *ServiceUpdateOne) SaveX(ctx context.Context) *Service
- func (suo *ServiceUpdateOne) Select(field string, fields ...string) *ServiceUpdateOne
- func (suo *ServiceUpdateOne) SetName(s string) *ServiceUpdateOne
- func (suo *ServiceUpdateOne) SetUpdateTime(t time.Time) *ServiceUpdateOne
- type Services
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeProject = "Project" TypeRequest = "Request" TypeReview = "Review" TypeService = "Service" )
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 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 // Project is the client for interacting with the Project builders. Project *ProjectClient // Request is the client for interacting with the Request builders. Request *RequestClient // Review is the client for interacting with the Review builders. Review *ReviewClient // Service is the client for interacting with the Service builders. Service *ServiceClient // 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(). Project. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type 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 Project ¶
type Project struct { // ID of the ent. ID uuid.UUID `json:"id,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"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProjectQuery when eager-loading is set. Edges ProjectEdges `json:"edges"` // contains filtered or unexported fields }
Project is the model entity for the Project schema.
func (*Project) QueryRequests ¶
func (pr *Project) QueryRequests() *RequestQuery
QueryRequests queries the "Requests" edge of the Project entity.
func (*Project) Unwrap ¶
Unwrap unwraps the Project 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 (*Project) Update ¶
func (pr *Project) Update() *ProjectUpdateOne
Update returns a builder for updating this Project. Note that you need to call Project.Unwrap() before calling this method if this Project was returned from a transaction, and the transaction was committed or rolled back.
type ProjectClient ¶
type ProjectClient struct {
// contains filtered or unexported fields
}
ProjectClient is a client for the Project schema.
func NewProjectClient ¶
func NewProjectClient(c config) *ProjectClient
NewProjectClient returns a client for the Project from the given config.
func (*ProjectClient) Create ¶
func (c *ProjectClient) Create() *ProjectCreate
Create returns a builder for creating a Project entity.
func (*ProjectClient) CreateBulk ¶
func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk
CreateBulk returns a builder for creating a bulk of Project entities.
func (*ProjectClient) Delete ¶
func (c *ProjectClient) Delete() *ProjectDelete
Delete returns a delete builder for Project.
func (*ProjectClient) DeleteOne ¶
func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProjectClient) DeleteOneID ¶
func (c *ProjectClient) DeleteOneID(id uuid.UUID) *ProjectDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ProjectClient) Hooks ¶
func (c *ProjectClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProjectClient) Query ¶
func (c *ProjectClient) Query() *ProjectQuery
Query returns a query builder for Project.
func (*ProjectClient) QueryRequests ¶
func (c *ProjectClient) QueryRequests(pr *Project) *RequestQuery
QueryRequests queries the Requests edge of a Project.
func (*ProjectClient) Update ¶
func (c *ProjectClient) Update() *ProjectUpdate
Update returns an update builder for Project.
func (*ProjectClient) UpdateOne ¶
func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProjectClient) UpdateOneID ¶
func (c *ProjectClient) UpdateOneID(id uuid.UUID) *ProjectUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProjectClient) Use ¶
func (c *ProjectClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `project.Hooks(f(g(h())))`.
type ProjectCreate ¶
type ProjectCreate struct {
// contains filtered or unexported fields
}
ProjectCreate is the builder for creating a Project entity.
func (*ProjectCreate) AddRequestIDs ¶
func (pc *ProjectCreate) AddRequestIDs(ids ...uuid.UUID) *ProjectCreate
AddRequestIDs adds the "Requests" edge to the Request entity by IDs.
func (*ProjectCreate) AddRequests ¶
func (pc *ProjectCreate) AddRequests(r ...*Request) *ProjectCreate
AddRequests adds the "Requests" edges to the Request entity.
func (*ProjectCreate) Exec ¶
func (pc *ProjectCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProjectCreate) ExecX ¶
func (pc *ProjectCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProjectCreate) Mutation ¶
func (pc *ProjectCreate) Mutation() *ProjectMutation
Mutation returns the ProjectMutation object of the builder.
func (*ProjectCreate) Save ¶
func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)
Save creates the Project in the database.
func (*ProjectCreate) SaveX ¶
func (pc *ProjectCreate) SaveX(ctx context.Context) *Project
SaveX calls Save and panics if Save returns an error.
func (*ProjectCreate) SetCreateTime ¶
func (pc *ProjectCreate) SetCreateTime(t time.Time) *ProjectCreate
SetCreateTime sets the "create_time" field.
func (*ProjectCreate) SetID ¶
func (pc *ProjectCreate) SetID(u uuid.UUID) *ProjectCreate
SetID sets the "id" field.
func (*ProjectCreate) SetName ¶
func (pc *ProjectCreate) SetName(s string) *ProjectCreate
SetName sets the "name" field.
func (*ProjectCreate) SetNillableCreateTime ¶
func (pc *ProjectCreate) SetNillableCreateTime(t *time.Time) *ProjectCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ProjectCreate) SetNillableID ¶
func (pc *ProjectCreate) SetNillableID(u *uuid.UUID) *ProjectCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProjectCreate) SetNillableUpdateTime ¶
func (pc *ProjectCreate) SetNillableUpdateTime(t *time.Time) *ProjectCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ProjectCreate) SetUpdateTime ¶
func (pc *ProjectCreate) SetUpdateTime(t time.Time) *ProjectCreate
SetUpdateTime sets the "update_time" field.
type ProjectCreateBulk ¶
type ProjectCreateBulk struct {
// contains filtered or unexported fields
}
ProjectCreateBulk is the builder for creating many Project entities in bulk.
func (*ProjectCreateBulk) Exec ¶
func (pcb *ProjectCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProjectCreateBulk) ExecX ¶
func (pcb *ProjectCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProjectDelete ¶
type ProjectDelete struct {
// contains filtered or unexported fields
}
ProjectDelete is the builder for deleting a Project entity.
func (*ProjectDelete) Exec ¶
func (pd *ProjectDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProjectDelete) ExecX ¶
func (pd *ProjectDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProjectDelete) Where ¶
func (pd *ProjectDelete) Where(ps ...predicate.Project) *ProjectDelete
Where appends a list predicates to the ProjectDelete builder.
type ProjectDeleteOne ¶
type ProjectDeleteOne struct {
// contains filtered or unexported fields
}
ProjectDeleteOne is the builder for deleting a single Project entity.
func (*ProjectDeleteOne) Exec ¶
func (pdo *ProjectDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProjectDeleteOne) ExecX ¶
func (pdo *ProjectDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProjectEdges ¶
type ProjectEdges struct { // Requests holds the value of the Requests edge. Requests []*Request `json:"Requests,omitempty"` // contains filtered or unexported fields }
ProjectEdges holds the relations/edges for other nodes in the graph.
func (ProjectEdges) RequestsOrErr ¶
func (e ProjectEdges) RequestsOrErr() ([]*Request, error)
RequestsOrErr returns the Requests value or an error if the edge was not loaded in eager-loading.
type ProjectGroupBy ¶
type ProjectGroupBy struct {
// contains filtered or unexported fields
}
ProjectGroupBy is the group-by builder for Project entities.
func (*ProjectGroupBy) Aggregate ¶
func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProjectGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Scan ¶
func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*ProjectGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProjectMutation ¶
type ProjectMutation struct {
// contains filtered or unexported fields
}
ProjectMutation represents an operation that mutates the Project nodes in the graph.
func (*ProjectMutation) AddField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) AddRequestIDs ¶
func (m *ProjectMutation) AddRequestIDs(ids ...uuid.UUID)
AddRequestIDs adds the "Requests" edge to the Request entity by ids.
func (*ProjectMutation) AddedEdges ¶
func (m *ProjectMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProjectMutation) AddedField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) AddedFields ¶
func (m *ProjectMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProjectMutation) AddedIDs ¶
func (m *ProjectMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProjectMutation) ClearEdge ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ClearField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ClearRequests ¶
func (m *ProjectMutation) ClearRequests()
ClearRequests clears the "Requests" edge to the Request entity.
func (*ProjectMutation) ClearedEdges ¶
func (m *ProjectMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProjectMutation) ClearedFields ¶
func (m *ProjectMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProjectMutation) Client ¶
func (m ProjectMutation) 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 (*ProjectMutation) CreateTime ¶
func (m *ProjectMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ProjectMutation) EdgeCleared ¶
func (m *ProjectMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProjectMutation) Field ¶
func (m *ProjectMutation) 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 (*ProjectMutation) FieldCleared ¶
func (m *ProjectMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProjectMutation) Fields ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ID ¶
func (m *ProjectMutation) 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 (*ProjectMutation) 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 (*ProjectMutation) Name ¶
func (m *ProjectMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProjectMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProjectMutation) 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 (*ProjectMutation) OldName ¶
func (m *ProjectMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProjectMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProjectMutation) RemoveRequestIDs ¶
func (m *ProjectMutation) RemoveRequestIDs(ids ...uuid.UUID)
RemoveRequestIDs removes the "Requests" edge to the Request entity by IDs.
func (*ProjectMutation) RemovedEdges ¶
func (m *ProjectMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProjectMutation) RemovedIDs ¶
func (m *ProjectMutation) 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 (*ProjectMutation) RemovedRequestsIDs ¶
func (m *ProjectMutation) RemovedRequestsIDs() (ids []uuid.UUID)
RemovedRequests returns the removed IDs of the "Requests" edge to the Request entity.
func (*ProjectMutation) RequestsCleared ¶
func (m *ProjectMutation) RequestsCleared() bool
RequestsCleared reports if the "Requests" edge to the Request entity was cleared.
func (*ProjectMutation) RequestsIDs ¶
func (m *ProjectMutation) RequestsIDs() (ids []uuid.UUID)
RequestsIDs returns the "Requests" edge IDs in the mutation.
func (*ProjectMutation) ResetCreateTime ¶
func (m *ProjectMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ProjectMutation) ResetEdge ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ResetField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ResetName ¶
func (m *ProjectMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProjectMutation) ResetRequests ¶
func (m *ProjectMutation) ResetRequests()
ResetRequests resets all changes to the "Requests" edge.
func (*ProjectMutation) ResetUpdateTime ¶
func (m *ProjectMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ProjectMutation) SetCreateTime ¶
func (m *ProjectMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ProjectMutation) SetField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) SetID ¶
func (m *ProjectMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Project entities.
func (*ProjectMutation) SetName ¶
func (m *ProjectMutation) SetName(s string)
SetName sets the "name" field.
func (*ProjectMutation) SetUpdateTime ¶
func (m *ProjectMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (ProjectMutation) Tx ¶
func (m ProjectMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProjectMutation) Type ¶
func (m *ProjectMutation) Type() string
Type returns the node type of this mutation (Project).
func (*ProjectMutation) UpdateTime ¶
func (m *ProjectMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ProjectMutation) Where ¶
func (m *ProjectMutation) Where(ps ...predicate.Project)
Where appends a list predicates to the ProjectMutation builder.
type ProjectQuery ¶
type ProjectQuery struct {
// contains filtered or unexported fields
}
ProjectQuery is the builder for querying Project entities.
func (*ProjectQuery) All ¶
func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)
All executes the query and returns a list of Projects.
func (*ProjectQuery) AllX ¶
func (pq *ProjectQuery) AllX(ctx context.Context) []*Project
AllX is like All, but panics if an error occurs.
func (*ProjectQuery) Clone ¶
func (pq *ProjectQuery) Clone() *ProjectQuery
Clone returns a duplicate of the ProjectQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProjectQuery) Count ¶
func (pq *ProjectQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProjectQuery) CountX ¶
func (pq *ProjectQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProjectQuery) Exist ¶
func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProjectQuery) ExistX ¶
func (pq *ProjectQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProjectQuery) First ¶
func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)
First returns the first Project entity from the query. Returns a *NotFoundError when no Project was found.
func (*ProjectQuery) FirstID ¶
FirstID returns the first Project ID from the query. Returns a *NotFoundError when no Project ID was found.
func (*ProjectQuery) FirstIDX ¶
func (pq *ProjectQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProjectQuery) FirstX ¶
func (pq *ProjectQuery) FirstX(ctx context.Context) *Project
FirstX is like First, but panics if an error occurs.
func (*ProjectQuery) GroupBy ¶
func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Project.Query(). GroupBy(project.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProjectQuery) IDsX ¶
func (pq *ProjectQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ProjectQuery) Limit ¶
func (pq *ProjectQuery) Limit(limit int) *ProjectQuery
Limit adds a limit step to the query.
func (*ProjectQuery) Offset ¶
func (pq *ProjectQuery) Offset(offset int) *ProjectQuery
Offset adds an offset step to the query.
func (*ProjectQuery) Only ¶
func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)
Only returns a single Project entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Project entity is found. Returns a *NotFoundError when no Project entities are found.
func (*ProjectQuery) OnlyID ¶
OnlyID is like Only, but returns the only Project ID in the query. Returns a *NotSingularError when more than one Project ID is found. Returns a *NotFoundError when no entities are found.
func (*ProjectQuery) OnlyIDX ¶
func (pq *ProjectQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProjectQuery) OnlyX ¶
func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project
OnlyX is like Only, but panics if an error occurs.
func (*ProjectQuery) Order ¶
func (pq *ProjectQuery) Order(o ...OrderFunc) *ProjectQuery
Order adds an order step to the query.
func (*ProjectQuery) QueryRequests ¶
func (pq *ProjectQuery) QueryRequests() *RequestQuery
QueryRequests chains the current query on the "Requests" edge.
func (*ProjectQuery) Select ¶
func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Project.Query(). Select(project.FieldCreateTime). Scan(ctx, &v)
func (*ProjectQuery) Unique ¶
func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery
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 (*ProjectQuery) Where ¶
func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery
Where adds a new predicate for the ProjectQuery builder.
func (*ProjectQuery) WithRequests ¶
func (pq *ProjectQuery) WithRequests(opts ...func(*RequestQuery)) *ProjectQuery
WithRequests tells the query-builder to eager-load the nodes that are connected to the "Requests" edge. The optional arguments are used to configure the query builder of the edge.
type ProjectSelect ¶
type ProjectSelect struct { *ProjectQuery // contains filtered or unexported fields }
ProjectSelect is the builder for selecting fields of Project entities.
func (*ProjectSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Scan ¶
func (ps *ProjectSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProjectSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProjectUpdate ¶
type ProjectUpdate struct {
// contains filtered or unexported fields
}
ProjectUpdate is the builder for updating Project entities.
func (*ProjectUpdate) AddRequestIDs ¶
func (pu *ProjectUpdate) AddRequestIDs(ids ...uuid.UUID) *ProjectUpdate
AddRequestIDs adds the "Requests" edge to the Request entity by IDs.
func (*ProjectUpdate) AddRequests ¶
func (pu *ProjectUpdate) AddRequests(r ...*Request) *ProjectUpdate
AddRequests adds the "Requests" edges to the Request entity.
func (*ProjectUpdate) ClearRequests ¶
func (pu *ProjectUpdate) ClearRequests() *ProjectUpdate
ClearRequests clears all "Requests" edges to the Request entity.
func (*ProjectUpdate) Exec ¶
func (pu *ProjectUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProjectUpdate) ExecX ¶
func (pu *ProjectUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProjectUpdate) Mutation ¶
func (pu *ProjectUpdate) Mutation() *ProjectMutation
Mutation returns the ProjectMutation object of the builder.
func (*ProjectUpdate) RemoveRequestIDs ¶
func (pu *ProjectUpdate) RemoveRequestIDs(ids ...uuid.UUID) *ProjectUpdate
RemoveRequestIDs removes the "Requests" edge to Request entities by IDs.
func (*ProjectUpdate) RemoveRequests ¶
func (pu *ProjectUpdate) RemoveRequests(r ...*Request) *ProjectUpdate
RemoveRequests removes "Requests" edges to Request entities.
func (*ProjectUpdate) Save ¶
func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProjectUpdate) SaveX ¶
func (pu *ProjectUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProjectUpdate) SetName ¶
func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate
SetName sets the "name" field.
func (*ProjectUpdate) SetUpdateTime ¶
func (pu *ProjectUpdate) SetUpdateTime(t time.Time) *ProjectUpdate
SetUpdateTime sets the "update_time" field.
func (*ProjectUpdate) Where ¶
func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate
Where appends a list predicates to the ProjectUpdate builder.
type ProjectUpdateOne ¶
type ProjectUpdateOne struct {
// contains filtered or unexported fields
}
ProjectUpdateOne is the builder for updating a single Project entity.
func (*ProjectUpdateOne) AddRequestIDs ¶
func (puo *ProjectUpdateOne) AddRequestIDs(ids ...uuid.UUID) *ProjectUpdateOne
AddRequestIDs adds the "Requests" edge to the Request entity by IDs.
func (*ProjectUpdateOne) AddRequests ¶
func (puo *ProjectUpdateOne) AddRequests(r ...*Request) *ProjectUpdateOne
AddRequests adds the "Requests" edges to the Request entity.
func (*ProjectUpdateOne) ClearRequests ¶
func (puo *ProjectUpdateOne) ClearRequests() *ProjectUpdateOne
ClearRequests clears all "Requests" edges to the Request entity.
func (*ProjectUpdateOne) Exec ¶
func (puo *ProjectUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProjectUpdateOne) ExecX ¶
func (puo *ProjectUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProjectUpdateOne) Mutation ¶
func (puo *ProjectUpdateOne) Mutation() *ProjectMutation
Mutation returns the ProjectMutation object of the builder.
func (*ProjectUpdateOne) RemoveRequestIDs ¶
func (puo *ProjectUpdateOne) RemoveRequestIDs(ids ...uuid.UUID) *ProjectUpdateOne
RemoveRequestIDs removes the "Requests" edge to Request entities by IDs.
func (*ProjectUpdateOne) RemoveRequests ¶
func (puo *ProjectUpdateOne) RemoveRequests(r ...*Request) *ProjectUpdateOne
RemoveRequests removes "Requests" edges to Request entities.
func (*ProjectUpdateOne) Save ¶
func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)
Save executes the query and returns the updated Project entity.
func (*ProjectUpdateOne) SaveX ¶
func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project
SaveX is like Save, but panics if an error occurs.
func (*ProjectUpdateOne) Select ¶
func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProjectUpdateOne) SetName ¶
func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne
SetName sets the "name" field.
func (*ProjectUpdateOne) SetUpdateTime ¶
func (puo *ProjectUpdateOne) SetUpdateTime(t time.Time) *ProjectUpdateOne
SetUpdateTime sets the "update_time" field.
type Request ¶
type Request struct { // ID of the ent. ID uuid.UUID `json:"id,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"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // RequestedBy holds the value of the "requested_by" field. RequestedBy string `json:"requested_by,omitempty"` // Status holds the value of the "status" field. Status request.Status `json:"status,omitempty"` // Spec holds the value of the "spec" field. Spec schema.RequestSpec `json:"spec,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RequestQuery when eager-loading is set. Edges RequestEdges `json:"edges"` // contains filtered or unexported fields }
Request is the model entity for the Request schema.
func (*Request) QueryProject ¶
func (r *Request) QueryProject() *ProjectQuery
QueryProject queries the "Project" edge of the Request entity.
func (*Request) QueryReviews ¶
func (r *Request) QueryReviews() *ReviewQuery
QueryReviews queries the "Reviews" edge of the Request entity.
func (*Request) QueryService ¶
func (r *Request) QueryService() *ServiceQuery
QueryService queries the "Service" edge of the Request entity.
func (*Request) Unwrap ¶
Unwrap unwraps the Request 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 (*Request) Update ¶
func (r *Request) Update() *RequestUpdateOne
Update returns a builder for updating this Request. Note that you need to call Request.Unwrap() before calling this method if this Request was returned from a transaction, and the transaction was committed or rolled back.
type RequestClient ¶
type RequestClient struct {
// contains filtered or unexported fields
}
RequestClient is a client for the Request schema.
func NewRequestClient ¶
func NewRequestClient(c config) *RequestClient
NewRequestClient returns a client for the Request from the given config.
func (*RequestClient) Create ¶
func (c *RequestClient) Create() *RequestCreate
Create returns a builder for creating a Request entity.
func (*RequestClient) CreateBulk ¶
func (c *RequestClient) CreateBulk(builders ...*RequestCreate) *RequestCreateBulk
CreateBulk returns a builder for creating a bulk of Request entities.
func (*RequestClient) Delete ¶
func (c *RequestClient) Delete() *RequestDelete
Delete returns a delete builder for Request.
func (*RequestClient) DeleteOne ¶
func (c *RequestClient) DeleteOne(r *Request) *RequestDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RequestClient) DeleteOneID ¶
func (c *RequestClient) DeleteOneID(id uuid.UUID) *RequestDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*RequestClient) Hooks ¶
func (c *RequestClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RequestClient) Query ¶
func (c *RequestClient) Query() *RequestQuery
Query returns a query builder for Request.
func (*RequestClient) QueryProject ¶
func (c *RequestClient) QueryProject(r *Request) *ProjectQuery
QueryProject queries the Project edge of a Request.
func (*RequestClient) QueryReviews ¶
func (c *RequestClient) QueryReviews(r *Request) *ReviewQuery
QueryReviews queries the Reviews edge of a Request.
func (*RequestClient) QueryService ¶
func (c *RequestClient) QueryService(r *Request) *ServiceQuery
QueryService queries the Service edge of a Request.
func (*RequestClient) Update ¶
func (c *RequestClient) Update() *RequestUpdate
Update returns an update builder for Request.
func (*RequestClient) UpdateOne ¶
func (c *RequestClient) UpdateOne(r *Request) *RequestUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RequestClient) UpdateOneID ¶
func (c *RequestClient) UpdateOneID(id uuid.UUID) *RequestUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RequestClient) Use ¶
func (c *RequestClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `request.Hooks(f(g(h())))`.
type RequestCreate ¶
type RequestCreate struct {
// contains filtered or unexported fields
}
RequestCreate is the builder for creating a Request entity.
func (*RequestCreate) AddReviewIDs ¶
func (rc *RequestCreate) AddReviewIDs(ids ...uuid.UUID) *RequestCreate
AddReviewIDs adds the "Reviews" edge to the Review entity by IDs.
func (*RequestCreate) AddReviews ¶
func (rc *RequestCreate) AddReviews(r ...*Review) *RequestCreate
AddReviews adds the "Reviews" edges to the Review entity.
func (*RequestCreate) Exec ¶
func (rc *RequestCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RequestCreate) ExecX ¶
func (rc *RequestCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RequestCreate) Mutation ¶
func (rc *RequestCreate) Mutation() *RequestMutation
Mutation returns the RequestMutation object of the builder.
func (*RequestCreate) Save ¶
func (rc *RequestCreate) Save(ctx context.Context) (*Request, error)
Save creates the Request in the database.
func (*RequestCreate) SaveX ¶
func (rc *RequestCreate) SaveX(ctx context.Context) *Request
SaveX calls Save and panics if Save returns an error.
func (*RequestCreate) SetCreateTime ¶
func (rc *RequestCreate) SetCreateTime(t time.Time) *RequestCreate
SetCreateTime sets the "create_time" field.
func (*RequestCreate) SetID ¶
func (rc *RequestCreate) SetID(u uuid.UUID) *RequestCreate
SetID sets the "id" field.
func (*RequestCreate) SetNillableCreateTime ¶
func (rc *RequestCreate) SetNillableCreateTime(t *time.Time) *RequestCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*RequestCreate) SetNillableID ¶
func (rc *RequestCreate) SetNillableID(u *uuid.UUID) *RequestCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RequestCreate) SetNillableStatus ¶
func (rc *RequestCreate) SetNillableStatus(r *request.Status) *RequestCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RequestCreate) SetNillableUpdateTime ¶
func (rc *RequestCreate) SetNillableUpdateTime(t *time.Time) *RequestCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*RequestCreate) SetProject ¶
func (rc *RequestCreate) SetProject(p *Project) *RequestCreate
SetProject sets the "Project" edge to the Project entity.
func (*RequestCreate) SetProjectID ¶
func (rc *RequestCreate) SetProjectID(id uuid.UUID) *RequestCreate
SetProjectID sets the "Project" edge to the Project entity by ID.
func (*RequestCreate) SetRequestedBy ¶
func (rc *RequestCreate) SetRequestedBy(s string) *RequestCreate
SetRequestedBy sets the "requested_by" field.
func (*RequestCreate) SetService ¶
func (rc *RequestCreate) SetService(s *Service) *RequestCreate
SetService sets the "Service" edge to the Service entity.
func (*RequestCreate) SetServiceID ¶
func (rc *RequestCreate) SetServiceID(id uuid.UUID) *RequestCreate
SetServiceID sets the "Service" edge to the Service entity by ID.
func (*RequestCreate) SetSpec ¶
func (rc *RequestCreate) SetSpec(ss schema.RequestSpec) *RequestCreate
SetSpec sets the "spec" field.
func (*RequestCreate) SetStatus ¶
func (rc *RequestCreate) SetStatus(r request.Status) *RequestCreate
SetStatus sets the "status" field.
func (*RequestCreate) SetType ¶
func (rc *RequestCreate) SetType(s string) *RequestCreate
SetType sets the "type" field.
func (*RequestCreate) SetUpdateTime ¶
func (rc *RequestCreate) SetUpdateTime(t time.Time) *RequestCreate
SetUpdateTime sets the "update_time" field.
type RequestCreateBulk ¶
type RequestCreateBulk struct {
// contains filtered or unexported fields
}
RequestCreateBulk is the builder for creating many Request entities in bulk.
func (*RequestCreateBulk) Exec ¶
func (rcb *RequestCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RequestCreateBulk) ExecX ¶
func (rcb *RequestCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RequestDelete ¶
type RequestDelete struct {
// contains filtered or unexported fields
}
RequestDelete is the builder for deleting a Request entity.
func (*RequestDelete) Exec ¶
func (rd *RequestDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RequestDelete) ExecX ¶
func (rd *RequestDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RequestDelete) Where ¶
func (rd *RequestDelete) Where(ps ...predicate.Request) *RequestDelete
Where appends a list predicates to the RequestDelete builder.
type RequestDeleteOne ¶
type RequestDeleteOne struct {
// contains filtered or unexported fields
}
RequestDeleteOne is the builder for deleting a single Request entity.
func (*RequestDeleteOne) Exec ¶
func (rdo *RequestDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RequestDeleteOne) ExecX ¶
func (rdo *RequestDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RequestEdges ¶
type RequestEdges struct { // Project holds the value of the Project edge. Project *Project `json:"Project,omitempty"` // Service holds the value of the Service edge. Service *Service `json:"Service,omitempty"` // Reviews holds the value of the Reviews edge. Reviews []*Review `json:"Reviews,omitempty"` // contains filtered or unexported fields }
RequestEdges holds the relations/edges for other nodes in the graph.
func (RequestEdges) ProjectOrErr ¶
func (e RequestEdges) ProjectOrErr() (*Project, error)
ProjectOrErr returns the Project value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RequestEdges) ReviewsOrErr ¶
func (e RequestEdges) ReviewsOrErr() ([]*Review, error)
ReviewsOrErr returns the Reviews value or an error if the edge was not loaded in eager-loading.
func (RequestEdges) ServiceOrErr ¶
func (e RequestEdges) ServiceOrErr() (*Service, error)
ServiceOrErr returns the Service value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RequestGroupBy ¶
type RequestGroupBy struct {
// contains filtered or unexported fields
}
RequestGroupBy is the group-by builder for Request entities.
func (*RequestGroupBy) Aggregate ¶
func (rgb *RequestGroupBy) Aggregate(fns ...AggregateFunc) *RequestGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RequestGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RequestGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RequestGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RequestGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RequestGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RequestGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RequestGroupBy) Scan ¶
func (rgb *RequestGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*RequestGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RequestMutation ¶
type RequestMutation struct {
// contains filtered or unexported fields
}
RequestMutation represents an operation that mutates the Request nodes in the graph.
func (*RequestMutation) AddField ¶
func (m *RequestMutation) 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 (*RequestMutation) AddReviewIDs ¶
func (m *RequestMutation) AddReviewIDs(ids ...uuid.UUID)
AddReviewIDs adds the "Reviews" edge to the Review entity by ids.
func (*RequestMutation) AddedEdges ¶
func (m *RequestMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RequestMutation) AddedField ¶
func (m *RequestMutation) 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 (*RequestMutation) AddedFields ¶
func (m *RequestMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RequestMutation) AddedIDs ¶
func (m *RequestMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RequestMutation) ClearEdge ¶
func (m *RequestMutation) 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 (*RequestMutation) ClearField ¶
func (m *RequestMutation) 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 (*RequestMutation) ClearProject ¶
func (m *RequestMutation) ClearProject()
ClearProject clears the "Project" edge to the Project entity.
func (*RequestMutation) ClearReviews ¶
func (m *RequestMutation) ClearReviews()
ClearReviews clears the "Reviews" edge to the Review entity.
func (*RequestMutation) ClearService ¶
func (m *RequestMutation) ClearService()
ClearService clears the "Service" edge to the Service entity.
func (*RequestMutation) ClearedEdges ¶
func (m *RequestMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RequestMutation) ClearedFields ¶
func (m *RequestMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RequestMutation) Client ¶
func (m RequestMutation) 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 (*RequestMutation) CreateTime ¶
func (m *RequestMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*RequestMutation) EdgeCleared ¶
func (m *RequestMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RequestMutation) Field ¶
func (m *RequestMutation) 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 (*RequestMutation) FieldCleared ¶
func (m *RequestMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RequestMutation) Fields ¶
func (m *RequestMutation) 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 (*RequestMutation) GetType ¶
func (m *RequestMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*RequestMutation) ID ¶
func (m *RequestMutation) 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 (*RequestMutation) 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 (*RequestMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RequestMutation) 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 (*RequestMutation) OldRequestedBy ¶
func (m *RequestMutation) OldRequestedBy(ctx context.Context) (v string, err error)
OldRequestedBy returns the old "requested_by" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RequestMutation) OldSpec ¶
func (m *RequestMutation) OldSpec(ctx context.Context) (v schema.RequestSpec, err error)
OldSpec returns the old "spec" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RequestMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RequestMutation) OldType ¶
func (m *RequestMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RequestMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RequestMutation) ProjectCleared ¶
func (m *RequestMutation) ProjectCleared() bool
ProjectCleared reports if the "Project" edge to the Project entity was cleared.
func (*RequestMutation) ProjectID ¶
func (m *RequestMutation) ProjectID() (id uuid.UUID, exists bool)
ProjectID returns the "Project" edge ID in the mutation.
func (*RequestMutation) ProjectIDs ¶
func (m *RequestMutation) ProjectIDs() (ids []uuid.UUID)
ProjectIDs returns the "Project" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProjectID instead. It exists only for internal usage by the builders.
func (*RequestMutation) RemoveReviewIDs ¶
func (m *RequestMutation) RemoveReviewIDs(ids ...uuid.UUID)
RemoveReviewIDs removes the "Reviews" edge to the Review entity by IDs.
func (*RequestMutation) RemovedEdges ¶
func (m *RequestMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RequestMutation) RemovedIDs ¶
func (m *RequestMutation) 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 (*RequestMutation) RemovedReviewsIDs ¶
func (m *RequestMutation) RemovedReviewsIDs() (ids []uuid.UUID)
RemovedReviews returns the removed IDs of the "Reviews" edge to the Review entity.
func (*RequestMutation) RequestedBy ¶
func (m *RequestMutation) RequestedBy() (r string, exists bool)
RequestedBy returns the value of the "requested_by" field in the mutation.
func (*RequestMutation) ResetCreateTime ¶
func (m *RequestMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*RequestMutation) ResetEdge ¶
func (m *RequestMutation) 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 (*RequestMutation) ResetField ¶
func (m *RequestMutation) 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 (*RequestMutation) ResetProject ¶
func (m *RequestMutation) ResetProject()
ResetProject resets all changes to the "Project" edge.
func (*RequestMutation) ResetRequestedBy ¶
func (m *RequestMutation) ResetRequestedBy()
ResetRequestedBy resets all changes to the "requested_by" field.
func (*RequestMutation) ResetReviews ¶
func (m *RequestMutation) ResetReviews()
ResetReviews resets all changes to the "Reviews" edge.
func (*RequestMutation) ResetService ¶
func (m *RequestMutation) ResetService()
ResetService resets all changes to the "Service" edge.
func (*RequestMutation) ResetSpec ¶
func (m *RequestMutation) ResetSpec()
ResetSpec resets all changes to the "spec" field.
func (*RequestMutation) ResetStatus ¶
func (m *RequestMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*RequestMutation) ResetType ¶
func (m *RequestMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*RequestMutation) ResetUpdateTime ¶
func (m *RequestMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*RequestMutation) ReviewsCleared ¶
func (m *RequestMutation) ReviewsCleared() bool
ReviewsCleared reports if the "Reviews" edge to the Review entity was cleared.
func (*RequestMutation) ReviewsIDs ¶
func (m *RequestMutation) ReviewsIDs() (ids []uuid.UUID)
ReviewsIDs returns the "Reviews" edge IDs in the mutation.
func (*RequestMutation) ServiceCleared ¶
func (m *RequestMutation) ServiceCleared() bool
ServiceCleared reports if the "Service" edge to the Service entity was cleared.
func (*RequestMutation) ServiceID ¶
func (m *RequestMutation) ServiceID() (id uuid.UUID, exists bool)
ServiceID returns the "Service" edge ID in the mutation.
func (*RequestMutation) ServiceIDs ¶
func (m *RequestMutation) ServiceIDs() (ids []uuid.UUID)
ServiceIDs returns the "Service" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ServiceID instead. It exists only for internal usage by the builders.
func (*RequestMutation) SetCreateTime ¶
func (m *RequestMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*RequestMutation) SetField ¶
func (m *RequestMutation) 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 (*RequestMutation) SetID ¶
func (m *RequestMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Request entities.
func (*RequestMutation) SetProjectID ¶
func (m *RequestMutation) SetProjectID(id uuid.UUID)
SetProjectID sets the "Project" edge to the Project entity by id.
func (*RequestMutation) SetRequestedBy ¶
func (m *RequestMutation) SetRequestedBy(s string)
SetRequestedBy sets the "requested_by" field.
func (*RequestMutation) SetServiceID ¶
func (m *RequestMutation) SetServiceID(id uuid.UUID)
SetServiceID sets the "Service" edge to the Service entity by id.
func (*RequestMutation) SetSpec ¶
func (m *RequestMutation) SetSpec(ss schema.RequestSpec)
SetSpec sets the "spec" field.
func (*RequestMutation) SetStatus ¶
func (m *RequestMutation) SetStatus(r request.Status)
SetStatus sets the "status" field.
func (*RequestMutation) SetType ¶
func (m *RequestMutation) SetType(s string)
SetType sets the "type" field.
func (*RequestMutation) SetUpdateTime ¶
func (m *RequestMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*RequestMutation) Spec ¶
func (m *RequestMutation) Spec() (r schema.RequestSpec, exists bool)
Spec returns the value of the "spec" field in the mutation.
func (*RequestMutation) Status ¶
func (m *RequestMutation) Status() (r request.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (RequestMutation) Tx ¶
func (m RequestMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RequestMutation) Type ¶
func (m *RequestMutation) Type() string
Type returns the node type of this mutation (Request).
func (*RequestMutation) UpdateTime ¶
func (m *RequestMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*RequestMutation) Where ¶
func (m *RequestMutation) Where(ps ...predicate.Request)
Where appends a list predicates to the RequestMutation builder.
type RequestQuery ¶
type RequestQuery struct {
// contains filtered or unexported fields
}
RequestQuery is the builder for querying Request entities.
func (*RequestQuery) All ¶
func (rq *RequestQuery) All(ctx context.Context) ([]*Request, error)
All executes the query and returns a list of Requests.
func (*RequestQuery) AllX ¶
func (rq *RequestQuery) AllX(ctx context.Context) []*Request
AllX is like All, but panics if an error occurs.
func (*RequestQuery) Clone ¶
func (rq *RequestQuery) Clone() *RequestQuery
Clone returns a duplicate of the RequestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RequestQuery) Count ¶
func (rq *RequestQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RequestQuery) CountX ¶
func (rq *RequestQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RequestQuery) Exist ¶
func (rq *RequestQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RequestQuery) ExistX ¶
func (rq *RequestQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RequestQuery) First ¶
func (rq *RequestQuery) First(ctx context.Context) (*Request, error)
First returns the first Request entity from the query. Returns a *NotFoundError when no Request was found.
func (*RequestQuery) FirstID ¶
FirstID returns the first Request ID from the query. Returns a *NotFoundError when no Request ID was found.
func (*RequestQuery) FirstIDX ¶
func (rq *RequestQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*RequestQuery) FirstX ¶
func (rq *RequestQuery) FirstX(ctx context.Context) *Request
FirstX is like First, but panics if an error occurs.
func (*RequestQuery) GroupBy ¶
func (rq *RequestQuery) GroupBy(field string, fields ...string) *RequestGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Request.Query(). GroupBy(request.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RequestQuery) IDsX ¶
func (rq *RequestQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*RequestQuery) Limit ¶
func (rq *RequestQuery) Limit(limit int) *RequestQuery
Limit adds a limit step to the query.
func (*RequestQuery) Offset ¶
func (rq *RequestQuery) Offset(offset int) *RequestQuery
Offset adds an offset step to the query.
func (*RequestQuery) Only ¶
func (rq *RequestQuery) Only(ctx context.Context) (*Request, error)
Only returns a single Request entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Request entity is found. Returns a *NotFoundError when no Request entities are found.
func (*RequestQuery) OnlyID ¶
OnlyID is like Only, but returns the only Request ID in the query. Returns a *NotSingularError when more than one Request ID is found. Returns a *NotFoundError when no entities are found.
func (*RequestQuery) OnlyIDX ¶
func (rq *RequestQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RequestQuery) OnlyX ¶
func (rq *RequestQuery) OnlyX(ctx context.Context) *Request
OnlyX is like Only, but panics if an error occurs.
func (*RequestQuery) Order ¶
func (rq *RequestQuery) Order(o ...OrderFunc) *RequestQuery
Order adds an order step to the query.
func (*RequestQuery) QueryProject ¶
func (rq *RequestQuery) QueryProject() *ProjectQuery
QueryProject chains the current query on the "Project" edge.
func (*RequestQuery) QueryReviews ¶
func (rq *RequestQuery) QueryReviews() *ReviewQuery
QueryReviews chains the current query on the "Reviews" edge.
func (*RequestQuery) QueryService ¶
func (rq *RequestQuery) QueryService() *ServiceQuery
QueryService chains the current query on the "Service" edge.
func (*RequestQuery) Select ¶
func (rq *RequestQuery) Select(fields ...string) *RequestSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Request.Query(). Select(request.FieldCreateTime). Scan(ctx, &v)
func (*RequestQuery) Unique ¶
func (rq *RequestQuery) Unique(unique bool) *RequestQuery
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 (*RequestQuery) Where ¶
func (rq *RequestQuery) Where(ps ...predicate.Request) *RequestQuery
Where adds a new predicate for the RequestQuery builder.
func (*RequestQuery) WithProject ¶
func (rq *RequestQuery) WithProject(opts ...func(*ProjectQuery)) *RequestQuery
WithProject tells the query-builder to eager-load the nodes that are connected to the "Project" edge. The optional arguments are used to configure the query builder of the edge.
func (*RequestQuery) WithReviews ¶
func (rq *RequestQuery) WithReviews(opts ...func(*ReviewQuery)) *RequestQuery
WithReviews tells the query-builder to eager-load the nodes that are connected to the "Reviews" edge. The optional arguments are used to configure the query builder of the edge.
func (*RequestQuery) WithService ¶
func (rq *RequestQuery) WithService(opts ...func(*ServiceQuery)) *RequestQuery
WithService tells the query-builder to eager-load the nodes that are connected to the "Service" edge. The optional arguments are used to configure the query builder of the edge.
type RequestSelect ¶
type RequestSelect struct { *RequestQuery // contains filtered or unexported fields }
RequestSelect is the builder for selecting fields of Request entities.
func (*RequestSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RequestSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RequestSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RequestSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RequestSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RequestSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RequestSelect) Scan ¶
func (rs *RequestSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RequestSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RequestUpdate ¶
type RequestUpdate struct {
// contains filtered or unexported fields
}
RequestUpdate is the builder for updating Request entities.
func (*RequestUpdate) AddReviewIDs ¶
func (ru *RequestUpdate) AddReviewIDs(ids ...uuid.UUID) *RequestUpdate
AddReviewIDs adds the "Reviews" edge to the Review entity by IDs.
func (*RequestUpdate) AddReviews ¶
func (ru *RequestUpdate) AddReviews(r ...*Review) *RequestUpdate
AddReviews adds the "Reviews" edges to the Review entity.
func (*RequestUpdate) ClearProject ¶
func (ru *RequestUpdate) ClearProject() *RequestUpdate
ClearProject clears the "Project" edge to the Project entity.
func (*RequestUpdate) ClearReviews ¶
func (ru *RequestUpdate) ClearReviews() *RequestUpdate
ClearReviews clears all "Reviews" edges to the Review entity.
func (*RequestUpdate) ClearService ¶
func (ru *RequestUpdate) ClearService() *RequestUpdate
ClearService clears the "Service" edge to the Service entity.
func (*RequestUpdate) Exec ¶
func (ru *RequestUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RequestUpdate) ExecX ¶
func (ru *RequestUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RequestUpdate) Mutation ¶
func (ru *RequestUpdate) Mutation() *RequestMutation
Mutation returns the RequestMutation object of the builder.
func (*RequestUpdate) RemoveReviewIDs ¶
func (ru *RequestUpdate) RemoveReviewIDs(ids ...uuid.UUID) *RequestUpdate
RemoveReviewIDs removes the "Reviews" edge to Review entities by IDs.
func (*RequestUpdate) RemoveReviews ¶
func (ru *RequestUpdate) RemoveReviews(r ...*Review) *RequestUpdate
RemoveReviews removes "Reviews" edges to Review entities.
func (*RequestUpdate) Save ¶
func (ru *RequestUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RequestUpdate) SaveX ¶
func (ru *RequestUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RequestUpdate) SetNillableStatus ¶
func (ru *RequestUpdate) SetNillableStatus(r *request.Status) *RequestUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RequestUpdate) SetProject ¶
func (ru *RequestUpdate) SetProject(p *Project) *RequestUpdate
SetProject sets the "Project" edge to the Project entity.
func (*RequestUpdate) SetProjectID ¶
func (ru *RequestUpdate) SetProjectID(id uuid.UUID) *RequestUpdate
SetProjectID sets the "Project" edge to the Project entity by ID.
func (*RequestUpdate) SetRequestedBy ¶
func (ru *RequestUpdate) SetRequestedBy(s string) *RequestUpdate
SetRequestedBy sets the "requested_by" field.
func (*RequestUpdate) SetService ¶
func (ru *RequestUpdate) SetService(s *Service) *RequestUpdate
SetService sets the "Service" edge to the Service entity.
func (*RequestUpdate) SetServiceID ¶
func (ru *RequestUpdate) SetServiceID(id uuid.UUID) *RequestUpdate
SetServiceID sets the "Service" edge to the Service entity by ID.
func (*RequestUpdate) SetSpec ¶
func (ru *RequestUpdate) SetSpec(ss schema.RequestSpec) *RequestUpdate
SetSpec sets the "spec" field.
func (*RequestUpdate) SetStatus ¶
func (ru *RequestUpdate) SetStatus(r request.Status) *RequestUpdate
SetStatus sets the "status" field.
func (*RequestUpdate) SetType ¶
func (ru *RequestUpdate) SetType(s string) *RequestUpdate
SetType sets the "type" field.
func (*RequestUpdate) SetUpdateTime ¶
func (ru *RequestUpdate) SetUpdateTime(t time.Time) *RequestUpdate
SetUpdateTime sets the "update_time" field.
func (*RequestUpdate) Where ¶
func (ru *RequestUpdate) Where(ps ...predicate.Request) *RequestUpdate
Where appends a list predicates to the RequestUpdate builder.
type RequestUpdateOne ¶
type RequestUpdateOne struct {
// contains filtered or unexported fields
}
RequestUpdateOne is the builder for updating a single Request entity.
func (*RequestUpdateOne) AddReviewIDs ¶
func (ruo *RequestUpdateOne) AddReviewIDs(ids ...uuid.UUID) *RequestUpdateOne
AddReviewIDs adds the "Reviews" edge to the Review entity by IDs.
func (*RequestUpdateOne) AddReviews ¶
func (ruo *RequestUpdateOne) AddReviews(r ...*Review) *RequestUpdateOne
AddReviews adds the "Reviews" edges to the Review entity.
func (*RequestUpdateOne) ClearProject ¶
func (ruo *RequestUpdateOne) ClearProject() *RequestUpdateOne
ClearProject clears the "Project" edge to the Project entity.
func (*RequestUpdateOne) ClearReviews ¶
func (ruo *RequestUpdateOne) ClearReviews() *RequestUpdateOne
ClearReviews clears all "Reviews" edges to the Review entity.
func (*RequestUpdateOne) ClearService ¶
func (ruo *RequestUpdateOne) ClearService() *RequestUpdateOne
ClearService clears the "Service" edge to the Service entity.
func (*RequestUpdateOne) Exec ¶
func (ruo *RequestUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RequestUpdateOne) ExecX ¶
func (ruo *RequestUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RequestUpdateOne) Mutation ¶
func (ruo *RequestUpdateOne) Mutation() *RequestMutation
Mutation returns the RequestMutation object of the builder.
func (*RequestUpdateOne) RemoveReviewIDs ¶
func (ruo *RequestUpdateOne) RemoveReviewIDs(ids ...uuid.UUID) *RequestUpdateOne
RemoveReviewIDs removes the "Reviews" edge to Review entities by IDs.
func (*RequestUpdateOne) RemoveReviews ¶
func (ruo *RequestUpdateOne) RemoveReviews(r ...*Review) *RequestUpdateOne
RemoveReviews removes "Reviews" edges to Review entities.
func (*RequestUpdateOne) Save ¶
func (ruo *RequestUpdateOne) Save(ctx context.Context) (*Request, error)
Save executes the query and returns the updated Request entity.
func (*RequestUpdateOne) SaveX ¶
func (ruo *RequestUpdateOne) SaveX(ctx context.Context) *Request
SaveX is like Save, but panics if an error occurs.
func (*RequestUpdateOne) Select ¶
func (ruo *RequestUpdateOne) Select(field string, fields ...string) *RequestUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RequestUpdateOne) SetNillableStatus ¶
func (ruo *RequestUpdateOne) SetNillableStatus(r *request.Status) *RequestUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RequestUpdateOne) SetProject ¶
func (ruo *RequestUpdateOne) SetProject(p *Project) *RequestUpdateOne
SetProject sets the "Project" edge to the Project entity.
func (*RequestUpdateOne) SetProjectID ¶
func (ruo *RequestUpdateOne) SetProjectID(id uuid.UUID) *RequestUpdateOne
SetProjectID sets the "Project" edge to the Project entity by ID.
func (*RequestUpdateOne) SetRequestedBy ¶
func (ruo *RequestUpdateOne) SetRequestedBy(s string) *RequestUpdateOne
SetRequestedBy sets the "requested_by" field.
func (*RequestUpdateOne) SetService ¶
func (ruo *RequestUpdateOne) SetService(s *Service) *RequestUpdateOne
SetService sets the "Service" edge to the Service entity.
func (*RequestUpdateOne) SetServiceID ¶
func (ruo *RequestUpdateOne) SetServiceID(id uuid.UUID) *RequestUpdateOne
SetServiceID sets the "Service" edge to the Service entity by ID.
func (*RequestUpdateOne) SetSpec ¶
func (ruo *RequestUpdateOne) SetSpec(ss schema.RequestSpec) *RequestUpdateOne
SetSpec sets the "spec" field.
func (*RequestUpdateOne) SetStatus ¶
func (ruo *RequestUpdateOne) SetStatus(r request.Status) *RequestUpdateOne
SetStatus sets the "status" field.
func (*RequestUpdateOne) SetType ¶
func (ruo *RequestUpdateOne) SetType(s string) *RequestUpdateOne
SetType sets the "type" field.
func (*RequestUpdateOne) SetUpdateTime ¶
func (ruo *RequestUpdateOne) SetUpdateTime(t time.Time) *RequestUpdateOne
SetUpdateTime sets the "update_time" field.
type Review ¶
type Review struct { // ID of the ent. ID uuid.UUID `json:"id,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"` // Status holds the value of the "status" field. Status review.Status `json:"status,omitempty"` // Type holds the value of the "type" field. Type review.Type `json:"type,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ReviewQuery when eager-loading is set. Edges ReviewEdges `json:"edges"` // contains filtered or unexported fields }
Review is the model entity for the Review schema.
func (*Review) QueryRequest ¶
func (r *Review) QueryRequest() *RequestQuery
QueryRequest queries the "Request" edge of the Review entity.
func (*Review) Unwrap ¶
Unwrap unwraps the Review 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 (*Review) Update ¶
func (r *Review) Update() *ReviewUpdateOne
Update returns a builder for updating this Review. Note that you need to call Review.Unwrap() before calling this method if this Review was returned from a transaction, and the transaction was committed or rolled back.
type ReviewClient ¶
type ReviewClient struct {
// contains filtered or unexported fields
}
ReviewClient is a client for the Review schema.
func NewReviewClient ¶
func NewReviewClient(c config) *ReviewClient
NewReviewClient returns a client for the Review from the given config.
func (*ReviewClient) Create ¶
func (c *ReviewClient) Create() *ReviewCreate
Create returns a builder for creating a Review entity.
func (*ReviewClient) CreateBulk ¶
func (c *ReviewClient) CreateBulk(builders ...*ReviewCreate) *ReviewCreateBulk
CreateBulk returns a builder for creating a bulk of Review entities.
func (*ReviewClient) Delete ¶
func (c *ReviewClient) Delete() *ReviewDelete
Delete returns a delete builder for Review.
func (*ReviewClient) DeleteOne ¶
func (c *ReviewClient) DeleteOne(r *Review) *ReviewDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReviewClient) DeleteOneID ¶
func (c *ReviewClient) DeleteOneID(id uuid.UUID) *ReviewDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ReviewClient) Query ¶
func (c *ReviewClient) Query() *ReviewQuery
Query returns a query builder for Review.
func (*ReviewClient) QueryRequest ¶
func (c *ReviewClient) QueryRequest(r *Review) *RequestQuery
QueryRequest queries the Request edge of a Review.
func (*ReviewClient) Update ¶
func (c *ReviewClient) Update() *ReviewUpdate
Update returns an update builder for Review.
func (*ReviewClient) UpdateOne ¶
func (c *ReviewClient) UpdateOne(r *Review) *ReviewUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReviewClient) UpdateOneID ¶
func (c *ReviewClient) UpdateOneID(id uuid.UUID) *ReviewUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ReviewClient) Use ¶
func (c *ReviewClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `review.Hooks(f(g(h())))`.
type ReviewCreate ¶
type ReviewCreate struct {
// contains filtered or unexported fields
}
ReviewCreate is the builder for creating a Review entity.
func (*ReviewCreate) Exec ¶
func (rc *ReviewCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewCreate) ExecX ¶
func (rc *ReviewCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewCreate) Mutation ¶
func (rc *ReviewCreate) Mutation() *ReviewMutation
Mutation returns the ReviewMutation object of the builder.
func (*ReviewCreate) Save ¶
func (rc *ReviewCreate) Save(ctx context.Context) (*Review, error)
Save creates the Review in the database.
func (*ReviewCreate) SaveX ¶
func (rc *ReviewCreate) SaveX(ctx context.Context) *Review
SaveX calls Save and panics if Save returns an error.
func (*ReviewCreate) SetCreateTime ¶
func (rc *ReviewCreate) SetCreateTime(t time.Time) *ReviewCreate
SetCreateTime sets the "create_time" field.
func (*ReviewCreate) SetID ¶
func (rc *ReviewCreate) SetID(u uuid.UUID) *ReviewCreate
SetID sets the "id" field.
func (*ReviewCreate) SetNillableCreateTime ¶
func (rc *ReviewCreate) SetNillableCreateTime(t *time.Time) *ReviewCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ReviewCreate) SetNillableID ¶
func (rc *ReviewCreate) SetNillableID(u *uuid.UUID) *ReviewCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ReviewCreate) SetNillableType ¶
func (rc *ReviewCreate) SetNillableType(r *review.Type) *ReviewCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*ReviewCreate) SetNillableUpdateTime ¶
func (rc *ReviewCreate) SetNillableUpdateTime(t *time.Time) *ReviewCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ReviewCreate) SetRequest ¶
func (rc *ReviewCreate) SetRequest(r *Request) *ReviewCreate
SetRequest sets the "Request" edge to the Request entity.
func (*ReviewCreate) SetRequestID ¶
func (rc *ReviewCreate) SetRequestID(id uuid.UUID) *ReviewCreate
SetRequestID sets the "Request" edge to the Request entity by ID.
func (*ReviewCreate) SetStatus ¶
func (rc *ReviewCreate) SetStatus(r review.Status) *ReviewCreate
SetStatus sets the "status" field.
func (*ReviewCreate) SetType ¶
func (rc *ReviewCreate) SetType(r review.Type) *ReviewCreate
SetType sets the "type" field.
func (*ReviewCreate) SetUpdateTime ¶
func (rc *ReviewCreate) SetUpdateTime(t time.Time) *ReviewCreate
SetUpdateTime sets the "update_time" field.
type ReviewCreateBulk ¶
type ReviewCreateBulk struct {
// contains filtered or unexported fields
}
ReviewCreateBulk is the builder for creating many Review entities in bulk.
func (*ReviewCreateBulk) Exec ¶
func (rcb *ReviewCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewCreateBulk) ExecX ¶
func (rcb *ReviewCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReviewDelete ¶
type ReviewDelete struct {
// contains filtered or unexported fields
}
ReviewDelete is the builder for deleting a Review entity.
func (*ReviewDelete) Exec ¶
func (rd *ReviewDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReviewDelete) ExecX ¶
func (rd *ReviewDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReviewDelete) Where ¶
func (rd *ReviewDelete) Where(ps ...predicate.Review) *ReviewDelete
Where appends a list predicates to the ReviewDelete builder.
type ReviewDeleteOne ¶
type ReviewDeleteOne struct {
// contains filtered or unexported fields
}
ReviewDeleteOne is the builder for deleting a single Review entity.
func (*ReviewDeleteOne) Exec ¶
func (rdo *ReviewDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReviewDeleteOne) ExecX ¶
func (rdo *ReviewDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReviewEdges ¶
type ReviewEdges struct { // Request holds the value of the Request edge. Request *Request `json:"Request,omitempty"` // contains filtered or unexported fields }
ReviewEdges holds the relations/edges for other nodes in the graph.
func (ReviewEdges) RequestOrErr ¶
func (e ReviewEdges) RequestOrErr() (*Request, error)
RequestOrErr returns the Request value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ReviewGroupBy ¶
type ReviewGroupBy struct {
// contains filtered or unexported fields
}
ReviewGroupBy is the group-by builder for Review entities.
func (*ReviewGroupBy) Aggregate ¶
func (rgb *ReviewGroupBy) Aggregate(fns ...AggregateFunc) *ReviewGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReviewGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReviewGroupBy) Scan ¶
func (rgb *ReviewGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*ReviewGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReviewMutation ¶
type ReviewMutation struct {
// contains filtered or unexported fields
}
ReviewMutation represents an operation that mutates the Review nodes in the graph.
func (*ReviewMutation) AddField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) AddedEdges ¶
func (m *ReviewMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReviewMutation) AddedField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) AddedFields ¶
func (m *ReviewMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReviewMutation) AddedIDs ¶
func (m *ReviewMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReviewMutation) ClearEdge ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ClearField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ClearRequest ¶
func (m *ReviewMutation) ClearRequest()
ClearRequest clears the "Request" edge to the Request entity.
func (*ReviewMutation) ClearedEdges ¶
func (m *ReviewMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReviewMutation) ClearedFields ¶
func (m *ReviewMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReviewMutation) Client ¶
func (m ReviewMutation) 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 (*ReviewMutation) CreateTime ¶
func (m *ReviewMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ReviewMutation) EdgeCleared ¶
func (m *ReviewMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReviewMutation) Field ¶
func (m *ReviewMutation) 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 (*ReviewMutation) FieldCleared ¶
func (m *ReviewMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReviewMutation) Fields ¶
func (m *ReviewMutation) 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 (*ReviewMutation) GetType ¶
func (m *ReviewMutation) GetType() (r review.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*ReviewMutation) ID ¶
func (m *ReviewMutation) 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 (*ReviewMutation) 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 (*ReviewMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ReviewMutation) 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 (*ReviewMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ReviewMutation) OldType ¶
OldType returns the old "type" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ReviewMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ReviewMutation) RemovedEdges ¶
func (m *ReviewMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReviewMutation) RemovedIDs ¶
func (m *ReviewMutation) 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 (*ReviewMutation) RequestCleared ¶
func (m *ReviewMutation) RequestCleared() bool
RequestCleared reports if the "Request" edge to the Request entity was cleared.
func (*ReviewMutation) RequestID ¶
func (m *ReviewMutation) RequestID() (id uuid.UUID, exists bool)
RequestID returns the "Request" edge ID in the mutation.
func (*ReviewMutation) RequestIDs ¶
func (m *ReviewMutation) RequestIDs() (ids []uuid.UUID)
RequestIDs returns the "Request" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RequestID instead. It exists only for internal usage by the builders.
func (*ReviewMutation) ResetCreateTime ¶
func (m *ReviewMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ReviewMutation) ResetEdge ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ResetField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) ResetRequest ¶
func (m *ReviewMutation) ResetRequest()
ResetRequest resets all changes to the "Request" edge.
func (*ReviewMutation) ResetStatus ¶
func (m *ReviewMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*ReviewMutation) ResetType ¶
func (m *ReviewMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*ReviewMutation) ResetUpdateTime ¶
func (m *ReviewMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ReviewMutation) SetCreateTime ¶
func (m *ReviewMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ReviewMutation) SetField ¶
func (m *ReviewMutation) 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 (*ReviewMutation) SetID ¶
func (m *ReviewMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Review entities.
func (*ReviewMutation) SetRequestID ¶
func (m *ReviewMutation) SetRequestID(id uuid.UUID)
SetRequestID sets the "Request" edge to the Request entity by id.
func (*ReviewMutation) SetStatus ¶
func (m *ReviewMutation) SetStatus(r review.Status)
SetStatus sets the "status" field.
func (*ReviewMutation) SetType ¶
func (m *ReviewMutation) SetType(r review.Type)
SetType sets the "type" field.
func (*ReviewMutation) SetUpdateTime ¶
func (m *ReviewMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ReviewMutation) Status ¶
func (m *ReviewMutation) Status() (r review.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (ReviewMutation) Tx ¶
func (m ReviewMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReviewMutation) Type ¶
func (m *ReviewMutation) Type() string
Type returns the node type of this mutation (Review).
func (*ReviewMutation) UpdateTime ¶
func (m *ReviewMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ReviewMutation) Where ¶
func (m *ReviewMutation) Where(ps ...predicate.Review)
Where appends a list predicates to the ReviewMutation builder.
type ReviewQuery ¶
type ReviewQuery struct {
// contains filtered or unexported fields
}
ReviewQuery is the builder for querying Review entities.
func (*ReviewQuery) All ¶
func (rq *ReviewQuery) All(ctx context.Context) ([]*Review, error)
All executes the query and returns a list of Reviews.
func (*ReviewQuery) AllX ¶
func (rq *ReviewQuery) AllX(ctx context.Context) []*Review
AllX is like All, but panics if an error occurs.
func (*ReviewQuery) Clone ¶
func (rq *ReviewQuery) Clone() *ReviewQuery
Clone returns a duplicate of the ReviewQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReviewQuery) Count ¶
func (rq *ReviewQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReviewQuery) CountX ¶
func (rq *ReviewQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReviewQuery) Exist ¶
func (rq *ReviewQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReviewQuery) ExistX ¶
func (rq *ReviewQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReviewQuery) First ¶
func (rq *ReviewQuery) First(ctx context.Context) (*Review, error)
First returns the first Review entity from the query. Returns a *NotFoundError when no Review was found.
func (*ReviewQuery) FirstID ¶
FirstID returns the first Review ID from the query. Returns a *NotFoundError when no Review ID was found.
func (*ReviewQuery) FirstIDX ¶
func (rq *ReviewQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReviewQuery) FirstX ¶
func (rq *ReviewQuery) FirstX(ctx context.Context) *Review
FirstX is like First, but panics if an error occurs.
func (*ReviewQuery) GroupBy ¶
func (rq *ReviewQuery) GroupBy(field string, fields ...string) *ReviewGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Review.Query(). GroupBy(review.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ReviewQuery) IDsX ¶
func (rq *ReviewQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ReviewQuery) Limit ¶
func (rq *ReviewQuery) Limit(limit int) *ReviewQuery
Limit adds a limit step to the query.
func (*ReviewQuery) Offset ¶
func (rq *ReviewQuery) Offset(offset int) *ReviewQuery
Offset adds an offset step to the query.
func (*ReviewQuery) Only ¶
func (rq *ReviewQuery) Only(ctx context.Context) (*Review, error)
Only returns a single Review entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Review entity is found. Returns a *NotFoundError when no Review entities are found.
func (*ReviewQuery) OnlyID ¶
OnlyID is like Only, but returns the only Review ID in the query. Returns a *NotSingularError when more than one Review ID is found. Returns a *NotFoundError when no entities are found.
func (*ReviewQuery) OnlyIDX ¶
func (rq *ReviewQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReviewQuery) OnlyX ¶
func (rq *ReviewQuery) OnlyX(ctx context.Context) *Review
OnlyX is like Only, but panics if an error occurs.
func (*ReviewQuery) Order ¶
func (rq *ReviewQuery) Order(o ...OrderFunc) *ReviewQuery
Order adds an order step to the query.
func (*ReviewQuery) QueryRequest ¶
func (rq *ReviewQuery) QueryRequest() *RequestQuery
QueryRequest chains the current query on the "Request" edge.
func (*ReviewQuery) Select ¶
func (rq *ReviewQuery) Select(fields ...string) *ReviewSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Review.Query(). Select(review.FieldCreateTime). Scan(ctx, &v)
func (*ReviewQuery) Unique ¶
func (rq *ReviewQuery) Unique(unique bool) *ReviewQuery
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 (*ReviewQuery) Where ¶
func (rq *ReviewQuery) Where(ps ...predicate.Review) *ReviewQuery
Where adds a new predicate for the ReviewQuery builder.
func (*ReviewQuery) WithRequest ¶
func (rq *ReviewQuery) WithRequest(opts ...func(*RequestQuery)) *ReviewQuery
WithRequest tells the query-builder to eager-load the nodes that are connected to the "Request" edge. The optional arguments are used to configure the query builder of the edge.
type ReviewSelect ¶
type ReviewSelect struct { *ReviewQuery // contains filtered or unexported fields }
ReviewSelect is the builder for selecting fields of Review entities.
func (*ReviewSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReviewSelect) Scan ¶
func (rs *ReviewSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReviewSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReviewUpdate ¶
type ReviewUpdate struct {
// contains filtered or unexported fields
}
ReviewUpdate is the builder for updating Review entities.
func (*ReviewUpdate) ClearRequest ¶
func (ru *ReviewUpdate) ClearRequest() *ReviewUpdate
ClearRequest clears the "Request" edge to the Request entity.
func (*ReviewUpdate) Exec ¶
func (ru *ReviewUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReviewUpdate) ExecX ¶
func (ru *ReviewUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewUpdate) Mutation ¶
func (ru *ReviewUpdate) Mutation() *ReviewMutation
Mutation returns the ReviewMutation object of the builder.
func (*ReviewUpdate) Save ¶
func (ru *ReviewUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReviewUpdate) SaveX ¶
func (ru *ReviewUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReviewUpdate) SetNillableType ¶
func (ru *ReviewUpdate) SetNillableType(r *review.Type) *ReviewUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*ReviewUpdate) SetRequest ¶
func (ru *ReviewUpdate) SetRequest(r *Request) *ReviewUpdate
SetRequest sets the "Request" edge to the Request entity.
func (*ReviewUpdate) SetRequestID ¶
func (ru *ReviewUpdate) SetRequestID(id uuid.UUID) *ReviewUpdate
SetRequestID sets the "Request" edge to the Request entity by ID.
func (*ReviewUpdate) SetStatus ¶
func (ru *ReviewUpdate) SetStatus(r review.Status) *ReviewUpdate
SetStatus sets the "status" field.
func (*ReviewUpdate) SetType ¶
func (ru *ReviewUpdate) SetType(r review.Type) *ReviewUpdate
SetType sets the "type" field.
func (*ReviewUpdate) SetUpdateTime ¶
func (ru *ReviewUpdate) SetUpdateTime(t time.Time) *ReviewUpdate
SetUpdateTime sets the "update_time" field.
func (*ReviewUpdate) Where ¶
func (ru *ReviewUpdate) Where(ps ...predicate.Review) *ReviewUpdate
Where appends a list predicates to the ReviewUpdate builder.
type ReviewUpdateOne ¶
type ReviewUpdateOne struct {
// contains filtered or unexported fields
}
ReviewUpdateOne is the builder for updating a single Review entity.
func (*ReviewUpdateOne) ClearRequest ¶
func (ruo *ReviewUpdateOne) ClearRequest() *ReviewUpdateOne
ClearRequest clears the "Request" edge to the Request entity.
func (*ReviewUpdateOne) Exec ¶
func (ruo *ReviewUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReviewUpdateOne) ExecX ¶
func (ruo *ReviewUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReviewUpdateOne) Mutation ¶
func (ruo *ReviewUpdateOne) Mutation() *ReviewMutation
Mutation returns the ReviewMutation object of the builder.
func (*ReviewUpdateOne) Save ¶
func (ruo *ReviewUpdateOne) Save(ctx context.Context) (*Review, error)
Save executes the query and returns the updated Review entity.
func (*ReviewUpdateOne) SaveX ¶
func (ruo *ReviewUpdateOne) SaveX(ctx context.Context) *Review
SaveX is like Save, but panics if an error occurs.
func (*ReviewUpdateOne) Select ¶
func (ruo *ReviewUpdateOne) Select(field string, fields ...string) *ReviewUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReviewUpdateOne) SetNillableType ¶
func (ruo *ReviewUpdateOne) SetNillableType(r *review.Type) *ReviewUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*ReviewUpdateOne) SetRequest ¶
func (ruo *ReviewUpdateOne) SetRequest(r *Request) *ReviewUpdateOne
SetRequest sets the "Request" edge to the Request entity.
func (*ReviewUpdateOne) SetRequestID ¶
func (ruo *ReviewUpdateOne) SetRequestID(id uuid.UUID) *ReviewUpdateOne
SetRequestID sets the "Request" edge to the Request entity by ID.
func (*ReviewUpdateOne) SetStatus ¶
func (ruo *ReviewUpdateOne) SetStatus(r review.Status) *ReviewUpdateOne
SetStatus sets the "status" field.
func (*ReviewUpdateOne) SetType ¶
func (ruo *ReviewUpdateOne) SetType(r review.Type) *ReviewUpdateOne
SetType sets the "type" field.
func (*ReviewUpdateOne) SetUpdateTime ¶
func (ruo *ReviewUpdateOne) SetUpdateTime(t time.Time) *ReviewUpdateOne
SetUpdateTime sets the "update_time" field.
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 Service ¶
type Service struct { // ID of the ent. ID uuid.UUID `json:"id,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"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ServiceQuery when eager-loading is set. Edges ServiceEdges `json:"edges"` // contains filtered or unexported fields }
Service is the model entity for the Service schema.
func (*Service) QueryRequests ¶
func (s *Service) QueryRequests() *RequestQuery
QueryRequests queries the "Requests" edge of the Service entity.
func (*Service) Unwrap ¶
Unwrap unwraps the Service 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 (*Service) Update ¶
func (s *Service) Update() *ServiceUpdateOne
Update returns a builder for updating this Service. Note that you need to call Service.Unwrap() before calling this method if this Service was returned from a transaction, and the transaction was committed or rolled back.
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
ServiceClient is a client for the Service schema.
func NewServiceClient ¶
func NewServiceClient(c config) *ServiceClient
NewServiceClient returns a client for the Service from the given config.
func (*ServiceClient) Create ¶
func (c *ServiceClient) Create() *ServiceCreate
Create returns a builder for creating a Service entity.
func (*ServiceClient) CreateBulk ¶
func (c *ServiceClient) CreateBulk(builders ...*ServiceCreate) *ServiceCreateBulk
CreateBulk returns a builder for creating a bulk of Service entities.
func (*ServiceClient) Delete ¶
func (c *ServiceClient) Delete() *ServiceDelete
Delete returns a delete builder for Service.
func (*ServiceClient) DeleteOne ¶
func (c *ServiceClient) DeleteOne(s *Service) *ServiceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ServiceClient) DeleteOneID ¶
func (c *ServiceClient) DeleteOneID(id uuid.UUID) *ServiceDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*ServiceClient) Hooks ¶
func (c *ServiceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ServiceClient) Query ¶
func (c *ServiceClient) Query() *ServiceQuery
Query returns a query builder for Service.
func (*ServiceClient) QueryRequests ¶
func (c *ServiceClient) QueryRequests(s *Service) *RequestQuery
QueryRequests queries the Requests edge of a Service.
func (*ServiceClient) Update ¶
func (c *ServiceClient) Update() *ServiceUpdate
Update returns an update builder for Service.
func (*ServiceClient) UpdateOne ¶
func (c *ServiceClient) UpdateOne(s *Service) *ServiceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ServiceClient) UpdateOneID ¶
func (c *ServiceClient) UpdateOneID(id uuid.UUID) *ServiceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ServiceClient) Use ¶
func (c *ServiceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `service.Hooks(f(g(h())))`.
type ServiceCreate ¶
type ServiceCreate struct {
// contains filtered or unexported fields
}
ServiceCreate is the builder for creating a Service entity.
func (*ServiceCreate) AddRequestIDs ¶
func (sc *ServiceCreate) AddRequestIDs(ids ...uuid.UUID) *ServiceCreate
AddRequestIDs adds the "Requests" edge to the Request entity by IDs.
func (*ServiceCreate) AddRequests ¶
func (sc *ServiceCreate) AddRequests(r ...*Request) *ServiceCreate
AddRequests adds the "Requests" edges to the Request entity.
func (*ServiceCreate) Exec ¶
func (sc *ServiceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ServiceCreate) ExecX ¶
func (sc *ServiceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServiceCreate) Mutation ¶
func (sc *ServiceCreate) Mutation() *ServiceMutation
Mutation returns the ServiceMutation object of the builder.
func (*ServiceCreate) Save ¶
func (sc *ServiceCreate) Save(ctx context.Context) (*Service, error)
Save creates the Service in the database.
func (*ServiceCreate) SaveX ¶
func (sc *ServiceCreate) SaveX(ctx context.Context) *Service
SaveX calls Save and panics if Save returns an error.
func (*ServiceCreate) SetCreateTime ¶
func (sc *ServiceCreate) SetCreateTime(t time.Time) *ServiceCreate
SetCreateTime sets the "create_time" field.
func (*ServiceCreate) SetID ¶
func (sc *ServiceCreate) SetID(u uuid.UUID) *ServiceCreate
SetID sets the "id" field.
func (*ServiceCreate) SetName ¶
func (sc *ServiceCreate) SetName(s string) *ServiceCreate
SetName sets the "name" field.
func (*ServiceCreate) SetNillableCreateTime ¶
func (sc *ServiceCreate) SetNillableCreateTime(t *time.Time) *ServiceCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ServiceCreate) SetNillableID ¶
func (sc *ServiceCreate) SetNillableID(u *uuid.UUID) *ServiceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ServiceCreate) SetNillableUpdateTime ¶
func (sc *ServiceCreate) SetNillableUpdateTime(t *time.Time) *ServiceCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ServiceCreate) SetUpdateTime ¶
func (sc *ServiceCreate) SetUpdateTime(t time.Time) *ServiceCreate
SetUpdateTime sets the "update_time" field.
type ServiceCreateBulk ¶
type ServiceCreateBulk struct {
// contains filtered or unexported fields
}
ServiceCreateBulk is the builder for creating many Service entities in bulk.
func (*ServiceCreateBulk) Exec ¶
func (scb *ServiceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ServiceCreateBulk) ExecX ¶
func (scb *ServiceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ServiceDelete ¶
type ServiceDelete struct {
// contains filtered or unexported fields
}
ServiceDelete is the builder for deleting a Service entity.
func (*ServiceDelete) Exec ¶
func (sd *ServiceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ServiceDelete) ExecX ¶
func (sd *ServiceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ServiceDelete) Where ¶
func (sd *ServiceDelete) Where(ps ...predicate.Service) *ServiceDelete
Where appends a list predicates to the ServiceDelete builder.
type ServiceDeleteOne ¶
type ServiceDeleteOne struct {
// contains filtered or unexported fields
}
ServiceDeleteOne is the builder for deleting a single Service entity.
func (*ServiceDeleteOne) Exec ¶
func (sdo *ServiceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ServiceDeleteOne) ExecX ¶
func (sdo *ServiceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ServiceEdges ¶
type ServiceEdges struct { // Requests holds the value of the Requests edge. Requests []*Request `json:"Requests,omitempty"` // contains filtered or unexported fields }
ServiceEdges holds the relations/edges for other nodes in the graph.
func (ServiceEdges) RequestsOrErr ¶
func (e ServiceEdges) RequestsOrErr() ([]*Request, error)
RequestsOrErr returns the Requests value or an error if the edge was not loaded in eager-loading.
type ServiceGroupBy ¶
type ServiceGroupBy struct {
// contains filtered or unexported fields
}
ServiceGroupBy is the group-by builder for Service entities.
func (*ServiceGroupBy) Aggregate ¶
func (sgb *ServiceGroupBy) Aggregate(fns ...AggregateFunc) *ServiceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ServiceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ServiceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ServiceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ServiceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ServiceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ServiceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ServiceGroupBy) Scan ¶
func (sgb *ServiceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*ServiceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ServiceMutation ¶
type ServiceMutation struct {
// contains filtered or unexported fields
}
ServiceMutation represents an operation that mutates the Service nodes in the graph.
func (*ServiceMutation) AddField ¶
func (m *ServiceMutation) 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 (*ServiceMutation) AddRequestIDs ¶
func (m *ServiceMutation) AddRequestIDs(ids ...uuid.UUID)
AddRequestIDs adds the "Requests" edge to the Request entity by ids.
func (*ServiceMutation) AddedEdges ¶
func (m *ServiceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ServiceMutation) AddedField ¶
func (m *ServiceMutation) 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 (*ServiceMutation) AddedFields ¶
func (m *ServiceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ServiceMutation) AddedIDs ¶
func (m *ServiceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ServiceMutation) ClearEdge ¶
func (m *ServiceMutation) 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 (*ServiceMutation) ClearField ¶
func (m *ServiceMutation) 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 (*ServiceMutation) ClearRequests ¶
func (m *ServiceMutation) ClearRequests()
ClearRequests clears the "Requests" edge to the Request entity.
func (*ServiceMutation) ClearedEdges ¶
func (m *ServiceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ServiceMutation) ClearedFields ¶
func (m *ServiceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ServiceMutation) Client ¶
func (m ServiceMutation) 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 (*ServiceMutation) CreateTime ¶
func (m *ServiceMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ServiceMutation) EdgeCleared ¶
func (m *ServiceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ServiceMutation) Field ¶
func (m *ServiceMutation) 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 (*ServiceMutation) FieldCleared ¶
func (m *ServiceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ServiceMutation) Fields ¶
func (m *ServiceMutation) 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 (*ServiceMutation) ID ¶
func (m *ServiceMutation) 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 (*ServiceMutation) 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 (*ServiceMutation) Name ¶
func (m *ServiceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ServiceMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Service entity. If the Service object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ServiceMutation) 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 (*ServiceMutation) OldName ¶
func (m *ServiceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Service entity. If the Service object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ServiceMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Service entity. If the Service object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ServiceMutation) RemoveRequestIDs ¶
func (m *ServiceMutation) RemoveRequestIDs(ids ...uuid.UUID)
RemoveRequestIDs removes the "Requests" edge to the Request entity by IDs.
func (*ServiceMutation) RemovedEdges ¶
func (m *ServiceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ServiceMutation) RemovedIDs ¶
func (m *ServiceMutation) 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 (*ServiceMutation) RemovedRequestsIDs ¶
func (m *ServiceMutation) RemovedRequestsIDs() (ids []uuid.UUID)
RemovedRequests returns the removed IDs of the "Requests" edge to the Request entity.
func (*ServiceMutation) RequestsCleared ¶
func (m *ServiceMutation) RequestsCleared() bool
RequestsCleared reports if the "Requests" edge to the Request entity was cleared.
func (*ServiceMutation) RequestsIDs ¶
func (m *ServiceMutation) RequestsIDs() (ids []uuid.UUID)
RequestsIDs returns the "Requests" edge IDs in the mutation.
func (*ServiceMutation) ResetCreateTime ¶
func (m *ServiceMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ServiceMutation) ResetEdge ¶
func (m *ServiceMutation) 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 (*ServiceMutation) ResetField ¶
func (m *ServiceMutation) 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 (*ServiceMutation) ResetName ¶
func (m *ServiceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ServiceMutation) ResetRequests ¶
func (m *ServiceMutation) ResetRequests()
ResetRequests resets all changes to the "Requests" edge.
func (*ServiceMutation) ResetUpdateTime ¶
func (m *ServiceMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ServiceMutation) SetCreateTime ¶
func (m *ServiceMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ServiceMutation) SetField ¶
func (m *ServiceMutation) 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 (*ServiceMutation) SetID ¶
func (m *ServiceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Service entities.
func (*ServiceMutation) SetName ¶
func (m *ServiceMutation) SetName(s string)
SetName sets the "name" field.
func (*ServiceMutation) SetUpdateTime ¶
func (m *ServiceMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (ServiceMutation) Tx ¶
func (m ServiceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ServiceMutation) Type ¶
func (m *ServiceMutation) Type() string
Type returns the node type of this mutation (Service).
func (*ServiceMutation) UpdateTime ¶
func (m *ServiceMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ServiceMutation) Where ¶
func (m *ServiceMutation) Where(ps ...predicate.Service)
Where appends a list predicates to the ServiceMutation builder.
type ServiceQuery ¶
type ServiceQuery struct {
// contains filtered or unexported fields
}
ServiceQuery is the builder for querying Service entities.
func (*ServiceQuery) All ¶
func (sq *ServiceQuery) All(ctx context.Context) ([]*Service, error)
All executes the query and returns a list of Services.
func (*ServiceQuery) AllX ¶
func (sq *ServiceQuery) AllX(ctx context.Context) []*Service
AllX is like All, but panics if an error occurs.
func (*ServiceQuery) Clone ¶
func (sq *ServiceQuery) Clone() *ServiceQuery
Clone returns a duplicate of the ServiceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ServiceQuery) Count ¶
func (sq *ServiceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ServiceQuery) CountX ¶
func (sq *ServiceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ServiceQuery) Exist ¶
func (sq *ServiceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ServiceQuery) ExistX ¶
func (sq *ServiceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ServiceQuery) First ¶
func (sq *ServiceQuery) First(ctx context.Context) (*Service, error)
First returns the first Service entity from the query. Returns a *NotFoundError when no Service was found.
func (*ServiceQuery) FirstID ¶
FirstID returns the first Service ID from the query. Returns a *NotFoundError when no Service ID was found.
func (*ServiceQuery) FirstIDX ¶
func (sq *ServiceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ServiceQuery) FirstX ¶
func (sq *ServiceQuery) FirstX(ctx context.Context) *Service
FirstX is like First, but panics if an error occurs.
func (*ServiceQuery) GroupBy ¶
func (sq *ServiceQuery) GroupBy(field string, fields ...string) *ServiceGroupBy
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 { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Service.Query(). GroupBy(service.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ServiceQuery) IDsX ¶
func (sq *ServiceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ServiceQuery) Limit ¶
func (sq *ServiceQuery) Limit(limit int) *ServiceQuery
Limit adds a limit step to the query.
func (*ServiceQuery) Offset ¶
func (sq *ServiceQuery) Offset(offset int) *ServiceQuery
Offset adds an offset step to the query.
func (*ServiceQuery) Only ¶
func (sq *ServiceQuery) Only(ctx context.Context) (*Service, error)
Only returns a single Service entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Service entity is found. Returns a *NotFoundError when no Service entities are found.
func (*ServiceQuery) OnlyID ¶
OnlyID is like Only, but returns the only Service ID in the query. Returns a *NotSingularError when more than one Service ID is found. Returns a *NotFoundError when no entities are found.
func (*ServiceQuery) OnlyIDX ¶
func (sq *ServiceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ServiceQuery) OnlyX ¶
func (sq *ServiceQuery) OnlyX(ctx context.Context) *Service
OnlyX is like Only, but panics if an error occurs.
func (*ServiceQuery) Order ¶
func (sq *ServiceQuery) Order(o ...OrderFunc) *ServiceQuery
Order adds an order step to the query.
func (*ServiceQuery) QueryRequests ¶
func (sq *ServiceQuery) QueryRequests() *RequestQuery
QueryRequests chains the current query on the "Requests" edge.
func (*ServiceQuery) Select ¶
func (sq *ServiceQuery) Select(fields ...string) *ServiceSelect
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 { CreateTime time.Time `json:"create_time,omitempty"` } client.Service.Query(). Select(service.FieldCreateTime). Scan(ctx, &v)
func (*ServiceQuery) Unique ¶
func (sq *ServiceQuery) Unique(unique bool) *ServiceQuery
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 (*ServiceQuery) Where ¶
func (sq *ServiceQuery) Where(ps ...predicate.Service) *ServiceQuery
Where adds a new predicate for the ServiceQuery builder.
func (*ServiceQuery) WithRequests ¶
func (sq *ServiceQuery) WithRequests(opts ...func(*RequestQuery)) *ServiceQuery
WithRequests tells the query-builder to eager-load the nodes that are connected to the "Requests" edge. The optional arguments are used to configure the query builder of the edge.
type ServiceSelect ¶
type ServiceSelect struct { *ServiceQuery // contains filtered or unexported fields }
ServiceSelect is the builder for selecting fields of Service entities.
func (*ServiceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ServiceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ServiceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ServiceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ServiceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ServiceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ServiceSelect) Scan ¶
func (ss *ServiceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ServiceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ServiceUpdate ¶
type ServiceUpdate struct {
// contains filtered or unexported fields
}
ServiceUpdate is the builder for updating Service entities.
func (*ServiceUpdate) AddRequestIDs ¶
func (su *ServiceUpdate) AddRequestIDs(ids ...uuid.UUID) *ServiceUpdate
AddRequestIDs adds the "Requests" edge to the Request entity by IDs.
func (*ServiceUpdate) AddRequests ¶
func (su *ServiceUpdate) AddRequests(r ...*Request) *ServiceUpdate
AddRequests adds the "Requests" edges to the Request entity.
func (*ServiceUpdate) ClearRequests ¶
func (su *ServiceUpdate) ClearRequests() *ServiceUpdate
ClearRequests clears all "Requests" edges to the Request entity.
func (*ServiceUpdate) Exec ¶
func (su *ServiceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ServiceUpdate) ExecX ¶
func (su *ServiceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServiceUpdate) Mutation ¶
func (su *ServiceUpdate) Mutation() *ServiceMutation
Mutation returns the ServiceMutation object of the builder.
func (*ServiceUpdate) RemoveRequestIDs ¶
func (su *ServiceUpdate) RemoveRequestIDs(ids ...uuid.UUID) *ServiceUpdate
RemoveRequestIDs removes the "Requests" edge to Request entities by IDs.
func (*ServiceUpdate) RemoveRequests ¶
func (su *ServiceUpdate) RemoveRequests(r ...*Request) *ServiceUpdate
RemoveRequests removes "Requests" edges to Request entities.
func (*ServiceUpdate) Save ¶
func (su *ServiceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ServiceUpdate) SaveX ¶
func (su *ServiceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ServiceUpdate) SetName ¶
func (su *ServiceUpdate) SetName(s string) *ServiceUpdate
SetName sets the "name" field.
func (*ServiceUpdate) SetUpdateTime ¶
func (su *ServiceUpdate) SetUpdateTime(t time.Time) *ServiceUpdate
SetUpdateTime sets the "update_time" field.
func (*ServiceUpdate) Where ¶
func (su *ServiceUpdate) Where(ps ...predicate.Service) *ServiceUpdate
Where appends a list predicates to the ServiceUpdate builder.
type ServiceUpdateOne ¶
type ServiceUpdateOne struct {
// contains filtered or unexported fields
}
ServiceUpdateOne is the builder for updating a single Service entity.
func (*ServiceUpdateOne) AddRequestIDs ¶
func (suo *ServiceUpdateOne) AddRequestIDs(ids ...uuid.UUID) *ServiceUpdateOne
AddRequestIDs adds the "Requests" edge to the Request entity by IDs.
func (*ServiceUpdateOne) AddRequests ¶
func (suo *ServiceUpdateOne) AddRequests(r ...*Request) *ServiceUpdateOne
AddRequests adds the "Requests" edges to the Request entity.
func (*ServiceUpdateOne) ClearRequests ¶
func (suo *ServiceUpdateOne) ClearRequests() *ServiceUpdateOne
ClearRequests clears all "Requests" edges to the Request entity.
func (*ServiceUpdateOne) Exec ¶
func (suo *ServiceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ServiceUpdateOne) ExecX ¶
func (suo *ServiceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ServiceUpdateOne) Mutation ¶
func (suo *ServiceUpdateOne) Mutation() *ServiceMutation
Mutation returns the ServiceMutation object of the builder.
func (*ServiceUpdateOne) RemoveRequestIDs ¶
func (suo *ServiceUpdateOne) RemoveRequestIDs(ids ...uuid.UUID) *ServiceUpdateOne
RemoveRequestIDs removes the "Requests" edge to Request entities by IDs.
func (*ServiceUpdateOne) RemoveRequests ¶
func (suo *ServiceUpdateOne) RemoveRequests(r ...*Request) *ServiceUpdateOne
RemoveRequests removes "Requests" edges to Request entities.
func (*ServiceUpdateOne) Save ¶
func (suo *ServiceUpdateOne) Save(ctx context.Context) (*Service, error)
Save executes the query and returns the updated Service entity.
func (*ServiceUpdateOne) SaveX ¶
func (suo *ServiceUpdateOne) SaveX(ctx context.Context) *Service
SaveX is like Save, but panics if an error occurs.
func (*ServiceUpdateOne) Select ¶
func (suo *ServiceUpdateOne) Select(field string, fields ...string) *ServiceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ServiceUpdateOne) SetName ¶
func (suo *ServiceUpdateOne) SetName(s string) *ServiceUpdateOne
SetName sets the "name" field.
func (*ServiceUpdateOne) SetUpdateTime ¶
func (suo *ServiceUpdateOne) SetUpdateTime(t time.Time) *ServiceUpdateOne
SetUpdateTime sets the "update_time" field.
type Tx ¶
type Tx struct { // Project is the client for interacting with the Project builders. Project *ProjectClient // Request is the client for interacting with the Request builders. Request *RequestClient // Review is the client for interacting with the Review builders. Review *ReviewClient // Service is the client for interacting with the Service builders. Service *ServiceClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- mutation.go
- project.go
- project_create.go
- project_delete.go
- project_query.go
- project_update.go
- request.go
- request_create.go
- request_delete.go
- request_query.go
- request_update.go
- review.go
- review_create.go
- review_delete.go
- review_query.go
- review_update.go
- runtime.go
- service.go
- service_create.go
- service_delete.go
- service_query.go
- service_update.go
- tx.go