ent

package
v0.10.0-rc6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package ent is the generated Ent client root.

The Ent client and supporting code under this directory are produced from the schemas in ./schema by `go generate ./ent/...` (equivalently `task ent:generate`). The generated tree is committed; CI verifies it is up to date via `git diff --exit-code ./ent/`.

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeChunk            = "Chunk"
	TypeConfigEntry      = "ConfigEntry"
	TypeNarFile          = "NarFile"
	TypeNarFileChunk     = "NarFileChunk"
	TypeNarInfo          = "NarInfo"
	TypeNarInfoNarFile   = "NarInfoNarFile"
	TypeNarInfoReference = "NarInfoReference"
	TypeNarInfoSignature = "NarInfoSignature"
	TypePinnedClosure    = "PinnedClosure"
)

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 Chunk

type Chunk struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Hash holds the value of the "hash" field.
	Hash string `json:"hash,omitempty"`
	// Size holds the value of the "size" field.
	Size uint32 `json:"size,omitempty"`
	// CompressedSize holds the value of the "compressed_size" field.
	CompressedSize uint32 `json:"compressed_size,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ChunkQuery when eager-loading is set.
	Edges ChunkEdges `json:"edges"`
	// contains filtered or unexported fields
}

Chunk is the model entity for the Chunk schema.

func (_m *Chunk) QueryNarFileLinks() *NarFileChunkQuery

QueryNarFileLinks queries the "nar_file_links" edge of the Chunk entity.

func (*Chunk) String

func (_m *Chunk) String() string

String implements the fmt.Stringer.

func (*Chunk) Unwrap

func (_m *Chunk) Unwrap() *Chunk

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

func (_m *Chunk) Update() *ChunkUpdateOne

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

func (*Chunk) Value

func (_m *Chunk) Value(name string) (ent.Value, error)

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

type ChunkClient

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

ChunkClient is a client for the Chunk schema.

func NewChunkClient

func NewChunkClient(c config) *ChunkClient

NewChunkClient returns a client for the Chunk from the given config.

func (*ChunkClient) Create

func (c *ChunkClient) Create() *ChunkCreate

Create returns a builder for creating a Chunk entity.

func (*ChunkClient) CreateBulk

func (c *ChunkClient) CreateBulk(builders ...*ChunkCreate) *ChunkCreateBulk

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

func (*ChunkClient) Delete

func (c *ChunkClient) Delete() *ChunkDelete

Delete returns a delete builder for Chunk.

func (*ChunkClient) DeleteOne

func (c *ChunkClient) DeleteOne(_m *Chunk) *ChunkDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ChunkClient) DeleteOneID

func (c *ChunkClient) DeleteOneID(id int) *ChunkDeleteOne

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

func (*ChunkClient) Get

func (c *ChunkClient) Get(ctx context.Context, id int) (*Chunk, error)

Get returns a Chunk entity by its id.

func (*ChunkClient) GetX

func (c *ChunkClient) GetX(ctx context.Context, id int) *Chunk

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

func (*ChunkClient) Hooks

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

Hooks returns the client hooks.

func (*ChunkClient) Intercept

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

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

func (*ChunkClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ChunkClient) MapCreateBulk

func (c *ChunkClient) MapCreateBulk(slice any, setFunc func(*ChunkCreate, int)) *ChunkCreateBulk

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

func (c *ChunkClient) Query() *ChunkQuery

Query returns a query builder for Chunk.

func (c *ChunkClient) QueryNarFileLinks(_m *Chunk) *NarFileChunkQuery

QueryNarFileLinks queries the nar_file_links edge of a Chunk.

func (*ChunkClient) Update

func (c *ChunkClient) Update() *ChunkUpdate

Update returns an update builder for Chunk.

func (*ChunkClient) UpdateOne

func (c *ChunkClient) UpdateOne(_m *Chunk) *ChunkUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ChunkClient) UpdateOneID

func (c *ChunkClient) UpdateOneID(id int) *ChunkUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ChunkClient) Use

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

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

type ChunkCreate

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

ChunkCreate is the builder for creating a Chunk entity.

func (*ChunkCreate) AddNarFileLinkIDs

func (_c *ChunkCreate) AddNarFileLinkIDs(ids ...int) *ChunkCreate

AddNarFileLinkIDs adds the "nar_file_links" edge to the NarFileChunk entity by IDs.

func (_c *ChunkCreate) AddNarFileLinks(v ...*NarFileChunk) *ChunkCreate

AddNarFileLinks adds the "nar_file_links" edges to the NarFileChunk entity.

func (*ChunkCreate) Exec

func (_c *ChunkCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChunkCreate) ExecX

func (_c *ChunkCreate) ExecX(ctx context.Context)

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

func (*ChunkCreate) Mutation

func (_c *ChunkCreate) Mutation() *ChunkMutation

Mutation returns the ChunkMutation object of the builder.

func (*ChunkCreate) OnConflict

func (_c *ChunkCreate) OnConflict(opts ...sql.ConflictOption) *ChunkUpsertOne

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

client.Chunk.Create().
	SetCreatedAt(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.ChunkUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ChunkCreate) OnConflictColumns

func (_c *ChunkCreate) OnConflictColumns(columns ...string) *ChunkUpsertOne

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

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

func (*ChunkCreate) Save

func (_c *ChunkCreate) Save(ctx context.Context) (*Chunk, error)

Save creates the Chunk in the database.

func (*ChunkCreate) SaveX

func (_c *ChunkCreate) SaveX(ctx context.Context) *Chunk

SaveX calls Save and panics if Save returns an error.

func (*ChunkCreate) SetCompressedSize

func (_c *ChunkCreate) SetCompressedSize(v uint32) *ChunkCreate

SetCompressedSize sets the "compressed_size" field.

func (*ChunkCreate) SetCreatedAt

func (_c *ChunkCreate) SetCreatedAt(v time.Time) *ChunkCreate

SetCreatedAt sets the "created_at" field.

func (*ChunkCreate) SetHash

func (_c *ChunkCreate) SetHash(v string) *ChunkCreate

SetHash sets the "hash" field.

func (*ChunkCreate) SetNillableCompressedSize

func (_c *ChunkCreate) SetNillableCompressedSize(v *uint32) *ChunkCreate

SetNillableCompressedSize sets the "compressed_size" field if the given value is not nil.

func (*ChunkCreate) SetNillableCreatedAt

func (_c *ChunkCreate) SetNillableCreatedAt(v *time.Time) *ChunkCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ChunkCreate) SetNillableUpdatedAt

func (_c *ChunkCreate) SetNillableUpdatedAt(v *time.Time) *ChunkCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ChunkCreate) SetSize

func (_c *ChunkCreate) SetSize(v uint32) *ChunkCreate

SetSize sets the "size" field.

func (*ChunkCreate) SetUpdatedAt

func (_c *ChunkCreate) SetUpdatedAt(v time.Time) *ChunkCreate

SetUpdatedAt sets the "updated_at" field.

type ChunkCreateBulk

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

ChunkCreateBulk is the builder for creating many Chunk entities in bulk.

func (*ChunkCreateBulk) Exec

func (_c *ChunkCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ChunkCreateBulk) ExecX

func (_c *ChunkCreateBulk) ExecX(ctx context.Context)

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

func (*ChunkCreateBulk) OnConflict

func (_c *ChunkCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChunkUpsertBulk

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

client.Chunk.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.ChunkUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ChunkCreateBulk) OnConflictColumns

func (_c *ChunkCreateBulk) OnConflictColumns(columns ...string) *ChunkUpsertBulk

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

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

func (*ChunkCreateBulk) Save

func (_c *ChunkCreateBulk) Save(ctx context.Context) ([]*Chunk, error)

Save creates the Chunk entities in the database.

func (*ChunkCreateBulk) SaveX

func (_c *ChunkCreateBulk) SaveX(ctx context.Context) []*Chunk

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

type ChunkDelete

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

ChunkDelete is the builder for deleting a Chunk entity.

func (*ChunkDelete) Exec

func (_d *ChunkDelete) Exec(ctx context.Context) (int, error)

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

func (*ChunkDelete) ExecX

func (_d *ChunkDelete) ExecX(ctx context.Context) int

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

func (*ChunkDelete) Where

func (_d *ChunkDelete) Where(ps ...predicate.Chunk) *ChunkDelete

Where appends a list predicates to the ChunkDelete builder.

type ChunkDeleteOne

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

ChunkDeleteOne is the builder for deleting a single Chunk entity.

func (*ChunkDeleteOne) Exec

func (_d *ChunkDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ChunkDeleteOne) ExecX

func (_d *ChunkDeleteOne) ExecX(ctx context.Context)

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

func (*ChunkDeleteOne) Where

func (_d *ChunkDeleteOne) Where(ps ...predicate.Chunk) *ChunkDeleteOne

Where appends a list predicates to the ChunkDelete builder.

type ChunkEdges

type ChunkEdges struct {
	// NarFileLinks holds the value of the nar_file_links edge.
	NarFileLinks []*NarFileChunk `json:"nar_file_links,omitempty"`
	// contains filtered or unexported fields
}

ChunkEdges holds the relations/edges for other nodes in the graph.

func (ChunkEdges) NarFileLinksOrErr

func (e ChunkEdges) NarFileLinksOrErr() ([]*NarFileChunk, error)

NarFileLinksOrErr returns the NarFileLinks value or an error if the edge was not loaded in eager-loading.

type ChunkGroupBy

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

ChunkGroupBy is the group-by builder for Chunk entities.

func (*ChunkGroupBy) Aggregate

func (_g *ChunkGroupBy) Aggregate(fns ...AggregateFunc) *ChunkGroupBy

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

func (*ChunkGroupBy) Bool

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

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

func (*ChunkGroupBy) BoolX

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

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

func (*ChunkGroupBy) Bools

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

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

func (*ChunkGroupBy) BoolsX

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

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

func (*ChunkGroupBy) Float64

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

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

func (*ChunkGroupBy) Float64X

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

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

func (*ChunkGroupBy) Float64s

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

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

func (*ChunkGroupBy) Float64sX

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

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

func (*ChunkGroupBy) Int

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

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

func (*ChunkGroupBy) IntX

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

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

func (*ChunkGroupBy) Ints

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

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

func (*ChunkGroupBy) IntsX

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

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

func (*ChunkGroupBy) Scan

func (_g *ChunkGroupBy) Scan(ctx context.Context, v any) error

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

func (*ChunkGroupBy) ScanX

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

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

func (*ChunkGroupBy) String

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

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

func (*ChunkGroupBy) StringX

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

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

func (*ChunkGroupBy) Strings

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

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

func (*ChunkGroupBy) StringsX

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

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

type ChunkMutation

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

ChunkMutation represents an operation that mutates the Chunk nodes in the graph.

func (*ChunkMutation) AddCompressedSize

func (m *ChunkMutation) AddCompressedSize(u int32)

AddCompressedSize adds u to the "compressed_size" field.

func (*ChunkMutation) AddField

func (m *ChunkMutation) 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 (*ChunkMutation) AddNarFileLinkIDs

func (m *ChunkMutation) AddNarFileLinkIDs(ids ...int)

AddNarFileLinkIDs adds the "nar_file_links" edge to the NarFileChunk entity by ids.

func (*ChunkMutation) AddSize

func (m *ChunkMutation) AddSize(u int32)

AddSize adds u to the "size" field.

func (*ChunkMutation) AddedCompressedSize

func (m *ChunkMutation) AddedCompressedSize() (r int32, exists bool)

AddedCompressedSize returns the value that was added to the "compressed_size" field in this mutation.

func (*ChunkMutation) AddedEdges

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

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

func (*ChunkMutation) AddedField

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

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

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

func (*ChunkMutation) AddedIDs

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

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

func (*ChunkMutation) AddedSize

func (m *ChunkMutation) AddedSize() (r int32, exists bool)

AddedSize returns the value that was added to the "size" field in this mutation.

func (*ChunkMutation) ClearEdge

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

func (m *ChunkMutation) 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 (m *ChunkMutation) ClearNarFileLinks()

ClearNarFileLinks clears the "nar_file_links" edge to the NarFileChunk entity.

func (*ChunkMutation) ClearUpdatedAt

func (m *ChunkMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ChunkMutation) ClearedEdges

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

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

func (*ChunkMutation) ClearedFields

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

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

func (ChunkMutation) Client

func (m ChunkMutation) 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 (*ChunkMutation) CompressedSize

func (m *ChunkMutation) CompressedSize() (r uint32, exists bool)

CompressedSize returns the value of the "compressed_size" field in the mutation.

func (*ChunkMutation) CreatedAt

func (m *ChunkMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ChunkMutation) EdgeCleared

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

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

func (*ChunkMutation) Field

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

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

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

func (*ChunkMutation) Fields

func (m *ChunkMutation) 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 (*ChunkMutation) Hash

func (m *ChunkMutation) Hash() (r string, exists bool)

Hash returns the value of the "hash" field in the mutation.

func (*ChunkMutation) ID

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

func (m *ChunkMutation) 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 (*ChunkMutation) NarFileLinksCleared

func (m *ChunkMutation) NarFileLinksCleared() bool

NarFileLinksCleared reports if the "nar_file_links" edge to the NarFileChunk entity was cleared.

func (*ChunkMutation) NarFileLinksIDs

func (m *ChunkMutation) NarFileLinksIDs() (ids []int)

NarFileLinksIDs returns the "nar_file_links" edge IDs in the mutation.

func (*ChunkMutation) OldCompressedSize

func (m *ChunkMutation) OldCompressedSize(ctx context.Context) (v uint32, err error)

OldCompressedSize returns the old "compressed_size" field's value of the Chunk entity. If the Chunk 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 (*ChunkMutation) OldCreatedAt

func (m *ChunkMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Chunk entity. If the Chunk 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 (*ChunkMutation) OldField

func (m *ChunkMutation) 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 (*ChunkMutation) OldHash

func (m *ChunkMutation) OldHash(ctx context.Context) (v string, err error)

OldHash returns the old "hash" field's value of the Chunk entity. If the Chunk 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 (*ChunkMutation) OldSize

func (m *ChunkMutation) OldSize(ctx context.Context) (v uint32, err error)

OldSize returns the old "size" field's value of the Chunk entity. If the Chunk 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 (*ChunkMutation) OldUpdatedAt

func (m *ChunkMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Chunk entity. If the Chunk 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 (*ChunkMutation) Op

func (m *ChunkMutation) Op() Op

Op returns the operation name.

func (*ChunkMutation) RemoveNarFileLinkIDs

func (m *ChunkMutation) RemoveNarFileLinkIDs(ids ...int)

RemoveNarFileLinkIDs removes the "nar_file_links" edge to the NarFileChunk entity by IDs.

func (*ChunkMutation) RemovedEdges

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

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

func (*ChunkMutation) RemovedIDs

func (m *ChunkMutation) 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 (*ChunkMutation) RemovedNarFileLinksIDs

func (m *ChunkMutation) RemovedNarFileLinksIDs() (ids []int)

RemovedNarFileLinks returns the removed IDs of the "nar_file_links" edge to the NarFileChunk entity.

func (*ChunkMutation) ResetCompressedSize

func (m *ChunkMutation) ResetCompressedSize()

ResetCompressedSize resets all changes to the "compressed_size" field.

func (*ChunkMutation) ResetCreatedAt

func (m *ChunkMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ChunkMutation) ResetEdge

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

func (m *ChunkMutation) 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 (*ChunkMutation) ResetHash

func (m *ChunkMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (m *ChunkMutation) ResetNarFileLinks()

ResetNarFileLinks resets all changes to the "nar_file_links" edge.

func (*ChunkMutation) ResetSize

func (m *ChunkMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*ChunkMutation) ResetUpdatedAt

func (m *ChunkMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ChunkMutation) SetCompressedSize

func (m *ChunkMutation) SetCompressedSize(u uint32)

SetCompressedSize sets the "compressed_size" field.

func (*ChunkMutation) SetCreatedAt

func (m *ChunkMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ChunkMutation) SetField

func (m *ChunkMutation) 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 (*ChunkMutation) SetHash

func (m *ChunkMutation) SetHash(s string)

SetHash sets the "hash" field.

func (*ChunkMutation) SetOp

func (m *ChunkMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ChunkMutation) SetSize

func (m *ChunkMutation) SetSize(u uint32)

SetSize sets the "size" field.

func (*ChunkMutation) SetUpdatedAt

func (m *ChunkMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ChunkMutation) Size

func (m *ChunkMutation) Size() (r uint32, exists bool)

Size returns the value of the "size" field in the mutation.

func (ChunkMutation) Tx

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

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

func (*ChunkMutation) Type

func (m *ChunkMutation) Type() string

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

func (*ChunkMutation) UpdatedAt

func (m *ChunkMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ChunkMutation) UpdatedAtCleared

func (m *ChunkMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*ChunkMutation) Where

func (m *ChunkMutation) Where(ps ...predicate.Chunk)

Where appends a list predicates to the ChunkMutation builder.

func (*ChunkMutation) WhereP

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

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

type ChunkQuery

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

ChunkQuery is the builder for querying Chunk entities.

func (*ChunkQuery) Aggregate

func (_q *ChunkQuery) Aggregate(fns ...AggregateFunc) *ChunkSelect

Aggregate returns a ChunkSelect configured with the given aggregations.

func (*ChunkQuery) All

func (_q *ChunkQuery) All(ctx context.Context) ([]*Chunk, error)

All executes the query and returns a list of Chunks.

func (*ChunkQuery) AllX

func (_q *ChunkQuery) AllX(ctx context.Context) []*Chunk

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

func (*ChunkQuery) Clone

func (_q *ChunkQuery) Clone() *ChunkQuery

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

func (*ChunkQuery) Count

func (_q *ChunkQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ChunkQuery) CountX

func (_q *ChunkQuery) CountX(ctx context.Context) int

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

func (*ChunkQuery) Exist

func (_q *ChunkQuery) Exist(ctx context.Context) (bool, error)

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

func (*ChunkQuery) ExistX

func (_q *ChunkQuery) ExistX(ctx context.Context) bool

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

func (*ChunkQuery) First

func (_q *ChunkQuery) First(ctx context.Context) (*Chunk, error)

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

func (*ChunkQuery) FirstID

func (_q *ChunkQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ChunkQuery) FirstIDX

func (_q *ChunkQuery) FirstIDX(ctx context.Context) int

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

func (*ChunkQuery) FirstX

func (_q *ChunkQuery) FirstX(ctx context.Context) *Chunk

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

func (*ChunkQuery) GroupBy

func (_q *ChunkQuery) GroupBy(field string, fields ...string) *ChunkGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Chunk.Query().
	GroupBy(chunk.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ChunkQuery) IDs

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

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

func (*ChunkQuery) IDsX

func (_q *ChunkQuery) IDsX(ctx context.Context) []int

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

func (*ChunkQuery) Limit

func (_q *ChunkQuery) Limit(limit int) *ChunkQuery

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

func (*ChunkQuery) Offset

func (_q *ChunkQuery) Offset(offset int) *ChunkQuery

Offset to start from.

func (*ChunkQuery) Only

func (_q *ChunkQuery) Only(ctx context.Context) (*Chunk, error)

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

func (*ChunkQuery) OnlyID

func (_q *ChunkQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ChunkQuery) OnlyIDX

func (_q *ChunkQuery) OnlyIDX(ctx context.Context) int

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

func (*ChunkQuery) OnlyX

func (_q *ChunkQuery) OnlyX(ctx context.Context) *Chunk

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

func (*ChunkQuery) Order

func (_q *ChunkQuery) Order(o ...chunk.OrderOption) *ChunkQuery

Order specifies how the records should be ordered.

func (_q *ChunkQuery) QueryNarFileLinks() *NarFileChunkQuery

QueryNarFileLinks chains the current query on the "nar_file_links" edge.

func (*ChunkQuery) Select

func (_q *ChunkQuery) Select(fields ...string) *ChunkSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Chunk.Query().
	Select(chunk.FieldCreatedAt).
	Scan(ctx, &v)

func (*ChunkQuery) Unique

func (_q *ChunkQuery) Unique(unique bool) *ChunkQuery

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

func (_q *ChunkQuery) Where(ps ...predicate.Chunk) *ChunkQuery

Where adds a new predicate for the ChunkQuery builder.

func (_q *ChunkQuery) WithNarFileLinks(opts ...func(*NarFileChunkQuery)) *ChunkQuery

WithNarFileLinks tells the query-builder to eager-load the nodes that are connected to the "nar_file_links" edge. The optional arguments are used to configure the query builder of the edge.

type ChunkSelect

type ChunkSelect struct {
	*ChunkQuery
	// contains filtered or unexported fields
}

ChunkSelect is the builder for selecting fields of Chunk entities.

func (*ChunkSelect) Aggregate

func (_s *ChunkSelect) Aggregate(fns ...AggregateFunc) *ChunkSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ChunkSelect) Bool

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

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

func (*ChunkSelect) BoolX

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

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

func (*ChunkSelect) Bools

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

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

func (*ChunkSelect) BoolsX

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

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

func (*ChunkSelect) Float64

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

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

func (*ChunkSelect) Float64X

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

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

func (*ChunkSelect) Float64s

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

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

func (*ChunkSelect) Float64sX

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

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

func (*ChunkSelect) Int

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

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

func (*ChunkSelect) IntX

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

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

func (*ChunkSelect) Ints

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

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

func (*ChunkSelect) IntsX

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

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

func (*ChunkSelect) Scan

func (_s *ChunkSelect) Scan(ctx context.Context, v any) error

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

func (*ChunkSelect) ScanX

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

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

func (*ChunkSelect) String

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

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

func (*ChunkSelect) StringX

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

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

func (*ChunkSelect) Strings

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

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

func (*ChunkSelect) StringsX

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

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

type ChunkUpdate

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

ChunkUpdate is the builder for updating Chunk entities.

func (*ChunkUpdate) AddCompressedSize

func (_u *ChunkUpdate) AddCompressedSize(v int32) *ChunkUpdate

AddCompressedSize adds value to the "compressed_size" field.

func (*ChunkUpdate) AddNarFileLinkIDs

func (_u *ChunkUpdate) AddNarFileLinkIDs(ids ...int) *ChunkUpdate

AddNarFileLinkIDs adds the "nar_file_links" edge to the NarFileChunk entity by IDs.

func (_u *ChunkUpdate) AddNarFileLinks(v ...*NarFileChunk) *ChunkUpdate

AddNarFileLinks adds the "nar_file_links" edges to the NarFileChunk entity.

func (*ChunkUpdate) AddSize

func (_u *ChunkUpdate) AddSize(v int32) *ChunkUpdate

AddSize adds value to the "size" field.

func (_u *ChunkUpdate) ClearNarFileLinks() *ChunkUpdate

ClearNarFileLinks clears all "nar_file_links" edges to the NarFileChunk entity.

func (*ChunkUpdate) ClearUpdatedAt

func (_u *ChunkUpdate) ClearUpdatedAt() *ChunkUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ChunkUpdate) Exec

func (_u *ChunkUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChunkUpdate) ExecX

func (_u *ChunkUpdate) ExecX(ctx context.Context)

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

func (*ChunkUpdate) Mutation

func (_u *ChunkUpdate) Mutation() *ChunkMutation

Mutation returns the ChunkMutation object of the builder.

func (*ChunkUpdate) RemoveNarFileLinkIDs

func (_u *ChunkUpdate) RemoveNarFileLinkIDs(ids ...int) *ChunkUpdate

RemoveNarFileLinkIDs removes the "nar_file_links" edge to NarFileChunk entities by IDs.

func (_u *ChunkUpdate) RemoveNarFileLinks(v ...*NarFileChunk) *ChunkUpdate

RemoveNarFileLinks removes "nar_file_links" edges to NarFileChunk entities.

func (*ChunkUpdate) Save

func (_u *ChunkUpdate) Save(ctx context.Context) (int, error)

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

func (*ChunkUpdate) SaveX

func (_u *ChunkUpdate) SaveX(ctx context.Context) int

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

func (*ChunkUpdate) SetCompressedSize

func (_u *ChunkUpdate) SetCompressedSize(v uint32) *ChunkUpdate

SetCompressedSize sets the "compressed_size" field.

func (*ChunkUpdate) SetHash

func (_u *ChunkUpdate) SetHash(v string) *ChunkUpdate

SetHash sets the "hash" field.

func (*ChunkUpdate) SetNillableCompressedSize

func (_u *ChunkUpdate) SetNillableCompressedSize(v *uint32) *ChunkUpdate

SetNillableCompressedSize sets the "compressed_size" field if the given value is not nil.

func (*ChunkUpdate) SetNillableHash

func (_u *ChunkUpdate) SetNillableHash(v *string) *ChunkUpdate

SetNillableHash sets the "hash" field if the given value is not nil.

func (*ChunkUpdate) SetNillableSize

func (_u *ChunkUpdate) SetNillableSize(v *uint32) *ChunkUpdate

SetNillableSize sets the "size" field if the given value is not nil.

func (*ChunkUpdate) SetNillableUpdatedAt

func (_u *ChunkUpdate) SetNillableUpdatedAt(v *time.Time) *ChunkUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ChunkUpdate) SetSize

func (_u *ChunkUpdate) SetSize(v uint32) *ChunkUpdate

SetSize sets the "size" field.

func (*ChunkUpdate) SetUpdatedAt

func (_u *ChunkUpdate) SetUpdatedAt(v time.Time) *ChunkUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ChunkUpdate) Where

func (_u *ChunkUpdate) Where(ps ...predicate.Chunk) *ChunkUpdate

Where appends a list predicates to the ChunkUpdate builder.

type ChunkUpdateOne

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

ChunkUpdateOne is the builder for updating a single Chunk entity.

func (*ChunkUpdateOne) AddCompressedSize

func (_u *ChunkUpdateOne) AddCompressedSize(v int32) *ChunkUpdateOne

AddCompressedSize adds value to the "compressed_size" field.

func (*ChunkUpdateOne) AddNarFileLinkIDs

func (_u *ChunkUpdateOne) AddNarFileLinkIDs(ids ...int) *ChunkUpdateOne

AddNarFileLinkIDs adds the "nar_file_links" edge to the NarFileChunk entity by IDs.

func (_u *ChunkUpdateOne) AddNarFileLinks(v ...*NarFileChunk) *ChunkUpdateOne

AddNarFileLinks adds the "nar_file_links" edges to the NarFileChunk entity.

func (*ChunkUpdateOne) AddSize

func (_u *ChunkUpdateOne) AddSize(v int32) *ChunkUpdateOne

AddSize adds value to the "size" field.

func (_u *ChunkUpdateOne) ClearNarFileLinks() *ChunkUpdateOne

ClearNarFileLinks clears all "nar_file_links" edges to the NarFileChunk entity.

func (*ChunkUpdateOne) ClearUpdatedAt

func (_u *ChunkUpdateOne) ClearUpdatedAt() *ChunkUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ChunkUpdateOne) Exec

func (_u *ChunkUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ChunkUpdateOne) ExecX

func (_u *ChunkUpdateOne) ExecX(ctx context.Context)

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

func (*ChunkUpdateOne) Mutation

func (_u *ChunkUpdateOne) Mutation() *ChunkMutation

Mutation returns the ChunkMutation object of the builder.

func (*ChunkUpdateOne) RemoveNarFileLinkIDs

func (_u *ChunkUpdateOne) RemoveNarFileLinkIDs(ids ...int) *ChunkUpdateOne

RemoveNarFileLinkIDs removes the "nar_file_links" edge to NarFileChunk entities by IDs.

func (_u *ChunkUpdateOne) RemoveNarFileLinks(v ...*NarFileChunk) *ChunkUpdateOne

RemoveNarFileLinks removes "nar_file_links" edges to NarFileChunk entities.

func (*ChunkUpdateOne) Save

func (_u *ChunkUpdateOne) Save(ctx context.Context) (*Chunk, error)

Save executes the query and returns the updated Chunk entity.

func (*ChunkUpdateOne) SaveX

func (_u *ChunkUpdateOne) SaveX(ctx context.Context) *Chunk

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

func (*ChunkUpdateOne) Select

func (_u *ChunkUpdateOne) Select(field string, fields ...string) *ChunkUpdateOne

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

func (*ChunkUpdateOne) SetCompressedSize

func (_u *ChunkUpdateOne) SetCompressedSize(v uint32) *ChunkUpdateOne

SetCompressedSize sets the "compressed_size" field.

func (*ChunkUpdateOne) SetHash

func (_u *ChunkUpdateOne) SetHash(v string) *ChunkUpdateOne

SetHash sets the "hash" field.

func (*ChunkUpdateOne) SetNillableCompressedSize

func (_u *ChunkUpdateOne) SetNillableCompressedSize(v *uint32) *ChunkUpdateOne

SetNillableCompressedSize sets the "compressed_size" field if the given value is not nil.

func (*ChunkUpdateOne) SetNillableHash

func (_u *ChunkUpdateOne) SetNillableHash(v *string) *ChunkUpdateOne

SetNillableHash sets the "hash" field if the given value is not nil.

func (*ChunkUpdateOne) SetNillableSize

func (_u *ChunkUpdateOne) SetNillableSize(v *uint32) *ChunkUpdateOne

SetNillableSize sets the "size" field if the given value is not nil.

func (*ChunkUpdateOne) SetNillableUpdatedAt

func (_u *ChunkUpdateOne) SetNillableUpdatedAt(v *time.Time) *ChunkUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ChunkUpdateOne) SetSize

func (_u *ChunkUpdateOne) SetSize(v uint32) *ChunkUpdateOne

SetSize sets the "size" field.

func (*ChunkUpdateOne) SetUpdatedAt

func (_u *ChunkUpdateOne) SetUpdatedAt(v time.Time) *ChunkUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ChunkUpdateOne) Where

func (_u *ChunkUpdateOne) Where(ps ...predicate.Chunk) *ChunkUpdateOne

Where appends a list predicates to the ChunkUpdate builder.

type ChunkUpsert

type ChunkUpsert struct {
	*sql.UpdateSet
}

ChunkUpsert is the "OnConflict" setter.

func (*ChunkUpsert) AddCompressedSize

func (u *ChunkUpsert) AddCompressedSize(v uint32) *ChunkUpsert

AddCompressedSize adds v to the "compressed_size" field.

func (*ChunkUpsert) AddSize

func (u *ChunkUpsert) AddSize(v uint32) *ChunkUpsert

AddSize adds v to the "size" field.

func (*ChunkUpsert) ClearUpdatedAt

func (u *ChunkUpsert) ClearUpdatedAt() *ChunkUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ChunkUpsert) SetCompressedSize

func (u *ChunkUpsert) SetCompressedSize(v uint32) *ChunkUpsert

SetCompressedSize sets the "compressed_size" field.

func (*ChunkUpsert) SetHash

func (u *ChunkUpsert) SetHash(v string) *ChunkUpsert

SetHash sets the "hash" field.

func (*ChunkUpsert) SetSize

func (u *ChunkUpsert) SetSize(v uint32) *ChunkUpsert

SetSize sets the "size" field.

func (*ChunkUpsert) SetUpdatedAt

func (u *ChunkUpsert) SetUpdatedAt(v time.Time) *ChunkUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ChunkUpsert) UpdateCompressedSize

func (u *ChunkUpsert) UpdateCompressedSize() *ChunkUpsert

UpdateCompressedSize sets the "compressed_size" field to the value that was provided on create.

func (*ChunkUpsert) UpdateHash

func (u *ChunkUpsert) UpdateHash() *ChunkUpsert

UpdateHash sets the "hash" field to the value that was provided on create.

func (*ChunkUpsert) UpdateSize

func (u *ChunkUpsert) UpdateSize() *ChunkUpsert

UpdateSize sets the "size" field to the value that was provided on create.

func (*ChunkUpsert) UpdateUpdatedAt

func (u *ChunkUpsert) UpdateUpdatedAt() *ChunkUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ChunkUpsertBulk

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

ChunkUpsertBulk is the builder for "upsert"-ing a bulk of Chunk nodes.

func (*ChunkUpsertBulk) AddCompressedSize

func (u *ChunkUpsertBulk) AddCompressedSize(v uint32) *ChunkUpsertBulk

AddCompressedSize adds v to the "compressed_size" field.

func (*ChunkUpsertBulk) AddSize

func (u *ChunkUpsertBulk) AddSize(v uint32) *ChunkUpsertBulk

AddSize adds v to the "size" field.

func (*ChunkUpsertBulk) ClearUpdatedAt

func (u *ChunkUpsertBulk) ClearUpdatedAt() *ChunkUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ChunkUpsertBulk) DoNothing

func (u *ChunkUpsertBulk) DoNothing() *ChunkUpsertBulk

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

func (*ChunkUpsertBulk) Exec

func (u *ChunkUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ChunkUpsertBulk) ExecX

func (u *ChunkUpsertBulk) ExecX(ctx context.Context)

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

func (*ChunkUpsertBulk) Ignore

func (u *ChunkUpsertBulk) Ignore() *ChunkUpsertBulk

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

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

func (*ChunkUpsertBulk) SetCompressedSize

func (u *ChunkUpsertBulk) SetCompressedSize(v uint32) *ChunkUpsertBulk

SetCompressedSize sets the "compressed_size" field.

func (*ChunkUpsertBulk) SetHash

func (u *ChunkUpsertBulk) SetHash(v string) *ChunkUpsertBulk

SetHash sets the "hash" field.

func (*ChunkUpsertBulk) SetSize

func (u *ChunkUpsertBulk) SetSize(v uint32) *ChunkUpsertBulk

SetSize sets the "size" field.

func (*ChunkUpsertBulk) SetUpdatedAt

func (u *ChunkUpsertBulk) SetUpdatedAt(v time.Time) *ChunkUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*ChunkUpsertBulk) Update

func (u *ChunkUpsertBulk) Update(set func(*ChunkUpsert)) *ChunkUpsertBulk

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

func (*ChunkUpsertBulk) UpdateCompressedSize

func (u *ChunkUpsertBulk) UpdateCompressedSize() *ChunkUpsertBulk

UpdateCompressedSize sets the "compressed_size" field to the value that was provided on create.

func (*ChunkUpsertBulk) UpdateHash

func (u *ChunkUpsertBulk) UpdateHash() *ChunkUpsertBulk

UpdateHash sets the "hash" field to the value that was provided on create.

func (*ChunkUpsertBulk) UpdateNewValues

func (u *ChunkUpsertBulk) UpdateNewValues() *ChunkUpsertBulk

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

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

func (*ChunkUpsertBulk) UpdateSize

func (u *ChunkUpsertBulk) UpdateSize() *ChunkUpsertBulk

UpdateSize sets the "size" field to the value that was provided on create.

func (*ChunkUpsertBulk) UpdateUpdatedAt

func (u *ChunkUpsertBulk) UpdateUpdatedAt() *ChunkUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ChunkUpsertOne

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

ChunkUpsertOne is the builder for "upsert"-ing

one Chunk node.

func (*ChunkUpsertOne) AddCompressedSize

func (u *ChunkUpsertOne) AddCompressedSize(v uint32) *ChunkUpsertOne

AddCompressedSize adds v to the "compressed_size" field.

func (*ChunkUpsertOne) AddSize

func (u *ChunkUpsertOne) AddSize(v uint32) *ChunkUpsertOne

AddSize adds v to the "size" field.

func (*ChunkUpsertOne) ClearUpdatedAt

func (u *ChunkUpsertOne) ClearUpdatedAt() *ChunkUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ChunkUpsertOne) DoNothing

func (u *ChunkUpsertOne) DoNothing() *ChunkUpsertOne

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

func (*ChunkUpsertOne) Exec

func (u *ChunkUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ChunkUpsertOne) ExecX

func (u *ChunkUpsertOne) ExecX(ctx context.Context)

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

func (*ChunkUpsertOne) ID

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

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

func (*ChunkUpsertOne) IDX

func (u *ChunkUpsertOne) IDX(ctx context.Context) int

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

func (*ChunkUpsertOne) Ignore

func (u *ChunkUpsertOne) Ignore() *ChunkUpsertOne

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

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

func (*ChunkUpsertOne) SetCompressedSize

func (u *ChunkUpsertOne) SetCompressedSize(v uint32) *ChunkUpsertOne

SetCompressedSize sets the "compressed_size" field.

func (*ChunkUpsertOne) SetHash

func (u *ChunkUpsertOne) SetHash(v string) *ChunkUpsertOne

SetHash sets the "hash" field.

func (*ChunkUpsertOne) SetSize

func (u *ChunkUpsertOne) SetSize(v uint32) *ChunkUpsertOne

SetSize sets the "size" field.

func (*ChunkUpsertOne) SetUpdatedAt

func (u *ChunkUpsertOne) SetUpdatedAt(v time.Time) *ChunkUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*ChunkUpsertOne) Update

func (u *ChunkUpsertOne) Update(set func(*ChunkUpsert)) *ChunkUpsertOne

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

func (*ChunkUpsertOne) UpdateCompressedSize

func (u *ChunkUpsertOne) UpdateCompressedSize() *ChunkUpsertOne

UpdateCompressedSize sets the "compressed_size" field to the value that was provided on create.

func (*ChunkUpsertOne) UpdateHash

func (u *ChunkUpsertOne) UpdateHash() *ChunkUpsertOne

UpdateHash sets the "hash" field to the value that was provided on create.

func (*ChunkUpsertOne) UpdateNewValues

func (u *ChunkUpsertOne) UpdateNewValues() *ChunkUpsertOne

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

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

func (*ChunkUpsertOne) UpdateSize

func (u *ChunkUpsertOne) UpdateSize() *ChunkUpsertOne

UpdateSize sets the "size" field to the value that was provided on create.

func (*ChunkUpsertOne) UpdateUpdatedAt

func (u *ChunkUpsertOne) UpdateUpdatedAt() *ChunkUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Chunks

type Chunks []*Chunk

Chunks is a parsable slice of Chunk.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Chunk is the client for interacting with the Chunk builders.
	Chunk *ChunkClient
	// ConfigEntry is the client for interacting with the ConfigEntry builders.
	ConfigEntry *ConfigEntryClient
	// NarFile is the client for interacting with the NarFile builders.
	NarFile *NarFileClient
	// NarFileChunk is the client for interacting with the NarFileChunk builders.
	NarFileChunk *NarFileChunkClient
	// NarInfo is the client for interacting with the NarInfo builders.
	NarInfo *NarInfoClient
	// NarInfoNarFile is the client for interacting with the NarInfoNarFile builders.
	NarInfoNarFile *NarInfoNarFileClient
	// NarInfoReference is the client for interacting with the NarInfoReference builders.
	NarInfoReference *NarInfoReferenceClient
	// NarInfoSignature is the client for interacting with the NarInfoSignature builders.
	NarInfoSignature *NarInfoSignatureClient
	// PinnedClosure is the client for interacting with the PinnedClosure builders.
	PinnedClosure *PinnedClosureClient
	// 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().
	Chunk.
	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 ConfigEntries

type ConfigEntries []*ConfigEntry

ConfigEntries is a parsable slice of ConfigEntry.

type ConfigEntry

type ConfigEntry struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

ConfigEntry is the model entity for the ConfigEntry schema.

func (*ConfigEntry) GetValue

func (_m *ConfigEntry) GetValue(name string) (ent.Value, error)

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

func (*ConfigEntry) String

func (_m *ConfigEntry) String() string

String implements the fmt.Stringer.

func (*ConfigEntry) Unwrap

func (_m *ConfigEntry) Unwrap() *ConfigEntry

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

func (_m *ConfigEntry) Update() *ConfigEntryUpdateOne

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

type ConfigEntryClient

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

ConfigEntryClient is a client for the ConfigEntry schema.

func NewConfigEntryClient

func NewConfigEntryClient(c config) *ConfigEntryClient

NewConfigEntryClient returns a client for the ConfigEntry from the given config.

func (*ConfigEntryClient) Create

func (c *ConfigEntryClient) Create() *ConfigEntryCreate

Create returns a builder for creating a ConfigEntry entity.

func (*ConfigEntryClient) CreateBulk

func (c *ConfigEntryClient) CreateBulk(builders ...*ConfigEntryCreate) *ConfigEntryCreateBulk

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

func (*ConfigEntryClient) Delete

func (c *ConfigEntryClient) Delete() *ConfigEntryDelete

Delete returns a delete builder for ConfigEntry.

func (*ConfigEntryClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ConfigEntryClient) DeleteOneID

func (c *ConfigEntryClient) DeleteOneID(id int) *ConfigEntryDeleteOne

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

func (*ConfigEntryClient) Get

func (c *ConfigEntryClient) Get(ctx context.Context, id int) (*ConfigEntry, error)

Get returns a ConfigEntry entity by its id.

func (*ConfigEntryClient) GetX

func (c *ConfigEntryClient) GetX(ctx context.Context, id int) *ConfigEntry

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

func (*ConfigEntryClient) Hooks

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

Hooks returns the client hooks.

func (*ConfigEntryClient) Intercept

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

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

func (*ConfigEntryClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ConfigEntryClient) MapCreateBulk

func (c *ConfigEntryClient) MapCreateBulk(slice any, setFunc func(*ConfigEntryCreate, int)) *ConfigEntryCreateBulk

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

func (c *ConfigEntryClient) Query() *ConfigEntryQuery

Query returns a query builder for ConfigEntry.

func (*ConfigEntryClient) Update

func (c *ConfigEntryClient) Update() *ConfigEntryUpdate

Update returns an update builder for ConfigEntry.

func (*ConfigEntryClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ConfigEntryClient) UpdateOneID

func (c *ConfigEntryClient) UpdateOneID(id int) *ConfigEntryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ConfigEntryClient) Use

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

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

type ConfigEntryCreate

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

ConfigEntryCreate is the builder for creating a ConfigEntry entity.

func (*ConfigEntryCreate) Exec

func (_c *ConfigEntryCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConfigEntryCreate) ExecX

func (_c *ConfigEntryCreate) ExecX(ctx context.Context)

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

func (*ConfigEntryCreate) Mutation

func (_c *ConfigEntryCreate) Mutation() *ConfigEntryMutation

Mutation returns the ConfigEntryMutation object of the builder.

func (*ConfigEntryCreate) OnConflict

func (_c *ConfigEntryCreate) OnConflict(opts ...sql.ConflictOption) *ConfigEntryUpsertOne

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

client.ConfigEntry.Create().
	SetCreatedAt(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.ConfigEntryUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ConfigEntryCreate) OnConflictColumns

func (_c *ConfigEntryCreate) OnConflictColumns(columns ...string) *ConfigEntryUpsertOne

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

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

func (*ConfigEntryCreate) Save

Save creates the ConfigEntry in the database.

func (*ConfigEntryCreate) SaveX

func (_c *ConfigEntryCreate) SaveX(ctx context.Context) *ConfigEntry

SaveX calls Save and panics if Save returns an error.

func (*ConfigEntryCreate) SetCreatedAt

func (_c *ConfigEntryCreate) SetCreatedAt(v time.Time) *ConfigEntryCreate

SetCreatedAt sets the "created_at" field.

func (*ConfigEntryCreate) SetKey

SetKey sets the "key" field.

func (*ConfigEntryCreate) SetNillableCreatedAt

func (_c *ConfigEntryCreate) SetNillableCreatedAt(v *time.Time) *ConfigEntryCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ConfigEntryCreate) SetNillableUpdatedAt

func (_c *ConfigEntryCreate) SetNillableUpdatedAt(v *time.Time) *ConfigEntryCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ConfigEntryCreate) SetUpdatedAt

func (_c *ConfigEntryCreate) SetUpdatedAt(v time.Time) *ConfigEntryCreate

SetUpdatedAt sets the "updated_at" field.

func (*ConfigEntryCreate) SetValue

func (_c *ConfigEntryCreate) SetValue(v string) *ConfigEntryCreate

SetValue sets the "value" field.

type ConfigEntryCreateBulk

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

ConfigEntryCreateBulk is the builder for creating many ConfigEntry entities in bulk.

func (*ConfigEntryCreateBulk) Exec

Exec executes the query.

func (*ConfigEntryCreateBulk) ExecX

func (_c *ConfigEntryCreateBulk) ExecX(ctx context.Context)

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

func (*ConfigEntryCreateBulk) OnConflict

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

client.ConfigEntry.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.ConfigEntryUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ConfigEntryCreateBulk) OnConflictColumns

func (_c *ConfigEntryCreateBulk) OnConflictColumns(columns ...string) *ConfigEntryUpsertBulk

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

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

func (*ConfigEntryCreateBulk) Save

Save creates the ConfigEntry entities in the database.

func (*ConfigEntryCreateBulk) SaveX

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

type ConfigEntryDelete

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

ConfigEntryDelete is the builder for deleting a ConfigEntry entity.

func (*ConfigEntryDelete) Exec

func (_d *ConfigEntryDelete) Exec(ctx context.Context) (int, error)

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

func (*ConfigEntryDelete) ExecX

func (_d *ConfigEntryDelete) ExecX(ctx context.Context) int

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

func (*ConfigEntryDelete) Where

Where appends a list predicates to the ConfigEntryDelete builder.

type ConfigEntryDeleteOne

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

ConfigEntryDeleteOne is the builder for deleting a single ConfigEntry entity.

func (*ConfigEntryDeleteOne) Exec

func (_d *ConfigEntryDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ConfigEntryDeleteOne) ExecX

func (_d *ConfigEntryDeleteOne) ExecX(ctx context.Context)

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

func (*ConfigEntryDeleteOne) Where

Where appends a list predicates to the ConfigEntryDelete builder.

type ConfigEntryGroupBy

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

ConfigEntryGroupBy is the group-by builder for ConfigEntry entities.

func (*ConfigEntryGroupBy) Aggregate

func (_g *ConfigEntryGroupBy) Aggregate(fns ...AggregateFunc) *ConfigEntryGroupBy

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

func (*ConfigEntryGroupBy) Bool

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

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

func (*ConfigEntryGroupBy) BoolX

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

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

func (*ConfigEntryGroupBy) Bools

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

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

func (*ConfigEntryGroupBy) BoolsX

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

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

func (*ConfigEntryGroupBy) Float64

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

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

func (*ConfigEntryGroupBy) Float64X

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

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

func (*ConfigEntryGroupBy) Float64s

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

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

func (*ConfigEntryGroupBy) Float64sX

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

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

func (*ConfigEntryGroupBy) Int

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

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

func (*ConfigEntryGroupBy) IntX

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

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

func (*ConfigEntryGroupBy) Ints

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

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

func (*ConfigEntryGroupBy) IntsX

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

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

func (*ConfigEntryGroupBy) Scan

func (_g *ConfigEntryGroupBy) Scan(ctx context.Context, v any) error

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

func (*ConfigEntryGroupBy) ScanX

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

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

func (*ConfigEntryGroupBy) String

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

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

func (*ConfigEntryGroupBy) StringX

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

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

func (*ConfigEntryGroupBy) Strings

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

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

func (*ConfigEntryGroupBy) StringsX

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

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

type ConfigEntryMutation

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

ConfigEntryMutation represents an operation that mutates the ConfigEntry nodes in the graph.

func (*ConfigEntryMutation) AddField

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

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

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

func (*ConfigEntryMutation) AddedField

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

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

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

func (*ConfigEntryMutation) AddedIDs

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

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

func (*ConfigEntryMutation) ClearEdge

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

func (m *ConfigEntryMutation) 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 (*ConfigEntryMutation) ClearUpdatedAt

func (m *ConfigEntryMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ConfigEntryMutation) ClearedEdges

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

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

func (*ConfigEntryMutation) ClearedFields

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

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

func (ConfigEntryMutation) Client

func (m ConfigEntryMutation) 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 (*ConfigEntryMutation) CreatedAt

func (m *ConfigEntryMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ConfigEntryMutation) EdgeCleared

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

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

func (*ConfigEntryMutation) Field

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

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

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

func (*ConfigEntryMutation) Fields

func (m *ConfigEntryMutation) 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 (*ConfigEntryMutation) ID

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

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

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

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

func (*ConfigEntryMutation) OldCreatedAt

func (m *ConfigEntryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ConfigEntry entity. If the ConfigEntry 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 (*ConfigEntryMutation) OldField

func (m *ConfigEntryMutation) 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 (*ConfigEntryMutation) OldKey

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

OldKey returns the old "key" field's value of the ConfigEntry entity. If the ConfigEntry 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 (*ConfigEntryMutation) OldUpdatedAt

func (m *ConfigEntryMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ConfigEntry entity. If the ConfigEntry 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 (*ConfigEntryMutation) OldValue

func (m *ConfigEntryMutation) OldValue(ctx context.Context) (v string, err error)

OldValue returns the old "value" field's value of the ConfigEntry entity. If the ConfigEntry 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 (*ConfigEntryMutation) Op

func (m *ConfigEntryMutation) Op() Op

Op returns the operation name.

func (*ConfigEntryMutation) RemovedEdges

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

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

func (*ConfigEntryMutation) RemovedIDs

func (m *ConfigEntryMutation) 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 (*ConfigEntryMutation) ResetCreatedAt

func (m *ConfigEntryMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ConfigEntryMutation) ResetEdge

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

func (m *ConfigEntryMutation) 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 (*ConfigEntryMutation) ResetKey

func (m *ConfigEntryMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*ConfigEntryMutation) ResetUpdatedAt

func (m *ConfigEntryMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ConfigEntryMutation) ResetValue

func (m *ConfigEntryMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*ConfigEntryMutation) SetCreatedAt

func (m *ConfigEntryMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ConfigEntryMutation) SetField

func (m *ConfigEntryMutation) 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 (*ConfigEntryMutation) SetKey

func (m *ConfigEntryMutation) SetKey(s string)

SetKey sets the "key" field.

func (*ConfigEntryMutation) SetOp

func (m *ConfigEntryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ConfigEntryMutation) SetUpdatedAt

func (m *ConfigEntryMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ConfigEntryMutation) SetValue

func (m *ConfigEntryMutation) SetValue(s string)

SetValue sets the "value" field.

func (ConfigEntryMutation) Tx

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

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

func (*ConfigEntryMutation) Type

func (m *ConfigEntryMutation) Type() string

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

func (*ConfigEntryMutation) UpdatedAt

func (m *ConfigEntryMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ConfigEntryMutation) UpdatedAtCleared

func (m *ConfigEntryMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*ConfigEntryMutation) Value

func (m *ConfigEntryMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*ConfigEntryMutation) Where

func (m *ConfigEntryMutation) Where(ps ...predicate.ConfigEntry)

Where appends a list predicates to the ConfigEntryMutation builder.

func (*ConfigEntryMutation) WhereP

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

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

type ConfigEntryQuery

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

ConfigEntryQuery is the builder for querying ConfigEntry entities.

func (*ConfigEntryQuery) Aggregate

func (_q *ConfigEntryQuery) Aggregate(fns ...AggregateFunc) *ConfigEntrySelect

Aggregate returns a ConfigEntrySelect configured with the given aggregations.

func (*ConfigEntryQuery) All

func (_q *ConfigEntryQuery) All(ctx context.Context) ([]*ConfigEntry, error)

All executes the query and returns a list of ConfigEntries.

func (*ConfigEntryQuery) AllX

func (_q *ConfigEntryQuery) AllX(ctx context.Context) []*ConfigEntry

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

func (*ConfigEntryQuery) Clone

func (_q *ConfigEntryQuery) Clone() *ConfigEntryQuery

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

func (*ConfigEntryQuery) Count

func (_q *ConfigEntryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ConfigEntryQuery) CountX

func (_q *ConfigEntryQuery) CountX(ctx context.Context) int

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

func (*ConfigEntryQuery) Exist

func (_q *ConfigEntryQuery) Exist(ctx context.Context) (bool, error)

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

func (*ConfigEntryQuery) ExistX

func (_q *ConfigEntryQuery) ExistX(ctx context.Context) bool

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

func (*ConfigEntryQuery) First

func (_q *ConfigEntryQuery) First(ctx context.Context) (*ConfigEntry, error)

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

func (*ConfigEntryQuery) FirstID

func (_q *ConfigEntryQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ConfigEntryQuery) FirstIDX

func (_q *ConfigEntryQuery) FirstIDX(ctx context.Context) int

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

func (*ConfigEntryQuery) FirstX

func (_q *ConfigEntryQuery) FirstX(ctx context.Context) *ConfigEntry

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

func (*ConfigEntryQuery) GroupBy

func (_q *ConfigEntryQuery) GroupBy(field string, fields ...string) *ConfigEntryGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ConfigEntry.Query().
	GroupBy(configentry.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ConfigEntryQuery) IDs

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

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

func (*ConfigEntryQuery) IDsX

func (_q *ConfigEntryQuery) IDsX(ctx context.Context) []int

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

func (*ConfigEntryQuery) Limit

func (_q *ConfigEntryQuery) Limit(limit int) *ConfigEntryQuery

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

func (*ConfigEntryQuery) Offset

func (_q *ConfigEntryQuery) Offset(offset int) *ConfigEntryQuery

Offset to start from.

func (*ConfigEntryQuery) Only

func (_q *ConfigEntryQuery) Only(ctx context.Context) (*ConfigEntry, error)

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

func (*ConfigEntryQuery) OnlyID

func (_q *ConfigEntryQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ConfigEntryQuery) OnlyIDX

func (_q *ConfigEntryQuery) OnlyIDX(ctx context.Context) int

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

func (*ConfigEntryQuery) OnlyX

func (_q *ConfigEntryQuery) OnlyX(ctx context.Context) *ConfigEntry

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

func (*ConfigEntryQuery) Order

Order specifies how the records should be ordered.

func (*ConfigEntryQuery) Select

func (_q *ConfigEntryQuery) Select(fields ...string) *ConfigEntrySelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.ConfigEntry.Query().
	Select(configentry.FieldCreatedAt).
	Scan(ctx, &v)

func (*ConfigEntryQuery) Unique

func (_q *ConfigEntryQuery) Unique(unique bool) *ConfigEntryQuery

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

Where adds a new predicate for the ConfigEntryQuery builder.

type ConfigEntrySelect

type ConfigEntrySelect struct {
	*ConfigEntryQuery
	// contains filtered or unexported fields
}

ConfigEntrySelect is the builder for selecting fields of ConfigEntry entities.

func (*ConfigEntrySelect) Aggregate

func (_s *ConfigEntrySelect) Aggregate(fns ...AggregateFunc) *ConfigEntrySelect

Aggregate adds the given aggregation functions to the selector query.

func (*ConfigEntrySelect) Bool

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

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

func (*ConfigEntrySelect) BoolX

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

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

func (*ConfigEntrySelect) Bools

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

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

func (*ConfigEntrySelect) BoolsX

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

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

func (*ConfigEntrySelect) Float64

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

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

func (*ConfigEntrySelect) Float64X

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

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

func (*ConfigEntrySelect) Float64s

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

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

func (*ConfigEntrySelect) Float64sX

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

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

func (*ConfigEntrySelect) Int

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

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

func (*ConfigEntrySelect) IntX

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

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

func (*ConfigEntrySelect) Ints

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

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

func (*ConfigEntrySelect) IntsX

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

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

func (*ConfigEntrySelect) Scan

func (_s *ConfigEntrySelect) Scan(ctx context.Context, v any) error

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

func (*ConfigEntrySelect) ScanX

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

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

func (*ConfigEntrySelect) String

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

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

func (*ConfigEntrySelect) StringX

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

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

func (*ConfigEntrySelect) Strings

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

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

func (*ConfigEntrySelect) StringsX

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

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

type ConfigEntryUpdate

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

ConfigEntryUpdate is the builder for updating ConfigEntry entities.

func (*ConfigEntryUpdate) ClearUpdatedAt

func (_u *ConfigEntryUpdate) ClearUpdatedAt() *ConfigEntryUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ConfigEntryUpdate) Exec

func (_u *ConfigEntryUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ConfigEntryUpdate) ExecX

func (_u *ConfigEntryUpdate) ExecX(ctx context.Context)

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

func (*ConfigEntryUpdate) Mutation

func (_u *ConfigEntryUpdate) Mutation() *ConfigEntryMutation

Mutation returns the ConfigEntryMutation object of the builder.

func (*ConfigEntryUpdate) Save

func (_u *ConfigEntryUpdate) Save(ctx context.Context) (int, error)

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

func (*ConfigEntryUpdate) SaveX

func (_u *ConfigEntryUpdate) SaveX(ctx context.Context) int

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

func (*ConfigEntryUpdate) SetKey

SetKey sets the "key" field.

func (*ConfigEntryUpdate) SetNillableKey

func (_u *ConfigEntryUpdate) SetNillableKey(v *string) *ConfigEntryUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*ConfigEntryUpdate) SetNillableUpdatedAt

func (_u *ConfigEntryUpdate) SetNillableUpdatedAt(v *time.Time) *ConfigEntryUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ConfigEntryUpdate) SetNillableValue

func (_u *ConfigEntryUpdate) SetNillableValue(v *string) *ConfigEntryUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*ConfigEntryUpdate) SetUpdatedAt

func (_u *ConfigEntryUpdate) SetUpdatedAt(v time.Time) *ConfigEntryUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ConfigEntryUpdate) SetValue

func (_u *ConfigEntryUpdate) SetValue(v string) *ConfigEntryUpdate

SetValue sets the "value" field.

func (*ConfigEntryUpdate) Where

Where appends a list predicates to the ConfigEntryUpdate builder.

type ConfigEntryUpdateOne

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

ConfigEntryUpdateOne is the builder for updating a single ConfigEntry entity.

func (*ConfigEntryUpdateOne) ClearUpdatedAt

func (_u *ConfigEntryUpdateOne) ClearUpdatedAt() *ConfigEntryUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ConfigEntryUpdateOne) Exec

func (_u *ConfigEntryUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ConfigEntryUpdateOne) ExecX

func (_u *ConfigEntryUpdateOne) ExecX(ctx context.Context)

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

func (*ConfigEntryUpdateOne) Mutation

func (_u *ConfigEntryUpdateOne) Mutation() *ConfigEntryMutation

Mutation returns the ConfigEntryMutation object of the builder.

func (*ConfigEntryUpdateOne) Save

Save executes the query and returns the updated ConfigEntry entity.

func (*ConfigEntryUpdateOne) SaveX

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

func (*ConfigEntryUpdateOne) Select

func (_u *ConfigEntryUpdateOne) Select(field string, fields ...string) *ConfigEntryUpdateOne

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

func (*ConfigEntryUpdateOne) SetKey

SetKey sets the "key" field.

func (*ConfigEntryUpdateOne) SetNillableKey

func (_u *ConfigEntryUpdateOne) SetNillableKey(v *string) *ConfigEntryUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*ConfigEntryUpdateOne) SetNillableUpdatedAt

func (_u *ConfigEntryUpdateOne) SetNillableUpdatedAt(v *time.Time) *ConfigEntryUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ConfigEntryUpdateOne) SetNillableValue

func (_u *ConfigEntryUpdateOne) SetNillableValue(v *string) *ConfigEntryUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*ConfigEntryUpdateOne) SetUpdatedAt

func (_u *ConfigEntryUpdateOne) SetUpdatedAt(v time.Time) *ConfigEntryUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ConfigEntryUpdateOne) SetValue

SetValue sets the "value" field.

func (*ConfigEntryUpdateOne) Where

Where appends a list predicates to the ConfigEntryUpdate builder.

type ConfigEntryUpsert

type ConfigEntryUpsert struct {
	*sql.UpdateSet
}

ConfigEntryUpsert is the "OnConflict" setter.

func (*ConfigEntryUpsert) ClearUpdatedAt

func (u *ConfigEntryUpsert) ClearUpdatedAt() *ConfigEntryUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ConfigEntryUpsert) SetKey

SetKey sets the "key" field.

func (*ConfigEntryUpsert) SetUpdatedAt

func (u *ConfigEntryUpsert) SetUpdatedAt(v time.Time) *ConfigEntryUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ConfigEntryUpsert) SetValue

func (u *ConfigEntryUpsert) SetValue(v string) *ConfigEntryUpsert

SetValue sets the "value" field.

func (*ConfigEntryUpsert) UpdateKey

func (u *ConfigEntryUpsert) UpdateKey() *ConfigEntryUpsert

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

func (*ConfigEntryUpsert) UpdateUpdatedAt

func (u *ConfigEntryUpsert) UpdateUpdatedAt() *ConfigEntryUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ConfigEntryUpsert) UpdateValue

func (u *ConfigEntryUpsert) UpdateValue() *ConfigEntryUpsert

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

type ConfigEntryUpsertBulk

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

ConfigEntryUpsertBulk is the builder for "upsert"-ing a bulk of ConfigEntry nodes.

func (*ConfigEntryUpsertBulk) ClearUpdatedAt

func (u *ConfigEntryUpsertBulk) ClearUpdatedAt() *ConfigEntryUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ConfigEntryUpsertBulk) DoNothing

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

func (*ConfigEntryUpsertBulk) Exec

Exec executes the query.

func (*ConfigEntryUpsertBulk) ExecX

func (u *ConfigEntryUpsertBulk) ExecX(ctx context.Context)

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

func (*ConfigEntryUpsertBulk) Ignore

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

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

func (*ConfigEntryUpsertBulk) SetKey

SetKey sets the "key" field.

func (*ConfigEntryUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ConfigEntryUpsertBulk) SetValue

SetValue sets the "value" field.

func (*ConfigEntryUpsertBulk) Update

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

func (*ConfigEntryUpsertBulk) UpdateKey

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

func (*ConfigEntryUpsertBulk) UpdateNewValues

func (u *ConfigEntryUpsertBulk) UpdateNewValues() *ConfigEntryUpsertBulk

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

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

func (*ConfigEntryUpsertBulk) UpdateUpdatedAt

func (u *ConfigEntryUpsertBulk) UpdateUpdatedAt() *ConfigEntryUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ConfigEntryUpsertBulk) UpdateValue

func (u *ConfigEntryUpsertBulk) UpdateValue() *ConfigEntryUpsertBulk

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

type ConfigEntryUpsertOne

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

ConfigEntryUpsertOne is the builder for "upsert"-ing

one ConfigEntry node.

func (*ConfigEntryUpsertOne) ClearUpdatedAt

func (u *ConfigEntryUpsertOne) ClearUpdatedAt() *ConfigEntryUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*ConfigEntryUpsertOne) DoNothing

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

func (*ConfigEntryUpsertOne) Exec

Exec executes the query.

func (*ConfigEntryUpsertOne) ExecX

func (u *ConfigEntryUpsertOne) ExecX(ctx context.Context)

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

func (*ConfigEntryUpsertOne) ID

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

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

func (*ConfigEntryUpsertOne) IDX

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

func (*ConfigEntryUpsertOne) Ignore

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

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

func (*ConfigEntryUpsertOne) SetKey

SetKey sets the "key" field.

func (*ConfigEntryUpsertOne) SetUpdatedAt

func (u *ConfigEntryUpsertOne) SetUpdatedAt(v time.Time) *ConfigEntryUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*ConfigEntryUpsertOne) SetValue

SetValue sets the "value" field.

func (*ConfigEntryUpsertOne) Update

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

func (*ConfigEntryUpsertOne) UpdateKey

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

func (*ConfigEntryUpsertOne) UpdateNewValues

func (u *ConfigEntryUpsertOne) UpdateNewValues() *ConfigEntryUpsertOne

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

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

func (*ConfigEntryUpsertOne) UpdateUpdatedAt

func (u *ConfigEntryUpsertOne) UpdateUpdatedAt() *ConfigEntryUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ConfigEntryUpsertOne) UpdateValue

func (u *ConfigEntryUpsertOne) UpdateValue() *ConfigEntryUpsertOne

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

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 NarFile

type NarFile struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Hash holds the value of the "hash" field.
	Hash string `json:"hash,omitempty"`
	// Compression holds the value of the "compression" field.
	Compression string `json:"compression,omitempty"`
	// FileSize holds the value of the "file_size" field.
	FileSize uint64 `json:"file_size,omitempty"`
	// Query holds the value of the "query" field.
	Query string `json:"query,omitempty"`
	// TotalChunks holds the value of the "total_chunks" field.
	TotalChunks int64 `json:"total_chunks,omitempty"`
	// ChunkingStartedAt holds the value of the "chunking_started_at" field.
	ChunkingStartedAt *time.Time `json:"chunking_started_at,omitempty"`
	// VerifiedAt holds the value of the "verified_at" field.
	VerifiedAt *time.Time `json:"verified_at,omitempty"`
	// LastAccessedAt holds the value of the "last_accessed_at" field.
	LastAccessedAt *time.Time `json:"last_accessed_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NarFileQuery when eager-loading is set.
	Edges NarFileEdges `json:"edges"`
	// contains filtered or unexported fields
}

NarFile is the model entity for the NarFile schema.

func (_m *NarFile) QueryChunkLinks() *NarFileChunkQuery

QueryChunkLinks queries the "chunk_links" edge of the NarFile entity.

func (*NarFile) QueryNarInfoNarFiles

func (_m *NarFile) QueryNarInfoNarFiles() *NarInfoNarFileQuery

QueryNarInfoNarFiles queries the "nar_info_nar_files" edge of the NarFile entity.

func (*NarFile) String

func (_m *NarFile) String() string

String implements the fmt.Stringer.

func (*NarFile) Unwrap

func (_m *NarFile) Unwrap() *NarFile

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

func (_m *NarFile) Update() *NarFileUpdateOne

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

func (*NarFile) Value

func (_m *NarFile) Value(name string) (ent.Value, error)

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

type NarFileChunk

type NarFileChunk struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// NarFileID holds the value of the "nar_file_id" field.
	NarFileID int `json:"nar_file_id,omitempty"`
	// ChunkID holds the value of the "chunk_id" field.
	ChunkID int `json:"chunk_id,omitempty"`
	// ChunkIndex holds the value of the "chunk_index" field.
	ChunkIndex int `json:"chunk_index,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NarFileChunkQuery when eager-loading is set.
	Edges NarFileChunkEdges `json:"edges"`
	// contains filtered or unexported fields
}

NarFileChunk is the model entity for the NarFileChunk schema.

func (*NarFileChunk) QueryChunk

func (_m *NarFileChunk) QueryChunk() *ChunkQuery

QueryChunk queries the "chunk" edge of the NarFileChunk entity.

func (*NarFileChunk) QueryNarFile

func (_m *NarFileChunk) QueryNarFile() *NarFileQuery

QueryNarFile queries the "nar_file" edge of the NarFileChunk entity.

func (*NarFileChunk) String

func (_m *NarFileChunk) String() string

String implements the fmt.Stringer.

func (*NarFileChunk) Unwrap

func (_m *NarFileChunk) Unwrap() *NarFileChunk

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

func (_m *NarFileChunk) Update() *NarFileChunkUpdateOne

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

func (*NarFileChunk) Value

func (_m *NarFileChunk) Value(name string) (ent.Value, error)

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

type NarFileChunkClient

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

NarFileChunkClient is a client for the NarFileChunk schema.

func NewNarFileChunkClient

func NewNarFileChunkClient(c config) *NarFileChunkClient

NewNarFileChunkClient returns a client for the NarFileChunk from the given config.

func (*NarFileChunkClient) Create

Create returns a builder for creating a NarFileChunk entity.

func (*NarFileChunkClient) CreateBulk

func (c *NarFileChunkClient) CreateBulk(builders ...*NarFileChunkCreate) *NarFileChunkCreateBulk

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

func (*NarFileChunkClient) Delete

Delete returns a delete builder for NarFileChunk.

func (*NarFileChunkClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NarFileChunkClient) DeleteOneID

func (c *NarFileChunkClient) DeleteOneID(id int) *NarFileChunkDeleteOne

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

func (*NarFileChunkClient) Get

Get returns a NarFileChunk entity by its id.

func (*NarFileChunkClient) GetX

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

func (*NarFileChunkClient) Hooks

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

Hooks returns the client hooks.

func (*NarFileChunkClient) Intercept

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

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

func (*NarFileChunkClient) Interceptors

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

Interceptors returns the client interceptors.

func (*NarFileChunkClient) MapCreateBulk

func (c *NarFileChunkClient) MapCreateBulk(slice any, setFunc func(*NarFileChunkCreate, int)) *NarFileChunkCreateBulk

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

Query returns a query builder for NarFileChunk.

func (*NarFileChunkClient) QueryChunk

func (c *NarFileChunkClient) QueryChunk(_m *NarFileChunk) *ChunkQuery

QueryChunk queries the chunk edge of a NarFileChunk.

func (*NarFileChunkClient) QueryNarFile

func (c *NarFileChunkClient) QueryNarFile(_m *NarFileChunk) *NarFileQuery

QueryNarFile queries the nar_file edge of a NarFileChunk.

func (*NarFileChunkClient) Update

Update returns an update builder for NarFileChunk.

func (*NarFileChunkClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*NarFileChunkClient) UpdateOneID

func (c *NarFileChunkClient) UpdateOneID(id int) *NarFileChunkUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NarFileChunkClient) Use

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

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

type NarFileChunkCreate

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

NarFileChunkCreate is the builder for creating a NarFileChunk entity.

func (*NarFileChunkCreate) Exec

func (_c *NarFileChunkCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarFileChunkCreate) ExecX

func (_c *NarFileChunkCreate) ExecX(ctx context.Context)

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

func (*NarFileChunkCreate) Mutation

func (_c *NarFileChunkCreate) Mutation() *NarFileChunkMutation

Mutation returns the NarFileChunkMutation object of the builder.

func (*NarFileChunkCreate) OnConflict

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

client.NarFileChunk.Create().
	SetNarFileID(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.NarFileChunkUpsert) {
		SetNarFileID(v+v).
	}).
	Exec(ctx)

func (*NarFileChunkCreate) OnConflictColumns

func (_c *NarFileChunkCreate) OnConflictColumns(columns ...string) *NarFileChunkUpsertOne

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

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

func (*NarFileChunkCreate) Save

Save creates the NarFileChunk in the database.

func (*NarFileChunkCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*NarFileChunkCreate) SetChunk

func (_c *NarFileChunkCreate) SetChunk(v *Chunk) *NarFileChunkCreate

SetChunk sets the "chunk" edge to the Chunk entity.

func (*NarFileChunkCreate) SetChunkID

func (_c *NarFileChunkCreate) SetChunkID(v int) *NarFileChunkCreate

SetChunkID sets the "chunk_id" field.

func (*NarFileChunkCreate) SetChunkIndex

func (_c *NarFileChunkCreate) SetChunkIndex(v int) *NarFileChunkCreate

SetChunkIndex sets the "chunk_index" field.

func (*NarFileChunkCreate) SetNarFile

func (_c *NarFileChunkCreate) SetNarFile(v *NarFile) *NarFileChunkCreate

SetNarFile sets the "nar_file" edge to the NarFile entity.

func (*NarFileChunkCreate) SetNarFileID

func (_c *NarFileChunkCreate) SetNarFileID(v int) *NarFileChunkCreate

SetNarFileID sets the "nar_file_id" field.

type NarFileChunkCreateBulk

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

NarFileChunkCreateBulk is the builder for creating many NarFileChunk entities in bulk.

func (*NarFileChunkCreateBulk) Exec

Exec executes the query.

func (*NarFileChunkCreateBulk) ExecX

func (_c *NarFileChunkCreateBulk) ExecX(ctx context.Context)

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

func (*NarFileChunkCreateBulk) OnConflict

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

client.NarFileChunk.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.NarFileChunkUpsert) {
		SetNarFileID(v+v).
	}).
	Exec(ctx)

func (*NarFileChunkCreateBulk) OnConflictColumns

func (_c *NarFileChunkCreateBulk) OnConflictColumns(columns ...string) *NarFileChunkUpsertBulk

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

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

func (*NarFileChunkCreateBulk) Save

Save creates the NarFileChunk entities in the database.

func (*NarFileChunkCreateBulk) SaveX

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

type NarFileChunkDelete

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

NarFileChunkDelete is the builder for deleting a NarFileChunk entity.

func (*NarFileChunkDelete) Exec

func (_d *NarFileChunkDelete) Exec(ctx context.Context) (int, error)

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

func (*NarFileChunkDelete) ExecX

func (_d *NarFileChunkDelete) ExecX(ctx context.Context) int

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

func (*NarFileChunkDelete) Where

Where appends a list predicates to the NarFileChunkDelete builder.

type NarFileChunkDeleteOne

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

NarFileChunkDeleteOne is the builder for deleting a single NarFileChunk entity.

func (*NarFileChunkDeleteOne) Exec

Exec executes the deletion query.

func (*NarFileChunkDeleteOne) ExecX

func (_d *NarFileChunkDeleteOne) ExecX(ctx context.Context)

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

func (*NarFileChunkDeleteOne) Where

Where appends a list predicates to the NarFileChunkDelete builder.

type NarFileChunkEdges

type NarFileChunkEdges struct {
	// NarFile holds the value of the nar_file edge.
	NarFile *NarFile `json:"nar_file,omitempty"`
	// Chunk holds the value of the chunk edge.
	Chunk *Chunk `json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

NarFileChunkEdges holds the relations/edges for other nodes in the graph.

func (NarFileChunkEdges) ChunkOrErr

func (e NarFileChunkEdges) ChunkOrErr() (*Chunk, error)

ChunkOrErr returns the Chunk value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (NarFileChunkEdges) NarFileOrErr

func (e NarFileChunkEdges) NarFileOrErr() (*NarFile, error)

NarFileOrErr returns the NarFile value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type NarFileChunkGroupBy

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

NarFileChunkGroupBy is the group-by builder for NarFileChunk entities.

func (*NarFileChunkGroupBy) Aggregate

func (_g *NarFileChunkGroupBy) Aggregate(fns ...AggregateFunc) *NarFileChunkGroupBy

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

func (*NarFileChunkGroupBy) Bool

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

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

func (*NarFileChunkGroupBy) BoolX

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

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

func (*NarFileChunkGroupBy) Bools

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

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

func (*NarFileChunkGroupBy) BoolsX

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

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

func (*NarFileChunkGroupBy) Float64

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

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

func (*NarFileChunkGroupBy) Float64X

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

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

func (*NarFileChunkGroupBy) Float64s

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

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

func (*NarFileChunkGroupBy) Float64sX

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

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

func (*NarFileChunkGroupBy) Int

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

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

func (*NarFileChunkGroupBy) IntX

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

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

func (*NarFileChunkGroupBy) Ints

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

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

func (*NarFileChunkGroupBy) IntsX

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

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

func (*NarFileChunkGroupBy) Scan

func (_g *NarFileChunkGroupBy) Scan(ctx context.Context, v any) error

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

func (*NarFileChunkGroupBy) ScanX

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

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

func (*NarFileChunkGroupBy) String

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

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

func (*NarFileChunkGroupBy) StringX

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

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

func (*NarFileChunkGroupBy) Strings

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

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

func (*NarFileChunkGroupBy) StringsX

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

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

type NarFileChunkMutation

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

NarFileChunkMutation represents an operation that mutates the NarFileChunk nodes in the graph.

func (*NarFileChunkMutation) AddChunkIndex

func (m *NarFileChunkMutation) AddChunkIndex(i int)

AddChunkIndex adds i to the "chunk_index" field.

func (*NarFileChunkMutation) AddField

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) AddedChunkIndex

func (m *NarFileChunkMutation) AddedChunkIndex() (r int, exists bool)

AddedChunkIndex returns the value that was added to the "chunk_index" field in this mutation.

func (*NarFileChunkMutation) AddedEdges

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

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

func (*NarFileChunkMutation) AddedField

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

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

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

func (*NarFileChunkMutation) AddedIDs

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

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

func (*NarFileChunkMutation) ChunkCleared

func (m *NarFileChunkMutation) ChunkCleared() bool

ChunkCleared reports if the "chunk" edge to the Chunk entity was cleared.

func (*NarFileChunkMutation) ChunkID

func (m *NarFileChunkMutation) ChunkID() (r int, exists bool)

ChunkID returns the value of the "chunk_id" field in the mutation.

func (*NarFileChunkMutation) ChunkIDs

func (m *NarFileChunkMutation) ChunkIDs() (ids []int)

ChunkIDs returns the "chunk" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ChunkID instead. It exists only for internal usage by the builders.

func (*NarFileChunkMutation) ChunkIndex

func (m *NarFileChunkMutation) ChunkIndex() (r int, exists bool)

ChunkIndex returns the value of the "chunk_index" field in the mutation.

func (*NarFileChunkMutation) ClearChunk

func (m *NarFileChunkMutation) ClearChunk()

ClearChunk clears the "chunk" edge to the Chunk entity.

func (*NarFileChunkMutation) ClearEdge

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

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) ClearNarFile

func (m *NarFileChunkMutation) ClearNarFile()

ClearNarFile clears the "nar_file" edge to the NarFile entity.

func (*NarFileChunkMutation) ClearedEdges

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

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

func (*NarFileChunkMutation) ClearedFields

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

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

func (NarFileChunkMutation) Client

func (m NarFileChunkMutation) 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 (*NarFileChunkMutation) EdgeCleared

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

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

func (*NarFileChunkMutation) Field

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

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

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

func (*NarFileChunkMutation) Fields

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) ID

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

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) NarFileCleared

func (m *NarFileChunkMutation) NarFileCleared() bool

NarFileCleared reports if the "nar_file" edge to the NarFile entity was cleared.

func (*NarFileChunkMutation) NarFileID

func (m *NarFileChunkMutation) NarFileID() (r int, exists bool)

NarFileID returns the value of the "nar_file_id" field in the mutation.

func (*NarFileChunkMutation) NarFileIDs

func (m *NarFileChunkMutation) NarFileIDs() (ids []int)

NarFileIDs returns the "nar_file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NarFileID instead. It exists only for internal usage by the builders.

func (*NarFileChunkMutation) OldChunkID

func (m *NarFileChunkMutation) OldChunkID(ctx context.Context) (v int, err error)

OldChunkID returns the old "chunk_id" field's value of the NarFileChunk entity. If the NarFileChunk 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 (*NarFileChunkMutation) OldChunkIndex

func (m *NarFileChunkMutation) OldChunkIndex(ctx context.Context) (v int, err error)

OldChunkIndex returns the old "chunk_index" field's value of the NarFileChunk entity. If the NarFileChunk 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 (*NarFileChunkMutation) OldField

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) OldNarFileID

func (m *NarFileChunkMutation) OldNarFileID(ctx context.Context) (v int, err error)

OldNarFileID returns the old "nar_file_id" field's value of the NarFileChunk entity. If the NarFileChunk 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 (*NarFileChunkMutation) Op

func (m *NarFileChunkMutation) Op() Op

Op returns the operation name.

func (*NarFileChunkMutation) RemovedEdges

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

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

func (*NarFileChunkMutation) RemovedIDs

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) ResetChunk

func (m *NarFileChunkMutation) ResetChunk()

ResetChunk resets all changes to the "chunk" edge.

func (*NarFileChunkMutation) ResetChunkID

func (m *NarFileChunkMutation) ResetChunkID()

ResetChunkID resets all changes to the "chunk_id" field.

func (*NarFileChunkMutation) ResetChunkIndex

func (m *NarFileChunkMutation) ResetChunkIndex()

ResetChunkIndex resets all changes to the "chunk_index" field.

func (*NarFileChunkMutation) ResetEdge

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

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) ResetNarFile

func (m *NarFileChunkMutation) ResetNarFile()

ResetNarFile resets all changes to the "nar_file" edge.

func (*NarFileChunkMutation) ResetNarFileID

func (m *NarFileChunkMutation) ResetNarFileID()

ResetNarFileID resets all changes to the "nar_file_id" field.

func (*NarFileChunkMutation) SetChunkID

func (m *NarFileChunkMutation) SetChunkID(i int)

SetChunkID sets the "chunk_id" field.

func (*NarFileChunkMutation) SetChunkIndex

func (m *NarFileChunkMutation) SetChunkIndex(i int)

SetChunkIndex sets the "chunk_index" field.

func (*NarFileChunkMutation) SetField

func (m *NarFileChunkMutation) 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 (*NarFileChunkMutation) SetNarFileID

func (m *NarFileChunkMutation) SetNarFileID(i int)

SetNarFileID sets the "nar_file_id" field.

func (*NarFileChunkMutation) SetOp

func (m *NarFileChunkMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (NarFileChunkMutation) Tx

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

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

func (*NarFileChunkMutation) Type

func (m *NarFileChunkMutation) Type() string

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

func (*NarFileChunkMutation) Where

Where appends a list predicates to the NarFileChunkMutation builder.

func (*NarFileChunkMutation) WhereP

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

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

type NarFileChunkQuery

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

NarFileChunkQuery is the builder for querying NarFileChunk entities.

func (*NarFileChunkQuery) Aggregate

func (_q *NarFileChunkQuery) Aggregate(fns ...AggregateFunc) *NarFileChunkSelect

Aggregate returns a NarFileChunkSelect configured with the given aggregations.

func (*NarFileChunkQuery) All

func (_q *NarFileChunkQuery) All(ctx context.Context) ([]*NarFileChunk, error)

All executes the query and returns a list of NarFileChunks.

func (*NarFileChunkQuery) AllX

func (_q *NarFileChunkQuery) AllX(ctx context.Context) []*NarFileChunk

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

func (*NarFileChunkQuery) Clone

func (_q *NarFileChunkQuery) Clone() *NarFileChunkQuery

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

func (*NarFileChunkQuery) Count

func (_q *NarFileChunkQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NarFileChunkQuery) CountX

func (_q *NarFileChunkQuery) CountX(ctx context.Context) int

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

func (*NarFileChunkQuery) Exist

func (_q *NarFileChunkQuery) Exist(ctx context.Context) (bool, error)

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

func (*NarFileChunkQuery) ExistX

func (_q *NarFileChunkQuery) ExistX(ctx context.Context) bool

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

func (*NarFileChunkQuery) First

func (_q *NarFileChunkQuery) First(ctx context.Context) (*NarFileChunk, error)

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

func (*NarFileChunkQuery) FirstID

func (_q *NarFileChunkQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*NarFileChunkQuery) FirstIDX

func (_q *NarFileChunkQuery) FirstIDX(ctx context.Context) int

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

func (*NarFileChunkQuery) FirstX

func (_q *NarFileChunkQuery) FirstX(ctx context.Context) *NarFileChunk

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

func (*NarFileChunkQuery) GroupBy

func (_q *NarFileChunkQuery) GroupBy(field string, fields ...string) *NarFileChunkGroupBy

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 {
	NarFileID int `json:"nar_file_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NarFileChunk.Query().
	GroupBy(narfilechunk.FieldNarFileID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NarFileChunkQuery) IDs

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

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

func (*NarFileChunkQuery) IDsX

func (_q *NarFileChunkQuery) IDsX(ctx context.Context) []int

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

func (*NarFileChunkQuery) Limit

func (_q *NarFileChunkQuery) Limit(limit int) *NarFileChunkQuery

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

func (*NarFileChunkQuery) Offset

func (_q *NarFileChunkQuery) Offset(offset int) *NarFileChunkQuery

Offset to start from.

func (*NarFileChunkQuery) Only

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

func (*NarFileChunkQuery) OnlyID

func (_q *NarFileChunkQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*NarFileChunkQuery) OnlyIDX

func (_q *NarFileChunkQuery) OnlyIDX(ctx context.Context) int

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

func (*NarFileChunkQuery) OnlyX

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

func (*NarFileChunkQuery) Order

Order specifies how the records should be ordered.

func (*NarFileChunkQuery) QueryChunk

func (_q *NarFileChunkQuery) QueryChunk() *ChunkQuery

QueryChunk chains the current query on the "chunk" edge.

func (*NarFileChunkQuery) QueryNarFile

func (_q *NarFileChunkQuery) QueryNarFile() *NarFileQuery

QueryNarFile chains the current query on the "nar_file" edge.

func (*NarFileChunkQuery) Select

func (_q *NarFileChunkQuery) Select(fields ...string) *NarFileChunkSelect

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 {
	NarFileID int `json:"nar_file_id,omitempty"`
}

client.NarFileChunk.Query().
	Select(narfilechunk.FieldNarFileID).
	Scan(ctx, &v)

func (*NarFileChunkQuery) Unique

func (_q *NarFileChunkQuery) Unique(unique bool) *NarFileChunkQuery

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

Where adds a new predicate for the NarFileChunkQuery builder.

func (*NarFileChunkQuery) WithChunk

func (_q *NarFileChunkQuery) WithChunk(opts ...func(*ChunkQuery)) *NarFileChunkQuery

WithChunk tells the query-builder to eager-load the nodes that are connected to the "chunk" edge. The optional arguments are used to configure the query builder of the edge.

func (*NarFileChunkQuery) WithNarFile

func (_q *NarFileChunkQuery) WithNarFile(opts ...func(*NarFileQuery)) *NarFileChunkQuery

WithNarFile tells the query-builder to eager-load the nodes that are connected to the "nar_file" edge. The optional arguments are used to configure the query builder of the edge.

type NarFileChunkSelect

type NarFileChunkSelect struct {
	*NarFileChunkQuery
	// contains filtered or unexported fields
}

NarFileChunkSelect is the builder for selecting fields of NarFileChunk entities.

func (*NarFileChunkSelect) Aggregate

func (_s *NarFileChunkSelect) Aggregate(fns ...AggregateFunc) *NarFileChunkSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NarFileChunkSelect) Bool

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

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

func (*NarFileChunkSelect) BoolX

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

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

func (*NarFileChunkSelect) Bools

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

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

func (*NarFileChunkSelect) BoolsX

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

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

func (*NarFileChunkSelect) Float64

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

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

func (*NarFileChunkSelect) Float64X

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

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

func (*NarFileChunkSelect) Float64s

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

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

func (*NarFileChunkSelect) Float64sX

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

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

func (*NarFileChunkSelect) Int

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

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

func (*NarFileChunkSelect) IntX

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

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

func (*NarFileChunkSelect) Ints

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

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

func (*NarFileChunkSelect) IntsX

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

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

func (*NarFileChunkSelect) Scan

func (_s *NarFileChunkSelect) Scan(ctx context.Context, v any) error

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

func (*NarFileChunkSelect) ScanX

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

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

func (*NarFileChunkSelect) String

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

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

func (*NarFileChunkSelect) StringX

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

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

func (*NarFileChunkSelect) Strings

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

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

func (*NarFileChunkSelect) StringsX

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

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

type NarFileChunkUpdate

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

NarFileChunkUpdate is the builder for updating NarFileChunk entities.

func (*NarFileChunkUpdate) AddChunkIndex

func (_u *NarFileChunkUpdate) AddChunkIndex(v int) *NarFileChunkUpdate

AddChunkIndex adds value to the "chunk_index" field.

func (*NarFileChunkUpdate) ClearChunk

func (_u *NarFileChunkUpdate) ClearChunk() *NarFileChunkUpdate

ClearChunk clears the "chunk" edge to the Chunk entity.

func (*NarFileChunkUpdate) ClearNarFile

func (_u *NarFileChunkUpdate) ClearNarFile() *NarFileChunkUpdate

ClearNarFile clears the "nar_file" edge to the NarFile entity.

func (*NarFileChunkUpdate) Exec

func (_u *NarFileChunkUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarFileChunkUpdate) ExecX

func (_u *NarFileChunkUpdate) ExecX(ctx context.Context)

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

func (*NarFileChunkUpdate) Mutation

func (_u *NarFileChunkUpdate) Mutation() *NarFileChunkMutation

Mutation returns the NarFileChunkMutation object of the builder.

func (*NarFileChunkUpdate) Save

func (_u *NarFileChunkUpdate) Save(ctx context.Context) (int, error)

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

func (*NarFileChunkUpdate) SaveX

func (_u *NarFileChunkUpdate) SaveX(ctx context.Context) int

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

func (*NarFileChunkUpdate) SetChunk

func (_u *NarFileChunkUpdate) SetChunk(v *Chunk) *NarFileChunkUpdate

SetChunk sets the "chunk" edge to the Chunk entity.

func (*NarFileChunkUpdate) SetChunkID

func (_u *NarFileChunkUpdate) SetChunkID(v int) *NarFileChunkUpdate

SetChunkID sets the "chunk_id" field.

func (*NarFileChunkUpdate) SetChunkIndex

func (_u *NarFileChunkUpdate) SetChunkIndex(v int) *NarFileChunkUpdate

SetChunkIndex sets the "chunk_index" field.

func (*NarFileChunkUpdate) SetNarFile

func (_u *NarFileChunkUpdate) SetNarFile(v *NarFile) *NarFileChunkUpdate

SetNarFile sets the "nar_file" edge to the NarFile entity.

func (*NarFileChunkUpdate) SetNarFileID

func (_u *NarFileChunkUpdate) SetNarFileID(v int) *NarFileChunkUpdate

SetNarFileID sets the "nar_file_id" field.

func (*NarFileChunkUpdate) SetNillableChunkID

func (_u *NarFileChunkUpdate) SetNillableChunkID(v *int) *NarFileChunkUpdate

SetNillableChunkID sets the "chunk_id" field if the given value is not nil.

func (*NarFileChunkUpdate) SetNillableChunkIndex

func (_u *NarFileChunkUpdate) SetNillableChunkIndex(v *int) *NarFileChunkUpdate

SetNillableChunkIndex sets the "chunk_index" field if the given value is not nil.

func (*NarFileChunkUpdate) SetNillableNarFileID

func (_u *NarFileChunkUpdate) SetNillableNarFileID(v *int) *NarFileChunkUpdate

SetNillableNarFileID sets the "nar_file_id" field if the given value is not nil.

func (*NarFileChunkUpdate) Where

Where appends a list predicates to the NarFileChunkUpdate builder.

type NarFileChunkUpdateOne

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

NarFileChunkUpdateOne is the builder for updating a single NarFileChunk entity.

func (*NarFileChunkUpdateOne) AddChunkIndex

func (_u *NarFileChunkUpdateOne) AddChunkIndex(v int) *NarFileChunkUpdateOne

AddChunkIndex adds value to the "chunk_index" field.

func (*NarFileChunkUpdateOne) ClearChunk

func (_u *NarFileChunkUpdateOne) ClearChunk() *NarFileChunkUpdateOne

ClearChunk clears the "chunk" edge to the Chunk entity.

func (*NarFileChunkUpdateOne) ClearNarFile

func (_u *NarFileChunkUpdateOne) ClearNarFile() *NarFileChunkUpdateOne

ClearNarFile clears the "nar_file" edge to the NarFile entity.

func (*NarFileChunkUpdateOne) Exec

Exec executes the query on the entity.

func (*NarFileChunkUpdateOne) ExecX

func (_u *NarFileChunkUpdateOne) ExecX(ctx context.Context)

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

func (*NarFileChunkUpdateOne) Mutation

Mutation returns the NarFileChunkMutation object of the builder.

func (*NarFileChunkUpdateOne) Save

Save executes the query and returns the updated NarFileChunk entity.

func (*NarFileChunkUpdateOne) SaveX

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

func (*NarFileChunkUpdateOne) Select

func (_u *NarFileChunkUpdateOne) Select(field string, fields ...string) *NarFileChunkUpdateOne

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

func (*NarFileChunkUpdateOne) SetChunk

SetChunk sets the "chunk" edge to the Chunk entity.

func (*NarFileChunkUpdateOne) SetChunkID

func (_u *NarFileChunkUpdateOne) SetChunkID(v int) *NarFileChunkUpdateOne

SetChunkID sets the "chunk_id" field.

func (*NarFileChunkUpdateOne) SetChunkIndex

func (_u *NarFileChunkUpdateOne) SetChunkIndex(v int) *NarFileChunkUpdateOne

SetChunkIndex sets the "chunk_index" field.

func (*NarFileChunkUpdateOne) SetNarFile

SetNarFile sets the "nar_file" edge to the NarFile entity.

func (*NarFileChunkUpdateOne) SetNarFileID

func (_u *NarFileChunkUpdateOne) SetNarFileID(v int) *NarFileChunkUpdateOne

SetNarFileID sets the "nar_file_id" field.

func (*NarFileChunkUpdateOne) SetNillableChunkID

func (_u *NarFileChunkUpdateOne) SetNillableChunkID(v *int) *NarFileChunkUpdateOne

SetNillableChunkID sets the "chunk_id" field if the given value is not nil.

func (*NarFileChunkUpdateOne) SetNillableChunkIndex

func (_u *NarFileChunkUpdateOne) SetNillableChunkIndex(v *int) *NarFileChunkUpdateOne

SetNillableChunkIndex sets the "chunk_index" field if the given value is not nil.

func (*NarFileChunkUpdateOne) SetNillableNarFileID

func (_u *NarFileChunkUpdateOne) SetNillableNarFileID(v *int) *NarFileChunkUpdateOne

SetNillableNarFileID sets the "nar_file_id" field if the given value is not nil.

func (*NarFileChunkUpdateOne) Where

Where appends a list predicates to the NarFileChunkUpdate builder.

type NarFileChunkUpsert

type NarFileChunkUpsert struct {
	*sql.UpdateSet
}

NarFileChunkUpsert is the "OnConflict" setter.

func (*NarFileChunkUpsert) AddChunkIndex

func (u *NarFileChunkUpsert) AddChunkIndex(v int) *NarFileChunkUpsert

AddChunkIndex adds v to the "chunk_index" field.

func (*NarFileChunkUpsert) SetChunkID

func (u *NarFileChunkUpsert) SetChunkID(v int) *NarFileChunkUpsert

SetChunkID sets the "chunk_id" field.

func (*NarFileChunkUpsert) SetChunkIndex

func (u *NarFileChunkUpsert) SetChunkIndex(v int) *NarFileChunkUpsert

SetChunkIndex sets the "chunk_index" field.

func (*NarFileChunkUpsert) SetNarFileID

func (u *NarFileChunkUpsert) SetNarFileID(v int) *NarFileChunkUpsert

SetNarFileID sets the "nar_file_id" field.

func (*NarFileChunkUpsert) UpdateChunkID

func (u *NarFileChunkUpsert) UpdateChunkID() *NarFileChunkUpsert

UpdateChunkID sets the "chunk_id" field to the value that was provided on create.

func (*NarFileChunkUpsert) UpdateChunkIndex

func (u *NarFileChunkUpsert) UpdateChunkIndex() *NarFileChunkUpsert

UpdateChunkIndex sets the "chunk_index" field to the value that was provided on create.

func (*NarFileChunkUpsert) UpdateNarFileID

func (u *NarFileChunkUpsert) UpdateNarFileID() *NarFileChunkUpsert

UpdateNarFileID sets the "nar_file_id" field to the value that was provided on create.

type NarFileChunkUpsertBulk

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

NarFileChunkUpsertBulk is the builder for "upsert"-ing a bulk of NarFileChunk nodes.

func (*NarFileChunkUpsertBulk) AddChunkIndex

func (u *NarFileChunkUpsertBulk) AddChunkIndex(v int) *NarFileChunkUpsertBulk

AddChunkIndex adds v to the "chunk_index" field.

func (*NarFileChunkUpsertBulk) DoNothing

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

func (*NarFileChunkUpsertBulk) Exec

Exec executes the query.

func (*NarFileChunkUpsertBulk) ExecX

func (u *NarFileChunkUpsertBulk) ExecX(ctx context.Context)

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

func (*NarFileChunkUpsertBulk) Ignore

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

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

func (*NarFileChunkUpsertBulk) SetChunkID

SetChunkID sets the "chunk_id" field.

func (*NarFileChunkUpsertBulk) SetChunkIndex

func (u *NarFileChunkUpsertBulk) SetChunkIndex(v int) *NarFileChunkUpsertBulk

SetChunkIndex sets the "chunk_index" field.

func (*NarFileChunkUpsertBulk) SetNarFileID

SetNarFileID sets the "nar_file_id" field.

func (*NarFileChunkUpsertBulk) Update

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

func (*NarFileChunkUpsertBulk) UpdateChunkID

func (u *NarFileChunkUpsertBulk) UpdateChunkID() *NarFileChunkUpsertBulk

UpdateChunkID sets the "chunk_id" field to the value that was provided on create.

func (*NarFileChunkUpsertBulk) UpdateChunkIndex

func (u *NarFileChunkUpsertBulk) UpdateChunkIndex() *NarFileChunkUpsertBulk

UpdateChunkIndex sets the "chunk_index" field to the value that was provided on create.

func (*NarFileChunkUpsertBulk) UpdateNarFileID

func (u *NarFileChunkUpsertBulk) UpdateNarFileID() *NarFileChunkUpsertBulk

UpdateNarFileID sets the "nar_file_id" field to the value that was provided on create.

func (*NarFileChunkUpsertBulk) UpdateNewValues

func (u *NarFileChunkUpsertBulk) UpdateNewValues() *NarFileChunkUpsertBulk

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

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

type NarFileChunkUpsertOne

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

NarFileChunkUpsertOne is the builder for "upsert"-ing

one NarFileChunk node.

func (*NarFileChunkUpsertOne) AddChunkIndex

func (u *NarFileChunkUpsertOne) AddChunkIndex(v int) *NarFileChunkUpsertOne

AddChunkIndex adds v to the "chunk_index" field.

func (*NarFileChunkUpsertOne) DoNothing

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

func (*NarFileChunkUpsertOne) Exec

Exec executes the query.

func (*NarFileChunkUpsertOne) ExecX

func (u *NarFileChunkUpsertOne) ExecX(ctx context.Context)

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

func (*NarFileChunkUpsertOne) ID

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

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

func (*NarFileChunkUpsertOne) IDX

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

func (*NarFileChunkUpsertOne) Ignore

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

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

func (*NarFileChunkUpsertOne) SetChunkID

SetChunkID sets the "chunk_id" field.

func (*NarFileChunkUpsertOne) SetChunkIndex

func (u *NarFileChunkUpsertOne) SetChunkIndex(v int) *NarFileChunkUpsertOne

SetChunkIndex sets the "chunk_index" field.

func (*NarFileChunkUpsertOne) SetNarFileID

func (u *NarFileChunkUpsertOne) SetNarFileID(v int) *NarFileChunkUpsertOne

SetNarFileID sets the "nar_file_id" field.

func (*NarFileChunkUpsertOne) Update

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

func (*NarFileChunkUpsertOne) UpdateChunkID

func (u *NarFileChunkUpsertOne) UpdateChunkID() *NarFileChunkUpsertOne

UpdateChunkID sets the "chunk_id" field to the value that was provided on create.

func (*NarFileChunkUpsertOne) UpdateChunkIndex

func (u *NarFileChunkUpsertOne) UpdateChunkIndex() *NarFileChunkUpsertOne

UpdateChunkIndex sets the "chunk_index" field to the value that was provided on create.

func (*NarFileChunkUpsertOne) UpdateNarFileID

func (u *NarFileChunkUpsertOne) UpdateNarFileID() *NarFileChunkUpsertOne

UpdateNarFileID sets the "nar_file_id" field to the value that was provided on create.

func (*NarFileChunkUpsertOne) UpdateNewValues

func (u *NarFileChunkUpsertOne) UpdateNewValues() *NarFileChunkUpsertOne

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

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

type NarFileChunks

type NarFileChunks []*NarFileChunk

NarFileChunks is a parsable slice of NarFileChunk.

type NarFileClient

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

NarFileClient is a client for the NarFile schema.

func NewNarFileClient

func NewNarFileClient(c config) *NarFileClient

NewNarFileClient returns a client for the NarFile from the given config.

func (*NarFileClient) Create

func (c *NarFileClient) Create() *NarFileCreate

Create returns a builder for creating a NarFile entity.

func (*NarFileClient) CreateBulk

func (c *NarFileClient) CreateBulk(builders ...*NarFileCreate) *NarFileCreateBulk

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

func (*NarFileClient) Delete

func (c *NarFileClient) Delete() *NarFileDelete

Delete returns a delete builder for NarFile.

func (*NarFileClient) DeleteOne

func (c *NarFileClient) DeleteOne(_m *NarFile) *NarFileDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NarFileClient) DeleteOneID

func (c *NarFileClient) DeleteOneID(id int) *NarFileDeleteOne

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

func (*NarFileClient) Get

func (c *NarFileClient) Get(ctx context.Context, id int) (*NarFile, error)

Get returns a NarFile entity by its id.

func (*NarFileClient) GetX

func (c *NarFileClient) GetX(ctx context.Context, id int) *NarFile

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

func (*NarFileClient) Hooks

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

Hooks returns the client hooks.

func (*NarFileClient) Intercept

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

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

func (*NarFileClient) Interceptors

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

Interceptors returns the client interceptors.

func (*NarFileClient) MapCreateBulk

func (c *NarFileClient) MapCreateBulk(slice any, setFunc func(*NarFileCreate, int)) *NarFileCreateBulk

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

func (c *NarFileClient) Query() *NarFileQuery

Query returns a query builder for NarFile.

func (c *NarFileClient) QueryChunkLinks(_m *NarFile) *NarFileChunkQuery

QueryChunkLinks queries the chunk_links edge of a NarFile.

func (*NarFileClient) QueryNarInfoNarFiles

func (c *NarFileClient) QueryNarInfoNarFiles(_m *NarFile) *NarInfoNarFileQuery

QueryNarInfoNarFiles queries the nar_info_nar_files edge of a NarFile.

func (*NarFileClient) Update

func (c *NarFileClient) Update() *NarFileUpdate

Update returns an update builder for NarFile.

func (*NarFileClient) UpdateOne

func (c *NarFileClient) UpdateOne(_m *NarFile) *NarFileUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NarFileClient) UpdateOneID

func (c *NarFileClient) UpdateOneID(id int) *NarFileUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NarFileClient) Use

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

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

type NarFileCreate

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

NarFileCreate is the builder for creating a NarFile entity.

func (*NarFileCreate) AddChunkLinkIDs

func (_c *NarFileCreate) AddChunkLinkIDs(ids ...int) *NarFileCreate

AddChunkLinkIDs adds the "chunk_links" edge to the NarFileChunk entity by IDs.

func (_c *NarFileCreate) AddChunkLinks(v ...*NarFileChunk) *NarFileCreate

AddChunkLinks adds the "chunk_links" edges to the NarFileChunk entity.

func (*NarFileCreate) AddNarInfoNarFileIDs

func (_c *NarFileCreate) AddNarInfoNarFileIDs(ids ...int) *NarFileCreate

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarFileCreate) AddNarInfoNarFiles

func (_c *NarFileCreate) AddNarInfoNarFiles(v ...*NarInfoNarFile) *NarFileCreate

AddNarInfoNarFiles adds the "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarFileCreate) Exec

func (_c *NarFileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarFileCreate) ExecX

func (_c *NarFileCreate) ExecX(ctx context.Context)

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

func (*NarFileCreate) Mutation

func (_c *NarFileCreate) Mutation() *NarFileMutation

Mutation returns the NarFileMutation object of the builder.

func (*NarFileCreate) OnConflict

func (_c *NarFileCreate) OnConflict(opts ...sql.ConflictOption) *NarFileUpsertOne

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

client.NarFile.Create().
	SetCreatedAt(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.NarFileUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*NarFileCreate) OnConflictColumns

func (_c *NarFileCreate) OnConflictColumns(columns ...string) *NarFileUpsertOne

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

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

func (*NarFileCreate) Save

func (_c *NarFileCreate) Save(ctx context.Context) (*NarFile, error)

Save creates the NarFile in the database.

func (*NarFileCreate) SaveX

func (_c *NarFileCreate) SaveX(ctx context.Context) *NarFile

SaveX calls Save and panics if Save returns an error.

func (*NarFileCreate) SetChunkingStartedAt

func (_c *NarFileCreate) SetChunkingStartedAt(v time.Time) *NarFileCreate

SetChunkingStartedAt sets the "chunking_started_at" field.

func (*NarFileCreate) SetCompression

func (_c *NarFileCreate) SetCompression(v string) *NarFileCreate

SetCompression sets the "compression" field.

func (*NarFileCreate) SetCreatedAt

func (_c *NarFileCreate) SetCreatedAt(v time.Time) *NarFileCreate

SetCreatedAt sets the "created_at" field.

func (*NarFileCreate) SetFileSize

func (_c *NarFileCreate) SetFileSize(v uint64) *NarFileCreate

SetFileSize sets the "file_size" field.

func (*NarFileCreate) SetHash

func (_c *NarFileCreate) SetHash(v string) *NarFileCreate

SetHash sets the "hash" field.

func (*NarFileCreate) SetLastAccessedAt

func (_c *NarFileCreate) SetLastAccessedAt(v time.Time) *NarFileCreate

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarFileCreate) SetNillableChunkingStartedAt

func (_c *NarFileCreate) SetNillableChunkingStartedAt(v *time.Time) *NarFileCreate

SetNillableChunkingStartedAt sets the "chunking_started_at" field if the given value is not nil.

func (*NarFileCreate) SetNillableCompression

func (_c *NarFileCreate) SetNillableCompression(v *string) *NarFileCreate

SetNillableCompression sets the "compression" field if the given value is not nil.

func (*NarFileCreate) SetNillableCreatedAt

func (_c *NarFileCreate) SetNillableCreatedAt(v *time.Time) *NarFileCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NarFileCreate) SetNillableLastAccessedAt

func (_c *NarFileCreate) SetNillableLastAccessedAt(v *time.Time) *NarFileCreate

SetNillableLastAccessedAt sets the "last_accessed_at" field if the given value is not nil.

func (*NarFileCreate) SetNillableQuery

func (_c *NarFileCreate) SetNillableQuery(v *string) *NarFileCreate

SetNillableQuery sets the "query" field if the given value is not nil.

func (*NarFileCreate) SetNillableTotalChunks

func (_c *NarFileCreate) SetNillableTotalChunks(v *int64) *NarFileCreate

SetNillableTotalChunks sets the "total_chunks" field if the given value is not nil.

func (*NarFileCreate) SetNillableUpdatedAt

func (_c *NarFileCreate) SetNillableUpdatedAt(v *time.Time) *NarFileCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NarFileCreate) SetNillableVerifiedAt

func (_c *NarFileCreate) SetNillableVerifiedAt(v *time.Time) *NarFileCreate

SetNillableVerifiedAt sets the "verified_at" field if the given value is not nil.

func (*NarFileCreate) SetQuery

func (_c *NarFileCreate) SetQuery(v string) *NarFileCreate

SetQuery sets the "query" field.

func (*NarFileCreate) SetTotalChunks

func (_c *NarFileCreate) SetTotalChunks(v int64) *NarFileCreate

SetTotalChunks sets the "total_chunks" field.

func (*NarFileCreate) SetUpdatedAt

func (_c *NarFileCreate) SetUpdatedAt(v time.Time) *NarFileCreate

SetUpdatedAt sets the "updated_at" field.

func (*NarFileCreate) SetVerifiedAt

func (_c *NarFileCreate) SetVerifiedAt(v time.Time) *NarFileCreate

SetVerifiedAt sets the "verified_at" field.

type NarFileCreateBulk

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

NarFileCreateBulk is the builder for creating many NarFile entities in bulk.

func (*NarFileCreateBulk) Exec

func (_c *NarFileCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NarFileCreateBulk) ExecX

func (_c *NarFileCreateBulk) ExecX(ctx context.Context)

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

func (*NarFileCreateBulk) OnConflict

func (_c *NarFileCreateBulk) OnConflict(opts ...sql.ConflictOption) *NarFileUpsertBulk

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

client.NarFile.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.NarFileUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*NarFileCreateBulk) OnConflictColumns

func (_c *NarFileCreateBulk) OnConflictColumns(columns ...string) *NarFileUpsertBulk

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

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

func (*NarFileCreateBulk) Save

func (_c *NarFileCreateBulk) Save(ctx context.Context) ([]*NarFile, error)

Save creates the NarFile entities in the database.

func (*NarFileCreateBulk) SaveX

func (_c *NarFileCreateBulk) SaveX(ctx context.Context) []*NarFile

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

type NarFileDelete

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

NarFileDelete is the builder for deleting a NarFile entity.

func (*NarFileDelete) Exec

func (_d *NarFileDelete) Exec(ctx context.Context) (int, error)

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

func (*NarFileDelete) ExecX

func (_d *NarFileDelete) ExecX(ctx context.Context) int

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

func (*NarFileDelete) Where

func (_d *NarFileDelete) Where(ps ...predicate.NarFile) *NarFileDelete

Where appends a list predicates to the NarFileDelete builder.

type NarFileDeleteOne

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

NarFileDeleteOne is the builder for deleting a single NarFile entity.

func (*NarFileDeleteOne) Exec

func (_d *NarFileDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NarFileDeleteOne) ExecX

func (_d *NarFileDeleteOne) ExecX(ctx context.Context)

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

func (*NarFileDeleteOne) Where

Where appends a list predicates to the NarFileDelete builder.

type NarFileEdges

type NarFileEdges struct {
	// NarInfoNarFiles holds the value of the nar_info_nar_files edge.
	NarInfoNarFiles []*NarInfoNarFile `json:"nar_info_nar_files,omitempty"`
	// ChunkLinks holds the value of the chunk_links edge.
	ChunkLinks []*NarFileChunk `json:"chunk_links,omitempty"`
	// contains filtered or unexported fields
}

NarFileEdges holds the relations/edges for other nodes in the graph.

func (NarFileEdges) ChunkLinksOrErr

func (e NarFileEdges) ChunkLinksOrErr() ([]*NarFileChunk, error)

ChunkLinksOrErr returns the ChunkLinks value or an error if the edge was not loaded in eager-loading.

func (NarFileEdges) NarInfoNarFilesOrErr

func (e NarFileEdges) NarInfoNarFilesOrErr() ([]*NarInfoNarFile, error)

NarInfoNarFilesOrErr returns the NarInfoNarFiles value or an error if the edge was not loaded in eager-loading.

type NarFileGroupBy

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

NarFileGroupBy is the group-by builder for NarFile entities.

func (*NarFileGroupBy) Aggregate

func (_g *NarFileGroupBy) Aggregate(fns ...AggregateFunc) *NarFileGroupBy

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

func (*NarFileGroupBy) Bool

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

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

func (*NarFileGroupBy) BoolX

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

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

func (*NarFileGroupBy) Bools

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

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

func (*NarFileGroupBy) BoolsX

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

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

func (*NarFileGroupBy) Float64

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

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

func (*NarFileGroupBy) Float64X

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

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

func (*NarFileGroupBy) Float64s

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

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

func (*NarFileGroupBy) Float64sX

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

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

func (*NarFileGroupBy) Int

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

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

func (*NarFileGroupBy) IntX

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

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

func (*NarFileGroupBy) Ints

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

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

func (*NarFileGroupBy) IntsX

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

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

func (*NarFileGroupBy) Scan

func (_g *NarFileGroupBy) Scan(ctx context.Context, v any) error

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

func (*NarFileGroupBy) ScanX

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

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

func (*NarFileGroupBy) String

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

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

func (*NarFileGroupBy) StringX

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

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

func (*NarFileGroupBy) Strings

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

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

func (*NarFileGroupBy) StringsX

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

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

type NarFileMutation

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

NarFileMutation represents an operation that mutates the NarFile nodes in the graph.

func (*NarFileMutation) AddChunkLinkIDs

func (m *NarFileMutation) AddChunkLinkIDs(ids ...int)

AddChunkLinkIDs adds the "chunk_links" edge to the NarFileChunk entity by ids.

func (*NarFileMutation) AddField

func (m *NarFileMutation) 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 (*NarFileMutation) AddFileSize

func (m *NarFileMutation) AddFileSize(u int64)

AddFileSize adds u to the "file_size" field.

func (*NarFileMutation) AddNarInfoNarFileIDs

func (m *NarFileMutation) AddNarInfoNarFileIDs(ids ...int)

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by ids.

func (*NarFileMutation) AddTotalChunks

func (m *NarFileMutation) AddTotalChunks(i int64)

AddTotalChunks adds i to the "total_chunks" field.

func (*NarFileMutation) AddedEdges

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

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

func (*NarFileMutation) AddedField

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

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

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

func (*NarFileMutation) AddedFileSize

func (m *NarFileMutation) AddedFileSize() (r int64, exists bool)

AddedFileSize returns the value that was added to the "file_size" field in this mutation.

func (*NarFileMutation) AddedIDs

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

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

func (*NarFileMutation) AddedTotalChunks

func (m *NarFileMutation) AddedTotalChunks() (r int64, exists bool)

AddedTotalChunks returns the value that was added to the "total_chunks" field in this mutation.

func (*NarFileMutation) ChunkLinksCleared

func (m *NarFileMutation) ChunkLinksCleared() bool

ChunkLinksCleared reports if the "chunk_links" edge to the NarFileChunk entity was cleared.

func (*NarFileMutation) ChunkLinksIDs

func (m *NarFileMutation) ChunkLinksIDs() (ids []int)

ChunkLinksIDs returns the "chunk_links" edge IDs in the mutation.

func (*NarFileMutation) ChunkingStartedAt

func (m *NarFileMutation) ChunkingStartedAt() (r time.Time, exists bool)

ChunkingStartedAt returns the value of the "chunking_started_at" field in the mutation.

func (*NarFileMutation) ChunkingStartedAtCleared

func (m *NarFileMutation) ChunkingStartedAtCleared() bool

ChunkingStartedAtCleared returns if the "chunking_started_at" field was cleared in this mutation.

func (m *NarFileMutation) ClearChunkLinks()

ClearChunkLinks clears the "chunk_links" edge to the NarFileChunk entity.

func (*NarFileMutation) ClearChunkingStartedAt

func (m *NarFileMutation) ClearChunkingStartedAt()

ClearChunkingStartedAt clears the value of the "chunking_started_at" field.

func (*NarFileMutation) ClearEdge

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

func (m *NarFileMutation) 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 (*NarFileMutation) ClearLastAccessedAt

func (m *NarFileMutation) ClearLastAccessedAt()

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarFileMutation) ClearNarInfoNarFiles

func (m *NarFileMutation) ClearNarInfoNarFiles()

ClearNarInfoNarFiles clears the "nar_info_nar_files" edge to the NarInfoNarFile entity.

func (*NarFileMutation) ClearUpdatedAt

func (m *NarFileMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarFileMutation) ClearVerifiedAt

func (m *NarFileMutation) ClearVerifiedAt()

ClearVerifiedAt clears the value of the "verified_at" field.

func (*NarFileMutation) ClearedEdges

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

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

func (*NarFileMutation) ClearedFields

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

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

func (NarFileMutation) Client

func (m NarFileMutation) 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 (*NarFileMutation) Compression

func (m *NarFileMutation) Compression() (r string, exists bool)

Compression returns the value of the "compression" field in the mutation.

func (*NarFileMutation) CreatedAt

func (m *NarFileMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NarFileMutation) EdgeCleared

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

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

func (*NarFileMutation) Field

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

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

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

func (*NarFileMutation) Fields

func (m *NarFileMutation) 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 (*NarFileMutation) FileSize

func (m *NarFileMutation) FileSize() (r uint64, exists bool)

FileSize returns the value of the "file_size" field in the mutation.

func (*NarFileMutation) Hash

func (m *NarFileMutation) Hash() (r string, exists bool)

Hash returns the value of the "hash" field in the mutation.

func (*NarFileMutation) ID

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

func (m *NarFileMutation) 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 (*NarFileMutation) LastAccessedAt

func (m *NarFileMutation) LastAccessedAt() (r time.Time, exists bool)

LastAccessedAt returns the value of the "last_accessed_at" field in the mutation.

func (*NarFileMutation) LastAccessedAtCleared

func (m *NarFileMutation) LastAccessedAtCleared() bool

LastAccessedAtCleared returns if the "last_accessed_at" field was cleared in this mutation.

func (*NarFileMutation) NarInfoNarFilesCleared

func (m *NarFileMutation) NarInfoNarFilesCleared() bool

NarInfoNarFilesCleared reports if the "nar_info_nar_files" edge to the NarInfoNarFile entity was cleared.

func (*NarFileMutation) NarInfoNarFilesIDs

func (m *NarFileMutation) NarInfoNarFilesIDs() (ids []int)

NarInfoNarFilesIDs returns the "nar_info_nar_files" edge IDs in the mutation.

func (*NarFileMutation) OldChunkingStartedAt

func (m *NarFileMutation) OldChunkingStartedAt(ctx context.Context) (v *time.Time, err error)

OldChunkingStartedAt returns the old "chunking_started_at" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldCompression

func (m *NarFileMutation) OldCompression(ctx context.Context) (v string, err error)

OldCompression returns the old "compression" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldCreatedAt

func (m *NarFileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldField

func (m *NarFileMutation) 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 (*NarFileMutation) OldFileSize

func (m *NarFileMutation) OldFileSize(ctx context.Context) (v uint64, err error)

OldFileSize returns the old "file_size" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldHash

func (m *NarFileMutation) OldHash(ctx context.Context) (v string, err error)

OldHash returns the old "hash" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldLastAccessedAt

func (m *NarFileMutation) OldLastAccessedAt(ctx context.Context) (v *time.Time, err error)

OldLastAccessedAt returns the old "last_accessed_at" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldQuery

func (m *NarFileMutation) OldQuery(ctx context.Context) (v string, err error)

OldQuery returns the old "query" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldTotalChunks

func (m *NarFileMutation) OldTotalChunks(ctx context.Context) (v int64, err error)

OldTotalChunks returns the old "total_chunks" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldUpdatedAt

func (m *NarFileMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) OldVerifiedAt

func (m *NarFileMutation) OldVerifiedAt(ctx context.Context) (v *time.Time, err error)

OldVerifiedAt returns the old "verified_at" field's value of the NarFile entity. If the NarFile 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 (*NarFileMutation) Op

func (m *NarFileMutation) Op() Op

Op returns the operation name.

func (*NarFileMutation) Query

func (m *NarFileMutation) Query() (r string, exists bool)

Query returns the value of the "query" field in the mutation.

func (*NarFileMutation) RemoveChunkLinkIDs

func (m *NarFileMutation) RemoveChunkLinkIDs(ids ...int)

RemoveChunkLinkIDs removes the "chunk_links" edge to the NarFileChunk entity by IDs.

func (*NarFileMutation) RemoveNarInfoNarFileIDs

func (m *NarFileMutation) RemoveNarInfoNarFileIDs(ids ...int)

RemoveNarInfoNarFileIDs removes the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarFileMutation) RemovedChunkLinksIDs

func (m *NarFileMutation) RemovedChunkLinksIDs() (ids []int)

RemovedChunkLinks returns the removed IDs of the "chunk_links" edge to the NarFileChunk entity.

func (*NarFileMutation) RemovedEdges

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

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

func (*NarFileMutation) RemovedIDs

func (m *NarFileMutation) 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 (*NarFileMutation) RemovedNarInfoNarFilesIDs

func (m *NarFileMutation) RemovedNarInfoNarFilesIDs() (ids []int)

RemovedNarInfoNarFiles returns the removed IDs of the "nar_info_nar_files" edge to the NarInfoNarFile entity.

func (m *NarFileMutation) ResetChunkLinks()

ResetChunkLinks resets all changes to the "chunk_links" edge.

func (*NarFileMutation) ResetChunkingStartedAt

func (m *NarFileMutation) ResetChunkingStartedAt()

ResetChunkingStartedAt resets all changes to the "chunking_started_at" field.

func (*NarFileMutation) ResetCompression

func (m *NarFileMutation) ResetCompression()

ResetCompression resets all changes to the "compression" field.

func (*NarFileMutation) ResetCreatedAt

func (m *NarFileMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NarFileMutation) ResetEdge

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

func (m *NarFileMutation) 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 (*NarFileMutation) ResetFileSize

func (m *NarFileMutation) ResetFileSize()

ResetFileSize resets all changes to the "file_size" field.

func (*NarFileMutation) ResetHash

func (m *NarFileMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (*NarFileMutation) ResetLastAccessedAt

func (m *NarFileMutation) ResetLastAccessedAt()

ResetLastAccessedAt resets all changes to the "last_accessed_at" field.

func (*NarFileMutation) ResetNarInfoNarFiles

func (m *NarFileMutation) ResetNarInfoNarFiles()

ResetNarInfoNarFiles resets all changes to the "nar_info_nar_files" edge.

func (*NarFileMutation) ResetQuery

func (m *NarFileMutation) ResetQuery()

ResetQuery resets all changes to the "query" field.

func (*NarFileMutation) ResetTotalChunks

func (m *NarFileMutation) ResetTotalChunks()

ResetTotalChunks resets all changes to the "total_chunks" field.

func (*NarFileMutation) ResetUpdatedAt

func (m *NarFileMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*NarFileMutation) ResetVerifiedAt

func (m *NarFileMutation) ResetVerifiedAt()

ResetVerifiedAt resets all changes to the "verified_at" field.

func (*NarFileMutation) SetChunkingStartedAt

func (m *NarFileMutation) SetChunkingStartedAt(t time.Time)

SetChunkingStartedAt sets the "chunking_started_at" field.

func (*NarFileMutation) SetCompression

func (m *NarFileMutation) SetCompression(s string)

SetCompression sets the "compression" field.

func (*NarFileMutation) SetCreatedAt

func (m *NarFileMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NarFileMutation) SetField

func (m *NarFileMutation) 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 (*NarFileMutation) SetFileSize

func (m *NarFileMutation) SetFileSize(u uint64)

SetFileSize sets the "file_size" field.

func (*NarFileMutation) SetHash

func (m *NarFileMutation) SetHash(s string)

SetHash sets the "hash" field.

func (*NarFileMutation) SetLastAccessedAt

func (m *NarFileMutation) SetLastAccessedAt(t time.Time)

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarFileMutation) SetOp

func (m *NarFileMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NarFileMutation) SetQuery

func (m *NarFileMutation) SetQuery(s string)

SetQuery sets the "query" field.

func (*NarFileMutation) SetTotalChunks

func (m *NarFileMutation) SetTotalChunks(i int64)

SetTotalChunks sets the "total_chunks" field.

func (*NarFileMutation) SetUpdatedAt

func (m *NarFileMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*NarFileMutation) SetVerifiedAt

func (m *NarFileMutation) SetVerifiedAt(t time.Time)

SetVerifiedAt sets the "verified_at" field.

func (*NarFileMutation) TotalChunks

func (m *NarFileMutation) TotalChunks() (r int64, exists bool)

TotalChunks returns the value of the "total_chunks" field in the mutation.

func (NarFileMutation) Tx

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

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

func (*NarFileMutation) Type

func (m *NarFileMutation) Type() string

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

func (*NarFileMutation) UpdatedAt

func (m *NarFileMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*NarFileMutation) UpdatedAtCleared

func (m *NarFileMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*NarFileMutation) VerifiedAt

func (m *NarFileMutation) VerifiedAt() (r time.Time, exists bool)

VerifiedAt returns the value of the "verified_at" field in the mutation.

func (*NarFileMutation) VerifiedAtCleared

func (m *NarFileMutation) VerifiedAtCleared() bool

VerifiedAtCleared returns if the "verified_at" field was cleared in this mutation.

func (*NarFileMutation) Where

func (m *NarFileMutation) Where(ps ...predicate.NarFile)

Where appends a list predicates to the NarFileMutation builder.

func (*NarFileMutation) WhereP

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

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

type NarFileQuery

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

NarFileQuery is the builder for querying NarFile entities.

func (*NarFileQuery) Aggregate

func (_q *NarFileQuery) Aggregate(fns ...AggregateFunc) *NarFileSelect

Aggregate returns a NarFileSelect configured with the given aggregations.

func (*NarFileQuery) All

func (_q *NarFileQuery) All(ctx context.Context) ([]*NarFile, error)

All executes the query and returns a list of NarFiles.

func (*NarFileQuery) AllX

func (_q *NarFileQuery) AllX(ctx context.Context) []*NarFile

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

func (*NarFileQuery) Clone

func (_q *NarFileQuery) Clone() *NarFileQuery

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

func (*NarFileQuery) Count

func (_q *NarFileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NarFileQuery) CountX

func (_q *NarFileQuery) CountX(ctx context.Context) int

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

func (*NarFileQuery) Exist

func (_q *NarFileQuery) Exist(ctx context.Context) (bool, error)

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

func (*NarFileQuery) ExistX

func (_q *NarFileQuery) ExistX(ctx context.Context) bool

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

func (*NarFileQuery) First

func (_q *NarFileQuery) First(ctx context.Context) (*NarFile, error)

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

func (*NarFileQuery) FirstID

func (_q *NarFileQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*NarFileQuery) FirstIDX

func (_q *NarFileQuery) FirstIDX(ctx context.Context) int

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

func (*NarFileQuery) FirstX

func (_q *NarFileQuery) FirstX(ctx context.Context) *NarFile

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

func (*NarFileQuery) GroupBy

func (_q *NarFileQuery) GroupBy(field string, fields ...string) *NarFileGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NarFile.Query().
	GroupBy(narfile.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NarFileQuery) IDs

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

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

func (*NarFileQuery) IDsX

func (_q *NarFileQuery) IDsX(ctx context.Context) []int

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

func (*NarFileQuery) Limit

func (_q *NarFileQuery) Limit(limit int) *NarFileQuery

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

func (*NarFileQuery) Offset

func (_q *NarFileQuery) Offset(offset int) *NarFileQuery

Offset to start from.

func (*NarFileQuery) Only

func (_q *NarFileQuery) Only(ctx context.Context) (*NarFile, error)

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

func (*NarFileQuery) OnlyID

func (_q *NarFileQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*NarFileQuery) OnlyIDX

func (_q *NarFileQuery) OnlyIDX(ctx context.Context) int

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

func (*NarFileQuery) OnlyX

func (_q *NarFileQuery) OnlyX(ctx context.Context) *NarFile

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

func (*NarFileQuery) Order

func (_q *NarFileQuery) Order(o ...narfile.OrderOption) *NarFileQuery

Order specifies how the records should be ordered.

func (_q *NarFileQuery) QueryChunkLinks() *NarFileChunkQuery

QueryChunkLinks chains the current query on the "chunk_links" edge.

func (*NarFileQuery) QueryNarInfoNarFiles

func (_q *NarFileQuery) QueryNarInfoNarFiles() *NarInfoNarFileQuery

QueryNarInfoNarFiles chains the current query on the "nar_info_nar_files" edge.

func (*NarFileQuery) Select

func (_q *NarFileQuery) Select(fields ...string) *NarFileSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.NarFile.Query().
	Select(narfile.FieldCreatedAt).
	Scan(ctx, &v)

func (*NarFileQuery) Unique

func (_q *NarFileQuery) Unique(unique bool) *NarFileQuery

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

func (_q *NarFileQuery) Where(ps ...predicate.NarFile) *NarFileQuery

Where adds a new predicate for the NarFileQuery builder.

func (_q *NarFileQuery) WithChunkLinks(opts ...func(*NarFileChunkQuery)) *NarFileQuery

WithChunkLinks tells the query-builder to eager-load the nodes that are connected to the "chunk_links" edge. The optional arguments are used to configure the query builder of the edge.

func (*NarFileQuery) WithNarInfoNarFiles

func (_q *NarFileQuery) WithNarInfoNarFiles(opts ...func(*NarInfoNarFileQuery)) *NarFileQuery

WithNarInfoNarFiles tells the query-builder to eager-load the nodes that are connected to the "nar_info_nar_files" edge. The optional arguments are used to configure the query builder of the edge.

type NarFileSelect

type NarFileSelect struct {
	*NarFileQuery
	// contains filtered or unexported fields
}

NarFileSelect is the builder for selecting fields of NarFile entities.

func (*NarFileSelect) Aggregate

func (_s *NarFileSelect) Aggregate(fns ...AggregateFunc) *NarFileSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NarFileSelect) Bool

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

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

func (*NarFileSelect) BoolX

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

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

func (*NarFileSelect) Bools

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

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

func (*NarFileSelect) BoolsX

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

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

func (*NarFileSelect) Float64

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

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

func (*NarFileSelect) Float64X

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

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

func (*NarFileSelect) Float64s

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

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

func (*NarFileSelect) Float64sX

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

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

func (*NarFileSelect) Int

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

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

func (*NarFileSelect) IntX

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

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

func (*NarFileSelect) Ints

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

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

func (*NarFileSelect) IntsX

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

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

func (*NarFileSelect) Scan

func (_s *NarFileSelect) Scan(ctx context.Context, v any) error

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

func (*NarFileSelect) ScanX

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

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

func (*NarFileSelect) String

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

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

func (*NarFileSelect) StringX

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

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

func (*NarFileSelect) Strings

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

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

func (*NarFileSelect) StringsX

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

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

type NarFileUpdate

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

NarFileUpdate is the builder for updating NarFile entities.

func (*NarFileUpdate) AddChunkLinkIDs

func (_u *NarFileUpdate) AddChunkLinkIDs(ids ...int) *NarFileUpdate

AddChunkLinkIDs adds the "chunk_links" edge to the NarFileChunk entity by IDs.

func (_u *NarFileUpdate) AddChunkLinks(v ...*NarFileChunk) *NarFileUpdate

AddChunkLinks adds the "chunk_links" edges to the NarFileChunk entity.

func (*NarFileUpdate) AddFileSize

func (_u *NarFileUpdate) AddFileSize(v int64) *NarFileUpdate

AddFileSize adds value to the "file_size" field.

func (*NarFileUpdate) AddNarInfoNarFileIDs

func (_u *NarFileUpdate) AddNarInfoNarFileIDs(ids ...int) *NarFileUpdate

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarFileUpdate) AddNarInfoNarFiles

func (_u *NarFileUpdate) AddNarInfoNarFiles(v ...*NarInfoNarFile) *NarFileUpdate

AddNarInfoNarFiles adds the "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarFileUpdate) AddTotalChunks

func (_u *NarFileUpdate) AddTotalChunks(v int64) *NarFileUpdate

AddTotalChunks adds value to the "total_chunks" field.

func (_u *NarFileUpdate) ClearChunkLinks() *NarFileUpdate

ClearChunkLinks clears all "chunk_links" edges to the NarFileChunk entity.

func (*NarFileUpdate) ClearChunkingStartedAt

func (_u *NarFileUpdate) ClearChunkingStartedAt() *NarFileUpdate

ClearChunkingStartedAt clears the value of the "chunking_started_at" field.

func (*NarFileUpdate) ClearLastAccessedAt

func (_u *NarFileUpdate) ClearLastAccessedAt() *NarFileUpdate

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarFileUpdate) ClearNarInfoNarFiles

func (_u *NarFileUpdate) ClearNarInfoNarFiles() *NarFileUpdate

ClearNarInfoNarFiles clears all "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarFileUpdate) ClearUpdatedAt

func (_u *NarFileUpdate) ClearUpdatedAt() *NarFileUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarFileUpdate) ClearVerifiedAt

func (_u *NarFileUpdate) ClearVerifiedAt() *NarFileUpdate

ClearVerifiedAt clears the value of the "verified_at" field.

func (*NarFileUpdate) Exec

func (_u *NarFileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarFileUpdate) ExecX

func (_u *NarFileUpdate) ExecX(ctx context.Context)

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

func (*NarFileUpdate) Mutation

func (_u *NarFileUpdate) Mutation() *NarFileMutation

Mutation returns the NarFileMutation object of the builder.

func (*NarFileUpdate) RemoveChunkLinkIDs

func (_u *NarFileUpdate) RemoveChunkLinkIDs(ids ...int) *NarFileUpdate

RemoveChunkLinkIDs removes the "chunk_links" edge to NarFileChunk entities by IDs.

func (_u *NarFileUpdate) RemoveChunkLinks(v ...*NarFileChunk) *NarFileUpdate

RemoveChunkLinks removes "chunk_links" edges to NarFileChunk entities.

func (*NarFileUpdate) RemoveNarInfoNarFileIDs

func (_u *NarFileUpdate) RemoveNarInfoNarFileIDs(ids ...int) *NarFileUpdate

RemoveNarInfoNarFileIDs removes the "nar_info_nar_files" edge to NarInfoNarFile entities by IDs.

func (*NarFileUpdate) RemoveNarInfoNarFiles

func (_u *NarFileUpdate) RemoveNarInfoNarFiles(v ...*NarInfoNarFile) *NarFileUpdate

RemoveNarInfoNarFiles removes "nar_info_nar_files" edges to NarInfoNarFile entities.

func (*NarFileUpdate) Save

func (_u *NarFileUpdate) Save(ctx context.Context) (int, error)

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

func (*NarFileUpdate) SaveX

func (_u *NarFileUpdate) SaveX(ctx context.Context) int

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

func (*NarFileUpdate) SetChunkingStartedAt

func (_u *NarFileUpdate) SetChunkingStartedAt(v time.Time) *NarFileUpdate

SetChunkingStartedAt sets the "chunking_started_at" field.

func (*NarFileUpdate) SetCompression

func (_u *NarFileUpdate) SetCompression(v string) *NarFileUpdate

SetCompression sets the "compression" field.

func (*NarFileUpdate) SetFileSize

func (_u *NarFileUpdate) SetFileSize(v uint64) *NarFileUpdate

SetFileSize sets the "file_size" field.

func (*NarFileUpdate) SetHash

func (_u *NarFileUpdate) SetHash(v string) *NarFileUpdate

SetHash sets the "hash" field.

func (*NarFileUpdate) SetLastAccessedAt

func (_u *NarFileUpdate) SetLastAccessedAt(v time.Time) *NarFileUpdate

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarFileUpdate) SetNillableChunkingStartedAt

func (_u *NarFileUpdate) SetNillableChunkingStartedAt(v *time.Time) *NarFileUpdate

SetNillableChunkingStartedAt sets the "chunking_started_at" field if the given value is not nil.

func (*NarFileUpdate) SetNillableCompression

func (_u *NarFileUpdate) SetNillableCompression(v *string) *NarFileUpdate

SetNillableCompression sets the "compression" field if the given value is not nil.

func (*NarFileUpdate) SetNillableFileSize

func (_u *NarFileUpdate) SetNillableFileSize(v *uint64) *NarFileUpdate

SetNillableFileSize sets the "file_size" field if the given value is not nil.

func (*NarFileUpdate) SetNillableHash

func (_u *NarFileUpdate) SetNillableHash(v *string) *NarFileUpdate

SetNillableHash sets the "hash" field if the given value is not nil.

func (*NarFileUpdate) SetNillableLastAccessedAt

func (_u *NarFileUpdate) SetNillableLastAccessedAt(v *time.Time) *NarFileUpdate

SetNillableLastAccessedAt sets the "last_accessed_at" field if the given value is not nil.

func (*NarFileUpdate) SetNillableQuery

func (_u *NarFileUpdate) SetNillableQuery(v *string) *NarFileUpdate

SetNillableQuery sets the "query" field if the given value is not nil.

func (*NarFileUpdate) SetNillableTotalChunks

func (_u *NarFileUpdate) SetNillableTotalChunks(v *int64) *NarFileUpdate

SetNillableTotalChunks sets the "total_chunks" field if the given value is not nil.

func (*NarFileUpdate) SetNillableUpdatedAt

func (_u *NarFileUpdate) SetNillableUpdatedAt(v *time.Time) *NarFileUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NarFileUpdate) SetNillableVerifiedAt

func (_u *NarFileUpdate) SetNillableVerifiedAt(v *time.Time) *NarFileUpdate

SetNillableVerifiedAt sets the "verified_at" field if the given value is not nil.

func (*NarFileUpdate) SetQuery

func (_u *NarFileUpdate) SetQuery(v string) *NarFileUpdate

SetQuery sets the "query" field.

func (*NarFileUpdate) SetTotalChunks

func (_u *NarFileUpdate) SetTotalChunks(v int64) *NarFileUpdate

SetTotalChunks sets the "total_chunks" field.

func (*NarFileUpdate) SetUpdatedAt

func (_u *NarFileUpdate) SetUpdatedAt(v time.Time) *NarFileUpdate

SetUpdatedAt sets the "updated_at" field.

func (*NarFileUpdate) SetVerifiedAt

func (_u *NarFileUpdate) SetVerifiedAt(v time.Time) *NarFileUpdate

SetVerifiedAt sets the "verified_at" field.

func (*NarFileUpdate) Where

func (_u *NarFileUpdate) Where(ps ...predicate.NarFile) *NarFileUpdate

Where appends a list predicates to the NarFileUpdate builder.

type NarFileUpdateOne

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

NarFileUpdateOne is the builder for updating a single NarFile entity.

func (*NarFileUpdateOne) AddChunkLinkIDs

func (_u *NarFileUpdateOne) AddChunkLinkIDs(ids ...int) *NarFileUpdateOne

AddChunkLinkIDs adds the "chunk_links" edge to the NarFileChunk entity by IDs.

func (_u *NarFileUpdateOne) AddChunkLinks(v ...*NarFileChunk) *NarFileUpdateOne

AddChunkLinks adds the "chunk_links" edges to the NarFileChunk entity.

func (*NarFileUpdateOne) AddFileSize

func (_u *NarFileUpdateOne) AddFileSize(v int64) *NarFileUpdateOne

AddFileSize adds value to the "file_size" field.

func (*NarFileUpdateOne) AddNarInfoNarFileIDs

func (_u *NarFileUpdateOne) AddNarInfoNarFileIDs(ids ...int) *NarFileUpdateOne

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarFileUpdateOne) AddNarInfoNarFiles

func (_u *NarFileUpdateOne) AddNarInfoNarFiles(v ...*NarInfoNarFile) *NarFileUpdateOne

AddNarInfoNarFiles adds the "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarFileUpdateOne) AddTotalChunks

func (_u *NarFileUpdateOne) AddTotalChunks(v int64) *NarFileUpdateOne

AddTotalChunks adds value to the "total_chunks" field.

func (_u *NarFileUpdateOne) ClearChunkLinks() *NarFileUpdateOne

ClearChunkLinks clears all "chunk_links" edges to the NarFileChunk entity.

func (*NarFileUpdateOne) ClearChunkingStartedAt

func (_u *NarFileUpdateOne) ClearChunkingStartedAt() *NarFileUpdateOne

ClearChunkingStartedAt clears the value of the "chunking_started_at" field.

func (*NarFileUpdateOne) ClearLastAccessedAt

func (_u *NarFileUpdateOne) ClearLastAccessedAt() *NarFileUpdateOne

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarFileUpdateOne) ClearNarInfoNarFiles

func (_u *NarFileUpdateOne) ClearNarInfoNarFiles() *NarFileUpdateOne

ClearNarInfoNarFiles clears all "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarFileUpdateOne) ClearUpdatedAt

func (_u *NarFileUpdateOne) ClearUpdatedAt() *NarFileUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarFileUpdateOne) ClearVerifiedAt

func (_u *NarFileUpdateOne) ClearVerifiedAt() *NarFileUpdateOne

ClearVerifiedAt clears the value of the "verified_at" field.

func (*NarFileUpdateOne) Exec

func (_u *NarFileUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NarFileUpdateOne) ExecX

func (_u *NarFileUpdateOne) ExecX(ctx context.Context)

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

func (*NarFileUpdateOne) Mutation

func (_u *NarFileUpdateOne) Mutation() *NarFileMutation

Mutation returns the NarFileMutation object of the builder.

func (*NarFileUpdateOne) RemoveChunkLinkIDs

func (_u *NarFileUpdateOne) RemoveChunkLinkIDs(ids ...int) *NarFileUpdateOne

RemoveChunkLinkIDs removes the "chunk_links" edge to NarFileChunk entities by IDs.

func (_u *NarFileUpdateOne) RemoveChunkLinks(v ...*NarFileChunk) *NarFileUpdateOne

RemoveChunkLinks removes "chunk_links" edges to NarFileChunk entities.

func (*NarFileUpdateOne) RemoveNarInfoNarFileIDs

func (_u *NarFileUpdateOne) RemoveNarInfoNarFileIDs(ids ...int) *NarFileUpdateOne

RemoveNarInfoNarFileIDs removes the "nar_info_nar_files" edge to NarInfoNarFile entities by IDs.

func (*NarFileUpdateOne) RemoveNarInfoNarFiles

func (_u *NarFileUpdateOne) RemoveNarInfoNarFiles(v ...*NarInfoNarFile) *NarFileUpdateOne

RemoveNarInfoNarFiles removes "nar_info_nar_files" edges to NarInfoNarFile entities.

func (*NarFileUpdateOne) Save

func (_u *NarFileUpdateOne) Save(ctx context.Context) (*NarFile, error)

Save executes the query and returns the updated NarFile entity.

func (*NarFileUpdateOne) SaveX

func (_u *NarFileUpdateOne) SaveX(ctx context.Context) *NarFile

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

func (*NarFileUpdateOne) Select

func (_u *NarFileUpdateOne) Select(field string, fields ...string) *NarFileUpdateOne

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

func (*NarFileUpdateOne) SetChunkingStartedAt

func (_u *NarFileUpdateOne) SetChunkingStartedAt(v time.Time) *NarFileUpdateOne

SetChunkingStartedAt sets the "chunking_started_at" field.

func (*NarFileUpdateOne) SetCompression

func (_u *NarFileUpdateOne) SetCompression(v string) *NarFileUpdateOne

SetCompression sets the "compression" field.

func (*NarFileUpdateOne) SetFileSize

func (_u *NarFileUpdateOne) SetFileSize(v uint64) *NarFileUpdateOne

SetFileSize sets the "file_size" field.

func (*NarFileUpdateOne) SetHash

func (_u *NarFileUpdateOne) SetHash(v string) *NarFileUpdateOne

SetHash sets the "hash" field.

func (*NarFileUpdateOne) SetLastAccessedAt

func (_u *NarFileUpdateOne) SetLastAccessedAt(v time.Time) *NarFileUpdateOne

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarFileUpdateOne) SetNillableChunkingStartedAt

func (_u *NarFileUpdateOne) SetNillableChunkingStartedAt(v *time.Time) *NarFileUpdateOne

SetNillableChunkingStartedAt sets the "chunking_started_at" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableCompression

func (_u *NarFileUpdateOne) SetNillableCompression(v *string) *NarFileUpdateOne

SetNillableCompression sets the "compression" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableFileSize

func (_u *NarFileUpdateOne) SetNillableFileSize(v *uint64) *NarFileUpdateOne

SetNillableFileSize sets the "file_size" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableHash

func (_u *NarFileUpdateOne) SetNillableHash(v *string) *NarFileUpdateOne

SetNillableHash sets the "hash" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableLastAccessedAt

func (_u *NarFileUpdateOne) SetNillableLastAccessedAt(v *time.Time) *NarFileUpdateOne

SetNillableLastAccessedAt sets the "last_accessed_at" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableQuery

func (_u *NarFileUpdateOne) SetNillableQuery(v *string) *NarFileUpdateOne

SetNillableQuery sets the "query" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableTotalChunks

func (_u *NarFileUpdateOne) SetNillableTotalChunks(v *int64) *NarFileUpdateOne

SetNillableTotalChunks sets the "total_chunks" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableUpdatedAt

func (_u *NarFileUpdateOne) SetNillableUpdatedAt(v *time.Time) *NarFileUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NarFileUpdateOne) SetNillableVerifiedAt

func (_u *NarFileUpdateOne) SetNillableVerifiedAt(v *time.Time) *NarFileUpdateOne

SetNillableVerifiedAt sets the "verified_at" field if the given value is not nil.

func (*NarFileUpdateOne) SetQuery

func (_u *NarFileUpdateOne) SetQuery(v string) *NarFileUpdateOne

SetQuery sets the "query" field.

func (*NarFileUpdateOne) SetTotalChunks

func (_u *NarFileUpdateOne) SetTotalChunks(v int64) *NarFileUpdateOne

SetTotalChunks sets the "total_chunks" field.

func (*NarFileUpdateOne) SetUpdatedAt

func (_u *NarFileUpdateOne) SetUpdatedAt(v time.Time) *NarFileUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*NarFileUpdateOne) SetVerifiedAt

func (_u *NarFileUpdateOne) SetVerifiedAt(v time.Time) *NarFileUpdateOne

SetVerifiedAt sets the "verified_at" field.

func (*NarFileUpdateOne) Where

Where appends a list predicates to the NarFileUpdate builder.

type NarFileUpsert

type NarFileUpsert struct {
	*sql.UpdateSet
}

NarFileUpsert is the "OnConflict" setter.

func (*NarFileUpsert) AddFileSize

func (u *NarFileUpsert) AddFileSize(v uint64) *NarFileUpsert

AddFileSize adds v to the "file_size" field.

func (*NarFileUpsert) AddTotalChunks

func (u *NarFileUpsert) AddTotalChunks(v int64) *NarFileUpsert

AddTotalChunks adds v to the "total_chunks" field.

func (*NarFileUpsert) ClearChunkingStartedAt

func (u *NarFileUpsert) ClearChunkingStartedAt() *NarFileUpsert

ClearChunkingStartedAt clears the value of the "chunking_started_at" field.

func (*NarFileUpsert) ClearLastAccessedAt

func (u *NarFileUpsert) ClearLastAccessedAt() *NarFileUpsert

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarFileUpsert) ClearUpdatedAt

func (u *NarFileUpsert) ClearUpdatedAt() *NarFileUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarFileUpsert) ClearVerifiedAt

func (u *NarFileUpsert) ClearVerifiedAt() *NarFileUpsert

ClearVerifiedAt clears the value of the "verified_at" field.

func (*NarFileUpsert) SetChunkingStartedAt

func (u *NarFileUpsert) SetChunkingStartedAt(v time.Time) *NarFileUpsert

SetChunkingStartedAt sets the "chunking_started_at" field.

func (*NarFileUpsert) SetCompression

func (u *NarFileUpsert) SetCompression(v string) *NarFileUpsert

SetCompression sets the "compression" field.

func (*NarFileUpsert) SetFileSize

func (u *NarFileUpsert) SetFileSize(v uint64) *NarFileUpsert

SetFileSize sets the "file_size" field.

func (*NarFileUpsert) SetHash

func (u *NarFileUpsert) SetHash(v string) *NarFileUpsert

SetHash sets the "hash" field.

func (*NarFileUpsert) SetLastAccessedAt

func (u *NarFileUpsert) SetLastAccessedAt(v time.Time) *NarFileUpsert

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarFileUpsert) SetQuery

func (u *NarFileUpsert) SetQuery(v string) *NarFileUpsert

SetQuery sets the "query" field.

func (*NarFileUpsert) SetTotalChunks

func (u *NarFileUpsert) SetTotalChunks(v int64) *NarFileUpsert

SetTotalChunks sets the "total_chunks" field.

func (*NarFileUpsert) SetUpdatedAt

func (u *NarFileUpsert) SetUpdatedAt(v time.Time) *NarFileUpsert

SetUpdatedAt sets the "updated_at" field.

func (*NarFileUpsert) SetVerifiedAt

func (u *NarFileUpsert) SetVerifiedAt(v time.Time) *NarFileUpsert

SetVerifiedAt sets the "verified_at" field.

func (*NarFileUpsert) UpdateChunkingStartedAt

func (u *NarFileUpsert) UpdateChunkingStartedAt() *NarFileUpsert

UpdateChunkingStartedAt sets the "chunking_started_at" field to the value that was provided on create.

func (*NarFileUpsert) UpdateCompression

func (u *NarFileUpsert) UpdateCompression() *NarFileUpsert

UpdateCompression sets the "compression" field to the value that was provided on create.

func (*NarFileUpsert) UpdateFileSize

func (u *NarFileUpsert) UpdateFileSize() *NarFileUpsert

UpdateFileSize sets the "file_size" field to the value that was provided on create.

func (*NarFileUpsert) UpdateHash

func (u *NarFileUpsert) UpdateHash() *NarFileUpsert

UpdateHash sets the "hash" field to the value that was provided on create.

func (*NarFileUpsert) UpdateLastAccessedAt

func (u *NarFileUpsert) UpdateLastAccessedAt() *NarFileUpsert

UpdateLastAccessedAt sets the "last_accessed_at" field to the value that was provided on create.

func (*NarFileUpsert) UpdateQuery

func (u *NarFileUpsert) UpdateQuery() *NarFileUpsert

UpdateQuery sets the "query" field to the value that was provided on create.

func (*NarFileUpsert) UpdateTotalChunks

func (u *NarFileUpsert) UpdateTotalChunks() *NarFileUpsert

UpdateTotalChunks sets the "total_chunks" field to the value that was provided on create.

func (*NarFileUpsert) UpdateUpdatedAt

func (u *NarFileUpsert) UpdateUpdatedAt() *NarFileUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*NarFileUpsert) UpdateVerifiedAt

func (u *NarFileUpsert) UpdateVerifiedAt() *NarFileUpsert

UpdateVerifiedAt sets the "verified_at" field to the value that was provided on create.

type NarFileUpsertBulk

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

NarFileUpsertBulk is the builder for "upsert"-ing a bulk of NarFile nodes.

func (*NarFileUpsertBulk) AddFileSize

func (u *NarFileUpsertBulk) AddFileSize(v uint64) *NarFileUpsertBulk

AddFileSize adds v to the "file_size" field.

func (*NarFileUpsertBulk) AddTotalChunks

func (u *NarFileUpsertBulk) AddTotalChunks(v int64) *NarFileUpsertBulk

AddTotalChunks adds v to the "total_chunks" field.

func (*NarFileUpsertBulk) ClearChunkingStartedAt

func (u *NarFileUpsertBulk) ClearChunkingStartedAt() *NarFileUpsertBulk

ClearChunkingStartedAt clears the value of the "chunking_started_at" field.

func (*NarFileUpsertBulk) ClearLastAccessedAt

func (u *NarFileUpsertBulk) ClearLastAccessedAt() *NarFileUpsertBulk

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarFileUpsertBulk) ClearUpdatedAt

func (u *NarFileUpsertBulk) ClearUpdatedAt() *NarFileUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarFileUpsertBulk) ClearVerifiedAt

func (u *NarFileUpsertBulk) ClearVerifiedAt() *NarFileUpsertBulk

ClearVerifiedAt clears the value of the "verified_at" field.

func (*NarFileUpsertBulk) DoNothing

func (u *NarFileUpsertBulk) DoNothing() *NarFileUpsertBulk

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

func (*NarFileUpsertBulk) Exec

func (u *NarFileUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NarFileUpsertBulk) ExecX

func (u *NarFileUpsertBulk) ExecX(ctx context.Context)

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

func (*NarFileUpsertBulk) Ignore

func (u *NarFileUpsertBulk) Ignore() *NarFileUpsertBulk

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

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

func (*NarFileUpsertBulk) SetChunkingStartedAt

func (u *NarFileUpsertBulk) SetChunkingStartedAt(v time.Time) *NarFileUpsertBulk

SetChunkingStartedAt sets the "chunking_started_at" field.

func (*NarFileUpsertBulk) SetCompression

func (u *NarFileUpsertBulk) SetCompression(v string) *NarFileUpsertBulk

SetCompression sets the "compression" field.

func (*NarFileUpsertBulk) SetFileSize

func (u *NarFileUpsertBulk) SetFileSize(v uint64) *NarFileUpsertBulk

SetFileSize sets the "file_size" field.

func (*NarFileUpsertBulk) SetHash

SetHash sets the "hash" field.

func (*NarFileUpsertBulk) SetLastAccessedAt

func (u *NarFileUpsertBulk) SetLastAccessedAt(v time.Time) *NarFileUpsertBulk

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarFileUpsertBulk) SetQuery

func (u *NarFileUpsertBulk) SetQuery(v string) *NarFileUpsertBulk

SetQuery sets the "query" field.

func (*NarFileUpsertBulk) SetTotalChunks

func (u *NarFileUpsertBulk) SetTotalChunks(v int64) *NarFileUpsertBulk

SetTotalChunks sets the "total_chunks" field.

func (*NarFileUpsertBulk) SetUpdatedAt

func (u *NarFileUpsertBulk) SetUpdatedAt(v time.Time) *NarFileUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*NarFileUpsertBulk) SetVerifiedAt

func (u *NarFileUpsertBulk) SetVerifiedAt(v time.Time) *NarFileUpsertBulk

SetVerifiedAt sets the "verified_at" field.

func (*NarFileUpsertBulk) Update

func (u *NarFileUpsertBulk) Update(set func(*NarFileUpsert)) *NarFileUpsertBulk

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

func (*NarFileUpsertBulk) UpdateChunkingStartedAt

func (u *NarFileUpsertBulk) UpdateChunkingStartedAt() *NarFileUpsertBulk

UpdateChunkingStartedAt sets the "chunking_started_at" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateCompression

func (u *NarFileUpsertBulk) UpdateCompression() *NarFileUpsertBulk

UpdateCompression sets the "compression" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateFileSize

func (u *NarFileUpsertBulk) UpdateFileSize() *NarFileUpsertBulk

UpdateFileSize sets the "file_size" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateHash

func (u *NarFileUpsertBulk) UpdateHash() *NarFileUpsertBulk

UpdateHash sets the "hash" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateLastAccessedAt

func (u *NarFileUpsertBulk) UpdateLastAccessedAt() *NarFileUpsertBulk

UpdateLastAccessedAt sets the "last_accessed_at" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateNewValues

func (u *NarFileUpsertBulk) UpdateNewValues() *NarFileUpsertBulk

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

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

func (*NarFileUpsertBulk) UpdateQuery

func (u *NarFileUpsertBulk) UpdateQuery() *NarFileUpsertBulk

UpdateQuery sets the "query" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateTotalChunks

func (u *NarFileUpsertBulk) UpdateTotalChunks() *NarFileUpsertBulk

UpdateTotalChunks sets the "total_chunks" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateUpdatedAt

func (u *NarFileUpsertBulk) UpdateUpdatedAt() *NarFileUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*NarFileUpsertBulk) UpdateVerifiedAt

func (u *NarFileUpsertBulk) UpdateVerifiedAt() *NarFileUpsertBulk

UpdateVerifiedAt sets the "verified_at" field to the value that was provided on create.

type NarFileUpsertOne

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

NarFileUpsertOne is the builder for "upsert"-ing

one NarFile node.

func (*NarFileUpsertOne) AddFileSize

func (u *NarFileUpsertOne) AddFileSize(v uint64) *NarFileUpsertOne

AddFileSize adds v to the "file_size" field.

func (*NarFileUpsertOne) AddTotalChunks

func (u *NarFileUpsertOne) AddTotalChunks(v int64) *NarFileUpsertOne

AddTotalChunks adds v to the "total_chunks" field.

func (*NarFileUpsertOne) ClearChunkingStartedAt

func (u *NarFileUpsertOne) ClearChunkingStartedAt() *NarFileUpsertOne

ClearChunkingStartedAt clears the value of the "chunking_started_at" field.

func (*NarFileUpsertOne) ClearLastAccessedAt

func (u *NarFileUpsertOne) ClearLastAccessedAt() *NarFileUpsertOne

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarFileUpsertOne) ClearUpdatedAt

func (u *NarFileUpsertOne) ClearUpdatedAt() *NarFileUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarFileUpsertOne) ClearVerifiedAt

func (u *NarFileUpsertOne) ClearVerifiedAt() *NarFileUpsertOne

ClearVerifiedAt clears the value of the "verified_at" field.

func (*NarFileUpsertOne) DoNothing

func (u *NarFileUpsertOne) DoNothing() *NarFileUpsertOne

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

func (*NarFileUpsertOne) Exec

func (u *NarFileUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*NarFileUpsertOne) ExecX

func (u *NarFileUpsertOne) ExecX(ctx context.Context)

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

func (*NarFileUpsertOne) ID

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

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

func (*NarFileUpsertOne) IDX

func (u *NarFileUpsertOne) IDX(ctx context.Context) int

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

func (*NarFileUpsertOne) Ignore

func (u *NarFileUpsertOne) Ignore() *NarFileUpsertOne

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

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

func (*NarFileUpsertOne) SetChunkingStartedAt

func (u *NarFileUpsertOne) SetChunkingStartedAt(v time.Time) *NarFileUpsertOne

SetChunkingStartedAt sets the "chunking_started_at" field.

func (*NarFileUpsertOne) SetCompression

func (u *NarFileUpsertOne) SetCompression(v string) *NarFileUpsertOne

SetCompression sets the "compression" field.

func (*NarFileUpsertOne) SetFileSize

func (u *NarFileUpsertOne) SetFileSize(v uint64) *NarFileUpsertOne

SetFileSize sets the "file_size" field.

func (*NarFileUpsertOne) SetHash

func (u *NarFileUpsertOne) SetHash(v string) *NarFileUpsertOne

SetHash sets the "hash" field.

func (*NarFileUpsertOne) SetLastAccessedAt

func (u *NarFileUpsertOne) SetLastAccessedAt(v time.Time) *NarFileUpsertOne

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarFileUpsertOne) SetQuery

func (u *NarFileUpsertOne) SetQuery(v string) *NarFileUpsertOne

SetQuery sets the "query" field.

func (*NarFileUpsertOne) SetTotalChunks

func (u *NarFileUpsertOne) SetTotalChunks(v int64) *NarFileUpsertOne

SetTotalChunks sets the "total_chunks" field.

func (*NarFileUpsertOne) SetUpdatedAt

func (u *NarFileUpsertOne) SetUpdatedAt(v time.Time) *NarFileUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*NarFileUpsertOne) SetVerifiedAt

func (u *NarFileUpsertOne) SetVerifiedAt(v time.Time) *NarFileUpsertOne

SetVerifiedAt sets the "verified_at" field.

func (*NarFileUpsertOne) Update

func (u *NarFileUpsertOne) Update(set func(*NarFileUpsert)) *NarFileUpsertOne

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

func (*NarFileUpsertOne) UpdateChunkingStartedAt

func (u *NarFileUpsertOne) UpdateChunkingStartedAt() *NarFileUpsertOne

UpdateChunkingStartedAt sets the "chunking_started_at" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateCompression

func (u *NarFileUpsertOne) UpdateCompression() *NarFileUpsertOne

UpdateCompression sets the "compression" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateFileSize

func (u *NarFileUpsertOne) UpdateFileSize() *NarFileUpsertOne

UpdateFileSize sets the "file_size" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateHash

func (u *NarFileUpsertOne) UpdateHash() *NarFileUpsertOne

UpdateHash sets the "hash" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateLastAccessedAt

func (u *NarFileUpsertOne) UpdateLastAccessedAt() *NarFileUpsertOne

UpdateLastAccessedAt sets the "last_accessed_at" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateNewValues

func (u *NarFileUpsertOne) UpdateNewValues() *NarFileUpsertOne

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

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

func (*NarFileUpsertOne) UpdateQuery

func (u *NarFileUpsertOne) UpdateQuery() *NarFileUpsertOne

UpdateQuery sets the "query" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateTotalChunks

func (u *NarFileUpsertOne) UpdateTotalChunks() *NarFileUpsertOne

UpdateTotalChunks sets the "total_chunks" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateUpdatedAt

func (u *NarFileUpsertOne) UpdateUpdatedAt() *NarFileUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*NarFileUpsertOne) UpdateVerifiedAt

func (u *NarFileUpsertOne) UpdateVerifiedAt() *NarFileUpsertOne

UpdateVerifiedAt sets the "verified_at" field to the value that was provided on create.

type NarFiles

type NarFiles []*NarFile

NarFiles is a parsable slice of NarFile.

type NarInfo

type NarInfo struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Hash holds the value of the "hash" field.
	Hash string `json:"hash,omitempty"`
	// StorePath holds the value of the "store_path" field.
	StorePath *string `json:"store_path,omitempty"`
	// URL holds the value of the "url" field.
	URL *string `json:"url,omitempty"`
	// Compression holds the value of the "compression" field.
	Compression *string `json:"compression,omitempty"`
	// FileHash holds the value of the "file_hash" field.
	FileHash *string `json:"file_hash,omitempty"`
	// FileSize holds the value of the "file_size" field.
	FileSize *int64 `json:"file_size,omitempty"`
	// NarHash holds the value of the "nar_hash" field.
	NarHash *string `json:"nar_hash,omitempty"`
	// NarSize holds the value of the "nar_size" field.
	NarSize *int64 `json:"nar_size,omitempty"`
	// Deriver holds the value of the "deriver" field.
	Deriver *string `json:"deriver,omitempty"`
	// System holds the value of the "system" field.
	System *string `json:"system,omitempty"`
	// Ca holds the value of the "ca" field.
	Ca *string `json:"ca,omitempty"`
	// LastAccessedAt holds the value of the "last_accessed_at" field.
	LastAccessedAt *time.Time `json:"last_accessed_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NarInfoQuery when eager-loading is set.
	Edges NarInfoEdges `json:"edges"`
	// contains filtered or unexported fields
}

NarInfo is the model entity for the NarInfo schema.

func (*NarInfo) QueryNarInfoNarFiles

func (_m *NarInfo) QueryNarInfoNarFiles() *NarInfoNarFileQuery

QueryNarInfoNarFiles queries the "nar_info_nar_files" edge of the NarInfo entity.

func (*NarInfo) QueryReferences

func (_m *NarInfo) QueryReferences() *NarInfoReferenceQuery

QueryReferences queries the "references" edge of the NarInfo entity.

func (*NarInfo) QuerySignatures

func (_m *NarInfo) QuerySignatures() *NarInfoSignatureQuery

QuerySignatures queries the "signatures" edge of the NarInfo entity.

func (*NarInfo) String

func (_m *NarInfo) String() string

String implements the fmt.Stringer.

func (*NarInfo) Unwrap

func (_m *NarInfo) Unwrap() *NarInfo

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

func (_m *NarInfo) Update() *NarInfoUpdateOne

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

func (*NarInfo) Value

func (_m *NarInfo) Value(name string) (ent.Value, error)

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

type NarInfoClient

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

NarInfoClient is a client for the NarInfo schema.

func NewNarInfoClient

func NewNarInfoClient(c config) *NarInfoClient

NewNarInfoClient returns a client for the NarInfo from the given config.

func (*NarInfoClient) Create

func (c *NarInfoClient) Create() *NarInfoCreate

Create returns a builder for creating a NarInfo entity.

func (*NarInfoClient) CreateBulk

func (c *NarInfoClient) CreateBulk(builders ...*NarInfoCreate) *NarInfoCreateBulk

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

func (*NarInfoClient) Delete

func (c *NarInfoClient) Delete() *NarInfoDelete

Delete returns a delete builder for NarInfo.

func (*NarInfoClient) DeleteOne

func (c *NarInfoClient) DeleteOne(_m *NarInfo) *NarInfoDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NarInfoClient) DeleteOneID

func (c *NarInfoClient) DeleteOneID(id int) *NarInfoDeleteOne

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

func (*NarInfoClient) Get

func (c *NarInfoClient) Get(ctx context.Context, id int) (*NarInfo, error)

Get returns a NarInfo entity by its id.

func (*NarInfoClient) GetX

func (c *NarInfoClient) GetX(ctx context.Context, id int) *NarInfo

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

func (*NarInfoClient) Hooks

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

Hooks returns the client hooks.

func (*NarInfoClient) Intercept

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

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

func (*NarInfoClient) Interceptors

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

Interceptors returns the client interceptors.

func (*NarInfoClient) MapCreateBulk

func (c *NarInfoClient) MapCreateBulk(slice any, setFunc func(*NarInfoCreate, int)) *NarInfoCreateBulk

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

func (c *NarInfoClient) Query() *NarInfoQuery

Query returns a query builder for NarInfo.

func (*NarInfoClient) QueryNarInfoNarFiles

func (c *NarInfoClient) QueryNarInfoNarFiles(_m *NarInfo) *NarInfoNarFileQuery

QueryNarInfoNarFiles queries the nar_info_nar_files edge of a NarInfo.

func (*NarInfoClient) QueryReferences

func (c *NarInfoClient) QueryReferences(_m *NarInfo) *NarInfoReferenceQuery

QueryReferences queries the references edge of a NarInfo.

func (*NarInfoClient) QuerySignatures

func (c *NarInfoClient) QuerySignatures(_m *NarInfo) *NarInfoSignatureQuery

QuerySignatures queries the signatures edge of a NarInfo.

func (*NarInfoClient) Update

func (c *NarInfoClient) Update() *NarInfoUpdate

Update returns an update builder for NarInfo.

func (*NarInfoClient) UpdateOne

func (c *NarInfoClient) UpdateOne(_m *NarInfo) *NarInfoUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NarInfoClient) UpdateOneID

func (c *NarInfoClient) UpdateOneID(id int) *NarInfoUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NarInfoClient) Use

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

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

type NarInfoCreate

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

NarInfoCreate is the builder for creating a NarInfo entity.

func (*NarInfoCreate) AddNarInfoNarFileIDs

func (_c *NarInfoCreate) AddNarInfoNarFileIDs(ids ...int) *NarInfoCreate

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarInfoCreate) AddNarInfoNarFiles

func (_c *NarInfoCreate) AddNarInfoNarFiles(v ...*NarInfoNarFile) *NarInfoCreate

AddNarInfoNarFiles adds the "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarInfoCreate) AddReferenceIDs

func (_c *NarInfoCreate) AddReferenceIDs(ids ...int) *NarInfoCreate

AddReferenceIDs adds the "references" edge to the NarInfoReference entity by IDs.

func (*NarInfoCreate) AddReferences

func (_c *NarInfoCreate) AddReferences(v ...*NarInfoReference) *NarInfoCreate

AddReferences adds the "references" edges to the NarInfoReference entity.

func (*NarInfoCreate) AddSignatureIDs

func (_c *NarInfoCreate) AddSignatureIDs(ids ...int) *NarInfoCreate

AddSignatureIDs adds the "signatures" edge to the NarInfoSignature entity by IDs.

func (*NarInfoCreate) AddSignatures

func (_c *NarInfoCreate) AddSignatures(v ...*NarInfoSignature) *NarInfoCreate

AddSignatures adds the "signatures" edges to the NarInfoSignature entity.

func (*NarInfoCreate) Exec

func (_c *NarInfoCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarInfoCreate) ExecX

func (_c *NarInfoCreate) ExecX(ctx context.Context)

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

func (*NarInfoCreate) Mutation

func (_c *NarInfoCreate) Mutation() *NarInfoMutation

Mutation returns the NarInfoMutation object of the builder.

func (*NarInfoCreate) OnConflict

func (_c *NarInfoCreate) OnConflict(opts ...sql.ConflictOption) *NarInfoUpsertOne

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

client.NarInfo.Create().
	SetCreatedAt(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.NarInfoUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*NarInfoCreate) OnConflictColumns

func (_c *NarInfoCreate) OnConflictColumns(columns ...string) *NarInfoUpsertOne

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

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

func (*NarInfoCreate) Save

func (_c *NarInfoCreate) Save(ctx context.Context) (*NarInfo, error)

Save creates the NarInfo in the database.

func (*NarInfoCreate) SaveX

func (_c *NarInfoCreate) SaveX(ctx context.Context) *NarInfo

SaveX calls Save and panics if Save returns an error.

func (*NarInfoCreate) SetCa

func (_c *NarInfoCreate) SetCa(v string) *NarInfoCreate

SetCa sets the "ca" field.

func (*NarInfoCreate) SetCompression

func (_c *NarInfoCreate) SetCompression(v string) *NarInfoCreate

SetCompression sets the "compression" field.

func (*NarInfoCreate) SetCreatedAt

func (_c *NarInfoCreate) SetCreatedAt(v time.Time) *NarInfoCreate

SetCreatedAt sets the "created_at" field.

func (*NarInfoCreate) SetDeriver

func (_c *NarInfoCreate) SetDeriver(v string) *NarInfoCreate

SetDeriver sets the "deriver" field.

func (*NarInfoCreate) SetFileHash

func (_c *NarInfoCreate) SetFileHash(v string) *NarInfoCreate

SetFileHash sets the "file_hash" field.

func (*NarInfoCreate) SetFileSize

func (_c *NarInfoCreate) SetFileSize(v int64) *NarInfoCreate

SetFileSize sets the "file_size" field.

func (*NarInfoCreate) SetHash

func (_c *NarInfoCreate) SetHash(v string) *NarInfoCreate

SetHash sets the "hash" field.

func (*NarInfoCreate) SetLastAccessedAt

func (_c *NarInfoCreate) SetLastAccessedAt(v time.Time) *NarInfoCreate

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarInfoCreate) SetNarHash

func (_c *NarInfoCreate) SetNarHash(v string) *NarInfoCreate

SetNarHash sets the "nar_hash" field.

func (*NarInfoCreate) SetNarSize

func (_c *NarInfoCreate) SetNarSize(v int64) *NarInfoCreate

SetNarSize sets the "nar_size" field.

func (*NarInfoCreate) SetNillableCa

func (_c *NarInfoCreate) SetNillableCa(v *string) *NarInfoCreate

SetNillableCa sets the "ca" field if the given value is not nil.

func (*NarInfoCreate) SetNillableCompression

func (_c *NarInfoCreate) SetNillableCompression(v *string) *NarInfoCreate

SetNillableCompression sets the "compression" field if the given value is not nil.

func (*NarInfoCreate) SetNillableCreatedAt

func (_c *NarInfoCreate) SetNillableCreatedAt(v *time.Time) *NarInfoCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NarInfoCreate) SetNillableDeriver

func (_c *NarInfoCreate) SetNillableDeriver(v *string) *NarInfoCreate

SetNillableDeriver sets the "deriver" field if the given value is not nil.

func (*NarInfoCreate) SetNillableFileHash

func (_c *NarInfoCreate) SetNillableFileHash(v *string) *NarInfoCreate

SetNillableFileHash sets the "file_hash" field if the given value is not nil.

func (*NarInfoCreate) SetNillableFileSize

func (_c *NarInfoCreate) SetNillableFileSize(v *int64) *NarInfoCreate

SetNillableFileSize sets the "file_size" field if the given value is not nil.

func (*NarInfoCreate) SetNillableLastAccessedAt

func (_c *NarInfoCreate) SetNillableLastAccessedAt(v *time.Time) *NarInfoCreate

SetNillableLastAccessedAt sets the "last_accessed_at" field if the given value is not nil.

func (*NarInfoCreate) SetNillableNarHash

func (_c *NarInfoCreate) SetNillableNarHash(v *string) *NarInfoCreate

SetNillableNarHash sets the "nar_hash" field if the given value is not nil.

func (*NarInfoCreate) SetNillableNarSize

func (_c *NarInfoCreate) SetNillableNarSize(v *int64) *NarInfoCreate

SetNillableNarSize sets the "nar_size" field if the given value is not nil.

func (*NarInfoCreate) SetNillableStorePath

func (_c *NarInfoCreate) SetNillableStorePath(v *string) *NarInfoCreate

SetNillableStorePath sets the "store_path" field if the given value is not nil.

func (*NarInfoCreate) SetNillableSystem

func (_c *NarInfoCreate) SetNillableSystem(v *string) *NarInfoCreate

SetNillableSystem sets the "system" field if the given value is not nil.

func (*NarInfoCreate) SetNillableURL

func (_c *NarInfoCreate) SetNillableURL(v *string) *NarInfoCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*NarInfoCreate) SetNillableUpdatedAt

func (_c *NarInfoCreate) SetNillableUpdatedAt(v *time.Time) *NarInfoCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NarInfoCreate) SetStorePath

func (_c *NarInfoCreate) SetStorePath(v string) *NarInfoCreate

SetStorePath sets the "store_path" field.

func (*NarInfoCreate) SetSystem

func (_c *NarInfoCreate) SetSystem(v string) *NarInfoCreate

SetSystem sets the "system" field.

func (*NarInfoCreate) SetURL

func (_c *NarInfoCreate) SetURL(v string) *NarInfoCreate

SetURL sets the "url" field.

func (*NarInfoCreate) SetUpdatedAt

func (_c *NarInfoCreate) SetUpdatedAt(v time.Time) *NarInfoCreate

SetUpdatedAt sets the "updated_at" field.

type NarInfoCreateBulk

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

NarInfoCreateBulk is the builder for creating many NarInfo entities in bulk.

func (*NarInfoCreateBulk) Exec

func (_c *NarInfoCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NarInfoCreateBulk) ExecX

func (_c *NarInfoCreateBulk) ExecX(ctx context.Context)

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

func (*NarInfoCreateBulk) OnConflict

func (_c *NarInfoCreateBulk) OnConflict(opts ...sql.ConflictOption) *NarInfoUpsertBulk

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

client.NarInfo.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.NarInfoUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*NarInfoCreateBulk) OnConflictColumns

func (_c *NarInfoCreateBulk) OnConflictColumns(columns ...string) *NarInfoUpsertBulk

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

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

func (*NarInfoCreateBulk) Save

func (_c *NarInfoCreateBulk) Save(ctx context.Context) ([]*NarInfo, error)

Save creates the NarInfo entities in the database.

func (*NarInfoCreateBulk) SaveX

func (_c *NarInfoCreateBulk) SaveX(ctx context.Context) []*NarInfo

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

type NarInfoDelete

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

NarInfoDelete is the builder for deleting a NarInfo entity.

func (*NarInfoDelete) Exec

func (_d *NarInfoDelete) Exec(ctx context.Context) (int, error)

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

func (*NarInfoDelete) ExecX

func (_d *NarInfoDelete) ExecX(ctx context.Context) int

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

func (*NarInfoDelete) Where

func (_d *NarInfoDelete) Where(ps ...predicate.NarInfo) *NarInfoDelete

Where appends a list predicates to the NarInfoDelete builder.

type NarInfoDeleteOne

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

NarInfoDeleteOne is the builder for deleting a single NarInfo entity.

func (*NarInfoDeleteOne) Exec

func (_d *NarInfoDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NarInfoDeleteOne) ExecX

func (_d *NarInfoDeleteOne) ExecX(ctx context.Context)

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

func (*NarInfoDeleteOne) Where

Where appends a list predicates to the NarInfoDelete builder.

type NarInfoEdges

type NarInfoEdges struct {
	// References holds the value of the references edge.
	References []*NarInfoReference `json:"references,omitempty"`
	// Signatures holds the value of the signatures edge.
	Signatures []*NarInfoSignature `json:"signatures,omitempty"`
	// NarInfoNarFiles holds the value of the nar_info_nar_files edge.
	NarInfoNarFiles []*NarInfoNarFile `json:"nar_info_nar_files,omitempty"`
	// contains filtered or unexported fields
}

NarInfoEdges holds the relations/edges for other nodes in the graph.

func (NarInfoEdges) NarInfoNarFilesOrErr

func (e NarInfoEdges) NarInfoNarFilesOrErr() ([]*NarInfoNarFile, error)

NarInfoNarFilesOrErr returns the NarInfoNarFiles value or an error if the edge was not loaded in eager-loading.

func (NarInfoEdges) ReferencesOrErr

func (e NarInfoEdges) ReferencesOrErr() ([]*NarInfoReference, error)

ReferencesOrErr returns the References value or an error if the edge was not loaded in eager-loading.

func (NarInfoEdges) SignaturesOrErr

func (e NarInfoEdges) SignaturesOrErr() ([]*NarInfoSignature, error)

SignaturesOrErr returns the Signatures value or an error if the edge was not loaded in eager-loading.

type NarInfoGroupBy

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

NarInfoGroupBy is the group-by builder for NarInfo entities.

func (*NarInfoGroupBy) Aggregate

func (_g *NarInfoGroupBy) Aggregate(fns ...AggregateFunc) *NarInfoGroupBy

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

func (*NarInfoGroupBy) Bool

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

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

func (*NarInfoGroupBy) BoolX

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

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

func (*NarInfoGroupBy) Bools

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

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

func (*NarInfoGroupBy) BoolsX

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

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

func (*NarInfoGroupBy) Float64

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

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

func (*NarInfoGroupBy) Float64X

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

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

func (*NarInfoGroupBy) Float64s

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

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

func (*NarInfoGroupBy) Float64sX

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

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

func (*NarInfoGroupBy) Int

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

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

func (*NarInfoGroupBy) IntX

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

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

func (*NarInfoGroupBy) Ints

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

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

func (*NarInfoGroupBy) IntsX

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

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

func (*NarInfoGroupBy) Scan

func (_g *NarInfoGroupBy) Scan(ctx context.Context, v any) error

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

func (*NarInfoGroupBy) ScanX

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

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

func (*NarInfoGroupBy) String

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

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

func (*NarInfoGroupBy) StringX

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

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

func (*NarInfoGroupBy) Strings

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

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

func (*NarInfoGroupBy) StringsX

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

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

type NarInfoMutation

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

NarInfoMutation represents an operation that mutates the NarInfo nodes in the graph.

func (*NarInfoMutation) AddField

func (m *NarInfoMutation) 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 (*NarInfoMutation) AddFileSize

func (m *NarInfoMutation) AddFileSize(i int64)

AddFileSize adds i to the "file_size" field.

func (*NarInfoMutation) AddNarInfoNarFileIDs

func (m *NarInfoMutation) AddNarInfoNarFileIDs(ids ...int)

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by ids.

func (*NarInfoMutation) AddNarSize

func (m *NarInfoMutation) AddNarSize(i int64)

AddNarSize adds i to the "nar_size" field.

func (*NarInfoMutation) AddReferenceIDs

func (m *NarInfoMutation) AddReferenceIDs(ids ...int)

AddReferenceIDs adds the "references" edge to the NarInfoReference entity by ids.

func (*NarInfoMutation) AddSignatureIDs

func (m *NarInfoMutation) AddSignatureIDs(ids ...int)

AddSignatureIDs adds the "signatures" edge to the NarInfoSignature entity by ids.

func (*NarInfoMutation) AddedEdges

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

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

func (*NarInfoMutation) AddedField

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

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

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

func (*NarInfoMutation) AddedFileSize

func (m *NarInfoMutation) AddedFileSize() (r int64, exists bool)

AddedFileSize returns the value that was added to the "file_size" field in this mutation.

func (*NarInfoMutation) AddedIDs

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

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

func (*NarInfoMutation) AddedNarSize

func (m *NarInfoMutation) AddedNarSize() (r int64, exists bool)

AddedNarSize returns the value that was added to the "nar_size" field in this mutation.

func (*NarInfoMutation) Ca

func (m *NarInfoMutation) Ca() (r string, exists bool)

Ca returns the value of the "ca" field in the mutation.

func (*NarInfoMutation) CaCleared

func (m *NarInfoMutation) CaCleared() bool

CaCleared returns if the "ca" field was cleared in this mutation.

func (*NarInfoMutation) ClearCa

func (m *NarInfoMutation) ClearCa()

ClearCa clears the value of the "ca" field.

func (*NarInfoMutation) ClearCompression

func (m *NarInfoMutation) ClearCompression()

ClearCompression clears the value of the "compression" field.

func (*NarInfoMutation) ClearDeriver

func (m *NarInfoMutation) ClearDeriver()

ClearDeriver clears the value of the "deriver" field.

func (*NarInfoMutation) ClearEdge

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

func (m *NarInfoMutation) 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 (*NarInfoMutation) ClearFileHash

func (m *NarInfoMutation) ClearFileHash()

ClearFileHash clears the value of the "file_hash" field.

func (*NarInfoMutation) ClearFileSize

func (m *NarInfoMutation) ClearFileSize()

ClearFileSize clears the value of the "file_size" field.

func (*NarInfoMutation) ClearLastAccessedAt

func (m *NarInfoMutation) ClearLastAccessedAt()

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarInfoMutation) ClearNarHash

func (m *NarInfoMutation) ClearNarHash()

ClearNarHash clears the value of the "nar_hash" field.

func (*NarInfoMutation) ClearNarInfoNarFiles

func (m *NarInfoMutation) ClearNarInfoNarFiles()

ClearNarInfoNarFiles clears the "nar_info_nar_files" edge to the NarInfoNarFile entity.

func (*NarInfoMutation) ClearNarSize

func (m *NarInfoMutation) ClearNarSize()

ClearNarSize clears the value of the "nar_size" field.

func (*NarInfoMutation) ClearReferences

func (m *NarInfoMutation) ClearReferences()

ClearReferences clears the "references" edge to the NarInfoReference entity.

func (*NarInfoMutation) ClearSignatures

func (m *NarInfoMutation) ClearSignatures()

ClearSignatures clears the "signatures" edge to the NarInfoSignature entity.

func (*NarInfoMutation) ClearStorePath

func (m *NarInfoMutation) ClearStorePath()

ClearStorePath clears the value of the "store_path" field.

func (*NarInfoMutation) ClearSystem

func (m *NarInfoMutation) ClearSystem()

ClearSystem clears the value of the "system" field.

func (*NarInfoMutation) ClearURL

func (m *NarInfoMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*NarInfoMutation) ClearUpdatedAt

func (m *NarInfoMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarInfoMutation) ClearedEdges

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

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

func (*NarInfoMutation) ClearedFields

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

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

func (NarInfoMutation) Client

func (m NarInfoMutation) 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 (*NarInfoMutation) Compression

func (m *NarInfoMutation) Compression() (r string, exists bool)

Compression returns the value of the "compression" field in the mutation.

func (*NarInfoMutation) CompressionCleared

func (m *NarInfoMutation) CompressionCleared() bool

CompressionCleared returns if the "compression" field was cleared in this mutation.

func (*NarInfoMutation) CreatedAt

func (m *NarInfoMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NarInfoMutation) Deriver

func (m *NarInfoMutation) Deriver() (r string, exists bool)

Deriver returns the value of the "deriver" field in the mutation.

func (*NarInfoMutation) DeriverCleared

func (m *NarInfoMutation) DeriverCleared() bool

DeriverCleared returns if the "deriver" field was cleared in this mutation.

func (*NarInfoMutation) EdgeCleared

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

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

func (*NarInfoMutation) Field

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

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

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

func (*NarInfoMutation) Fields

func (m *NarInfoMutation) 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 (*NarInfoMutation) FileHash

func (m *NarInfoMutation) FileHash() (r string, exists bool)

FileHash returns the value of the "file_hash" field in the mutation.

func (*NarInfoMutation) FileHashCleared

func (m *NarInfoMutation) FileHashCleared() bool

FileHashCleared returns if the "file_hash" field was cleared in this mutation.

func (*NarInfoMutation) FileSize

func (m *NarInfoMutation) FileSize() (r int64, exists bool)

FileSize returns the value of the "file_size" field in the mutation.

func (*NarInfoMutation) FileSizeCleared

func (m *NarInfoMutation) FileSizeCleared() bool

FileSizeCleared returns if the "file_size" field was cleared in this mutation.

func (*NarInfoMutation) Hash

func (m *NarInfoMutation) Hash() (r string, exists bool)

Hash returns the value of the "hash" field in the mutation.

func (*NarInfoMutation) ID

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

func (m *NarInfoMutation) 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 (*NarInfoMutation) LastAccessedAt

func (m *NarInfoMutation) LastAccessedAt() (r time.Time, exists bool)

LastAccessedAt returns the value of the "last_accessed_at" field in the mutation.

func (*NarInfoMutation) LastAccessedAtCleared

func (m *NarInfoMutation) LastAccessedAtCleared() bool

LastAccessedAtCleared returns if the "last_accessed_at" field was cleared in this mutation.

func (*NarInfoMutation) NarHash

func (m *NarInfoMutation) NarHash() (r string, exists bool)

NarHash returns the value of the "nar_hash" field in the mutation.

func (*NarInfoMutation) NarHashCleared

func (m *NarInfoMutation) NarHashCleared() bool

NarHashCleared returns if the "nar_hash" field was cleared in this mutation.

func (*NarInfoMutation) NarInfoNarFilesCleared

func (m *NarInfoMutation) NarInfoNarFilesCleared() bool

NarInfoNarFilesCleared reports if the "nar_info_nar_files" edge to the NarInfoNarFile entity was cleared.

func (*NarInfoMutation) NarInfoNarFilesIDs

func (m *NarInfoMutation) NarInfoNarFilesIDs() (ids []int)

NarInfoNarFilesIDs returns the "nar_info_nar_files" edge IDs in the mutation.

func (*NarInfoMutation) NarSize

func (m *NarInfoMutation) NarSize() (r int64, exists bool)

NarSize returns the value of the "nar_size" field in the mutation.

func (*NarInfoMutation) NarSizeCleared

func (m *NarInfoMutation) NarSizeCleared() bool

NarSizeCleared returns if the "nar_size" field was cleared in this mutation.

func (*NarInfoMutation) OldCa

func (m *NarInfoMutation) OldCa(ctx context.Context) (v *string, err error)

OldCa returns the old "ca" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldCompression

func (m *NarInfoMutation) OldCompression(ctx context.Context) (v *string, err error)

OldCompression returns the old "compression" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldCreatedAt

func (m *NarInfoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldDeriver

func (m *NarInfoMutation) OldDeriver(ctx context.Context) (v *string, err error)

OldDeriver returns the old "deriver" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldField

func (m *NarInfoMutation) 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 (*NarInfoMutation) OldFileHash

func (m *NarInfoMutation) OldFileHash(ctx context.Context) (v *string, err error)

OldFileHash returns the old "file_hash" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldFileSize

func (m *NarInfoMutation) OldFileSize(ctx context.Context) (v *int64, err error)

OldFileSize returns the old "file_size" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldHash

func (m *NarInfoMutation) OldHash(ctx context.Context) (v string, err error)

OldHash returns the old "hash" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldLastAccessedAt

func (m *NarInfoMutation) OldLastAccessedAt(ctx context.Context) (v *time.Time, err error)

OldLastAccessedAt returns the old "last_accessed_at" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldNarHash

func (m *NarInfoMutation) OldNarHash(ctx context.Context) (v *string, err error)

OldNarHash returns the old "nar_hash" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldNarSize

func (m *NarInfoMutation) OldNarSize(ctx context.Context) (v *int64, err error)

OldNarSize returns the old "nar_size" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldStorePath

func (m *NarInfoMutation) OldStorePath(ctx context.Context) (v *string, err error)

OldStorePath returns the old "store_path" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldSystem

func (m *NarInfoMutation) OldSystem(ctx context.Context) (v *string, err error)

OldSystem returns the old "system" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldURL

func (m *NarInfoMutation) OldURL(ctx context.Context) (v *string, err error)

OldURL returns the old "url" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) OldUpdatedAt

func (m *NarInfoMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the NarInfo entity. If the NarInfo 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 (*NarInfoMutation) Op

func (m *NarInfoMutation) Op() Op

Op returns the operation name.

func (*NarInfoMutation) ReferencesCleared

func (m *NarInfoMutation) ReferencesCleared() bool

ReferencesCleared reports if the "references" edge to the NarInfoReference entity was cleared.

func (*NarInfoMutation) ReferencesIDs

func (m *NarInfoMutation) ReferencesIDs() (ids []int)

ReferencesIDs returns the "references" edge IDs in the mutation.

func (*NarInfoMutation) RemoveNarInfoNarFileIDs

func (m *NarInfoMutation) RemoveNarInfoNarFileIDs(ids ...int)

RemoveNarInfoNarFileIDs removes the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarInfoMutation) RemoveReferenceIDs

func (m *NarInfoMutation) RemoveReferenceIDs(ids ...int)

RemoveReferenceIDs removes the "references" edge to the NarInfoReference entity by IDs.

func (*NarInfoMutation) RemoveSignatureIDs

func (m *NarInfoMutation) RemoveSignatureIDs(ids ...int)

RemoveSignatureIDs removes the "signatures" edge to the NarInfoSignature entity by IDs.

func (*NarInfoMutation) RemovedEdges

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

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

func (*NarInfoMutation) RemovedIDs

func (m *NarInfoMutation) 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 (*NarInfoMutation) RemovedNarInfoNarFilesIDs

func (m *NarInfoMutation) RemovedNarInfoNarFilesIDs() (ids []int)

RemovedNarInfoNarFiles returns the removed IDs of the "nar_info_nar_files" edge to the NarInfoNarFile entity.

func (*NarInfoMutation) RemovedReferencesIDs

func (m *NarInfoMutation) RemovedReferencesIDs() (ids []int)

RemovedReferences returns the removed IDs of the "references" edge to the NarInfoReference entity.

func (*NarInfoMutation) RemovedSignaturesIDs

func (m *NarInfoMutation) RemovedSignaturesIDs() (ids []int)

RemovedSignatures returns the removed IDs of the "signatures" edge to the NarInfoSignature entity.

func (*NarInfoMutation) ResetCa

func (m *NarInfoMutation) ResetCa()

ResetCa resets all changes to the "ca" field.

func (*NarInfoMutation) ResetCompression

func (m *NarInfoMutation) ResetCompression()

ResetCompression resets all changes to the "compression" field.

func (*NarInfoMutation) ResetCreatedAt

func (m *NarInfoMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NarInfoMutation) ResetDeriver

func (m *NarInfoMutation) ResetDeriver()

ResetDeriver resets all changes to the "deriver" field.

func (*NarInfoMutation) ResetEdge

func (m *NarInfoMutation) 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 (*NarInfoMutation) ResetField

func (m *NarInfoMutation) 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 (*NarInfoMutation) ResetFileHash

func (m *NarInfoMutation) ResetFileHash()

ResetFileHash resets all changes to the "file_hash" field.

func (*NarInfoMutation) ResetFileSize

func (m *NarInfoMutation) ResetFileSize()

ResetFileSize resets all changes to the "file_size" field.

func (*NarInfoMutation) ResetHash

func (m *NarInfoMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (*NarInfoMutation) ResetLastAccessedAt

func (m *NarInfoMutation) ResetLastAccessedAt()

ResetLastAccessedAt resets all changes to the "last_accessed_at" field.

func (*NarInfoMutation) ResetNarHash

func (m *NarInfoMutation) ResetNarHash()

ResetNarHash resets all changes to the "nar_hash" field.

func (*NarInfoMutation) ResetNarInfoNarFiles

func (m *NarInfoMutation) ResetNarInfoNarFiles()

ResetNarInfoNarFiles resets all changes to the "nar_info_nar_files" edge.

func (*NarInfoMutation) ResetNarSize

func (m *NarInfoMutation) ResetNarSize()

ResetNarSize resets all changes to the "nar_size" field.

func (*NarInfoMutation) ResetReferences

func (m *NarInfoMutation) ResetReferences()

ResetReferences resets all changes to the "references" edge.

func (*NarInfoMutation) ResetSignatures

func (m *NarInfoMutation) ResetSignatures()

ResetSignatures resets all changes to the "signatures" edge.

func (*NarInfoMutation) ResetStorePath

func (m *NarInfoMutation) ResetStorePath()

ResetStorePath resets all changes to the "store_path" field.

func (*NarInfoMutation) ResetSystem

func (m *NarInfoMutation) ResetSystem()

ResetSystem resets all changes to the "system" field.

func (*NarInfoMutation) ResetURL

func (m *NarInfoMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*NarInfoMutation) ResetUpdatedAt

func (m *NarInfoMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*NarInfoMutation) SetCa

func (m *NarInfoMutation) SetCa(s string)

SetCa sets the "ca" field.

func (*NarInfoMutation) SetCompression

func (m *NarInfoMutation) SetCompression(s string)

SetCompression sets the "compression" field.

func (*NarInfoMutation) SetCreatedAt

func (m *NarInfoMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NarInfoMutation) SetDeriver

func (m *NarInfoMutation) SetDeriver(s string)

SetDeriver sets the "deriver" field.

func (*NarInfoMutation) SetField

func (m *NarInfoMutation) 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 (*NarInfoMutation) SetFileHash

func (m *NarInfoMutation) SetFileHash(s string)

SetFileHash sets the "file_hash" field.

func (*NarInfoMutation) SetFileSize

func (m *NarInfoMutation) SetFileSize(i int64)

SetFileSize sets the "file_size" field.

func (*NarInfoMutation) SetHash

func (m *NarInfoMutation) SetHash(s string)

SetHash sets the "hash" field.

func (*NarInfoMutation) SetLastAccessedAt

func (m *NarInfoMutation) SetLastAccessedAt(t time.Time)

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarInfoMutation) SetNarHash

func (m *NarInfoMutation) SetNarHash(s string)

SetNarHash sets the "nar_hash" field.

func (*NarInfoMutation) SetNarSize

func (m *NarInfoMutation) SetNarSize(i int64)

SetNarSize sets the "nar_size" field.

func (*NarInfoMutation) SetOp

func (m *NarInfoMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NarInfoMutation) SetStorePath

func (m *NarInfoMutation) SetStorePath(s string)

SetStorePath sets the "store_path" field.

func (*NarInfoMutation) SetSystem

func (m *NarInfoMutation) SetSystem(s string)

SetSystem sets the "system" field.

func (*NarInfoMutation) SetURL

func (m *NarInfoMutation) SetURL(s string)

SetURL sets the "url" field.

func (*NarInfoMutation) SetUpdatedAt

func (m *NarInfoMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*NarInfoMutation) SignaturesCleared

func (m *NarInfoMutation) SignaturesCleared() bool

SignaturesCleared reports if the "signatures" edge to the NarInfoSignature entity was cleared.

func (*NarInfoMutation) SignaturesIDs

func (m *NarInfoMutation) SignaturesIDs() (ids []int)

SignaturesIDs returns the "signatures" edge IDs in the mutation.

func (*NarInfoMutation) StorePath

func (m *NarInfoMutation) StorePath() (r string, exists bool)

StorePath returns the value of the "store_path" field in the mutation.

func (*NarInfoMutation) StorePathCleared

func (m *NarInfoMutation) StorePathCleared() bool

StorePathCleared returns if the "store_path" field was cleared in this mutation.

func (*NarInfoMutation) System

func (m *NarInfoMutation) System() (r string, exists bool)

System returns the value of the "system" field in the mutation.

func (*NarInfoMutation) SystemCleared

func (m *NarInfoMutation) SystemCleared() bool

SystemCleared returns if the "system" field was cleared in this mutation.

func (NarInfoMutation) Tx

func (m NarInfoMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NarInfoMutation) Type

func (m *NarInfoMutation) Type() string

Type returns the node type of this mutation (NarInfo).

func (*NarInfoMutation) URL

func (m *NarInfoMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*NarInfoMutation) URLCleared

func (m *NarInfoMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*NarInfoMutation) UpdatedAt

func (m *NarInfoMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*NarInfoMutation) UpdatedAtCleared

func (m *NarInfoMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*NarInfoMutation) Where

func (m *NarInfoMutation) Where(ps ...predicate.NarInfo)

Where appends a list predicates to the NarInfoMutation builder.

func (*NarInfoMutation) WhereP

func (m *NarInfoMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NarInfoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NarInfoNarFile

type NarInfoNarFile struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// NarinfoID holds the value of the "narinfo_id" field.
	NarinfoID int `json:"narinfo_id,omitempty"`
	// NarFileID holds the value of the "nar_file_id" field.
	NarFileID int `json:"nar_file_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NarInfoNarFileQuery when eager-loading is set.
	Edges NarInfoNarFileEdges `json:"edges"`
	// contains filtered or unexported fields
}

NarInfoNarFile is the model entity for the NarInfoNarFile schema.

func (*NarInfoNarFile) QueryNarFile

func (_m *NarInfoNarFile) QueryNarFile() *NarFileQuery

QueryNarFile queries the "nar_file" edge of the NarInfoNarFile entity.

func (*NarInfoNarFile) QueryNarinfo

func (_m *NarInfoNarFile) QueryNarinfo() *NarInfoQuery

QueryNarinfo queries the "narinfo" edge of the NarInfoNarFile entity.

func (*NarInfoNarFile) String

func (_m *NarInfoNarFile) String() string

String implements the fmt.Stringer.

func (*NarInfoNarFile) Unwrap

func (_m *NarInfoNarFile) Unwrap() *NarInfoNarFile

Unwrap unwraps the NarInfoNarFile 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 (*NarInfoNarFile) Update

Update returns a builder for updating this NarInfoNarFile. Note that you need to call NarInfoNarFile.Unwrap() before calling this method if this NarInfoNarFile was returned from a transaction, and the transaction was committed or rolled back.

func (*NarInfoNarFile) Value

func (_m *NarInfoNarFile) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the NarInfoNarFile. This includes values selected through modifiers, order, etc.

type NarInfoNarFileClient

type NarInfoNarFileClient struct {
	// contains filtered or unexported fields
}

NarInfoNarFileClient is a client for the NarInfoNarFile schema.

func NewNarInfoNarFileClient

func NewNarInfoNarFileClient(c config) *NarInfoNarFileClient

NewNarInfoNarFileClient returns a client for the NarInfoNarFile from the given config.

func (*NarInfoNarFileClient) Create

Create returns a builder for creating a NarInfoNarFile entity.

func (*NarInfoNarFileClient) CreateBulk

CreateBulk returns a builder for creating a bulk of NarInfoNarFile entities.

func (*NarInfoNarFileClient) Delete

Delete returns a delete builder for NarInfoNarFile.

func (*NarInfoNarFileClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NarInfoNarFileClient) DeleteOneID

func (c *NarInfoNarFileClient) DeleteOneID(id int) *NarInfoNarFileDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NarInfoNarFileClient) Get

Get returns a NarInfoNarFile entity by its id.

func (*NarInfoNarFileClient) GetX

GetX is like Get, but panics if an error occurs.

func (*NarInfoNarFileClient) Hooks

func (c *NarInfoNarFileClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NarInfoNarFileClient) Intercept

func (c *NarInfoNarFileClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `narinfonarfile.Intercept(f(g(h())))`.

func (*NarInfoNarFileClient) Interceptors

func (c *NarInfoNarFileClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NarInfoNarFileClient) MapCreateBulk

func (c *NarInfoNarFileClient) MapCreateBulk(slice any, setFunc func(*NarInfoNarFileCreate, int)) *NarInfoNarFileCreateBulk

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 (*NarInfoNarFileClient) Query

Query returns a query builder for NarInfoNarFile.

func (*NarInfoNarFileClient) QueryNarFile

func (c *NarInfoNarFileClient) QueryNarFile(_m *NarInfoNarFile) *NarFileQuery

QueryNarFile queries the nar_file edge of a NarInfoNarFile.

func (*NarInfoNarFileClient) QueryNarinfo

func (c *NarInfoNarFileClient) QueryNarinfo(_m *NarInfoNarFile) *NarInfoQuery

QueryNarinfo queries the narinfo edge of a NarInfoNarFile.

func (*NarInfoNarFileClient) Update

Update returns an update builder for NarInfoNarFile.

func (*NarInfoNarFileClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*NarInfoNarFileClient) UpdateOneID

func (c *NarInfoNarFileClient) UpdateOneID(id int) *NarInfoNarFileUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NarInfoNarFileClient) Use

func (c *NarInfoNarFileClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `narinfonarfile.Hooks(f(g(h())))`.

type NarInfoNarFileCreate

type NarInfoNarFileCreate struct {
	// contains filtered or unexported fields
}

NarInfoNarFileCreate is the builder for creating a NarInfoNarFile entity.

func (*NarInfoNarFileCreate) Exec

func (_c *NarInfoNarFileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarInfoNarFileCreate) ExecX

func (_c *NarInfoNarFileCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileCreate) Mutation

Mutation returns the NarInfoNarFileMutation object of the builder.

func (*NarInfoNarFileCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NarInfoNarFile.Create().
	SetNarinfoID(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.NarInfoNarFileUpsert) {
		SetNarinfoID(v+v).
	}).
	Exec(ctx)

func (*NarInfoNarFileCreate) OnConflictColumns

func (_c *NarInfoNarFileCreate) OnConflictColumns(columns ...string) *NarInfoNarFileUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NarInfoNarFile.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NarInfoNarFileCreate) Save

Save creates the NarInfoNarFile in the database.

func (*NarInfoNarFileCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*NarInfoNarFileCreate) SetNarFile

SetNarFile sets the "nar_file" edge to the NarFile entity.

func (*NarInfoNarFileCreate) SetNarFileID

func (_c *NarInfoNarFileCreate) SetNarFileID(v int) *NarInfoNarFileCreate

SetNarFileID sets the "nar_file_id" field.

func (*NarInfoNarFileCreate) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoNarFileCreate) SetNarinfoID

func (_c *NarInfoNarFileCreate) SetNarinfoID(v int) *NarInfoNarFileCreate

SetNarinfoID sets the "narinfo_id" field.

type NarInfoNarFileCreateBulk

type NarInfoNarFileCreateBulk struct {
	// contains filtered or unexported fields
}

NarInfoNarFileCreateBulk is the builder for creating many NarInfoNarFile entities in bulk.

func (*NarInfoNarFileCreateBulk) Exec

Exec executes the query.

func (*NarInfoNarFileCreateBulk) ExecX

func (_c *NarInfoNarFileCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NarInfoNarFile.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.NarInfoNarFileUpsert) {
		SetNarinfoID(v+v).
	}).
	Exec(ctx)

func (*NarInfoNarFileCreateBulk) OnConflictColumns

func (_c *NarInfoNarFileCreateBulk) OnConflictColumns(columns ...string) *NarInfoNarFileUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NarInfoNarFile.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NarInfoNarFileCreateBulk) Save

Save creates the NarInfoNarFile entities in the database.

func (*NarInfoNarFileCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type NarInfoNarFileDelete

type NarInfoNarFileDelete struct {
	// contains filtered or unexported fields
}

NarInfoNarFileDelete is the builder for deleting a NarInfoNarFile entity.

func (*NarInfoNarFileDelete) Exec

func (_d *NarInfoNarFileDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NarInfoNarFileDelete) ExecX

func (_d *NarInfoNarFileDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileDelete) Where

Where appends a list predicates to the NarInfoNarFileDelete builder.

type NarInfoNarFileDeleteOne

type NarInfoNarFileDeleteOne struct {
	// contains filtered or unexported fields
}

NarInfoNarFileDeleteOne is the builder for deleting a single NarInfoNarFile entity.

func (*NarInfoNarFileDeleteOne) Exec

Exec executes the deletion query.

func (*NarInfoNarFileDeleteOne) ExecX

func (_d *NarInfoNarFileDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileDeleteOne) Where

Where appends a list predicates to the NarInfoNarFileDelete builder.

type NarInfoNarFileEdges

type NarInfoNarFileEdges struct {
	// Narinfo holds the value of the narinfo edge.
	Narinfo *NarInfo `json:"narinfo,omitempty"`
	// NarFile holds the value of the nar_file edge.
	NarFile *NarFile `json:"nar_file,omitempty"`
	// contains filtered or unexported fields
}

NarInfoNarFileEdges holds the relations/edges for other nodes in the graph.

func (NarInfoNarFileEdges) NarFileOrErr

func (e NarInfoNarFileEdges) NarFileOrErr() (*NarFile, error)

NarFileOrErr returns the NarFile value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (NarInfoNarFileEdges) NarinfoOrErr

func (e NarInfoNarFileEdges) NarinfoOrErr() (*NarInfo, error)

NarinfoOrErr returns the Narinfo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type NarInfoNarFileGroupBy

type NarInfoNarFileGroupBy struct {
	// contains filtered or unexported fields
}

NarInfoNarFileGroupBy is the group-by builder for NarInfoNarFile entities.

func (*NarInfoNarFileGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*NarInfoNarFileGroupBy) Bool

func (s *NarInfoNarFileGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) BoolX

func (s *NarInfoNarFileGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) Bools

func (s *NarInfoNarFileGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) BoolsX

func (s *NarInfoNarFileGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) Float64

func (s *NarInfoNarFileGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) Float64X

func (s *NarInfoNarFileGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) Float64s

func (s *NarInfoNarFileGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) Float64sX

func (s *NarInfoNarFileGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) Int

func (s *NarInfoNarFileGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) IntX

func (s *NarInfoNarFileGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) Ints

func (s *NarInfoNarFileGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) IntsX

func (s *NarInfoNarFileGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) Scan

func (_g *NarInfoNarFileGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NarInfoNarFileGroupBy) ScanX

func (s *NarInfoNarFileGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) String

func (s *NarInfoNarFileGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) StringX

func (s *NarInfoNarFileGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NarInfoNarFileGroupBy) Strings

func (s *NarInfoNarFileGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileGroupBy) StringsX

func (s *NarInfoNarFileGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NarInfoNarFileMutation

type NarInfoNarFileMutation struct {
	// contains filtered or unexported fields
}

NarInfoNarFileMutation represents an operation that mutates the NarInfoNarFile nodes in the graph.

func (*NarInfoNarFileMutation) AddField

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) AddedEdges

func (m *NarInfoNarFileMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NarInfoNarFileMutation) AddedField

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) AddedFields

func (m *NarInfoNarFileMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NarInfoNarFileMutation) AddedIDs

func (m *NarInfoNarFileMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NarInfoNarFileMutation) ClearEdge

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) ClearField

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) ClearNarFile

func (m *NarInfoNarFileMutation) ClearNarFile()

ClearNarFile clears the "nar_file" edge to the NarFile entity.

func (*NarInfoNarFileMutation) ClearNarinfo

func (m *NarInfoNarFileMutation) ClearNarinfo()

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoNarFileMutation) ClearedEdges

func (m *NarInfoNarFileMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NarInfoNarFileMutation) ClearedFields

func (m *NarInfoNarFileMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NarInfoNarFileMutation) Client

func (m NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) EdgeCleared

func (m *NarInfoNarFileMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NarInfoNarFileMutation) Field

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) FieldCleared

func (m *NarInfoNarFileMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NarInfoNarFileMutation) Fields

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) ID

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) IDs

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) NarFileCleared

func (m *NarInfoNarFileMutation) NarFileCleared() bool

NarFileCleared reports if the "nar_file" edge to the NarFile entity was cleared.

func (*NarInfoNarFileMutation) NarFileID

func (m *NarInfoNarFileMutation) NarFileID() (r int, exists bool)

NarFileID returns the value of the "nar_file_id" field in the mutation.

func (*NarInfoNarFileMutation) NarFileIDs

func (m *NarInfoNarFileMutation) NarFileIDs() (ids []int)

NarFileIDs returns the "nar_file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NarFileID instead. It exists only for internal usage by the builders.

func (*NarInfoNarFileMutation) NarinfoCleared

func (m *NarInfoNarFileMutation) NarinfoCleared() bool

NarinfoCleared reports if the "narinfo" edge to the NarInfo entity was cleared.

func (*NarInfoNarFileMutation) NarinfoID

func (m *NarInfoNarFileMutation) NarinfoID() (r int, exists bool)

NarinfoID returns the value of the "narinfo_id" field in the mutation.

func (*NarInfoNarFileMutation) NarinfoIDs

func (m *NarInfoNarFileMutation) NarinfoIDs() (ids []int)

NarinfoIDs returns the "narinfo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NarinfoID instead. It exists only for internal usage by the builders.

func (*NarInfoNarFileMutation) OldField

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) OldNarFileID

func (m *NarInfoNarFileMutation) OldNarFileID(ctx context.Context) (v int, err error)

OldNarFileID returns the old "nar_file_id" field's value of the NarInfoNarFile entity. If the NarInfoNarFile 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 (*NarInfoNarFileMutation) OldNarinfoID

func (m *NarInfoNarFileMutation) OldNarinfoID(ctx context.Context) (v int, err error)

OldNarinfoID returns the old "narinfo_id" field's value of the NarInfoNarFile entity. If the NarInfoNarFile 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 (*NarInfoNarFileMutation) Op

func (m *NarInfoNarFileMutation) Op() Op

Op returns the operation name.

func (*NarInfoNarFileMutation) RemovedEdges

func (m *NarInfoNarFileMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NarInfoNarFileMutation) RemovedIDs

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) ResetEdge

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) ResetField

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) ResetNarFile

func (m *NarInfoNarFileMutation) ResetNarFile()

ResetNarFile resets all changes to the "nar_file" edge.

func (*NarInfoNarFileMutation) ResetNarFileID

func (m *NarInfoNarFileMutation) ResetNarFileID()

ResetNarFileID resets all changes to the "nar_file_id" field.

func (*NarInfoNarFileMutation) ResetNarinfo

func (m *NarInfoNarFileMutation) ResetNarinfo()

ResetNarinfo resets all changes to the "narinfo" edge.

func (*NarInfoNarFileMutation) ResetNarinfoID

func (m *NarInfoNarFileMutation) ResetNarinfoID()

ResetNarinfoID resets all changes to the "narinfo_id" field.

func (*NarInfoNarFileMutation) SetField

func (m *NarInfoNarFileMutation) 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 (*NarInfoNarFileMutation) SetNarFileID

func (m *NarInfoNarFileMutation) SetNarFileID(i int)

SetNarFileID sets the "nar_file_id" field.

func (*NarInfoNarFileMutation) SetNarinfoID

func (m *NarInfoNarFileMutation) SetNarinfoID(i int)

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoNarFileMutation) SetOp

func (m *NarInfoNarFileMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (NarInfoNarFileMutation) Tx

func (m NarInfoNarFileMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NarInfoNarFileMutation) Type

func (m *NarInfoNarFileMutation) Type() string

Type returns the node type of this mutation (NarInfoNarFile).

func (*NarInfoNarFileMutation) Where

Where appends a list predicates to the NarInfoNarFileMutation builder.

func (*NarInfoNarFileMutation) WhereP

func (m *NarInfoNarFileMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NarInfoNarFileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NarInfoNarFileQuery

type NarInfoNarFileQuery struct {
	// contains filtered or unexported fields
}

NarInfoNarFileQuery is the builder for querying NarInfoNarFile entities.

func (*NarInfoNarFileQuery) Aggregate

Aggregate returns a NarInfoNarFileSelect configured with the given aggregations.

func (*NarInfoNarFileQuery) All

All executes the query and returns a list of NarInfoNarFiles.

func (*NarInfoNarFileQuery) AllX

AllX is like All, but panics if an error occurs.

func (*NarInfoNarFileQuery) Clone

Clone returns a duplicate of the NarInfoNarFileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NarInfoNarFileQuery) Count

func (_q *NarInfoNarFileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NarInfoNarFileQuery) CountX

func (_q *NarInfoNarFileQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NarInfoNarFileQuery) Exist

func (_q *NarInfoNarFileQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NarInfoNarFileQuery) ExistX

func (_q *NarInfoNarFileQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NarInfoNarFileQuery) First

First returns the first NarInfoNarFile entity from the query. Returns a *NotFoundError when no NarInfoNarFile was found.

func (*NarInfoNarFileQuery) FirstID

func (_q *NarInfoNarFileQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first NarInfoNarFile ID from the query. Returns a *NotFoundError when no NarInfoNarFile ID was found.

func (*NarInfoNarFileQuery) FirstIDX

func (_q *NarInfoNarFileQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NarInfoNarFileQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*NarInfoNarFileQuery) GroupBy

func (_q *NarInfoNarFileQuery) GroupBy(field string, fields ...string) *NarInfoNarFileGroupBy

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 {
	NarinfoID int `json:"narinfo_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NarInfoNarFile.Query().
	GroupBy(narinfonarfile.FieldNarinfoID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NarInfoNarFileQuery) IDs

func (_q *NarInfoNarFileQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of NarInfoNarFile IDs.

func (*NarInfoNarFileQuery) IDsX

func (_q *NarInfoNarFileQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NarInfoNarFileQuery) Limit

func (_q *NarInfoNarFileQuery) Limit(limit int) *NarInfoNarFileQuery

Limit the number of records to be returned by this query.

func (*NarInfoNarFileQuery) Offset

func (_q *NarInfoNarFileQuery) Offset(offset int) *NarInfoNarFileQuery

Offset to start from.

func (*NarInfoNarFileQuery) Only

Only returns a single NarInfoNarFile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NarInfoNarFile entity is found. Returns a *NotFoundError when no NarInfoNarFile entities are found.

func (*NarInfoNarFileQuery) OnlyID

func (_q *NarInfoNarFileQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only NarInfoNarFile ID in the query. Returns a *NotSingularError when more than one NarInfoNarFile ID is found. Returns a *NotFoundError when no entities are found.

func (*NarInfoNarFileQuery) OnlyIDX

func (_q *NarInfoNarFileQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NarInfoNarFileQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*NarInfoNarFileQuery) Order

Order specifies how the records should be ordered.

func (*NarInfoNarFileQuery) QueryNarFile

func (_q *NarInfoNarFileQuery) QueryNarFile() *NarFileQuery

QueryNarFile chains the current query on the "nar_file" edge.

func (*NarInfoNarFileQuery) QueryNarinfo

func (_q *NarInfoNarFileQuery) QueryNarinfo() *NarInfoQuery

QueryNarinfo chains the current query on the "narinfo" edge.

func (*NarInfoNarFileQuery) Select

func (_q *NarInfoNarFileQuery) Select(fields ...string) *NarInfoNarFileSelect

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 {
	NarinfoID int `json:"narinfo_id,omitempty"`
}

client.NarInfoNarFile.Query().
	Select(narinfonarfile.FieldNarinfoID).
	Scan(ctx, &v)

func (*NarInfoNarFileQuery) Unique

func (_q *NarInfoNarFileQuery) Unique(unique bool) *NarInfoNarFileQuery

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 (*NarInfoNarFileQuery) Where

Where adds a new predicate for the NarInfoNarFileQuery builder.

func (*NarInfoNarFileQuery) WithNarFile

func (_q *NarInfoNarFileQuery) WithNarFile(opts ...func(*NarFileQuery)) *NarInfoNarFileQuery

WithNarFile tells the query-builder to eager-load the nodes that are connected to the "nar_file" edge. The optional arguments are used to configure the query builder of the edge.

func (*NarInfoNarFileQuery) WithNarinfo

func (_q *NarInfoNarFileQuery) WithNarinfo(opts ...func(*NarInfoQuery)) *NarInfoNarFileQuery

WithNarinfo tells the query-builder to eager-load the nodes that are connected to the "narinfo" edge. The optional arguments are used to configure the query builder of the edge.

type NarInfoNarFileSelect

type NarInfoNarFileSelect struct {
	*NarInfoNarFileQuery
	// contains filtered or unexported fields
}

NarInfoNarFileSelect is the builder for selecting fields of NarInfoNarFile entities.

func (*NarInfoNarFileSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*NarInfoNarFileSelect) Bool

func (s *NarInfoNarFileSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) BoolX

func (s *NarInfoNarFileSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NarInfoNarFileSelect) Bools

func (s *NarInfoNarFileSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) BoolsX

func (s *NarInfoNarFileSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NarInfoNarFileSelect) Float64

func (s *NarInfoNarFileSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) Float64X

func (s *NarInfoNarFileSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NarInfoNarFileSelect) Float64s

func (s *NarInfoNarFileSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) Float64sX

func (s *NarInfoNarFileSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NarInfoNarFileSelect) Int

func (s *NarInfoNarFileSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) IntX

func (s *NarInfoNarFileSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NarInfoNarFileSelect) Ints

func (s *NarInfoNarFileSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) IntsX

func (s *NarInfoNarFileSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NarInfoNarFileSelect) Scan

func (_s *NarInfoNarFileSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NarInfoNarFileSelect) ScanX

func (s *NarInfoNarFileSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NarInfoNarFileSelect) String

func (s *NarInfoNarFileSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) StringX

func (s *NarInfoNarFileSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NarInfoNarFileSelect) Strings

func (s *NarInfoNarFileSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NarInfoNarFileSelect) StringsX

func (s *NarInfoNarFileSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NarInfoNarFileUpdate

type NarInfoNarFileUpdate struct {
	// contains filtered or unexported fields
}

NarInfoNarFileUpdate is the builder for updating NarInfoNarFile entities.

func (*NarInfoNarFileUpdate) ClearNarFile

func (_u *NarInfoNarFileUpdate) ClearNarFile() *NarInfoNarFileUpdate

ClearNarFile clears the "nar_file" edge to the NarFile entity.

func (*NarInfoNarFileUpdate) ClearNarinfo

func (_u *NarInfoNarFileUpdate) ClearNarinfo() *NarInfoNarFileUpdate

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoNarFileUpdate) Exec

func (_u *NarInfoNarFileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarInfoNarFileUpdate) ExecX

func (_u *NarInfoNarFileUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileUpdate) Mutation

Mutation returns the NarInfoNarFileMutation object of the builder.

func (*NarInfoNarFileUpdate) Save

func (_u *NarInfoNarFileUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NarInfoNarFileUpdate) SaveX

func (_u *NarInfoNarFileUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NarInfoNarFileUpdate) SetNarFile

SetNarFile sets the "nar_file" edge to the NarFile entity.

func (*NarInfoNarFileUpdate) SetNarFileID

func (_u *NarInfoNarFileUpdate) SetNarFileID(v int) *NarInfoNarFileUpdate

SetNarFileID sets the "nar_file_id" field.

func (*NarInfoNarFileUpdate) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoNarFileUpdate) SetNarinfoID

func (_u *NarInfoNarFileUpdate) SetNarinfoID(v int) *NarInfoNarFileUpdate

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoNarFileUpdate) SetNillableNarFileID

func (_u *NarInfoNarFileUpdate) SetNillableNarFileID(v *int) *NarInfoNarFileUpdate

SetNillableNarFileID sets the "nar_file_id" field if the given value is not nil.

func (*NarInfoNarFileUpdate) SetNillableNarinfoID

func (_u *NarInfoNarFileUpdate) SetNillableNarinfoID(v *int) *NarInfoNarFileUpdate

SetNillableNarinfoID sets the "narinfo_id" field if the given value is not nil.

func (*NarInfoNarFileUpdate) Where

Where appends a list predicates to the NarInfoNarFileUpdate builder.

type NarInfoNarFileUpdateOne

type NarInfoNarFileUpdateOne struct {
	// contains filtered or unexported fields
}

NarInfoNarFileUpdateOne is the builder for updating a single NarInfoNarFile entity.

func (*NarInfoNarFileUpdateOne) ClearNarFile

ClearNarFile clears the "nar_file" edge to the NarFile entity.

func (*NarInfoNarFileUpdateOne) ClearNarinfo

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoNarFileUpdateOne) Exec

Exec executes the query on the entity.

func (*NarInfoNarFileUpdateOne) ExecX

func (_u *NarInfoNarFileUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileUpdateOne) Mutation

Mutation returns the NarInfoNarFileMutation object of the builder.

func (*NarInfoNarFileUpdateOne) Save

Save executes the query and returns the updated NarInfoNarFile entity.

func (*NarInfoNarFileUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*NarInfoNarFileUpdateOne) Select

func (_u *NarInfoNarFileUpdateOne) Select(field string, fields ...string) *NarInfoNarFileUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NarInfoNarFileUpdateOne) SetNarFile

SetNarFile sets the "nar_file" edge to the NarFile entity.

func (*NarInfoNarFileUpdateOne) SetNarFileID

SetNarFileID sets the "nar_file_id" field.

func (*NarInfoNarFileUpdateOne) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoNarFileUpdateOne) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoNarFileUpdateOne) SetNillableNarFileID

func (_u *NarInfoNarFileUpdateOne) SetNillableNarFileID(v *int) *NarInfoNarFileUpdateOne

SetNillableNarFileID sets the "nar_file_id" field if the given value is not nil.

func (*NarInfoNarFileUpdateOne) SetNillableNarinfoID

func (_u *NarInfoNarFileUpdateOne) SetNillableNarinfoID(v *int) *NarInfoNarFileUpdateOne

SetNillableNarinfoID sets the "narinfo_id" field if the given value is not nil.

func (*NarInfoNarFileUpdateOne) Where

Where appends a list predicates to the NarInfoNarFileUpdate builder.

type NarInfoNarFileUpsert

type NarInfoNarFileUpsert struct {
	*sql.UpdateSet
}

NarInfoNarFileUpsert is the "OnConflict" setter.

func (*NarInfoNarFileUpsert) SetNarFileID

func (u *NarInfoNarFileUpsert) SetNarFileID(v int) *NarInfoNarFileUpsert

SetNarFileID sets the "nar_file_id" field.

func (*NarInfoNarFileUpsert) SetNarinfoID

func (u *NarInfoNarFileUpsert) SetNarinfoID(v int) *NarInfoNarFileUpsert

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoNarFileUpsert) UpdateNarFileID

func (u *NarInfoNarFileUpsert) UpdateNarFileID() *NarInfoNarFileUpsert

UpdateNarFileID sets the "nar_file_id" field to the value that was provided on create.

func (*NarInfoNarFileUpsert) UpdateNarinfoID

func (u *NarInfoNarFileUpsert) UpdateNarinfoID() *NarInfoNarFileUpsert

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

type NarInfoNarFileUpsertBulk

type NarInfoNarFileUpsertBulk struct {
	// contains filtered or unexported fields
}

NarInfoNarFileUpsertBulk is the builder for "upsert"-ing a bulk of NarInfoNarFile nodes.

func (*NarInfoNarFileUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoNarFileUpsertBulk) Exec

Exec executes the query.

func (*NarInfoNarFileUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfoNarFile.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NarInfoNarFileUpsertBulk) SetNarFileID

SetNarFileID sets the "nar_file_id" field.

func (*NarInfoNarFileUpsertBulk) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoNarFileUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the NarInfoNarFileCreateBulk.OnConflict documentation for more info.

func (*NarInfoNarFileUpsertBulk) UpdateNarFileID

func (u *NarInfoNarFileUpsertBulk) UpdateNarFileID() *NarInfoNarFileUpsertBulk

UpdateNarFileID sets the "nar_file_id" field to the value that was provided on create.

func (*NarInfoNarFileUpsertBulk) UpdateNarinfoID

func (u *NarInfoNarFileUpsertBulk) UpdateNarinfoID() *NarInfoNarFileUpsertBulk

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoNarFileUpsertBulk) UpdateNewValues

func (u *NarInfoNarFileUpsertBulk) UpdateNewValues() *NarInfoNarFileUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfoNarFile.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type NarInfoNarFileUpsertOne

type NarInfoNarFileUpsertOne struct {
	// contains filtered or unexported fields
}

NarInfoNarFileUpsertOne is the builder for "upsert"-ing

one NarInfoNarFile node.

func (*NarInfoNarFileUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoNarFileUpsertOne) Exec

Exec executes the query.

func (*NarInfoNarFileUpsertOne) ExecX

func (u *NarInfoNarFileUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoNarFileUpsertOne) ID

func (u *NarInfoNarFileUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NarInfoNarFileUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*NarInfoNarFileUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfoNarFile.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NarInfoNarFileUpsertOne) SetNarFileID

SetNarFileID sets the "nar_file_id" field.

func (*NarInfoNarFileUpsertOne) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoNarFileUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the NarInfoNarFileCreate.OnConflict documentation for more info.

func (*NarInfoNarFileUpsertOne) UpdateNarFileID

func (u *NarInfoNarFileUpsertOne) UpdateNarFileID() *NarInfoNarFileUpsertOne

UpdateNarFileID sets the "nar_file_id" field to the value that was provided on create.

func (*NarInfoNarFileUpsertOne) UpdateNarinfoID

func (u *NarInfoNarFileUpsertOne) UpdateNarinfoID() *NarInfoNarFileUpsertOne

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoNarFileUpsertOne) UpdateNewValues

func (u *NarInfoNarFileUpsertOne) UpdateNewValues() *NarInfoNarFileUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfoNarFile.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type NarInfoNarFiles

type NarInfoNarFiles []*NarInfoNarFile

NarInfoNarFiles is a parsable slice of NarInfoNarFile.

type NarInfoQuery

type NarInfoQuery struct {
	// contains filtered or unexported fields
}

NarInfoQuery is the builder for querying NarInfo entities.

func (*NarInfoQuery) Aggregate

func (_q *NarInfoQuery) Aggregate(fns ...AggregateFunc) *NarInfoSelect

Aggregate returns a NarInfoSelect configured with the given aggregations.

func (*NarInfoQuery) All

func (_q *NarInfoQuery) All(ctx context.Context) ([]*NarInfo, error)

All executes the query and returns a list of NarInfos.

func (*NarInfoQuery) AllX

func (_q *NarInfoQuery) AllX(ctx context.Context) []*NarInfo

AllX is like All, but panics if an error occurs.

func (*NarInfoQuery) Clone

func (_q *NarInfoQuery) Clone() *NarInfoQuery

Clone returns a duplicate of the NarInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NarInfoQuery) Count

func (_q *NarInfoQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NarInfoQuery) CountX

func (_q *NarInfoQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NarInfoQuery) Exist

func (_q *NarInfoQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NarInfoQuery) ExistX

func (_q *NarInfoQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NarInfoQuery) First

func (_q *NarInfoQuery) First(ctx context.Context) (*NarInfo, error)

First returns the first NarInfo entity from the query. Returns a *NotFoundError when no NarInfo was found.

func (*NarInfoQuery) FirstID

func (_q *NarInfoQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first NarInfo ID from the query. Returns a *NotFoundError when no NarInfo ID was found.

func (*NarInfoQuery) FirstIDX

func (_q *NarInfoQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NarInfoQuery) FirstX

func (_q *NarInfoQuery) FirstX(ctx context.Context) *NarInfo

FirstX is like First, but panics if an error occurs.

func (*NarInfoQuery) GroupBy

func (_q *NarInfoQuery) GroupBy(field string, fields ...string) *NarInfoGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NarInfo.Query().
	GroupBy(narinfo.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NarInfoQuery) IDs

func (_q *NarInfoQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of NarInfo IDs.

func (*NarInfoQuery) IDsX

func (_q *NarInfoQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NarInfoQuery) Limit

func (_q *NarInfoQuery) Limit(limit int) *NarInfoQuery

Limit the number of records to be returned by this query.

func (*NarInfoQuery) Offset

func (_q *NarInfoQuery) Offset(offset int) *NarInfoQuery

Offset to start from.

func (*NarInfoQuery) Only

func (_q *NarInfoQuery) Only(ctx context.Context) (*NarInfo, error)

Only returns a single NarInfo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NarInfo entity is found. Returns a *NotFoundError when no NarInfo entities are found.

func (*NarInfoQuery) OnlyID

func (_q *NarInfoQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only NarInfo ID in the query. Returns a *NotSingularError when more than one NarInfo ID is found. Returns a *NotFoundError when no entities are found.

func (*NarInfoQuery) OnlyIDX

func (_q *NarInfoQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NarInfoQuery) OnlyX

func (_q *NarInfoQuery) OnlyX(ctx context.Context) *NarInfo

OnlyX is like Only, but panics if an error occurs.

func (*NarInfoQuery) Order

func (_q *NarInfoQuery) Order(o ...narinfo.OrderOption) *NarInfoQuery

Order specifies how the records should be ordered.

func (*NarInfoQuery) QueryNarInfoNarFiles

func (_q *NarInfoQuery) QueryNarInfoNarFiles() *NarInfoNarFileQuery

QueryNarInfoNarFiles chains the current query on the "nar_info_nar_files" edge.

func (*NarInfoQuery) QueryReferences

func (_q *NarInfoQuery) QueryReferences() *NarInfoReferenceQuery

QueryReferences chains the current query on the "references" edge.

func (*NarInfoQuery) QuerySignatures

func (_q *NarInfoQuery) QuerySignatures() *NarInfoSignatureQuery

QuerySignatures chains the current query on the "signatures" edge.

func (*NarInfoQuery) Select

func (_q *NarInfoQuery) Select(fields ...string) *NarInfoSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.NarInfo.Query().
	Select(narinfo.FieldCreatedAt).
	Scan(ctx, &v)

func (*NarInfoQuery) Unique

func (_q *NarInfoQuery) Unique(unique bool) *NarInfoQuery

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 (*NarInfoQuery) Where

func (_q *NarInfoQuery) Where(ps ...predicate.NarInfo) *NarInfoQuery

Where adds a new predicate for the NarInfoQuery builder.

func (*NarInfoQuery) WithNarInfoNarFiles

func (_q *NarInfoQuery) WithNarInfoNarFiles(opts ...func(*NarInfoNarFileQuery)) *NarInfoQuery

WithNarInfoNarFiles tells the query-builder to eager-load the nodes that are connected to the "nar_info_nar_files" edge. The optional arguments are used to configure the query builder of the edge.

func (*NarInfoQuery) WithReferences

func (_q *NarInfoQuery) WithReferences(opts ...func(*NarInfoReferenceQuery)) *NarInfoQuery

WithReferences tells the query-builder to eager-load the nodes that are connected to the "references" edge. The optional arguments are used to configure the query builder of the edge.

func (*NarInfoQuery) WithSignatures

func (_q *NarInfoQuery) WithSignatures(opts ...func(*NarInfoSignatureQuery)) *NarInfoQuery

WithSignatures tells the query-builder to eager-load the nodes that are connected to the "signatures" edge. The optional arguments are used to configure the query builder of the edge.

type NarInfoReference

type NarInfoReference struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// NarinfoID holds the value of the "narinfo_id" field.
	NarinfoID int `json:"narinfo_id,omitempty"`
	// Reference holds the value of the "reference" field.
	Reference string `json:"reference,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NarInfoReferenceQuery when eager-loading is set.
	Edges NarInfoReferenceEdges `json:"edges"`
	// contains filtered or unexported fields
}

NarInfoReference is the model entity for the NarInfoReference schema.

func (*NarInfoReference) QueryNarinfo

func (_m *NarInfoReference) QueryNarinfo() *NarInfoQuery

QueryNarinfo queries the "narinfo" edge of the NarInfoReference entity.

func (*NarInfoReference) String

func (_m *NarInfoReference) String() string

String implements the fmt.Stringer.

func (*NarInfoReference) Unwrap

func (_m *NarInfoReference) Unwrap() *NarInfoReference

Unwrap unwraps the NarInfoReference 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 (*NarInfoReference) Update

Update returns a builder for updating this NarInfoReference. Note that you need to call NarInfoReference.Unwrap() before calling this method if this NarInfoReference was returned from a transaction, and the transaction was committed or rolled back.

func (*NarInfoReference) Value

func (_m *NarInfoReference) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the NarInfoReference. This includes values selected through modifiers, order, etc.

type NarInfoReferenceClient

type NarInfoReferenceClient struct {
	// contains filtered or unexported fields
}

NarInfoReferenceClient is a client for the NarInfoReference schema.

func NewNarInfoReferenceClient

func NewNarInfoReferenceClient(c config) *NarInfoReferenceClient

NewNarInfoReferenceClient returns a client for the NarInfoReference from the given config.

func (*NarInfoReferenceClient) Create

Create returns a builder for creating a NarInfoReference entity.

func (*NarInfoReferenceClient) CreateBulk

CreateBulk returns a builder for creating a bulk of NarInfoReference entities.

func (*NarInfoReferenceClient) Delete

Delete returns a delete builder for NarInfoReference.

func (*NarInfoReferenceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NarInfoReferenceClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NarInfoReferenceClient) Get

Get returns a NarInfoReference entity by its id.

func (*NarInfoReferenceClient) GetX

GetX is like Get, but panics if an error occurs.

func (*NarInfoReferenceClient) Hooks

func (c *NarInfoReferenceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NarInfoReferenceClient) Intercept

func (c *NarInfoReferenceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `narinforeference.Intercept(f(g(h())))`.

func (*NarInfoReferenceClient) Interceptors

func (c *NarInfoReferenceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NarInfoReferenceClient) MapCreateBulk

func (c *NarInfoReferenceClient) MapCreateBulk(slice any, setFunc func(*NarInfoReferenceCreate, int)) *NarInfoReferenceCreateBulk

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 (*NarInfoReferenceClient) Query

Query returns a query builder for NarInfoReference.

func (*NarInfoReferenceClient) QueryNarinfo

QueryNarinfo queries the narinfo edge of a NarInfoReference.

func (*NarInfoReferenceClient) Update

Update returns an update builder for NarInfoReference.

func (*NarInfoReferenceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*NarInfoReferenceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*NarInfoReferenceClient) Use

func (c *NarInfoReferenceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `narinforeference.Hooks(f(g(h())))`.

type NarInfoReferenceCreate

type NarInfoReferenceCreate struct {
	// contains filtered or unexported fields
}

NarInfoReferenceCreate is the builder for creating a NarInfoReference entity.

func (*NarInfoReferenceCreate) Exec

Exec executes the query.

func (*NarInfoReferenceCreate) ExecX

func (_c *NarInfoReferenceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceCreate) Mutation

Mutation returns the NarInfoReferenceMutation object of the builder.

func (*NarInfoReferenceCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NarInfoReference.Create().
	SetNarinfoID(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.NarInfoReferenceUpsert) {
		SetNarinfoID(v+v).
	}).
	Exec(ctx)

func (*NarInfoReferenceCreate) OnConflictColumns

func (_c *NarInfoReferenceCreate) OnConflictColumns(columns ...string) *NarInfoReferenceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NarInfoReference.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NarInfoReferenceCreate) Save

Save creates the NarInfoReference in the database.

func (*NarInfoReferenceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*NarInfoReferenceCreate) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoReferenceCreate) SetNarinfoID

func (_c *NarInfoReferenceCreate) SetNarinfoID(v int) *NarInfoReferenceCreate

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoReferenceCreate) SetReference

SetReference sets the "reference" field.

type NarInfoReferenceCreateBulk

type NarInfoReferenceCreateBulk struct {
	// contains filtered or unexported fields
}

NarInfoReferenceCreateBulk is the builder for creating many NarInfoReference entities in bulk.

func (*NarInfoReferenceCreateBulk) Exec

Exec executes the query.

func (*NarInfoReferenceCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NarInfoReference.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.NarInfoReferenceUpsert) {
		SetNarinfoID(v+v).
	}).
	Exec(ctx)

func (*NarInfoReferenceCreateBulk) OnConflictColumns

func (_c *NarInfoReferenceCreateBulk) OnConflictColumns(columns ...string) *NarInfoReferenceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NarInfoReference.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NarInfoReferenceCreateBulk) Save

Save creates the NarInfoReference entities in the database.

func (*NarInfoReferenceCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type NarInfoReferenceDelete

type NarInfoReferenceDelete struct {
	// contains filtered or unexported fields
}

NarInfoReferenceDelete is the builder for deleting a NarInfoReference entity.

func (*NarInfoReferenceDelete) Exec

func (_d *NarInfoReferenceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NarInfoReferenceDelete) ExecX

func (_d *NarInfoReferenceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceDelete) Where

Where appends a list predicates to the NarInfoReferenceDelete builder.

type NarInfoReferenceDeleteOne

type NarInfoReferenceDeleteOne struct {
	// contains filtered or unexported fields
}

NarInfoReferenceDeleteOne is the builder for deleting a single NarInfoReference entity.

func (*NarInfoReferenceDeleteOne) Exec

Exec executes the deletion query.

func (*NarInfoReferenceDeleteOne) ExecX

func (_d *NarInfoReferenceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceDeleteOne) Where

Where appends a list predicates to the NarInfoReferenceDelete builder.

type NarInfoReferenceEdges

type NarInfoReferenceEdges struct {
	// Narinfo holds the value of the narinfo edge.
	Narinfo *NarInfo `json:"narinfo,omitempty"`
	// contains filtered or unexported fields
}

NarInfoReferenceEdges holds the relations/edges for other nodes in the graph.

func (NarInfoReferenceEdges) NarinfoOrErr

func (e NarInfoReferenceEdges) NarinfoOrErr() (*NarInfo, error)

NarinfoOrErr returns the Narinfo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type NarInfoReferenceGroupBy

type NarInfoReferenceGroupBy struct {
	// contains filtered or unexported fields
}

NarInfoReferenceGroupBy is the group-by builder for NarInfoReference entities.

func (*NarInfoReferenceGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*NarInfoReferenceGroupBy) Bool

func (s *NarInfoReferenceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) BoolX

func (s *NarInfoReferenceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) Bools

func (s *NarInfoReferenceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) BoolsX

func (s *NarInfoReferenceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) Float64

func (s *NarInfoReferenceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) Float64X

func (s *NarInfoReferenceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) Float64s

func (s *NarInfoReferenceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) Float64sX

func (s *NarInfoReferenceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) Int

func (s *NarInfoReferenceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) IntX

func (s *NarInfoReferenceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) Ints

func (s *NarInfoReferenceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) IntsX

func (s *NarInfoReferenceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) Scan

func (_g *NarInfoReferenceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NarInfoReferenceGroupBy) ScanX

func (s *NarInfoReferenceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) String

func (s *NarInfoReferenceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) StringX

func (s *NarInfoReferenceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NarInfoReferenceGroupBy) Strings

func (s *NarInfoReferenceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceGroupBy) StringsX

func (s *NarInfoReferenceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NarInfoReferenceMutation

type NarInfoReferenceMutation struct {
	// contains filtered or unexported fields
}

NarInfoReferenceMutation represents an operation that mutates the NarInfoReference nodes in the graph.

func (*NarInfoReferenceMutation) AddField

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) AddedEdges

func (m *NarInfoReferenceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NarInfoReferenceMutation) AddedField

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) AddedFields

func (m *NarInfoReferenceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NarInfoReferenceMutation) AddedIDs

func (m *NarInfoReferenceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NarInfoReferenceMutation) ClearEdge

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) ClearField

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) ClearNarinfo

func (m *NarInfoReferenceMutation) ClearNarinfo()

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoReferenceMutation) ClearedEdges

func (m *NarInfoReferenceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NarInfoReferenceMutation) ClearedFields

func (m *NarInfoReferenceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NarInfoReferenceMutation) Client

func (m NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) EdgeCleared

func (m *NarInfoReferenceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NarInfoReferenceMutation) Field

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) FieldCleared

func (m *NarInfoReferenceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NarInfoReferenceMutation) Fields

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) ID

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) NarinfoCleared

func (m *NarInfoReferenceMutation) NarinfoCleared() bool

NarinfoCleared reports if the "narinfo" edge to the NarInfo entity was cleared.

func (*NarInfoReferenceMutation) NarinfoID

func (m *NarInfoReferenceMutation) NarinfoID() (r int, exists bool)

NarinfoID returns the value of the "narinfo_id" field in the mutation.

func (*NarInfoReferenceMutation) NarinfoIDs

func (m *NarInfoReferenceMutation) NarinfoIDs() (ids []int)

NarinfoIDs returns the "narinfo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NarinfoID instead. It exists only for internal usage by the builders.

func (*NarInfoReferenceMutation) OldField

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) OldNarinfoID

func (m *NarInfoReferenceMutation) OldNarinfoID(ctx context.Context) (v int, err error)

OldNarinfoID returns the old "narinfo_id" field's value of the NarInfoReference entity. If the NarInfoReference 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 (*NarInfoReferenceMutation) OldReference

func (m *NarInfoReferenceMutation) OldReference(ctx context.Context) (v string, err error)

OldReference returns the old "reference" field's value of the NarInfoReference entity. If the NarInfoReference 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 (*NarInfoReferenceMutation) Op

func (m *NarInfoReferenceMutation) Op() Op

Op returns the operation name.

func (*NarInfoReferenceMutation) Reference

func (m *NarInfoReferenceMutation) Reference() (r string, exists bool)

Reference returns the value of the "reference" field in the mutation.

func (*NarInfoReferenceMutation) RemovedEdges

func (m *NarInfoReferenceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NarInfoReferenceMutation) RemovedIDs

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) ResetEdge

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) ResetField

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) ResetNarinfo

func (m *NarInfoReferenceMutation) ResetNarinfo()

ResetNarinfo resets all changes to the "narinfo" edge.

func (*NarInfoReferenceMutation) ResetNarinfoID

func (m *NarInfoReferenceMutation) ResetNarinfoID()

ResetNarinfoID resets all changes to the "narinfo_id" field.

func (*NarInfoReferenceMutation) ResetReference

func (m *NarInfoReferenceMutation) ResetReference()

ResetReference resets all changes to the "reference" field.

func (*NarInfoReferenceMutation) SetField

func (m *NarInfoReferenceMutation) 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 (*NarInfoReferenceMutation) SetNarinfoID

func (m *NarInfoReferenceMutation) SetNarinfoID(i int)

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoReferenceMutation) SetOp

func (m *NarInfoReferenceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NarInfoReferenceMutation) SetReference

func (m *NarInfoReferenceMutation) SetReference(s string)

SetReference sets the "reference" field.

func (NarInfoReferenceMutation) Tx

func (m NarInfoReferenceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NarInfoReferenceMutation) Type

func (m *NarInfoReferenceMutation) Type() string

Type returns the node type of this mutation (NarInfoReference).

func (*NarInfoReferenceMutation) Where

Where appends a list predicates to the NarInfoReferenceMutation builder.

func (*NarInfoReferenceMutation) WhereP

func (m *NarInfoReferenceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NarInfoReferenceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NarInfoReferenceQuery

type NarInfoReferenceQuery struct {
	// contains filtered or unexported fields
}

NarInfoReferenceQuery is the builder for querying NarInfoReference entities.

func (*NarInfoReferenceQuery) Aggregate

Aggregate returns a NarInfoReferenceSelect configured with the given aggregations.

func (*NarInfoReferenceQuery) All

All executes the query and returns a list of NarInfoReferences.

func (*NarInfoReferenceQuery) AllX

AllX is like All, but panics if an error occurs.

func (*NarInfoReferenceQuery) Clone

Clone returns a duplicate of the NarInfoReferenceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NarInfoReferenceQuery) Count

func (_q *NarInfoReferenceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NarInfoReferenceQuery) CountX

func (_q *NarInfoReferenceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NarInfoReferenceQuery) Exist

func (_q *NarInfoReferenceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NarInfoReferenceQuery) ExistX

func (_q *NarInfoReferenceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NarInfoReferenceQuery) First

First returns the first NarInfoReference entity from the query. Returns a *NotFoundError when no NarInfoReference was found.

func (*NarInfoReferenceQuery) FirstID

func (_q *NarInfoReferenceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first NarInfoReference ID from the query. Returns a *NotFoundError when no NarInfoReference ID was found.

func (*NarInfoReferenceQuery) FirstIDX

func (_q *NarInfoReferenceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NarInfoReferenceQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*NarInfoReferenceQuery) GroupBy

func (_q *NarInfoReferenceQuery) GroupBy(field string, fields ...string) *NarInfoReferenceGroupBy

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 {
	NarinfoID int `json:"narinfo_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NarInfoReference.Query().
	GroupBy(narinforeference.FieldNarinfoID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NarInfoReferenceQuery) IDs

func (_q *NarInfoReferenceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of NarInfoReference IDs.

func (*NarInfoReferenceQuery) IDsX

func (_q *NarInfoReferenceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NarInfoReferenceQuery) Limit

Limit the number of records to be returned by this query.

func (*NarInfoReferenceQuery) Offset

func (_q *NarInfoReferenceQuery) Offset(offset int) *NarInfoReferenceQuery

Offset to start from.

func (*NarInfoReferenceQuery) Only

Only returns a single NarInfoReference entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NarInfoReference entity is found. Returns a *NotFoundError when no NarInfoReference entities are found.

func (*NarInfoReferenceQuery) OnlyID

func (_q *NarInfoReferenceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only NarInfoReference ID in the query. Returns a *NotSingularError when more than one NarInfoReference ID is found. Returns a *NotFoundError when no entities are found.

func (*NarInfoReferenceQuery) OnlyIDX

func (_q *NarInfoReferenceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NarInfoReferenceQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*NarInfoReferenceQuery) Order

Order specifies how the records should be ordered.

func (*NarInfoReferenceQuery) QueryNarinfo

func (_q *NarInfoReferenceQuery) QueryNarinfo() *NarInfoQuery

QueryNarinfo chains the current query on the "narinfo" edge.

func (*NarInfoReferenceQuery) Select

func (_q *NarInfoReferenceQuery) Select(fields ...string) *NarInfoReferenceSelect

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 {
	NarinfoID int `json:"narinfo_id,omitempty"`
}

client.NarInfoReference.Query().
	Select(narinforeference.FieldNarinfoID).
	Scan(ctx, &v)

func (*NarInfoReferenceQuery) Unique

func (_q *NarInfoReferenceQuery) Unique(unique bool) *NarInfoReferenceQuery

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 (*NarInfoReferenceQuery) Where

Where adds a new predicate for the NarInfoReferenceQuery builder.

func (*NarInfoReferenceQuery) WithNarinfo

func (_q *NarInfoReferenceQuery) WithNarinfo(opts ...func(*NarInfoQuery)) *NarInfoReferenceQuery

WithNarinfo tells the query-builder to eager-load the nodes that are connected to the "narinfo" edge. The optional arguments are used to configure the query builder of the edge.

type NarInfoReferenceSelect

type NarInfoReferenceSelect struct {
	*NarInfoReferenceQuery
	// contains filtered or unexported fields
}

NarInfoReferenceSelect is the builder for selecting fields of NarInfoReference entities.

func (*NarInfoReferenceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*NarInfoReferenceSelect) Bool

func (s *NarInfoReferenceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) BoolX

func (s *NarInfoReferenceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NarInfoReferenceSelect) Bools

func (s *NarInfoReferenceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) BoolsX

func (s *NarInfoReferenceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NarInfoReferenceSelect) Float64

func (s *NarInfoReferenceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) Float64X

func (s *NarInfoReferenceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NarInfoReferenceSelect) Float64s

func (s *NarInfoReferenceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) Float64sX

func (s *NarInfoReferenceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NarInfoReferenceSelect) Int

func (s *NarInfoReferenceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) IntX

func (s *NarInfoReferenceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NarInfoReferenceSelect) Ints

func (s *NarInfoReferenceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) IntsX

func (s *NarInfoReferenceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NarInfoReferenceSelect) Scan

func (_s *NarInfoReferenceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NarInfoReferenceSelect) ScanX

func (s *NarInfoReferenceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NarInfoReferenceSelect) String

func (s *NarInfoReferenceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) StringX

func (s *NarInfoReferenceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NarInfoReferenceSelect) Strings

func (s *NarInfoReferenceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NarInfoReferenceSelect) StringsX

func (s *NarInfoReferenceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NarInfoReferenceUpdate

type NarInfoReferenceUpdate struct {
	// contains filtered or unexported fields
}

NarInfoReferenceUpdate is the builder for updating NarInfoReference entities.

func (*NarInfoReferenceUpdate) ClearNarinfo

func (_u *NarInfoReferenceUpdate) ClearNarinfo() *NarInfoReferenceUpdate

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoReferenceUpdate) Exec

Exec executes the query.

func (*NarInfoReferenceUpdate) ExecX

func (_u *NarInfoReferenceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceUpdate) Mutation

Mutation returns the NarInfoReferenceMutation object of the builder.

func (*NarInfoReferenceUpdate) Save

func (_u *NarInfoReferenceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NarInfoReferenceUpdate) SaveX

func (_u *NarInfoReferenceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NarInfoReferenceUpdate) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoReferenceUpdate) SetNarinfoID

func (_u *NarInfoReferenceUpdate) SetNarinfoID(v int) *NarInfoReferenceUpdate

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoReferenceUpdate) SetNillableNarinfoID

func (_u *NarInfoReferenceUpdate) SetNillableNarinfoID(v *int) *NarInfoReferenceUpdate

SetNillableNarinfoID sets the "narinfo_id" field if the given value is not nil.

func (*NarInfoReferenceUpdate) SetNillableReference

func (_u *NarInfoReferenceUpdate) SetNillableReference(v *string) *NarInfoReferenceUpdate

SetNillableReference sets the "reference" field if the given value is not nil.

func (*NarInfoReferenceUpdate) SetReference

SetReference sets the "reference" field.

func (*NarInfoReferenceUpdate) Where

Where appends a list predicates to the NarInfoReferenceUpdate builder.

type NarInfoReferenceUpdateOne

type NarInfoReferenceUpdateOne struct {
	// contains filtered or unexported fields
}

NarInfoReferenceUpdateOne is the builder for updating a single NarInfoReference entity.

func (*NarInfoReferenceUpdateOne) ClearNarinfo

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoReferenceUpdateOne) Exec

Exec executes the query on the entity.

func (*NarInfoReferenceUpdateOne) ExecX

func (_u *NarInfoReferenceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceUpdateOne) Mutation

Mutation returns the NarInfoReferenceMutation object of the builder.

func (*NarInfoReferenceUpdateOne) Save

Save executes the query and returns the updated NarInfoReference entity.

func (*NarInfoReferenceUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*NarInfoReferenceUpdateOne) Select

func (_u *NarInfoReferenceUpdateOne) Select(field string, fields ...string) *NarInfoReferenceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NarInfoReferenceUpdateOne) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoReferenceUpdateOne) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoReferenceUpdateOne) SetNillableNarinfoID

func (_u *NarInfoReferenceUpdateOne) SetNillableNarinfoID(v *int) *NarInfoReferenceUpdateOne

SetNillableNarinfoID sets the "narinfo_id" field if the given value is not nil.

func (*NarInfoReferenceUpdateOne) SetNillableReference

func (_u *NarInfoReferenceUpdateOne) SetNillableReference(v *string) *NarInfoReferenceUpdateOne

SetNillableReference sets the "reference" field if the given value is not nil.

func (*NarInfoReferenceUpdateOne) SetReference

SetReference sets the "reference" field.

func (*NarInfoReferenceUpdateOne) Where

Where appends a list predicates to the NarInfoReferenceUpdate builder.

type NarInfoReferenceUpsert

type NarInfoReferenceUpsert struct {
	*sql.UpdateSet
}

NarInfoReferenceUpsert is the "OnConflict" setter.

func (*NarInfoReferenceUpsert) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoReferenceUpsert) SetReference

SetReference sets the "reference" field.

func (*NarInfoReferenceUpsert) UpdateNarinfoID

func (u *NarInfoReferenceUpsert) UpdateNarinfoID() *NarInfoReferenceUpsert

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoReferenceUpsert) UpdateReference

func (u *NarInfoReferenceUpsert) UpdateReference() *NarInfoReferenceUpsert

UpdateReference sets the "reference" field to the value that was provided on create.

type NarInfoReferenceUpsertBulk

type NarInfoReferenceUpsertBulk struct {
	// contains filtered or unexported fields
}

NarInfoReferenceUpsertBulk is the builder for "upsert"-ing a bulk of NarInfoReference nodes.

func (*NarInfoReferenceUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoReferenceUpsertBulk) Exec

Exec executes the query.

func (*NarInfoReferenceUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfoReference.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NarInfoReferenceUpsertBulk) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoReferenceUpsertBulk) SetReference

SetReference sets the "reference" field.

func (*NarInfoReferenceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the NarInfoReferenceCreateBulk.OnConflict documentation for more info.

func (*NarInfoReferenceUpsertBulk) UpdateNarinfoID

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoReferenceUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfoReference.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NarInfoReferenceUpsertBulk) UpdateReference

UpdateReference sets the "reference" field to the value that was provided on create.

type NarInfoReferenceUpsertOne

type NarInfoReferenceUpsertOne struct {
	// contains filtered or unexported fields
}

NarInfoReferenceUpsertOne is the builder for "upsert"-ing

one NarInfoReference node.

func (*NarInfoReferenceUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoReferenceUpsertOne) Exec

Exec executes the query.

func (*NarInfoReferenceUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoReferenceUpsertOne) ID

func (u *NarInfoReferenceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NarInfoReferenceUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*NarInfoReferenceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfoReference.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NarInfoReferenceUpsertOne) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoReferenceUpsertOne) SetReference

SetReference sets the "reference" field.

func (*NarInfoReferenceUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the NarInfoReferenceCreate.OnConflict documentation for more info.

func (*NarInfoReferenceUpsertOne) UpdateNarinfoID

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoReferenceUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfoReference.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NarInfoReferenceUpsertOne) UpdateReference

UpdateReference sets the "reference" field to the value that was provided on create.

type NarInfoReferences

type NarInfoReferences []*NarInfoReference

NarInfoReferences is a parsable slice of NarInfoReference.

type NarInfoSelect

type NarInfoSelect struct {
	*NarInfoQuery
	// contains filtered or unexported fields
}

NarInfoSelect is the builder for selecting fields of NarInfo entities.

func (*NarInfoSelect) Aggregate

func (_s *NarInfoSelect) Aggregate(fns ...AggregateFunc) *NarInfoSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NarInfoSelect) Bool

func (s *NarInfoSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) BoolX

func (s *NarInfoSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NarInfoSelect) Bools

func (s *NarInfoSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) BoolsX

func (s *NarInfoSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NarInfoSelect) Float64

func (s *NarInfoSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) Float64X

func (s *NarInfoSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NarInfoSelect) Float64s

func (s *NarInfoSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) Float64sX

func (s *NarInfoSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NarInfoSelect) Int

func (s *NarInfoSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) IntX

func (s *NarInfoSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NarInfoSelect) Ints

func (s *NarInfoSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) IntsX

func (s *NarInfoSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NarInfoSelect) Scan

func (_s *NarInfoSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NarInfoSelect) ScanX

func (s *NarInfoSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NarInfoSelect) String

func (s *NarInfoSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) StringX

func (s *NarInfoSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NarInfoSelect) Strings

func (s *NarInfoSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NarInfoSelect) StringsX

func (s *NarInfoSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NarInfoSignature

type NarInfoSignature struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// NarinfoID holds the value of the "narinfo_id" field.
	NarinfoID int `json:"narinfo_id,omitempty"`
	// Signature holds the value of the "signature" field.
	Signature string `json:"signature,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NarInfoSignatureQuery when eager-loading is set.
	Edges NarInfoSignatureEdges `json:"edges"`
	// contains filtered or unexported fields
}

NarInfoSignature is the model entity for the NarInfoSignature schema.

func (*NarInfoSignature) QueryNarinfo

func (_m *NarInfoSignature) QueryNarinfo() *NarInfoQuery

QueryNarinfo queries the "narinfo" edge of the NarInfoSignature entity.

func (*NarInfoSignature) String

func (_m *NarInfoSignature) String() string

String implements the fmt.Stringer.

func (*NarInfoSignature) Unwrap

func (_m *NarInfoSignature) Unwrap() *NarInfoSignature

Unwrap unwraps the NarInfoSignature 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 (*NarInfoSignature) Update

Update returns a builder for updating this NarInfoSignature. Note that you need to call NarInfoSignature.Unwrap() before calling this method if this NarInfoSignature was returned from a transaction, and the transaction was committed or rolled back.

func (*NarInfoSignature) Value

func (_m *NarInfoSignature) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the NarInfoSignature. This includes values selected through modifiers, order, etc.

type NarInfoSignatureClient

type NarInfoSignatureClient struct {
	// contains filtered or unexported fields
}

NarInfoSignatureClient is a client for the NarInfoSignature schema.

func NewNarInfoSignatureClient

func NewNarInfoSignatureClient(c config) *NarInfoSignatureClient

NewNarInfoSignatureClient returns a client for the NarInfoSignature from the given config.

func (*NarInfoSignatureClient) Create

Create returns a builder for creating a NarInfoSignature entity.

func (*NarInfoSignatureClient) CreateBulk

CreateBulk returns a builder for creating a bulk of NarInfoSignature entities.

func (*NarInfoSignatureClient) Delete

Delete returns a delete builder for NarInfoSignature.

func (*NarInfoSignatureClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NarInfoSignatureClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NarInfoSignatureClient) Get

Get returns a NarInfoSignature entity by its id.

func (*NarInfoSignatureClient) GetX

GetX is like Get, but panics if an error occurs.

func (*NarInfoSignatureClient) Hooks

func (c *NarInfoSignatureClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NarInfoSignatureClient) Intercept

func (c *NarInfoSignatureClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `narinfosignature.Intercept(f(g(h())))`.

func (*NarInfoSignatureClient) Interceptors

func (c *NarInfoSignatureClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NarInfoSignatureClient) MapCreateBulk

func (c *NarInfoSignatureClient) MapCreateBulk(slice any, setFunc func(*NarInfoSignatureCreate, int)) *NarInfoSignatureCreateBulk

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 (*NarInfoSignatureClient) Query

Query returns a query builder for NarInfoSignature.

func (*NarInfoSignatureClient) QueryNarinfo

QueryNarinfo queries the narinfo edge of a NarInfoSignature.

func (*NarInfoSignatureClient) Update

Update returns an update builder for NarInfoSignature.

func (*NarInfoSignatureClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*NarInfoSignatureClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*NarInfoSignatureClient) Use

func (c *NarInfoSignatureClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `narinfosignature.Hooks(f(g(h())))`.

type NarInfoSignatureCreate

type NarInfoSignatureCreate struct {
	// contains filtered or unexported fields
}

NarInfoSignatureCreate is the builder for creating a NarInfoSignature entity.

func (*NarInfoSignatureCreate) Exec

Exec executes the query.

func (*NarInfoSignatureCreate) ExecX

func (_c *NarInfoSignatureCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureCreate) Mutation

Mutation returns the NarInfoSignatureMutation object of the builder.

func (*NarInfoSignatureCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NarInfoSignature.Create().
	SetNarinfoID(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.NarInfoSignatureUpsert) {
		SetNarinfoID(v+v).
	}).
	Exec(ctx)

func (*NarInfoSignatureCreate) OnConflictColumns

func (_c *NarInfoSignatureCreate) OnConflictColumns(columns ...string) *NarInfoSignatureUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NarInfoSignature.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NarInfoSignatureCreate) Save

Save creates the NarInfoSignature in the database.

func (*NarInfoSignatureCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*NarInfoSignatureCreate) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoSignatureCreate) SetNarinfoID

func (_c *NarInfoSignatureCreate) SetNarinfoID(v int) *NarInfoSignatureCreate

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoSignatureCreate) SetSignature

SetSignature sets the "signature" field.

type NarInfoSignatureCreateBulk

type NarInfoSignatureCreateBulk struct {
	// contains filtered or unexported fields
}

NarInfoSignatureCreateBulk is the builder for creating many NarInfoSignature entities in bulk.

func (*NarInfoSignatureCreateBulk) Exec

Exec executes the query.

func (*NarInfoSignatureCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NarInfoSignature.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.NarInfoSignatureUpsert) {
		SetNarinfoID(v+v).
	}).
	Exec(ctx)

func (*NarInfoSignatureCreateBulk) OnConflictColumns

func (_c *NarInfoSignatureCreateBulk) OnConflictColumns(columns ...string) *NarInfoSignatureUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NarInfoSignature.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NarInfoSignatureCreateBulk) Save

Save creates the NarInfoSignature entities in the database.

func (*NarInfoSignatureCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type NarInfoSignatureDelete

type NarInfoSignatureDelete struct {
	// contains filtered or unexported fields
}

NarInfoSignatureDelete is the builder for deleting a NarInfoSignature entity.

func (*NarInfoSignatureDelete) Exec

func (_d *NarInfoSignatureDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NarInfoSignatureDelete) ExecX

func (_d *NarInfoSignatureDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureDelete) Where

Where appends a list predicates to the NarInfoSignatureDelete builder.

type NarInfoSignatureDeleteOne

type NarInfoSignatureDeleteOne struct {
	// contains filtered or unexported fields
}

NarInfoSignatureDeleteOne is the builder for deleting a single NarInfoSignature entity.

func (*NarInfoSignatureDeleteOne) Exec

Exec executes the deletion query.

func (*NarInfoSignatureDeleteOne) ExecX

func (_d *NarInfoSignatureDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureDeleteOne) Where

Where appends a list predicates to the NarInfoSignatureDelete builder.

type NarInfoSignatureEdges

type NarInfoSignatureEdges struct {
	// Narinfo holds the value of the narinfo edge.
	Narinfo *NarInfo `json:"narinfo,omitempty"`
	// contains filtered or unexported fields
}

NarInfoSignatureEdges holds the relations/edges for other nodes in the graph.

func (NarInfoSignatureEdges) NarinfoOrErr

func (e NarInfoSignatureEdges) NarinfoOrErr() (*NarInfo, error)

NarinfoOrErr returns the Narinfo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type NarInfoSignatureGroupBy

type NarInfoSignatureGroupBy struct {
	// contains filtered or unexported fields
}

NarInfoSignatureGroupBy is the group-by builder for NarInfoSignature entities.

func (*NarInfoSignatureGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*NarInfoSignatureGroupBy) Bool

func (s *NarInfoSignatureGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) BoolX

func (s *NarInfoSignatureGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) Bools

func (s *NarInfoSignatureGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) BoolsX

func (s *NarInfoSignatureGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) Float64

func (s *NarInfoSignatureGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) Float64X

func (s *NarInfoSignatureGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) Float64s

func (s *NarInfoSignatureGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) Float64sX

func (s *NarInfoSignatureGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) Int

func (s *NarInfoSignatureGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) IntX

func (s *NarInfoSignatureGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) Ints

func (s *NarInfoSignatureGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) IntsX

func (s *NarInfoSignatureGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) Scan

func (_g *NarInfoSignatureGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NarInfoSignatureGroupBy) ScanX

func (s *NarInfoSignatureGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) String

func (s *NarInfoSignatureGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) StringX

func (s *NarInfoSignatureGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NarInfoSignatureGroupBy) Strings

func (s *NarInfoSignatureGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureGroupBy) StringsX

func (s *NarInfoSignatureGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NarInfoSignatureMutation

type NarInfoSignatureMutation struct {
	// contains filtered or unexported fields
}

NarInfoSignatureMutation represents an operation that mutates the NarInfoSignature nodes in the graph.

func (*NarInfoSignatureMutation) AddField

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) AddedEdges

func (m *NarInfoSignatureMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NarInfoSignatureMutation) AddedField

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) AddedFields

func (m *NarInfoSignatureMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NarInfoSignatureMutation) AddedIDs

func (m *NarInfoSignatureMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NarInfoSignatureMutation) ClearEdge

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) ClearField

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) ClearNarinfo

func (m *NarInfoSignatureMutation) ClearNarinfo()

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoSignatureMutation) ClearedEdges

func (m *NarInfoSignatureMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NarInfoSignatureMutation) ClearedFields

func (m *NarInfoSignatureMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NarInfoSignatureMutation) Client

func (m NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) EdgeCleared

func (m *NarInfoSignatureMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NarInfoSignatureMutation) Field

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) FieldCleared

func (m *NarInfoSignatureMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NarInfoSignatureMutation) Fields

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) ID

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) NarinfoCleared

func (m *NarInfoSignatureMutation) NarinfoCleared() bool

NarinfoCleared reports if the "narinfo" edge to the NarInfo entity was cleared.

func (*NarInfoSignatureMutation) NarinfoID

func (m *NarInfoSignatureMutation) NarinfoID() (r int, exists bool)

NarinfoID returns the value of the "narinfo_id" field in the mutation.

func (*NarInfoSignatureMutation) NarinfoIDs

func (m *NarInfoSignatureMutation) NarinfoIDs() (ids []int)

NarinfoIDs returns the "narinfo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NarinfoID instead. It exists only for internal usage by the builders.

func (*NarInfoSignatureMutation) OldField

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) OldNarinfoID

func (m *NarInfoSignatureMutation) OldNarinfoID(ctx context.Context) (v int, err error)

OldNarinfoID returns the old "narinfo_id" field's value of the NarInfoSignature entity. If the NarInfoSignature 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 (*NarInfoSignatureMutation) OldSignature

func (m *NarInfoSignatureMutation) OldSignature(ctx context.Context) (v string, err error)

OldSignature returns the old "signature" field's value of the NarInfoSignature entity. If the NarInfoSignature 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 (*NarInfoSignatureMutation) Op

func (m *NarInfoSignatureMutation) Op() Op

Op returns the operation name.

func (*NarInfoSignatureMutation) RemovedEdges

func (m *NarInfoSignatureMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NarInfoSignatureMutation) RemovedIDs

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) ResetEdge

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) ResetField

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) ResetNarinfo

func (m *NarInfoSignatureMutation) ResetNarinfo()

ResetNarinfo resets all changes to the "narinfo" edge.

func (*NarInfoSignatureMutation) ResetNarinfoID

func (m *NarInfoSignatureMutation) ResetNarinfoID()

ResetNarinfoID resets all changes to the "narinfo_id" field.

func (*NarInfoSignatureMutation) ResetSignature

func (m *NarInfoSignatureMutation) ResetSignature()

ResetSignature resets all changes to the "signature" field.

func (*NarInfoSignatureMutation) SetField

func (m *NarInfoSignatureMutation) 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 (*NarInfoSignatureMutation) SetNarinfoID

func (m *NarInfoSignatureMutation) SetNarinfoID(i int)

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoSignatureMutation) SetOp

func (m *NarInfoSignatureMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NarInfoSignatureMutation) SetSignature

func (m *NarInfoSignatureMutation) SetSignature(s string)

SetSignature sets the "signature" field.

func (*NarInfoSignatureMutation) Signature

func (m *NarInfoSignatureMutation) Signature() (r string, exists bool)

Signature returns the value of the "signature" field in the mutation.

func (NarInfoSignatureMutation) Tx

func (m NarInfoSignatureMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NarInfoSignatureMutation) Type

func (m *NarInfoSignatureMutation) Type() string

Type returns the node type of this mutation (NarInfoSignature).

func (*NarInfoSignatureMutation) Where

Where appends a list predicates to the NarInfoSignatureMutation builder.

func (*NarInfoSignatureMutation) WhereP

func (m *NarInfoSignatureMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NarInfoSignatureMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NarInfoSignatureQuery

type NarInfoSignatureQuery struct {
	// contains filtered or unexported fields
}

NarInfoSignatureQuery is the builder for querying NarInfoSignature entities.

func (*NarInfoSignatureQuery) Aggregate

Aggregate returns a NarInfoSignatureSelect configured with the given aggregations.

func (*NarInfoSignatureQuery) All

All executes the query and returns a list of NarInfoSignatures.

func (*NarInfoSignatureQuery) AllX

AllX is like All, but panics if an error occurs.

func (*NarInfoSignatureQuery) Clone

Clone returns a duplicate of the NarInfoSignatureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NarInfoSignatureQuery) Count

func (_q *NarInfoSignatureQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NarInfoSignatureQuery) CountX

func (_q *NarInfoSignatureQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NarInfoSignatureQuery) Exist

func (_q *NarInfoSignatureQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NarInfoSignatureQuery) ExistX

func (_q *NarInfoSignatureQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NarInfoSignatureQuery) First

First returns the first NarInfoSignature entity from the query. Returns a *NotFoundError when no NarInfoSignature was found.

func (*NarInfoSignatureQuery) FirstID

func (_q *NarInfoSignatureQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first NarInfoSignature ID from the query. Returns a *NotFoundError when no NarInfoSignature ID was found.

func (*NarInfoSignatureQuery) FirstIDX

func (_q *NarInfoSignatureQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NarInfoSignatureQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*NarInfoSignatureQuery) GroupBy

func (_q *NarInfoSignatureQuery) GroupBy(field string, fields ...string) *NarInfoSignatureGroupBy

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 {
	NarinfoID int `json:"narinfo_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NarInfoSignature.Query().
	GroupBy(narinfosignature.FieldNarinfoID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NarInfoSignatureQuery) IDs

func (_q *NarInfoSignatureQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of NarInfoSignature IDs.

func (*NarInfoSignatureQuery) IDsX

func (_q *NarInfoSignatureQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NarInfoSignatureQuery) Limit

Limit the number of records to be returned by this query.

func (*NarInfoSignatureQuery) Offset

func (_q *NarInfoSignatureQuery) Offset(offset int) *NarInfoSignatureQuery

Offset to start from.

func (*NarInfoSignatureQuery) Only

Only returns a single NarInfoSignature entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NarInfoSignature entity is found. Returns a *NotFoundError when no NarInfoSignature entities are found.

func (*NarInfoSignatureQuery) OnlyID

func (_q *NarInfoSignatureQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only NarInfoSignature ID in the query. Returns a *NotSingularError when more than one NarInfoSignature ID is found. Returns a *NotFoundError when no entities are found.

func (*NarInfoSignatureQuery) OnlyIDX

func (_q *NarInfoSignatureQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NarInfoSignatureQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*NarInfoSignatureQuery) Order

Order specifies how the records should be ordered.

func (*NarInfoSignatureQuery) QueryNarinfo

func (_q *NarInfoSignatureQuery) QueryNarinfo() *NarInfoQuery

QueryNarinfo chains the current query on the "narinfo" edge.

func (*NarInfoSignatureQuery) Select

func (_q *NarInfoSignatureQuery) Select(fields ...string) *NarInfoSignatureSelect

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 {
	NarinfoID int `json:"narinfo_id,omitempty"`
}

client.NarInfoSignature.Query().
	Select(narinfosignature.FieldNarinfoID).
	Scan(ctx, &v)

func (*NarInfoSignatureQuery) Unique

func (_q *NarInfoSignatureQuery) Unique(unique bool) *NarInfoSignatureQuery

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 (*NarInfoSignatureQuery) Where

Where adds a new predicate for the NarInfoSignatureQuery builder.

func (*NarInfoSignatureQuery) WithNarinfo

func (_q *NarInfoSignatureQuery) WithNarinfo(opts ...func(*NarInfoQuery)) *NarInfoSignatureQuery

WithNarinfo tells the query-builder to eager-load the nodes that are connected to the "narinfo" edge. The optional arguments are used to configure the query builder of the edge.

type NarInfoSignatureSelect

type NarInfoSignatureSelect struct {
	*NarInfoSignatureQuery
	// contains filtered or unexported fields
}

NarInfoSignatureSelect is the builder for selecting fields of NarInfoSignature entities.

func (*NarInfoSignatureSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*NarInfoSignatureSelect) Bool

func (s *NarInfoSignatureSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) BoolX

func (s *NarInfoSignatureSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NarInfoSignatureSelect) Bools

func (s *NarInfoSignatureSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) BoolsX

func (s *NarInfoSignatureSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NarInfoSignatureSelect) Float64

func (s *NarInfoSignatureSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) Float64X

func (s *NarInfoSignatureSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NarInfoSignatureSelect) Float64s

func (s *NarInfoSignatureSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) Float64sX

func (s *NarInfoSignatureSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NarInfoSignatureSelect) Int

func (s *NarInfoSignatureSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) IntX

func (s *NarInfoSignatureSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NarInfoSignatureSelect) Ints

func (s *NarInfoSignatureSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) IntsX

func (s *NarInfoSignatureSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NarInfoSignatureSelect) Scan

func (_s *NarInfoSignatureSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NarInfoSignatureSelect) ScanX

func (s *NarInfoSignatureSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NarInfoSignatureSelect) String

func (s *NarInfoSignatureSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) StringX

func (s *NarInfoSignatureSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NarInfoSignatureSelect) Strings

func (s *NarInfoSignatureSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NarInfoSignatureSelect) StringsX

func (s *NarInfoSignatureSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NarInfoSignatureUpdate

type NarInfoSignatureUpdate struct {
	// contains filtered or unexported fields
}

NarInfoSignatureUpdate is the builder for updating NarInfoSignature entities.

func (*NarInfoSignatureUpdate) ClearNarinfo

func (_u *NarInfoSignatureUpdate) ClearNarinfo() *NarInfoSignatureUpdate

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoSignatureUpdate) Exec

Exec executes the query.

func (*NarInfoSignatureUpdate) ExecX

func (_u *NarInfoSignatureUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureUpdate) Mutation

Mutation returns the NarInfoSignatureMutation object of the builder.

func (*NarInfoSignatureUpdate) Save

func (_u *NarInfoSignatureUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NarInfoSignatureUpdate) SaveX

func (_u *NarInfoSignatureUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NarInfoSignatureUpdate) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoSignatureUpdate) SetNarinfoID

func (_u *NarInfoSignatureUpdate) SetNarinfoID(v int) *NarInfoSignatureUpdate

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoSignatureUpdate) SetNillableNarinfoID

func (_u *NarInfoSignatureUpdate) SetNillableNarinfoID(v *int) *NarInfoSignatureUpdate

SetNillableNarinfoID sets the "narinfo_id" field if the given value is not nil.

func (*NarInfoSignatureUpdate) SetNillableSignature

func (_u *NarInfoSignatureUpdate) SetNillableSignature(v *string) *NarInfoSignatureUpdate

SetNillableSignature sets the "signature" field if the given value is not nil.

func (*NarInfoSignatureUpdate) SetSignature

SetSignature sets the "signature" field.

func (*NarInfoSignatureUpdate) Where

Where appends a list predicates to the NarInfoSignatureUpdate builder.

type NarInfoSignatureUpdateOne

type NarInfoSignatureUpdateOne struct {
	// contains filtered or unexported fields
}

NarInfoSignatureUpdateOne is the builder for updating a single NarInfoSignature entity.

func (*NarInfoSignatureUpdateOne) ClearNarinfo

ClearNarinfo clears the "narinfo" edge to the NarInfo entity.

func (*NarInfoSignatureUpdateOne) Exec

Exec executes the query on the entity.

func (*NarInfoSignatureUpdateOne) ExecX

func (_u *NarInfoSignatureUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureUpdateOne) Mutation

Mutation returns the NarInfoSignatureMutation object of the builder.

func (*NarInfoSignatureUpdateOne) Save

Save executes the query and returns the updated NarInfoSignature entity.

func (*NarInfoSignatureUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*NarInfoSignatureUpdateOne) Select

func (_u *NarInfoSignatureUpdateOne) Select(field string, fields ...string) *NarInfoSignatureUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NarInfoSignatureUpdateOne) SetNarinfo

SetNarinfo sets the "narinfo" edge to the NarInfo entity.

func (*NarInfoSignatureUpdateOne) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoSignatureUpdateOne) SetNillableNarinfoID

func (_u *NarInfoSignatureUpdateOne) SetNillableNarinfoID(v *int) *NarInfoSignatureUpdateOne

SetNillableNarinfoID sets the "narinfo_id" field if the given value is not nil.

func (*NarInfoSignatureUpdateOne) SetNillableSignature

func (_u *NarInfoSignatureUpdateOne) SetNillableSignature(v *string) *NarInfoSignatureUpdateOne

SetNillableSignature sets the "signature" field if the given value is not nil.

func (*NarInfoSignatureUpdateOne) SetSignature

SetSignature sets the "signature" field.

func (*NarInfoSignatureUpdateOne) Where

Where appends a list predicates to the NarInfoSignatureUpdate builder.

type NarInfoSignatureUpsert

type NarInfoSignatureUpsert struct {
	*sql.UpdateSet
}

NarInfoSignatureUpsert is the "OnConflict" setter.

func (*NarInfoSignatureUpsert) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoSignatureUpsert) SetSignature

SetSignature sets the "signature" field.

func (*NarInfoSignatureUpsert) UpdateNarinfoID

func (u *NarInfoSignatureUpsert) UpdateNarinfoID() *NarInfoSignatureUpsert

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoSignatureUpsert) UpdateSignature

func (u *NarInfoSignatureUpsert) UpdateSignature() *NarInfoSignatureUpsert

UpdateSignature sets the "signature" field to the value that was provided on create.

type NarInfoSignatureUpsertBulk

type NarInfoSignatureUpsertBulk struct {
	// contains filtered or unexported fields
}

NarInfoSignatureUpsertBulk is the builder for "upsert"-ing a bulk of NarInfoSignature nodes.

func (*NarInfoSignatureUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoSignatureUpsertBulk) Exec

Exec executes the query.

func (*NarInfoSignatureUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfoSignature.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NarInfoSignatureUpsertBulk) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoSignatureUpsertBulk) SetSignature

SetSignature sets the "signature" field.

func (*NarInfoSignatureUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the NarInfoSignatureCreateBulk.OnConflict documentation for more info.

func (*NarInfoSignatureUpsertBulk) UpdateNarinfoID

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoSignatureUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfoSignature.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NarInfoSignatureUpsertBulk) UpdateSignature

UpdateSignature sets the "signature" field to the value that was provided on create.

type NarInfoSignatureUpsertOne

type NarInfoSignatureUpsertOne struct {
	// contains filtered or unexported fields
}

NarInfoSignatureUpsertOne is the builder for "upsert"-ing

one NarInfoSignature node.

func (*NarInfoSignatureUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoSignatureUpsertOne) Exec

Exec executes the query.

func (*NarInfoSignatureUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoSignatureUpsertOne) ID

func (u *NarInfoSignatureUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NarInfoSignatureUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*NarInfoSignatureUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfoSignature.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NarInfoSignatureUpsertOne) SetNarinfoID

SetNarinfoID sets the "narinfo_id" field.

func (*NarInfoSignatureUpsertOne) SetSignature

SetSignature sets the "signature" field.

func (*NarInfoSignatureUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the NarInfoSignatureCreate.OnConflict documentation for more info.

func (*NarInfoSignatureUpsertOne) UpdateNarinfoID

UpdateNarinfoID sets the "narinfo_id" field to the value that was provided on create.

func (*NarInfoSignatureUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfoSignature.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NarInfoSignatureUpsertOne) UpdateSignature

UpdateSignature sets the "signature" field to the value that was provided on create.

type NarInfoSignatures

type NarInfoSignatures []*NarInfoSignature

NarInfoSignatures is a parsable slice of NarInfoSignature.

type NarInfoUpdate

type NarInfoUpdate struct {
	// contains filtered or unexported fields
}

NarInfoUpdate is the builder for updating NarInfo entities.

func (*NarInfoUpdate) AddFileSize

func (_u *NarInfoUpdate) AddFileSize(v int64) *NarInfoUpdate

AddFileSize adds value to the "file_size" field.

func (*NarInfoUpdate) AddNarInfoNarFileIDs

func (_u *NarInfoUpdate) AddNarInfoNarFileIDs(ids ...int) *NarInfoUpdate

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarInfoUpdate) AddNarInfoNarFiles

func (_u *NarInfoUpdate) AddNarInfoNarFiles(v ...*NarInfoNarFile) *NarInfoUpdate

AddNarInfoNarFiles adds the "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarInfoUpdate) AddNarSize

func (_u *NarInfoUpdate) AddNarSize(v int64) *NarInfoUpdate

AddNarSize adds value to the "nar_size" field.

func (*NarInfoUpdate) AddReferenceIDs

func (_u *NarInfoUpdate) AddReferenceIDs(ids ...int) *NarInfoUpdate

AddReferenceIDs adds the "references" edge to the NarInfoReference entity by IDs.

func (*NarInfoUpdate) AddReferences

func (_u *NarInfoUpdate) AddReferences(v ...*NarInfoReference) *NarInfoUpdate

AddReferences adds the "references" edges to the NarInfoReference entity.

func (*NarInfoUpdate) AddSignatureIDs

func (_u *NarInfoUpdate) AddSignatureIDs(ids ...int) *NarInfoUpdate

AddSignatureIDs adds the "signatures" edge to the NarInfoSignature entity by IDs.

func (*NarInfoUpdate) AddSignatures

func (_u *NarInfoUpdate) AddSignatures(v ...*NarInfoSignature) *NarInfoUpdate

AddSignatures adds the "signatures" edges to the NarInfoSignature entity.

func (*NarInfoUpdate) ClearCa

func (_u *NarInfoUpdate) ClearCa() *NarInfoUpdate

ClearCa clears the value of the "ca" field.

func (*NarInfoUpdate) ClearCompression

func (_u *NarInfoUpdate) ClearCompression() *NarInfoUpdate

ClearCompression clears the value of the "compression" field.

func (*NarInfoUpdate) ClearDeriver

func (_u *NarInfoUpdate) ClearDeriver() *NarInfoUpdate

ClearDeriver clears the value of the "deriver" field.

func (*NarInfoUpdate) ClearFileHash

func (_u *NarInfoUpdate) ClearFileHash() *NarInfoUpdate

ClearFileHash clears the value of the "file_hash" field.

func (*NarInfoUpdate) ClearFileSize

func (_u *NarInfoUpdate) ClearFileSize() *NarInfoUpdate

ClearFileSize clears the value of the "file_size" field.

func (*NarInfoUpdate) ClearLastAccessedAt

func (_u *NarInfoUpdate) ClearLastAccessedAt() *NarInfoUpdate

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarInfoUpdate) ClearNarHash

func (_u *NarInfoUpdate) ClearNarHash() *NarInfoUpdate

ClearNarHash clears the value of the "nar_hash" field.

func (*NarInfoUpdate) ClearNarInfoNarFiles

func (_u *NarInfoUpdate) ClearNarInfoNarFiles() *NarInfoUpdate

ClearNarInfoNarFiles clears all "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarInfoUpdate) ClearNarSize

func (_u *NarInfoUpdate) ClearNarSize() *NarInfoUpdate

ClearNarSize clears the value of the "nar_size" field.

func (*NarInfoUpdate) ClearReferences

func (_u *NarInfoUpdate) ClearReferences() *NarInfoUpdate

ClearReferences clears all "references" edges to the NarInfoReference entity.

func (*NarInfoUpdate) ClearSignatures

func (_u *NarInfoUpdate) ClearSignatures() *NarInfoUpdate

ClearSignatures clears all "signatures" edges to the NarInfoSignature entity.

func (*NarInfoUpdate) ClearStorePath

func (_u *NarInfoUpdate) ClearStorePath() *NarInfoUpdate

ClearStorePath clears the value of the "store_path" field.

func (*NarInfoUpdate) ClearSystem

func (_u *NarInfoUpdate) ClearSystem() *NarInfoUpdate

ClearSystem clears the value of the "system" field.

func (*NarInfoUpdate) ClearURL

func (_u *NarInfoUpdate) ClearURL() *NarInfoUpdate

ClearURL clears the value of the "url" field.

func (*NarInfoUpdate) ClearUpdatedAt

func (_u *NarInfoUpdate) ClearUpdatedAt() *NarInfoUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarInfoUpdate) Exec

func (_u *NarInfoUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NarInfoUpdate) ExecX

func (_u *NarInfoUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoUpdate) Mutation

func (_u *NarInfoUpdate) Mutation() *NarInfoMutation

Mutation returns the NarInfoMutation object of the builder.

func (*NarInfoUpdate) RemoveNarInfoNarFileIDs

func (_u *NarInfoUpdate) RemoveNarInfoNarFileIDs(ids ...int) *NarInfoUpdate

RemoveNarInfoNarFileIDs removes the "nar_info_nar_files" edge to NarInfoNarFile entities by IDs.

func (*NarInfoUpdate) RemoveNarInfoNarFiles

func (_u *NarInfoUpdate) RemoveNarInfoNarFiles(v ...*NarInfoNarFile) *NarInfoUpdate

RemoveNarInfoNarFiles removes "nar_info_nar_files" edges to NarInfoNarFile entities.

func (*NarInfoUpdate) RemoveReferenceIDs

func (_u *NarInfoUpdate) RemoveReferenceIDs(ids ...int) *NarInfoUpdate

RemoveReferenceIDs removes the "references" edge to NarInfoReference entities by IDs.

func (*NarInfoUpdate) RemoveReferences

func (_u *NarInfoUpdate) RemoveReferences(v ...*NarInfoReference) *NarInfoUpdate

RemoveReferences removes "references" edges to NarInfoReference entities.

func (*NarInfoUpdate) RemoveSignatureIDs

func (_u *NarInfoUpdate) RemoveSignatureIDs(ids ...int) *NarInfoUpdate

RemoveSignatureIDs removes the "signatures" edge to NarInfoSignature entities by IDs.

func (*NarInfoUpdate) RemoveSignatures

func (_u *NarInfoUpdate) RemoveSignatures(v ...*NarInfoSignature) *NarInfoUpdate

RemoveSignatures removes "signatures" edges to NarInfoSignature entities.

func (*NarInfoUpdate) Save

func (_u *NarInfoUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NarInfoUpdate) SaveX

func (_u *NarInfoUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NarInfoUpdate) SetCa

func (_u *NarInfoUpdate) SetCa(v string) *NarInfoUpdate

SetCa sets the "ca" field.

func (*NarInfoUpdate) SetCompression

func (_u *NarInfoUpdate) SetCompression(v string) *NarInfoUpdate

SetCompression sets the "compression" field.

func (*NarInfoUpdate) SetDeriver

func (_u *NarInfoUpdate) SetDeriver(v string) *NarInfoUpdate

SetDeriver sets the "deriver" field.

func (*NarInfoUpdate) SetFileHash

func (_u *NarInfoUpdate) SetFileHash(v string) *NarInfoUpdate

SetFileHash sets the "file_hash" field.

func (*NarInfoUpdate) SetFileSize

func (_u *NarInfoUpdate) SetFileSize(v int64) *NarInfoUpdate

SetFileSize sets the "file_size" field.

func (*NarInfoUpdate) SetHash

func (_u *NarInfoUpdate) SetHash(v string) *NarInfoUpdate

SetHash sets the "hash" field.

func (*NarInfoUpdate) SetLastAccessedAt

func (_u *NarInfoUpdate) SetLastAccessedAt(v time.Time) *NarInfoUpdate

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarInfoUpdate) SetNarHash

func (_u *NarInfoUpdate) SetNarHash(v string) *NarInfoUpdate

SetNarHash sets the "nar_hash" field.

func (*NarInfoUpdate) SetNarSize

func (_u *NarInfoUpdate) SetNarSize(v int64) *NarInfoUpdate

SetNarSize sets the "nar_size" field.

func (*NarInfoUpdate) SetNillableCa

func (_u *NarInfoUpdate) SetNillableCa(v *string) *NarInfoUpdate

SetNillableCa sets the "ca" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableCompression

func (_u *NarInfoUpdate) SetNillableCompression(v *string) *NarInfoUpdate

SetNillableCompression sets the "compression" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableDeriver

func (_u *NarInfoUpdate) SetNillableDeriver(v *string) *NarInfoUpdate

SetNillableDeriver sets the "deriver" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableFileHash

func (_u *NarInfoUpdate) SetNillableFileHash(v *string) *NarInfoUpdate

SetNillableFileHash sets the "file_hash" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableFileSize

func (_u *NarInfoUpdate) SetNillableFileSize(v *int64) *NarInfoUpdate

SetNillableFileSize sets the "file_size" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableHash

func (_u *NarInfoUpdate) SetNillableHash(v *string) *NarInfoUpdate

SetNillableHash sets the "hash" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableLastAccessedAt

func (_u *NarInfoUpdate) SetNillableLastAccessedAt(v *time.Time) *NarInfoUpdate

SetNillableLastAccessedAt sets the "last_accessed_at" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableNarHash

func (_u *NarInfoUpdate) SetNillableNarHash(v *string) *NarInfoUpdate

SetNillableNarHash sets the "nar_hash" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableNarSize

func (_u *NarInfoUpdate) SetNillableNarSize(v *int64) *NarInfoUpdate

SetNillableNarSize sets the "nar_size" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableStorePath

func (_u *NarInfoUpdate) SetNillableStorePath(v *string) *NarInfoUpdate

SetNillableStorePath sets the "store_path" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableSystem

func (_u *NarInfoUpdate) SetNillableSystem(v *string) *NarInfoUpdate

SetNillableSystem sets the "system" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableURL

func (_u *NarInfoUpdate) SetNillableURL(v *string) *NarInfoUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*NarInfoUpdate) SetNillableUpdatedAt

func (_u *NarInfoUpdate) SetNillableUpdatedAt(v *time.Time) *NarInfoUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NarInfoUpdate) SetStorePath

func (_u *NarInfoUpdate) SetStorePath(v string) *NarInfoUpdate

SetStorePath sets the "store_path" field.

func (*NarInfoUpdate) SetSystem

func (_u *NarInfoUpdate) SetSystem(v string) *NarInfoUpdate

SetSystem sets the "system" field.

func (*NarInfoUpdate) SetURL

func (_u *NarInfoUpdate) SetURL(v string) *NarInfoUpdate

SetURL sets the "url" field.

func (*NarInfoUpdate) SetUpdatedAt

func (_u *NarInfoUpdate) SetUpdatedAt(v time.Time) *NarInfoUpdate

SetUpdatedAt sets the "updated_at" field.

func (*NarInfoUpdate) Where

func (_u *NarInfoUpdate) Where(ps ...predicate.NarInfo) *NarInfoUpdate

Where appends a list predicates to the NarInfoUpdate builder.

type NarInfoUpdateOne

type NarInfoUpdateOne struct {
	// contains filtered or unexported fields
}

NarInfoUpdateOne is the builder for updating a single NarInfo entity.

func (*NarInfoUpdateOne) AddFileSize

func (_u *NarInfoUpdateOne) AddFileSize(v int64) *NarInfoUpdateOne

AddFileSize adds value to the "file_size" field.

func (*NarInfoUpdateOne) AddNarInfoNarFileIDs

func (_u *NarInfoUpdateOne) AddNarInfoNarFileIDs(ids ...int) *NarInfoUpdateOne

AddNarInfoNarFileIDs adds the "nar_info_nar_files" edge to the NarInfoNarFile entity by IDs.

func (*NarInfoUpdateOne) AddNarInfoNarFiles

func (_u *NarInfoUpdateOne) AddNarInfoNarFiles(v ...*NarInfoNarFile) *NarInfoUpdateOne

AddNarInfoNarFiles adds the "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarInfoUpdateOne) AddNarSize

func (_u *NarInfoUpdateOne) AddNarSize(v int64) *NarInfoUpdateOne

AddNarSize adds value to the "nar_size" field.

func (*NarInfoUpdateOne) AddReferenceIDs

func (_u *NarInfoUpdateOne) AddReferenceIDs(ids ...int) *NarInfoUpdateOne

AddReferenceIDs adds the "references" edge to the NarInfoReference entity by IDs.

func (*NarInfoUpdateOne) AddReferences

func (_u *NarInfoUpdateOne) AddReferences(v ...*NarInfoReference) *NarInfoUpdateOne

AddReferences adds the "references" edges to the NarInfoReference entity.

func (*NarInfoUpdateOne) AddSignatureIDs

func (_u *NarInfoUpdateOne) AddSignatureIDs(ids ...int) *NarInfoUpdateOne

AddSignatureIDs adds the "signatures" edge to the NarInfoSignature entity by IDs.

func (*NarInfoUpdateOne) AddSignatures

func (_u *NarInfoUpdateOne) AddSignatures(v ...*NarInfoSignature) *NarInfoUpdateOne

AddSignatures adds the "signatures" edges to the NarInfoSignature entity.

func (*NarInfoUpdateOne) ClearCa

func (_u *NarInfoUpdateOne) ClearCa() *NarInfoUpdateOne

ClearCa clears the value of the "ca" field.

func (*NarInfoUpdateOne) ClearCompression

func (_u *NarInfoUpdateOne) ClearCompression() *NarInfoUpdateOne

ClearCompression clears the value of the "compression" field.

func (*NarInfoUpdateOne) ClearDeriver

func (_u *NarInfoUpdateOne) ClearDeriver() *NarInfoUpdateOne

ClearDeriver clears the value of the "deriver" field.

func (*NarInfoUpdateOne) ClearFileHash

func (_u *NarInfoUpdateOne) ClearFileHash() *NarInfoUpdateOne

ClearFileHash clears the value of the "file_hash" field.

func (*NarInfoUpdateOne) ClearFileSize

func (_u *NarInfoUpdateOne) ClearFileSize() *NarInfoUpdateOne

ClearFileSize clears the value of the "file_size" field.

func (*NarInfoUpdateOne) ClearLastAccessedAt

func (_u *NarInfoUpdateOne) ClearLastAccessedAt() *NarInfoUpdateOne

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarInfoUpdateOne) ClearNarHash

func (_u *NarInfoUpdateOne) ClearNarHash() *NarInfoUpdateOne

ClearNarHash clears the value of the "nar_hash" field.

func (*NarInfoUpdateOne) ClearNarInfoNarFiles

func (_u *NarInfoUpdateOne) ClearNarInfoNarFiles() *NarInfoUpdateOne

ClearNarInfoNarFiles clears all "nar_info_nar_files" edges to the NarInfoNarFile entity.

func (*NarInfoUpdateOne) ClearNarSize

func (_u *NarInfoUpdateOne) ClearNarSize() *NarInfoUpdateOne

ClearNarSize clears the value of the "nar_size" field.

func (*NarInfoUpdateOne) ClearReferences

func (_u *NarInfoUpdateOne) ClearReferences() *NarInfoUpdateOne

ClearReferences clears all "references" edges to the NarInfoReference entity.

func (*NarInfoUpdateOne) ClearSignatures

func (_u *NarInfoUpdateOne) ClearSignatures() *NarInfoUpdateOne

ClearSignatures clears all "signatures" edges to the NarInfoSignature entity.

func (*NarInfoUpdateOne) ClearStorePath

func (_u *NarInfoUpdateOne) ClearStorePath() *NarInfoUpdateOne

ClearStorePath clears the value of the "store_path" field.

func (*NarInfoUpdateOne) ClearSystem

func (_u *NarInfoUpdateOne) ClearSystem() *NarInfoUpdateOne

ClearSystem clears the value of the "system" field.

func (*NarInfoUpdateOne) ClearURL

func (_u *NarInfoUpdateOne) ClearURL() *NarInfoUpdateOne

ClearURL clears the value of the "url" field.

func (*NarInfoUpdateOne) ClearUpdatedAt

func (_u *NarInfoUpdateOne) ClearUpdatedAt() *NarInfoUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarInfoUpdateOne) Exec

func (_u *NarInfoUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NarInfoUpdateOne) ExecX

func (_u *NarInfoUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoUpdateOne) Mutation

func (_u *NarInfoUpdateOne) Mutation() *NarInfoMutation

Mutation returns the NarInfoMutation object of the builder.

func (*NarInfoUpdateOne) RemoveNarInfoNarFileIDs

func (_u *NarInfoUpdateOne) RemoveNarInfoNarFileIDs(ids ...int) *NarInfoUpdateOne

RemoveNarInfoNarFileIDs removes the "nar_info_nar_files" edge to NarInfoNarFile entities by IDs.

func (*NarInfoUpdateOne) RemoveNarInfoNarFiles

func (_u *NarInfoUpdateOne) RemoveNarInfoNarFiles(v ...*NarInfoNarFile) *NarInfoUpdateOne

RemoveNarInfoNarFiles removes "nar_info_nar_files" edges to NarInfoNarFile entities.

func (*NarInfoUpdateOne) RemoveReferenceIDs

func (_u *NarInfoUpdateOne) RemoveReferenceIDs(ids ...int) *NarInfoUpdateOne

RemoveReferenceIDs removes the "references" edge to NarInfoReference entities by IDs.

func (*NarInfoUpdateOne) RemoveReferences

func (_u *NarInfoUpdateOne) RemoveReferences(v ...*NarInfoReference) *NarInfoUpdateOne

RemoveReferences removes "references" edges to NarInfoReference entities.

func (*NarInfoUpdateOne) RemoveSignatureIDs

func (_u *NarInfoUpdateOne) RemoveSignatureIDs(ids ...int) *NarInfoUpdateOne

RemoveSignatureIDs removes the "signatures" edge to NarInfoSignature entities by IDs.

func (*NarInfoUpdateOne) RemoveSignatures

func (_u *NarInfoUpdateOne) RemoveSignatures(v ...*NarInfoSignature) *NarInfoUpdateOne

RemoveSignatures removes "signatures" edges to NarInfoSignature entities.

func (*NarInfoUpdateOne) Save

func (_u *NarInfoUpdateOne) Save(ctx context.Context) (*NarInfo, error)

Save executes the query and returns the updated NarInfo entity.

func (*NarInfoUpdateOne) SaveX

func (_u *NarInfoUpdateOne) SaveX(ctx context.Context) *NarInfo

SaveX is like Save, but panics if an error occurs.

func (*NarInfoUpdateOne) Select

func (_u *NarInfoUpdateOne) Select(field string, fields ...string) *NarInfoUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NarInfoUpdateOne) SetCa

SetCa sets the "ca" field.

func (*NarInfoUpdateOne) SetCompression

func (_u *NarInfoUpdateOne) SetCompression(v string) *NarInfoUpdateOne

SetCompression sets the "compression" field.

func (*NarInfoUpdateOne) SetDeriver

func (_u *NarInfoUpdateOne) SetDeriver(v string) *NarInfoUpdateOne

SetDeriver sets the "deriver" field.

func (*NarInfoUpdateOne) SetFileHash

func (_u *NarInfoUpdateOne) SetFileHash(v string) *NarInfoUpdateOne

SetFileHash sets the "file_hash" field.

func (*NarInfoUpdateOne) SetFileSize

func (_u *NarInfoUpdateOne) SetFileSize(v int64) *NarInfoUpdateOne

SetFileSize sets the "file_size" field.

func (*NarInfoUpdateOne) SetHash

func (_u *NarInfoUpdateOne) SetHash(v string) *NarInfoUpdateOne

SetHash sets the "hash" field.

func (*NarInfoUpdateOne) SetLastAccessedAt

func (_u *NarInfoUpdateOne) SetLastAccessedAt(v time.Time) *NarInfoUpdateOne

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarInfoUpdateOne) SetNarHash

func (_u *NarInfoUpdateOne) SetNarHash(v string) *NarInfoUpdateOne

SetNarHash sets the "nar_hash" field.

func (*NarInfoUpdateOne) SetNarSize

func (_u *NarInfoUpdateOne) SetNarSize(v int64) *NarInfoUpdateOne

SetNarSize sets the "nar_size" field.

func (*NarInfoUpdateOne) SetNillableCa

func (_u *NarInfoUpdateOne) SetNillableCa(v *string) *NarInfoUpdateOne

SetNillableCa sets the "ca" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableCompression

func (_u *NarInfoUpdateOne) SetNillableCompression(v *string) *NarInfoUpdateOne

SetNillableCompression sets the "compression" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableDeriver

func (_u *NarInfoUpdateOne) SetNillableDeriver(v *string) *NarInfoUpdateOne

SetNillableDeriver sets the "deriver" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableFileHash

func (_u *NarInfoUpdateOne) SetNillableFileHash(v *string) *NarInfoUpdateOne

SetNillableFileHash sets the "file_hash" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableFileSize

func (_u *NarInfoUpdateOne) SetNillableFileSize(v *int64) *NarInfoUpdateOne

SetNillableFileSize sets the "file_size" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableHash

func (_u *NarInfoUpdateOne) SetNillableHash(v *string) *NarInfoUpdateOne

SetNillableHash sets the "hash" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableLastAccessedAt

func (_u *NarInfoUpdateOne) SetNillableLastAccessedAt(v *time.Time) *NarInfoUpdateOne

SetNillableLastAccessedAt sets the "last_accessed_at" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableNarHash

func (_u *NarInfoUpdateOne) SetNillableNarHash(v *string) *NarInfoUpdateOne

SetNillableNarHash sets the "nar_hash" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableNarSize

func (_u *NarInfoUpdateOne) SetNillableNarSize(v *int64) *NarInfoUpdateOne

SetNillableNarSize sets the "nar_size" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableStorePath

func (_u *NarInfoUpdateOne) SetNillableStorePath(v *string) *NarInfoUpdateOne

SetNillableStorePath sets the "store_path" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableSystem

func (_u *NarInfoUpdateOne) SetNillableSystem(v *string) *NarInfoUpdateOne

SetNillableSystem sets the "system" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableURL

func (_u *NarInfoUpdateOne) SetNillableURL(v *string) *NarInfoUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*NarInfoUpdateOne) SetNillableUpdatedAt

func (_u *NarInfoUpdateOne) SetNillableUpdatedAt(v *time.Time) *NarInfoUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NarInfoUpdateOne) SetStorePath

func (_u *NarInfoUpdateOne) SetStorePath(v string) *NarInfoUpdateOne

SetStorePath sets the "store_path" field.

func (*NarInfoUpdateOne) SetSystem

func (_u *NarInfoUpdateOne) SetSystem(v string) *NarInfoUpdateOne

SetSystem sets the "system" field.

func (*NarInfoUpdateOne) SetURL

func (_u *NarInfoUpdateOne) SetURL(v string) *NarInfoUpdateOne

SetURL sets the "url" field.

func (*NarInfoUpdateOne) SetUpdatedAt

func (_u *NarInfoUpdateOne) SetUpdatedAt(v time.Time) *NarInfoUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*NarInfoUpdateOne) Where

Where appends a list predicates to the NarInfoUpdate builder.

type NarInfoUpsert

type NarInfoUpsert struct {
	*sql.UpdateSet
}

NarInfoUpsert is the "OnConflict" setter.

func (*NarInfoUpsert) AddFileSize

func (u *NarInfoUpsert) AddFileSize(v int64) *NarInfoUpsert

AddFileSize adds v to the "file_size" field.

func (*NarInfoUpsert) AddNarSize

func (u *NarInfoUpsert) AddNarSize(v int64) *NarInfoUpsert

AddNarSize adds v to the "nar_size" field.

func (*NarInfoUpsert) ClearCa

func (u *NarInfoUpsert) ClearCa() *NarInfoUpsert

ClearCa clears the value of the "ca" field.

func (*NarInfoUpsert) ClearCompression

func (u *NarInfoUpsert) ClearCompression() *NarInfoUpsert

ClearCompression clears the value of the "compression" field.

func (*NarInfoUpsert) ClearDeriver

func (u *NarInfoUpsert) ClearDeriver() *NarInfoUpsert

ClearDeriver clears the value of the "deriver" field.

func (*NarInfoUpsert) ClearFileHash

func (u *NarInfoUpsert) ClearFileHash() *NarInfoUpsert

ClearFileHash clears the value of the "file_hash" field.

func (*NarInfoUpsert) ClearFileSize

func (u *NarInfoUpsert) ClearFileSize() *NarInfoUpsert

ClearFileSize clears the value of the "file_size" field.

func (*NarInfoUpsert) ClearLastAccessedAt

func (u *NarInfoUpsert) ClearLastAccessedAt() *NarInfoUpsert

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarInfoUpsert) ClearNarHash

func (u *NarInfoUpsert) ClearNarHash() *NarInfoUpsert

ClearNarHash clears the value of the "nar_hash" field.

func (*NarInfoUpsert) ClearNarSize

func (u *NarInfoUpsert) ClearNarSize() *NarInfoUpsert

ClearNarSize clears the value of the "nar_size" field.

func (*NarInfoUpsert) ClearStorePath

func (u *NarInfoUpsert) ClearStorePath() *NarInfoUpsert

ClearStorePath clears the value of the "store_path" field.

func (*NarInfoUpsert) ClearSystem

func (u *NarInfoUpsert) ClearSystem() *NarInfoUpsert

ClearSystem clears the value of the "system" field.

func (*NarInfoUpsert) ClearURL

func (u *NarInfoUpsert) ClearURL() *NarInfoUpsert

ClearURL clears the value of the "url" field.

func (*NarInfoUpsert) ClearUpdatedAt

func (u *NarInfoUpsert) ClearUpdatedAt() *NarInfoUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarInfoUpsert) SetCa

func (u *NarInfoUpsert) SetCa(v string) *NarInfoUpsert

SetCa sets the "ca" field.

func (*NarInfoUpsert) SetCompression

func (u *NarInfoUpsert) SetCompression(v string) *NarInfoUpsert

SetCompression sets the "compression" field.

func (*NarInfoUpsert) SetDeriver

func (u *NarInfoUpsert) SetDeriver(v string) *NarInfoUpsert

SetDeriver sets the "deriver" field.

func (*NarInfoUpsert) SetFileHash

func (u *NarInfoUpsert) SetFileHash(v string) *NarInfoUpsert

SetFileHash sets the "file_hash" field.

func (*NarInfoUpsert) SetFileSize

func (u *NarInfoUpsert) SetFileSize(v int64) *NarInfoUpsert

SetFileSize sets the "file_size" field.

func (*NarInfoUpsert) SetHash

func (u *NarInfoUpsert) SetHash(v string) *NarInfoUpsert

SetHash sets the "hash" field.

func (*NarInfoUpsert) SetLastAccessedAt

func (u *NarInfoUpsert) SetLastAccessedAt(v time.Time) *NarInfoUpsert

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarInfoUpsert) SetNarHash

func (u *NarInfoUpsert) SetNarHash(v string) *NarInfoUpsert

SetNarHash sets the "nar_hash" field.

func (*NarInfoUpsert) SetNarSize

func (u *NarInfoUpsert) SetNarSize(v int64) *NarInfoUpsert

SetNarSize sets the "nar_size" field.

func (*NarInfoUpsert) SetStorePath

func (u *NarInfoUpsert) SetStorePath(v string) *NarInfoUpsert

SetStorePath sets the "store_path" field.

func (*NarInfoUpsert) SetSystem

func (u *NarInfoUpsert) SetSystem(v string) *NarInfoUpsert

SetSystem sets the "system" field.

func (*NarInfoUpsert) SetURL

func (u *NarInfoUpsert) SetURL(v string) *NarInfoUpsert

SetURL sets the "url" field.

func (*NarInfoUpsert) SetUpdatedAt

func (u *NarInfoUpsert) SetUpdatedAt(v time.Time) *NarInfoUpsert

SetUpdatedAt sets the "updated_at" field.

func (*NarInfoUpsert) UpdateCa

func (u *NarInfoUpsert) UpdateCa() *NarInfoUpsert

UpdateCa sets the "ca" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateCompression

func (u *NarInfoUpsert) UpdateCompression() *NarInfoUpsert

UpdateCompression sets the "compression" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateDeriver

func (u *NarInfoUpsert) UpdateDeriver() *NarInfoUpsert

UpdateDeriver sets the "deriver" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateFileHash

func (u *NarInfoUpsert) UpdateFileHash() *NarInfoUpsert

UpdateFileHash sets the "file_hash" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateFileSize

func (u *NarInfoUpsert) UpdateFileSize() *NarInfoUpsert

UpdateFileSize sets the "file_size" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateHash

func (u *NarInfoUpsert) UpdateHash() *NarInfoUpsert

UpdateHash sets the "hash" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateLastAccessedAt

func (u *NarInfoUpsert) UpdateLastAccessedAt() *NarInfoUpsert

UpdateLastAccessedAt sets the "last_accessed_at" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateNarHash

func (u *NarInfoUpsert) UpdateNarHash() *NarInfoUpsert

UpdateNarHash sets the "nar_hash" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateNarSize

func (u *NarInfoUpsert) UpdateNarSize() *NarInfoUpsert

UpdateNarSize sets the "nar_size" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateStorePath

func (u *NarInfoUpsert) UpdateStorePath() *NarInfoUpsert

UpdateStorePath sets the "store_path" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateSystem

func (u *NarInfoUpsert) UpdateSystem() *NarInfoUpsert

UpdateSystem sets the "system" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateURL

func (u *NarInfoUpsert) UpdateURL() *NarInfoUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*NarInfoUpsert) UpdateUpdatedAt

func (u *NarInfoUpsert) UpdateUpdatedAt() *NarInfoUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NarInfoUpsertBulk

type NarInfoUpsertBulk struct {
	// contains filtered or unexported fields
}

NarInfoUpsertBulk is the builder for "upsert"-ing a bulk of NarInfo nodes.

func (*NarInfoUpsertBulk) AddFileSize

func (u *NarInfoUpsertBulk) AddFileSize(v int64) *NarInfoUpsertBulk

AddFileSize adds v to the "file_size" field.

func (*NarInfoUpsertBulk) AddNarSize

func (u *NarInfoUpsertBulk) AddNarSize(v int64) *NarInfoUpsertBulk

AddNarSize adds v to the "nar_size" field.

func (*NarInfoUpsertBulk) ClearCa

func (u *NarInfoUpsertBulk) ClearCa() *NarInfoUpsertBulk

ClearCa clears the value of the "ca" field.

func (*NarInfoUpsertBulk) ClearCompression

func (u *NarInfoUpsertBulk) ClearCompression() *NarInfoUpsertBulk

ClearCompression clears the value of the "compression" field.

func (*NarInfoUpsertBulk) ClearDeriver

func (u *NarInfoUpsertBulk) ClearDeriver() *NarInfoUpsertBulk

ClearDeriver clears the value of the "deriver" field.

func (*NarInfoUpsertBulk) ClearFileHash

func (u *NarInfoUpsertBulk) ClearFileHash() *NarInfoUpsertBulk

ClearFileHash clears the value of the "file_hash" field.

func (*NarInfoUpsertBulk) ClearFileSize

func (u *NarInfoUpsertBulk) ClearFileSize() *NarInfoUpsertBulk

ClearFileSize clears the value of the "file_size" field.

func (*NarInfoUpsertBulk) ClearLastAccessedAt

func (u *NarInfoUpsertBulk) ClearLastAccessedAt() *NarInfoUpsertBulk

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarInfoUpsertBulk) ClearNarHash

func (u *NarInfoUpsertBulk) ClearNarHash() *NarInfoUpsertBulk

ClearNarHash clears the value of the "nar_hash" field.

func (*NarInfoUpsertBulk) ClearNarSize

func (u *NarInfoUpsertBulk) ClearNarSize() *NarInfoUpsertBulk

ClearNarSize clears the value of the "nar_size" field.

func (*NarInfoUpsertBulk) ClearStorePath

func (u *NarInfoUpsertBulk) ClearStorePath() *NarInfoUpsertBulk

ClearStorePath clears the value of the "store_path" field.

func (*NarInfoUpsertBulk) ClearSystem

func (u *NarInfoUpsertBulk) ClearSystem() *NarInfoUpsertBulk

ClearSystem clears the value of the "system" field.

func (*NarInfoUpsertBulk) ClearURL

func (u *NarInfoUpsertBulk) ClearURL() *NarInfoUpsertBulk

ClearURL clears the value of the "url" field.

func (*NarInfoUpsertBulk) ClearUpdatedAt

func (u *NarInfoUpsertBulk) ClearUpdatedAt() *NarInfoUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarInfoUpsertBulk) DoNothing

func (u *NarInfoUpsertBulk) DoNothing() *NarInfoUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoUpsertBulk) Exec

func (u *NarInfoUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NarInfoUpsertBulk) ExecX

func (u *NarInfoUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoUpsertBulk) Ignore

func (u *NarInfoUpsertBulk) Ignore() *NarInfoUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfo.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NarInfoUpsertBulk) SetCa

SetCa sets the "ca" field.

func (*NarInfoUpsertBulk) SetCompression

func (u *NarInfoUpsertBulk) SetCompression(v string) *NarInfoUpsertBulk

SetCompression sets the "compression" field.

func (*NarInfoUpsertBulk) SetDeriver

func (u *NarInfoUpsertBulk) SetDeriver(v string) *NarInfoUpsertBulk

SetDeriver sets the "deriver" field.

func (*NarInfoUpsertBulk) SetFileHash

func (u *NarInfoUpsertBulk) SetFileHash(v string) *NarInfoUpsertBulk

SetFileHash sets the "file_hash" field.

func (*NarInfoUpsertBulk) SetFileSize

func (u *NarInfoUpsertBulk) SetFileSize(v int64) *NarInfoUpsertBulk

SetFileSize sets the "file_size" field.

func (*NarInfoUpsertBulk) SetHash

SetHash sets the "hash" field.

func (*NarInfoUpsertBulk) SetLastAccessedAt

func (u *NarInfoUpsertBulk) SetLastAccessedAt(v time.Time) *NarInfoUpsertBulk

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarInfoUpsertBulk) SetNarHash

func (u *NarInfoUpsertBulk) SetNarHash(v string) *NarInfoUpsertBulk

SetNarHash sets the "nar_hash" field.

func (*NarInfoUpsertBulk) SetNarSize

func (u *NarInfoUpsertBulk) SetNarSize(v int64) *NarInfoUpsertBulk

SetNarSize sets the "nar_size" field.

func (*NarInfoUpsertBulk) SetStorePath

func (u *NarInfoUpsertBulk) SetStorePath(v string) *NarInfoUpsertBulk

SetStorePath sets the "store_path" field.

func (*NarInfoUpsertBulk) SetSystem

func (u *NarInfoUpsertBulk) SetSystem(v string) *NarInfoUpsertBulk

SetSystem sets the "system" field.

func (*NarInfoUpsertBulk) SetURL

SetURL sets the "url" field.

func (*NarInfoUpsertBulk) SetUpdatedAt

func (u *NarInfoUpsertBulk) SetUpdatedAt(v time.Time) *NarInfoUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*NarInfoUpsertBulk) Update

func (u *NarInfoUpsertBulk) Update(set func(*NarInfoUpsert)) *NarInfoUpsertBulk

Update allows overriding fields `UPDATE` values. See the NarInfoCreateBulk.OnConflict documentation for more info.

func (*NarInfoUpsertBulk) UpdateCa

func (u *NarInfoUpsertBulk) UpdateCa() *NarInfoUpsertBulk

UpdateCa sets the "ca" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateCompression

func (u *NarInfoUpsertBulk) UpdateCompression() *NarInfoUpsertBulk

UpdateCompression sets the "compression" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateDeriver

func (u *NarInfoUpsertBulk) UpdateDeriver() *NarInfoUpsertBulk

UpdateDeriver sets the "deriver" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateFileHash

func (u *NarInfoUpsertBulk) UpdateFileHash() *NarInfoUpsertBulk

UpdateFileHash sets the "file_hash" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateFileSize

func (u *NarInfoUpsertBulk) UpdateFileSize() *NarInfoUpsertBulk

UpdateFileSize sets the "file_size" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateHash

func (u *NarInfoUpsertBulk) UpdateHash() *NarInfoUpsertBulk

UpdateHash sets the "hash" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateLastAccessedAt

func (u *NarInfoUpsertBulk) UpdateLastAccessedAt() *NarInfoUpsertBulk

UpdateLastAccessedAt sets the "last_accessed_at" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateNarHash

func (u *NarInfoUpsertBulk) UpdateNarHash() *NarInfoUpsertBulk

UpdateNarHash sets the "nar_hash" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateNarSize

func (u *NarInfoUpsertBulk) UpdateNarSize() *NarInfoUpsertBulk

UpdateNarSize sets the "nar_size" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateNewValues

func (u *NarInfoUpsertBulk) UpdateNewValues() *NarInfoUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NarInfoUpsertBulk) UpdateStorePath

func (u *NarInfoUpsertBulk) UpdateStorePath() *NarInfoUpsertBulk

UpdateStorePath sets the "store_path" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateSystem

func (u *NarInfoUpsertBulk) UpdateSystem() *NarInfoUpsertBulk

UpdateSystem sets the "system" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateURL

func (u *NarInfoUpsertBulk) UpdateURL() *NarInfoUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*NarInfoUpsertBulk) UpdateUpdatedAt

func (u *NarInfoUpsertBulk) UpdateUpdatedAt() *NarInfoUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NarInfoUpsertOne

type NarInfoUpsertOne struct {
	// contains filtered or unexported fields
}

NarInfoUpsertOne is the builder for "upsert"-ing

one NarInfo node.

func (*NarInfoUpsertOne) AddFileSize

func (u *NarInfoUpsertOne) AddFileSize(v int64) *NarInfoUpsertOne

AddFileSize adds v to the "file_size" field.

func (*NarInfoUpsertOne) AddNarSize

func (u *NarInfoUpsertOne) AddNarSize(v int64) *NarInfoUpsertOne

AddNarSize adds v to the "nar_size" field.

func (*NarInfoUpsertOne) ClearCa

func (u *NarInfoUpsertOne) ClearCa() *NarInfoUpsertOne

ClearCa clears the value of the "ca" field.

func (*NarInfoUpsertOne) ClearCompression

func (u *NarInfoUpsertOne) ClearCompression() *NarInfoUpsertOne

ClearCompression clears the value of the "compression" field.

func (*NarInfoUpsertOne) ClearDeriver

func (u *NarInfoUpsertOne) ClearDeriver() *NarInfoUpsertOne

ClearDeriver clears the value of the "deriver" field.

func (*NarInfoUpsertOne) ClearFileHash

func (u *NarInfoUpsertOne) ClearFileHash() *NarInfoUpsertOne

ClearFileHash clears the value of the "file_hash" field.

func (*NarInfoUpsertOne) ClearFileSize

func (u *NarInfoUpsertOne) ClearFileSize() *NarInfoUpsertOne

ClearFileSize clears the value of the "file_size" field.

func (*NarInfoUpsertOne) ClearLastAccessedAt

func (u *NarInfoUpsertOne) ClearLastAccessedAt() *NarInfoUpsertOne

ClearLastAccessedAt clears the value of the "last_accessed_at" field.

func (*NarInfoUpsertOne) ClearNarHash

func (u *NarInfoUpsertOne) ClearNarHash() *NarInfoUpsertOne

ClearNarHash clears the value of the "nar_hash" field.

func (*NarInfoUpsertOne) ClearNarSize

func (u *NarInfoUpsertOne) ClearNarSize() *NarInfoUpsertOne

ClearNarSize clears the value of the "nar_size" field.

func (*NarInfoUpsertOne) ClearStorePath

func (u *NarInfoUpsertOne) ClearStorePath() *NarInfoUpsertOne

ClearStorePath clears the value of the "store_path" field.

func (*NarInfoUpsertOne) ClearSystem

func (u *NarInfoUpsertOne) ClearSystem() *NarInfoUpsertOne

ClearSystem clears the value of the "system" field.

func (*NarInfoUpsertOne) ClearURL

func (u *NarInfoUpsertOne) ClearURL() *NarInfoUpsertOne

ClearURL clears the value of the "url" field.

func (*NarInfoUpsertOne) ClearUpdatedAt

func (u *NarInfoUpsertOne) ClearUpdatedAt() *NarInfoUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NarInfoUpsertOne) DoNothing

func (u *NarInfoUpsertOne) DoNothing() *NarInfoUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NarInfoUpsertOne) Exec

func (u *NarInfoUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*NarInfoUpsertOne) ExecX

func (u *NarInfoUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NarInfoUpsertOne) ID

func (u *NarInfoUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NarInfoUpsertOne) IDX

func (u *NarInfoUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*NarInfoUpsertOne) Ignore

func (u *NarInfoUpsertOne) Ignore() *NarInfoUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NarInfo.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NarInfoUpsertOne) SetCa

SetCa sets the "ca" field.

func (*NarInfoUpsertOne) SetCompression

func (u *NarInfoUpsertOne) SetCompression(v string) *NarInfoUpsertOne

SetCompression sets the "compression" field.

func (*NarInfoUpsertOne) SetDeriver

func (u *NarInfoUpsertOne) SetDeriver(v string) *NarInfoUpsertOne

SetDeriver sets the "deriver" field.

func (*NarInfoUpsertOne) SetFileHash

func (u *NarInfoUpsertOne) SetFileHash(v string) *NarInfoUpsertOne

SetFileHash sets the "file_hash" field.

func (*NarInfoUpsertOne) SetFileSize

func (u *NarInfoUpsertOne) SetFileSize(v int64) *NarInfoUpsertOne

SetFileSize sets the "file_size" field.

func (*NarInfoUpsertOne) SetHash

func (u *NarInfoUpsertOne) SetHash(v string) *NarInfoUpsertOne

SetHash sets the "hash" field.

func (*NarInfoUpsertOne) SetLastAccessedAt

func (u *NarInfoUpsertOne) SetLastAccessedAt(v time.Time) *NarInfoUpsertOne

SetLastAccessedAt sets the "last_accessed_at" field.

func (*NarInfoUpsertOne) SetNarHash

func (u *NarInfoUpsertOne) SetNarHash(v string) *NarInfoUpsertOne

SetNarHash sets the "nar_hash" field.

func (*NarInfoUpsertOne) SetNarSize

func (u *NarInfoUpsertOne) SetNarSize(v int64) *NarInfoUpsertOne

SetNarSize sets the "nar_size" field.

func (*NarInfoUpsertOne) SetStorePath

func (u *NarInfoUpsertOne) SetStorePath(v string) *NarInfoUpsertOne

SetStorePath sets the "store_path" field.

func (*NarInfoUpsertOne) SetSystem

func (u *NarInfoUpsertOne) SetSystem(v string) *NarInfoUpsertOne

SetSystem sets the "system" field.

func (*NarInfoUpsertOne) SetURL

SetURL sets the "url" field.

func (*NarInfoUpsertOne) SetUpdatedAt

func (u *NarInfoUpsertOne) SetUpdatedAt(v time.Time) *NarInfoUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*NarInfoUpsertOne) Update

func (u *NarInfoUpsertOne) Update(set func(*NarInfoUpsert)) *NarInfoUpsertOne

Update allows overriding fields `UPDATE` values. See the NarInfoCreate.OnConflict documentation for more info.

func (*NarInfoUpsertOne) UpdateCa

func (u *NarInfoUpsertOne) UpdateCa() *NarInfoUpsertOne

UpdateCa sets the "ca" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateCompression

func (u *NarInfoUpsertOne) UpdateCompression() *NarInfoUpsertOne

UpdateCompression sets the "compression" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateDeriver

func (u *NarInfoUpsertOne) UpdateDeriver() *NarInfoUpsertOne

UpdateDeriver sets the "deriver" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateFileHash

func (u *NarInfoUpsertOne) UpdateFileHash() *NarInfoUpsertOne

UpdateFileHash sets the "file_hash" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateFileSize

func (u *NarInfoUpsertOne) UpdateFileSize() *NarInfoUpsertOne

UpdateFileSize sets the "file_size" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateHash

func (u *NarInfoUpsertOne) UpdateHash() *NarInfoUpsertOne

UpdateHash sets the "hash" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateLastAccessedAt

func (u *NarInfoUpsertOne) UpdateLastAccessedAt() *NarInfoUpsertOne

UpdateLastAccessedAt sets the "last_accessed_at" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateNarHash

func (u *NarInfoUpsertOne) UpdateNarHash() *NarInfoUpsertOne

UpdateNarHash sets the "nar_hash" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateNarSize

func (u *NarInfoUpsertOne) UpdateNarSize() *NarInfoUpsertOne

UpdateNarSize sets the "nar_size" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateNewValues

func (u *NarInfoUpsertOne) UpdateNewValues() *NarInfoUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NarInfo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NarInfoUpsertOne) UpdateStorePath

func (u *NarInfoUpsertOne) UpdateStorePath() *NarInfoUpsertOne

UpdateStorePath sets the "store_path" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateSystem

func (u *NarInfoUpsertOne) UpdateSystem() *NarInfoUpsertOne

UpdateSystem sets the "system" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateURL

func (u *NarInfoUpsertOne) UpdateURL() *NarInfoUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*NarInfoUpsertOne) UpdateUpdatedAt

func (u *NarInfoUpsertOne) UpdateUpdatedAt() *NarInfoUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NarInfos

type NarInfos []*NarInfo

NarInfos is a parsable slice of NarInfo.

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 PinnedClosure

type PinnedClosure struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	// Hash holds the value of the "hash" field.
	Hash string `json:"hash,omitempty"`
	// contains filtered or unexported fields
}

PinnedClosure is the model entity for the PinnedClosure schema.

func (*PinnedClosure) String

func (_m *PinnedClosure) String() string

String implements the fmt.Stringer.

func (*PinnedClosure) Unwrap

func (_m *PinnedClosure) Unwrap() *PinnedClosure

Unwrap unwraps the PinnedClosure 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 (*PinnedClosure) Update

func (_m *PinnedClosure) Update() *PinnedClosureUpdateOne

Update returns a builder for updating this PinnedClosure. Note that you need to call PinnedClosure.Unwrap() before calling this method if this PinnedClosure was returned from a transaction, and the transaction was committed or rolled back.

func (*PinnedClosure) Value

func (_m *PinnedClosure) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the PinnedClosure. This includes values selected through modifiers, order, etc.

type PinnedClosureClient

type PinnedClosureClient struct {
	// contains filtered or unexported fields
}

PinnedClosureClient is a client for the PinnedClosure schema.

func NewPinnedClosureClient

func NewPinnedClosureClient(c config) *PinnedClosureClient

NewPinnedClosureClient returns a client for the PinnedClosure from the given config.

func (*PinnedClosureClient) Create

Create returns a builder for creating a PinnedClosure entity.

func (*PinnedClosureClient) CreateBulk

CreateBulk returns a builder for creating a bulk of PinnedClosure entities.

func (*PinnedClosureClient) Delete

Delete returns a delete builder for PinnedClosure.

func (*PinnedClosureClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PinnedClosureClient) DeleteOneID

func (c *PinnedClosureClient) DeleteOneID(id int) *PinnedClosureDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PinnedClosureClient) Get

Get returns a PinnedClosure entity by its id.

func (*PinnedClosureClient) GetX

GetX is like Get, but panics if an error occurs.

func (*PinnedClosureClient) Hooks

func (c *PinnedClosureClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PinnedClosureClient) Intercept

func (c *PinnedClosureClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `pinnedclosure.Intercept(f(g(h())))`.

func (*PinnedClosureClient) Interceptors

func (c *PinnedClosureClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PinnedClosureClient) MapCreateBulk

func (c *PinnedClosureClient) MapCreateBulk(slice any, setFunc func(*PinnedClosureCreate, int)) *PinnedClosureCreateBulk

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 (*PinnedClosureClient) Query

Query returns a query builder for PinnedClosure.

func (*PinnedClosureClient) Update

Update returns an update builder for PinnedClosure.

func (*PinnedClosureClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PinnedClosureClient) UpdateOneID

func (c *PinnedClosureClient) UpdateOneID(id int) *PinnedClosureUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PinnedClosureClient) Use

func (c *PinnedClosureClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pinnedclosure.Hooks(f(g(h())))`.

type PinnedClosureCreate

type PinnedClosureCreate struct {
	// contains filtered or unexported fields
}

PinnedClosureCreate is the builder for creating a PinnedClosure entity.

func (*PinnedClosureCreate) Exec

func (_c *PinnedClosureCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PinnedClosureCreate) ExecX

func (_c *PinnedClosureCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureCreate) Mutation

Mutation returns the PinnedClosureMutation object of the builder.

func (*PinnedClosureCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PinnedClosure.Create().
	SetCreatedAt(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.PinnedClosureUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*PinnedClosureCreate) OnConflictColumns

func (_c *PinnedClosureCreate) OnConflictColumns(columns ...string) *PinnedClosureUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PinnedClosure.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PinnedClosureCreate) Save

Save creates the PinnedClosure in the database.

func (*PinnedClosureCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PinnedClosureCreate) SetCreatedAt

func (_c *PinnedClosureCreate) SetCreatedAt(v time.Time) *PinnedClosureCreate

SetCreatedAt sets the "created_at" field.

func (*PinnedClosureCreate) SetHash

SetHash sets the "hash" field.

func (*PinnedClosureCreate) SetNillableCreatedAt

func (_c *PinnedClosureCreate) SetNillableCreatedAt(v *time.Time) *PinnedClosureCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PinnedClosureCreate) SetNillableUpdatedAt

func (_c *PinnedClosureCreate) SetNillableUpdatedAt(v *time.Time) *PinnedClosureCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PinnedClosureCreate) SetUpdatedAt

func (_c *PinnedClosureCreate) SetUpdatedAt(v time.Time) *PinnedClosureCreate

SetUpdatedAt sets the "updated_at" field.

type PinnedClosureCreateBulk

type PinnedClosureCreateBulk struct {
	// contains filtered or unexported fields
}

PinnedClosureCreateBulk is the builder for creating many PinnedClosure entities in bulk.

func (*PinnedClosureCreateBulk) Exec

Exec executes the query.

func (*PinnedClosureCreateBulk) ExecX

func (_c *PinnedClosureCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PinnedClosure.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.PinnedClosureUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*PinnedClosureCreateBulk) OnConflictColumns

func (_c *PinnedClosureCreateBulk) OnConflictColumns(columns ...string) *PinnedClosureUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PinnedClosure.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PinnedClosureCreateBulk) Save

Save creates the PinnedClosure entities in the database.

func (*PinnedClosureCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type PinnedClosureDelete

type PinnedClosureDelete struct {
	// contains filtered or unexported fields
}

PinnedClosureDelete is the builder for deleting a PinnedClosure entity.

func (*PinnedClosureDelete) Exec

func (_d *PinnedClosureDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PinnedClosureDelete) ExecX

func (_d *PinnedClosureDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureDelete) Where

Where appends a list predicates to the PinnedClosureDelete builder.

type PinnedClosureDeleteOne

type PinnedClosureDeleteOne struct {
	// contains filtered or unexported fields
}

PinnedClosureDeleteOne is the builder for deleting a single PinnedClosure entity.

func (*PinnedClosureDeleteOne) Exec

Exec executes the deletion query.

func (*PinnedClosureDeleteOne) ExecX

func (_d *PinnedClosureDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureDeleteOne) Where

Where appends a list predicates to the PinnedClosureDelete builder.

type PinnedClosureGroupBy

type PinnedClosureGroupBy struct {
	// contains filtered or unexported fields
}

PinnedClosureGroupBy is the group-by builder for PinnedClosure entities.

func (*PinnedClosureGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*PinnedClosureGroupBy) Bool

func (s *PinnedClosureGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) BoolX

func (s *PinnedClosureGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PinnedClosureGroupBy) Bools

func (s *PinnedClosureGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) BoolsX

func (s *PinnedClosureGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PinnedClosureGroupBy) Float64

func (s *PinnedClosureGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) Float64X

func (s *PinnedClosureGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PinnedClosureGroupBy) Float64s

func (s *PinnedClosureGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) Float64sX

func (s *PinnedClosureGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PinnedClosureGroupBy) Int

func (s *PinnedClosureGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) IntX

func (s *PinnedClosureGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PinnedClosureGroupBy) Ints

func (s *PinnedClosureGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) IntsX

func (s *PinnedClosureGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PinnedClosureGroupBy) Scan

func (_g *PinnedClosureGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PinnedClosureGroupBy) ScanX

func (s *PinnedClosureGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PinnedClosureGroupBy) String

func (s *PinnedClosureGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) StringX

func (s *PinnedClosureGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PinnedClosureGroupBy) Strings

func (s *PinnedClosureGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PinnedClosureGroupBy) StringsX

func (s *PinnedClosureGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PinnedClosureMutation

type PinnedClosureMutation struct {
	// contains filtered or unexported fields
}

PinnedClosureMutation represents an operation that mutates the PinnedClosure nodes in the graph.

func (*PinnedClosureMutation) AddField

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) AddedEdges

func (m *PinnedClosureMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PinnedClosureMutation) AddedField

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) AddedFields

func (m *PinnedClosureMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PinnedClosureMutation) AddedIDs

func (m *PinnedClosureMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PinnedClosureMutation) ClearEdge

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) ClearField

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) ClearUpdatedAt

func (m *PinnedClosureMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PinnedClosureMutation) ClearedEdges

func (m *PinnedClosureMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PinnedClosureMutation) ClearedFields

func (m *PinnedClosureMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PinnedClosureMutation) Client

func (m PinnedClosureMutation) 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 (*PinnedClosureMutation) CreatedAt

func (m *PinnedClosureMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PinnedClosureMutation) EdgeCleared

func (m *PinnedClosureMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PinnedClosureMutation) Field

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) FieldCleared

func (m *PinnedClosureMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PinnedClosureMutation) Fields

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) Hash

func (m *PinnedClosureMutation) Hash() (r string, exists bool)

Hash returns the value of the "hash" field in the mutation.

func (*PinnedClosureMutation) ID

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) IDs

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) OldCreatedAt

func (m *PinnedClosureMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PinnedClosure entity. If the PinnedClosure 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 (*PinnedClosureMutation) OldField

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) OldHash

func (m *PinnedClosureMutation) OldHash(ctx context.Context) (v string, err error)

OldHash returns the old "hash" field's value of the PinnedClosure entity. If the PinnedClosure 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 (*PinnedClosureMutation) OldUpdatedAt

func (m *PinnedClosureMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the PinnedClosure entity. If the PinnedClosure 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 (*PinnedClosureMutation) Op

func (m *PinnedClosureMutation) Op() Op

Op returns the operation name.

func (*PinnedClosureMutation) RemovedEdges

func (m *PinnedClosureMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PinnedClosureMutation) RemovedIDs

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) ResetCreatedAt

func (m *PinnedClosureMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PinnedClosureMutation) ResetEdge

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) ResetField

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) ResetHash

func (m *PinnedClosureMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (*PinnedClosureMutation) ResetUpdatedAt

func (m *PinnedClosureMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PinnedClosureMutation) SetCreatedAt

func (m *PinnedClosureMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PinnedClosureMutation) SetField

func (m *PinnedClosureMutation) 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 (*PinnedClosureMutation) SetHash

func (m *PinnedClosureMutation) SetHash(s string)

SetHash sets the "hash" field.

func (*PinnedClosureMutation) SetOp

func (m *PinnedClosureMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PinnedClosureMutation) SetUpdatedAt

func (m *PinnedClosureMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (PinnedClosureMutation) Tx

func (m PinnedClosureMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PinnedClosureMutation) Type

func (m *PinnedClosureMutation) Type() string

Type returns the node type of this mutation (PinnedClosure).

func (*PinnedClosureMutation) UpdatedAt

func (m *PinnedClosureMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PinnedClosureMutation) UpdatedAtCleared

func (m *PinnedClosureMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*PinnedClosureMutation) Where

Where appends a list predicates to the PinnedClosureMutation builder.

func (*PinnedClosureMutation) WhereP

func (m *PinnedClosureMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PinnedClosureMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PinnedClosureQuery

type PinnedClosureQuery struct {
	// contains filtered or unexported fields
}

PinnedClosureQuery is the builder for querying PinnedClosure entities.

func (*PinnedClosureQuery) Aggregate

func (_q *PinnedClosureQuery) Aggregate(fns ...AggregateFunc) *PinnedClosureSelect

Aggregate returns a PinnedClosureSelect configured with the given aggregations.

func (*PinnedClosureQuery) All

All executes the query and returns a list of PinnedClosures.

func (*PinnedClosureQuery) AllX

AllX is like All, but panics if an error occurs.

func (*PinnedClosureQuery) Clone

Clone returns a duplicate of the PinnedClosureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PinnedClosureQuery) Count

func (_q *PinnedClosureQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PinnedClosureQuery) CountX

func (_q *PinnedClosureQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PinnedClosureQuery) Exist

func (_q *PinnedClosureQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PinnedClosureQuery) ExistX

func (_q *PinnedClosureQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PinnedClosureQuery) First

First returns the first PinnedClosure entity from the query. Returns a *NotFoundError when no PinnedClosure was found.

func (*PinnedClosureQuery) FirstID

func (_q *PinnedClosureQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first PinnedClosure ID from the query. Returns a *NotFoundError when no PinnedClosure ID was found.

func (*PinnedClosureQuery) FirstIDX

func (_q *PinnedClosureQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PinnedClosureQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*PinnedClosureQuery) GroupBy

func (_q *PinnedClosureQuery) GroupBy(field string, fields ...string) *PinnedClosureGroupBy

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PinnedClosure.Query().
	GroupBy(pinnedclosure.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PinnedClosureQuery) IDs

func (_q *PinnedClosureQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of PinnedClosure IDs.

func (*PinnedClosureQuery) IDsX

func (_q *PinnedClosureQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PinnedClosureQuery) Limit

func (_q *PinnedClosureQuery) Limit(limit int) *PinnedClosureQuery

Limit the number of records to be returned by this query.

func (*PinnedClosureQuery) Offset

func (_q *PinnedClosureQuery) Offset(offset int) *PinnedClosureQuery

Offset to start from.

func (*PinnedClosureQuery) Only

Only returns a single PinnedClosure entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PinnedClosure entity is found. Returns a *NotFoundError when no PinnedClosure entities are found.

func (*PinnedClosureQuery) OnlyID

func (_q *PinnedClosureQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only PinnedClosure ID in the query. Returns a *NotSingularError when more than one PinnedClosure ID is found. Returns a *NotFoundError when no entities are found.

func (*PinnedClosureQuery) OnlyIDX

func (_q *PinnedClosureQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PinnedClosureQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*PinnedClosureQuery) Order

Order specifies how the records should be ordered.

func (*PinnedClosureQuery) Select

func (_q *PinnedClosureQuery) Select(fields ...string) *PinnedClosureSelect

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 {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.PinnedClosure.Query().
	Select(pinnedclosure.FieldCreatedAt).
	Scan(ctx, &v)

func (*PinnedClosureQuery) Unique

func (_q *PinnedClosureQuery) Unique(unique bool) *PinnedClosureQuery

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 (*PinnedClosureQuery) Where

Where adds a new predicate for the PinnedClosureQuery builder.

type PinnedClosureSelect

type PinnedClosureSelect struct {
	*PinnedClosureQuery
	// contains filtered or unexported fields
}

PinnedClosureSelect is the builder for selecting fields of PinnedClosure entities.

func (*PinnedClosureSelect) Aggregate

func (_s *PinnedClosureSelect) Aggregate(fns ...AggregateFunc) *PinnedClosureSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PinnedClosureSelect) Bool

func (s *PinnedClosureSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) BoolX

func (s *PinnedClosureSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PinnedClosureSelect) Bools

func (s *PinnedClosureSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) BoolsX

func (s *PinnedClosureSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PinnedClosureSelect) Float64

func (s *PinnedClosureSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) Float64X

func (s *PinnedClosureSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PinnedClosureSelect) Float64s

func (s *PinnedClosureSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) Float64sX

func (s *PinnedClosureSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PinnedClosureSelect) Int

func (s *PinnedClosureSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) IntX

func (s *PinnedClosureSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PinnedClosureSelect) Ints

func (s *PinnedClosureSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) IntsX

func (s *PinnedClosureSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PinnedClosureSelect) Scan

func (_s *PinnedClosureSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PinnedClosureSelect) ScanX

func (s *PinnedClosureSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PinnedClosureSelect) String

func (s *PinnedClosureSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) StringX

func (s *PinnedClosureSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PinnedClosureSelect) Strings

func (s *PinnedClosureSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PinnedClosureSelect) StringsX

func (s *PinnedClosureSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PinnedClosureUpdate

type PinnedClosureUpdate struct {
	// contains filtered or unexported fields
}

PinnedClosureUpdate is the builder for updating PinnedClosure entities.

func (*PinnedClosureUpdate) ClearUpdatedAt

func (_u *PinnedClosureUpdate) ClearUpdatedAt() *PinnedClosureUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PinnedClosureUpdate) Exec

func (_u *PinnedClosureUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PinnedClosureUpdate) ExecX

func (_u *PinnedClosureUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureUpdate) Mutation

Mutation returns the PinnedClosureMutation object of the builder.

func (*PinnedClosureUpdate) Save

func (_u *PinnedClosureUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PinnedClosureUpdate) SaveX

func (_u *PinnedClosureUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PinnedClosureUpdate) SetHash

SetHash sets the "hash" field.

func (*PinnedClosureUpdate) SetNillableHash

func (_u *PinnedClosureUpdate) SetNillableHash(v *string) *PinnedClosureUpdate

SetNillableHash sets the "hash" field if the given value is not nil.

func (*PinnedClosureUpdate) SetNillableUpdatedAt

func (_u *PinnedClosureUpdate) SetNillableUpdatedAt(v *time.Time) *PinnedClosureUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PinnedClosureUpdate) SetUpdatedAt

func (_u *PinnedClosureUpdate) SetUpdatedAt(v time.Time) *PinnedClosureUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PinnedClosureUpdate) Where

Where appends a list predicates to the PinnedClosureUpdate builder.

type PinnedClosureUpdateOne

type PinnedClosureUpdateOne struct {
	// contains filtered or unexported fields
}

PinnedClosureUpdateOne is the builder for updating a single PinnedClosure entity.

func (*PinnedClosureUpdateOne) ClearUpdatedAt

func (_u *PinnedClosureUpdateOne) ClearUpdatedAt() *PinnedClosureUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PinnedClosureUpdateOne) Exec

Exec executes the query on the entity.

func (*PinnedClosureUpdateOne) ExecX

func (_u *PinnedClosureUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureUpdateOne) Mutation

Mutation returns the PinnedClosureMutation object of the builder.

func (*PinnedClosureUpdateOne) Save

Save executes the query and returns the updated PinnedClosure entity.

func (*PinnedClosureUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PinnedClosureUpdateOne) Select

func (_u *PinnedClosureUpdateOne) Select(field string, fields ...string) *PinnedClosureUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PinnedClosureUpdateOne) SetHash

SetHash sets the "hash" field.

func (*PinnedClosureUpdateOne) SetNillableHash

func (_u *PinnedClosureUpdateOne) SetNillableHash(v *string) *PinnedClosureUpdateOne

SetNillableHash sets the "hash" field if the given value is not nil.

func (*PinnedClosureUpdateOne) SetNillableUpdatedAt

func (_u *PinnedClosureUpdateOne) SetNillableUpdatedAt(v *time.Time) *PinnedClosureUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PinnedClosureUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*PinnedClosureUpdateOne) Where

Where appends a list predicates to the PinnedClosureUpdate builder.

type PinnedClosureUpsert

type PinnedClosureUpsert struct {
	*sql.UpdateSet
}

PinnedClosureUpsert is the "OnConflict" setter.

func (*PinnedClosureUpsert) ClearUpdatedAt

func (u *PinnedClosureUpsert) ClearUpdatedAt() *PinnedClosureUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PinnedClosureUpsert) SetHash

SetHash sets the "hash" field.

func (*PinnedClosureUpsert) SetUpdatedAt

func (u *PinnedClosureUpsert) SetUpdatedAt(v time.Time) *PinnedClosureUpsert

SetUpdatedAt sets the "updated_at" field.

func (*PinnedClosureUpsert) UpdateHash

func (u *PinnedClosureUpsert) UpdateHash() *PinnedClosureUpsert

UpdateHash sets the "hash" field to the value that was provided on create.

func (*PinnedClosureUpsert) UpdateUpdatedAt

func (u *PinnedClosureUpsert) UpdateUpdatedAt() *PinnedClosureUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PinnedClosureUpsertBulk

type PinnedClosureUpsertBulk struct {
	// contains filtered or unexported fields
}

PinnedClosureUpsertBulk is the builder for "upsert"-ing a bulk of PinnedClosure nodes.

func (*PinnedClosureUpsertBulk) ClearUpdatedAt

func (u *PinnedClosureUpsertBulk) ClearUpdatedAt() *PinnedClosureUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PinnedClosureUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PinnedClosureUpsertBulk) Exec

Exec executes the query.

func (*PinnedClosureUpsertBulk) ExecX

func (u *PinnedClosureUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PinnedClosure.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PinnedClosureUpsertBulk) SetHash

SetHash sets the "hash" field.

func (*PinnedClosureUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*PinnedClosureUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PinnedClosureCreateBulk.OnConflict documentation for more info.

func (*PinnedClosureUpsertBulk) UpdateHash

UpdateHash sets the "hash" field to the value that was provided on create.

func (*PinnedClosureUpsertBulk) UpdateNewValues

func (u *PinnedClosureUpsertBulk) UpdateNewValues() *PinnedClosureUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PinnedClosure.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PinnedClosureUpsertBulk) UpdateUpdatedAt

func (u *PinnedClosureUpsertBulk) UpdateUpdatedAt() *PinnedClosureUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PinnedClosureUpsertOne

type PinnedClosureUpsertOne struct {
	// contains filtered or unexported fields
}

PinnedClosureUpsertOne is the builder for "upsert"-ing

one PinnedClosure node.

func (*PinnedClosureUpsertOne) ClearUpdatedAt

func (u *PinnedClosureUpsertOne) ClearUpdatedAt() *PinnedClosureUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*PinnedClosureUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PinnedClosureUpsertOne) Exec

Exec executes the query.

func (*PinnedClosureUpsertOne) ExecX

func (u *PinnedClosureUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PinnedClosureUpsertOne) ID

func (u *PinnedClosureUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PinnedClosureUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PinnedClosureUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PinnedClosure.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PinnedClosureUpsertOne) SetHash

SetHash sets the "hash" field.

func (*PinnedClosureUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*PinnedClosureUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PinnedClosureCreate.OnConflict documentation for more info.

func (*PinnedClosureUpsertOne) UpdateHash

UpdateHash sets the "hash" field to the value that was provided on create.

func (*PinnedClosureUpsertOne) UpdateNewValues

func (u *PinnedClosureUpsertOne) UpdateNewValues() *PinnedClosureUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.PinnedClosure.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PinnedClosureUpsertOne) UpdateUpdatedAt

func (u *PinnedClosureUpsertOne) UpdateUpdatedAt() *PinnedClosureUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PinnedClosures

type PinnedClosures []*PinnedClosure

PinnedClosures is a parsable slice of PinnedClosure.

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 {

	// Chunk is the client for interacting with the Chunk builders.
	Chunk *ChunkClient
	// ConfigEntry is the client for interacting with the ConfigEntry builders.
	ConfigEntry *ConfigEntryClient
	// NarFile is the client for interacting with the NarFile builders.
	NarFile *NarFileClient
	// NarFileChunk is the client for interacting with the NarFileChunk builders.
	NarFileChunk *NarFileChunkClient
	// NarInfo is the client for interacting with the NarInfo builders.
	NarInfo *NarInfoClient
	// NarInfoNarFile is the client for interacting with the NarInfoNarFile builders.
	NarInfoNarFile *NarInfoNarFileClient
	// NarInfoReference is the client for interacting with the NarInfoReference builders.
	NarInfoReference *NarInfoReferenceClient
	// NarInfoSignature is the client for interacting with the NarInfoSignature builders.
	NarInfoSignature *NarInfoSignatureClient
	// PinnedClosure is the client for interacting with the PinnedClosure builders.
	PinnedClosure *PinnedClosureClient
	// 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
Package schema is the Ent schema source for ncps.
Package schema is the Ent schema source for ncps.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL