ent

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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 Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

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(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

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.

func (*CodeSourceFile) Value

func (csf *CodeSourceFile) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CodeSourceFile. This includes values selected through modifiers, order, etc.

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

Create returns a builder for creating a CodeSourceFile entity.

func (*CodeSourceFileClient) CreateBulk

CreateBulk returns a builder for creating a bulk of CodeSourceFile entities.

func (*CodeSourceFileClient) Delete

Delete returns a delete builder for CodeSourceFile.

func (*CodeSourceFileClient) DeleteOne

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

Get returns a CodeSourceFile entity by its id.

func (*CodeSourceFileClient) GetX

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

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

Update returns an update builder for CodeSourceFile.

func (*CodeSourceFileClient) UpdateOne

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

Save creates the CodeSourceFile in the database.

func (*CodeSourceFileCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CodeSourceFileCreate) SetPath

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

Save creates the CodeSourceFile entities in the database.

func (*CodeSourceFileCreateBulk) SaveX

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

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

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

func (s *CodeSourceFileGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) BoolX

func (s *CodeSourceFileGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CodeSourceFileGroupBy) Bools

func (s *CodeSourceFileGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) BoolsX

func (s *CodeSourceFileGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CodeSourceFileGroupBy) Float64

func (s *CodeSourceFileGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) Float64X

func (s *CodeSourceFileGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CodeSourceFileGroupBy) Float64s

func (s *CodeSourceFileGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) Float64sX

func (s *CodeSourceFileGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CodeSourceFileGroupBy) Int

func (s *CodeSourceFileGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) IntX

func (s *CodeSourceFileGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CodeSourceFileGroupBy) Ints

func (s *CodeSourceFileGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) IntsX

func (s *CodeSourceFileGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *CodeSourceFileGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CodeSourceFileGroupBy) String

func (s *CodeSourceFileGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) StringX

func (s *CodeSourceFileGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CodeSourceFileGroupBy) Strings

func (s *CodeSourceFileGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileGroupBy) StringsX

func (s *CodeSourceFileGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

func (m *CodeSourceFileMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

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

All executes the query and returns a list of CodeSourceFiles.

func (*CodeSourceFileQuery) AllX

AllX is like All, but panics if an error occurs.

func (*CodeSourceFileQuery) Clone

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

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*CodeSourceFileQuery) Order

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

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

func (s *CodeSourceFileSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) BoolX

func (s *CodeSourceFileSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CodeSourceFileSelect) Bools

func (s *CodeSourceFileSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) BoolsX

func (s *CodeSourceFileSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CodeSourceFileSelect) Float64

func (s *CodeSourceFileSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) Float64X

func (s *CodeSourceFileSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CodeSourceFileSelect) Float64s

func (s *CodeSourceFileSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) Float64sX

func (s *CodeSourceFileSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CodeSourceFileSelect) Int

func (s *CodeSourceFileSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) IntX

func (s *CodeSourceFileSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CodeSourceFileSelect) Ints

func (s *CodeSourceFileSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) IntsX

func (s *CodeSourceFileSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *CodeSourceFileSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CodeSourceFileSelect) String

func (s *CodeSourceFileSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) StringX

func (s *CodeSourceFileSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CodeSourceFileSelect) Strings

func (s *CodeSourceFileSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CodeSourceFileSelect) StringsX

func (s *CodeSourceFileSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

SetPath sets the "path" field.

func (*CodeSourceFileUpdate) Where

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

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

Save executes the query and returns the updated CodeSourceFile entity.

func (*CodeSourceFileUpdateOne) SaveX

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

SetPath sets the "path" field.

func (*CodeSourceFileUpdateOne) Where

Where appends a list predicates to the CodeSourceFileUpdate builder.

type CodeSourceFiles

type CodeSourceFiles []*CodeSourceFile

CodeSourceFiles is a parsable slice of CodeSourceFile.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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

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.

func (*DepsUsageEvidence) Value

func (due *DepsUsageEvidence) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DepsUsageEvidence. This includes values selected through modifiers, order, etc.

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

Create returns a builder for creating a DepsUsageEvidence entity.

func (*DepsUsageEvidenceClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DepsUsageEvidence entities.

func (*DepsUsageEvidenceClient) Delete

Delete returns a delete builder for DepsUsageEvidence.

func (*DepsUsageEvidenceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DepsUsageEvidenceClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DepsUsageEvidenceClient) Get

Get returns a DepsUsageEvidence entity by its id.

func (*DepsUsageEvidenceClient) GetX

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

Query returns a query builder for DepsUsageEvidence.

func (*DepsUsageEvidenceClient) QueryUsedIn

QueryUsedIn queries the used_in edge of a DepsUsageEvidence.

func (*DepsUsageEvidenceClient) Update

Update returns an update builder for DepsUsageEvidence.

func (*DepsUsageEvidenceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DepsUsageEvidenceClient) UpdateOneID

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

Mutation returns the DepsUsageEvidenceMutation object of the builder.

func (*DepsUsageEvidenceCreate) Save

Save creates the DepsUsageEvidence in the database.

func (*DepsUsageEvidenceCreate) SaveX

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

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

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

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

Save creates the DepsUsageEvidence entities in the database.

func (*DepsUsageEvidenceCreateBulk) SaveX

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

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

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

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

Aggregate adds the given aggregation functions to the group-by query.

func (*DepsUsageEvidenceGroupBy) Bool

func (s *DepsUsageEvidenceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) BoolX

func (s *DepsUsageEvidenceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DepsUsageEvidenceGroupBy) Bools

func (s *DepsUsageEvidenceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) BoolsX

func (s *DepsUsageEvidenceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DepsUsageEvidenceGroupBy) Float64

func (s *DepsUsageEvidenceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) Float64X

func (s *DepsUsageEvidenceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DepsUsageEvidenceGroupBy) Float64s

func (s *DepsUsageEvidenceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) Float64sX

func (s *DepsUsageEvidenceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DepsUsageEvidenceGroupBy) Int

func (s *DepsUsageEvidenceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) IntX

func (s *DepsUsageEvidenceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DepsUsageEvidenceGroupBy) Ints

func (s *DepsUsageEvidenceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) IntsX

func (s *DepsUsageEvidenceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *DepsUsageEvidenceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DepsUsageEvidenceGroupBy) String

func (s *DepsUsageEvidenceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) StringX

func (s *DepsUsageEvidenceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DepsUsageEvidenceGroupBy) Strings

func (s *DepsUsageEvidenceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceGroupBy) StringsX

func (s *DepsUsageEvidenceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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

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

func (m *DepsUsageEvidenceMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*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

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

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

Aggregate returns a DepsUsageEvidenceSelect configured with the given aggregations.

func (*DepsUsageEvidenceQuery) All

All executes the query and returns a list of DepsUsageEvidences.

func (*DepsUsageEvidenceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DepsUsageEvidenceQuery) Clone

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

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

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*DepsUsageEvidenceQuery) Order

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

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

Aggregate adds the given aggregation functions to the selector query.

func (*DepsUsageEvidenceSelect) Bool

func (s *DepsUsageEvidenceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) BoolX

func (s *DepsUsageEvidenceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DepsUsageEvidenceSelect) Bools

func (s *DepsUsageEvidenceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) BoolsX

func (s *DepsUsageEvidenceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DepsUsageEvidenceSelect) Float64

func (s *DepsUsageEvidenceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) Float64X

func (s *DepsUsageEvidenceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DepsUsageEvidenceSelect) Float64s

func (s *DepsUsageEvidenceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) Float64sX

func (s *DepsUsageEvidenceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DepsUsageEvidenceSelect) Int

func (s *DepsUsageEvidenceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) IntX

func (s *DepsUsageEvidenceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DepsUsageEvidenceSelect) Ints

func (s *DepsUsageEvidenceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) IntsX

func (s *DepsUsageEvidenceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *DepsUsageEvidenceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DepsUsageEvidenceSelect) String

func (s *DepsUsageEvidenceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) StringX

func (s *DepsUsageEvidenceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DepsUsageEvidenceSelect) Strings

func (s *DepsUsageEvidenceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DepsUsageEvidenceSelect) StringsX

func (s *DepsUsageEvidenceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DepsUsageEvidenceUpdate

type DepsUsageEvidenceUpdate struct {
	// contains filtered or unexported fields
}

DepsUsageEvidenceUpdate is the builder for updating DepsUsageEvidence entities.

func (*DepsUsageEvidenceUpdate) AddLine

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

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

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

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

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

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

ClearUsedIn clears the "used_in" edge to the CodeSourceFile entity.

func (*DepsUsageEvidenceUpdateOne) Exec

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

Mutation returns the DepsUsageEvidenceMutation object of the builder.

func (*DepsUsageEvidenceUpdateOne) Save

Save executes the query and returns the updated DepsUsageEvidence entity.

func (*DepsUsageEvidenceUpdateOne) SaveX

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

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

SetLine sets the "line" field.

func (*DepsUsageEvidenceUpdateOne) SetModuleAlias

SetModuleAlias sets the "module_alias" field.

func (*DepsUsageEvidenceUpdateOne) SetModuleItem

SetModuleItem sets the "module_item" field.

func (*DepsUsageEvidenceUpdateOne) SetModuleName

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

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

SetUsedIn sets the "used_in" edge to the CodeSourceFile entity.

func (*DepsUsageEvidenceUpdateOne) SetUsedInID

SetUsedInID sets the "used_in" edge to the CodeSourceFile entity by ID.

func (*DepsUsageEvidenceUpdateOne) Where

Where appends a list predicates to the DepsUsageEvidenceUpdate builder.

type DepsUsageEvidences

type DepsUsageEvidences []*DepsUsageEvidence

DepsUsageEvidences is a parsable slice of DepsUsageEvidence.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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 Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

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

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

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 Traverser

type Traverser = ent.Traverser

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

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL