Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CodeSourceFile
- type CodeSourceFileClient
- func (c *CodeSourceFileClient) Create() *CodeSourceFileCreate
- func (c *CodeSourceFileClient) CreateBulk(builders ...*CodeSourceFileCreate) *CodeSourceFileCreateBulk
- func (c *CodeSourceFileClient) Delete() *CodeSourceFileDelete
- func (c *CodeSourceFileClient) DeleteOne(csf *CodeSourceFile) *CodeSourceFileDeleteOne
- func (c *CodeSourceFileClient) DeleteOneID(id int) *CodeSourceFileDeleteOne
- func (c *CodeSourceFileClient) Get(ctx context.Context, id int) (*CodeSourceFile, error)
- func (c *CodeSourceFileClient) GetX(ctx context.Context, id int) *CodeSourceFile
- func (c *CodeSourceFileClient) Hooks() []Hook
- func (c *CodeSourceFileClient) Intercept(interceptors ...Interceptor)
- func (c *CodeSourceFileClient) Interceptors() []Interceptor
- func (c *CodeSourceFileClient) MapCreateBulk(slice any, setFunc func(*CodeSourceFileCreate, int)) *CodeSourceFileCreateBulk
- func (c *CodeSourceFileClient) Query() *CodeSourceFileQuery
- func (c *CodeSourceFileClient) QueryDepsUsageEvidences(csf *CodeSourceFile) *DepsUsageEvidenceQuery
- func (c *CodeSourceFileClient) Update() *CodeSourceFileUpdate
- func (c *CodeSourceFileClient) UpdateOne(csf *CodeSourceFile) *CodeSourceFileUpdateOne
- func (c *CodeSourceFileClient) UpdateOneID(id int) *CodeSourceFileUpdateOne
- func (c *CodeSourceFileClient) Use(hooks ...Hook)
- type CodeSourceFileCreate
- func (csfc *CodeSourceFileCreate) AddDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileCreate
- func (csfc *CodeSourceFileCreate) AddDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileCreate
- func (csfc *CodeSourceFileCreate) Exec(ctx context.Context) error
- func (csfc *CodeSourceFileCreate) ExecX(ctx context.Context)
- func (csfc *CodeSourceFileCreate) Mutation() *CodeSourceFileMutation
- func (csfc *CodeSourceFileCreate) Save(ctx context.Context) (*CodeSourceFile, error)
- func (csfc *CodeSourceFileCreate) SaveX(ctx context.Context) *CodeSourceFile
- func (csfc *CodeSourceFileCreate) SetPath(s string) *CodeSourceFileCreate
- type CodeSourceFileCreateBulk
- func (csfcb *CodeSourceFileCreateBulk) Exec(ctx context.Context) error
- func (csfcb *CodeSourceFileCreateBulk) ExecX(ctx context.Context)
- func (csfcb *CodeSourceFileCreateBulk) Save(ctx context.Context) ([]*CodeSourceFile, error)
- func (csfcb *CodeSourceFileCreateBulk) SaveX(ctx context.Context) []*CodeSourceFile
- type CodeSourceFileDelete
- type CodeSourceFileDeleteOne
- type CodeSourceFileEdges
- type CodeSourceFileGroupBy
- func (csfgb *CodeSourceFileGroupBy) Aggregate(fns ...AggregateFunc) *CodeSourceFileGroupBy
- func (s *CodeSourceFileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CodeSourceFileGroupBy) BoolX(ctx context.Context) bool
- func (s *CodeSourceFileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CodeSourceFileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CodeSourceFileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CodeSourceFileGroupBy) Float64X(ctx context.Context) float64
- func (s *CodeSourceFileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CodeSourceFileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CodeSourceFileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CodeSourceFileGroupBy) IntX(ctx context.Context) int
- func (s *CodeSourceFileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CodeSourceFileGroupBy) IntsX(ctx context.Context) []int
- func (csfgb *CodeSourceFileGroupBy) Scan(ctx context.Context, v any) error
- func (s *CodeSourceFileGroupBy) ScanX(ctx context.Context, v any)
- func (s *CodeSourceFileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CodeSourceFileGroupBy) StringX(ctx context.Context) string
- func (s *CodeSourceFileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CodeSourceFileGroupBy) StringsX(ctx context.Context) []string
- type CodeSourceFileMutation
- func (m *CodeSourceFileMutation) AddDepsUsageEvidenceIDs(ids ...int)
- func (m *CodeSourceFileMutation) AddField(name string, value ent.Value) error
- func (m *CodeSourceFileMutation) AddedEdges() []string
- func (m *CodeSourceFileMutation) AddedField(name string) (ent.Value, bool)
- func (m *CodeSourceFileMutation) AddedFields() []string
- func (m *CodeSourceFileMutation) AddedIDs(name string) []ent.Value
- func (m *CodeSourceFileMutation) ClearDepsUsageEvidences()
- func (m *CodeSourceFileMutation) ClearEdge(name string) error
- func (m *CodeSourceFileMutation) ClearField(name string) error
- func (m *CodeSourceFileMutation) ClearedEdges() []string
- func (m *CodeSourceFileMutation) ClearedFields() []string
- func (m CodeSourceFileMutation) Client() *Client
- func (m *CodeSourceFileMutation) DepsUsageEvidencesCleared() bool
- func (m *CodeSourceFileMutation) DepsUsageEvidencesIDs() (ids []int)
- func (m *CodeSourceFileMutation) EdgeCleared(name string) bool
- func (m *CodeSourceFileMutation) Field(name string) (ent.Value, bool)
- func (m *CodeSourceFileMutation) FieldCleared(name string) bool
- func (m *CodeSourceFileMutation) Fields() []string
- func (m *CodeSourceFileMutation) ID() (id int, exists bool)
- func (m *CodeSourceFileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CodeSourceFileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CodeSourceFileMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *CodeSourceFileMutation) Op() Op
- func (m *CodeSourceFileMutation) Path() (r string, exists bool)
- func (m *CodeSourceFileMutation) RemoveDepsUsageEvidenceIDs(ids ...int)
- func (m *CodeSourceFileMutation) RemovedDepsUsageEvidencesIDs() (ids []int)
- func (m *CodeSourceFileMutation) RemovedEdges() []string
- func (m *CodeSourceFileMutation) RemovedIDs(name string) []ent.Value
- func (m *CodeSourceFileMutation) ResetDepsUsageEvidences()
- func (m *CodeSourceFileMutation) ResetEdge(name string) error
- func (m *CodeSourceFileMutation) ResetField(name string) error
- func (m *CodeSourceFileMutation) ResetPath()
- func (m *CodeSourceFileMutation) SetField(name string, value ent.Value) error
- func (m *CodeSourceFileMutation) SetOp(op Op)
- func (m *CodeSourceFileMutation) SetPath(s string)
- func (m CodeSourceFileMutation) Tx() (*Tx, error)
- func (m *CodeSourceFileMutation) Type() string
- func (m *CodeSourceFileMutation) Where(ps ...predicate.CodeSourceFile)
- func (m *CodeSourceFileMutation) WhereP(ps ...func(*sql.Selector))
- type CodeSourceFileQuery
- func (csfq *CodeSourceFileQuery) Aggregate(fns ...AggregateFunc) *CodeSourceFileSelect
- func (csfq *CodeSourceFileQuery) All(ctx context.Context) ([]*CodeSourceFile, error)
- func (csfq *CodeSourceFileQuery) AllX(ctx context.Context) []*CodeSourceFile
- func (csfq *CodeSourceFileQuery) Clone() *CodeSourceFileQuery
- func (csfq *CodeSourceFileQuery) Count(ctx context.Context) (int, error)
- func (csfq *CodeSourceFileQuery) CountX(ctx context.Context) int
- func (csfq *CodeSourceFileQuery) Exist(ctx context.Context) (bool, error)
- func (csfq *CodeSourceFileQuery) ExistX(ctx context.Context) bool
- func (csfq *CodeSourceFileQuery) First(ctx context.Context) (*CodeSourceFile, error)
- func (csfq *CodeSourceFileQuery) FirstID(ctx context.Context) (id int, err error)
- func (csfq *CodeSourceFileQuery) FirstIDX(ctx context.Context) int
- func (csfq *CodeSourceFileQuery) FirstX(ctx context.Context) *CodeSourceFile
- func (csfq *CodeSourceFileQuery) GroupBy(field string, fields ...string) *CodeSourceFileGroupBy
- func (csfq *CodeSourceFileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (csfq *CodeSourceFileQuery) IDsX(ctx context.Context) []int
- func (csfq *CodeSourceFileQuery) Limit(limit int) *CodeSourceFileQuery
- func (csfq *CodeSourceFileQuery) Offset(offset int) *CodeSourceFileQuery
- func (csfq *CodeSourceFileQuery) Only(ctx context.Context) (*CodeSourceFile, error)
- func (csfq *CodeSourceFileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (csfq *CodeSourceFileQuery) OnlyIDX(ctx context.Context) int
- func (csfq *CodeSourceFileQuery) OnlyX(ctx context.Context) *CodeSourceFile
- func (csfq *CodeSourceFileQuery) Order(o ...codesourcefile.OrderOption) *CodeSourceFileQuery
- func (csfq *CodeSourceFileQuery) QueryDepsUsageEvidences() *DepsUsageEvidenceQuery
- func (csfq *CodeSourceFileQuery) Select(fields ...string) *CodeSourceFileSelect
- func (csfq *CodeSourceFileQuery) Unique(unique bool) *CodeSourceFileQuery
- func (csfq *CodeSourceFileQuery) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileQuery
- func (csfq *CodeSourceFileQuery) WithDepsUsageEvidences(opts ...func(*DepsUsageEvidenceQuery)) *CodeSourceFileQuery
- type CodeSourceFileSelect
- func (csfs *CodeSourceFileSelect) Aggregate(fns ...AggregateFunc) *CodeSourceFileSelect
- func (s *CodeSourceFileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CodeSourceFileSelect) BoolX(ctx context.Context) bool
- func (s *CodeSourceFileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CodeSourceFileSelect) BoolsX(ctx context.Context) []bool
- func (s *CodeSourceFileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CodeSourceFileSelect) Float64X(ctx context.Context) float64
- func (s *CodeSourceFileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CodeSourceFileSelect) Float64sX(ctx context.Context) []float64
- func (s *CodeSourceFileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CodeSourceFileSelect) IntX(ctx context.Context) int
- func (s *CodeSourceFileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CodeSourceFileSelect) IntsX(ctx context.Context) []int
- func (csfs *CodeSourceFileSelect) Scan(ctx context.Context, v any) error
- func (s *CodeSourceFileSelect) ScanX(ctx context.Context, v any)
- func (s *CodeSourceFileSelect) String(ctx context.Context) (_ string, err error)
- func (s *CodeSourceFileSelect) StringX(ctx context.Context) string
- func (s *CodeSourceFileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CodeSourceFileSelect) StringsX(ctx context.Context) []string
- type CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) AddDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) AddDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) ClearDepsUsageEvidences() *CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) Exec(ctx context.Context) error
- func (csfu *CodeSourceFileUpdate) ExecX(ctx context.Context)
- func (csfu *CodeSourceFileUpdate) Mutation() *CodeSourceFileMutation
- func (csfu *CodeSourceFileUpdate) RemoveDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) RemoveDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) Save(ctx context.Context) (int, error)
- func (csfu *CodeSourceFileUpdate) SaveX(ctx context.Context) int
- func (csfu *CodeSourceFileUpdate) SetNillablePath(s *string) *CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) SetPath(s string) *CodeSourceFileUpdate
- func (csfu *CodeSourceFileUpdate) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileUpdate
- type CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) AddDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) AddDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) ClearDepsUsageEvidences() *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) Exec(ctx context.Context) error
- func (csfuo *CodeSourceFileUpdateOne) ExecX(ctx context.Context)
- func (csfuo *CodeSourceFileUpdateOne) Mutation() *CodeSourceFileMutation
- func (csfuo *CodeSourceFileUpdateOne) RemoveDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) RemoveDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) Save(ctx context.Context) (*CodeSourceFile, error)
- func (csfuo *CodeSourceFileUpdateOne) SaveX(ctx context.Context) *CodeSourceFile
- func (csfuo *CodeSourceFileUpdateOne) Select(field string, fields ...string) *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) SetNillablePath(s *string) *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) SetPath(s string) *CodeSourceFileUpdateOne
- func (csfuo *CodeSourceFileUpdateOne) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileUpdateOne
- type CodeSourceFiles
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type DepsUsageEvidence
- func (due *DepsUsageEvidence) QueryUsedIn() *CodeSourceFileQuery
- func (due *DepsUsageEvidence) String() string
- func (due *DepsUsageEvidence) Unwrap() *DepsUsageEvidence
- func (due *DepsUsageEvidence) Update() *DepsUsageEvidenceUpdateOne
- func (due *DepsUsageEvidence) Value(name string) (ent.Value, error)
- type DepsUsageEvidenceClient
- func (c *DepsUsageEvidenceClient) Create() *DepsUsageEvidenceCreate
- func (c *DepsUsageEvidenceClient) CreateBulk(builders ...*DepsUsageEvidenceCreate) *DepsUsageEvidenceCreateBulk
- func (c *DepsUsageEvidenceClient) Delete() *DepsUsageEvidenceDelete
- func (c *DepsUsageEvidenceClient) DeleteOne(due *DepsUsageEvidence) *DepsUsageEvidenceDeleteOne
- func (c *DepsUsageEvidenceClient) DeleteOneID(id int) *DepsUsageEvidenceDeleteOne
- func (c *DepsUsageEvidenceClient) Get(ctx context.Context, id int) (*DepsUsageEvidence, error)
- func (c *DepsUsageEvidenceClient) GetX(ctx context.Context, id int) *DepsUsageEvidence
- func (c *DepsUsageEvidenceClient) Hooks() []Hook
- func (c *DepsUsageEvidenceClient) Intercept(interceptors ...Interceptor)
- func (c *DepsUsageEvidenceClient) Interceptors() []Interceptor
- func (c *DepsUsageEvidenceClient) MapCreateBulk(slice any, setFunc func(*DepsUsageEvidenceCreate, int)) *DepsUsageEvidenceCreateBulk
- func (c *DepsUsageEvidenceClient) Query() *DepsUsageEvidenceQuery
- func (c *DepsUsageEvidenceClient) QueryUsedIn(due *DepsUsageEvidence) *CodeSourceFileQuery
- func (c *DepsUsageEvidenceClient) Update() *DepsUsageEvidenceUpdate
- func (c *DepsUsageEvidenceClient) UpdateOne(due *DepsUsageEvidence) *DepsUsageEvidenceUpdateOne
- func (c *DepsUsageEvidenceClient) UpdateOneID(id int) *DepsUsageEvidenceUpdateOne
- func (c *DepsUsageEvidenceClient) Use(hooks ...Hook)
- type DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) Exec(ctx context.Context) error
- func (duec *DepsUsageEvidenceCreate) ExecX(ctx context.Context)
- func (duec *DepsUsageEvidenceCreate) Mutation() *DepsUsageEvidenceMutation
- func (duec *DepsUsageEvidenceCreate) Save(ctx context.Context) (*DepsUsageEvidence, error)
- func (duec *DepsUsageEvidenceCreate) SaveX(ctx context.Context) *DepsUsageEvidence
- func (duec *DepsUsageEvidenceCreate) SetIdentifier(s string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetIsWildCardUsage(b bool) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetLine(u uint) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetModuleAlias(s string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetModuleItem(s string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetModuleName(s string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetNillableIdentifier(s *string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetNillableIsWildCardUsage(b *bool) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetNillableModuleAlias(s *string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetNillableModuleItem(s *string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetNillablePackageHint(s *string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetPackageHint(s string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetUsageFilePath(s string) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetUsedIn(c *CodeSourceFile) *DepsUsageEvidenceCreate
- func (duec *DepsUsageEvidenceCreate) SetUsedInID(id int) *DepsUsageEvidenceCreate
- type DepsUsageEvidenceCreateBulk
- func (duecb *DepsUsageEvidenceCreateBulk) Exec(ctx context.Context) error
- func (duecb *DepsUsageEvidenceCreateBulk) ExecX(ctx context.Context)
- func (duecb *DepsUsageEvidenceCreateBulk) Save(ctx context.Context) ([]*DepsUsageEvidence, error)
- func (duecb *DepsUsageEvidenceCreateBulk) SaveX(ctx context.Context) []*DepsUsageEvidence
- type DepsUsageEvidenceDelete
- type DepsUsageEvidenceDeleteOne
- type DepsUsageEvidenceEdges
- type DepsUsageEvidenceGroupBy
- func (duegb *DepsUsageEvidenceGroupBy) Aggregate(fns ...AggregateFunc) *DepsUsageEvidenceGroupBy
- func (s *DepsUsageEvidenceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DepsUsageEvidenceGroupBy) BoolX(ctx context.Context) bool
- func (s *DepsUsageEvidenceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DepsUsageEvidenceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DepsUsageEvidenceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DepsUsageEvidenceGroupBy) Float64X(ctx context.Context) float64
- func (s *DepsUsageEvidenceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DepsUsageEvidenceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DepsUsageEvidenceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DepsUsageEvidenceGroupBy) IntX(ctx context.Context) int
- func (s *DepsUsageEvidenceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DepsUsageEvidenceGroupBy) IntsX(ctx context.Context) []int
- func (duegb *DepsUsageEvidenceGroupBy) Scan(ctx context.Context, v any) error
- func (s *DepsUsageEvidenceGroupBy) ScanX(ctx context.Context, v any)
- func (s *DepsUsageEvidenceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DepsUsageEvidenceGroupBy) StringX(ctx context.Context) string
- func (s *DepsUsageEvidenceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DepsUsageEvidenceGroupBy) StringsX(ctx context.Context) []string
- type DepsUsageEvidenceMutation
- func (m *DepsUsageEvidenceMutation) AddField(name string, value ent.Value) error
- func (m *DepsUsageEvidenceMutation) AddLine(u int)
- func (m *DepsUsageEvidenceMutation) AddedEdges() []string
- func (m *DepsUsageEvidenceMutation) AddedField(name string) (ent.Value, bool)
- func (m *DepsUsageEvidenceMutation) AddedFields() []string
- func (m *DepsUsageEvidenceMutation) AddedIDs(name string) []ent.Value
- func (m *DepsUsageEvidenceMutation) AddedLine() (r int, exists bool)
- func (m *DepsUsageEvidenceMutation) ClearEdge(name string) error
- func (m *DepsUsageEvidenceMutation) ClearField(name string) error
- func (m *DepsUsageEvidenceMutation) ClearIdentifier()
- func (m *DepsUsageEvidenceMutation) ClearIsWildCardUsage()
- func (m *DepsUsageEvidenceMutation) ClearModuleAlias()
- func (m *DepsUsageEvidenceMutation) ClearModuleItem()
- func (m *DepsUsageEvidenceMutation) ClearPackageHint()
- func (m *DepsUsageEvidenceMutation) ClearUsedIn()
- func (m *DepsUsageEvidenceMutation) ClearedEdges() []string
- func (m *DepsUsageEvidenceMutation) ClearedFields() []string
- func (m DepsUsageEvidenceMutation) Client() *Client
- func (m *DepsUsageEvidenceMutation) EdgeCleared(name string) bool
- func (m *DepsUsageEvidenceMutation) Field(name string) (ent.Value, bool)
- func (m *DepsUsageEvidenceMutation) FieldCleared(name string) bool
- func (m *DepsUsageEvidenceMutation) Fields() []string
- func (m *DepsUsageEvidenceMutation) ID() (id int, exists bool)
- func (m *DepsUsageEvidenceMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DepsUsageEvidenceMutation) Identifier() (r string, exists bool)
- func (m *DepsUsageEvidenceMutation) IdentifierCleared() bool
- func (m *DepsUsageEvidenceMutation) IsWildCardUsage() (r bool, exists bool)
- func (m *DepsUsageEvidenceMutation) IsWildCardUsageCleared() bool
- func (m *DepsUsageEvidenceMutation) Line() (r uint, exists bool)
- func (m *DepsUsageEvidenceMutation) ModuleAlias() (r string, exists bool)
- func (m *DepsUsageEvidenceMutation) ModuleAliasCleared() bool
- func (m *DepsUsageEvidenceMutation) ModuleItem() (r string, exists bool)
- func (m *DepsUsageEvidenceMutation) ModuleItemCleared() bool
- func (m *DepsUsageEvidenceMutation) ModuleName() (r string, exists bool)
- func (m *DepsUsageEvidenceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DepsUsageEvidenceMutation) OldIdentifier(ctx context.Context) (v *string, err error)
- func (m *DepsUsageEvidenceMutation) OldIsWildCardUsage(ctx context.Context) (v bool, err error)
- func (m *DepsUsageEvidenceMutation) OldLine(ctx context.Context) (v uint, err error)
- func (m *DepsUsageEvidenceMutation) OldModuleAlias(ctx context.Context) (v *string, err error)
- func (m *DepsUsageEvidenceMutation) OldModuleItem(ctx context.Context) (v *string, err error)
- func (m *DepsUsageEvidenceMutation) OldModuleName(ctx context.Context) (v string, err error)
- func (m *DepsUsageEvidenceMutation) OldPackageHint(ctx context.Context) (v *string, err error)
- func (m *DepsUsageEvidenceMutation) OldUsageFilePath(ctx context.Context) (v string, err error)
- func (m *DepsUsageEvidenceMutation) Op() Op
- func (m *DepsUsageEvidenceMutation) PackageHint() (r string, exists bool)
- func (m *DepsUsageEvidenceMutation) PackageHintCleared() bool
- func (m *DepsUsageEvidenceMutation) RemovedEdges() []string
- func (m *DepsUsageEvidenceMutation) RemovedIDs(name string) []ent.Value
- func (m *DepsUsageEvidenceMutation) ResetEdge(name string) error
- func (m *DepsUsageEvidenceMutation) ResetField(name string) error
- func (m *DepsUsageEvidenceMutation) ResetIdentifier()
- func (m *DepsUsageEvidenceMutation) ResetIsWildCardUsage()
- func (m *DepsUsageEvidenceMutation) ResetLine()
- func (m *DepsUsageEvidenceMutation) ResetModuleAlias()
- func (m *DepsUsageEvidenceMutation) ResetModuleItem()
- func (m *DepsUsageEvidenceMutation) ResetModuleName()
- func (m *DepsUsageEvidenceMutation) ResetPackageHint()
- func (m *DepsUsageEvidenceMutation) ResetUsageFilePath()
- func (m *DepsUsageEvidenceMutation) ResetUsedIn()
- func (m *DepsUsageEvidenceMutation) SetField(name string, value ent.Value) error
- func (m *DepsUsageEvidenceMutation) SetIdentifier(s string)
- func (m *DepsUsageEvidenceMutation) SetIsWildCardUsage(b bool)
- func (m *DepsUsageEvidenceMutation) SetLine(u uint)
- func (m *DepsUsageEvidenceMutation) SetModuleAlias(s string)
- func (m *DepsUsageEvidenceMutation) SetModuleItem(s string)
- func (m *DepsUsageEvidenceMutation) SetModuleName(s string)
- func (m *DepsUsageEvidenceMutation) SetOp(op Op)
- func (m *DepsUsageEvidenceMutation) SetPackageHint(s string)
- func (m *DepsUsageEvidenceMutation) SetUsageFilePath(s string)
- func (m *DepsUsageEvidenceMutation) SetUsedInID(id int)
- func (m DepsUsageEvidenceMutation) Tx() (*Tx, error)
- func (m *DepsUsageEvidenceMutation) Type() string
- func (m *DepsUsageEvidenceMutation) UsageFilePath() (r string, exists bool)
- func (m *DepsUsageEvidenceMutation) UsedInCleared() bool
- func (m *DepsUsageEvidenceMutation) UsedInID() (id int, exists bool)
- func (m *DepsUsageEvidenceMutation) UsedInIDs() (ids []int)
- func (m *DepsUsageEvidenceMutation) Where(ps ...predicate.DepsUsageEvidence)
- func (m *DepsUsageEvidenceMutation) WhereP(ps ...func(*sql.Selector))
- type DepsUsageEvidenceQuery
- func (dueq *DepsUsageEvidenceQuery) Aggregate(fns ...AggregateFunc) *DepsUsageEvidenceSelect
- func (dueq *DepsUsageEvidenceQuery) All(ctx context.Context) ([]*DepsUsageEvidence, error)
- func (dueq *DepsUsageEvidenceQuery) AllX(ctx context.Context) []*DepsUsageEvidence
- func (dueq *DepsUsageEvidenceQuery) Clone() *DepsUsageEvidenceQuery
- func (dueq *DepsUsageEvidenceQuery) Count(ctx context.Context) (int, error)
- func (dueq *DepsUsageEvidenceQuery) CountX(ctx context.Context) int
- func (dueq *DepsUsageEvidenceQuery) Exist(ctx context.Context) (bool, error)
- func (dueq *DepsUsageEvidenceQuery) ExistX(ctx context.Context) bool
- func (dueq *DepsUsageEvidenceQuery) First(ctx context.Context) (*DepsUsageEvidence, error)
- func (dueq *DepsUsageEvidenceQuery) FirstID(ctx context.Context) (id int, err error)
- func (dueq *DepsUsageEvidenceQuery) FirstIDX(ctx context.Context) int
- func (dueq *DepsUsageEvidenceQuery) FirstX(ctx context.Context) *DepsUsageEvidence
- func (dueq *DepsUsageEvidenceQuery) GroupBy(field string, fields ...string) *DepsUsageEvidenceGroupBy
- func (dueq *DepsUsageEvidenceQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dueq *DepsUsageEvidenceQuery) IDsX(ctx context.Context) []int
- func (dueq *DepsUsageEvidenceQuery) Limit(limit int) *DepsUsageEvidenceQuery
- func (dueq *DepsUsageEvidenceQuery) Offset(offset int) *DepsUsageEvidenceQuery
- func (dueq *DepsUsageEvidenceQuery) Only(ctx context.Context) (*DepsUsageEvidence, error)
- func (dueq *DepsUsageEvidenceQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dueq *DepsUsageEvidenceQuery) OnlyIDX(ctx context.Context) int
- func (dueq *DepsUsageEvidenceQuery) OnlyX(ctx context.Context) *DepsUsageEvidence
- func (dueq *DepsUsageEvidenceQuery) Order(o ...depsusageevidence.OrderOption) *DepsUsageEvidenceQuery
- func (dueq *DepsUsageEvidenceQuery) QueryUsedIn() *CodeSourceFileQuery
- func (dueq *DepsUsageEvidenceQuery) Select(fields ...string) *DepsUsageEvidenceSelect
- func (dueq *DepsUsageEvidenceQuery) Unique(unique bool) *DepsUsageEvidenceQuery
- func (dueq *DepsUsageEvidenceQuery) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceQuery
- func (dueq *DepsUsageEvidenceQuery) WithUsedIn(opts ...func(*CodeSourceFileQuery)) *DepsUsageEvidenceQuery
- type DepsUsageEvidenceSelect
- func (dues *DepsUsageEvidenceSelect) Aggregate(fns ...AggregateFunc) *DepsUsageEvidenceSelect
- func (s *DepsUsageEvidenceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DepsUsageEvidenceSelect) BoolX(ctx context.Context) bool
- func (s *DepsUsageEvidenceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DepsUsageEvidenceSelect) BoolsX(ctx context.Context) []bool
- func (s *DepsUsageEvidenceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DepsUsageEvidenceSelect) Float64X(ctx context.Context) float64
- func (s *DepsUsageEvidenceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DepsUsageEvidenceSelect) Float64sX(ctx context.Context) []float64
- func (s *DepsUsageEvidenceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DepsUsageEvidenceSelect) IntX(ctx context.Context) int
- func (s *DepsUsageEvidenceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DepsUsageEvidenceSelect) IntsX(ctx context.Context) []int
- func (dues *DepsUsageEvidenceSelect) Scan(ctx context.Context, v any) error
- func (s *DepsUsageEvidenceSelect) ScanX(ctx context.Context, v any)
- func (s *DepsUsageEvidenceSelect) String(ctx context.Context) (_ string, err error)
- func (s *DepsUsageEvidenceSelect) StringX(ctx context.Context) string
- func (s *DepsUsageEvidenceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DepsUsageEvidenceSelect) StringsX(ctx context.Context) []string
- type DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) AddLine(u int) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) ClearIdentifier() *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) ClearIsWildCardUsage() *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) ClearModuleAlias() *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) ClearModuleItem() *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) ClearPackageHint() *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) ClearUsedIn() *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) Exec(ctx context.Context) error
- func (dueu *DepsUsageEvidenceUpdate) ExecX(ctx context.Context)
- func (dueu *DepsUsageEvidenceUpdate) Mutation() *DepsUsageEvidenceMutation
- func (dueu *DepsUsageEvidenceUpdate) Save(ctx context.Context) (int, error)
- func (dueu *DepsUsageEvidenceUpdate) SaveX(ctx context.Context) int
- func (dueu *DepsUsageEvidenceUpdate) SetIdentifier(s string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetIsWildCardUsage(b bool) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetLine(u uint) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetModuleAlias(s string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetModuleItem(s string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetModuleName(s string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillableIdentifier(s *string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillableIsWildCardUsage(b *bool) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillableLine(u *uint) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillableModuleAlias(s *string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillableModuleItem(s *string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillableModuleName(s *string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillablePackageHint(s *string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetNillableUsageFilePath(s *string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetPackageHint(s string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetUsageFilePath(s string) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetUsedIn(c *CodeSourceFile) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) SetUsedInID(id int) *DepsUsageEvidenceUpdate
- func (dueu *DepsUsageEvidenceUpdate) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceUpdate
- type DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) AddLine(u int) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) ClearIdentifier() *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) ClearIsWildCardUsage() *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) ClearModuleAlias() *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) ClearModuleItem() *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) ClearPackageHint() *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) ClearUsedIn() *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) Exec(ctx context.Context) error
- func (dueuo *DepsUsageEvidenceUpdateOne) ExecX(ctx context.Context)
- func (dueuo *DepsUsageEvidenceUpdateOne) Mutation() *DepsUsageEvidenceMutation
- func (dueuo *DepsUsageEvidenceUpdateOne) Save(ctx context.Context) (*DepsUsageEvidence, error)
- func (dueuo *DepsUsageEvidenceUpdateOne) SaveX(ctx context.Context) *DepsUsageEvidence
- func (dueuo *DepsUsageEvidenceUpdateOne) Select(field string, fields ...string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetIdentifier(s string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetIsWildCardUsage(b bool) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetLine(u uint) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetModuleAlias(s string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetModuleItem(s string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetModuleName(s string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableIdentifier(s *string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableIsWildCardUsage(b *bool) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableLine(u *uint) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableModuleAlias(s *string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableModuleItem(s *string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableModuleName(s *string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillablePackageHint(s *string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableUsageFilePath(s *string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetPackageHint(s string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetUsageFilePath(s string) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetUsedIn(c *CodeSourceFile) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) SetUsedInID(id int) *DepsUsageEvidenceUpdateOne
- func (dueuo *DepsUsageEvidenceUpdateOne) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceUpdateOne
- type DepsUsageEvidences
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCodeSourceFile = "CodeSourceFile" TypeDepsUsageEvidence = "DepsUsageEvidence" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// CodeSourceFile is the client for interacting with the CodeSourceFile builders.
CodeSourceFile *CodeSourceFileClient
// DepsUsageEvidence is the client for interacting with the DepsUsageEvidence builders.
DepsUsageEvidence *DepsUsageEvidenceClient
// 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(). CodeSourceFile. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CodeSourceFile ¶
type CodeSourceFile struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Path holds the value of the "path" field.
Path string `json:"path,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the CodeSourceFileQuery when eager-loading is set.
Edges CodeSourceFileEdges `json:"edges"`
// contains filtered or unexported fields
}
CodeSourceFile is the model entity for the CodeSourceFile schema.
func (*CodeSourceFile) QueryDepsUsageEvidences ¶
func (csf *CodeSourceFile) QueryDepsUsageEvidences() *DepsUsageEvidenceQuery
QueryDepsUsageEvidences queries the "deps_usage_evidences" edge of the CodeSourceFile entity.
func (*CodeSourceFile) String ¶
func (csf *CodeSourceFile) String() string
String implements the fmt.Stringer.
func (*CodeSourceFile) Unwrap ¶
func (csf *CodeSourceFile) Unwrap() *CodeSourceFile
Unwrap unwraps the CodeSourceFile 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 (*CodeSourceFile) Update ¶
func (csf *CodeSourceFile) Update() *CodeSourceFileUpdateOne
Update returns a builder for updating this CodeSourceFile. Note that you need to call CodeSourceFile.Unwrap() before calling this method if this CodeSourceFile was returned from a transaction, and the transaction was committed or rolled back.
type CodeSourceFileClient ¶
type CodeSourceFileClient struct {
// contains filtered or unexported fields
}
CodeSourceFileClient is a client for the CodeSourceFile schema.
func NewCodeSourceFileClient ¶
func NewCodeSourceFileClient(c config) *CodeSourceFileClient
NewCodeSourceFileClient returns a client for the CodeSourceFile from the given config.
func (*CodeSourceFileClient) Create ¶
func (c *CodeSourceFileClient) Create() *CodeSourceFileCreate
Create returns a builder for creating a CodeSourceFile entity.
func (*CodeSourceFileClient) CreateBulk ¶
func (c *CodeSourceFileClient) CreateBulk(builders ...*CodeSourceFileCreate) *CodeSourceFileCreateBulk
CreateBulk returns a builder for creating a bulk of CodeSourceFile entities.
func (*CodeSourceFileClient) Delete ¶
func (c *CodeSourceFileClient) Delete() *CodeSourceFileDelete
Delete returns a delete builder for CodeSourceFile.
func (*CodeSourceFileClient) DeleteOne ¶
func (c *CodeSourceFileClient) DeleteOne(csf *CodeSourceFile) *CodeSourceFileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CodeSourceFileClient) DeleteOneID ¶
func (c *CodeSourceFileClient) DeleteOneID(id int) *CodeSourceFileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CodeSourceFileClient) Get ¶
func (c *CodeSourceFileClient) Get(ctx context.Context, id int) (*CodeSourceFile, error)
Get returns a CodeSourceFile entity by its id.
func (*CodeSourceFileClient) GetX ¶
func (c *CodeSourceFileClient) GetX(ctx context.Context, id int) *CodeSourceFile
GetX is like Get, but panics if an error occurs.
func (*CodeSourceFileClient) Hooks ¶
func (c *CodeSourceFileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CodeSourceFileClient) Intercept ¶
func (c *CodeSourceFileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `codesourcefile.Intercept(f(g(h())))`.
func (*CodeSourceFileClient) Interceptors ¶
func (c *CodeSourceFileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CodeSourceFileClient) MapCreateBulk ¶
func (c *CodeSourceFileClient) MapCreateBulk(slice any, setFunc func(*CodeSourceFileCreate, int)) *CodeSourceFileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CodeSourceFileClient) Query ¶
func (c *CodeSourceFileClient) Query() *CodeSourceFileQuery
Query returns a query builder for CodeSourceFile.
func (*CodeSourceFileClient) QueryDepsUsageEvidences ¶
func (c *CodeSourceFileClient) QueryDepsUsageEvidences(csf *CodeSourceFile) *DepsUsageEvidenceQuery
QueryDepsUsageEvidences queries the deps_usage_evidences edge of a CodeSourceFile.
func (*CodeSourceFileClient) Update ¶
func (c *CodeSourceFileClient) Update() *CodeSourceFileUpdate
Update returns an update builder for CodeSourceFile.
func (*CodeSourceFileClient) UpdateOne ¶
func (c *CodeSourceFileClient) UpdateOne(csf *CodeSourceFile) *CodeSourceFileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CodeSourceFileClient) UpdateOneID ¶
func (c *CodeSourceFileClient) UpdateOneID(id int) *CodeSourceFileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CodeSourceFileClient) Use ¶
func (c *CodeSourceFileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `codesourcefile.Hooks(f(g(h())))`.
type CodeSourceFileCreate ¶
type CodeSourceFileCreate struct {
// contains filtered or unexported fields
}
CodeSourceFileCreate is the builder for creating a CodeSourceFile entity.
func (*CodeSourceFileCreate) AddDepsUsageEvidenceIDs ¶
func (csfc *CodeSourceFileCreate) AddDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileCreate
AddDepsUsageEvidenceIDs adds the "deps_usage_evidences" edge to the DepsUsageEvidence entity by IDs.
func (*CodeSourceFileCreate) AddDepsUsageEvidences ¶
func (csfc *CodeSourceFileCreate) AddDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileCreate
AddDepsUsageEvidences adds the "deps_usage_evidences" edges to the DepsUsageEvidence entity.
func (*CodeSourceFileCreate) Exec ¶
func (csfc *CodeSourceFileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CodeSourceFileCreate) ExecX ¶
func (csfc *CodeSourceFileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CodeSourceFileCreate) Mutation ¶
func (csfc *CodeSourceFileCreate) Mutation() *CodeSourceFileMutation
Mutation returns the CodeSourceFileMutation object of the builder.
func (*CodeSourceFileCreate) Save ¶
func (csfc *CodeSourceFileCreate) Save(ctx context.Context) (*CodeSourceFile, error)
Save creates the CodeSourceFile in the database.
func (*CodeSourceFileCreate) SaveX ¶
func (csfc *CodeSourceFileCreate) SaveX(ctx context.Context) *CodeSourceFile
SaveX calls Save and panics if Save returns an error.
func (*CodeSourceFileCreate) SetPath ¶
func (csfc *CodeSourceFileCreate) SetPath(s string) *CodeSourceFileCreate
SetPath sets the "path" field.
type CodeSourceFileCreateBulk ¶
type CodeSourceFileCreateBulk struct {
// contains filtered or unexported fields
}
CodeSourceFileCreateBulk is the builder for creating many CodeSourceFile entities in bulk.
func (*CodeSourceFileCreateBulk) Exec ¶
func (csfcb *CodeSourceFileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CodeSourceFileCreateBulk) ExecX ¶
func (csfcb *CodeSourceFileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CodeSourceFileCreateBulk) Save ¶
func (csfcb *CodeSourceFileCreateBulk) Save(ctx context.Context) ([]*CodeSourceFile, error)
Save creates the CodeSourceFile entities in the database.
func (*CodeSourceFileCreateBulk) SaveX ¶
func (csfcb *CodeSourceFileCreateBulk) SaveX(ctx context.Context) []*CodeSourceFile
SaveX is like Save, but panics if an error occurs.
type CodeSourceFileDelete ¶
type CodeSourceFileDelete struct {
// contains filtered or unexported fields
}
CodeSourceFileDelete is the builder for deleting a CodeSourceFile entity.
func (*CodeSourceFileDelete) Exec ¶
func (csfd *CodeSourceFileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CodeSourceFileDelete) ExecX ¶
func (csfd *CodeSourceFileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CodeSourceFileDelete) Where ¶
func (csfd *CodeSourceFileDelete) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileDelete
Where appends a list predicates to the CodeSourceFileDelete builder.
type CodeSourceFileDeleteOne ¶
type CodeSourceFileDeleteOne struct {
// contains filtered or unexported fields
}
CodeSourceFileDeleteOne is the builder for deleting a single CodeSourceFile entity.
func (*CodeSourceFileDeleteOne) Exec ¶
func (csfdo *CodeSourceFileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CodeSourceFileDeleteOne) ExecX ¶
func (csfdo *CodeSourceFileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CodeSourceFileDeleteOne) Where ¶
func (csfdo *CodeSourceFileDeleteOne) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileDeleteOne
Where appends a list predicates to the CodeSourceFileDelete builder.
type CodeSourceFileEdges ¶
type CodeSourceFileEdges struct {
// DepsUsageEvidences holds the value of the deps_usage_evidences edge.
DepsUsageEvidences []*DepsUsageEvidence `json:"deps_usage_evidences,omitempty"`
// contains filtered or unexported fields
}
CodeSourceFileEdges holds the relations/edges for other nodes in the graph.
func (CodeSourceFileEdges) DepsUsageEvidencesOrErr ¶
func (e CodeSourceFileEdges) DepsUsageEvidencesOrErr() ([]*DepsUsageEvidence, error)
DepsUsageEvidencesOrErr returns the DepsUsageEvidences value or an error if the edge was not loaded in eager-loading.
type CodeSourceFileGroupBy ¶
type CodeSourceFileGroupBy struct {
// contains filtered or unexported fields
}
CodeSourceFileGroupBy is the group-by builder for CodeSourceFile entities.
func (*CodeSourceFileGroupBy) Aggregate ¶
func (csfgb *CodeSourceFileGroupBy) Aggregate(fns ...AggregateFunc) *CodeSourceFileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CodeSourceFileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CodeSourceFileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileGroupBy) Scan ¶
func (csfgb *CodeSourceFileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CodeSourceFileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CodeSourceFileMutation ¶
type CodeSourceFileMutation struct {
// contains filtered or unexported fields
}
CodeSourceFileMutation represents an operation that mutates the CodeSourceFile nodes in the graph.
func (*CodeSourceFileMutation) AddDepsUsageEvidenceIDs ¶
func (m *CodeSourceFileMutation) AddDepsUsageEvidenceIDs(ids ...int)
AddDepsUsageEvidenceIDs adds the "deps_usage_evidences" edge to the DepsUsageEvidence entity by ids.
func (*CodeSourceFileMutation) AddField ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) AddedEdges ¶
func (m *CodeSourceFileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CodeSourceFileMutation) AddedField ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) AddedFields ¶
func (m *CodeSourceFileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CodeSourceFileMutation) AddedIDs ¶
func (m *CodeSourceFileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CodeSourceFileMutation) ClearDepsUsageEvidences ¶
func (m *CodeSourceFileMutation) ClearDepsUsageEvidences()
ClearDepsUsageEvidences clears the "deps_usage_evidences" edge to the DepsUsageEvidence entity.
func (*CodeSourceFileMutation) ClearEdge ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) ClearField ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) ClearedEdges ¶
func (m *CodeSourceFileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CodeSourceFileMutation) ClearedFields ¶
func (m *CodeSourceFileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CodeSourceFileMutation) Client ¶
func (m CodeSourceFileMutation) 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 (*CodeSourceFileMutation) DepsUsageEvidencesCleared ¶
func (m *CodeSourceFileMutation) DepsUsageEvidencesCleared() bool
DepsUsageEvidencesCleared reports if the "deps_usage_evidences" edge to the DepsUsageEvidence entity was cleared.
func (*CodeSourceFileMutation) DepsUsageEvidencesIDs ¶
func (m *CodeSourceFileMutation) DepsUsageEvidencesIDs() (ids []int)
DepsUsageEvidencesIDs returns the "deps_usage_evidences" edge IDs in the mutation.
func (*CodeSourceFileMutation) EdgeCleared ¶
func (m *CodeSourceFileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CodeSourceFileMutation) Field ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) FieldCleared ¶
func (m *CodeSourceFileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CodeSourceFileMutation) Fields ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) ID ¶
func (m *CodeSourceFileMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CodeSourceFileMutation) IDs ¶
func (m *CodeSourceFileMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CodeSourceFileMutation) 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 (*CodeSourceFileMutation) OldPath ¶
func (m *CodeSourceFileMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the CodeSourceFile entity. If the CodeSourceFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CodeSourceFileMutation) Op ¶
func (m *CodeSourceFileMutation) Op() Op
Op returns the operation name.
func (*CodeSourceFileMutation) Path ¶
func (m *CodeSourceFileMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*CodeSourceFileMutation) RemoveDepsUsageEvidenceIDs ¶
func (m *CodeSourceFileMutation) RemoveDepsUsageEvidenceIDs(ids ...int)
RemoveDepsUsageEvidenceIDs removes the "deps_usage_evidences" edge to the DepsUsageEvidence entity by IDs.
func (*CodeSourceFileMutation) RemovedDepsUsageEvidencesIDs ¶
func (m *CodeSourceFileMutation) RemovedDepsUsageEvidencesIDs() (ids []int)
RemovedDepsUsageEvidences returns the removed IDs of the "deps_usage_evidences" edge to the DepsUsageEvidence entity.
func (*CodeSourceFileMutation) RemovedEdges ¶
func (m *CodeSourceFileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CodeSourceFileMutation) RemovedIDs ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) ResetDepsUsageEvidences ¶
func (m *CodeSourceFileMutation) ResetDepsUsageEvidences()
ResetDepsUsageEvidences resets all changes to the "deps_usage_evidences" edge.
func (*CodeSourceFileMutation) ResetEdge ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) ResetField ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) ResetPath ¶
func (m *CodeSourceFileMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*CodeSourceFileMutation) SetField ¶
func (m *CodeSourceFileMutation) 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 (*CodeSourceFileMutation) SetOp ¶
func (m *CodeSourceFileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CodeSourceFileMutation) SetPath ¶
func (m *CodeSourceFileMutation) SetPath(s string)
SetPath sets the "path" field.
func (CodeSourceFileMutation) Tx ¶
func (m CodeSourceFileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CodeSourceFileMutation) Type ¶
func (m *CodeSourceFileMutation) Type() string
Type returns the node type of this mutation (CodeSourceFile).
func (*CodeSourceFileMutation) Where ¶
func (m *CodeSourceFileMutation) Where(ps ...predicate.CodeSourceFile)
Where appends a list predicates to the CodeSourceFileMutation builder.
func (*CodeSourceFileMutation) WhereP ¶
func (m *CodeSourceFileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CodeSourceFileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CodeSourceFileQuery ¶
type CodeSourceFileQuery struct {
// contains filtered or unexported fields
}
CodeSourceFileQuery is the builder for querying CodeSourceFile entities.
func (*CodeSourceFileQuery) Aggregate ¶
func (csfq *CodeSourceFileQuery) Aggregate(fns ...AggregateFunc) *CodeSourceFileSelect
Aggregate returns a CodeSourceFileSelect configured with the given aggregations.
func (*CodeSourceFileQuery) All ¶
func (csfq *CodeSourceFileQuery) All(ctx context.Context) ([]*CodeSourceFile, error)
All executes the query and returns a list of CodeSourceFiles.
func (*CodeSourceFileQuery) AllX ¶
func (csfq *CodeSourceFileQuery) AllX(ctx context.Context) []*CodeSourceFile
AllX is like All, but panics if an error occurs.
func (*CodeSourceFileQuery) Clone ¶
func (csfq *CodeSourceFileQuery) Clone() *CodeSourceFileQuery
Clone returns a duplicate of the CodeSourceFileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CodeSourceFileQuery) Count ¶
func (csfq *CodeSourceFileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CodeSourceFileQuery) CountX ¶
func (csfq *CodeSourceFileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CodeSourceFileQuery) Exist ¶
func (csfq *CodeSourceFileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CodeSourceFileQuery) ExistX ¶
func (csfq *CodeSourceFileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CodeSourceFileQuery) First ¶
func (csfq *CodeSourceFileQuery) First(ctx context.Context) (*CodeSourceFile, error)
First returns the first CodeSourceFile entity from the query. Returns a *NotFoundError when no CodeSourceFile was found.
func (*CodeSourceFileQuery) FirstID ¶
func (csfq *CodeSourceFileQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first CodeSourceFile ID from the query. Returns a *NotFoundError when no CodeSourceFile ID was found.
func (*CodeSourceFileQuery) FirstIDX ¶
func (csfq *CodeSourceFileQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CodeSourceFileQuery) FirstX ¶
func (csfq *CodeSourceFileQuery) FirstX(ctx context.Context) *CodeSourceFile
FirstX is like First, but panics if an error occurs.
func (*CodeSourceFileQuery) GroupBy ¶
func (csfq *CodeSourceFileQuery) GroupBy(field string, fields ...string) *CodeSourceFileGroupBy
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 {
Path string `json:"path,omitempty"`
Count int `json:"count,omitempty"`
}
client.CodeSourceFile.Query().
GroupBy(codesourcefile.FieldPath).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CodeSourceFileQuery) IDs ¶
func (csfq *CodeSourceFileQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of CodeSourceFile IDs.
func (*CodeSourceFileQuery) IDsX ¶
func (csfq *CodeSourceFileQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CodeSourceFileQuery) Limit ¶
func (csfq *CodeSourceFileQuery) Limit(limit int) *CodeSourceFileQuery
Limit the number of records to be returned by this query.
func (*CodeSourceFileQuery) Offset ¶
func (csfq *CodeSourceFileQuery) Offset(offset int) *CodeSourceFileQuery
Offset to start from.
func (*CodeSourceFileQuery) Only ¶
func (csfq *CodeSourceFileQuery) Only(ctx context.Context) (*CodeSourceFile, error)
Only returns a single CodeSourceFile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CodeSourceFile entity is found. Returns a *NotFoundError when no CodeSourceFile entities are found.
func (*CodeSourceFileQuery) OnlyID ¶
func (csfq *CodeSourceFileQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only CodeSourceFile ID in the query. Returns a *NotSingularError when more than one CodeSourceFile ID is found. Returns a *NotFoundError when no entities are found.
func (*CodeSourceFileQuery) OnlyIDX ¶
func (csfq *CodeSourceFileQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CodeSourceFileQuery) OnlyX ¶
func (csfq *CodeSourceFileQuery) OnlyX(ctx context.Context) *CodeSourceFile
OnlyX is like Only, but panics if an error occurs.
func (*CodeSourceFileQuery) Order ¶
func (csfq *CodeSourceFileQuery) Order(o ...codesourcefile.OrderOption) *CodeSourceFileQuery
Order specifies how the records should be ordered.
func (*CodeSourceFileQuery) QueryDepsUsageEvidences ¶
func (csfq *CodeSourceFileQuery) QueryDepsUsageEvidences() *DepsUsageEvidenceQuery
QueryDepsUsageEvidences chains the current query on the "deps_usage_evidences" edge.
func (*CodeSourceFileQuery) Select ¶
func (csfq *CodeSourceFileQuery) Select(fields ...string) *CodeSourceFileSelect
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 {
Path string `json:"path,omitempty"`
}
client.CodeSourceFile.Query().
Select(codesourcefile.FieldPath).
Scan(ctx, &v)
func (*CodeSourceFileQuery) Unique ¶
func (csfq *CodeSourceFileQuery) Unique(unique bool) *CodeSourceFileQuery
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 (*CodeSourceFileQuery) Where ¶
func (csfq *CodeSourceFileQuery) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileQuery
Where adds a new predicate for the CodeSourceFileQuery builder.
func (*CodeSourceFileQuery) WithDepsUsageEvidences ¶
func (csfq *CodeSourceFileQuery) WithDepsUsageEvidences(opts ...func(*DepsUsageEvidenceQuery)) *CodeSourceFileQuery
WithDepsUsageEvidences tells the query-builder to eager-load the nodes that are connected to the "deps_usage_evidences" edge. The optional arguments are used to configure the query builder of the edge.
type CodeSourceFileSelect ¶
type CodeSourceFileSelect struct {
*CodeSourceFileQuery
// contains filtered or unexported fields
}
CodeSourceFileSelect is the builder for selecting fields of CodeSourceFile entities.
func (*CodeSourceFileSelect) Aggregate ¶
func (csfs *CodeSourceFileSelect) Aggregate(fns ...AggregateFunc) *CodeSourceFileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CodeSourceFileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CodeSourceFileSelect) Scan ¶
func (csfs *CodeSourceFileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CodeSourceFileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CodeSourceFileUpdate ¶
type CodeSourceFileUpdate struct {
// contains filtered or unexported fields
}
CodeSourceFileUpdate is the builder for updating CodeSourceFile entities.
func (*CodeSourceFileUpdate) AddDepsUsageEvidenceIDs ¶
func (csfu *CodeSourceFileUpdate) AddDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdate
AddDepsUsageEvidenceIDs adds the "deps_usage_evidences" edge to the DepsUsageEvidence entity by IDs.
func (*CodeSourceFileUpdate) AddDepsUsageEvidences ¶
func (csfu *CodeSourceFileUpdate) AddDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdate
AddDepsUsageEvidences adds the "deps_usage_evidences" edges to the DepsUsageEvidence entity.
func (*CodeSourceFileUpdate) ClearDepsUsageEvidences ¶
func (csfu *CodeSourceFileUpdate) ClearDepsUsageEvidences() *CodeSourceFileUpdate
ClearDepsUsageEvidences clears all "deps_usage_evidences" edges to the DepsUsageEvidence entity.
func (*CodeSourceFileUpdate) Exec ¶
func (csfu *CodeSourceFileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CodeSourceFileUpdate) ExecX ¶
func (csfu *CodeSourceFileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CodeSourceFileUpdate) Mutation ¶
func (csfu *CodeSourceFileUpdate) Mutation() *CodeSourceFileMutation
Mutation returns the CodeSourceFileMutation object of the builder.
func (*CodeSourceFileUpdate) RemoveDepsUsageEvidenceIDs ¶
func (csfu *CodeSourceFileUpdate) RemoveDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdate
RemoveDepsUsageEvidenceIDs removes the "deps_usage_evidences" edge to DepsUsageEvidence entities by IDs.
func (*CodeSourceFileUpdate) RemoveDepsUsageEvidences ¶
func (csfu *CodeSourceFileUpdate) RemoveDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdate
RemoveDepsUsageEvidences removes "deps_usage_evidences" edges to DepsUsageEvidence entities.
func (*CodeSourceFileUpdate) Save ¶
func (csfu *CodeSourceFileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CodeSourceFileUpdate) SaveX ¶
func (csfu *CodeSourceFileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CodeSourceFileUpdate) SetNillablePath ¶
func (csfu *CodeSourceFileUpdate) SetNillablePath(s *string) *CodeSourceFileUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*CodeSourceFileUpdate) SetPath ¶
func (csfu *CodeSourceFileUpdate) SetPath(s string) *CodeSourceFileUpdate
SetPath sets the "path" field.
func (*CodeSourceFileUpdate) Where ¶
func (csfu *CodeSourceFileUpdate) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileUpdate
Where appends a list predicates to the CodeSourceFileUpdate builder.
type CodeSourceFileUpdateOne ¶
type CodeSourceFileUpdateOne struct {
// contains filtered or unexported fields
}
CodeSourceFileUpdateOne is the builder for updating a single CodeSourceFile entity.
func (*CodeSourceFileUpdateOne) AddDepsUsageEvidenceIDs ¶
func (csfuo *CodeSourceFileUpdateOne) AddDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdateOne
AddDepsUsageEvidenceIDs adds the "deps_usage_evidences" edge to the DepsUsageEvidence entity by IDs.
func (*CodeSourceFileUpdateOne) AddDepsUsageEvidences ¶
func (csfuo *CodeSourceFileUpdateOne) AddDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdateOne
AddDepsUsageEvidences adds the "deps_usage_evidences" edges to the DepsUsageEvidence entity.
func (*CodeSourceFileUpdateOne) ClearDepsUsageEvidences ¶
func (csfuo *CodeSourceFileUpdateOne) ClearDepsUsageEvidences() *CodeSourceFileUpdateOne
ClearDepsUsageEvidences clears all "deps_usage_evidences" edges to the DepsUsageEvidence entity.
func (*CodeSourceFileUpdateOne) Exec ¶
func (csfuo *CodeSourceFileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CodeSourceFileUpdateOne) ExecX ¶
func (csfuo *CodeSourceFileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CodeSourceFileUpdateOne) Mutation ¶
func (csfuo *CodeSourceFileUpdateOne) Mutation() *CodeSourceFileMutation
Mutation returns the CodeSourceFileMutation object of the builder.
func (*CodeSourceFileUpdateOne) RemoveDepsUsageEvidenceIDs ¶
func (csfuo *CodeSourceFileUpdateOne) RemoveDepsUsageEvidenceIDs(ids ...int) *CodeSourceFileUpdateOne
RemoveDepsUsageEvidenceIDs removes the "deps_usage_evidences" edge to DepsUsageEvidence entities by IDs.
func (*CodeSourceFileUpdateOne) RemoveDepsUsageEvidences ¶
func (csfuo *CodeSourceFileUpdateOne) RemoveDepsUsageEvidences(d ...*DepsUsageEvidence) *CodeSourceFileUpdateOne
RemoveDepsUsageEvidences removes "deps_usage_evidences" edges to DepsUsageEvidence entities.
func (*CodeSourceFileUpdateOne) Save ¶
func (csfuo *CodeSourceFileUpdateOne) Save(ctx context.Context) (*CodeSourceFile, error)
Save executes the query and returns the updated CodeSourceFile entity.
func (*CodeSourceFileUpdateOne) SaveX ¶
func (csfuo *CodeSourceFileUpdateOne) SaveX(ctx context.Context) *CodeSourceFile
SaveX is like Save, but panics if an error occurs.
func (*CodeSourceFileUpdateOne) Select ¶
func (csfuo *CodeSourceFileUpdateOne) Select(field string, fields ...string) *CodeSourceFileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CodeSourceFileUpdateOne) SetNillablePath ¶
func (csfuo *CodeSourceFileUpdateOne) SetNillablePath(s *string) *CodeSourceFileUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*CodeSourceFileUpdateOne) SetPath ¶
func (csfuo *CodeSourceFileUpdateOne) SetPath(s string) *CodeSourceFileUpdateOne
SetPath sets the "path" field.
func (*CodeSourceFileUpdateOne) Where ¶
func (csfuo *CodeSourceFileUpdateOne) Where(ps ...predicate.CodeSourceFile) *CodeSourceFileUpdateOne
Where appends a list predicates to the CodeSourceFileUpdate builder.
type CodeSourceFiles ¶
type CodeSourceFiles []*CodeSourceFile
CodeSourceFiles is a parsable slice of CodeSourceFile.
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 DepsUsageEvidence ¶
type DepsUsageEvidence struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// PackageHint holds the value of the "package_hint" field.
PackageHint *string `json:"package_hint,omitempty"`
// ModuleName holds the value of the "module_name" field.
ModuleName string `json:"module_name,omitempty"`
// ModuleItem holds the value of the "module_item" field.
ModuleItem *string `json:"module_item,omitempty"`
// ModuleAlias holds the value of the "module_alias" field.
ModuleAlias *string `json:"module_alias,omitempty"`
// IsWildCardUsage holds the value of the "is_wild_card_usage" field.
IsWildCardUsage bool `json:"is_wild_card_usage,omitempty"`
// Identifier holds the value of the "identifier" field.
Identifier *string `json:"identifier,omitempty"`
// UsageFilePath holds the value of the "usage_file_path" field.
UsageFilePath string `json:"usage_file_path,omitempty"`
// Line holds the value of the "line" field.
Line uint `json:"line,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the DepsUsageEvidenceQuery when eager-loading is set.
Edges DepsUsageEvidenceEdges `json:"edges"`
// contains filtered or unexported fields
}
DepsUsageEvidence is the model entity for the DepsUsageEvidence schema.
func (*DepsUsageEvidence) QueryUsedIn ¶
func (due *DepsUsageEvidence) QueryUsedIn() *CodeSourceFileQuery
QueryUsedIn queries the "used_in" edge of the DepsUsageEvidence entity.
func (*DepsUsageEvidence) String ¶
func (due *DepsUsageEvidence) String() string
String implements the fmt.Stringer.
func (*DepsUsageEvidence) Unwrap ¶
func (due *DepsUsageEvidence) Unwrap() *DepsUsageEvidence
Unwrap unwraps the DepsUsageEvidence 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 (*DepsUsageEvidence) Update ¶
func (due *DepsUsageEvidence) Update() *DepsUsageEvidenceUpdateOne
Update returns a builder for updating this DepsUsageEvidence. Note that you need to call DepsUsageEvidence.Unwrap() before calling this method if this DepsUsageEvidence was returned from a transaction, and the transaction was committed or rolled back.
type DepsUsageEvidenceClient ¶
type DepsUsageEvidenceClient struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceClient is a client for the DepsUsageEvidence schema.
func NewDepsUsageEvidenceClient ¶
func NewDepsUsageEvidenceClient(c config) *DepsUsageEvidenceClient
NewDepsUsageEvidenceClient returns a client for the DepsUsageEvidence from the given config.
func (*DepsUsageEvidenceClient) Create ¶
func (c *DepsUsageEvidenceClient) Create() *DepsUsageEvidenceCreate
Create returns a builder for creating a DepsUsageEvidence entity.
func (*DepsUsageEvidenceClient) CreateBulk ¶
func (c *DepsUsageEvidenceClient) CreateBulk(builders ...*DepsUsageEvidenceCreate) *DepsUsageEvidenceCreateBulk
CreateBulk returns a builder for creating a bulk of DepsUsageEvidence entities.
func (*DepsUsageEvidenceClient) Delete ¶
func (c *DepsUsageEvidenceClient) Delete() *DepsUsageEvidenceDelete
Delete returns a delete builder for DepsUsageEvidence.
func (*DepsUsageEvidenceClient) DeleteOne ¶
func (c *DepsUsageEvidenceClient) DeleteOne(due *DepsUsageEvidence) *DepsUsageEvidenceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DepsUsageEvidenceClient) DeleteOneID ¶
func (c *DepsUsageEvidenceClient) DeleteOneID(id int) *DepsUsageEvidenceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DepsUsageEvidenceClient) Get ¶
func (c *DepsUsageEvidenceClient) Get(ctx context.Context, id int) (*DepsUsageEvidence, error)
Get returns a DepsUsageEvidence entity by its id.
func (*DepsUsageEvidenceClient) GetX ¶
func (c *DepsUsageEvidenceClient) GetX(ctx context.Context, id int) *DepsUsageEvidence
GetX is like Get, but panics if an error occurs.
func (*DepsUsageEvidenceClient) Hooks ¶
func (c *DepsUsageEvidenceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DepsUsageEvidenceClient) Intercept ¶
func (c *DepsUsageEvidenceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `depsusageevidence.Intercept(f(g(h())))`.
func (*DepsUsageEvidenceClient) Interceptors ¶
func (c *DepsUsageEvidenceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DepsUsageEvidenceClient) MapCreateBulk ¶
func (c *DepsUsageEvidenceClient) MapCreateBulk(slice any, setFunc func(*DepsUsageEvidenceCreate, int)) *DepsUsageEvidenceCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DepsUsageEvidenceClient) Query ¶
func (c *DepsUsageEvidenceClient) Query() *DepsUsageEvidenceQuery
Query returns a query builder for DepsUsageEvidence.
func (*DepsUsageEvidenceClient) QueryUsedIn ¶
func (c *DepsUsageEvidenceClient) QueryUsedIn(due *DepsUsageEvidence) *CodeSourceFileQuery
QueryUsedIn queries the used_in edge of a DepsUsageEvidence.
func (*DepsUsageEvidenceClient) Update ¶
func (c *DepsUsageEvidenceClient) Update() *DepsUsageEvidenceUpdate
Update returns an update builder for DepsUsageEvidence.
func (*DepsUsageEvidenceClient) UpdateOne ¶
func (c *DepsUsageEvidenceClient) UpdateOne(due *DepsUsageEvidence) *DepsUsageEvidenceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DepsUsageEvidenceClient) UpdateOneID ¶
func (c *DepsUsageEvidenceClient) UpdateOneID(id int) *DepsUsageEvidenceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DepsUsageEvidenceClient) Use ¶
func (c *DepsUsageEvidenceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `depsusageevidence.Hooks(f(g(h())))`.
type DepsUsageEvidenceCreate ¶
type DepsUsageEvidenceCreate struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceCreate is the builder for creating a DepsUsageEvidence entity.
func (*DepsUsageEvidenceCreate) Exec ¶
func (duec *DepsUsageEvidenceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DepsUsageEvidenceCreate) ExecX ¶
func (duec *DepsUsageEvidenceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepsUsageEvidenceCreate) Mutation ¶
func (duec *DepsUsageEvidenceCreate) Mutation() *DepsUsageEvidenceMutation
Mutation returns the DepsUsageEvidenceMutation object of the builder.
func (*DepsUsageEvidenceCreate) Save ¶
func (duec *DepsUsageEvidenceCreate) Save(ctx context.Context) (*DepsUsageEvidence, error)
Save creates the DepsUsageEvidence in the database.
func (*DepsUsageEvidenceCreate) SaveX ¶
func (duec *DepsUsageEvidenceCreate) SaveX(ctx context.Context) *DepsUsageEvidence
SaveX calls Save and panics if Save returns an error.
func (*DepsUsageEvidenceCreate) SetIdentifier ¶
func (duec *DepsUsageEvidenceCreate) SetIdentifier(s string) *DepsUsageEvidenceCreate
SetIdentifier sets the "identifier" field.
func (*DepsUsageEvidenceCreate) SetIsWildCardUsage ¶
func (duec *DepsUsageEvidenceCreate) SetIsWildCardUsage(b bool) *DepsUsageEvidenceCreate
SetIsWildCardUsage sets the "is_wild_card_usage" field.
func (*DepsUsageEvidenceCreate) SetLine ¶
func (duec *DepsUsageEvidenceCreate) SetLine(u uint) *DepsUsageEvidenceCreate
SetLine sets the "line" field.
func (*DepsUsageEvidenceCreate) SetModuleAlias ¶
func (duec *DepsUsageEvidenceCreate) SetModuleAlias(s string) *DepsUsageEvidenceCreate
SetModuleAlias sets the "module_alias" field.
func (*DepsUsageEvidenceCreate) SetModuleItem ¶
func (duec *DepsUsageEvidenceCreate) SetModuleItem(s string) *DepsUsageEvidenceCreate
SetModuleItem sets the "module_item" field.
func (*DepsUsageEvidenceCreate) SetModuleName ¶
func (duec *DepsUsageEvidenceCreate) SetModuleName(s string) *DepsUsageEvidenceCreate
SetModuleName sets the "module_name" field.
func (*DepsUsageEvidenceCreate) SetNillableIdentifier ¶
func (duec *DepsUsageEvidenceCreate) SetNillableIdentifier(s *string) *DepsUsageEvidenceCreate
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*DepsUsageEvidenceCreate) SetNillableIsWildCardUsage ¶
func (duec *DepsUsageEvidenceCreate) SetNillableIsWildCardUsage(b *bool) *DepsUsageEvidenceCreate
SetNillableIsWildCardUsage sets the "is_wild_card_usage" field if the given value is not nil.
func (*DepsUsageEvidenceCreate) SetNillableModuleAlias ¶
func (duec *DepsUsageEvidenceCreate) SetNillableModuleAlias(s *string) *DepsUsageEvidenceCreate
SetNillableModuleAlias sets the "module_alias" field if the given value is not nil.
func (*DepsUsageEvidenceCreate) SetNillableModuleItem ¶
func (duec *DepsUsageEvidenceCreate) SetNillableModuleItem(s *string) *DepsUsageEvidenceCreate
SetNillableModuleItem sets the "module_item" field if the given value is not nil.
func (*DepsUsageEvidenceCreate) SetNillablePackageHint ¶
func (duec *DepsUsageEvidenceCreate) SetNillablePackageHint(s *string) *DepsUsageEvidenceCreate
SetNillablePackageHint sets the "package_hint" field if the given value is not nil.
func (*DepsUsageEvidenceCreate) SetPackageHint ¶
func (duec *DepsUsageEvidenceCreate) SetPackageHint(s string) *DepsUsageEvidenceCreate
SetPackageHint sets the "package_hint" field.
func (*DepsUsageEvidenceCreate) SetUsageFilePath ¶
func (duec *DepsUsageEvidenceCreate) SetUsageFilePath(s string) *DepsUsageEvidenceCreate
SetUsageFilePath sets the "usage_file_path" field.
func (*DepsUsageEvidenceCreate) SetUsedIn ¶
func (duec *DepsUsageEvidenceCreate) SetUsedIn(c *CodeSourceFile) *DepsUsageEvidenceCreate
SetUsedIn sets the "used_in" edge to the CodeSourceFile entity.
func (*DepsUsageEvidenceCreate) SetUsedInID ¶
func (duec *DepsUsageEvidenceCreate) SetUsedInID(id int) *DepsUsageEvidenceCreate
SetUsedInID sets the "used_in" edge to the CodeSourceFile entity by ID.
type DepsUsageEvidenceCreateBulk ¶
type DepsUsageEvidenceCreateBulk struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceCreateBulk is the builder for creating many DepsUsageEvidence entities in bulk.
func (*DepsUsageEvidenceCreateBulk) Exec ¶
func (duecb *DepsUsageEvidenceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DepsUsageEvidenceCreateBulk) ExecX ¶
func (duecb *DepsUsageEvidenceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepsUsageEvidenceCreateBulk) Save ¶
func (duecb *DepsUsageEvidenceCreateBulk) Save(ctx context.Context) ([]*DepsUsageEvidence, error)
Save creates the DepsUsageEvidence entities in the database.
func (*DepsUsageEvidenceCreateBulk) SaveX ¶
func (duecb *DepsUsageEvidenceCreateBulk) SaveX(ctx context.Context) []*DepsUsageEvidence
SaveX is like Save, but panics if an error occurs.
type DepsUsageEvidenceDelete ¶
type DepsUsageEvidenceDelete struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceDelete is the builder for deleting a DepsUsageEvidence entity.
func (*DepsUsageEvidenceDelete) Exec ¶
func (dued *DepsUsageEvidenceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DepsUsageEvidenceDelete) ExecX ¶
func (dued *DepsUsageEvidenceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DepsUsageEvidenceDelete) Where ¶
func (dued *DepsUsageEvidenceDelete) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceDelete
Where appends a list predicates to the DepsUsageEvidenceDelete builder.
type DepsUsageEvidenceDeleteOne ¶
type DepsUsageEvidenceDeleteOne struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceDeleteOne is the builder for deleting a single DepsUsageEvidence entity.
func (*DepsUsageEvidenceDeleteOne) Exec ¶
func (duedo *DepsUsageEvidenceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DepsUsageEvidenceDeleteOne) ExecX ¶
func (duedo *DepsUsageEvidenceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepsUsageEvidenceDeleteOne) Where ¶
func (duedo *DepsUsageEvidenceDeleteOne) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceDeleteOne
Where appends a list predicates to the DepsUsageEvidenceDelete builder.
type DepsUsageEvidenceEdges ¶
type DepsUsageEvidenceEdges struct {
// UsedIn holds the value of the used_in edge.
UsedIn *CodeSourceFile `json:"used_in,omitempty"`
// contains filtered or unexported fields
}
DepsUsageEvidenceEdges holds the relations/edges for other nodes in the graph.
func (DepsUsageEvidenceEdges) UsedInOrErr ¶
func (e DepsUsageEvidenceEdges) UsedInOrErr() (*CodeSourceFile, error)
UsedInOrErr returns the UsedIn value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DepsUsageEvidenceGroupBy ¶
type DepsUsageEvidenceGroupBy struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceGroupBy is the group-by builder for DepsUsageEvidence entities.
func (*DepsUsageEvidenceGroupBy) Aggregate ¶
func (duegb *DepsUsageEvidenceGroupBy) Aggregate(fns ...AggregateFunc) *DepsUsageEvidenceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DepsUsageEvidenceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*DepsUsageEvidenceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DepsUsageEvidenceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceGroupBy) Scan ¶
func (duegb *DepsUsageEvidenceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DepsUsageEvidenceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DepsUsageEvidenceMutation ¶
type DepsUsageEvidenceMutation struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceMutation represents an operation that mutates the DepsUsageEvidence nodes in the graph.
func (*DepsUsageEvidenceMutation) AddField ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) AddLine ¶
func (m *DepsUsageEvidenceMutation) AddLine(u int)
AddLine adds u to the "line" field.
func (*DepsUsageEvidenceMutation) AddedEdges ¶
func (m *DepsUsageEvidenceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DepsUsageEvidenceMutation) AddedField ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) AddedFields ¶
func (m *DepsUsageEvidenceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DepsUsageEvidenceMutation) AddedIDs ¶
func (m *DepsUsageEvidenceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DepsUsageEvidenceMutation) AddedLine ¶
func (m *DepsUsageEvidenceMutation) AddedLine() (r int, exists bool)
AddedLine returns the value that was added to the "line" field in this mutation.
func (*DepsUsageEvidenceMutation) ClearEdge ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) ClearField ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) ClearIdentifier ¶
func (m *DepsUsageEvidenceMutation) ClearIdentifier()
ClearIdentifier clears the value of the "identifier" field.
func (*DepsUsageEvidenceMutation) ClearIsWildCardUsage ¶
func (m *DepsUsageEvidenceMutation) ClearIsWildCardUsage()
ClearIsWildCardUsage clears the value of the "is_wild_card_usage" field.
func (*DepsUsageEvidenceMutation) ClearModuleAlias ¶
func (m *DepsUsageEvidenceMutation) ClearModuleAlias()
ClearModuleAlias clears the value of the "module_alias" field.
func (*DepsUsageEvidenceMutation) ClearModuleItem ¶
func (m *DepsUsageEvidenceMutation) ClearModuleItem()
ClearModuleItem clears the value of the "module_item" field.
func (*DepsUsageEvidenceMutation) ClearPackageHint ¶
func (m *DepsUsageEvidenceMutation) ClearPackageHint()
ClearPackageHint clears the value of the "package_hint" field.
func (*DepsUsageEvidenceMutation) ClearUsedIn ¶
func (m *DepsUsageEvidenceMutation) ClearUsedIn()
ClearUsedIn clears the "used_in" edge to the CodeSourceFile entity.
func (*DepsUsageEvidenceMutation) ClearedEdges ¶
func (m *DepsUsageEvidenceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DepsUsageEvidenceMutation) ClearedFields ¶
func (m *DepsUsageEvidenceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DepsUsageEvidenceMutation) Client ¶
func (m DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) EdgeCleared ¶
func (m *DepsUsageEvidenceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DepsUsageEvidenceMutation) Field ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) FieldCleared ¶
func (m *DepsUsageEvidenceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DepsUsageEvidenceMutation) Fields ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) ID ¶
func (m *DepsUsageEvidenceMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DepsUsageEvidenceMutation) IDs ¶
func (m *DepsUsageEvidenceMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DepsUsageEvidenceMutation) Identifier ¶
func (m *DepsUsageEvidenceMutation) Identifier() (r string, exists bool)
Identifier returns the value of the "identifier" field in the mutation.
func (*DepsUsageEvidenceMutation) IdentifierCleared ¶
func (m *DepsUsageEvidenceMutation) IdentifierCleared() bool
IdentifierCleared returns if the "identifier" field was cleared in this mutation.
func (*DepsUsageEvidenceMutation) IsWildCardUsage ¶
func (m *DepsUsageEvidenceMutation) IsWildCardUsage() (r bool, exists bool)
IsWildCardUsage returns the value of the "is_wild_card_usage" field in the mutation.
func (*DepsUsageEvidenceMutation) IsWildCardUsageCleared ¶
func (m *DepsUsageEvidenceMutation) IsWildCardUsageCleared() bool
IsWildCardUsageCleared returns if the "is_wild_card_usage" field was cleared in this mutation.
func (*DepsUsageEvidenceMutation) Line ¶
func (m *DepsUsageEvidenceMutation) Line() (r uint, exists bool)
Line returns the value of the "line" field in the mutation.
func (*DepsUsageEvidenceMutation) ModuleAlias ¶
func (m *DepsUsageEvidenceMutation) ModuleAlias() (r string, exists bool)
ModuleAlias returns the value of the "module_alias" field in the mutation.
func (*DepsUsageEvidenceMutation) ModuleAliasCleared ¶
func (m *DepsUsageEvidenceMutation) ModuleAliasCleared() bool
ModuleAliasCleared returns if the "module_alias" field was cleared in this mutation.
func (*DepsUsageEvidenceMutation) ModuleItem ¶
func (m *DepsUsageEvidenceMutation) ModuleItem() (r string, exists bool)
ModuleItem returns the value of the "module_item" field in the mutation.
func (*DepsUsageEvidenceMutation) ModuleItemCleared ¶
func (m *DepsUsageEvidenceMutation) ModuleItemCleared() bool
ModuleItemCleared returns if the "module_item" field was cleared in this mutation.
func (*DepsUsageEvidenceMutation) ModuleName ¶
func (m *DepsUsageEvidenceMutation) ModuleName() (r string, exists bool)
ModuleName returns the value of the "module_name" field in the mutation.
func (*DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) OldIdentifier ¶
func (m *DepsUsageEvidenceMutation) OldIdentifier(ctx context.Context) (v *string, err error)
OldIdentifier returns the old "identifier" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) OldIsWildCardUsage ¶
func (m *DepsUsageEvidenceMutation) OldIsWildCardUsage(ctx context.Context) (v bool, err error)
OldIsWildCardUsage returns the old "is_wild_card_usage" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) OldLine ¶
func (m *DepsUsageEvidenceMutation) OldLine(ctx context.Context) (v uint, err error)
OldLine returns the old "line" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) OldModuleAlias ¶
func (m *DepsUsageEvidenceMutation) OldModuleAlias(ctx context.Context) (v *string, err error)
OldModuleAlias returns the old "module_alias" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) OldModuleItem ¶
func (m *DepsUsageEvidenceMutation) OldModuleItem(ctx context.Context) (v *string, err error)
OldModuleItem returns the old "module_item" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) OldModuleName ¶
func (m *DepsUsageEvidenceMutation) OldModuleName(ctx context.Context) (v string, err error)
OldModuleName returns the old "module_name" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) OldPackageHint ¶
func (m *DepsUsageEvidenceMutation) OldPackageHint(ctx context.Context) (v *string, err error)
OldPackageHint returns the old "package_hint" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) OldUsageFilePath ¶
func (m *DepsUsageEvidenceMutation) OldUsageFilePath(ctx context.Context) (v string, err error)
OldUsageFilePath returns the old "usage_file_path" field's value of the DepsUsageEvidence entity. If the DepsUsageEvidence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DepsUsageEvidenceMutation) Op ¶
func (m *DepsUsageEvidenceMutation) Op() Op
Op returns the operation name.
func (*DepsUsageEvidenceMutation) PackageHint ¶
func (m *DepsUsageEvidenceMutation) PackageHint() (r string, exists bool)
PackageHint returns the value of the "package_hint" field in the mutation.
func (*DepsUsageEvidenceMutation) PackageHintCleared ¶
func (m *DepsUsageEvidenceMutation) PackageHintCleared() bool
PackageHintCleared returns if the "package_hint" field was cleared in this mutation.
func (*DepsUsageEvidenceMutation) RemovedEdges ¶
func (m *DepsUsageEvidenceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DepsUsageEvidenceMutation) RemovedIDs ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) ResetEdge ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) ResetField ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) ResetIdentifier ¶
func (m *DepsUsageEvidenceMutation) ResetIdentifier()
ResetIdentifier resets all changes to the "identifier" field.
func (*DepsUsageEvidenceMutation) ResetIsWildCardUsage ¶
func (m *DepsUsageEvidenceMutation) ResetIsWildCardUsage()
ResetIsWildCardUsage resets all changes to the "is_wild_card_usage" field.
func (*DepsUsageEvidenceMutation) ResetLine ¶
func (m *DepsUsageEvidenceMutation) ResetLine()
ResetLine resets all changes to the "line" field.
func (*DepsUsageEvidenceMutation) ResetModuleAlias ¶
func (m *DepsUsageEvidenceMutation) ResetModuleAlias()
ResetModuleAlias resets all changes to the "module_alias" field.
func (*DepsUsageEvidenceMutation) ResetModuleItem ¶
func (m *DepsUsageEvidenceMutation) ResetModuleItem()
ResetModuleItem resets all changes to the "module_item" field.
func (*DepsUsageEvidenceMutation) ResetModuleName ¶
func (m *DepsUsageEvidenceMutation) ResetModuleName()
ResetModuleName resets all changes to the "module_name" field.
func (*DepsUsageEvidenceMutation) ResetPackageHint ¶
func (m *DepsUsageEvidenceMutation) ResetPackageHint()
ResetPackageHint resets all changes to the "package_hint" field.
func (*DepsUsageEvidenceMutation) ResetUsageFilePath ¶
func (m *DepsUsageEvidenceMutation) ResetUsageFilePath()
ResetUsageFilePath resets all changes to the "usage_file_path" field.
func (*DepsUsageEvidenceMutation) ResetUsedIn ¶
func (m *DepsUsageEvidenceMutation) ResetUsedIn()
ResetUsedIn resets all changes to the "used_in" edge.
func (*DepsUsageEvidenceMutation) SetField ¶
func (m *DepsUsageEvidenceMutation) 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 (*DepsUsageEvidenceMutation) SetIdentifier ¶
func (m *DepsUsageEvidenceMutation) SetIdentifier(s string)
SetIdentifier sets the "identifier" field.
func (*DepsUsageEvidenceMutation) SetIsWildCardUsage ¶
func (m *DepsUsageEvidenceMutation) SetIsWildCardUsage(b bool)
SetIsWildCardUsage sets the "is_wild_card_usage" field.
func (*DepsUsageEvidenceMutation) SetLine ¶
func (m *DepsUsageEvidenceMutation) SetLine(u uint)
SetLine sets the "line" field.
func (*DepsUsageEvidenceMutation) SetModuleAlias ¶
func (m *DepsUsageEvidenceMutation) SetModuleAlias(s string)
SetModuleAlias sets the "module_alias" field.
func (*DepsUsageEvidenceMutation) SetModuleItem ¶
func (m *DepsUsageEvidenceMutation) SetModuleItem(s string)
SetModuleItem sets the "module_item" field.
func (*DepsUsageEvidenceMutation) SetModuleName ¶
func (m *DepsUsageEvidenceMutation) SetModuleName(s string)
SetModuleName sets the "module_name" field.
func (*DepsUsageEvidenceMutation) SetOp ¶
func (m *DepsUsageEvidenceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DepsUsageEvidenceMutation) SetPackageHint ¶
func (m *DepsUsageEvidenceMutation) SetPackageHint(s string)
SetPackageHint sets the "package_hint" field.
func (*DepsUsageEvidenceMutation) SetUsageFilePath ¶
func (m *DepsUsageEvidenceMutation) SetUsageFilePath(s string)
SetUsageFilePath sets the "usage_file_path" field.
func (*DepsUsageEvidenceMutation) SetUsedInID ¶
func (m *DepsUsageEvidenceMutation) SetUsedInID(id int)
SetUsedInID sets the "used_in" edge to the CodeSourceFile entity by id.
func (DepsUsageEvidenceMutation) Tx ¶
func (m DepsUsageEvidenceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DepsUsageEvidenceMutation) Type ¶
func (m *DepsUsageEvidenceMutation) Type() string
Type returns the node type of this mutation (DepsUsageEvidence).
func (*DepsUsageEvidenceMutation) UsageFilePath ¶
func (m *DepsUsageEvidenceMutation) UsageFilePath() (r string, exists bool)
UsageFilePath returns the value of the "usage_file_path" field in the mutation.
func (*DepsUsageEvidenceMutation) UsedInCleared ¶
func (m *DepsUsageEvidenceMutation) UsedInCleared() bool
UsedInCleared reports if the "used_in" edge to the CodeSourceFile entity was cleared.
func (*DepsUsageEvidenceMutation) UsedInID ¶
func (m *DepsUsageEvidenceMutation) UsedInID() (id int, exists bool)
UsedInID returns the "used_in" edge ID in the mutation.
func (*DepsUsageEvidenceMutation) UsedInIDs ¶
func (m *DepsUsageEvidenceMutation) UsedInIDs() (ids []int)
UsedInIDs returns the "used_in" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UsedInID instead. It exists only for internal usage by the builders.
func (*DepsUsageEvidenceMutation) Where ¶
func (m *DepsUsageEvidenceMutation) Where(ps ...predicate.DepsUsageEvidence)
Where appends a list predicates to the DepsUsageEvidenceMutation builder.
func (*DepsUsageEvidenceMutation) WhereP ¶
func (m *DepsUsageEvidenceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DepsUsageEvidenceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DepsUsageEvidenceQuery ¶
type DepsUsageEvidenceQuery struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceQuery is the builder for querying DepsUsageEvidence entities.
func (*DepsUsageEvidenceQuery) Aggregate ¶
func (dueq *DepsUsageEvidenceQuery) Aggregate(fns ...AggregateFunc) *DepsUsageEvidenceSelect
Aggregate returns a DepsUsageEvidenceSelect configured with the given aggregations.
func (*DepsUsageEvidenceQuery) All ¶
func (dueq *DepsUsageEvidenceQuery) All(ctx context.Context) ([]*DepsUsageEvidence, error)
All executes the query and returns a list of DepsUsageEvidences.
func (*DepsUsageEvidenceQuery) AllX ¶
func (dueq *DepsUsageEvidenceQuery) AllX(ctx context.Context) []*DepsUsageEvidence
AllX is like All, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) Clone ¶
func (dueq *DepsUsageEvidenceQuery) Clone() *DepsUsageEvidenceQuery
Clone returns a duplicate of the DepsUsageEvidenceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DepsUsageEvidenceQuery) Count ¶
func (dueq *DepsUsageEvidenceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DepsUsageEvidenceQuery) CountX ¶
func (dueq *DepsUsageEvidenceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) Exist ¶
func (dueq *DepsUsageEvidenceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DepsUsageEvidenceQuery) ExistX ¶
func (dueq *DepsUsageEvidenceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) First ¶
func (dueq *DepsUsageEvidenceQuery) First(ctx context.Context) (*DepsUsageEvidence, error)
First returns the first DepsUsageEvidence entity from the query. Returns a *NotFoundError when no DepsUsageEvidence was found.
func (*DepsUsageEvidenceQuery) FirstID ¶
func (dueq *DepsUsageEvidenceQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first DepsUsageEvidence ID from the query. Returns a *NotFoundError when no DepsUsageEvidence ID was found.
func (*DepsUsageEvidenceQuery) FirstIDX ¶
func (dueq *DepsUsageEvidenceQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) FirstX ¶
func (dueq *DepsUsageEvidenceQuery) FirstX(ctx context.Context) *DepsUsageEvidence
FirstX is like First, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) GroupBy ¶
func (dueq *DepsUsageEvidenceQuery) GroupBy(field string, fields ...string) *DepsUsageEvidenceGroupBy
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 {
PackageHint string `json:"package_hint,omitempty"`
Count int `json:"count,omitempty"`
}
client.DepsUsageEvidence.Query().
GroupBy(depsusageevidence.FieldPackageHint).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*DepsUsageEvidenceQuery) IDs ¶
func (dueq *DepsUsageEvidenceQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of DepsUsageEvidence IDs.
func (*DepsUsageEvidenceQuery) IDsX ¶
func (dueq *DepsUsageEvidenceQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) Limit ¶
func (dueq *DepsUsageEvidenceQuery) Limit(limit int) *DepsUsageEvidenceQuery
Limit the number of records to be returned by this query.
func (*DepsUsageEvidenceQuery) Offset ¶
func (dueq *DepsUsageEvidenceQuery) Offset(offset int) *DepsUsageEvidenceQuery
Offset to start from.
func (*DepsUsageEvidenceQuery) Only ¶
func (dueq *DepsUsageEvidenceQuery) Only(ctx context.Context) (*DepsUsageEvidence, error)
Only returns a single DepsUsageEvidence entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DepsUsageEvidence entity is found. Returns a *NotFoundError when no DepsUsageEvidence entities are found.
func (*DepsUsageEvidenceQuery) OnlyID ¶
func (dueq *DepsUsageEvidenceQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only DepsUsageEvidence ID in the query. Returns a *NotSingularError when more than one DepsUsageEvidence ID is found. Returns a *NotFoundError when no entities are found.
func (*DepsUsageEvidenceQuery) OnlyIDX ¶
func (dueq *DepsUsageEvidenceQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) OnlyX ¶
func (dueq *DepsUsageEvidenceQuery) OnlyX(ctx context.Context) *DepsUsageEvidence
OnlyX is like Only, but panics if an error occurs.
func (*DepsUsageEvidenceQuery) Order ¶
func (dueq *DepsUsageEvidenceQuery) Order(o ...depsusageevidence.OrderOption) *DepsUsageEvidenceQuery
Order specifies how the records should be ordered.
func (*DepsUsageEvidenceQuery) QueryUsedIn ¶
func (dueq *DepsUsageEvidenceQuery) QueryUsedIn() *CodeSourceFileQuery
QueryUsedIn chains the current query on the "used_in" edge.
func (*DepsUsageEvidenceQuery) Select ¶
func (dueq *DepsUsageEvidenceQuery) Select(fields ...string) *DepsUsageEvidenceSelect
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 {
PackageHint string `json:"package_hint,omitempty"`
}
client.DepsUsageEvidence.Query().
Select(depsusageevidence.FieldPackageHint).
Scan(ctx, &v)
func (*DepsUsageEvidenceQuery) Unique ¶
func (dueq *DepsUsageEvidenceQuery) Unique(unique bool) *DepsUsageEvidenceQuery
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 (*DepsUsageEvidenceQuery) Where ¶
func (dueq *DepsUsageEvidenceQuery) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceQuery
Where adds a new predicate for the DepsUsageEvidenceQuery builder.
func (*DepsUsageEvidenceQuery) WithUsedIn ¶
func (dueq *DepsUsageEvidenceQuery) WithUsedIn(opts ...func(*CodeSourceFileQuery)) *DepsUsageEvidenceQuery
WithUsedIn tells the query-builder to eager-load the nodes that are connected to the "used_in" edge. The optional arguments are used to configure the query builder of the edge.
type DepsUsageEvidenceSelect ¶
type DepsUsageEvidenceSelect struct {
*DepsUsageEvidenceQuery
// contains filtered or unexported fields
}
DepsUsageEvidenceSelect is the builder for selecting fields of DepsUsageEvidence entities.
func (*DepsUsageEvidenceSelect) Aggregate ¶
func (dues *DepsUsageEvidenceSelect) Aggregate(fns ...AggregateFunc) *DepsUsageEvidenceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DepsUsageEvidenceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DepsUsageEvidenceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DepsUsageEvidenceSelect) Scan ¶
func (dues *DepsUsageEvidenceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DepsUsageEvidenceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DepsUsageEvidenceUpdate ¶
type DepsUsageEvidenceUpdate struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceUpdate is the builder for updating DepsUsageEvidence entities.
func (*DepsUsageEvidenceUpdate) AddLine ¶
func (dueu *DepsUsageEvidenceUpdate) AddLine(u int) *DepsUsageEvidenceUpdate
AddLine adds u to the "line" field.
func (*DepsUsageEvidenceUpdate) ClearIdentifier ¶
func (dueu *DepsUsageEvidenceUpdate) ClearIdentifier() *DepsUsageEvidenceUpdate
ClearIdentifier clears the value of the "identifier" field.
func (*DepsUsageEvidenceUpdate) ClearIsWildCardUsage ¶
func (dueu *DepsUsageEvidenceUpdate) ClearIsWildCardUsage() *DepsUsageEvidenceUpdate
ClearIsWildCardUsage clears the value of the "is_wild_card_usage" field.
func (*DepsUsageEvidenceUpdate) ClearModuleAlias ¶
func (dueu *DepsUsageEvidenceUpdate) ClearModuleAlias() *DepsUsageEvidenceUpdate
ClearModuleAlias clears the value of the "module_alias" field.
func (*DepsUsageEvidenceUpdate) ClearModuleItem ¶
func (dueu *DepsUsageEvidenceUpdate) ClearModuleItem() *DepsUsageEvidenceUpdate
ClearModuleItem clears the value of the "module_item" field.
func (*DepsUsageEvidenceUpdate) ClearPackageHint ¶
func (dueu *DepsUsageEvidenceUpdate) ClearPackageHint() *DepsUsageEvidenceUpdate
ClearPackageHint clears the value of the "package_hint" field.
func (*DepsUsageEvidenceUpdate) ClearUsedIn ¶
func (dueu *DepsUsageEvidenceUpdate) ClearUsedIn() *DepsUsageEvidenceUpdate
ClearUsedIn clears the "used_in" edge to the CodeSourceFile entity.
func (*DepsUsageEvidenceUpdate) Exec ¶
func (dueu *DepsUsageEvidenceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DepsUsageEvidenceUpdate) ExecX ¶
func (dueu *DepsUsageEvidenceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepsUsageEvidenceUpdate) Mutation ¶
func (dueu *DepsUsageEvidenceUpdate) Mutation() *DepsUsageEvidenceMutation
Mutation returns the DepsUsageEvidenceMutation object of the builder.
func (*DepsUsageEvidenceUpdate) Save ¶
func (dueu *DepsUsageEvidenceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DepsUsageEvidenceUpdate) SaveX ¶
func (dueu *DepsUsageEvidenceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DepsUsageEvidenceUpdate) SetIdentifier ¶
func (dueu *DepsUsageEvidenceUpdate) SetIdentifier(s string) *DepsUsageEvidenceUpdate
SetIdentifier sets the "identifier" field.
func (*DepsUsageEvidenceUpdate) SetIsWildCardUsage ¶
func (dueu *DepsUsageEvidenceUpdate) SetIsWildCardUsage(b bool) *DepsUsageEvidenceUpdate
SetIsWildCardUsage sets the "is_wild_card_usage" field.
func (*DepsUsageEvidenceUpdate) SetLine ¶
func (dueu *DepsUsageEvidenceUpdate) SetLine(u uint) *DepsUsageEvidenceUpdate
SetLine sets the "line" field.
func (*DepsUsageEvidenceUpdate) SetModuleAlias ¶
func (dueu *DepsUsageEvidenceUpdate) SetModuleAlias(s string) *DepsUsageEvidenceUpdate
SetModuleAlias sets the "module_alias" field.
func (*DepsUsageEvidenceUpdate) SetModuleItem ¶
func (dueu *DepsUsageEvidenceUpdate) SetModuleItem(s string) *DepsUsageEvidenceUpdate
SetModuleItem sets the "module_item" field.
func (*DepsUsageEvidenceUpdate) SetModuleName ¶
func (dueu *DepsUsageEvidenceUpdate) SetModuleName(s string) *DepsUsageEvidenceUpdate
SetModuleName sets the "module_name" field.
func (*DepsUsageEvidenceUpdate) SetNillableIdentifier ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillableIdentifier(s *string) *DepsUsageEvidenceUpdate
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetNillableIsWildCardUsage ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillableIsWildCardUsage(b *bool) *DepsUsageEvidenceUpdate
SetNillableIsWildCardUsage sets the "is_wild_card_usage" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetNillableLine ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillableLine(u *uint) *DepsUsageEvidenceUpdate
SetNillableLine sets the "line" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetNillableModuleAlias ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillableModuleAlias(s *string) *DepsUsageEvidenceUpdate
SetNillableModuleAlias sets the "module_alias" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetNillableModuleItem ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillableModuleItem(s *string) *DepsUsageEvidenceUpdate
SetNillableModuleItem sets the "module_item" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetNillableModuleName ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillableModuleName(s *string) *DepsUsageEvidenceUpdate
SetNillableModuleName sets the "module_name" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetNillablePackageHint ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillablePackageHint(s *string) *DepsUsageEvidenceUpdate
SetNillablePackageHint sets the "package_hint" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetNillableUsageFilePath ¶
func (dueu *DepsUsageEvidenceUpdate) SetNillableUsageFilePath(s *string) *DepsUsageEvidenceUpdate
SetNillableUsageFilePath sets the "usage_file_path" field if the given value is not nil.
func (*DepsUsageEvidenceUpdate) SetPackageHint ¶
func (dueu *DepsUsageEvidenceUpdate) SetPackageHint(s string) *DepsUsageEvidenceUpdate
SetPackageHint sets the "package_hint" field.
func (*DepsUsageEvidenceUpdate) SetUsageFilePath ¶
func (dueu *DepsUsageEvidenceUpdate) SetUsageFilePath(s string) *DepsUsageEvidenceUpdate
SetUsageFilePath sets the "usage_file_path" field.
func (*DepsUsageEvidenceUpdate) SetUsedIn ¶
func (dueu *DepsUsageEvidenceUpdate) SetUsedIn(c *CodeSourceFile) *DepsUsageEvidenceUpdate
SetUsedIn sets the "used_in" edge to the CodeSourceFile entity.
func (*DepsUsageEvidenceUpdate) SetUsedInID ¶
func (dueu *DepsUsageEvidenceUpdate) SetUsedInID(id int) *DepsUsageEvidenceUpdate
SetUsedInID sets the "used_in" edge to the CodeSourceFile entity by ID.
func (*DepsUsageEvidenceUpdate) Where ¶
func (dueu *DepsUsageEvidenceUpdate) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceUpdate
Where appends a list predicates to the DepsUsageEvidenceUpdate builder.
type DepsUsageEvidenceUpdateOne ¶
type DepsUsageEvidenceUpdateOne struct {
// contains filtered or unexported fields
}
DepsUsageEvidenceUpdateOne is the builder for updating a single DepsUsageEvidence entity.
func (*DepsUsageEvidenceUpdateOne) AddLine ¶
func (dueuo *DepsUsageEvidenceUpdateOne) AddLine(u int) *DepsUsageEvidenceUpdateOne
AddLine adds u to the "line" field.
func (*DepsUsageEvidenceUpdateOne) ClearIdentifier ¶
func (dueuo *DepsUsageEvidenceUpdateOne) ClearIdentifier() *DepsUsageEvidenceUpdateOne
ClearIdentifier clears the value of the "identifier" field.
func (*DepsUsageEvidenceUpdateOne) ClearIsWildCardUsage ¶
func (dueuo *DepsUsageEvidenceUpdateOne) ClearIsWildCardUsage() *DepsUsageEvidenceUpdateOne
ClearIsWildCardUsage clears the value of the "is_wild_card_usage" field.
func (*DepsUsageEvidenceUpdateOne) ClearModuleAlias ¶
func (dueuo *DepsUsageEvidenceUpdateOne) ClearModuleAlias() *DepsUsageEvidenceUpdateOne
ClearModuleAlias clears the value of the "module_alias" field.
func (*DepsUsageEvidenceUpdateOne) ClearModuleItem ¶
func (dueuo *DepsUsageEvidenceUpdateOne) ClearModuleItem() *DepsUsageEvidenceUpdateOne
ClearModuleItem clears the value of the "module_item" field.
func (*DepsUsageEvidenceUpdateOne) ClearPackageHint ¶
func (dueuo *DepsUsageEvidenceUpdateOne) ClearPackageHint() *DepsUsageEvidenceUpdateOne
ClearPackageHint clears the value of the "package_hint" field.
func (*DepsUsageEvidenceUpdateOne) ClearUsedIn ¶
func (dueuo *DepsUsageEvidenceUpdateOne) ClearUsedIn() *DepsUsageEvidenceUpdateOne
ClearUsedIn clears the "used_in" edge to the CodeSourceFile entity.
func (*DepsUsageEvidenceUpdateOne) Exec ¶
func (dueuo *DepsUsageEvidenceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DepsUsageEvidenceUpdateOne) ExecX ¶
func (dueuo *DepsUsageEvidenceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepsUsageEvidenceUpdateOne) Mutation ¶
func (dueuo *DepsUsageEvidenceUpdateOne) Mutation() *DepsUsageEvidenceMutation
Mutation returns the DepsUsageEvidenceMutation object of the builder.
func (*DepsUsageEvidenceUpdateOne) Save ¶
func (dueuo *DepsUsageEvidenceUpdateOne) Save(ctx context.Context) (*DepsUsageEvidence, error)
Save executes the query and returns the updated DepsUsageEvidence entity.
func (*DepsUsageEvidenceUpdateOne) SaveX ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SaveX(ctx context.Context) *DepsUsageEvidence
SaveX is like Save, but panics if an error occurs.
func (*DepsUsageEvidenceUpdateOne) Select ¶
func (dueuo *DepsUsageEvidenceUpdateOne) Select(field string, fields ...string) *DepsUsageEvidenceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DepsUsageEvidenceUpdateOne) SetIdentifier ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetIdentifier(s string) *DepsUsageEvidenceUpdateOne
SetIdentifier sets the "identifier" field.
func (*DepsUsageEvidenceUpdateOne) SetIsWildCardUsage ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetIsWildCardUsage(b bool) *DepsUsageEvidenceUpdateOne
SetIsWildCardUsage sets the "is_wild_card_usage" field.
func (*DepsUsageEvidenceUpdateOne) SetLine ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetLine(u uint) *DepsUsageEvidenceUpdateOne
SetLine sets the "line" field.
func (*DepsUsageEvidenceUpdateOne) SetModuleAlias ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetModuleAlias(s string) *DepsUsageEvidenceUpdateOne
SetModuleAlias sets the "module_alias" field.
func (*DepsUsageEvidenceUpdateOne) SetModuleItem ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetModuleItem(s string) *DepsUsageEvidenceUpdateOne
SetModuleItem sets the "module_item" field.
func (*DepsUsageEvidenceUpdateOne) SetModuleName ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetModuleName(s string) *DepsUsageEvidenceUpdateOne
SetModuleName sets the "module_name" field.
func (*DepsUsageEvidenceUpdateOne) SetNillableIdentifier ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableIdentifier(s *string) *DepsUsageEvidenceUpdateOne
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetNillableIsWildCardUsage ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableIsWildCardUsage(b *bool) *DepsUsageEvidenceUpdateOne
SetNillableIsWildCardUsage sets the "is_wild_card_usage" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetNillableLine ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableLine(u *uint) *DepsUsageEvidenceUpdateOne
SetNillableLine sets the "line" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetNillableModuleAlias ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableModuleAlias(s *string) *DepsUsageEvidenceUpdateOne
SetNillableModuleAlias sets the "module_alias" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetNillableModuleItem ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableModuleItem(s *string) *DepsUsageEvidenceUpdateOne
SetNillableModuleItem sets the "module_item" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetNillableModuleName ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableModuleName(s *string) *DepsUsageEvidenceUpdateOne
SetNillableModuleName sets the "module_name" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetNillablePackageHint ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillablePackageHint(s *string) *DepsUsageEvidenceUpdateOne
SetNillablePackageHint sets the "package_hint" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetNillableUsageFilePath ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetNillableUsageFilePath(s *string) *DepsUsageEvidenceUpdateOne
SetNillableUsageFilePath sets the "usage_file_path" field if the given value is not nil.
func (*DepsUsageEvidenceUpdateOne) SetPackageHint ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetPackageHint(s string) *DepsUsageEvidenceUpdateOne
SetPackageHint sets the "package_hint" field.
func (*DepsUsageEvidenceUpdateOne) SetUsageFilePath ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetUsageFilePath(s string) *DepsUsageEvidenceUpdateOne
SetUsageFilePath sets the "usage_file_path" field.
func (*DepsUsageEvidenceUpdateOne) SetUsedIn ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetUsedIn(c *CodeSourceFile) *DepsUsageEvidenceUpdateOne
SetUsedIn sets the "used_in" edge to the CodeSourceFile entity.
func (*DepsUsageEvidenceUpdateOne) SetUsedInID ¶
func (dueuo *DepsUsageEvidenceUpdateOne) SetUsedInID(id int) *DepsUsageEvidenceUpdateOne
SetUsedInID sets the "used_in" edge to the CodeSourceFile entity by ID.
func (*DepsUsageEvidenceUpdateOne) Where ¶
func (dueuo *DepsUsageEvidenceUpdateOne) Where(ps ...predicate.DepsUsageEvidence) *DepsUsageEvidenceUpdateOne
Where appends a list predicates to the DepsUsageEvidenceUpdate builder.
type DepsUsageEvidences ¶
type DepsUsageEvidences []*DepsUsageEvidence
DepsUsageEvidences is a parsable slice of DepsUsageEvidence.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// CodeSourceFile is the client for interacting with the CodeSourceFile builders.
CodeSourceFile *CodeSourceFileClient
// DepsUsageEvidence is the client for interacting with the DepsUsageEvidence builders.
DepsUsageEvidence *DepsUsageEvidenceClient
// 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.