ent

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 20 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.
	TypeVulnInformation = "VulnInformation"
)

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
	// VulnInformation is the client for interacting with the VulnInformation builders.
	VulnInformation *VulnInformationClient
	// 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().
	VulnInformation.
	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 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 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 {

	// VulnInformation is the client for interacting with the VulnInformation builders.
	VulnInformation *VulnInformationClient
	// 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.

type VulnInformation

type VulnInformation struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Severity holds the value of the "severity" field.
	Severity string `json:"severity,omitempty"`
	// Cve holds the value of the "cve" field.
	Cve string `json:"cve,omitempty"`
	// Disclosure holds the value of the "disclosure" field.
	Disclosure string `json:"disclosure,omitempty"`
	// Solutions holds the value of the "solutions" field.
	Solutions string `json:"solutions,omitempty"`
	// References holds the value of the "references" field.
	References []string `json:"references,omitempty"`
	// Tags holds the value of the "tags" field.
	Tags []string `json:"tags,omitempty"`
	// GithubSearch holds the value of the "github_search" field.
	GithubSearch []string `json:"github_search,omitempty"`
	// From holds the value of the "from" field.
	From string `json:"from,omitempty"`
	// Pushed holds the value of the "pushed" field.
	Pushed bool `json:"pushed,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

VulnInformation is the model entity for the VulnInformation schema.

func (*VulnInformation) String

func (vi *VulnInformation) String() string

String implements the fmt.Stringer.

func (*VulnInformation) Unwrap

func (vi *VulnInformation) Unwrap() *VulnInformation

Unwrap unwraps the VulnInformation 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 (*VulnInformation) Update

Update returns a builder for updating this VulnInformation. Note that you need to call VulnInformation.Unwrap() before calling this method if this VulnInformation was returned from a transaction, and the transaction was committed or rolled back.

func (*VulnInformation) Value added in v0.8.0

func (vi *VulnInformation) Value(name string) (ent.Value, error)

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

type VulnInformationClient

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

VulnInformationClient is a client for the VulnInformation schema.

func NewVulnInformationClient

func NewVulnInformationClient(c config) *VulnInformationClient

NewVulnInformationClient returns a client for the VulnInformation from the given config.

func (*VulnInformationClient) Create

Create returns a builder for creating a VulnInformation entity.

func (*VulnInformationClient) CreateBulk

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

func (*VulnInformationClient) Delete

Delete returns a delete builder for VulnInformation.

func (*VulnInformationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VulnInformationClient) DeleteOneID

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

func (*VulnInformationClient) Get

Get returns a VulnInformation entity by its id.

func (*VulnInformationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*VulnInformationClient) Hooks

func (c *VulnInformationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VulnInformationClient) Intercept

func (c *VulnInformationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vulninformation.Intercept(f(g(h())))`.

func (*VulnInformationClient) Interceptors

func (c *VulnInformationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VulnInformationClient) MapCreateBulk added in v1.2.2

func (c *VulnInformationClient) MapCreateBulk(slice any, setFunc func(*VulnInformationCreate, int)) *VulnInformationCreateBulk

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 (*VulnInformationClient) Query

Query returns a query builder for VulnInformation.

func (*VulnInformationClient) Update

Update returns an update builder for VulnInformation.

func (*VulnInformationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VulnInformationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VulnInformationClient) Use

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

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vulninformation.Hooks(f(g(h())))`.

type VulnInformationCreate

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

VulnInformationCreate is the builder for creating a VulnInformation entity.

func (*VulnInformationCreate) Exec

func (vic *VulnInformationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnInformationCreate) ExecX

func (vic *VulnInformationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationCreate) Mutation

Mutation returns the VulnInformationMutation object of the builder.

func (*VulnInformationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnInformation.Create().
	SetKey(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnInformationUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*VulnInformationCreate) OnConflictColumns

func (vic *VulnInformationCreate) OnConflictColumns(columns ...string) *VulnInformationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnInformation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnInformationCreate) Save

Save creates the VulnInformation in the database.

func (*VulnInformationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VulnInformationCreate) SetCreateTime added in v1.1.0

func (vic *VulnInformationCreate) SetCreateTime(t time.Time) *VulnInformationCreate

SetCreateTime sets the "create_time" field.

func (*VulnInformationCreate) SetCve

SetCve sets the "cve" field.

func (*VulnInformationCreate) SetDescription

func (vic *VulnInformationCreate) SetDescription(s string) *VulnInformationCreate

SetDescription sets the "description" field.

func (*VulnInformationCreate) SetDisclosure

func (vic *VulnInformationCreate) SetDisclosure(s string) *VulnInformationCreate

SetDisclosure sets the "disclosure" field.

func (*VulnInformationCreate) SetFrom

SetFrom sets the "from" field.

func (*VulnInformationCreate) SetGithubSearch added in v1.1.0

func (vic *VulnInformationCreate) SetGithubSearch(s []string) *VulnInformationCreate

SetGithubSearch sets the "github_search" field.

func (*VulnInformationCreate) SetKey

SetKey sets the "key" field.

func (*VulnInformationCreate) SetNillableCreateTime added in v1.1.0

func (vic *VulnInformationCreate) SetNillableCreateTime(t *time.Time) *VulnInformationCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableCve

func (vic *VulnInformationCreate) SetNillableCve(s *string) *VulnInformationCreate

SetNillableCve sets the "cve" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableDescription

func (vic *VulnInformationCreate) SetNillableDescription(s *string) *VulnInformationCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableDisclosure

func (vic *VulnInformationCreate) SetNillableDisclosure(s *string) *VulnInformationCreate

SetNillableDisclosure sets the "disclosure" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableFrom

func (vic *VulnInformationCreate) SetNillableFrom(s *string) *VulnInformationCreate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*VulnInformationCreate) SetNillablePushed added in v0.3.0

func (vic *VulnInformationCreate) SetNillablePushed(b *bool) *VulnInformationCreate

SetNillablePushed sets the "pushed" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableSeverity

func (vic *VulnInformationCreate) SetNillableSeverity(s *string) *VulnInformationCreate

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableSolutions

func (vic *VulnInformationCreate) SetNillableSolutions(s *string) *VulnInformationCreate

SetNillableSolutions sets the "solutions" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableTitle

func (vic *VulnInformationCreate) SetNillableTitle(s *string) *VulnInformationCreate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*VulnInformationCreate) SetNillableUpdateTime added in v1.1.0

func (vic *VulnInformationCreate) SetNillableUpdateTime(t *time.Time) *VulnInformationCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*VulnInformationCreate) SetPushed added in v0.3.0

SetPushed sets the "pushed" field.

func (*VulnInformationCreate) SetReferences

func (vic *VulnInformationCreate) SetReferences(s []string) *VulnInformationCreate

SetReferences sets the "references" field.

func (*VulnInformationCreate) SetSeverity

func (vic *VulnInformationCreate) SetSeverity(s string) *VulnInformationCreate

SetSeverity sets the "severity" field.

func (*VulnInformationCreate) SetSolutions

func (vic *VulnInformationCreate) SetSolutions(s string) *VulnInformationCreate

SetSolutions sets the "solutions" field.

func (*VulnInformationCreate) SetTags

SetTags sets the "tags" field.

func (*VulnInformationCreate) SetTitle

SetTitle sets the "title" field.

func (*VulnInformationCreate) SetUpdateTime added in v1.1.0

func (vic *VulnInformationCreate) SetUpdateTime(t time.Time) *VulnInformationCreate

SetUpdateTime sets the "update_time" field.

type VulnInformationCreateBulk

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

VulnInformationCreateBulk is the builder for creating many VulnInformation entities in bulk.

func (*VulnInformationCreateBulk) Exec

Exec executes the query.

func (*VulnInformationCreateBulk) ExecX

func (vicb *VulnInformationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnInformation.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnInformationUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*VulnInformationCreateBulk) OnConflictColumns

func (vicb *VulnInformationCreateBulk) OnConflictColumns(columns ...string) *VulnInformationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnInformation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VulnInformationCreateBulk) Save

Save creates the VulnInformation entities in the database.

func (*VulnInformationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type VulnInformationDelete

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

VulnInformationDelete is the builder for deleting a VulnInformation entity.

func (*VulnInformationDelete) Exec

func (vid *VulnInformationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VulnInformationDelete) ExecX

func (vid *VulnInformationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationDelete) Where

Where appends a list predicates to the VulnInformationDelete builder.

type VulnInformationDeleteOne

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

VulnInformationDeleteOne is the builder for deleting a single VulnInformation entity.

func (*VulnInformationDeleteOne) Exec

Exec executes the deletion query.

func (*VulnInformationDeleteOne) ExecX

func (vido *VulnInformationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationDeleteOne) Where

Where appends a list predicates to the VulnInformationDelete builder.

type VulnInformationGroupBy

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

VulnInformationGroupBy is the group-by builder for VulnInformation entities.

func (*VulnInformationGroupBy) Aggregate

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

func (*VulnInformationGroupBy) Bool

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

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

func (*VulnInformationGroupBy) BoolX

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

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

func (*VulnInformationGroupBy) Bools

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

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

func (*VulnInformationGroupBy) BoolsX

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

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

func (*VulnInformationGroupBy) Float64

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

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

func (*VulnInformationGroupBy) Float64X

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

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

func (*VulnInformationGroupBy) Float64s

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

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

func (*VulnInformationGroupBy) Float64sX

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

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

func (*VulnInformationGroupBy) Int

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

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

func (*VulnInformationGroupBy) IntX

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

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

func (*VulnInformationGroupBy) Ints

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

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

func (*VulnInformationGroupBy) IntsX

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

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

func (*VulnInformationGroupBy) Scan

func (vigb *VulnInformationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnInformationGroupBy) ScanX

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

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

func (*VulnInformationGroupBy) String

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

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

func (*VulnInformationGroupBy) StringX

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

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

func (*VulnInformationGroupBy) Strings

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

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

func (*VulnInformationGroupBy) StringsX

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

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

type VulnInformationMutation

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

VulnInformationMutation represents an operation that mutates the VulnInformation nodes in the graph.

func (*VulnInformationMutation) AddField

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) AddedEdges

func (m *VulnInformationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VulnInformationMutation) AddedField

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) AddedFields

func (m *VulnInformationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VulnInformationMutation) AddedIDs

func (m *VulnInformationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VulnInformationMutation) AppendGithubSearch added in v1.1.0

func (m *VulnInformationMutation) AppendGithubSearch(s []string)

AppendGithubSearch adds s to the "github_search" field.

func (*VulnInformationMutation) AppendReferences

func (m *VulnInformationMutation) AppendReferences(s []string)

AppendReferences adds s to the "references" field.

func (*VulnInformationMutation) AppendTags

func (m *VulnInformationMutation) AppendTags(s []string)

AppendTags adds s to the "tags" field.

func (*VulnInformationMutation) AppendedGithubSearch added in v1.1.0

func (m *VulnInformationMutation) AppendedGithubSearch() ([]string, bool)

AppendedGithubSearch returns the list of values that were appended to the "github_search" field in this mutation.

func (*VulnInformationMutation) AppendedReferences

func (m *VulnInformationMutation) AppendedReferences() ([]string, bool)

AppendedReferences returns the list of values that were appended to the "references" field in this mutation.

func (*VulnInformationMutation) AppendedTags

func (m *VulnInformationMutation) AppendedTags() ([]string, bool)

AppendedTags returns the list of values that were appended to the "tags" field in this mutation.

func (*VulnInformationMutation) ClearEdge

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) ClearField

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) ClearGithubSearch added in v1.1.0

func (m *VulnInformationMutation) ClearGithubSearch()

ClearGithubSearch clears the value of the "github_search" field.

func (*VulnInformationMutation) ClearReferences

func (m *VulnInformationMutation) ClearReferences()

ClearReferences clears the value of the "references" field.

func (*VulnInformationMutation) ClearTags

func (m *VulnInformationMutation) ClearTags()

ClearTags clears the value of the "tags" field.

func (*VulnInformationMutation) ClearedEdges

func (m *VulnInformationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VulnInformationMutation) ClearedFields

func (m *VulnInformationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VulnInformationMutation) Client

func (m VulnInformationMutation) 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 (*VulnInformationMutation) CreateTime added in v1.1.0

func (m *VulnInformationMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*VulnInformationMutation) Cve

func (m *VulnInformationMutation) Cve() (r string, exists bool)

Cve returns the value of the "cve" field in the mutation.

func (*VulnInformationMutation) Description

func (m *VulnInformationMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*VulnInformationMutation) Disclosure

func (m *VulnInformationMutation) Disclosure() (r string, exists bool)

Disclosure returns the value of the "disclosure" field in the mutation.

func (*VulnInformationMutation) EdgeCleared

func (m *VulnInformationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VulnInformationMutation) Field

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) FieldCleared

func (m *VulnInformationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VulnInformationMutation) Fields

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) From

func (m *VulnInformationMutation) From() (r string, exists bool)

From returns the value of the "from" field in the mutation.

func (*VulnInformationMutation) GithubSearch added in v1.1.0

func (m *VulnInformationMutation) GithubSearch() (r []string, exists bool)

GithubSearch returns the value of the "github_search" field in the mutation.

func (*VulnInformationMutation) GithubSearchCleared added in v1.1.0

func (m *VulnInformationMutation) GithubSearchCleared() bool

GithubSearchCleared returns if the "github_search" field was cleared in this mutation.

func (*VulnInformationMutation) ID

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) IDs

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) Key

func (m *VulnInformationMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*VulnInformationMutation) OldCreateTime added in v1.1.0

func (m *VulnInformationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldCve

func (m *VulnInformationMutation) OldCve(ctx context.Context) (v string, err error)

OldCve returns the old "cve" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldDescription

func (m *VulnInformationMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldDisclosure

func (m *VulnInformationMutation) OldDisclosure(ctx context.Context) (v string, err error)

OldDisclosure returns the old "disclosure" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldField

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) OldFrom

func (m *VulnInformationMutation) OldFrom(ctx context.Context) (v string, err error)

OldFrom returns the old "from" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldGithubSearch added in v1.1.0

func (m *VulnInformationMutation) OldGithubSearch(ctx context.Context) (v []string, err error)

OldGithubSearch returns the old "github_search" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldKey

func (m *VulnInformationMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldPushed added in v0.3.0

func (m *VulnInformationMutation) OldPushed(ctx context.Context) (v bool, err error)

OldPushed returns the old "pushed" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldReferences

func (m *VulnInformationMutation) OldReferences(ctx context.Context) (v []string, err error)

OldReferences returns the old "references" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldSeverity

func (m *VulnInformationMutation) OldSeverity(ctx context.Context) (v string, err error)

OldSeverity returns the old "severity" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldSolutions

func (m *VulnInformationMutation) OldSolutions(ctx context.Context) (v string, err error)

OldSolutions returns the old "solutions" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldTags

func (m *VulnInformationMutation) OldTags(ctx context.Context) (v []string, err error)

OldTags returns the old "tags" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldTitle

func (m *VulnInformationMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) OldUpdateTime added in v1.1.0

func (m *VulnInformationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the VulnInformation entity. If the VulnInformation 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 (*VulnInformationMutation) Op

func (m *VulnInformationMutation) Op() Op

Op returns the operation name.

func (*VulnInformationMutation) Pushed added in v0.3.0

func (m *VulnInformationMutation) Pushed() (r bool, exists bool)

Pushed returns the value of the "pushed" field in the mutation.

func (*VulnInformationMutation) References

func (m *VulnInformationMutation) References() (r []string, exists bool)

References returns the value of the "references" field in the mutation.

func (*VulnInformationMutation) ReferencesCleared

func (m *VulnInformationMutation) ReferencesCleared() bool

ReferencesCleared returns if the "references" field was cleared in this mutation.

func (*VulnInformationMutation) RemovedEdges

func (m *VulnInformationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VulnInformationMutation) RemovedIDs

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) ResetCreateTime added in v1.1.0

func (m *VulnInformationMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*VulnInformationMutation) ResetCve

func (m *VulnInformationMutation) ResetCve()

ResetCve resets all changes to the "cve" field.

func (*VulnInformationMutation) ResetDescription

func (m *VulnInformationMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*VulnInformationMutation) ResetDisclosure

func (m *VulnInformationMutation) ResetDisclosure()

ResetDisclosure resets all changes to the "disclosure" field.

func (*VulnInformationMutation) ResetEdge

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) ResetField

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) ResetFrom

func (m *VulnInformationMutation) ResetFrom()

ResetFrom resets all changes to the "from" field.

func (*VulnInformationMutation) ResetGithubSearch added in v1.1.0

func (m *VulnInformationMutation) ResetGithubSearch()

ResetGithubSearch resets all changes to the "github_search" field.

func (*VulnInformationMutation) ResetKey

func (m *VulnInformationMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*VulnInformationMutation) ResetPushed added in v0.3.0

func (m *VulnInformationMutation) ResetPushed()

ResetPushed resets all changes to the "pushed" field.

func (*VulnInformationMutation) ResetReferences

func (m *VulnInformationMutation) ResetReferences()

ResetReferences resets all changes to the "references" field.

func (*VulnInformationMutation) ResetSeverity

func (m *VulnInformationMutation) ResetSeverity()

ResetSeverity resets all changes to the "severity" field.

func (*VulnInformationMutation) ResetSolutions

func (m *VulnInformationMutation) ResetSolutions()

ResetSolutions resets all changes to the "solutions" field.

func (*VulnInformationMutation) ResetTags

func (m *VulnInformationMutation) ResetTags()

ResetTags resets all changes to the "tags" field.

func (*VulnInformationMutation) ResetTitle

func (m *VulnInformationMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*VulnInformationMutation) ResetUpdateTime added in v1.1.0

func (m *VulnInformationMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*VulnInformationMutation) SetCreateTime added in v1.1.0

func (m *VulnInformationMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*VulnInformationMutation) SetCve

func (m *VulnInformationMutation) SetCve(s string)

SetCve sets the "cve" field.

func (*VulnInformationMutation) SetDescription

func (m *VulnInformationMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*VulnInformationMutation) SetDisclosure

func (m *VulnInformationMutation) SetDisclosure(s string)

SetDisclosure sets the "disclosure" field.

func (*VulnInformationMutation) SetField

func (m *VulnInformationMutation) 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 (*VulnInformationMutation) SetFrom

func (m *VulnInformationMutation) SetFrom(s string)

SetFrom sets the "from" field.

func (*VulnInformationMutation) SetGithubSearch added in v1.1.0

func (m *VulnInformationMutation) SetGithubSearch(s []string)

SetGithubSearch sets the "github_search" field.

func (*VulnInformationMutation) SetKey

func (m *VulnInformationMutation) SetKey(s string)

SetKey sets the "key" field.

func (*VulnInformationMutation) SetOp

func (m *VulnInformationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VulnInformationMutation) SetPushed added in v0.3.0

func (m *VulnInformationMutation) SetPushed(b bool)

SetPushed sets the "pushed" field.

func (*VulnInformationMutation) SetReferences

func (m *VulnInformationMutation) SetReferences(s []string)

SetReferences sets the "references" field.

func (*VulnInformationMutation) SetSeverity

func (m *VulnInformationMutation) SetSeverity(s string)

SetSeverity sets the "severity" field.

func (*VulnInformationMutation) SetSolutions

func (m *VulnInformationMutation) SetSolutions(s string)

SetSolutions sets the "solutions" field.

func (*VulnInformationMutation) SetTags

func (m *VulnInformationMutation) SetTags(s []string)

SetTags sets the "tags" field.

func (*VulnInformationMutation) SetTitle

func (m *VulnInformationMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*VulnInformationMutation) SetUpdateTime added in v1.1.0

func (m *VulnInformationMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*VulnInformationMutation) Severity

func (m *VulnInformationMutation) Severity() (r string, exists bool)

Severity returns the value of the "severity" field in the mutation.

func (*VulnInformationMutation) Solutions

func (m *VulnInformationMutation) Solutions() (r string, exists bool)

Solutions returns the value of the "solutions" field in the mutation.

func (*VulnInformationMutation) Tags

func (m *VulnInformationMutation) Tags() (r []string, exists bool)

Tags returns the value of the "tags" field in the mutation.

func (*VulnInformationMutation) TagsCleared

func (m *VulnInformationMutation) TagsCleared() bool

TagsCleared returns if the "tags" field was cleared in this mutation.

func (*VulnInformationMutation) Title

func (m *VulnInformationMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (VulnInformationMutation) Tx

func (m VulnInformationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VulnInformationMutation) Type

func (m *VulnInformationMutation) Type() string

Type returns the node type of this mutation (VulnInformation).

func (*VulnInformationMutation) UpdateTime added in v1.1.0

func (m *VulnInformationMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*VulnInformationMutation) Where

Where appends a list predicates to the VulnInformationMutation builder.

func (*VulnInformationMutation) WhereP

func (m *VulnInformationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VulnInformationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VulnInformationQuery

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

VulnInformationQuery is the builder for querying VulnInformation entities.

func (*VulnInformationQuery) Aggregate

Aggregate returns a VulnInformationSelect configured with the given aggregations.

func (*VulnInformationQuery) All

All executes the query and returns a list of VulnInformations.

func (*VulnInformationQuery) AllX

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

func (*VulnInformationQuery) Clone

Clone returns a duplicate of the VulnInformationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VulnInformationQuery) Count

func (viq *VulnInformationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnInformationQuery) CountX

func (viq *VulnInformationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VulnInformationQuery) Exist

func (viq *VulnInformationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VulnInformationQuery) ExistX

func (viq *VulnInformationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VulnInformationQuery) First

First returns the first VulnInformation entity from the query. Returns a *NotFoundError when no VulnInformation was found.

func (*VulnInformationQuery) FirstID

func (viq *VulnInformationQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first VulnInformation ID from the query. Returns a *NotFoundError when no VulnInformation ID was found.

func (*VulnInformationQuery) FirstIDX

func (viq *VulnInformationQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*VulnInformationQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*VulnInformationQuery) GroupBy

func (viq *VulnInformationQuery) GroupBy(field string, fields ...string) *VulnInformationGroupBy

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 {
	Key string `json:"key,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VulnInformation.Query().
	GroupBy(vulninformation.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnInformationQuery) IDs

func (viq *VulnInformationQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of VulnInformation IDs.

func (*VulnInformationQuery) IDsX

func (viq *VulnInformationQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*VulnInformationQuery) Limit

func (viq *VulnInformationQuery) Limit(limit int) *VulnInformationQuery

Limit the number of records to be returned by this query.

func (*VulnInformationQuery) Offset

func (viq *VulnInformationQuery) Offset(offset int) *VulnInformationQuery

Offset to start from.

func (*VulnInformationQuery) Only

Only returns a single VulnInformation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VulnInformation entity is found. Returns a *NotFoundError when no VulnInformation entities are found.

func (*VulnInformationQuery) OnlyID

func (viq *VulnInformationQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only VulnInformation ID in the query. Returns a *NotSingularError when more than one VulnInformation ID is found. Returns a *NotFoundError when no entities are found.

func (*VulnInformationQuery) OnlyIDX

func (viq *VulnInformationQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VulnInformationQuery) OnlyX

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

func (*VulnInformationQuery) Order

Order specifies how the records should be ordered.

func (*VulnInformationQuery) Select

func (viq *VulnInformationQuery) Select(fields ...string) *VulnInformationSelect

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 {
	Key string `json:"key,omitempty"`
}

client.VulnInformation.Query().
	Select(vulninformation.FieldKey).
	Scan(ctx, &v)

func (*VulnInformationQuery) Unique

func (viq *VulnInformationQuery) Unique(unique bool) *VulnInformationQuery

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 (*VulnInformationQuery) Where

Where adds a new predicate for the VulnInformationQuery builder.

type VulnInformationSelect

type VulnInformationSelect struct {
	*VulnInformationQuery
	// contains filtered or unexported fields
}

VulnInformationSelect is the builder for selecting fields of VulnInformation entities.

func (*VulnInformationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*VulnInformationSelect) Bool

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

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

func (*VulnInformationSelect) BoolX

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

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

func (*VulnInformationSelect) Bools

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

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

func (*VulnInformationSelect) BoolsX

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

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

func (*VulnInformationSelect) Float64

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

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

func (*VulnInformationSelect) Float64X

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

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

func (*VulnInformationSelect) Float64s

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

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

func (*VulnInformationSelect) Float64sX

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

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

func (*VulnInformationSelect) Int

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

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

func (*VulnInformationSelect) IntX

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

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

func (*VulnInformationSelect) Ints

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

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

func (*VulnInformationSelect) IntsX

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

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

func (*VulnInformationSelect) Scan

func (vis *VulnInformationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VulnInformationSelect) ScanX

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

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

func (*VulnInformationSelect) String

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

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

func (*VulnInformationSelect) StringX

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

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

func (*VulnInformationSelect) Strings

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

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

func (*VulnInformationSelect) StringsX

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

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

type VulnInformationUpdate

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

VulnInformationUpdate is the builder for updating VulnInformation entities.

func (*VulnInformationUpdate) AppendGithubSearch added in v1.1.0

func (viu *VulnInformationUpdate) AppendGithubSearch(s []string) *VulnInformationUpdate

AppendGithubSearch appends s to the "github_search" field.

func (*VulnInformationUpdate) AppendReferences

func (viu *VulnInformationUpdate) AppendReferences(s []string) *VulnInformationUpdate

AppendReferences appends s to the "references" field.

func (*VulnInformationUpdate) AppendTags

func (viu *VulnInformationUpdate) AppendTags(s []string) *VulnInformationUpdate

AppendTags appends s to the "tags" field.

func (*VulnInformationUpdate) ClearGithubSearch added in v1.1.0

func (viu *VulnInformationUpdate) ClearGithubSearch() *VulnInformationUpdate

ClearGithubSearch clears the value of the "github_search" field.

func (*VulnInformationUpdate) ClearReferences

func (viu *VulnInformationUpdate) ClearReferences() *VulnInformationUpdate

ClearReferences clears the value of the "references" field.

func (*VulnInformationUpdate) ClearTags

func (viu *VulnInformationUpdate) ClearTags() *VulnInformationUpdate

ClearTags clears the value of the "tags" field.

func (*VulnInformationUpdate) Exec

func (viu *VulnInformationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnInformationUpdate) ExecX

func (viu *VulnInformationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationUpdate) Mutation

Mutation returns the VulnInformationMutation object of the builder.

func (*VulnInformationUpdate) Save

func (viu *VulnInformationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VulnInformationUpdate) SaveX

func (viu *VulnInformationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VulnInformationUpdate) SetCve

SetCve sets the "cve" field.

func (*VulnInformationUpdate) SetDescription

func (viu *VulnInformationUpdate) SetDescription(s string) *VulnInformationUpdate

SetDescription sets the "description" field.

func (*VulnInformationUpdate) SetDisclosure

func (viu *VulnInformationUpdate) SetDisclosure(s string) *VulnInformationUpdate

SetDisclosure sets the "disclosure" field.

func (*VulnInformationUpdate) SetFrom

SetFrom sets the "from" field.

func (*VulnInformationUpdate) SetGithubSearch added in v1.1.0

func (viu *VulnInformationUpdate) SetGithubSearch(s []string) *VulnInformationUpdate

SetGithubSearch sets the "github_search" field.

func (*VulnInformationUpdate) SetKey

SetKey sets the "key" field.

func (*VulnInformationUpdate) SetNillableCve

func (viu *VulnInformationUpdate) SetNillableCve(s *string) *VulnInformationUpdate

SetNillableCve sets the "cve" field if the given value is not nil.

func (*VulnInformationUpdate) SetNillableDescription

func (viu *VulnInformationUpdate) SetNillableDescription(s *string) *VulnInformationUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VulnInformationUpdate) SetNillableDisclosure

func (viu *VulnInformationUpdate) SetNillableDisclosure(s *string) *VulnInformationUpdate

SetNillableDisclosure sets the "disclosure" field if the given value is not nil.

func (*VulnInformationUpdate) SetNillableFrom

func (viu *VulnInformationUpdate) SetNillableFrom(s *string) *VulnInformationUpdate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*VulnInformationUpdate) SetNillablePushed added in v0.3.0

func (viu *VulnInformationUpdate) SetNillablePushed(b *bool) *VulnInformationUpdate

SetNillablePushed sets the "pushed" field if the given value is not nil.

func (*VulnInformationUpdate) SetNillableSeverity

func (viu *VulnInformationUpdate) SetNillableSeverity(s *string) *VulnInformationUpdate

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*VulnInformationUpdate) SetNillableSolutions

func (viu *VulnInformationUpdate) SetNillableSolutions(s *string) *VulnInformationUpdate

SetNillableSolutions sets the "solutions" field if the given value is not nil.

func (*VulnInformationUpdate) SetNillableTitle

func (viu *VulnInformationUpdate) SetNillableTitle(s *string) *VulnInformationUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*VulnInformationUpdate) SetPushed added in v0.3.0

SetPushed sets the "pushed" field.

func (*VulnInformationUpdate) SetReferences

func (viu *VulnInformationUpdate) SetReferences(s []string) *VulnInformationUpdate

SetReferences sets the "references" field.

func (*VulnInformationUpdate) SetSeverity

func (viu *VulnInformationUpdate) SetSeverity(s string) *VulnInformationUpdate

SetSeverity sets the "severity" field.

func (*VulnInformationUpdate) SetSolutions

func (viu *VulnInformationUpdate) SetSolutions(s string) *VulnInformationUpdate

SetSolutions sets the "solutions" field.

func (*VulnInformationUpdate) SetTags

SetTags sets the "tags" field.

func (*VulnInformationUpdate) SetTitle

SetTitle sets the "title" field.

func (*VulnInformationUpdate) SetUpdateTime added in v1.1.0

func (viu *VulnInformationUpdate) SetUpdateTime(t time.Time) *VulnInformationUpdate

SetUpdateTime sets the "update_time" field.

func (*VulnInformationUpdate) Where

Where appends a list predicates to the VulnInformationUpdate builder.

type VulnInformationUpdateOne

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

VulnInformationUpdateOne is the builder for updating a single VulnInformation entity.

func (*VulnInformationUpdateOne) AppendGithubSearch added in v1.1.0

func (viuo *VulnInformationUpdateOne) AppendGithubSearch(s []string) *VulnInformationUpdateOne

AppendGithubSearch appends s to the "github_search" field.

func (*VulnInformationUpdateOne) AppendReferences

func (viuo *VulnInformationUpdateOne) AppendReferences(s []string) *VulnInformationUpdateOne

AppendReferences appends s to the "references" field.

func (*VulnInformationUpdateOne) AppendTags

AppendTags appends s to the "tags" field.

func (*VulnInformationUpdateOne) ClearGithubSearch added in v1.1.0

func (viuo *VulnInformationUpdateOne) ClearGithubSearch() *VulnInformationUpdateOne

ClearGithubSearch clears the value of the "github_search" field.

func (*VulnInformationUpdateOne) ClearReferences

func (viuo *VulnInformationUpdateOne) ClearReferences() *VulnInformationUpdateOne

ClearReferences clears the value of the "references" field.

func (*VulnInformationUpdateOne) ClearTags

ClearTags clears the value of the "tags" field.

func (*VulnInformationUpdateOne) Exec

Exec executes the query on the entity.

func (*VulnInformationUpdateOne) ExecX

func (viuo *VulnInformationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationUpdateOne) Mutation

Mutation returns the VulnInformationMutation object of the builder.

func (*VulnInformationUpdateOne) Save

Save executes the query and returns the updated VulnInformation entity.

func (*VulnInformationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*VulnInformationUpdateOne) Select

func (viuo *VulnInformationUpdateOne) Select(field string, fields ...string) *VulnInformationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VulnInformationUpdateOne) SetCve

SetCve sets the "cve" field.

func (*VulnInformationUpdateOne) SetDescription

func (viuo *VulnInformationUpdateOne) SetDescription(s string) *VulnInformationUpdateOne

SetDescription sets the "description" field.

func (*VulnInformationUpdateOne) SetDisclosure

SetDisclosure sets the "disclosure" field.

func (*VulnInformationUpdateOne) SetFrom

SetFrom sets the "from" field.

func (*VulnInformationUpdateOne) SetGithubSearch added in v1.1.0

func (viuo *VulnInformationUpdateOne) SetGithubSearch(s []string) *VulnInformationUpdateOne

SetGithubSearch sets the "github_search" field.

func (*VulnInformationUpdateOne) SetKey

SetKey sets the "key" field.

func (*VulnInformationUpdateOne) SetNillableCve

func (viuo *VulnInformationUpdateOne) SetNillableCve(s *string) *VulnInformationUpdateOne

SetNillableCve sets the "cve" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetNillableDescription

func (viuo *VulnInformationUpdateOne) SetNillableDescription(s *string) *VulnInformationUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetNillableDisclosure

func (viuo *VulnInformationUpdateOne) SetNillableDisclosure(s *string) *VulnInformationUpdateOne

SetNillableDisclosure sets the "disclosure" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetNillableFrom

func (viuo *VulnInformationUpdateOne) SetNillableFrom(s *string) *VulnInformationUpdateOne

SetNillableFrom sets the "from" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetNillablePushed added in v0.3.0

func (viuo *VulnInformationUpdateOne) SetNillablePushed(b *bool) *VulnInformationUpdateOne

SetNillablePushed sets the "pushed" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetNillableSeverity

func (viuo *VulnInformationUpdateOne) SetNillableSeverity(s *string) *VulnInformationUpdateOne

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetNillableSolutions

func (viuo *VulnInformationUpdateOne) SetNillableSolutions(s *string) *VulnInformationUpdateOne

SetNillableSolutions sets the "solutions" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetNillableTitle

func (viuo *VulnInformationUpdateOne) SetNillableTitle(s *string) *VulnInformationUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*VulnInformationUpdateOne) SetPushed added in v0.3.0

SetPushed sets the "pushed" field.

func (*VulnInformationUpdateOne) SetReferences

func (viuo *VulnInformationUpdateOne) SetReferences(s []string) *VulnInformationUpdateOne

SetReferences sets the "references" field.

func (*VulnInformationUpdateOne) SetSeverity

SetSeverity sets the "severity" field.

func (*VulnInformationUpdateOne) SetSolutions

SetSolutions sets the "solutions" field.

func (*VulnInformationUpdateOne) SetTags

SetTags sets the "tags" field.

func (*VulnInformationUpdateOne) SetTitle

SetTitle sets the "title" field.

func (*VulnInformationUpdateOne) SetUpdateTime added in v1.1.0

SetUpdateTime sets the "update_time" field.

func (*VulnInformationUpdateOne) Where

Where appends a list predicates to the VulnInformationUpdate builder.

type VulnInformationUpsert

type VulnInformationUpsert struct {
	*sql.UpdateSet
}

VulnInformationUpsert is the "OnConflict" setter.

func (*VulnInformationUpsert) ClearGithubSearch added in v1.1.0

func (u *VulnInformationUpsert) ClearGithubSearch() *VulnInformationUpsert

ClearGithubSearch clears the value of the "github_search" field.

func (*VulnInformationUpsert) ClearReferences

func (u *VulnInformationUpsert) ClearReferences() *VulnInformationUpsert

ClearReferences clears the value of the "references" field.

func (*VulnInformationUpsert) ClearTags

ClearTags clears the value of the "tags" field.

func (*VulnInformationUpsert) SetCve

SetCve sets the "cve" field.

func (*VulnInformationUpsert) SetDescription

func (u *VulnInformationUpsert) SetDescription(v string) *VulnInformationUpsert

SetDescription sets the "description" field.

func (*VulnInformationUpsert) SetDisclosure

func (u *VulnInformationUpsert) SetDisclosure(v string) *VulnInformationUpsert

SetDisclosure sets the "disclosure" field.

func (*VulnInformationUpsert) SetFrom

SetFrom sets the "from" field.

func (*VulnInformationUpsert) SetGithubSearch added in v1.1.0

func (u *VulnInformationUpsert) SetGithubSearch(v []string) *VulnInformationUpsert

SetGithubSearch sets the "github_search" field.

func (*VulnInformationUpsert) SetKey

SetKey sets the "key" field.

func (*VulnInformationUpsert) SetPushed added in v0.3.0

SetPushed sets the "pushed" field.

func (*VulnInformationUpsert) SetReferences

func (u *VulnInformationUpsert) SetReferences(v []string) *VulnInformationUpsert

SetReferences sets the "references" field.

func (*VulnInformationUpsert) SetSeverity

SetSeverity sets the "severity" field.

func (*VulnInformationUpsert) SetSolutions

SetSolutions sets the "solutions" field.

func (*VulnInformationUpsert) SetTags

SetTags sets the "tags" field.

func (*VulnInformationUpsert) SetTitle

SetTitle sets the "title" field.

func (*VulnInformationUpsert) SetUpdateTime added in v1.1.0

SetUpdateTime sets the "update_time" field.

func (*VulnInformationUpsert) UpdateCve

UpdateCve sets the "cve" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateDescription

func (u *VulnInformationUpsert) UpdateDescription() *VulnInformationUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateDisclosure

func (u *VulnInformationUpsert) UpdateDisclosure() *VulnInformationUpsert

UpdateDisclosure sets the "disclosure" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateGithubSearch added in v1.1.0

func (u *VulnInformationUpsert) UpdateGithubSearch() *VulnInformationUpsert

UpdateGithubSearch sets the "github_search" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdatePushed added in v0.3.0

func (u *VulnInformationUpsert) UpdatePushed() *VulnInformationUpsert

UpdatePushed sets the "pushed" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateReferences

func (u *VulnInformationUpsert) UpdateReferences() *VulnInformationUpsert

UpdateReferences sets the "references" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateSeverity

func (u *VulnInformationUpsert) UpdateSeverity() *VulnInformationUpsert

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateSolutions

func (u *VulnInformationUpsert) UpdateSolutions() *VulnInformationUpsert

UpdateSolutions sets the "solutions" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateTags

UpdateTags sets the "tags" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateTitle

func (u *VulnInformationUpsert) UpdateTitle() *VulnInformationUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

func (*VulnInformationUpsert) UpdateUpdateTime added in v1.1.0

func (u *VulnInformationUpsert) UpdateUpdateTime() *VulnInformationUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type VulnInformationUpsertBulk

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

VulnInformationUpsertBulk is the builder for "upsert"-ing a bulk of VulnInformation nodes.

func (*VulnInformationUpsertBulk) ClearGithubSearch added in v1.1.0

func (u *VulnInformationUpsertBulk) ClearGithubSearch() *VulnInformationUpsertBulk

ClearGithubSearch clears the value of the "github_search" field.

func (*VulnInformationUpsertBulk) ClearReferences

ClearReferences clears the value of the "references" field.

func (*VulnInformationUpsertBulk) ClearTags

ClearTags clears the value of the "tags" field.

func (*VulnInformationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnInformationUpsertBulk) Exec

Exec executes the query.

func (*VulnInformationUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnInformation.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VulnInformationUpsertBulk) SetCve

SetCve sets the "cve" field.

func (*VulnInformationUpsertBulk) SetDescription

SetDescription sets the "description" field.

func (*VulnInformationUpsertBulk) SetDisclosure

SetDisclosure sets the "disclosure" field.

func (*VulnInformationUpsertBulk) SetFrom

SetFrom sets the "from" field.

func (*VulnInformationUpsertBulk) SetGithubSearch added in v1.1.0

SetGithubSearch sets the "github_search" field.

func (*VulnInformationUpsertBulk) SetKey

SetKey sets the "key" field.

func (*VulnInformationUpsertBulk) SetPushed added in v0.3.0

SetPushed sets the "pushed" field.

func (*VulnInformationUpsertBulk) SetReferences

SetReferences sets the "references" field.

func (*VulnInformationUpsertBulk) SetSeverity

SetSeverity sets the "severity" field.

func (*VulnInformationUpsertBulk) SetSolutions

SetSolutions sets the "solutions" field.

func (*VulnInformationUpsertBulk) SetTags

SetTags sets the "tags" field.

func (*VulnInformationUpsertBulk) SetTitle

SetTitle sets the "title" field.

func (*VulnInformationUpsertBulk) SetUpdateTime added in v1.1.0

SetUpdateTime sets the "update_time" field.

func (*VulnInformationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VulnInformationCreateBulk.OnConflict documentation for more info.

func (*VulnInformationUpsertBulk) UpdateCve

UpdateCve sets the "cve" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateDescription

func (u *VulnInformationUpsertBulk) UpdateDescription() *VulnInformationUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateDisclosure

UpdateDisclosure sets the "disclosure" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateGithubSearch added in v1.1.0

func (u *VulnInformationUpsertBulk) UpdateGithubSearch() *VulnInformationUpsertBulk

UpdateGithubSearch sets the "github_search" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnInformation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnInformationUpsertBulk) UpdatePushed added in v0.3.0

UpdatePushed sets the "pushed" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateReferences

UpdateReferences sets the "references" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateSeverity

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateSolutions

UpdateSolutions sets the "solutions" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateTags

UpdateTags sets the "tags" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateTitle

UpdateTitle sets the "title" field to the value that was provided on create.

func (*VulnInformationUpsertBulk) UpdateUpdateTime added in v1.1.0

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type VulnInformationUpsertOne

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

VulnInformationUpsertOne is the builder for "upsert"-ing

one VulnInformation node.

func (*VulnInformationUpsertOne) ClearGithubSearch added in v1.1.0

func (u *VulnInformationUpsertOne) ClearGithubSearch() *VulnInformationUpsertOne

ClearGithubSearch clears the value of the "github_search" field.

func (*VulnInformationUpsertOne) ClearReferences

func (u *VulnInformationUpsertOne) ClearReferences() *VulnInformationUpsertOne

ClearReferences clears the value of the "references" field.

func (*VulnInformationUpsertOne) ClearTags

ClearTags clears the value of the "tags" field.

func (*VulnInformationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnInformationUpsertOne) Exec

Exec executes the query.

func (*VulnInformationUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VulnInformationUpsertOne) ID

func (u *VulnInformationUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnInformationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VulnInformationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnInformation.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnInformationUpsertOne) SetCve

SetCve sets the "cve" field.

func (*VulnInformationUpsertOne) SetDescription

SetDescription sets the "description" field.

func (*VulnInformationUpsertOne) SetDisclosure

SetDisclosure sets the "disclosure" field.

func (*VulnInformationUpsertOne) SetFrom

SetFrom sets the "from" field.

func (*VulnInformationUpsertOne) SetGithubSearch added in v1.1.0

func (u *VulnInformationUpsertOne) SetGithubSearch(v []string) *VulnInformationUpsertOne

SetGithubSearch sets the "github_search" field.

func (*VulnInformationUpsertOne) SetKey

SetKey sets the "key" field.

func (*VulnInformationUpsertOne) SetPushed added in v0.3.0

SetPushed sets the "pushed" field.

func (*VulnInformationUpsertOne) SetReferences

SetReferences sets the "references" field.

func (*VulnInformationUpsertOne) SetSeverity

SetSeverity sets the "severity" field.

func (*VulnInformationUpsertOne) SetSolutions

SetSolutions sets the "solutions" field.

func (*VulnInformationUpsertOne) SetTags

SetTags sets the "tags" field.

func (*VulnInformationUpsertOne) SetTitle

SetTitle sets the "title" field.

func (*VulnInformationUpsertOne) SetUpdateTime added in v1.1.0

SetUpdateTime sets the "update_time" field.

func (*VulnInformationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VulnInformationCreate.OnConflict documentation for more info.

func (*VulnInformationUpsertOne) UpdateCve

UpdateCve sets the "cve" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateDescription

func (u *VulnInformationUpsertOne) UpdateDescription() *VulnInformationUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateDisclosure

func (u *VulnInformationUpsertOne) UpdateDisclosure() *VulnInformationUpsertOne

UpdateDisclosure sets the "disclosure" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateGithubSearch added in v1.1.0

func (u *VulnInformationUpsertOne) UpdateGithubSearch() *VulnInformationUpsertOne

UpdateGithubSearch sets the "github_search" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateKey

UpdateKey sets the "key" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateNewValues

func (u *VulnInformationUpsertOne) UpdateNewValues() *VulnInformationUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnInformation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnInformationUpsertOne) UpdatePushed added in v0.3.0

UpdatePushed sets the "pushed" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateReferences

func (u *VulnInformationUpsertOne) UpdateReferences() *VulnInformationUpsertOne

UpdateReferences sets the "references" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateSeverity

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateSolutions

func (u *VulnInformationUpsertOne) UpdateSolutions() *VulnInformationUpsertOne

UpdateSolutions sets the "solutions" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateTags

UpdateTags sets the "tags" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateTitle

UpdateTitle sets the "title" field to the value that was provided on create.

func (*VulnInformationUpsertOne) UpdateUpdateTime added in v1.1.0

func (u *VulnInformationUpsertOne) UpdateUpdateTime() *VulnInformationUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type VulnInformations

type VulnInformations []*VulnInformation

VulnInformations is a parsable slice of VulnInformation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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