ent

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

	// Node types.
	TypeCacheEntry         = "CacheEntry"
	TypeJobLock            = "JobLock"
	TypeStorageDeletion    = "StorageDeletion"
	TypeStorageLocation    = "StorageLocation"
	TypeStorageManifest    = "StorageManifest"
	TypeStorageReaderLease = "StorageReaderLease"
	TypeUpload             = "Upload"
	TypeUploadBlock        = "UploadBlock"
)

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 CacheEntries

type CacheEntries []*CacheEntry

CacheEntries is a parsable slice of CacheEntry.

type CacheEntry

type CacheEntry struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Version holds the value of the "version" field.
	Version string `json:"version,omitempty"`
	// Scope holds the value of the "scope" field.
	Scope string `json:"scope,omitempty"`
	// RepoId holds the value of the "repoId" field.
	RepoId string `json:"repoId,omitempty"`
	// UpdatedAt holds the value of the "updatedAt" field.
	UpdatedAt int64 `json:"updatedAt,omitempty"`
	// LocationId holds the value of the "locationId" field.
	LocationId string `json:"locationId,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CacheEntryQuery when eager-loading is set.
	Edges CacheEntryEdges `json:"edges"`
	// contains filtered or unexported fields
}

CacheEntry is the model entity for the CacheEntry schema.

func (*CacheEntry) ExecContext

func (c *CacheEntry) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntry) QueryContext

func (c *CacheEntry) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntry) QueryLocation

func (_m *CacheEntry) QueryLocation() *StorageLocationQuery

QueryLocation queries the "location" edge of the CacheEntry entity.

func (*CacheEntry) String

func (_m *CacheEntry) String() string

String implements the fmt.Stringer.

func (*CacheEntry) Unwrap

func (_m *CacheEntry) Unwrap() *CacheEntry

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

func (_m *CacheEntry) Update() *CacheEntryUpdateOne

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

func (*CacheEntry) Value

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

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

type CacheEntryClient

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

CacheEntryClient is a client for the CacheEntry schema.

func NewCacheEntryClient

func NewCacheEntryClient(c config) *CacheEntryClient

NewCacheEntryClient returns a client for the CacheEntry from the given config.

func (*CacheEntryClient) Create

func (c *CacheEntryClient) Create() *CacheEntryCreate

Create returns a builder for creating a CacheEntry entity.

func (*CacheEntryClient) CreateBulk

func (c *CacheEntryClient) CreateBulk(builders ...*CacheEntryCreate) *CacheEntryCreateBulk

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

func (*CacheEntryClient) Delete

func (c *CacheEntryClient) Delete() *CacheEntryDelete

Delete returns a delete builder for CacheEntry.

func (*CacheEntryClient) DeleteOne

func (c *CacheEntryClient) DeleteOne(_m *CacheEntry) *CacheEntryDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CacheEntryClient) DeleteOneID

func (c *CacheEntryClient) DeleteOneID(id string) *CacheEntryDeleteOne

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

func (*CacheEntryClient) ExecContext

func (c *CacheEntryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryClient) Get

func (c *CacheEntryClient) Get(ctx context.Context, id string) (*CacheEntry, error)

Get returns a CacheEntry entity by its id.

func (*CacheEntryClient) GetX

func (c *CacheEntryClient) GetX(ctx context.Context, id string) *CacheEntry

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

func (*CacheEntryClient) Hooks

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

Hooks returns the client hooks.

func (*CacheEntryClient) Intercept

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

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

func (*CacheEntryClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CacheEntryClient) MapCreateBulk

func (c *CacheEntryClient) MapCreateBulk(slice any, setFunc func(*CacheEntryCreate, int)) *CacheEntryCreateBulk

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

func (c *CacheEntryClient) Query() *CacheEntryQuery

Query returns a query builder for CacheEntry.

func (*CacheEntryClient) QueryContext

func (c *CacheEntryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryClient) QueryLocation

func (c *CacheEntryClient) QueryLocation(_m *CacheEntry) *StorageLocationQuery

QueryLocation queries the location edge of a CacheEntry.

func (*CacheEntryClient) Update

func (c *CacheEntryClient) Update() *CacheEntryUpdate

Update returns an update builder for CacheEntry.

func (*CacheEntryClient) UpdateOne

func (c *CacheEntryClient) UpdateOne(_m *CacheEntry) *CacheEntryUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CacheEntryClient) UpdateOneID

func (c *CacheEntryClient) UpdateOneID(id string) *CacheEntryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CacheEntryClient) Use

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

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

type CacheEntryCreate

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

CacheEntryCreate is the builder for creating a CacheEntry entity.

func (*CacheEntryCreate) Exec

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

Exec executes the query.

func (*CacheEntryCreate) ExecContext

func (c *CacheEntryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryCreate) ExecX

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

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

func (*CacheEntryCreate) Mutation

func (_c *CacheEntryCreate) Mutation() *CacheEntryMutation

Mutation returns the CacheEntryMutation object of the builder.

func (*CacheEntryCreate) QueryContext

func (c *CacheEntryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryCreate) Save

func (_c *CacheEntryCreate) Save(ctx context.Context) (*CacheEntry, error)

Save creates the CacheEntry in the database.

func (*CacheEntryCreate) SaveX

func (_c *CacheEntryCreate) SaveX(ctx context.Context) *CacheEntry

SaveX calls Save and panics if Save returns an error.

func (*CacheEntryCreate) SetID

SetID sets the "id" field.

func (*CacheEntryCreate) SetKey

func (_c *CacheEntryCreate) SetKey(v string) *CacheEntryCreate

SetKey sets the "key" field.

func (*CacheEntryCreate) SetLocation

func (_c *CacheEntryCreate) SetLocation(v *StorageLocation) *CacheEntryCreate

SetLocation sets the "location" edge to the StorageLocation entity.

func (*CacheEntryCreate) SetLocationID

func (_c *CacheEntryCreate) SetLocationID(id string) *CacheEntryCreate

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*CacheEntryCreate) SetLocationId

func (_c *CacheEntryCreate) SetLocationId(v string) *CacheEntryCreate

SetLocationId sets the "locationId" field.

func (*CacheEntryCreate) SetRepoId

func (_c *CacheEntryCreate) SetRepoId(v string) *CacheEntryCreate

SetRepoId sets the "repoId" field.

func (*CacheEntryCreate) SetScope

func (_c *CacheEntryCreate) SetScope(v string) *CacheEntryCreate

SetScope sets the "scope" field.

func (*CacheEntryCreate) SetUpdatedAt

func (_c *CacheEntryCreate) SetUpdatedAt(v int64) *CacheEntryCreate

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryCreate) SetVersion

func (_c *CacheEntryCreate) SetVersion(v string) *CacheEntryCreate

SetVersion sets the "version" field.

type CacheEntryCreateBulk

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

CacheEntryCreateBulk is the builder for creating many CacheEntry entities in bulk.

func (*CacheEntryCreateBulk) Exec

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

Exec executes the query.

func (*CacheEntryCreateBulk) ExecContext

func (c *CacheEntryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryCreateBulk) ExecX

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

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

func (*CacheEntryCreateBulk) QueryContext

func (c *CacheEntryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryCreateBulk) Save

func (_c *CacheEntryCreateBulk) Save(ctx context.Context) ([]*CacheEntry, error)

Save creates the CacheEntry entities in the database.

func (*CacheEntryCreateBulk) SaveX

func (_c *CacheEntryCreateBulk) SaveX(ctx context.Context) []*CacheEntry

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

type CacheEntryDelete

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

CacheEntryDelete is the builder for deleting a CacheEntry entity.

func (*CacheEntryDelete) Exec

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

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

func (*CacheEntryDelete) ExecContext

func (c *CacheEntryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryDelete) ExecX

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

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

func (*CacheEntryDelete) QueryContext

func (c *CacheEntryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryDelete) Where

Where appends a list predicates to the CacheEntryDelete builder.

type CacheEntryDeleteOne

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

CacheEntryDeleteOne is the builder for deleting a single CacheEntry entity.

func (*CacheEntryDeleteOne) Exec

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

Exec executes the deletion query.

func (*CacheEntryDeleteOne) ExecX

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

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

func (*CacheEntryDeleteOne) Where

Where appends a list predicates to the CacheEntryDelete builder.

type CacheEntryEdges

type CacheEntryEdges struct {
	// Location holds the value of the location edge.
	Location *StorageLocation `json:"location,omitempty"`
	// contains filtered or unexported fields
}

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

func (CacheEntryEdges) LocationOrErr

func (e CacheEntryEdges) LocationOrErr() (*StorageLocation, error)

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

type CacheEntryGroupBy

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

CacheEntryGroupBy is the group-by builder for CacheEntry entities.

func (*CacheEntryGroupBy) Aggregate

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

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

func (*CacheEntryGroupBy) Bool

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

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

func (*CacheEntryGroupBy) BoolX

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

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

func (*CacheEntryGroupBy) Bools

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

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

func (*CacheEntryGroupBy) BoolsX

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

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

func (*CacheEntryGroupBy) Float64

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

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

func (*CacheEntryGroupBy) Float64X

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

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

func (*CacheEntryGroupBy) Float64s

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

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

func (*CacheEntryGroupBy) Float64sX

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

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

func (*CacheEntryGroupBy) Int

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

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

func (*CacheEntryGroupBy) IntX

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

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

func (*CacheEntryGroupBy) Ints

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

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

func (*CacheEntryGroupBy) IntsX

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

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

func (*CacheEntryGroupBy) Scan

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

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

func (*CacheEntryGroupBy) ScanX

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

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

func (*CacheEntryGroupBy) String

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

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

func (*CacheEntryGroupBy) StringX

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

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

func (*CacheEntryGroupBy) Strings

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

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

func (*CacheEntryGroupBy) StringsX

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

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

type CacheEntryMutation

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

CacheEntryMutation represents an operation that mutates the CacheEntry nodes in the graph.

func (*CacheEntryMutation) AddField

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) AddUpdatedAt

func (m *CacheEntryMutation) AddUpdatedAt(i int64)

AddUpdatedAt adds i to the "updatedAt" field.

func (*CacheEntryMutation) AddedEdges

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

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

func (*CacheEntryMutation) AddedField

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

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

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

func (*CacheEntryMutation) AddedIDs

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

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

func (*CacheEntryMutation) AddedUpdatedAt

func (m *CacheEntryMutation) AddedUpdatedAt() (r int64, exists bool)

AddedUpdatedAt returns the value that was added to the "updatedAt" field in this mutation.

func (*CacheEntryMutation) ClearEdge

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

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) ClearLocation

func (m *CacheEntryMutation) ClearLocation()

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*CacheEntryMutation) ClearedEdges

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

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

func (*CacheEntryMutation) ClearedFields

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

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

func (CacheEntryMutation) Client

func (m CacheEntryMutation) 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 (*CacheEntryMutation) EdgeCleared

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

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

func (*CacheEntryMutation) ExecContext

func (c *CacheEntryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryMutation) Field

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

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

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

func (*CacheEntryMutation) Fields

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

func (m *CacheEntryMutation) ID() (id string, 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 (*CacheEntryMutation) IDs

func (m *CacheEntryMutation) IDs(ctx context.Context) ([]string, 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 (*CacheEntryMutation) Key

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

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

func (*CacheEntryMutation) LocationCleared

func (m *CacheEntryMutation) LocationCleared() bool

LocationCleared reports if the "location" edge to the StorageLocation entity was cleared.

func (*CacheEntryMutation) LocationID

func (m *CacheEntryMutation) LocationID() (id string, exists bool)

LocationID returns the "location" edge ID in the mutation.

func (*CacheEntryMutation) LocationIDs

func (m *CacheEntryMutation) LocationIDs() (ids []string)

LocationIDs returns the "location" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LocationID instead. It exists only for internal usage by the builders.

func (*CacheEntryMutation) LocationId

func (m *CacheEntryMutation) LocationId() (r string, exists bool)

LocationId returns the value of the "locationId" field in the mutation.

func (*CacheEntryMutation) OldField

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

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

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

func (m *CacheEntryMutation) OldLocationId(ctx context.Context) (v string, err error)

OldLocationId returns the old "locationId" field's value of the CacheEntry entity. If the CacheEntry 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 (*CacheEntryMutation) OldRepoId

func (m *CacheEntryMutation) OldRepoId(ctx context.Context) (v string, err error)

OldRepoId returns the old "repoId" field's value of the CacheEntry entity. If the CacheEntry 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 (*CacheEntryMutation) OldScope

func (m *CacheEntryMutation) OldScope(ctx context.Context) (v string, err error)

OldScope returns the old "scope" field's value of the CacheEntry entity. If the CacheEntry 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 (*CacheEntryMutation) OldUpdatedAt

func (m *CacheEntryMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)

OldUpdatedAt returns the old "updatedAt" field's value of the CacheEntry entity. If the CacheEntry 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 (*CacheEntryMutation) OldVersion

func (m *CacheEntryMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the CacheEntry entity. If the CacheEntry 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 (*CacheEntryMutation) Op

func (m *CacheEntryMutation) Op() Op

Op returns the operation name.

func (*CacheEntryMutation) QueryContext

func (c *CacheEntryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryMutation) RemovedEdges

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

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

func (*CacheEntryMutation) RemovedIDs

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) RepoId

func (m *CacheEntryMutation) RepoId() (r string, exists bool)

RepoId returns the value of the "repoId" field in the mutation.

func (*CacheEntryMutation) ResetEdge

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

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

func (m *CacheEntryMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*CacheEntryMutation) ResetLocation

func (m *CacheEntryMutation) ResetLocation()

ResetLocation resets all changes to the "location" edge.

func (*CacheEntryMutation) ResetLocationId

func (m *CacheEntryMutation) ResetLocationId()

ResetLocationId resets all changes to the "locationId" field.

func (*CacheEntryMutation) ResetRepoId

func (m *CacheEntryMutation) ResetRepoId()

ResetRepoId resets all changes to the "repoId" field.

func (*CacheEntryMutation) ResetScope

func (m *CacheEntryMutation) ResetScope()

ResetScope resets all changes to the "scope" field.

func (*CacheEntryMutation) ResetUpdatedAt

func (m *CacheEntryMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updatedAt" field.

func (*CacheEntryMutation) ResetVersion

func (m *CacheEntryMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*CacheEntryMutation) Scope

func (m *CacheEntryMutation) Scope() (r string, exists bool)

Scope returns the value of the "scope" field in the mutation.

func (*CacheEntryMutation) SetField

func (m *CacheEntryMutation) 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 (*CacheEntryMutation) SetID

func (m *CacheEntryMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of CacheEntry entities.

func (*CacheEntryMutation) SetKey

func (m *CacheEntryMutation) SetKey(s string)

SetKey sets the "key" field.

func (*CacheEntryMutation) SetLocationID

func (m *CacheEntryMutation) SetLocationID(id string)

SetLocationID sets the "location" edge to the StorageLocation entity by id.

func (*CacheEntryMutation) SetLocationId

func (m *CacheEntryMutation) SetLocationId(s string)

SetLocationId sets the "locationId" field.

func (*CacheEntryMutation) SetOp

func (m *CacheEntryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CacheEntryMutation) SetRepoId

func (m *CacheEntryMutation) SetRepoId(s string)

SetRepoId sets the "repoId" field.

func (*CacheEntryMutation) SetScope

func (m *CacheEntryMutation) SetScope(s string)

SetScope sets the "scope" field.

func (*CacheEntryMutation) SetUpdatedAt

func (m *CacheEntryMutation) SetUpdatedAt(i int64)

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryMutation) SetVersion

func (m *CacheEntryMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (CacheEntryMutation) Tx

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

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

func (*CacheEntryMutation) Type

func (m *CacheEntryMutation) Type() string

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

func (*CacheEntryMutation) UpdatedAt

func (m *CacheEntryMutation) UpdatedAt() (r int64, exists bool)

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

func (*CacheEntryMutation) Version

func (m *CacheEntryMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*CacheEntryMutation) Where

func (m *CacheEntryMutation) Where(ps ...predicate.CacheEntry)

Where appends a list predicates to the CacheEntryMutation builder.

func (*CacheEntryMutation) WhereP

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

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

type CacheEntryQuery

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

CacheEntryQuery is the builder for querying CacheEntry entities.

func (*CacheEntryQuery) Aggregate

func (_q *CacheEntryQuery) Aggregate(fns ...AggregateFunc) *CacheEntrySelect

Aggregate returns a CacheEntrySelect configured with the given aggregations.

func (*CacheEntryQuery) All

func (_q *CacheEntryQuery) All(ctx context.Context) ([]*CacheEntry, error)

All executes the query and returns a list of CacheEntries.

func (*CacheEntryQuery) AllX

func (_q *CacheEntryQuery) AllX(ctx context.Context) []*CacheEntry

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

func (*CacheEntryQuery) Clone

func (_q *CacheEntryQuery) Clone() *CacheEntryQuery

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

func (*CacheEntryQuery) Count

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

Count returns the count of the given query.

func (*CacheEntryQuery) CountX

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

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

func (*CacheEntryQuery) ExecContext

func (c *CacheEntryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryQuery) Exist

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

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

func (*CacheEntryQuery) ExistX

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

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

func (*CacheEntryQuery) First

func (_q *CacheEntryQuery) First(ctx context.Context) (*CacheEntry, error)

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

func (*CacheEntryQuery) FirstID

func (_q *CacheEntryQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*CacheEntryQuery) FirstIDX

func (_q *CacheEntryQuery) FirstIDX(ctx context.Context) string

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

func (*CacheEntryQuery) FirstX

func (_q *CacheEntryQuery) FirstX(ctx context.Context) *CacheEntry

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

func (*CacheEntryQuery) ForShare

func (_q *CacheEntryQuery) ForShare(opts ...sql.LockOption) *CacheEntryQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*CacheEntryQuery) ForUpdate

func (_q *CacheEntryQuery) ForUpdate(opts ...sql.LockOption) *CacheEntryQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*CacheEntryQuery) GroupBy

func (_q *CacheEntryQuery) GroupBy(field string, fields ...string) *CacheEntryGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CacheEntry.Query().
	GroupBy(cacheentry.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CacheEntryQuery) IDs

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

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

func (*CacheEntryQuery) IDsX

func (_q *CacheEntryQuery) IDsX(ctx context.Context) []string

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

func (*CacheEntryQuery) Limit

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

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

func (*CacheEntryQuery) Offset

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

Offset to start from.

func (*CacheEntryQuery) Only

func (_q *CacheEntryQuery) Only(ctx context.Context) (*CacheEntry, error)

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

func (*CacheEntryQuery) OnlyID

func (_q *CacheEntryQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*CacheEntryQuery) OnlyIDX

func (_q *CacheEntryQuery) OnlyIDX(ctx context.Context) string

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

func (*CacheEntryQuery) OnlyX

func (_q *CacheEntryQuery) OnlyX(ctx context.Context) *CacheEntry

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

func (*CacheEntryQuery) Order

Order specifies how the records should be ordered.

func (*CacheEntryQuery) QueryContext

func (c *CacheEntryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryQuery) QueryLocation

func (_q *CacheEntryQuery) QueryLocation() *StorageLocationQuery

QueryLocation chains the current query on the "location" edge.

func (*CacheEntryQuery) Select

func (_q *CacheEntryQuery) Select(fields ...string) *CacheEntrySelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
}

client.CacheEntry.Query().
	Select(cacheentry.FieldKey).
	Scan(ctx, &v)

func (*CacheEntryQuery) Unique

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

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

Where adds a new predicate for the CacheEntryQuery builder.

func (*CacheEntryQuery) WithLocation

func (_q *CacheEntryQuery) WithLocation(opts ...func(*StorageLocationQuery)) *CacheEntryQuery

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

type CacheEntrySelect

type CacheEntrySelect struct {
	*CacheEntryQuery
	// contains filtered or unexported fields
}

CacheEntrySelect is the builder for selecting fields of CacheEntry entities.

func (*CacheEntrySelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*CacheEntrySelect) Bool

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

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

func (*CacheEntrySelect) BoolX

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

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

func (*CacheEntrySelect) Bools

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

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

func (*CacheEntrySelect) BoolsX

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

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

func (CacheEntrySelect) ExecContext

func (c CacheEntrySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntrySelect) Float64

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

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

func (*CacheEntrySelect) Float64X

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

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

func (*CacheEntrySelect) Float64s

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

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

func (*CacheEntrySelect) Float64sX

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

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

func (*CacheEntrySelect) Int

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

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

func (*CacheEntrySelect) IntX

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

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

func (*CacheEntrySelect) Ints

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

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

func (*CacheEntrySelect) IntsX

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

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

func (CacheEntrySelect) QueryContext

func (c CacheEntrySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntrySelect) Scan

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

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

func (*CacheEntrySelect) ScanX

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

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

func (*CacheEntrySelect) String

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

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

func (*CacheEntrySelect) StringX

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

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

func (*CacheEntrySelect) Strings

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

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

func (*CacheEntrySelect) StringsX

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

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

type CacheEntryUpdate

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

CacheEntryUpdate is the builder for updating CacheEntry entities.

func (*CacheEntryUpdate) AddUpdatedAt

func (_u *CacheEntryUpdate) AddUpdatedAt(v int64) *CacheEntryUpdate

AddUpdatedAt adds value to the "updatedAt" field.

func (*CacheEntryUpdate) ClearLocation

func (_u *CacheEntryUpdate) ClearLocation() *CacheEntryUpdate

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdate) Exec

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

Exec executes the query.

func (*CacheEntryUpdate) ExecContext

func (c *CacheEntryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryUpdate) ExecX

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

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

func (*CacheEntryUpdate) Mutation

func (_u *CacheEntryUpdate) Mutation() *CacheEntryMutation

Mutation returns the CacheEntryMutation object of the builder.

func (*CacheEntryUpdate) QueryContext

func (c *CacheEntryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryUpdate) Save

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

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

func (*CacheEntryUpdate) SaveX

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

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

func (*CacheEntryUpdate) SetKey

func (_u *CacheEntryUpdate) SetKey(v string) *CacheEntryUpdate

SetKey sets the "key" field.

func (*CacheEntryUpdate) SetLocation

func (_u *CacheEntryUpdate) SetLocation(v *StorageLocation) *CacheEntryUpdate

SetLocation sets the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdate) SetLocationID

func (_u *CacheEntryUpdate) SetLocationID(id string) *CacheEntryUpdate

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*CacheEntryUpdate) SetLocationId

func (_u *CacheEntryUpdate) SetLocationId(v string) *CacheEntryUpdate

SetLocationId sets the "locationId" field.

func (*CacheEntryUpdate) SetNillableKey

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

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

func (*CacheEntryUpdate) SetNillableLocationId

func (_u *CacheEntryUpdate) SetNillableLocationId(v *string) *CacheEntryUpdate

SetNillableLocationId sets the "locationId" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableRepoId

func (_u *CacheEntryUpdate) SetNillableRepoId(v *string) *CacheEntryUpdate

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableScope

func (_u *CacheEntryUpdate) SetNillableScope(v *string) *CacheEntryUpdate

SetNillableScope sets the "scope" field if the given value is not nil.

func (*CacheEntryUpdate) SetNillableUpdatedAt

func (_u *CacheEntryUpdate) SetNillableUpdatedAt(v *int64) *CacheEntryUpdate

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

func (*CacheEntryUpdate) SetNillableVersion

func (_u *CacheEntryUpdate) SetNillableVersion(v *string) *CacheEntryUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*CacheEntryUpdate) SetRepoId

func (_u *CacheEntryUpdate) SetRepoId(v string) *CacheEntryUpdate

SetRepoId sets the "repoId" field.

func (*CacheEntryUpdate) SetScope

func (_u *CacheEntryUpdate) SetScope(v string) *CacheEntryUpdate

SetScope sets the "scope" field.

func (*CacheEntryUpdate) SetUpdatedAt

func (_u *CacheEntryUpdate) SetUpdatedAt(v int64) *CacheEntryUpdate

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryUpdate) SetVersion

func (_u *CacheEntryUpdate) SetVersion(v string) *CacheEntryUpdate

SetVersion sets the "version" field.

func (*CacheEntryUpdate) Where

Where appends a list predicates to the CacheEntryUpdate builder.

type CacheEntryUpdateOne

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

CacheEntryUpdateOne is the builder for updating a single CacheEntry entity.

func (*CacheEntryUpdateOne) AddUpdatedAt

func (_u *CacheEntryUpdateOne) AddUpdatedAt(v int64) *CacheEntryUpdateOne

AddUpdatedAt adds value to the "updatedAt" field.

func (*CacheEntryUpdateOne) ClearLocation

func (_u *CacheEntryUpdateOne) ClearLocation() *CacheEntryUpdateOne

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdateOne) Exec

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

Exec executes the query on the entity.

func (*CacheEntryUpdateOne) ExecContext

func (c *CacheEntryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CacheEntryUpdateOne) ExecX

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

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

func (*CacheEntryUpdateOne) Mutation

func (_u *CacheEntryUpdateOne) Mutation() *CacheEntryMutation

Mutation returns the CacheEntryMutation object of the builder.

func (*CacheEntryUpdateOne) QueryContext

func (c *CacheEntryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CacheEntryUpdateOne) Save

Save executes the query and returns the updated CacheEntry entity.

func (*CacheEntryUpdateOne) SaveX

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

func (*CacheEntryUpdateOne) Select

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

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

func (*CacheEntryUpdateOne) SetKey

SetKey sets the "key" field.

func (*CacheEntryUpdateOne) SetLocation

SetLocation sets the "location" edge to the StorageLocation entity.

func (*CacheEntryUpdateOne) SetLocationID

func (_u *CacheEntryUpdateOne) SetLocationID(id string) *CacheEntryUpdateOne

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*CacheEntryUpdateOne) SetLocationId

func (_u *CacheEntryUpdateOne) SetLocationId(v string) *CacheEntryUpdateOne

SetLocationId sets the "locationId" field.

func (*CacheEntryUpdateOne) SetNillableKey

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

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

func (*CacheEntryUpdateOne) SetNillableLocationId

func (_u *CacheEntryUpdateOne) SetNillableLocationId(v *string) *CacheEntryUpdateOne

SetNillableLocationId sets the "locationId" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableRepoId

func (_u *CacheEntryUpdateOne) SetNillableRepoId(v *string) *CacheEntryUpdateOne

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableScope

func (_u *CacheEntryUpdateOne) SetNillableScope(v *string) *CacheEntryUpdateOne

SetNillableScope sets the "scope" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetNillableUpdatedAt

func (_u *CacheEntryUpdateOne) SetNillableUpdatedAt(v *int64) *CacheEntryUpdateOne

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

func (*CacheEntryUpdateOne) SetNillableVersion

func (_u *CacheEntryUpdateOne) SetNillableVersion(v *string) *CacheEntryUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*CacheEntryUpdateOne) SetRepoId

SetRepoId sets the "repoId" field.

func (*CacheEntryUpdateOne) SetScope

SetScope sets the "scope" field.

func (*CacheEntryUpdateOne) SetUpdatedAt

func (_u *CacheEntryUpdateOne) SetUpdatedAt(v int64) *CacheEntryUpdateOne

SetUpdatedAt sets the "updatedAt" field.

func (*CacheEntryUpdateOne) SetVersion

func (_u *CacheEntryUpdateOne) SetVersion(v string) *CacheEntryUpdateOne

SetVersion sets the "version" field.

func (*CacheEntryUpdateOne) Where

Where appends a list predicates to the CacheEntryUpdate builder.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// CacheEntry is the client for interacting with the CacheEntry builders.
	CacheEntry *CacheEntryClient
	// JobLock is the client for interacting with the JobLock builders.
	JobLock *JobLockClient
	// StorageDeletion is the client for interacting with the StorageDeletion builders.
	StorageDeletion *StorageDeletionClient
	// StorageLocation is the client for interacting with the StorageLocation builders.
	StorageLocation *StorageLocationClient
	// StorageManifest is the client for interacting with the StorageManifest builders.
	StorageManifest *StorageManifestClient
	// StorageReaderLease is the client for interacting with the StorageReaderLease builders.
	StorageReaderLease *StorageReaderLeaseClient
	// Upload is the client for interacting with the Upload builders.
	Upload *UploadClient
	// UploadBlock is the client for interacting with the UploadBlock builders.
	UploadBlock *UploadBlockClient
	// 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().
	CacheEntry.
	Query().
	Count(ctx)

func (*Client) Dialect added in v1.2.2

func (c *Client) Dialect() string

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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

func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Client) QuerySelector added in v1.2.2

func (c *Client) QuerySelector(ctx context.Context, build func(*sql.DialectBuilder) *sql.Selector) (*sql.Rows, error)

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

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

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type JobLock

type JobLock struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// LastStartedAt holds the value of the "lastStartedAt" field.
	LastStartedAt *int64 `json:"lastStartedAt,omitempty"`
	// contains filtered or unexported fields
}

JobLock is the model entity for the JobLock schema.

func (*JobLock) ExecContext

func (c *JobLock) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLock) QueryContext

func (c *JobLock) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLock) String

func (_m *JobLock) String() string

String implements the fmt.Stringer.

func (*JobLock) Unwrap

func (_m *JobLock) Unwrap() *JobLock

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

func (_m *JobLock) Update() *JobLockUpdateOne

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

func (*JobLock) Value

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

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

type JobLockClient

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

JobLockClient is a client for the JobLock schema.

func NewJobLockClient

func NewJobLockClient(c config) *JobLockClient

NewJobLockClient returns a client for the JobLock from the given config.

func (*JobLockClient) Create

func (c *JobLockClient) Create() *JobLockCreate

Create returns a builder for creating a JobLock entity.

func (*JobLockClient) CreateBulk

func (c *JobLockClient) CreateBulk(builders ...*JobLockCreate) *JobLockCreateBulk

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

func (*JobLockClient) Delete

func (c *JobLockClient) Delete() *JobLockDelete

Delete returns a delete builder for JobLock.

func (*JobLockClient) DeleteOne

func (c *JobLockClient) DeleteOne(_m *JobLock) *JobLockDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*JobLockClient) DeleteOneID

func (c *JobLockClient) DeleteOneID(id string) *JobLockDeleteOne

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

func (*JobLockClient) ExecContext

func (c *JobLockClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockClient) Get

func (c *JobLockClient) Get(ctx context.Context, id string) (*JobLock, error)

Get returns a JobLock entity by its id.

func (*JobLockClient) GetX

func (c *JobLockClient) GetX(ctx context.Context, id string) *JobLock

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

func (*JobLockClient) Hooks

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

Hooks returns the client hooks.

func (*JobLockClient) Intercept

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

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

func (*JobLockClient) Interceptors

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

Interceptors returns the client interceptors.

func (*JobLockClient) MapCreateBulk

func (c *JobLockClient) MapCreateBulk(slice any, setFunc func(*JobLockCreate, int)) *JobLockCreateBulk

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

func (c *JobLockClient) Query() *JobLockQuery

Query returns a query builder for JobLock.

func (*JobLockClient) QueryContext

func (c *JobLockClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockClient) Update

func (c *JobLockClient) Update() *JobLockUpdate

Update returns an update builder for JobLock.

func (*JobLockClient) UpdateOne

func (c *JobLockClient) UpdateOne(_m *JobLock) *JobLockUpdateOne

UpdateOne returns an update builder for the given entity.

func (*JobLockClient) UpdateOneID

func (c *JobLockClient) UpdateOneID(id string) *JobLockUpdateOne

UpdateOneID returns an update builder for the given id.

func (*JobLockClient) Use

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

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

type JobLockCreate

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

JobLockCreate is the builder for creating a JobLock entity.

func (*JobLockCreate) Exec

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

Exec executes the query.

func (*JobLockCreate) ExecContext

func (c *JobLockCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockCreate) ExecX

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

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

func (*JobLockCreate) Mutation

func (_c *JobLockCreate) Mutation() *JobLockMutation

Mutation returns the JobLockMutation object of the builder.

func (*JobLockCreate) QueryContext

func (c *JobLockCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockCreate) Save

func (_c *JobLockCreate) Save(ctx context.Context) (*JobLock, error)

Save creates the JobLock in the database.

func (*JobLockCreate) SaveX

func (_c *JobLockCreate) SaveX(ctx context.Context) *JobLock

SaveX calls Save and panics if Save returns an error.

func (*JobLockCreate) SetID

func (_c *JobLockCreate) SetID(v string) *JobLockCreate

SetID sets the "id" field.

func (*JobLockCreate) SetLastStartedAt

func (_c *JobLockCreate) SetLastStartedAt(v int64) *JobLockCreate

SetLastStartedAt sets the "lastStartedAt" field.

func (*JobLockCreate) SetNillableLastStartedAt

func (_c *JobLockCreate) SetNillableLastStartedAt(v *int64) *JobLockCreate

SetNillableLastStartedAt sets the "lastStartedAt" field if the given value is not nil.

type JobLockCreateBulk

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

JobLockCreateBulk is the builder for creating many JobLock entities in bulk.

func (*JobLockCreateBulk) Exec

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

Exec executes the query.

func (*JobLockCreateBulk) ExecContext

func (c *JobLockCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockCreateBulk) ExecX

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

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

func (*JobLockCreateBulk) QueryContext

func (c *JobLockCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockCreateBulk) Save

func (_c *JobLockCreateBulk) Save(ctx context.Context) ([]*JobLock, error)

Save creates the JobLock entities in the database.

func (*JobLockCreateBulk) SaveX

func (_c *JobLockCreateBulk) SaveX(ctx context.Context) []*JobLock

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

type JobLockDelete

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

JobLockDelete is the builder for deleting a JobLock entity.

func (*JobLockDelete) Exec

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

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

func (*JobLockDelete) ExecContext

func (c *JobLockDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockDelete) ExecX

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

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

func (*JobLockDelete) QueryContext

func (c *JobLockDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockDelete) Where

func (_d *JobLockDelete) Where(ps ...predicate.JobLock) *JobLockDelete

Where appends a list predicates to the JobLockDelete builder.

type JobLockDeleteOne

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

JobLockDeleteOne is the builder for deleting a single JobLock entity.

func (*JobLockDeleteOne) Exec

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

Exec executes the deletion query.

func (*JobLockDeleteOne) ExecX

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

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

func (*JobLockDeleteOne) Where

Where appends a list predicates to the JobLockDelete builder.

type JobLockGroupBy

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

JobLockGroupBy is the group-by builder for JobLock entities.

func (*JobLockGroupBy) Aggregate

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

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

func (*JobLockGroupBy) Bool

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

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

func (*JobLockGroupBy) BoolX

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

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

func (*JobLockGroupBy) Bools

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

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

func (*JobLockGroupBy) BoolsX

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

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

func (*JobLockGroupBy) Float64

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

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

func (*JobLockGroupBy) Float64X

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

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

func (*JobLockGroupBy) Float64s

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

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

func (*JobLockGroupBy) Float64sX

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

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

func (*JobLockGroupBy) Int

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

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

func (*JobLockGroupBy) IntX

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

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

func (*JobLockGroupBy) Ints

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

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

func (*JobLockGroupBy) IntsX

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

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

func (*JobLockGroupBy) Scan

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

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

func (*JobLockGroupBy) ScanX

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

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

func (*JobLockGroupBy) String

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

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

func (*JobLockGroupBy) StringX

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

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

func (*JobLockGroupBy) Strings

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

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

func (*JobLockGroupBy) StringsX

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

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

type JobLockMutation

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

JobLockMutation represents an operation that mutates the JobLock nodes in the graph.

func (*JobLockMutation) AddField

func (m *JobLockMutation) 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 (*JobLockMutation) AddLastStartedAt

func (m *JobLockMutation) AddLastStartedAt(i int64)

AddLastStartedAt adds i to the "lastStartedAt" field.

func (*JobLockMutation) AddedEdges

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

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

func (*JobLockMutation) AddedField

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

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

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

func (*JobLockMutation) AddedIDs

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

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

func (*JobLockMutation) AddedLastStartedAt

func (m *JobLockMutation) AddedLastStartedAt() (r int64, exists bool)

AddedLastStartedAt returns the value that was added to the "lastStartedAt" field in this mutation.

func (*JobLockMutation) ClearEdge

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

func (m *JobLockMutation) 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 (*JobLockMutation) ClearLastStartedAt

func (m *JobLockMutation) ClearLastStartedAt()

ClearLastStartedAt clears the value of the "lastStartedAt" field.

func (*JobLockMutation) ClearedEdges

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

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

func (*JobLockMutation) ClearedFields

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

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

func (JobLockMutation) Client

func (m JobLockMutation) 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 (*JobLockMutation) EdgeCleared

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

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

func (*JobLockMutation) ExecContext

func (c *JobLockMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockMutation) Field

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

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

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

func (*JobLockMutation) Fields

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

func (m *JobLockMutation) ID() (id string, 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 (*JobLockMutation) IDs

func (m *JobLockMutation) IDs(ctx context.Context) ([]string, 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 (*JobLockMutation) LastStartedAt

func (m *JobLockMutation) LastStartedAt() (r int64, exists bool)

LastStartedAt returns the value of the "lastStartedAt" field in the mutation.

func (*JobLockMutation) LastStartedAtCleared

func (m *JobLockMutation) LastStartedAtCleared() bool

LastStartedAtCleared returns if the "lastStartedAt" field was cleared in this mutation.

func (*JobLockMutation) OldField

func (m *JobLockMutation) 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 (*JobLockMutation) OldLastStartedAt

func (m *JobLockMutation) OldLastStartedAt(ctx context.Context) (v *int64, err error)

OldLastStartedAt returns the old "lastStartedAt" field's value of the JobLock entity. If the JobLock 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 (*JobLockMutation) Op

func (m *JobLockMutation) Op() Op

Op returns the operation name.

func (*JobLockMutation) QueryContext

func (c *JobLockMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockMutation) RemovedEdges

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

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

func (*JobLockMutation) RemovedIDs

func (m *JobLockMutation) 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 (*JobLockMutation) ResetEdge

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

func (m *JobLockMutation) 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 (*JobLockMutation) ResetLastStartedAt

func (m *JobLockMutation) ResetLastStartedAt()

ResetLastStartedAt resets all changes to the "lastStartedAt" field.

func (*JobLockMutation) SetField

func (m *JobLockMutation) 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 (*JobLockMutation) SetID

func (m *JobLockMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of JobLock entities.

func (*JobLockMutation) SetLastStartedAt

func (m *JobLockMutation) SetLastStartedAt(i int64)

SetLastStartedAt sets the "lastStartedAt" field.

func (*JobLockMutation) SetOp

func (m *JobLockMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (JobLockMutation) Tx

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

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

func (*JobLockMutation) Type

func (m *JobLockMutation) Type() string

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

func (*JobLockMutation) Where

func (m *JobLockMutation) Where(ps ...predicate.JobLock)

Where appends a list predicates to the JobLockMutation builder.

func (*JobLockMutation) WhereP

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

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

type JobLockQuery

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

JobLockQuery is the builder for querying JobLock entities.

func (*JobLockQuery) Aggregate

func (_q *JobLockQuery) Aggregate(fns ...AggregateFunc) *JobLockSelect

Aggregate returns a JobLockSelect configured with the given aggregations.

func (*JobLockQuery) All

func (_q *JobLockQuery) All(ctx context.Context) ([]*JobLock, error)

All executes the query and returns a list of JobLocks.

func (*JobLockQuery) AllX

func (_q *JobLockQuery) AllX(ctx context.Context) []*JobLock

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

func (*JobLockQuery) Clone

func (_q *JobLockQuery) Clone() *JobLockQuery

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

func (*JobLockQuery) Count

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

Count returns the count of the given query.

func (*JobLockQuery) CountX

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

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

func (*JobLockQuery) ExecContext

func (c *JobLockQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockQuery) Exist

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

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

func (*JobLockQuery) ExistX

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

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

func (*JobLockQuery) First

func (_q *JobLockQuery) First(ctx context.Context) (*JobLock, error)

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

func (*JobLockQuery) FirstID

func (_q *JobLockQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*JobLockQuery) FirstIDX

func (_q *JobLockQuery) FirstIDX(ctx context.Context) string

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

func (*JobLockQuery) FirstX

func (_q *JobLockQuery) FirstX(ctx context.Context) *JobLock

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

func (*JobLockQuery) ForShare

func (_q *JobLockQuery) ForShare(opts ...sql.LockOption) *JobLockQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*JobLockQuery) ForUpdate

func (_q *JobLockQuery) ForUpdate(opts ...sql.LockOption) *JobLockQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*JobLockQuery) GroupBy

func (_q *JobLockQuery) GroupBy(field string, fields ...string) *JobLockGroupBy

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 {
	LastStartedAt int64 `json:"lastStartedAt,omitempty"`
	Count int `json:"count,omitempty"`
}

client.JobLock.Query().
	GroupBy(joblock.FieldLastStartedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*JobLockQuery) IDs

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

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

func (*JobLockQuery) IDsX

func (_q *JobLockQuery) IDsX(ctx context.Context) []string

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

func (*JobLockQuery) Limit

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

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

func (*JobLockQuery) Offset

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

Offset to start from.

func (*JobLockQuery) Only

func (_q *JobLockQuery) Only(ctx context.Context) (*JobLock, error)

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

func (*JobLockQuery) OnlyID

func (_q *JobLockQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*JobLockQuery) OnlyIDX

func (_q *JobLockQuery) OnlyIDX(ctx context.Context) string

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

func (*JobLockQuery) OnlyX

func (_q *JobLockQuery) OnlyX(ctx context.Context) *JobLock

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

func (*JobLockQuery) Order

func (_q *JobLockQuery) Order(o ...joblock.OrderOption) *JobLockQuery

Order specifies how the records should be ordered.

func (*JobLockQuery) QueryContext

func (c *JobLockQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockQuery) Select

func (_q *JobLockQuery) Select(fields ...string) *JobLockSelect

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 {
	LastStartedAt int64 `json:"lastStartedAt,omitempty"`
}

client.JobLock.Query().
	Select(joblock.FieldLastStartedAt).
	Scan(ctx, &v)

func (*JobLockQuery) Unique

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

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

func (_q *JobLockQuery) Where(ps ...predicate.JobLock) *JobLockQuery

Where adds a new predicate for the JobLockQuery builder.

type JobLockSelect

type JobLockSelect struct {
	*JobLockQuery
	// contains filtered or unexported fields
}

JobLockSelect is the builder for selecting fields of JobLock entities.

func (*JobLockSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*JobLockSelect) Bool

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

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

func (*JobLockSelect) BoolX

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

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

func (*JobLockSelect) Bools

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

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

func (*JobLockSelect) BoolsX

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

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

func (JobLockSelect) ExecContext

func (c JobLockSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockSelect) Float64

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

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

func (*JobLockSelect) Float64X

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

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

func (*JobLockSelect) Float64s

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

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

func (*JobLockSelect) Float64sX

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

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

func (*JobLockSelect) Int

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

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

func (*JobLockSelect) IntX

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

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

func (*JobLockSelect) Ints

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

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

func (*JobLockSelect) IntsX

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

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

func (JobLockSelect) QueryContext

func (c JobLockSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockSelect) Scan

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

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

func (*JobLockSelect) ScanX

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

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

func (*JobLockSelect) String

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

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

func (*JobLockSelect) StringX

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

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

func (*JobLockSelect) Strings

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

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

func (*JobLockSelect) StringsX

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

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

type JobLockUpdate

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

JobLockUpdate is the builder for updating JobLock entities.

func (*JobLockUpdate) AddLastStartedAt

func (_u *JobLockUpdate) AddLastStartedAt(v int64) *JobLockUpdate

AddLastStartedAt adds value to the "lastStartedAt" field.

func (*JobLockUpdate) ClearLastStartedAt

func (_u *JobLockUpdate) ClearLastStartedAt() *JobLockUpdate

ClearLastStartedAt clears the value of the "lastStartedAt" field.

func (*JobLockUpdate) Exec

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

Exec executes the query.

func (*JobLockUpdate) ExecContext

func (c *JobLockUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockUpdate) ExecX

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

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

func (*JobLockUpdate) Mutation

func (_u *JobLockUpdate) Mutation() *JobLockMutation

Mutation returns the JobLockMutation object of the builder.

func (*JobLockUpdate) QueryContext

func (c *JobLockUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockUpdate) Save

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

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

func (*JobLockUpdate) SaveX

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

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

func (*JobLockUpdate) SetLastStartedAt

func (_u *JobLockUpdate) SetLastStartedAt(v int64) *JobLockUpdate

SetLastStartedAt sets the "lastStartedAt" field.

func (*JobLockUpdate) SetNillableLastStartedAt

func (_u *JobLockUpdate) SetNillableLastStartedAt(v *int64) *JobLockUpdate

SetNillableLastStartedAt sets the "lastStartedAt" field if the given value is not nil.

func (*JobLockUpdate) Where

func (_u *JobLockUpdate) Where(ps ...predicate.JobLock) *JobLockUpdate

Where appends a list predicates to the JobLockUpdate builder.

type JobLockUpdateOne

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

JobLockUpdateOne is the builder for updating a single JobLock entity.

func (*JobLockUpdateOne) AddLastStartedAt

func (_u *JobLockUpdateOne) AddLastStartedAt(v int64) *JobLockUpdateOne

AddLastStartedAt adds value to the "lastStartedAt" field.

func (*JobLockUpdateOne) ClearLastStartedAt

func (_u *JobLockUpdateOne) ClearLastStartedAt() *JobLockUpdateOne

ClearLastStartedAt clears the value of the "lastStartedAt" field.

func (*JobLockUpdateOne) Exec

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

Exec executes the query on the entity.

func (*JobLockUpdateOne) ExecContext

func (c *JobLockUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*JobLockUpdateOne) ExecX

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

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

func (*JobLockUpdateOne) Mutation

func (_u *JobLockUpdateOne) Mutation() *JobLockMutation

Mutation returns the JobLockMutation object of the builder.

func (*JobLockUpdateOne) QueryContext

func (c *JobLockUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*JobLockUpdateOne) Save

func (_u *JobLockUpdateOne) Save(ctx context.Context) (*JobLock, error)

Save executes the query and returns the updated JobLock entity.

func (*JobLockUpdateOne) SaveX

func (_u *JobLockUpdateOne) SaveX(ctx context.Context) *JobLock

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

func (*JobLockUpdateOne) Select

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

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

func (*JobLockUpdateOne) SetLastStartedAt

func (_u *JobLockUpdateOne) SetLastStartedAt(v int64) *JobLockUpdateOne

SetLastStartedAt sets the "lastStartedAt" field.

func (*JobLockUpdateOne) SetNillableLastStartedAt

func (_u *JobLockUpdateOne) SetNillableLastStartedAt(v *int64) *JobLockUpdateOne

SetNillableLastStartedAt sets the "lastStartedAt" field if the given value is not nil.

func (*JobLockUpdateOne) Where

Where appends a list predicates to the JobLockUpdate builder.

type JobLocks

type JobLocks []*JobLock

JobLocks is a parsable slice of JobLock.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

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

type Policy

type Policy = ent.Policy

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

type Querier

type Querier = ent.Querier

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

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

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

type Query

type Query = ent.Query

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

type QueryContext

type QueryContext = ent.QueryContext

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

type RollbackFunc

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

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

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

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

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

Rollbacker is the interface that wraps the Rollback method.

type StorageDeletion

type StorageDeletion struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// FolderName holds the value of the "folderName" field.
	FolderName string `json:"folderName,omitempty"`
	// CreatedAt holds the value of the "createdAt" field.
	CreatedAt int64 `json:"createdAt,omitempty"`
	// AttemptCount holds the value of the "attemptCount" field.
	AttemptCount int `json:"attemptCount,omitempty"`
	// LastAttemptedAt holds the value of the "lastAttemptedAt" field.
	LastAttemptedAt *int64 `json:"lastAttemptedAt,omitempty"`
	// LastError holds the value of the "lastError" field.
	LastError *string `json:"lastError,omitempty"`
	// contains filtered or unexported fields
}

StorageDeletion is the model entity for the StorageDeletion schema.

func (*StorageDeletion) ExecContext

func (c *StorageDeletion) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletion) QueryContext

func (c *StorageDeletion) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletion) String

func (_m *StorageDeletion) String() string

String implements the fmt.Stringer.

func (*StorageDeletion) Unwrap

func (_m *StorageDeletion) Unwrap() *StorageDeletion

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

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

func (*StorageDeletion) Value

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

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

type StorageDeletionClient

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

StorageDeletionClient is a client for the StorageDeletion schema.

func NewStorageDeletionClient

func NewStorageDeletionClient(c config) *StorageDeletionClient

NewStorageDeletionClient returns a client for the StorageDeletion from the given config.

func (*StorageDeletionClient) Create

Create returns a builder for creating a StorageDeletion entity.

func (*StorageDeletionClient) CreateBulk

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

func (*StorageDeletionClient) Delete

Delete returns a delete builder for StorageDeletion.

func (*StorageDeletionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StorageDeletionClient) DeleteOneID

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

func (*StorageDeletionClient) ExecContext

func (c *StorageDeletionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionClient) Get

Get returns a StorageDeletion entity by its id.

func (*StorageDeletionClient) GetX

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

func (*StorageDeletionClient) Hooks

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

Hooks returns the client hooks.

func (*StorageDeletionClient) Intercept

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

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

func (*StorageDeletionClient) Interceptors

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

Interceptors returns the client interceptors.

func (*StorageDeletionClient) MapCreateBulk

func (c *StorageDeletionClient) MapCreateBulk(slice any, setFunc func(*StorageDeletionCreate, int)) *StorageDeletionCreateBulk

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

Query returns a query builder for StorageDeletion.

func (*StorageDeletionClient) QueryContext

func (c *StorageDeletionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionClient) Update

Update returns an update builder for StorageDeletion.

func (*StorageDeletionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StorageDeletionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StorageDeletionClient) Use

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

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

type StorageDeletionCreate

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

StorageDeletionCreate is the builder for creating a StorageDeletion entity.

func (*StorageDeletionCreate) Exec

Exec executes the query.

func (*StorageDeletionCreate) ExecContext

func (c *StorageDeletionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionCreate) ExecX

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

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

func (*StorageDeletionCreate) Mutation

Mutation returns the StorageDeletionMutation object of the builder.

func (*StorageDeletionCreate) QueryContext

func (c *StorageDeletionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionCreate) Save

Save creates the StorageDeletion in the database.

func (*StorageDeletionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StorageDeletionCreate) SetAttemptCount

func (_c *StorageDeletionCreate) SetAttemptCount(v int) *StorageDeletionCreate

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionCreate) SetCreatedAt

func (_c *StorageDeletionCreate) SetCreatedAt(v int64) *StorageDeletionCreate

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionCreate) SetFolderName

func (_c *StorageDeletionCreate) SetFolderName(v string) *StorageDeletionCreate

SetFolderName sets the "folderName" field.

func (*StorageDeletionCreate) SetID

SetID sets the "id" field.

func (*StorageDeletionCreate) SetLastAttemptedAt

func (_c *StorageDeletionCreate) SetLastAttemptedAt(v int64) *StorageDeletionCreate

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionCreate) SetLastError

func (_c *StorageDeletionCreate) SetLastError(v string) *StorageDeletionCreate

SetLastError sets the "lastError" field.

func (*StorageDeletionCreate) SetNillableAttemptCount

func (_c *StorageDeletionCreate) SetNillableAttemptCount(v *int) *StorageDeletionCreate

SetNillableAttemptCount sets the "attemptCount" field if the given value is not nil.

func (*StorageDeletionCreate) SetNillableLastAttemptedAt

func (_c *StorageDeletionCreate) SetNillableLastAttemptedAt(v *int64) *StorageDeletionCreate

SetNillableLastAttemptedAt sets the "lastAttemptedAt" field if the given value is not nil.

func (*StorageDeletionCreate) SetNillableLastError

func (_c *StorageDeletionCreate) SetNillableLastError(v *string) *StorageDeletionCreate

SetNillableLastError sets the "lastError" field if the given value is not nil.

type StorageDeletionCreateBulk

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

StorageDeletionCreateBulk is the builder for creating many StorageDeletion entities in bulk.

func (*StorageDeletionCreateBulk) Exec

Exec executes the query.

func (*StorageDeletionCreateBulk) ExecContext

func (c *StorageDeletionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionCreateBulk) ExecX

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

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

func (*StorageDeletionCreateBulk) QueryContext

func (c *StorageDeletionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionCreateBulk) Save

Save creates the StorageDeletion entities in the database.

func (*StorageDeletionCreateBulk) SaveX

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

type StorageDeletionDelete

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

StorageDeletionDelete is the builder for deleting a StorageDeletion entity.

func (*StorageDeletionDelete) Exec

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

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

func (*StorageDeletionDelete) ExecContext

func (c *StorageDeletionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionDelete) ExecX

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

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

func (*StorageDeletionDelete) QueryContext

func (c *StorageDeletionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionDelete) Where

Where appends a list predicates to the StorageDeletionDelete builder.

type StorageDeletionDeleteOne

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

StorageDeletionDeleteOne is the builder for deleting a single StorageDeletion entity.

func (*StorageDeletionDeleteOne) Exec

Exec executes the deletion query.

func (*StorageDeletionDeleteOne) ExecX

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

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

func (*StorageDeletionDeleteOne) Where

Where appends a list predicates to the StorageDeletionDelete builder.

type StorageDeletionGroupBy

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

StorageDeletionGroupBy is the group-by builder for StorageDeletion entities.

func (*StorageDeletionGroupBy) Aggregate

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

func (*StorageDeletionGroupBy) Bool

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

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

func (*StorageDeletionGroupBy) BoolX

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

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

func (*StorageDeletionGroupBy) Bools

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

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

func (*StorageDeletionGroupBy) BoolsX

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

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

func (*StorageDeletionGroupBy) Float64

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

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

func (*StorageDeletionGroupBy) Float64X

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

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

func (*StorageDeletionGroupBy) Float64s

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

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

func (*StorageDeletionGroupBy) Float64sX

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

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

func (*StorageDeletionGroupBy) Int

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

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

func (*StorageDeletionGroupBy) IntX

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

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

func (*StorageDeletionGroupBy) Ints

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

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

func (*StorageDeletionGroupBy) IntsX

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

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

func (*StorageDeletionGroupBy) Scan

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

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

func (*StorageDeletionGroupBy) ScanX

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

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

func (*StorageDeletionGroupBy) String

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

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

func (*StorageDeletionGroupBy) StringX

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

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

func (*StorageDeletionGroupBy) Strings

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

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

func (*StorageDeletionGroupBy) StringsX

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

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

type StorageDeletionMutation

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

StorageDeletionMutation represents an operation that mutates the StorageDeletion nodes in the graph.

func (*StorageDeletionMutation) AddAttemptCount

func (m *StorageDeletionMutation) AddAttemptCount(i int)

AddAttemptCount adds i to the "attemptCount" field.

func (*StorageDeletionMutation) AddCreatedAt

func (m *StorageDeletionMutation) AddCreatedAt(i int64)

AddCreatedAt adds i to the "createdAt" field.

func (*StorageDeletionMutation) AddField

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) AddLastAttemptedAt

func (m *StorageDeletionMutation) AddLastAttemptedAt(i int64)

AddLastAttemptedAt adds i to the "lastAttemptedAt" field.

func (*StorageDeletionMutation) AddedAttemptCount

func (m *StorageDeletionMutation) AddedAttemptCount() (r int, exists bool)

AddedAttemptCount returns the value that was added to the "attemptCount" field in this mutation.

func (*StorageDeletionMutation) AddedCreatedAt

func (m *StorageDeletionMutation) AddedCreatedAt() (r int64, exists bool)

AddedCreatedAt returns the value that was added to the "createdAt" field in this mutation.

func (*StorageDeletionMutation) AddedEdges

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

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

func (*StorageDeletionMutation) AddedField

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

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

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

func (*StorageDeletionMutation) AddedIDs

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

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

func (*StorageDeletionMutation) AddedLastAttemptedAt

func (m *StorageDeletionMutation) AddedLastAttemptedAt() (r int64, exists bool)

AddedLastAttemptedAt returns the value that was added to the "lastAttemptedAt" field in this mutation.

func (*StorageDeletionMutation) AttemptCount

func (m *StorageDeletionMutation) AttemptCount() (r int, exists bool)

AttemptCount returns the value of the "attemptCount" field in the mutation.

func (*StorageDeletionMutation) ClearEdge

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

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) ClearLastAttemptedAt

func (m *StorageDeletionMutation) ClearLastAttemptedAt()

ClearLastAttemptedAt clears the value of the "lastAttemptedAt" field.

func (*StorageDeletionMutation) ClearLastError

func (m *StorageDeletionMutation) ClearLastError()

ClearLastError clears the value of the "lastError" field.

func (*StorageDeletionMutation) ClearedEdges

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

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

func (*StorageDeletionMutation) ClearedFields

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

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

func (StorageDeletionMutation) Client

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

func (m *StorageDeletionMutation) CreatedAt() (r int64, exists bool)

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

func (*StorageDeletionMutation) EdgeCleared

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

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

func (*StorageDeletionMutation) ExecContext

func (c *StorageDeletionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionMutation) Field

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

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

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

func (*StorageDeletionMutation) Fields

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) FolderName

func (m *StorageDeletionMutation) FolderName() (r string, exists bool)

FolderName returns the value of the "folderName" field in the mutation.

func (*StorageDeletionMutation) ID

func (m *StorageDeletionMutation) ID() (id int64, 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 (*StorageDeletionMutation) 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 (*StorageDeletionMutation) LastAttemptedAt

func (m *StorageDeletionMutation) LastAttemptedAt() (r int64, exists bool)

LastAttemptedAt returns the value of the "lastAttemptedAt" field in the mutation.

func (*StorageDeletionMutation) LastAttemptedAtCleared

func (m *StorageDeletionMutation) LastAttemptedAtCleared() bool

LastAttemptedAtCleared returns if the "lastAttemptedAt" field was cleared in this mutation.

func (*StorageDeletionMutation) LastError

func (m *StorageDeletionMutation) LastError() (r string, exists bool)

LastError returns the value of the "lastError" field in the mutation.

func (*StorageDeletionMutation) LastErrorCleared

func (m *StorageDeletionMutation) LastErrorCleared() bool

LastErrorCleared returns if the "lastError" field was cleared in this mutation.

func (*StorageDeletionMutation) OldAttemptCount

func (m *StorageDeletionMutation) OldAttemptCount(ctx context.Context) (v int, err error)

OldAttemptCount returns the old "attemptCount" field's value of the StorageDeletion entity. If the StorageDeletion 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 (*StorageDeletionMutation) OldCreatedAt

func (m *StorageDeletionMutation) OldCreatedAt(ctx context.Context) (v int64, err error)

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

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) OldFolderName

func (m *StorageDeletionMutation) OldFolderName(ctx context.Context) (v string, err error)

OldFolderName returns the old "folderName" field's value of the StorageDeletion entity. If the StorageDeletion 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 (*StorageDeletionMutation) OldLastAttemptedAt

func (m *StorageDeletionMutation) OldLastAttemptedAt(ctx context.Context) (v *int64, err error)

OldLastAttemptedAt returns the old "lastAttemptedAt" field's value of the StorageDeletion entity. If the StorageDeletion 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 (*StorageDeletionMutation) OldLastError

func (m *StorageDeletionMutation) OldLastError(ctx context.Context) (v *string, err error)

OldLastError returns the old "lastError" field's value of the StorageDeletion entity. If the StorageDeletion 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 (*StorageDeletionMutation) Op

func (m *StorageDeletionMutation) Op() Op

Op returns the operation name.

func (*StorageDeletionMutation) QueryContext

func (c *StorageDeletionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionMutation) RemovedEdges

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

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

func (*StorageDeletionMutation) RemovedIDs

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) ResetAttemptCount

func (m *StorageDeletionMutation) ResetAttemptCount()

ResetAttemptCount resets all changes to the "attemptCount" field.

func (*StorageDeletionMutation) ResetCreatedAt

func (m *StorageDeletionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "createdAt" field.

func (*StorageDeletionMutation) ResetEdge

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

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) ResetFolderName

func (m *StorageDeletionMutation) ResetFolderName()

ResetFolderName resets all changes to the "folderName" field.

func (*StorageDeletionMutation) ResetLastAttemptedAt

func (m *StorageDeletionMutation) ResetLastAttemptedAt()

ResetLastAttemptedAt resets all changes to the "lastAttemptedAt" field.

func (*StorageDeletionMutation) ResetLastError

func (m *StorageDeletionMutation) ResetLastError()

ResetLastError resets all changes to the "lastError" field.

func (*StorageDeletionMutation) SetAttemptCount

func (m *StorageDeletionMutation) SetAttemptCount(i int)

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionMutation) SetCreatedAt

func (m *StorageDeletionMutation) SetCreatedAt(i int64)

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionMutation) SetField

func (m *StorageDeletionMutation) 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 (*StorageDeletionMutation) SetFolderName

func (m *StorageDeletionMutation) SetFolderName(s string)

SetFolderName sets the "folderName" field.

func (*StorageDeletionMutation) SetID

func (m *StorageDeletionMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of StorageDeletion entities.

func (*StorageDeletionMutation) SetLastAttemptedAt

func (m *StorageDeletionMutation) SetLastAttemptedAt(i int64)

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionMutation) SetLastError

func (m *StorageDeletionMutation) SetLastError(s string)

SetLastError sets the "lastError" field.

func (*StorageDeletionMutation) SetOp

func (m *StorageDeletionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (StorageDeletionMutation) Tx

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

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

func (*StorageDeletionMutation) Type

func (m *StorageDeletionMutation) Type() string

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

func (*StorageDeletionMutation) Where

Where appends a list predicates to the StorageDeletionMutation builder.

func (*StorageDeletionMutation) WhereP

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

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

type StorageDeletionQuery

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

StorageDeletionQuery is the builder for querying StorageDeletion entities.

func (*StorageDeletionQuery) Aggregate

Aggregate returns a StorageDeletionSelect configured with the given aggregations.

func (*StorageDeletionQuery) All

All executes the query and returns a list of StorageDeletions.

func (*StorageDeletionQuery) AllX

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

func (*StorageDeletionQuery) Clone

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

func (*StorageDeletionQuery) Count

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

Count returns the count of the given query.

func (*StorageDeletionQuery) CountX

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

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

func (*StorageDeletionQuery) ExecContext

func (c *StorageDeletionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionQuery) Exist

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

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

func (*StorageDeletionQuery) ExistX

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

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

func (*StorageDeletionQuery) First

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

func (*StorageDeletionQuery) FirstID

func (_q *StorageDeletionQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*StorageDeletionQuery) FirstIDX

func (_q *StorageDeletionQuery) FirstIDX(ctx context.Context) int64

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

func (*StorageDeletionQuery) FirstX

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

func (*StorageDeletionQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*StorageDeletionQuery) ForUpdate

func (_q *StorageDeletionQuery) ForUpdate(opts ...sql.LockOption) *StorageDeletionQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*StorageDeletionQuery) GroupBy

func (_q *StorageDeletionQuery) GroupBy(field string, fields ...string) *StorageDeletionGroupBy

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

client.StorageDeletion.Query().
	GroupBy(storagedeletion.FieldFolderName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StorageDeletionQuery) IDs

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

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

func (*StorageDeletionQuery) IDsX

func (_q *StorageDeletionQuery) IDsX(ctx context.Context) []int64

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

func (*StorageDeletionQuery) Limit

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

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

func (*StorageDeletionQuery) Offset

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

Offset to start from.

func (*StorageDeletionQuery) Only

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

func (*StorageDeletionQuery) OnlyID

func (_q *StorageDeletionQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*StorageDeletionQuery) OnlyIDX

func (_q *StorageDeletionQuery) OnlyIDX(ctx context.Context) int64

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

func (*StorageDeletionQuery) OnlyX

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

func (*StorageDeletionQuery) Order

Order specifies how the records should be ordered.

func (*StorageDeletionQuery) QueryContext

func (c *StorageDeletionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionQuery) Select

func (_q *StorageDeletionQuery) Select(fields ...string) *StorageDeletionSelect

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

client.StorageDeletion.Query().
	Select(storagedeletion.FieldFolderName).
	Scan(ctx, &v)

func (*StorageDeletionQuery) Unique

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

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

Where adds a new predicate for the StorageDeletionQuery builder.

type StorageDeletionSelect

type StorageDeletionSelect struct {
	*StorageDeletionQuery
	// contains filtered or unexported fields
}

StorageDeletionSelect is the builder for selecting fields of StorageDeletion entities.

func (*StorageDeletionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*StorageDeletionSelect) Bool

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

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

func (*StorageDeletionSelect) BoolX

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

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

func (*StorageDeletionSelect) Bools

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

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

func (*StorageDeletionSelect) BoolsX

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

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

func (StorageDeletionSelect) ExecContext

func (c StorageDeletionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionSelect) Float64

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

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

func (*StorageDeletionSelect) Float64X

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

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

func (*StorageDeletionSelect) Float64s

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

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

func (*StorageDeletionSelect) Float64sX

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

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

func (*StorageDeletionSelect) Int

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

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

func (*StorageDeletionSelect) IntX

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

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

func (*StorageDeletionSelect) Ints

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

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

func (*StorageDeletionSelect) IntsX

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

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

func (StorageDeletionSelect) QueryContext

func (c StorageDeletionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionSelect) Scan

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

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

func (*StorageDeletionSelect) ScanX

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

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

func (*StorageDeletionSelect) String

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

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

func (*StorageDeletionSelect) StringX

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

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

func (*StorageDeletionSelect) Strings

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

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

func (*StorageDeletionSelect) StringsX

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

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

type StorageDeletionUpdate

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

StorageDeletionUpdate is the builder for updating StorageDeletion entities.

func (*StorageDeletionUpdate) AddAttemptCount

func (_u *StorageDeletionUpdate) AddAttemptCount(v int) *StorageDeletionUpdate

AddAttemptCount adds value to the "attemptCount" field.

func (*StorageDeletionUpdate) AddCreatedAt

func (_u *StorageDeletionUpdate) AddCreatedAt(v int64) *StorageDeletionUpdate

AddCreatedAt adds value to the "createdAt" field.

func (*StorageDeletionUpdate) AddLastAttemptedAt

func (_u *StorageDeletionUpdate) AddLastAttemptedAt(v int64) *StorageDeletionUpdate

AddLastAttemptedAt adds value to the "lastAttemptedAt" field.

func (*StorageDeletionUpdate) ClearLastAttemptedAt

func (_u *StorageDeletionUpdate) ClearLastAttemptedAt() *StorageDeletionUpdate

ClearLastAttemptedAt clears the value of the "lastAttemptedAt" field.

func (*StorageDeletionUpdate) ClearLastError

func (_u *StorageDeletionUpdate) ClearLastError() *StorageDeletionUpdate

ClearLastError clears the value of the "lastError" field.

func (*StorageDeletionUpdate) Exec

Exec executes the query.

func (*StorageDeletionUpdate) ExecContext

func (c *StorageDeletionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionUpdate) ExecX

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

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

func (*StorageDeletionUpdate) Mutation

Mutation returns the StorageDeletionMutation object of the builder.

func (*StorageDeletionUpdate) QueryContext

func (c *StorageDeletionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionUpdate) Save

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

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

func (*StorageDeletionUpdate) SaveX

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

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

func (*StorageDeletionUpdate) SetAttemptCount

func (_u *StorageDeletionUpdate) SetAttemptCount(v int) *StorageDeletionUpdate

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionUpdate) SetCreatedAt

func (_u *StorageDeletionUpdate) SetCreatedAt(v int64) *StorageDeletionUpdate

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionUpdate) SetFolderName

func (_u *StorageDeletionUpdate) SetFolderName(v string) *StorageDeletionUpdate

SetFolderName sets the "folderName" field.

func (*StorageDeletionUpdate) SetLastAttemptedAt

func (_u *StorageDeletionUpdate) SetLastAttemptedAt(v int64) *StorageDeletionUpdate

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionUpdate) SetLastError

func (_u *StorageDeletionUpdate) SetLastError(v string) *StorageDeletionUpdate

SetLastError sets the "lastError" field.

func (*StorageDeletionUpdate) SetNillableAttemptCount

func (_u *StorageDeletionUpdate) SetNillableAttemptCount(v *int) *StorageDeletionUpdate

SetNillableAttemptCount sets the "attemptCount" field if the given value is not nil.

func (*StorageDeletionUpdate) SetNillableCreatedAt

func (_u *StorageDeletionUpdate) SetNillableCreatedAt(v *int64) *StorageDeletionUpdate

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

func (*StorageDeletionUpdate) SetNillableFolderName

func (_u *StorageDeletionUpdate) SetNillableFolderName(v *string) *StorageDeletionUpdate

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageDeletionUpdate) SetNillableLastAttemptedAt

func (_u *StorageDeletionUpdate) SetNillableLastAttemptedAt(v *int64) *StorageDeletionUpdate

SetNillableLastAttemptedAt sets the "lastAttemptedAt" field if the given value is not nil.

func (*StorageDeletionUpdate) SetNillableLastError

func (_u *StorageDeletionUpdate) SetNillableLastError(v *string) *StorageDeletionUpdate

SetNillableLastError sets the "lastError" field if the given value is not nil.

func (*StorageDeletionUpdate) Where

Where appends a list predicates to the StorageDeletionUpdate builder.

type StorageDeletionUpdateOne

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

StorageDeletionUpdateOne is the builder for updating a single StorageDeletion entity.

func (*StorageDeletionUpdateOne) AddAttemptCount

func (_u *StorageDeletionUpdateOne) AddAttemptCount(v int) *StorageDeletionUpdateOne

AddAttemptCount adds value to the "attemptCount" field.

func (*StorageDeletionUpdateOne) AddCreatedAt

AddCreatedAt adds value to the "createdAt" field.

func (*StorageDeletionUpdateOne) AddLastAttemptedAt

func (_u *StorageDeletionUpdateOne) AddLastAttemptedAt(v int64) *StorageDeletionUpdateOne

AddLastAttemptedAt adds value to the "lastAttemptedAt" field.

func (*StorageDeletionUpdateOne) ClearLastAttemptedAt

func (_u *StorageDeletionUpdateOne) ClearLastAttemptedAt() *StorageDeletionUpdateOne

ClearLastAttemptedAt clears the value of the "lastAttemptedAt" field.

func (*StorageDeletionUpdateOne) ClearLastError

func (_u *StorageDeletionUpdateOne) ClearLastError() *StorageDeletionUpdateOne

ClearLastError clears the value of the "lastError" field.

func (*StorageDeletionUpdateOne) Exec

Exec executes the query on the entity.

func (*StorageDeletionUpdateOne) ExecContext

func (c *StorageDeletionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageDeletionUpdateOne) ExecX

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

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

func (*StorageDeletionUpdateOne) Mutation

Mutation returns the StorageDeletionMutation object of the builder.

func (*StorageDeletionUpdateOne) QueryContext

func (c *StorageDeletionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageDeletionUpdateOne) Save

Save executes the query and returns the updated StorageDeletion entity.

func (*StorageDeletionUpdateOne) SaveX

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

func (*StorageDeletionUpdateOne) Select

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

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

func (*StorageDeletionUpdateOne) SetAttemptCount

func (_u *StorageDeletionUpdateOne) SetAttemptCount(v int) *StorageDeletionUpdateOne

SetAttemptCount sets the "attemptCount" field.

func (*StorageDeletionUpdateOne) SetCreatedAt

SetCreatedAt sets the "createdAt" field.

func (*StorageDeletionUpdateOne) SetFolderName

SetFolderName sets the "folderName" field.

func (*StorageDeletionUpdateOne) SetLastAttemptedAt

func (_u *StorageDeletionUpdateOne) SetLastAttemptedAt(v int64) *StorageDeletionUpdateOne

SetLastAttemptedAt sets the "lastAttemptedAt" field.

func (*StorageDeletionUpdateOne) SetLastError

SetLastError sets the "lastError" field.

func (*StorageDeletionUpdateOne) SetNillableAttemptCount

func (_u *StorageDeletionUpdateOne) SetNillableAttemptCount(v *int) *StorageDeletionUpdateOne

SetNillableAttemptCount sets the "attemptCount" field if the given value is not nil.

func (*StorageDeletionUpdateOne) SetNillableCreatedAt

func (_u *StorageDeletionUpdateOne) SetNillableCreatedAt(v *int64) *StorageDeletionUpdateOne

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

func (*StorageDeletionUpdateOne) SetNillableFolderName

func (_u *StorageDeletionUpdateOne) SetNillableFolderName(v *string) *StorageDeletionUpdateOne

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageDeletionUpdateOne) SetNillableLastAttemptedAt

func (_u *StorageDeletionUpdateOne) SetNillableLastAttemptedAt(v *int64) *StorageDeletionUpdateOne

SetNillableLastAttemptedAt sets the "lastAttemptedAt" field if the given value is not nil.

func (*StorageDeletionUpdateOne) SetNillableLastError

func (_u *StorageDeletionUpdateOne) SetNillableLastError(v *string) *StorageDeletionUpdateOne

SetNillableLastError sets the "lastError" field if the given value is not nil.

func (*StorageDeletionUpdateOne) Where

Where appends a list predicates to the StorageDeletionUpdate builder.

type StorageDeletions

type StorageDeletions []*StorageDeletion

StorageDeletions is a parsable slice of StorageDeletion.

type StorageLocation

type StorageLocation struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// FolderName holds the value of the "folderName" field.
	FolderName string `json:"folderName,omitempty"`
	// PartCount holds the value of the "partCount" field.
	PartCount int `json:"partCount,omitempty"`
	// SizeBytes holds the value of the "sizeBytes" field.
	SizeBytes *int64 `json:"sizeBytes,omitempty"`
	// LeaseVersion holds the value of the "leaseVersion" field.
	LeaseVersion int64 `json:"leaseVersion,omitempty"`
	// DeletionRequestedAt holds the value of the "deletionRequestedAt" field.
	DeletionRequestedAt *int64 `json:"deletionRequestedAt,omitempty"`
	// MergeStartedAt holds the value of the "mergeStartedAt" field.
	MergeStartedAt *int64 `json:"mergeStartedAt,omitempty"`
	// MergeLeaseToken holds the value of the "mergeLeaseToken" field.
	MergeLeaseToken *string `json:"mergeLeaseToken,omitempty"`
	// MergeLeaseExpiresAt holds the value of the "mergeLeaseExpiresAt" field.
	MergeLeaseExpiresAt *int64 `json:"mergeLeaseExpiresAt,omitempty"`
	// MergedAt holds the value of the "mergedAt" field.
	MergedAt *int64 `json:"mergedAt,omitempty"`
	// MaterializationUnsupportedAt holds the value of the "materializationUnsupportedAt" field.
	MaterializationUnsupportedAt *int64 `json:"materializationUnsupportedAt,omitempty"`
	// PartsDeletedAt holds the value of the "partsDeletedAt" field.
	PartsDeletedAt *int64 `json:"partsDeletedAt,omitempty"`
	// LastDownloadedAt holds the value of the "lastDownloadedAt" field.
	LastDownloadedAt *int64 `json:"lastDownloadedAt,omitempty"`
	// RecencyAt holds the value of the "recencyAt" field.
	RecencyAt int64 `json:"recencyAt,omitempty"`
	// ManifestAnchor holds the value of the "manifestAnchor" field.
	ManifestAnchor *string `json:"manifestAnchor,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StorageLocationQuery when eager-loading is set.
	Edges StorageLocationEdges `json:"edges"`
	// contains filtered or unexported fields
}

StorageLocation is the model entity for the StorageLocation schema.

func (*StorageLocation) ExecContext

func (c *StorageLocation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocation) QueryCacheEntries

func (_m *StorageLocation) QueryCacheEntries() *CacheEntryQuery

QueryCacheEntries queries the "cacheEntries" edge of the StorageLocation entity.

func (*StorageLocation) QueryContext

func (c *StorageLocation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocation) QueryManifest added in v1.2.2

func (_m *StorageLocation) QueryManifest() *StorageManifestQuery

QueryManifest queries the "manifest" edge of the StorageLocation entity.

func (*StorageLocation) QueryReaderLeases

func (_m *StorageLocation) QueryReaderLeases() *StorageReaderLeaseQuery

QueryReaderLeases queries the "readerLeases" edge of the StorageLocation entity.

func (*StorageLocation) String

func (_m *StorageLocation) String() string

String implements the fmt.Stringer.

func (*StorageLocation) Unwrap

func (_m *StorageLocation) Unwrap() *StorageLocation

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

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

func (*StorageLocation) Value

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

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

type StorageLocationClient

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

StorageLocationClient is a client for the StorageLocation schema.

func NewStorageLocationClient

func NewStorageLocationClient(c config) *StorageLocationClient

NewStorageLocationClient returns a client for the StorageLocation from the given config.

func (*StorageLocationClient) Create

Create returns a builder for creating a StorageLocation entity.

func (*StorageLocationClient) CreateBulk

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

func (*StorageLocationClient) Delete

Delete returns a delete builder for StorageLocation.

func (*StorageLocationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StorageLocationClient) DeleteOneID

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

func (*StorageLocationClient) ExecContext

func (c *StorageLocationClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationClient) Get

Get returns a StorageLocation entity by its id.

func (*StorageLocationClient) GetX

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

func (*StorageLocationClient) Hooks

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

Hooks returns the client hooks.

func (*StorageLocationClient) Intercept

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

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

func (*StorageLocationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*StorageLocationClient) MapCreateBulk

func (c *StorageLocationClient) MapCreateBulk(slice any, setFunc func(*StorageLocationCreate, int)) *StorageLocationCreateBulk

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

Query returns a query builder for StorageLocation.

func (*StorageLocationClient) QueryCacheEntries

func (c *StorageLocationClient) QueryCacheEntries(_m *StorageLocation) *CacheEntryQuery

QueryCacheEntries queries the cacheEntries edge of a StorageLocation.

func (*StorageLocationClient) QueryContext

func (c *StorageLocationClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationClient) QueryManifest added in v1.2.2

QueryManifest queries the manifest edge of a StorageLocation.

func (*StorageLocationClient) QueryReaderLeases

QueryReaderLeases queries the readerLeases edge of a StorageLocation.

func (*StorageLocationClient) Update

Update returns an update builder for StorageLocation.

func (*StorageLocationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StorageLocationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StorageLocationClient) Use

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

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

type StorageLocationCreate

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

StorageLocationCreate is the builder for creating a StorageLocation entity.

func (*StorageLocationCreate) AddCacheEntries

func (_c *StorageLocationCreate) AddCacheEntries(v ...*CacheEntry) *StorageLocationCreate

AddCacheEntries adds the "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationCreate) AddCacheEntryIDs

func (_c *StorageLocationCreate) AddCacheEntryIDs(ids ...string) *StorageLocationCreate

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationCreate) AddReaderLeaseIDs

func (_c *StorageLocationCreate) AddReaderLeaseIDs(ids ...string) *StorageLocationCreate

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationCreate) AddReaderLeases

AddReaderLeases adds the "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationCreate) Exec

Exec executes the query.

func (*StorageLocationCreate) ExecContext

func (c *StorageLocationCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationCreate) ExecX

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

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

func (*StorageLocationCreate) Mutation

Mutation returns the StorageLocationMutation object of the builder.

func (*StorageLocationCreate) QueryContext

func (c *StorageLocationCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationCreate) Save

Save creates the StorageLocation in the database.

func (*StorageLocationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StorageLocationCreate) SetDeletionRequestedAt

func (_c *StorageLocationCreate) SetDeletionRequestedAt(v int64) *StorageLocationCreate

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationCreate) SetFolderName

func (_c *StorageLocationCreate) SetFolderName(v string) *StorageLocationCreate

SetFolderName sets the "folderName" field.

func (*StorageLocationCreate) SetID

SetID sets the "id" field.

func (*StorageLocationCreate) SetLastDownloadedAt

func (_c *StorageLocationCreate) SetLastDownloadedAt(v int64) *StorageLocationCreate

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationCreate) SetLeaseVersion

func (_c *StorageLocationCreate) SetLeaseVersion(v int64) *StorageLocationCreate

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationCreate) SetManifest added in v1.2.2

SetManifest sets the "manifest" edge to the StorageManifest entity.

func (*StorageLocationCreate) SetManifestAnchor added in v1.2.2

func (_c *StorageLocationCreate) SetManifestAnchor(v string) *StorageLocationCreate

SetManifestAnchor sets the "manifestAnchor" field.

func (*StorageLocationCreate) SetManifestID added in v1.2.2

func (_c *StorageLocationCreate) SetManifestID(id int) *StorageLocationCreate

SetManifestID sets the "manifest" edge to the StorageManifest entity by ID.

func (*StorageLocationCreate) SetMaterializationUnsupportedAt

func (_c *StorageLocationCreate) SetMaterializationUnsupportedAt(v int64) *StorageLocationCreate

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationCreate) SetMergeLeaseExpiresAt

func (_c *StorageLocationCreate) SetMergeLeaseExpiresAt(v int64) *StorageLocationCreate

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationCreate) SetMergeLeaseToken

func (_c *StorageLocationCreate) SetMergeLeaseToken(v string) *StorageLocationCreate

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationCreate) SetMergeStartedAt

func (_c *StorageLocationCreate) SetMergeStartedAt(v int64) *StorageLocationCreate

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationCreate) SetMergedAt

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationCreate) SetNillableDeletionRequestedAt

func (_c *StorageLocationCreate) SetNillableDeletionRequestedAt(v *int64) *StorageLocationCreate

SetNillableDeletionRequestedAt sets the "deletionRequestedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableLastDownloadedAt

func (_c *StorageLocationCreate) SetNillableLastDownloadedAt(v *int64) *StorageLocationCreate

SetNillableLastDownloadedAt sets the "lastDownloadedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableLeaseVersion

func (_c *StorageLocationCreate) SetNillableLeaseVersion(v *int64) *StorageLocationCreate

SetNillableLeaseVersion sets the "leaseVersion" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableManifestAnchor added in v1.2.2

func (_c *StorageLocationCreate) SetNillableManifestAnchor(v *string) *StorageLocationCreate

SetNillableManifestAnchor sets the "manifestAnchor" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableManifestID added in v1.2.2

func (_c *StorageLocationCreate) SetNillableManifestID(id *int) *StorageLocationCreate

SetNillableManifestID sets the "manifest" edge to the StorageManifest entity by ID if the given value is not nil.

func (*StorageLocationCreate) SetNillableMaterializationUnsupportedAt

func (_c *StorageLocationCreate) SetNillableMaterializationUnsupportedAt(v *int64) *StorageLocationCreate

SetNillableMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergeLeaseExpiresAt

func (_c *StorageLocationCreate) SetNillableMergeLeaseExpiresAt(v *int64) *StorageLocationCreate

SetNillableMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergeLeaseToken

func (_c *StorageLocationCreate) SetNillableMergeLeaseToken(v *string) *StorageLocationCreate

SetNillableMergeLeaseToken sets the "mergeLeaseToken" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergeStartedAt

func (_c *StorageLocationCreate) SetNillableMergeStartedAt(v *int64) *StorageLocationCreate

SetNillableMergeStartedAt sets the "mergeStartedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableMergedAt

func (_c *StorageLocationCreate) SetNillableMergedAt(v *int64) *StorageLocationCreate

SetNillableMergedAt sets the "mergedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillablePartsDeletedAt

func (_c *StorageLocationCreate) SetNillablePartsDeletedAt(v *int64) *StorageLocationCreate

SetNillablePartsDeletedAt sets the "partsDeletedAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableRecencyAt

func (_c *StorageLocationCreate) SetNillableRecencyAt(v *int64) *StorageLocationCreate

SetNillableRecencyAt sets the "recencyAt" field if the given value is not nil.

func (*StorageLocationCreate) SetNillableSizeBytes

func (_c *StorageLocationCreate) SetNillableSizeBytes(v *int64) *StorageLocationCreate

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*StorageLocationCreate) SetPartCount

func (_c *StorageLocationCreate) SetPartCount(v int) *StorageLocationCreate

SetPartCount sets the "partCount" field.

func (*StorageLocationCreate) SetPartsDeletedAt

func (_c *StorageLocationCreate) SetPartsDeletedAt(v int64) *StorageLocationCreate

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationCreate) SetRecencyAt

func (_c *StorageLocationCreate) SetRecencyAt(v int64) *StorageLocationCreate

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationCreate) SetSizeBytes

func (_c *StorageLocationCreate) SetSizeBytes(v int64) *StorageLocationCreate

SetSizeBytes sets the "sizeBytes" field.

type StorageLocationCreateBulk

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

StorageLocationCreateBulk is the builder for creating many StorageLocation entities in bulk.

func (*StorageLocationCreateBulk) Exec

Exec executes the query.

func (*StorageLocationCreateBulk) ExecContext

func (c *StorageLocationCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationCreateBulk) ExecX

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

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

func (*StorageLocationCreateBulk) QueryContext

func (c *StorageLocationCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationCreateBulk) Save

Save creates the StorageLocation entities in the database.

func (*StorageLocationCreateBulk) SaveX

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

type StorageLocationDelete

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

StorageLocationDelete is the builder for deleting a StorageLocation entity.

func (*StorageLocationDelete) Exec

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

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

func (*StorageLocationDelete) ExecContext

func (c *StorageLocationDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationDelete) ExecX

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

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

func (*StorageLocationDelete) QueryContext

func (c *StorageLocationDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationDelete) Where

Where appends a list predicates to the StorageLocationDelete builder.

type StorageLocationDeleteOne

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

StorageLocationDeleteOne is the builder for deleting a single StorageLocation entity.

func (*StorageLocationDeleteOne) Exec

Exec executes the deletion query.

func (*StorageLocationDeleteOne) ExecX

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

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

func (*StorageLocationDeleteOne) Where

Where appends a list predicates to the StorageLocationDelete builder.

type StorageLocationEdges

type StorageLocationEdges struct {
	// CacheEntries holds the value of the cacheEntries edge.
	CacheEntries []*CacheEntry `json:"cacheEntries,omitempty"`
	// ReaderLeases holds the value of the readerLeases edge.
	ReaderLeases []*StorageReaderLease `json:"readerLeases,omitempty"`
	// Manifest holds the value of the manifest edge.
	Manifest *StorageManifest `json:"manifest,omitempty"`
	// contains filtered or unexported fields
}

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

func (StorageLocationEdges) CacheEntriesOrErr

func (e StorageLocationEdges) CacheEntriesOrErr() ([]*CacheEntry, error)

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

func (StorageLocationEdges) ManifestOrErr added in v1.2.2

func (e StorageLocationEdges) ManifestOrErr() (*StorageManifest, error)

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

func (StorageLocationEdges) ReaderLeasesOrErr

func (e StorageLocationEdges) ReaderLeasesOrErr() ([]*StorageReaderLease, error)

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

type StorageLocationGroupBy

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

StorageLocationGroupBy is the group-by builder for StorageLocation entities.

func (*StorageLocationGroupBy) Aggregate

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

func (*StorageLocationGroupBy) Bool

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

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

func (*StorageLocationGroupBy) BoolX

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

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

func (*StorageLocationGroupBy) Bools

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

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

func (*StorageLocationGroupBy) BoolsX

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

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

func (*StorageLocationGroupBy) Float64

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

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

func (*StorageLocationGroupBy) Float64X

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

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

func (*StorageLocationGroupBy) Float64s

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

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

func (*StorageLocationGroupBy) Float64sX

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

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

func (*StorageLocationGroupBy) Int

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

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

func (*StorageLocationGroupBy) IntX

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

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

func (*StorageLocationGroupBy) Ints

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

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

func (*StorageLocationGroupBy) IntsX

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

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

func (*StorageLocationGroupBy) Scan

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

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

func (*StorageLocationGroupBy) ScanX

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

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

func (*StorageLocationGroupBy) String

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

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

func (*StorageLocationGroupBy) StringX

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

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

func (*StorageLocationGroupBy) Strings

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

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

func (*StorageLocationGroupBy) StringsX

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

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

type StorageLocationMutation

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

StorageLocationMutation represents an operation that mutates the StorageLocation nodes in the graph.

func (*StorageLocationMutation) AddCacheEntryIDs

func (m *StorageLocationMutation) AddCacheEntryIDs(ids ...string)

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by ids.

func (*StorageLocationMutation) AddDeletionRequestedAt

func (m *StorageLocationMutation) AddDeletionRequestedAt(i int64)

AddDeletionRequestedAt adds i to the "deletionRequestedAt" field.

func (*StorageLocationMutation) AddField

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) AddLastDownloadedAt

func (m *StorageLocationMutation) AddLastDownloadedAt(i int64)

AddLastDownloadedAt adds i to the "lastDownloadedAt" field.

func (*StorageLocationMutation) AddLeaseVersion

func (m *StorageLocationMutation) AddLeaseVersion(i int64)

AddLeaseVersion adds i to the "leaseVersion" field.

func (*StorageLocationMutation) AddMaterializationUnsupportedAt

func (m *StorageLocationMutation) AddMaterializationUnsupportedAt(i int64)

AddMaterializationUnsupportedAt adds i to the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) AddMergeLeaseExpiresAt

func (m *StorageLocationMutation) AddMergeLeaseExpiresAt(i int64)

AddMergeLeaseExpiresAt adds i to the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) AddMergeStartedAt

func (m *StorageLocationMutation) AddMergeStartedAt(i int64)

AddMergeStartedAt adds i to the "mergeStartedAt" field.

func (*StorageLocationMutation) AddMergedAt

func (m *StorageLocationMutation) AddMergedAt(i int64)

AddMergedAt adds i to the "mergedAt" field.

func (*StorageLocationMutation) AddPartCount

func (m *StorageLocationMutation) AddPartCount(i int)

AddPartCount adds i to the "partCount" field.

func (*StorageLocationMutation) AddPartsDeletedAt

func (m *StorageLocationMutation) AddPartsDeletedAt(i int64)

AddPartsDeletedAt adds i to the "partsDeletedAt" field.

func (*StorageLocationMutation) AddReaderLeaseIDs

func (m *StorageLocationMutation) AddReaderLeaseIDs(ids ...string)

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by ids.

func (*StorageLocationMutation) AddRecencyAt

func (m *StorageLocationMutation) AddRecencyAt(i int64)

AddRecencyAt adds i to the "recencyAt" field.

func (*StorageLocationMutation) AddSizeBytes

func (m *StorageLocationMutation) AddSizeBytes(i int64)

AddSizeBytes adds i to the "sizeBytes" field.

func (*StorageLocationMutation) AddedDeletionRequestedAt

func (m *StorageLocationMutation) AddedDeletionRequestedAt() (r int64, exists bool)

AddedDeletionRequestedAt returns the value that was added to the "deletionRequestedAt" field in this mutation.

func (*StorageLocationMutation) AddedEdges

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

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

func (*StorageLocationMutation) AddedField

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

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

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

func (*StorageLocationMutation) AddedIDs

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

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

func (*StorageLocationMutation) AddedLastDownloadedAt

func (m *StorageLocationMutation) AddedLastDownloadedAt() (r int64, exists bool)

AddedLastDownloadedAt returns the value that was added to the "lastDownloadedAt" field in this mutation.

func (*StorageLocationMutation) AddedLeaseVersion

func (m *StorageLocationMutation) AddedLeaseVersion() (r int64, exists bool)

AddedLeaseVersion returns the value that was added to the "leaseVersion" field in this mutation.

func (*StorageLocationMutation) AddedMaterializationUnsupportedAt

func (m *StorageLocationMutation) AddedMaterializationUnsupportedAt() (r int64, exists bool)

AddedMaterializationUnsupportedAt returns the value that was added to the "materializationUnsupportedAt" field in this mutation.

func (*StorageLocationMutation) AddedMergeLeaseExpiresAt

func (m *StorageLocationMutation) AddedMergeLeaseExpiresAt() (r int64, exists bool)

AddedMergeLeaseExpiresAt returns the value that was added to the "mergeLeaseExpiresAt" field in this mutation.

func (*StorageLocationMutation) AddedMergeStartedAt

func (m *StorageLocationMutation) AddedMergeStartedAt() (r int64, exists bool)

AddedMergeStartedAt returns the value that was added to the "mergeStartedAt" field in this mutation.

func (*StorageLocationMutation) AddedMergedAt

func (m *StorageLocationMutation) AddedMergedAt() (r int64, exists bool)

AddedMergedAt returns the value that was added to the "mergedAt" field in this mutation.

func (*StorageLocationMutation) AddedPartCount

func (m *StorageLocationMutation) AddedPartCount() (r int, exists bool)

AddedPartCount returns the value that was added to the "partCount" field in this mutation.

func (*StorageLocationMutation) AddedPartsDeletedAt

func (m *StorageLocationMutation) AddedPartsDeletedAt() (r int64, exists bool)

AddedPartsDeletedAt returns the value that was added to the "partsDeletedAt" field in this mutation.

func (*StorageLocationMutation) AddedRecencyAt

func (m *StorageLocationMutation) AddedRecencyAt() (r int64, exists bool)

AddedRecencyAt returns the value that was added to the "recencyAt" field in this mutation.

func (*StorageLocationMutation) AddedSizeBytes

func (m *StorageLocationMutation) AddedSizeBytes() (r int64, exists bool)

AddedSizeBytes returns the value that was added to the "sizeBytes" field in this mutation.

func (*StorageLocationMutation) CacheEntriesCleared

func (m *StorageLocationMutation) CacheEntriesCleared() bool

CacheEntriesCleared reports if the "cacheEntries" edge to the CacheEntry entity was cleared.

func (*StorageLocationMutation) CacheEntriesIDs

func (m *StorageLocationMutation) CacheEntriesIDs() (ids []string)

CacheEntriesIDs returns the "cacheEntries" edge IDs in the mutation.

func (*StorageLocationMutation) ClearCacheEntries

func (m *StorageLocationMutation) ClearCacheEntries()

ClearCacheEntries clears the "cacheEntries" edge to the CacheEntry entity.

func (*StorageLocationMutation) ClearDeletionRequestedAt

func (m *StorageLocationMutation) ClearDeletionRequestedAt()

ClearDeletionRequestedAt clears the value of the "deletionRequestedAt" field.

func (*StorageLocationMutation) ClearEdge

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

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) ClearLastDownloadedAt

func (m *StorageLocationMutation) ClearLastDownloadedAt()

ClearLastDownloadedAt clears the value of the "lastDownloadedAt" field.

func (*StorageLocationMutation) ClearManifest added in v1.2.2

func (m *StorageLocationMutation) ClearManifest()

ClearManifest clears the "manifest" edge to the StorageManifest entity.

func (*StorageLocationMutation) ClearManifestAnchor added in v1.2.2

func (m *StorageLocationMutation) ClearManifestAnchor()

ClearManifestAnchor clears the value of the "manifestAnchor" field.

func (*StorageLocationMutation) ClearMaterializationUnsupportedAt

func (m *StorageLocationMutation) ClearMaterializationUnsupportedAt()

ClearMaterializationUnsupportedAt clears the value of the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) ClearMergeLeaseExpiresAt

func (m *StorageLocationMutation) ClearMergeLeaseExpiresAt()

ClearMergeLeaseExpiresAt clears the value of the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) ClearMergeLeaseToken

func (m *StorageLocationMutation) ClearMergeLeaseToken()

ClearMergeLeaseToken clears the value of the "mergeLeaseToken" field.

func (*StorageLocationMutation) ClearMergeStartedAt

func (m *StorageLocationMutation) ClearMergeStartedAt()

ClearMergeStartedAt clears the value of the "mergeStartedAt" field.

func (*StorageLocationMutation) ClearMergedAt

func (m *StorageLocationMutation) ClearMergedAt()

ClearMergedAt clears the value of the "mergedAt" field.

func (*StorageLocationMutation) ClearPartsDeletedAt

func (m *StorageLocationMutation) ClearPartsDeletedAt()

ClearPartsDeletedAt clears the value of the "partsDeletedAt" field.

func (*StorageLocationMutation) ClearReaderLeases

func (m *StorageLocationMutation) ClearReaderLeases()

ClearReaderLeases clears the "readerLeases" edge to the StorageReaderLease entity.

func (*StorageLocationMutation) ClearSizeBytes

func (m *StorageLocationMutation) ClearSizeBytes()

ClearSizeBytes clears the value of the "sizeBytes" field.

func (*StorageLocationMutation) ClearedEdges

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

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

func (*StorageLocationMutation) ClearedFields

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

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

func (StorageLocationMutation) Client

func (m StorageLocationMutation) 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 (*StorageLocationMutation) DeletionRequestedAt

func (m *StorageLocationMutation) DeletionRequestedAt() (r int64, exists bool)

DeletionRequestedAt returns the value of the "deletionRequestedAt" field in the mutation.

func (*StorageLocationMutation) DeletionRequestedAtCleared

func (m *StorageLocationMutation) DeletionRequestedAtCleared() bool

DeletionRequestedAtCleared returns if the "deletionRequestedAt" field was cleared in this mutation.

func (*StorageLocationMutation) EdgeCleared

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

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

func (*StorageLocationMutation) ExecContext

func (c *StorageLocationMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationMutation) Field

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

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

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

func (*StorageLocationMutation) Fields

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) FolderName

func (m *StorageLocationMutation) FolderName() (r string, exists bool)

FolderName returns the value of the "folderName" field in the mutation.

func (*StorageLocationMutation) ID

func (m *StorageLocationMutation) ID() (id string, 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 (*StorageLocationMutation) 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 (*StorageLocationMutation) LastDownloadedAt

func (m *StorageLocationMutation) LastDownloadedAt() (r int64, exists bool)

LastDownloadedAt returns the value of the "lastDownloadedAt" field in the mutation.

func (*StorageLocationMutation) LastDownloadedAtCleared

func (m *StorageLocationMutation) LastDownloadedAtCleared() bool

LastDownloadedAtCleared returns if the "lastDownloadedAt" field was cleared in this mutation.

func (*StorageLocationMutation) LeaseVersion

func (m *StorageLocationMutation) LeaseVersion() (r int64, exists bool)

LeaseVersion returns the value of the "leaseVersion" field in the mutation.

func (*StorageLocationMutation) ManifestAnchor added in v1.2.2

func (m *StorageLocationMutation) ManifestAnchor() (r string, exists bool)

ManifestAnchor returns the value of the "manifestAnchor" field in the mutation.

func (*StorageLocationMutation) ManifestAnchorCleared added in v1.2.2

func (m *StorageLocationMutation) ManifestAnchorCleared() bool

ManifestAnchorCleared returns if the "manifestAnchor" field was cleared in this mutation.

func (*StorageLocationMutation) ManifestCleared added in v1.2.2

func (m *StorageLocationMutation) ManifestCleared() bool

ManifestCleared reports if the "manifest" edge to the StorageManifest entity was cleared.

func (*StorageLocationMutation) ManifestID added in v1.2.2

func (m *StorageLocationMutation) ManifestID() (id int, exists bool)

ManifestID returns the "manifest" edge ID in the mutation.

func (*StorageLocationMutation) ManifestIDs added in v1.2.2

func (m *StorageLocationMutation) ManifestIDs() (ids []int)

ManifestIDs returns the "manifest" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ManifestID instead. It exists only for internal usage by the builders.

func (*StorageLocationMutation) MaterializationUnsupportedAt

func (m *StorageLocationMutation) MaterializationUnsupportedAt() (r int64, exists bool)

MaterializationUnsupportedAt returns the value of the "materializationUnsupportedAt" field in the mutation.

func (*StorageLocationMutation) MaterializationUnsupportedAtCleared

func (m *StorageLocationMutation) MaterializationUnsupportedAtCleared() bool

MaterializationUnsupportedAtCleared returns if the "materializationUnsupportedAt" field was cleared in this mutation.

func (*StorageLocationMutation) MergeLeaseExpiresAt

func (m *StorageLocationMutation) MergeLeaseExpiresAt() (r int64, exists bool)

MergeLeaseExpiresAt returns the value of the "mergeLeaseExpiresAt" field in the mutation.

func (*StorageLocationMutation) MergeLeaseExpiresAtCleared

func (m *StorageLocationMutation) MergeLeaseExpiresAtCleared() bool

MergeLeaseExpiresAtCleared returns if the "mergeLeaseExpiresAt" field was cleared in this mutation.

func (*StorageLocationMutation) MergeLeaseToken

func (m *StorageLocationMutation) MergeLeaseToken() (r string, exists bool)

MergeLeaseToken returns the value of the "mergeLeaseToken" field in the mutation.

func (*StorageLocationMutation) MergeLeaseTokenCleared

func (m *StorageLocationMutation) MergeLeaseTokenCleared() bool

MergeLeaseTokenCleared returns if the "mergeLeaseToken" field was cleared in this mutation.

func (*StorageLocationMutation) MergeStartedAt

func (m *StorageLocationMutation) MergeStartedAt() (r int64, exists bool)

MergeStartedAt returns the value of the "mergeStartedAt" field in the mutation.

func (*StorageLocationMutation) MergeStartedAtCleared

func (m *StorageLocationMutation) MergeStartedAtCleared() bool

MergeStartedAtCleared returns if the "mergeStartedAt" field was cleared in this mutation.

func (*StorageLocationMutation) MergedAt

func (m *StorageLocationMutation) MergedAt() (r int64, exists bool)

MergedAt returns the value of the "mergedAt" field in the mutation.

func (*StorageLocationMutation) MergedAtCleared

func (m *StorageLocationMutation) MergedAtCleared() bool

MergedAtCleared returns if the "mergedAt" field was cleared in this mutation.

func (*StorageLocationMutation) OldDeletionRequestedAt

func (m *StorageLocationMutation) OldDeletionRequestedAt(ctx context.Context) (v *int64, err error)

OldDeletionRequestedAt returns the old "deletionRequestedAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldField

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) OldFolderName

func (m *StorageLocationMutation) OldFolderName(ctx context.Context) (v string, err error)

OldFolderName returns the old "folderName" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldLastDownloadedAt

func (m *StorageLocationMutation) OldLastDownloadedAt(ctx context.Context) (v *int64, err error)

OldLastDownloadedAt returns the old "lastDownloadedAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldLeaseVersion

func (m *StorageLocationMutation) OldLeaseVersion(ctx context.Context) (v int64, err error)

OldLeaseVersion returns the old "leaseVersion" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldManifestAnchor added in v1.2.2

func (m *StorageLocationMutation) OldManifestAnchor(ctx context.Context) (v *string, err error)

OldManifestAnchor returns the old "manifestAnchor" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldMaterializationUnsupportedAt

func (m *StorageLocationMutation) OldMaterializationUnsupportedAt(ctx context.Context) (v *int64, err error)

OldMaterializationUnsupportedAt returns the old "materializationUnsupportedAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldMergeLeaseExpiresAt

func (m *StorageLocationMutation) OldMergeLeaseExpiresAt(ctx context.Context) (v *int64, err error)

OldMergeLeaseExpiresAt returns the old "mergeLeaseExpiresAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldMergeLeaseToken

func (m *StorageLocationMutation) OldMergeLeaseToken(ctx context.Context) (v *string, err error)

OldMergeLeaseToken returns the old "mergeLeaseToken" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldMergeStartedAt

func (m *StorageLocationMutation) OldMergeStartedAt(ctx context.Context) (v *int64, err error)

OldMergeStartedAt returns the old "mergeStartedAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldMergedAt

func (m *StorageLocationMutation) OldMergedAt(ctx context.Context) (v *int64, err error)

OldMergedAt returns the old "mergedAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldPartCount

func (m *StorageLocationMutation) OldPartCount(ctx context.Context) (v int, err error)

OldPartCount returns the old "partCount" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldPartsDeletedAt

func (m *StorageLocationMutation) OldPartsDeletedAt(ctx context.Context) (v *int64, err error)

OldPartsDeletedAt returns the old "partsDeletedAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldRecencyAt

func (m *StorageLocationMutation) OldRecencyAt(ctx context.Context) (v int64, err error)

OldRecencyAt returns the old "recencyAt" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) OldSizeBytes

func (m *StorageLocationMutation) OldSizeBytes(ctx context.Context) (v *int64, err error)

OldSizeBytes returns the old "sizeBytes" field's value of the StorageLocation entity. If the StorageLocation 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 (*StorageLocationMutation) Op

func (m *StorageLocationMutation) Op() Op

Op returns the operation name.

func (*StorageLocationMutation) PartCount

func (m *StorageLocationMutation) PartCount() (r int, exists bool)

PartCount returns the value of the "partCount" field in the mutation.

func (*StorageLocationMutation) PartsDeletedAt

func (m *StorageLocationMutation) PartsDeletedAt() (r int64, exists bool)

PartsDeletedAt returns the value of the "partsDeletedAt" field in the mutation.

func (*StorageLocationMutation) PartsDeletedAtCleared

func (m *StorageLocationMutation) PartsDeletedAtCleared() bool

PartsDeletedAtCleared returns if the "partsDeletedAt" field was cleared in this mutation.

func (*StorageLocationMutation) QueryContext

func (c *StorageLocationMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationMutation) ReaderLeasesCleared

func (m *StorageLocationMutation) ReaderLeasesCleared() bool

ReaderLeasesCleared reports if the "readerLeases" edge to the StorageReaderLease entity was cleared.

func (*StorageLocationMutation) ReaderLeasesIDs

func (m *StorageLocationMutation) ReaderLeasesIDs() (ids []string)

ReaderLeasesIDs returns the "readerLeases" edge IDs in the mutation.

func (*StorageLocationMutation) RecencyAt

func (m *StorageLocationMutation) RecencyAt() (r int64, exists bool)

RecencyAt returns the value of the "recencyAt" field in the mutation.

func (*StorageLocationMutation) RemoveCacheEntryIDs

func (m *StorageLocationMutation) RemoveCacheEntryIDs(ids ...string)

RemoveCacheEntryIDs removes the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationMutation) RemoveReaderLeaseIDs

func (m *StorageLocationMutation) RemoveReaderLeaseIDs(ids ...string)

RemoveReaderLeaseIDs removes the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationMutation) RemovedCacheEntriesIDs

func (m *StorageLocationMutation) RemovedCacheEntriesIDs() (ids []string)

RemovedCacheEntries returns the removed IDs of the "cacheEntries" edge to the CacheEntry entity.

func (*StorageLocationMutation) RemovedEdges

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

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

func (*StorageLocationMutation) RemovedIDs

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) RemovedReaderLeasesIDs

func (m *StorageLocationMutation) RemovedReaderLeasesIDs() (ids []string)

RemovedReaderLeases returns the removed IDs of the "readerLeases" edge to the StorageReaderLease entity.

func (*StorageLocationMutation) ResetCacheEntries

func (m *StorageLocationMutation) ResetCacheEntries()

ResetCacheEntries resets all changes to the "cacheEntries" edge.

func (*StorageLocationMutation) ResetDeletionRequestedAt

func (m *StorageLocationMutation) ResetDeletionRequestedAt()

ResetDeletionRequestedAt resets all changes to the "deletionRequestedAt" field.

func (*StorageLocationMutation) ResetEdge

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

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) ResetFolderName

func (m *StorageLocationMutation) ResetFolderName()

ResetFolderName resets all changes to the "folderName" field.

func (*StorageLocationMutation) ResetLastDownloadedAt

func (m *StorageLocationMutation) ResetLastDownloadedAt()

ResetLastDownloadedAt resets all changes to the "lastDownloadedAt" field.

func (*StorageLocationMutation) ResetLeaseVersion

func (m *StorageLocationMutation) ResetLeaseVersion()

ResetLeaseVersion resets all changes to the "leaseVersion" field.

func (*StorageLocationMutation) ResetManifest added in v1.2.2

func (m *StorageLocationMutation) ResetManifest()

ResetManifest resets all changes to the "manifest" edge.

func (*StorageLocationMutation) ResetManifestAnchor added in v1.2.2

func (m *StorageLocationMutation) ResetManifestAnchor()

ResetManifestAnchor resets all changes to the "manifestAnchor" field.

func (*StorageLocationMutation) ResetMaterializationUnsupportedAt

func (m *StorageLocationMutation) ResetMaterializationUnsupportedAt()

ResetMaterializationUnsupportedAt resets all changes to the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) ResetMergeLeaseExpiresAt

func (m *StorageLocationMutation) ResetMergeLeaseExpiresAt()

ResetMergeLeaseExpiresAt resets all changes to the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) ResetMergeLeaseToken

func (m *StorageLocationMutation) ResetMergeLeaseToken()

ResetMergeLeaseToken resets all changes to the "mergeLeaseToken" field.

func (*StorageLocationMutation) ResetMergeStartedAt

func (m *StorageLocationMutation) ResetMergeStartedAt()

ResetMergeStartedAt resets all changes to the "mergeStartedAt" field.

func (*StorageLocationMutation) ResetMergedAt

func (m *StorageLocationMutation) ResetMergedAt()

ResetMergedAt resets all changes to the "mergedAt" field.

func (*StorageLocationMutation) ResetPartCount

func (m *StorageLocationMutation) ResetPartCount()

ResetPartCount resets all changes to the "partCount" field.

func (*StorageLocationMutation) ResetPartsDeletedAt

func (m *StorageLocationMutation) ResetPartsDeletedAt()

ResetPartsDeletedAt resets all changes to the "partsDeletedAt" field.

func (*StorageLocationMutation) ResetReaderLeases

func (m *StorageLocationMutation) ResetReaderLeases()

ResetReaderLeases resets all changes to the "readerLeases" edge.

func (*StorageLocationMutation) ResetRecencyAt

func (m *StorageLocationMutation) ResetRecencyAt()

ResetRecencyAt resets all changes to the "recencyAt" field.

func (*StorageLocationMutation) ResetSizeBytes

func (m *StorageLocationMutation) ResetSizeBytes()

ResetSizeBytes resets all changes to the "sizeBytes" field.

func (*StorageLocationMutation) SetDeletionRequestedAt

func (m *StorageLocationMutation) SetDeletionRequestedAt(i int64)

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationMutation) SetField

func (m *StorageLocationMutation) 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 (*StorageLocationMutation) SetFolderName

func (m *StorageLocationMutation) SetFolderName(s string)

SetFolderName sets the "folderName" field.

func (*StorageLocationMutation) SetID

func (m *StorageLocationMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of StorageLocation entities.

func (*StorageLocationMutation) SetLastDownloadedAt

func (m *StorageLocationMutation) SetLastDownloadedAt(i int64)

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationMutation) SetLeaseVersion

func (m *StorageLocationMutation) SetLeaseVersion(i int64)

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationMutation) SetManifestAnchor added in v1.2.2

func (m *StorageLocationMutation) SetManifestAnchor(s string)

SetManifestAnchor sets the "manifestAnchor" field.

func (*StorageLocationMutation) SetManifestID added in v1.2.2

func (m *StorageLocationMutation) SetManifestID(id int)

SetManifestID sets the "manifest" edge to the StorageManifest entity by id.

func (*StorageLocationMutation) SetMaterializationUnsupportedAt

func (m *StorageLocationMutation) SetMaterializationUnsupportedAt(i int64)

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationMutation) SetMergeLeaseExpiresAt

func (m *StorageLocationMutation) SetMergeLeaseExpiresAt(i int64)

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationMutation) SetMergeLeaseToken

func (m *StorageLocationMutation) SetMergeLeaseToken(s string)

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationMutation) SetMergeStartedAt

func (m *StorageLocationMutation) SetMergeStartedAt(i int64)

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationMutation) SetMergedAt

func (m *StorageLocationMutation) SetMergedAt(i int64)

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationMutation) SetOp

func (m *StorageLocationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StorageLocationMutation) SetPartCount

func (m *StorageLocationMutation) SetPartCount(i int)

SetPartCount sets the "partCount" field.

func (*StorageLocationMutation) SetPartsDeletedAt

func (m *StorageLocationMutation) SetPartsDeletedAt(i int64)

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationMutation) SetRecencyAt

func (m *StorageLocationMutation) SetRecencyAt(i int64)

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationMutation) SetSizeBytes

func (m *StorageLocationMutation) SetSizeBytes(i int64)

SetSizeBytes sets the "sizeBytes" field.

func (*StorageLocationMutation) SizeBytes

func (m *StorageLocationMutation) SizeBytes() (r int64, exists bool)

SizeBytes returns the value of the "sizeBytes" field in the mutation.

func (*StorageLocationMutation) SizeBytesCleared

func (m *StorageLocationMutation) SizeBytesCleared() bool

SizeBytesCleared returns if the "sizeBytes" field was cleared in this mutation.

func (StorageLocationMutation) Tx

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

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

func (*StorageLocationMutation) Type

func (m *StorageLocationMutation) Type() string

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

func (*StorageLocationMutation) Where

Where appends a list predicates to the StorageLocationMutation builder.

func (*StorageLocationMutation) WhereP

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

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

type StorageLocationQuery

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

StorageLocationQuery is the builder for querying StorageLocation entities.

func (*StorageLocationQuery) Aggregate

Aggregate returns a StorageLocationSelect configured with the given aggregations.

func (*StorageLocationQuery) All

All executes the query and returns a list of StorageLocations.

func (*StorageLocationQuery) AllX

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

func (*StorageLocationQuery) Clone

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

func (*StorageLocationQuery) Count

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

Count returns the count of the given query.

func (*StorageLocationQuery) CountX

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

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

func (*StorageLocationQuery) ExecContext

func (c *StorageLocationQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationQuery) Exist

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

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

func (*StorageLocationQuery) ExistX

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

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

func (*StorageLocationQuery) First

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

func (*StorageLocationQuery) FirstID

func (_q *StorageLocationQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*StorageLocationQuery) FirstIDX

func (_q *StorageLocationQuery) FirstIDX(ctx context.Context) string

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

func (*StorageLocationQuery) FirstX

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

func (*StorageLocationQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*StorageLocationQuery) ForUpdate

func (_q *StorageLocationQuery) ForUpdate(opts ...sql.LockOption) *StorageLocationQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*StorageLocationQuery) GroupBy

func (_q *StorageLocationQuery) GroupBy(field string, fields ...string) *StorageLocationGroupBy

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

client.StorageLocation.Query().
	GroupBy(storagelocation.FieldFolderName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StorageLocationQuery) IDs

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

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

func (*StorageLocationQuery) IDsX

func (_q *StorageLocationQuery) IDsX(ctx context.Context) []string

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

func (*StorageLocationQuery) Limit

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

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

func (*StorageLocationQuery) Offset

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

Offset to start from.

func (*StorageLocationQuery) Only

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

func (*StorageLocationQuery) OnlyID

func (_q *StorageLocationQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*StorageLocationQuery) OnlyIDX

func (_q *StorageLocationQuery) OnlyIDX(ctx context.Context) string

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

func (*StorageLocationQuery) OnlyX

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

func (*StorageLocationQuery) Order

Order specifies how the records should be ordered.

func (*StorageLocationQuery) QueryCacheEntries

func (_q *StorageLocationQuery) QueryCacheEntries() *CacheEntryQuery

QueryCacheEntries chains the current query on the "cacheEntries" edge.

func (*StorageLocationQuery) QueryContext

func (c *StorageLocationQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationQuery) QueryManifest added in v1.2.2

func (_q *StorageLocationQuery) QueryManifest() *StorageManifestQuery

QueryManifest chains the current query on the "manifest" edge.

func (*StorageLocationQuery) QueryReaderLeases

func (_q *StorageLocationQuery) QueryReaderLeases() *StorageReaderLeaseQuery

QueryReaderLeases chains the current query on the "readerLeases" edge.

func (*StorageLocationQuery) Select

func (_q *StorageLocationQuery) Select(fields ...string) *StorageLocationSelect

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

client.StorageLocation.Query().
	Select(storagelocation.FieldFolderName).
	Scan(ctx, &v)

func (*StorageLocationQuery) Unique

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

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

Where adds a new predicate for the StorageLocationQuery builder.

func (*StorageLocationQuery) WithCacheEntries

func (_q *StorageLocationQuery) WithCacheEntries(opts ...func(*CacheEntryQuery)) *StorageLocationQuery

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

func (*StorageLocationQuery) WithManifest added in v1.2.2

func (_q *StorageLocationQuery) WithManifest(opts ...func(*StorageManifestQuery)) *StorageLocationQuery

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

func (*StorageLocationQuery) WithReaderLeases

func (_q *StorageLocationQuery) WithReaderLeases(opts ...func(*StorageReaderLeaseQuery)) *StorageLocationQuery

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

type StorageLocationSelect

type StorageLocationSelect struct {
	*StorageLocationQuery
	// contains filtered or unexported fields
}

StorageLocationSelect is the builder for selecting fields of StorageLocation entities.

func (*StorageLocationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*StorageLocationSelect) Bool

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

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

func (*StorageLocationSelect) BoolX

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

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

func (*StorageLocationSelect) Bools

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

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

func (*StorageLocationSelect) BoolsX

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

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

func (StorageLocationSelect) ExecContext

func (c StorageLocationSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationSelect) Float64

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

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

func (*StorageLocationSelect) Float64X

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

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

func (*StorageLocationSelect) Float64s

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

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

func (*StorageLocationSelect) Float64sX

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

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

func (*StorageLocationSelect) Int

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

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

func (*StorageLocationSelect) IntX

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

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

func (*StorageLocationSelect) Ints

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

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

func (*StorageLocationSelect) IntsX

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

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

func (StorageLocationSelect) QueryContext

func (c StorageLocationSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationSelect) Scan

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

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

func (*StorageLocationSelect) ScanX

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

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

func (*StorageLocationSelect) String

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

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

func (*StorageLocationSelect) StringX

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

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

func (*StorageLocationSelect) Strings

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

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

func (*StorageLocationSelect) StringsX

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

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

type StorageLocationUpdate

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

StorageLocationUpdate is the builder for updating StorageLocation entities.

func (*StorageLocationUpdate) AddCacheEntries

func (_u *StorageLocationUpdate) AddCacheEntries(v ...*CacheEntry) *StorageLocationUpdate

AddCacheEntries adds the "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdate) AddCacheEntryIDs

func (_u *StorageLocationUpdate) AddCacheEntryIDs(ids ...string) *StorageLocationUpdate

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationUpdate) AddDeletionRequestedAt

func (_u *StorageLocationUpdate) AddDeletionRequestedAt(v int64) *StorageLocationUpdate

AddDeletionRequestedAt adds value to the "deletionRequestedAt" field.

func (*StorageLocationUpdate) AddLastDownloadedAt

func (_u *StorageLocationUpdate) AddLastDownloadedAt(v int64) *StorageLocationUpdate

AddLastDownloadedAt adds value to the "lastDownloadedAt" field.

func (*StorageLocationUpdate) AddLeaseVersion

func (_u *StorageLocationUpdate) AddLeaseVersion(v int64) *StorageLocationUpdate

AddLeaseVersion adds value to the "leaseVersion" field.

func (*StorageLocationUpdate) AddMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) AddMaterializationUnsupportedAt(v int64) *StorageLocationUpdate

AddMaterializationUnsupportedAt adds value to the "materializationUnsupportedAt" field.

func (*StorageLocationUpdate) AddMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) AddMergeLeaseExpiresAt(v int64) *StorageLocationUpdate

AddMergeLeaseExpiresAt adds value to the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdate) AddMergeStartedAt

func (_u *StorageLocationUpdate) AddMergeStartedAt(v int64) *StorageLocationUpdate

AddMergeStartedAt adds value to the "mergeStartedAt" field.

func (*StorageLocationUpdate) AddMergedAt

AddMergedAt adds value to the "mergedAt" field.

func (*StorageLocationUpdate) AddPartCount

func (_u *StorageLocationUpdate) AddPartCount(v int) *StorageLocationUpdate

AddPartCount adds value to the "partCount" field.

func (*StorageLocationUpdate) AddPartsDeletedAt

func (_u *StorageLocationUpdate) AddPartsDeletedAt(v int64) *StorageLocationUpdate

AddPartsDeletedAt adds value to the "partsDeletedAt" field.

func (*StorageLocationUpdate) AddReaderLeaseIDs

func (_u *StorageLocationUpdate) AddReaderLeaseIDs(ids ...string) *StorageLocationUpdate

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationUpdate) AddReaderLeases

AddReaderLeases adds the "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdate) AddRecencyAt

func (_u *StorageLocationUpdate) AddRecencyAt(v int64) *StorageLocationUpdate

AddRecencyAt adds value to the "recencyAt" field.

func (*StorageLocationUpdate) AddSizeBytes

func (_u *StorageLocationUpdate) AddSizeBytes(v int64) *StorageLocationUpdate

AddSizeBytes adds value to the "sizeBytes" field.

func (*StorageLocationUpdate) ClearCacheEntries

func (_u *StorageLocationUpdate) ClearCacheEntries() *StorageLocationUpdate

ClearCacheEntries clears all "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdate) ClearDeletionRequestedAt

func (_u *StorageLocationUpdate) ClearDeletionRequestedAt() *StorageLocationUpdate

ClearDeletionRequestedAt clears the value of the "deletionRequestedAt" field.

func (*StorageLocationUpdate) ClearLastDownloadedAt

func (_u *StorageLocationUpdate) ClearLastDownloadedAt() *StorageLocationUpdate

ClearLastDownloadedAt clears the value of the "lastDownloadedAt" field.

func (*StorageLocationUpdate) ClearManifest added in v1.2.2

func (_u *StorageLocationUpdate) ClearManifest() *StorageLocationUpdate

ClearManifest clears the "manifest" edge to the StorageManifest entity.

func (*StorageLocationUpdate) ClearMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) ClearMaterializationUnsupportedAt() *StorageLocationUpdate

ClearMaterializationUnsupportedAt clears the value of the "materializationUnsupportedAt" field.

func (*StorageLocationUpdate) ClearMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) ClearMergeLeaseExpiresAt() *StorageLocationUpdate

ClearMergeLeaseExpiresAt clears the value of the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdate) ClearMergeLeaseToken

func (_u *StorageLocationUpdate) ClearMergeLeaseToken() *StorageLocationUpdate

ClearMergeLeaseToken clears the value of the "mergeLeaseToken" field.

func (*StorageLocationUpdate) ClearMergeStartedAt

func (_u *StorageLocationUpdate) ClearMergeStartedAt() *StorageLocationUpdate

ClearMergeStartedAt clears the value of the "mergeStartedAt" field.

func (*StorageLocationUpdate) ClearMergedAt

func (_u *StorageLocationUpdate) ClearMergedAt() *StorageLocationUpdate

ClearMergedAt clears the value of the "mergedAt" field.

func (*StorageLocationUpdate) ClearPartsDeletedAt

func (_u *StorageLocationUpdate) ClearPartsDeletedAt() *StorageLocationUpdate

ClearPartsDeletedAt clears the value of the "partsDeletedAt" field.

func (*StorageLocationUpdate) ClearReaderLeases

func (_u *StorageLocationUpdate) ClearReaderLeases() *StorageLocationUpdate

ClearReaderLeases clears all "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdate) ClearSizeBytes

func (_u *StorageLocationUpdate) ClearSizeBytes() *StorageLocationUpdate

ClearSizeBytes clears the value of the "sizeBytes" field.

func (*StorageLocationUpdate) Exec

Exec executes the query.

func (*StorageLocationUpdate) ExecContext

func (c *StorageLocationUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationUpdate) ExecX

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

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

func (*StorageLocationUpdate) Mutation

Mutation returns the StorageLocationMutation object of the builder.

func (*StorageLocationUpdate) QueryContext

func (c *StorageLocationUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationUpdate) RemoveCacheEntries

func (_u *StorageLocationUpdate) RemoveCacheEntries(v ...*CacheEntry) *StorageLocationUpdate

RemoveCacheEntries removes "cacheEntries" edges to CacheEntry entities.

func (*StorageLocationUpdate) RemoveCacheEntryIDs

func (_u *StorageLocationUpdate) RemoveCacheEntryIDs(ids ...string) *StorageLocationUpdate

RemoveCacheEntryIDs removes the "cacheEntries" edge to CacheEntry entities by IDs.

func (*StorageLocationUpdate) RemoveReaderLeaseIDs

func (_u *StorageLocationUpdate) RemoveReaderLeaseIDs(ids ...string) *StorageLocationUpdate

RemoveReaderLeaseIDs removes the "readerLeases" edge to StorageReaderLease entities by IDs.

func (*StorageLocationUpdate) RemoveReaderLeases

func (_u *StorageLocationUpdate) RemoveReaderLeases(v ...*StorageReaderLease) *StorageLocationUpdate

RemoveReaderLeases removes "readerLeases" edges to StorageReaderLease entities.

func (*StorageLocationUpdate) Save

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

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

func (*StorageLocationUpdate) SaveX

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

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

func (*StorageLocationUpdate) SetDeletionRequestedAt

func (_u *StorageLocationUpdate) SetDeletionRequestedAt(v int64) *StorageLocationUpdate

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationUpdate) SetFolderName

func (_u *StorageLocationUpdate) SetFolderName(v string) *StorageLocationUpdate

SetFolderName sets the "folderName" field.

func (*StorageLocationUpdate) SetLastDownloadedAt

func (_u *StorageLocationUpdate) SetLastDownloadedAt(v int64) *StorageLocationUpdate

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationUpdate) SetLeaseVersion

func (_u *StorageLocationUpdate) SetLeaseVersion(v int64) *StorageLocationUpdate

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationUpdate) SetManifest added in v1.2.2

SetManifest sets the "manifest" edge to the StorageManifest entity.

func (*StorageLocationUpdate) SetManifestID added in v1.2.2

func (_u *StorageLocationUpdate) SetManifestID(id int) *StorageLocationUpdate

SetManifestID sets the "manifest" edge to the StorageManifest entity by ID.

func (*StorageLocationUpdate) SetMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) SetMaterializationUnsupportedAt(v int64) *StorageLocationUpdate

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationUpdate) SetMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) SetMergeLeaseExpiresAt(v int64) *StorageLocationUpdate

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdate) SetMergeLeaseToken

func (_u *StorageLocationUpdate) SetMergeLeaseToken(v string) *StorageLocationUpdate

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationUpdate) SetMergeStartedAt

func (_u *StorageLocationUpdate) SetMergeStartedAt(v int64) *StorageLocationUpdate

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationUpdate) SetMergedAt

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationUpdate) SetNillableDeletionRequestedAt

func (_u *StorageLocationUpdate) SetNillableDeletionRequestedAt(v *int64) *StorageLocationUpdate

SetNillableDeletionRequestedAt sets the "deletionRequestedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableFolderName

func (_u *StorageLocationUpdate) SetNillableFolderName(v *string) *StorageLocationUpdate

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableLastDownloadedAt

func (_u *StorageLocationUpdate) SetNillableLastDownloadedAt(v *int64) *StorageLocationUpdate

SetNillableLastDownloadedAt sets the "lastDownloadedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableLeaseVersion

func (_u *StorageLocationUpdate) SetNillableLeaseVersion(v *int64) *StorageLocationUpdate

SetNillableLeaseVersion sets the "leaseVersion" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableManifestID added in v1.2.2

func (_u *StorageLocationUpdate) SetNillableManifestID(id *int) *StorageLocationUpdate

SetNillableManifestID sets the "manifest" edge to the StorageManifest entity by ID if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMaterializationUnsupportedAt

func (_u *StorageLocationUpdate) SetNillableMaterializationUnsupportedAt(v *int64) *StorageLocationUpdate

SetNillableMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergeLeaseExpiresAt

func (_u *StorageLocationUpdate) SetNillableMergeLeaseExpiresAt(v *int64) *StorageLocationUpdate

SetNillableMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergeLeaseToken

func (_u *StorageLocationUpdate) SetNillableMergeLeaseToken(v *string) *StorageLocationUpdate

SetNillableMergeLeaseToken sets the "mergeLeaseToken" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergeStartedAt

func (_u *StorageLocationUpdate) SetNillableMergeStartedAt(v *int64) *StorageLocationUpdate

SetNillableMergeStartedAt sets the "mergeStartedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableMergedAt

func (_u *StorageLocationUpdate) SetNillableMergedAt(v *int64) *StorageLocationUpdate

SetNillableMergedAt sets the "mergedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillablePartCount

func (_u *StorageLocationUpdate) SetNillablePartCount(v *int) *StorageLocationUpdate

SetNillablePartCount sets the "partCount" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillablePartsDeletedAt

func (_u *StorageLocationUpdate) SetNillablePartsDeletedAt(v *int64) *StorageLocationUpdate

SetNillablePartsDeletedAt sets the "partsDeletedAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableRecencyAt

func (_u *StorageLocationUpdate) SetNillableRecencyAt(v *int64) *StorageLocationUpdate

SetNillableRecencyAt sets the "recencyAt" field if the given value is not nil.

func (*StorageLocationUpdate) SetNillableSizeBytes

func (_u *StorageLocationUpdate) SetNillableSizeBytes(v *int64) *StorageLocationUpdate

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*StorageLocationUpdate) SetPartCount

func (_u *StorageLocationUpdate) SetPartCount(v int) *StorageLocationUpdate

SetPartCount sets the "partCount" field.

func (*StorageLocationUpdate) SetPartsDeletedAt

func (_u *StorageLocationUpdate) SetPartsDeletedAt(v int64) *StorageLocationUpdate

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationUpdate) SetRecencyAt

func (_u *StorageLocationUpdate) SetRecencyAt(v int64) *StorageLocationUpdate

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationUpdate) SetSizeBytes

func (_u *StorageLocationUpdate) SetSizeBytes(v int64) *StorageLocationUpdate

SetSizeBytes sets the "sizeBytes" field.

func (*StorageLocationUpdate) Where

Where appends a list predicates to the StorageLocationUpdate builder.

type StorageLocationUpdateOne

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

StorageLocationUpdateOne is the builder for updating a single StorageLocation entity.

func (*StorageLocationUpdateOne) AddCacheEntries

func (_u *StorageLocationUpdateOne) AddCacheEntries(v ...*CacheEntry) *StorageLocationUpdateOne

AddCacheEntries adds the "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdateOne) AddCacheEntryIDs

func (_u *StorageLocationUpdateOne) AddCacheEntryIDs(ids ...string) *StorageLocationUpdateOne

AddCacheEntryIDs adds the "cacheEntries" edge to the CacheEntry entity by IDs.

func (*StorageLocationUpdateOne) AddDeletionRequestedAt

func (_u *StorageLocationUpdateOne) AddDeletionRequestedAt(v int64) *StorageLocationUpdateOne

AddDeletionRequestedAt adds value to the "deletionRequestedAt" field.

func (*StorageLocationUpdateOne) AddLastDownloadedAt

func (_u *StorageLocationUpdateOne) AddLastDownloadedAt(v int64) *StorageLocationUpdateOne

AddLastDownloadedAt adds value to the "lastDownloadedAt" field.

func (*StorageLocationUpdateOne) AddLeaseVersion

AddLeaseVersion adds value to the "leaseVersion" field.

func (*StorageLocationUpdateOne) AddMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) AddMaterializationUnsupportedAt(v int64) *StorageLocationUpdateOne

AddMaterializationUnsupportedAt adds value to the "materializationUnsupportedAt" field.

func (*StorageLocationUpdateOne) AddMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) AddMergeLeaseExpiresAt(v int64) *StorageLocationUpdateOne

AddMergeLeaseExpiresAt adds value to the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdateOne) AddMergeStartedAt

func (_u *StorageLocationUpdateOne) AddMergeStartedAt(v int64) *StorageLocationUpdateOne

AddMergeStartedAt adds value to the "mergeStartedAt" field.

func (*StorageLocationUpdateOne) AddMergedAt

AddMergedAt adds value to the "mergedAt" field.

func (*StorageLocationUpdateOne) AddPartCount

AddPartCount adds value to the "partCount" field.

func (*StorageLocationUpdateOne) AddPartsDeletedAt

func (_u *StorageLocationUpdateOne) AddPartsDeletedAt(v int64) *StorageLocationUpdateOne

AddPartsDeletedAt adds value to the "partsDeletedAt" field.

func (*StorageLocationUpdateOne) AddReaderLeaseIDs

func (_u *StorageLocationUpdateOne) AddReaderLeaseIDs(ids ...string) *StorageLocationUpdateOne

AddReaderLeaseIDs adds the "readerLeases" edge to the StorageReaderLease entity by IDs.

func (*StorageLocationUpdateOne) AddReaderLeases

AddReaderLeases adds the "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdateOne) AddRecencyAt

AddRecencyAt adds value to the "recencyAt" field.

func (*StorageLocationUpdateOne) AddSizeBytes

AddSizeBytes adds value to the "sizeBytes" field.

func (*StorageLocationUpdateOne) ClearCacheEntries

func (_u *StorageLocationUpdateOne) ClearCacheEntries() *StorageLocationUpdateOne

ClearCacheEntries clears all "cacheEntries" edges to the CacheEntry entity.

func (*StorageLocationUpdateOne) ClearDeletionRequestedAt

func (_u *StorageLocationUpdateOne) ClearDeletionRequestedAt() *StorageLocationUpdateOne

ClearDeletionRequestedAt clears the value of the "deletionRequestedAt" field.

func (*StorageLocationUpdateOne) ClearLastDownloadedAt

func (_u *StorageLocationUpdateOne) ClearLastDownloadedAt() *StorageLocationUpdateOne

ClearLastDownloadedAt clears the value of the "lastDownloadedAt" field.

func (*StorageLocationUpdateOne) ClearManifest added in v1.2.2

ClearManifest clears the "manifest" edge to the StorageManifest entity.

func (*StorageLocationUpdateOne) ClearMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) ClearMaterializationUnsupportedAt() *StorageLocationUpdateOne

ClearMaterializationUnsupportedAt clears the value of the "materializationUnsupportedAt" field.

func (*StorageLocationUpdateOne) ClearMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) ClearMergeLeaseExpiresAt() *StorageLocationUpdateOne

ClearMergeLeaseExpiresAt clears the value of the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdateOne) ClearMergeLeaseToken

func (_u *StorageLocationUpdateOne) ClearMergeLeaseToken() *StorageLocationUpdateOne

ClearMergeLeaseToken clears the value of the "mergeLeaseToken" field.

func (*StorageLocationUpdateOne) ClearMergeStartedAt

func (_u *StorageLocationUpdateOne) ClearMergeStartedAt() *StorageLocationUpdateOne

ClearMergeStartedAt clears the value of the "mergeStartedAt" field.

func (*StorageLocationUpdateOne) ClearMergedAt

ClearMergedAt clears the value of the "mergedAt" field.

func (*StorageLocationUpdateOne) ClearPartsDeletedAt

func (_u *StorageLocationUpdateOne) ClearPartsDeletedAt() *StorageLocationUpdateOne

ClearPartsDeletedAt clears the value of the "partsDeletedAt" field.

func (*StorageLocationUpdateOne) ClearReaderLeases

func (_u *StorageLocationUpdateOne) ClearReaderLeases() *StorageLocationUpdateOne

ClearReaderLeases clears all "readerLeases" edges to the StorageReaderLease entity.

func (*StorageLocationUpdateOne) ClearSizeBytes

func (_u *StorageLocationUpdateOne) ClearSizeBytes() *StorageLocationUpdateOne

ClearSizeBytes clears the value of the "sizeBytes" field.

func (*StorageLocationUpdateOne) Exec

Exec executes the query on the entity.

func (*StorageLocationUpdateOne) ExecContext

func (c *StorageLocationUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageLocationUpdateOne) ExecX

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

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

func (*StorageLocationUpdateOne) Mutation

Mutation returns the StorageLocationMutation object of the builder.

func (*StorageLocationUpdateOne) QueryContext

func (c *StorageLocationUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageLocationUpdateOne) RemoveCacheEntries

func (_u *StorageLocationUpdateOne) RemoveCacheEntries(v ...*CacheEntry) *StorageLocationUpdateOne

RemoveCacheEntries removes "cacheEntries" edges to CacheEntry entities.

func (*StorageLocationUpdateOne) RemoveCacheEntryIDs

func (_u *StorageLocationUpdateOne) RemoveCacheEntryIDs(ids ...string) *StorageLocationUpdateOne

RemoveCacheEntryIDs removes the "cacheEntries" edge to CacheEntry entities by IDs.

func (*StorageLocationUpdateOne) RemoveReaderLeaseIDs

func (_u *StorageLocationUpdateOne) RemoveReaderLeaseIDs(ids ...string) *StorageLocationUpdateOne

RemoveReaderLeaseIDs removes the "readerLeases" edge to StorageReaderLease entities by IDs.

func (*StorageLocationUpdateOne) RemoveReaderLeases

RemoveReaderLeases removes "readerLeases" edges to StorageReaderLease entities.

func (*StorageLocationUpdateOne) Save

Save executes the query and returns the updated StorageLocation entity.

func (*StorageLocationUpdateOne) SaveX

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

func (*StorageLocationUpdateOne) Select

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

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

func (*StorageLocationUpdateOne) SetDeletionRequestedAt

func (_u *StorageLocationUpdateOne) SetDeletionRequestedAt(v int64) *StorageLocationUpdateOne

SetDeletionRequestedAt sets the "deletionRequestedAt" field.

func (*StorageLocationUpdateOne) SetFolderName

SetFolderName sets the "folderName" field.

func (*StorageLocationUpdateOne) SetLastDownloadedAt

func (_u *StorageLocationUpdateOne) SetLastDownloadedAt(v int64) *StorageLocationUpdateOne

SetLastDownloadedAt sets the "lastDownloadedAt" field.

func (*StorageLocationUpdateOne) SetLeaseVersion

SetLeaseVersion sets the "leaseVersion" field.

func (*StorageLocationUpdateOne) SetManifest added in v1.2.2

SetManifest sets the "manifest" edge to the StorageManifest entity.

func (*StorageLocationUpdateOne) SetManifestID added in v1.2.2

func (_u *StorageLocationUpdateOne) SetManifestID(id int) *StorageLocationUpdateOne

SetManifestID sets the "manifest" edge to the StorageManifest entity by ID.

func (*StorageLocationUpdateOne) SetMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) SetMaterializationUnsupportedAt(v int64) *StorageLocationUpdateOne

SetMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field.

func (*StorageLocationUpdateOne) SetMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) SetMergeLeaseExpiresAt(v int64) *StorageLocationUpdateOne

SetMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field.

func (*StorageLocationUpdateOne) SetMergeLeaseToken

func (_u *StorageLocationUpdateOne) SetMergeLeaseToken(v string) *StorageLocationUpdateOne

SetMergeLeaseToken sets the "mergeLeaseToken" field.

func (*StorageLocationUpdateOne) SetMergeStartedAt

func (_u *StorageLocationUpdateOne) SetMergeStartedAt(v int64) *StorageLocationUpdateOne

SetMergeStartedAt sets the "mergeStartedAt" field.

func (*StorageLocationUpdateOne) SetMergedAt

SetMergedAt sets the "mergedAt" field.

func (*StorageLocationUpdateOne) SetNillableDeletionRequestedAt

func (_u *StorageLocationUpdateOne) SetNillableDeletionRequestedAt(v *int64) *StorageLocationUpdateOne

SetNillableDeletionRequestedAt sets the "deletionRequestedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableFolderName

func (_u *StorageLocationUpdateOne) SetNillableFolderName(v *string) *StorageLocationUpdateOne

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableLastDownloadedAt

func (_u *StorageLocationUpdateOne) SetNillableLastDownloadedAt(v *int64) *StorageLocationUpdateOne

SetNillableLastDownloadedAt sets the "lastDownloadedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableLeaseVersion

func (_u *StorageLocationUpdateOne) SetNillableLeaseVersion(v *int64) *StorageLocationUpdateOne

SetNillableLeaseVersion sets the "leaseVersion" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableManifestID added in v1.2.2

func (_u *StorageLocationUpdateOne) SetNillableManifestID(id *int) *StorageLocationUpdateOne

SetNillableManifestID sets the "manifest" edge to the StorageManifest entity by ID if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMaterializationUnsupportedAt

func (_u *StorageLocationUpdateOne) SetNillableMaterializationUnsupportedAt(v *int64) *StorageLocationUpdateOne

SetNillableMaterializationUnsupportedAt sets the "materializationUnsupportedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergeLeaseExpiresAt

func (_u *StorageLocationUpdateOne) SetNillableMergeLeaseExpiresAt(v *int64) *StorageLocationUpdateOne

SetNillableMergeLeaseExpiresAt sets the "mergeLeaseExpiresAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergeLeaseToken

func (_u *StorageLocationUpdateOne) SetNillableMergeLeaseToken(v *string) *StorageLocationUpdateOne

SetNillableMergeLeaseToken sets the "mergeLeaseToken" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergeStartedAt

func (_u *StorageLocationUpdateOne) SetNillableMergeStartedAt(v *int64) *StorageLocationUpdateOne

SetNillableMergeStartedAt sets the "mergeStartedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableMergedAt

func (_u *StorageLocationUpdateOne) SetNillableMergedAt(v *int64) *StorageLocationUpdateOne

SetNillableMergedAt sets the "mergedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillablePartCount

func (_u *StorageLocationUpdateOne) SetNillablePartCount(v *int) *StorageLocationUpdateOne

SetNillablePartCount sets the "partCount" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillablePartsDeletedAt

func (_u *StorageLocationUpdateOne) SetNillablePartsDeletedAt(v *int64) *StorageLocationUpdateOne

SetNillablePartsDeletedAt sets the "partsDeletedAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableRecencyAt

func (_u *StorageLocationUpdateOne) SetNillableRecencyAt(v *int64) *StorageLocationUpdateOne

SetNillableRecencyAt sets the "recencyAt" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetNillableSizeBytes

func (_u *StorageLocationUpdateOne) SetNillableSizeBytes(v *int64) *StorageLocationUpdateOne

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*StorageLocationUpdateOne) SetPartCount

SetPartCount sets the "partCount" field.

func (*StorageLocationUpdateOne) SetPartsDeletedAt

func (_u *StorageLocationUpdateOne) SetPartsDeletedAt(v int64) *StorageLocationUpdateOne

SetPartsDeletedAt sets the "partsDeletedAt" field.

func (*StorageLocationUpdateOne) SetRecencyAt

SetRecencyAt sets the "recencyAt" field.

func (*StorageLocationUpdateOne) SetSizeBytes

SetSizeBytes sets the "sizeBytes" field.

func (*StorageLocationUpdateOne) Where

Where appends a list predicates to the StorageLocationUpdate builder.

type StorageLocations

type StorageLocations []*StorageLocation

StorageLocations is a parsable slice of StorageLocation.

type StorageManifest added in v1.2.2

type StorageManifest struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// UploadId holds the value of the "uploadId" field.
	UploadId *int64 `json:"uploadId,omitempty"`
	// LocationId holds the value of the "locationId" field.
	LocationId *string `json:"locationId,omitempty"`
	// Parts holds the value of the "parts" field.
	Parts []byte `json:"parts,omitempty"`
	// CandidateGCAt holds the value of the "candidateGCAt" field.
	CandidateGCAt *int64 `json:"candidateGCAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StorageManifestQuery when eager-loading is set.
	Edges StorageManifestEdges `json:"edges"`
	// contains filtered or unexported fields
}

StorageManifest is the model entity for the StorageManifest schema.

func (*StorageManifest) ExecContext added in v1.2.2

func (c *StorageManifest) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifest) QueryContext added in v1.2.2

func (c *StorageManifest) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifest) QueryLocation added in v1.2.2

func (_m *StorageManifest) QueryLocation() *StorageLocationQuery

QueryLocation queries the "location" edge of the StorageManifest entity.

func (*StorageManifest) QueryUpload added in v1.2.2

func (_m *StorageManifest) QueryUpload() *UploadQuery

QueryUpload queries the "upload" edge of the StorageManifest entity.

func (*StorageManifest) String added in v1.2.2

func (_m *StorageManifest) String() string

String implements the fmt.Stringer.

func (*StorageManifest) Unwrap added in v1.2.2

func (_m *StorageManifest) Unwrap() *StorageManifest

Unwrap unwraps the StorageManifest 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 (*StorageManifest) Update added in v1.2.2

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

func (*StorageManifest) Value added in v1.2.2

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

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

type StorageManifestClient added in v1.2.2

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

StorageManifestClient is a client for the StorageManifest schema.

func NewStorageManifestClient added in v1.2.2

func NewStorageManifestClient(c config) *StorageManifestClient

NewStorageManifestClient returns a client for the StorageManifest from the given config.

func (*StorageManifestClient) Create added in v1.2.2

Create returns a builder for creating a StorageManifest entity.

func (*StorageManifestClient) CreateBulk added in v1.2.2

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

func (*StorageManifestClient) Delete added in v1.2.2

Delete returns a delete builder for StorageManifest.

func (*StorageManifestClient) DeleteOne added in v1.2.2

DeleteOne returns a builder for deleting the given entity.

func (*StorageManifestClient) DeleteOneID added in v1.2.2

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

func (*StorageManifestClient) ExecContext added in v1.2.2

func (c *StorageManifestClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestClient) Get added in v1.2.2

Get returns a StorageManifest entity by its id.

func (*StorageManifestClient) GetX added in v1.2.2

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

func (*StorageManifestClient) Hooks added in v1.2.2

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

Hooks returns the client hooks.

func (*StorageManifestClient) Intercept added in v1.2.2

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

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

func (*StorageManifestClient) Interceptors added in v1.2.2

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

Interceptors returns the client interceptors.

func (*StorageManifestClient) MapCreateBulk added in v1.2.2

func (c *StorageManifestClient) MapCreateBulk(slice any, setFunc func(*StorageManifestCreate, int)) *StorageManifestCreateBulk

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 (*StorageManifestClient) Query added in v1.2.2

Query returns a query builder for StorageManifest.

func (*StorageManifestClient) QueryContext added in v1.2.2

func (c *StorageManifestClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestClient) QueryLocation added in v1.2.2

QueryLocation queries the location edge of a StorageManifest.

func (*StorageManifestClient) QueryUpload added in v1.2.2

func (c *StorageManifestClient) QueryUpload(_m *StorageManifest) *UploadQuery

QueryUpload queries the upload edge of a StorageManifest.

func (*StorageManifestClient) Update added in v1.2.2

Update returns an update builder for StorageManifest.

func (*StorageManifestClient) UpdateOne added in v1.2.2

UpdateOne returns an update builder for the given entity.

func (*StorageManifestClient) UpdateOneID added in v1.2.2

UpdateOneID returns an update builder for the given id.

func (*StorageManifestClient) Use added in v1.2.2

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

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

type StorageManifestCreate added in v1.2.2

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

StorageManifestCreate is the builder for creating a StorageManifest entity.

func (*StorageManifestCreate) Exec added in v1.2.2

Exec executes the query.

func (*StorageManifestCreate) ExecContext added in v1.2.2

func (c *StorageManifestCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestCreate) ExecX added in v1.2.2

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

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

func (*StorageManifestCreate) Mutation added in v1.2.2

Mutation returns the StorageManifestMutation object of the builder.

func (*StorageManifestCreate) QueryContext added in v1.2.2

func (c *StorageManifestCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestCreate) Save added in v1.2.2

Save creates the StorageManifest in the database.

func (*StorageManifestCreate) SaveX added in v1.2.2

SaveX calls Save and panics if Save returns an error.

func (*StorageManifestCreate) SetCandidateGCAt added in v1.2.2

func (_c *StorageManifestCreate) SetCandidateGCAt(v int64) *StorageManifestCreate

SetCandidateGCAt sets the "candidateGCAt" field.

func (*StorageManifestCreate) SetLocation added in v1.2.2

SetLocation sets the "location" edge to the StorageLocation entity.

func (*StorageManifestCreate) SetLocationID added in v1.2.2

func (_c *StorageManifestCreate) SetLocationID(id string) *StorageManifestCreate

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*StorageManifestCreate) SetLocationId added in v1.2.2

func (_c *StorageManifestCreate) SetLocationId(v string) *StorageManifestCreate

SetLocationId sets the "locationId" field.

func (*StorageManifestCreate) SetNillableCandidateGCAt added in v1.2.2

func (_c *StorageManifestCreate) SetNillableCandidateGCAt(v *int64) *StorageManifestCreate

SetNillableCandidateGCAt sets the "candidateGCAt" field if the given value is not nil.

func (*StorageManifestCreate) SetNillableLocationID added in v1.2.2

func (_c *StorageManifestCreate) SetNillableLocationID(id *string) *StorageManifestCreate

SetNillableLocationID sets the "location" edge to the StorageLocation entity by ID if the given value is not nil.

func (*StorageManifestCreate) SetNillableLocationId added in v1.2.2

func (_c *StorageManifestCreate) SetNillableLocationId(v *string) *StorageManifestCreate

SetNillableLocationId sets the "locationId" field if the given value is not nil.

func (*StorageManifestCreate) SetNillableUploadID added in v1.2.2

func (_c *StorageManifestCreate) SetNillableUploadID(id *int64) *StorageManifestCreate

SetNillableUploadID sets the "upload" edge to the Upload entity by ID if the given value is not nil.

func (*StorageManifestCreate) SetNillableUploadId added in v1.2.2

func (_c *StorageManifestCreate) SetNillableUploadId(v *int64) *StorageManifestCreate

SetNillableUploadId sets the "uploadId" field if the given value is not nil.

func (*StorageManifestCreate) SetParts added in v1.2.2

SetParts sets the "parts" field.

func (*StorageManifestCreate) SetUpload added in v1.2.2

SetUpload sets the "upload" edge to the Upload entity.

func (*StorageManifestCreate) SetUploadID added in v1.2.2

func (_c *StorageManifestCreate) SetUploadID(id int64) *StorageManifestCreate

SetUploadID sets the "upload" edge to the Upload entity by ID.

func (*StorageManifestCreate) SetUploadId added in v1.2.2

SetUploadId sets the "uploadId" field.

type StorageManifestCreateBulk added in v1.2.2

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

StorageManifestCreateBulk is the builder for creating many StorageManifest entities in bulk.

func (*StorageManifestCreateBulk) Exec added in v1.2.2

Exec executes the query.

func (*StorageManifestCreateBulk) ExecContext added in v1.2.2

func (c *StorageManifestCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestCreateBulk) ExecX added in v1.2.2

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

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

func (*StorageManifestCreateBulk) QueryContext added in v1.2.2

func (c *StorageManifestCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestCreateBulk) Save added in v1.2.2

Save creates the StorageManifest entities in the database.

func (*StorageManifestCreateBulk) SaveX added in v1.2.2

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

type StorageManifestDelete added in v1.2.2

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

StorageManifestDelete is the builder for deleting a StorageManifest entity.

func (*StorageManifestDelete) Exec added in v1.2.2

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

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

func (*StorageManifestDelete) ExecContext added in v1.2.2

func (c *StorageManifestDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestDelete) ExecX added in v1.2.2

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

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

func (*StorageManifestDelete) QueryContext added in v1.2.2

func (c *StorageManifestDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestDelete) Where added in v1.2.2

Where appends a list predicates to the StorageManifestDelete builder.

type StorageManifestDeleteOne added in v1.2.2

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

StorageManifestDeleteOne is the builder for deleting a single StorageManifest entity.

func (*StorageManifestDeleteOne) Exec added in v1.2.2

Exec executes the deletion query.

func (*StorageManifestDeleteOne) ExecX added in v1.2.2

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

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

func (*StorageManifestDeleteOne) Where added in v1.2.2

Where appends a list predicates to the StorageManifestDelete builder.

type StorageManifestEdges added in v1.2.2

type StorageManifestEdges struct {
	// Upload holds the value of the upload edge.
	Upload *Upload `json:"upload,omitempty"`
	// Location holds the value of the location edge.
	Location *StorageLocation `json:"location,omitempty"`
	// contains filtered or unexported fields
}

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

func (StorageManifestEdges) LocationOrErr added in v1.2.2

func (e StorageManifestEdges) LocationOrErr() (*StorageLocation, error)

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

func (StorageManifestEdges) UploadOrErr added in v1.2.2

func (e StorageManifestEdges) UploadOrErr() (*Upload, error)

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

type StorageManifestGroupBy added in v1.2.2

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

StorageManifestGroupBy is the group-by builder for StorageManifest entities.

func (*StorageManifestGroupBy) Aggregate added in v1.2.2

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

func (*StorageManifestGroupBy) Bool added in v1.2.2

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

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

func (*StorageManifestGroupBy) BoolX added in v1.2.2

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

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

func (*StorageManifestGroupBy) Bools added in v1.2.2

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

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

func (*StorageManifestGroupBy) BoolsX added in v1.2.2

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

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

func (*StorageManifestGroupBy) Float64 added in v1.2.2

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

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

func (*StorageManifestGroupBy) Float64X added in v1.2.2

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

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

func (*StorageManifestGroupBy) Float64s added in v1.2.2

func (s *StorageManifestGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StorageManifestGroupBy) Float64sX added in v1.2.2

func (s *StorageManifestGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StorageManifestGroupBy) Int added in v1.2.2

func (s *StorageManifestGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StorageManifestGroupBy) IntX added in v1.2.2

func (s *StorageManifestGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StorageManifestGroupBy) Ints added in v1.2.2

func (s *StorageManifestGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StorageManifestGroupBy) IntsX added in v1.2.2

func (s *StorageManifestGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StorageManifestGroupBy) Scan added in v1.2.2

func (_g *StorageManifestGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StorageManifestGroupBy) ScanX added in v1.2.2

func (s *StorageManifestGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StorageManifestGroupBy) String added in v1.2.2

func (s *StorageManifestGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StorageManifestGroupBy) StringX added in v1.2.2

func (s *StorageManifestGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StorageManifestGroupBy) Strings added in v1.2.2

func (s *StorageManifestGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StorageManifestGroupBy) StringsX added in v1.2.2

func (s *StorageManifestGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StorageManifestMutation added in v1.2.2

type StorageManifestMutation struct {
	// contains filtered or unexported fields
}

StorageManifestMutation represents an operation that mutates the StorageManifest nodes in the graph.

func (*StorageManifestMutation) AddCandidateGCAt added in v1.2.2

func (m *StorageManifestMutation) AddCandidateGCAt(i int64)

AddCandidateGCAt adds i to the "candidateGCAt" field.

func (*StorageManifestMutation) AddField added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) AddedCandidateGCAt added in v1.2.2

func (m *StorageManifestMutation) AddedCandidateGCAt() (r int64, exists bool)

AddedCandidateGCAt returns the value that was added to the "candidateGCAt" field in this mutation.

func (*StorageManifestMutation) AddedEdges added in v1.2.2

func (m *StorageManifestMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*StorageManifestMutation) AddedField added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) AddedFields added in v1.2.2

func (m *StorageManifestMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*StorageManifestMutation) AddedIDs added in v1.2.2

func (m *StorageManifestMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*StorageManifestMutation) CandidateGCAt added in v1.2.2

func (m *StorageManifestMutation) CandidateGCAt() (r int64, exists bool)

CandidateGCAt returns the value of the "candidateGCAt" field in the mutation.

func (*StorageManifestMutation) CandidateGCAtCleared added in v1.2.2

func (m *StorageManifestMutation) CandidateGCAtCleared() bool

CandidateGCAtCleared returns if the "candidateGCAt" field was cleared in this mutation.

func (*StorageManifestMutation) ClearCandidateGCAt added in v1.2.2

func (m *StorageManifestMutation) ClearCandidateGCAt()

ClearCandidateGCAt clears the value of the "candidateGCAt" field.

func (*StorageManifestMutation) ClearEdge added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) ClearField added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) ClearLocation added in v1.2.2

func (m *StorageManifestMutation) ClearLocation()

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*StorageManifestMutation) ClearLocationId added in v1.2.2

func (m *StorageManifestMutation) ClearLocationId()

ClearLocationId clears the value of the "locationId" field.

func (*StorageManifestMutation) ClearUpload added in v1.2.2

func (m *StorageManifestMutation) ClearUpload()

ClearUpload clears the "upload" edge to the Upload entity.

func (*StorageManifestMutation) ClearUploadId added in v1.2.2

func (m *StorageManifestMutation) ClearUploadId()

ClearUploadId clears the value of the "uploadId" field.

func (*StorageManifestMutation) ClearedEdges added in v1.2.2

func (m *StorageManifestMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*StorageManifestMutation) ClearedFields added in v1.2.2

func (m *StorageManifestMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (StorageManifestMutation) Client added in v1.2.2

func (m StorageManifestMutation) 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 (*StorageManifestMutation) EdgeCleared added in v1.2.2

func (m *StorageManifestMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*StorageManifestMutation) ExecContext added in v1.2.2

func (c *StorageManifestMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestMutation) Field added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) FieldCleared added in v1.2.2

func (m *StorageManifestMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*StorageManifestMutation) Fields added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) ID added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) IDs added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) LocationCleared added in v1.2.2

func (m *StorageManifestMutation) LocationCleared() bool

LocationCleared reports if the "location" edge to the StorageLocation entity was cleared.

func (*StorageManifestMutation) LocationID added in v1.2.2

func (m *StorageManifestMutation) LocationID() (id string, exists bool)

LocationID returns the "location" edge ID in the mutation.

func (*StorageManifestMutation) LocationIDs added in v1.2.2

func (m *StorageManifestMutation) LocationIDs() (ids []string)

LocationIDs returns the "location" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use LocationID instead. It exists only for internal usage by the builders.

func (*StorageManifestMutation) LocationId added in v1.2.2

func (m *StorageManifestMutation) LocationId() (r string, exists bool)

LocationId returns the value of the "locationId" field in the mutation.

func (*StorageManifestMutation) LocationIdCleared added in v1.2.2

func (m *StorageManifestMutation) LocationIdCleared() bool

LocationIdCleared returns if the "locationId" field was cleared in this mutation.

func (*StorageManifestMutation) OldCandidateGCAt added in v1.2.2

func (m *StorageManifestMutation) OldCandidateGCAt(ctx context.Context) (v *int64, err error)

OldCandidateGCAt returns the old "candidateGCAt" field's value of the StorageManifest entity. If the StorageManifest 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 (*StorageManifestMutation) OldField added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) OldLocationId added in v1.2.2

func (m *StorageManifestMutation) OldLocationId(ctx context.Context) (v *string, err error)

OldLocationId returns the old "locationId" field's value of the StorageManifest entity. If the StorageManifest 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 (*StorageManifestMutation) OldParts added in v1.2.2

func (m *StorageManifestMutation) OldParts(ctx context.Context) (v []byte, err error)

OldParts returns the old "parts" field's value of the StorageManifest entity. If the StorageManifest 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 (*StorageManifestMutation) OldUploadId added in v1.2.2

func (m *StorageManifestMutation) OldUploadId(ctx context.Context) (v *int64, err error)

OldUploadId returns the old "uploadId" field's value of the StorageManifest entity. If the StorageManifest 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 (*StorageManifestMutation) Op added in v1.2.2

func (m *StorageManifestMutation) Op() Op

Op returns the operation name.

func (*StorageManifestMutation) Parts added in v1.2.2

func (m *StorageManifestMutation) Parts() (r []byte, exists bool)

Parts returns the value of the "parts" field in the mutation.

func (*StorageManifestMutation) QueryContext added in v1.2.2

func (c *StorageManifestMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestMutation) RemovedEdges added in v1.2.2

func (m *StorageManifestMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*StorageManifestMutation) RemovedIDs added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) ResetCandidateGCAt added in v1.2.2

func (m *StorageManifestMutation) ResetCandidateGCAt()

ResetCandidateGCAt resets all changes to the "candidateGCAt" field.

func (*StorageManifestMutation) ResetEdge added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) ResetField added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) ResetLocation added in v1.2.2

func (m *StorageManifestMutation) ResetLocation()

ResetLocation resets all changes to the "location" edge.

func (*StorageManifestMutation) ResetLocationId added in v1.2.2

func (m *StorageManifestMutation) ResetLocationId()

ResetLocationId resets all changes to the "locationId" field.

func (*StorageManifestMutation) ResetParts added in v1.2.2

func (m *StorageManifestMutation) ResetParts()

ResetParts resets all changes to the "parts" field.

func (*StorageManifestMutation) ResetUpload added in v1.2.2

func (m *StorageManifestMutation) ResetUpload()

ResetUpload resets all changes to the "upload" edge.

func (*StorageManifestMutation) ResetUploadId added in v1.2.2

func (m *StorageManifestMutation) ResetUploadId()

ResetUploadId resets all changes to the "uploadId" field.

func (*StorageManifestMutation) SetCandidateGCAt added in v1.2.2

func (m *StorageManifestMutation) SetCandidateGCAt(i int64)

SetCandidateGCAt sets the "candidateGCAt" field.

func (*StorageManifestMutation) SetField added in v1.2.2

func (m *StorageManifestMutation) 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 (*StorageManifestMutation) SetLocationID added in v1.2.2

func (m *StorageManifestMutation) SetLocationID(id string)

SetLocationID sets the "location" edge to the StorageLocation entity by id.

func (*StorageManifestMutation) SetLocationId added in v1.2.2

func (m *StorageManifestMutation) SetLocationId(s string)

SetLocationId sets the "locationId" field.

func (*StorageManifestMutation) SetOp added in v1.2.2

func (m *StorageManifestMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StorageManifestMutation) SetParts added in v1.2.2

func (m *StorageManifestMutation) SetParts(b []byte)

SetParts sets the "parts" field.

func (*StorageManifestMutation) SetUploadID added in v1.2.2

func (m *StorageManifestMutation) SetUploadID(id int64)

SetUploadID sets the "upload" edge to the Upload entity by id.

func (*StorageManifestMutation) SetUploadId added in v1.2.2

func (m *StorageManifestMutation) SetUploadId(i int64)

SetUploadId sets the "uploadId" field.

func (StorageManifestMutation) Tx added in v1.2.2

func (m StorageManifestMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*StorageManifestMutation) Type added in v1.2.2

func (m *StorageManifestMutation) Type() string

Type returns the node type of this mutation (StorageManifest).

func (*StorageManifestMutation) UploadCleared added in v1.2.2

func (m *StorageManifestMutation) UploadCleared() bool

UploadCleared reports if the "upload" edge to the Upload entity was cleared.

func (*StorageManifestMutation) UploadID added in v1.2.2

func (m *StorageManifestMutation) UploadID() (id int64, exists bool)

UploadID returns the "upload" edge ID in the mutation.

func (*StorageManifestMutation) UploadIDs added in v1.2.2

func (m *StorageManifestMutation) UploadIDs() (ids []int64)

UploadIDs returns the "upload" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UploadID instead. It exists only for internal usage by the builders.

func (*StorageManifestMutation) UploadId added in v1.2.2

func (m *StorageManifestMutation) UploadId() (r int64, exists bool)

UploadId returns the value of the "uploadId" field in the mutation.

func (*StorageManifestMutation) UploadIdCleared added in v1.2.2

func (m *StorageManifestMutation) UploadIdCleared() bool

UploadIdCleared returns if the "uploadId" field was cleared in this mutation.

func (*StorageManifestMutation) Where added in v1.2.2

Where appends a list predicates to the StorageManifestMutation builder.

func (*StorageManifestMutation) WhereP added in v1.2.2

func (m *StorageManifestMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the StorageManifestMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type StorageManifestQuery added in v1.2.2

type StorageManifestQuery struct {
	// contains filtered or unexported fields
}

StorageManifestQuery is the builder for querying StorageManifest entities.

func (*StorageManifestQuery) Aggregate added in v1.2.2

Aggregate returns a StorageManifestSelect configured with the given aggregations.

func (*StorageManifestQuery) All added in v1.2.2

All executes the query and returns a list of StorageManifests.

func (*StorageManifestQuery) AllX added in v1.2.2

AllX is like All, but panics if an error occurs.

func (*StorageManifestQuery) Clone added in v1.2.2

Clone returns a duplicate of the StorageManifestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*StorageManifestQuery) Count added in v1.2.2

func (_q *StorageManifestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StorageManifestQuery) CountX added in v1.2.2

func (_q *StorageManifestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*StorageManifestQuery) ExecContext added in v1.2.2

func (c *StorageManifestQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestQuery) Exist added in v1.2.2

func (_q *StorageManifestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*StorageManifestQuery) ExistX added in v1.2.2

func (_q *StorageManifestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*StorageManifestQuery) First added in v1.2.2

First returns the first StorageManifest entity from the query. Returns a *NotFoundError when no StorageManifest was found.

func (*StorageManifestQuery) FirstID added in v1.2.2

func (_q *StorageManifestQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first StorageManifest ID from the query. Returns a *NotFoundError when no StorageManifest ID was found.

func (*StorageManifestQuery) FirstIDX added in v1.2.2

func (_q *StorageManifestQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*StorageManifestQuery) FirstX added in v1.2.2

FirstX is like First, but panics if an error occurs.

func (*StorageManifestQuery) ForShare added in v1.2.2

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*StorageManifestQuery) ForUpdate added in v1.2.2

func (_q *StorageManifestQuery) ForUpdate(opts ...sql.LockOption) *StorageManifestQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*StorageManifestQuery) GroupBy added in v1.2.2

func (_q *StorageManifestQuery) GroupBy(field string, fields ...string) *StorageManifestGroupBy

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 {
	UploadId int64 `json:"uploadId,omitempty"`
	Count int `json:"count,omitempty"`
}

client.StorageManifest.Query().
	GroupBy(storagemanifest.FieldUploadId).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StorageManifestQuery) IDs added in v1.2.2

func (_q *StorageManifestQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of StorageManifest IDs.

func (*StorageManifestQuery) IDsX added in v1.2.2

func (_q *StorageManifestQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*StorageManifestQuery) Limit added in v1.2.2

func (_q *StorageManifestQuery) Limit(limit int) *StorageManifestQuery

Limit the number of records to be returned by this query.

func (*StorageManifestQuery) Offset added in v1.2.2

func (_q *StorageManifestQuery) Offset(offset int) *StorageManifestQuery

Offset to start from.

func (*StorageManifestQuery) Only added in v1.2.2

Only returns a single StorageManifest entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StorageManifest entity is found. Returns a *NotFoundError when no StorageManifest entities are found.

func (*StorageManifestQuery) OnlyID added in v1.2.2

func (_q *StorageManifestQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only StorageManifest ID in the query. Returns a *NotSingularError when more than one StorageManifest ID is found. Returns a *NotFoundError when no entities are found.

func (*StorageManifestQuery) OnlyIDX added in v1.2.2

func (_q *StorageManifestQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*StorageManifestQuery) OnlyX added in v1.2.2

OnlyX is like Only, but panics if an error occurs.

func (*StorageManifestQuery) Order added in v1.2.2

Order specifies how the records should be ordered.

func (*StorageManifestQuery) QueryContext added in v1.2.2

func (c *StorageManifestQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestQuery) QueryLocation added in v1.2.2

func (_q *StorageManifestQuery) QueryLocation() *StorageLocationQuery

QueryLocation chains the current query on the "location" edge.

func (*StorageManifestQuery) QueryUpload added in v1.2.2

func (_q *StorageManifestQuery) QueryUpload() *UploadQuery

QueryUpload chains the current query on the "upload" edge.

func (*StorageManifestQuery) Select added in v1.2.2

func (_q *StorageManifestQuery) Select(fields ...string) *StorageManifestSelect

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 {
	UploadId int64 `json:"uploadId,omitempty"`
}

client.StorageManifest.Query().
	Select(storagemanifest.FieldUploadId).
	Scan(ctx, &v)

func (*StorageManifestQuery) Unique added in v1.2.2

func (_q *StorageManifestQuery) Unique(unique bool) *StorageManifestQuery

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 (*StorageManifestQuery) Where added in v1.2.2

Where adds a new predicate for the StorageManifestQuery builder.

func (*StorageManifestQuery) WithLocation added in v1.2.2

func (_q *StorageManifestQuery) WithLocation(opts ...func(*StorageLocationQuery)) *StorageManifestQuery

WithLocation tells the query-builder to eager-load the nodes that are connected to the "location" edge. The optional arguments are used to configure the query builder of the edge.

func (*StorageManifestQuery) WithUpload added in v1.2.2

func (_q *StorageManifestQuery) WithUpload(opts ...func(*UploadQuery)) *StorageManifestQuery

WithUpload tells the query-builder to eager-load the nodes that are connected to the "upload" edge. The optional arguments are used to configure the query builder of the edge.

type StorageManifestSelect added in v1.2.2

type StorageManifestSelect struct {
	*StorageManifestQuery
	// contains filtered or unexported fields
}

StorageManifestSelect is the builder for selecting fields of StorageManifest entities.

func (*StorageManifestSelect) Aggregate added in v1.2.2

Aggregate adds the given aggregation functions to the selector query.

func (*StorageManifestSelect) Bool added in v1.2.2

func (s *StorageManifestSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) BoolX added in v1.2.2

func (s *StorageManifestSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StorageManifestSelect) Bools added in v1.2.2

func (s *StorageManifestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) BoolsX added in v1.2.2

func (s *StorageManifestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (StorageManifestSelect) ExecContext added in v1.2.2

func (c StorageManifestSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestSelect) Float64 added in v1.2.2

func (s *StorageManifestSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) Float64X added in v1.2.2

func (s *StorageManifestSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StorageManifestSelect) Float64s added in v1.2.2

func (s *StorageManifestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) Float64sX added in v1.2.2

func (s *StorageManifestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StorageManifestSelect) Int added in v1.2.2

func (s *StorageManifestSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) IntX added in v1.2.2

func (s *StorageManifestSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StorageManifestSelect) Ints added in v1.2.2

func (s *StorageManifestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) IntsX added in v1.2.2

func (s *StorageManifestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (StorageManifestSelect) QueryContext added in v1.2.2

func (c StorageManifestSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestSelect) Scan added in v1.2.2

func (_s *StorageManifestSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StorageManifestSelect) ScanX added in v1.2.2

func (s *StorageManifestSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StorageManifestSelect) String added in v1.2.2

func (s *StorageManifestSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) StringX added in v1.2.2

func (s *StorageManifestSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StorageManifestSelect) Strings added in v1.2.2

func (s *StorageManifestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StorageManifestSelect) StringsX added in v1.2.2

func (s *StorageManifestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StorageManifestUpdate added in v1.2.2

type StorageManifestUpdate struct {
	// contains filtered or unexported fields
}

StorageManifestUpdate is the builder for updating StorageManifest entities.

func (*StorageManifestUpdate) AddCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdate) AddCandidateGCAt(v int64) *StorageManifestUpdate

AddCandidateGCAt adds value to the "candidateGCAt" field.

func (*StorageManifestUpdate) ClearCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdate) ClearCandidateGCAt() *StorageManifestUpdate

ClearCandidateGCAt clears the value of the "candidateGCAt" field.

func (*StorageManifestUpdate) ClearLocation added in v1.2.2

func (_u *StorageManifestUpdate) ClearLocation() *StorageManifestUpdate

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*StorageManifestUpdate) ClearLocationId added in v1.2.2

func (_u *StorageManifestUpdate) ClearLocationId() *StorageManifestUpdate

ClearLocationId clears the value of the "locationId" field.

func (*StorageManifestUpdate) ClearUpload added in v1.2.2

func (_u *StorageManifestUpdate) ClearUpload() *StorageManifestUpdate

ClearUpload clears the "upload" edge to the Upload entity.

func (*StorageManifestUpdate) ClearUploadId added in v1.2.2

func (_u *StorageManifestUpdate) ClearUploadId() *StorageManifestUpdate

ClearUploadId clears the value of the "uploadId" field.

func (*StorageManifestUpdate) Exec added in v1.2.2

Exec executes the query.

func (*StorageManifestUpdate) ExecContext added in v1.2.2

func (c *StorageManifestUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestUpdate) ExecX added in v1.2.2

func (_u *StorageManifestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StorageManifestUpdate) Mutation added in v1.2.2

Mutation returns the StorageManifestMutation object of the builder.

func (*StorageManifestUpdate) QueryContext added in v1.2.2

func (c *StorageManifestUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestUpdate) Save added in v1.2.2

func (_u *StorageManifestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*StorageManifestUpdate) SaveX added in v1.2.2

func (_u *StorageManifestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*StorageManifestUpdate) SetCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdate) SetCandidateGCAt(v int64) *StorageManifestUpdate

SetCandidateGCAt sets the "candidateGCAt" field.

func (*StorageManifestUpdate) SetLocation added in v1.2.2

SetLocation sets the "location" edge to the StorageLocation entity.

func (*StorageManifestUpdate) SetLocationID added in v1.2.2

func (_u *StorageManifestUpdate) SetLocationID(id string) *StorageManifestUpdate

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*StorageManifestUpdate) SetLocationId added in v1.2.2

func (_u *StorageManifestUpdate) SetLocationId(v string) *StorageManifestUpdate

SetLocationId sets the "locationId" field.

func (*StorageManifestUpdate) SetNillableCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdate) SetNillableCandidateGCAt(v *int64) *StorageManifestUpdate

SetNillableCandidateGCAt sets the "candidateGCAt" field if the given value is not nil.

func (*StorageManifestUpdate) SetNillableLocationID added in v1.2.2

func (_u *StorageManifestUpdate) SetNillableLocationID(id *string) *StorageManifestUpdate

SetNillableLocationID sets the "location" edge to the StorageLocation entity by ID if the given value is not nil.

func (*StorageManifestUpdate) SetNillableLocationId added in v1.2.2

func (_u *StorageManifestUpdate) SetNillableLocationId(v *string) *StorageManifestUpdate

SetNillableLocationId sets the "locationId" field if the given value is not nil.

func (*StorageManifestUpdate) SetNillableUploadID added in v1.2.2

func (_u *StorageManifestUpdate) SetNillableUploadID(id *int64) *StorageManifestUpdate

SetNillableUploadID sets the "upload" edge to the Upload entity by ID if the given value is not nil.

func (*StorageManifestUpdate) SetNillableUploadId added in v1.2.2

func (_u *StorageManifestUpdate) SetNillableUploadId(v *int64) *StorageManifestUpdate

SetNillableUploadId sets the "uploadId" field if the given value is not nil.

func (*StorageManifestUpdate) SetParts added in v1.2.2

SetParts sets the "parts" field.

func (*StorageManifestUpdate) SetUpload added in v1.2.2

SetUpload sets the "upload" edge to the Upload entity.

func (*StorageManifestUpdate) SetUploadID added in v1.2.2

func (_u *StorageManifestUpdate) SetUploadID(id int64) *StorageManifestUpdate

SetUploadID sets the "upload" edge to the Upload entity by ID.

func (*StorageManifestUpdate) SetUploadId added in v1.2.2

SetUploadId sets the "uploadId" field.

func (*StorageManifestUpdate) Where added in v1.2.2

Where appends a list predicates to the StorageManifestUpdate builder.

type StorageManifestUpdateOne added in v1.2.2

type StorageManifestUpdateOne struct {
	// contains filtered or unexported fields
}

StorageManifestUpdateOne is the builder for updating a single StorageManifest entity.

func (*StorageManifestUpdateOne) AddCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdateOne) AddCandidateGCAt(v int64) *StorageManifestUpdateOne

AddCandidateGCAt adds value to the "candidateGCAt" field.

func (*StorageManifestUpdateOne) ClearCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdateOne) ClearCandidateGCAt() *StorageManifestUpdateOne

ClearCandidateGCAt clears the value of the "candidateGCAt" field.

func (*StorageManifestUpdateOne) ClearLocation added in v1.2.2

ClearLocation clears the "location" edge to the StorageLocation entity.

func (*StorageManifestUpdateOne) ClearLocationId added in v1.2.2

func (_u *StorageManifestUpdateOne) ClearLocationId() *StorageManifestUpdateOne

ClearLocationId clears the value of the "locationId" field.

func (*StorageManifestUpdateOne) ClearUpload added in v1.2.2

ClearUpload clears the "upload" edge to the Upload entity.

func (*StorageManifestUpdateOne) ClearUploadId added in v1.2.2

ClearUploadId clears the value of the "uploadId" field.

func (*StorageManifestUpdateOne) Exec added in v1.2.2

Exec executes the query on the entity.

func (*StorageManifestUpdateOne) ExecContext added in v1.2.2

func (c *StorageManifestUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageManifestUpdateOne) ExecX added in v1.2.2

func (_u *StorageManifestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StorageManifestUpdateOne) Mutation added in v1.2.2

Mutation returns the StorageManifestMutation object of the builder.

func (*StorageManifestUpdateOne) QueryContext added in v1.2.2

func (c *StorageManifestUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageManifestUpdateOne) Save added in v1.2.2

Save executes the query and returns the updated StorageManifest entity.

func (*StorageManifestUpdateOne) SaveX added in v1.2.2

SaveX is like Save, but panics if an error occurs.

func (*StorageManifestUpdateOne) Select added in v1.2.2

func (_u *StorageManifestUpdateOne) Select(field string, fields ...string) *StorageManifestUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*StorageManifestUpdateOne) SetCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdateOne) SetCandidateGCAt(v int64) *StorageManifestUpdateOne

SetCandidateGCAt sets the "candidateGCAt" field.

func (*StorageManifestUpdateOne) SetLocation added in v1.2.2

SetLocation sets the "location" edge to the StorageLocation entity.

func (*StorageManifestUpdateOne) SetLocationID added in v1.2.2

SetLocationID sets the "location" edge to the StorageLocation entity by ID.

func (*StorageManifestUpdateOne) SetLocationId added in v1.2.2

SetLocationId sets the "locationId" field.

func (*StorageManifestUpdateOne) SetNillableCandidateGCAt added in v1.2.2

func (_u *StorageManifestUpdateOne) SetNillableCandidateGCAt(v *int64) *StorageManifestUpdateOne

SetNillableCandidateGCAt sets the "candidateGCAt" field if the given value is not nil.

func (*StorageManifestUpdateOne) SetNillableLocationID added in v1.2.2

func (_u *StorageManifestUpdateOne) SetNillableLocationID(id *string) *StorageManifestUpdateOne

SetNillableLocationID sets the "location" edge to the StorageLocation entity by ID if the given value is not nil.

func (*StorageManifestUpdateOne) SetNillableLocationId added in v1.2.2

func (_u *StorageManifestUpdateOne) SetNillableLocationId(v *string) *StorageManifestUpdateOne

SetNillableLocationId sets the "locationId" field if the given value is not nil.

func (*StorageManifestUpdateOne) SetNillableUploadID added in v1.2.2

func (_u *StorageManifestUpdateOne) SetNillableUploadID(id *int64) *StorageManifestUpdateOne

SetNillableUploadID sets the "upload" edge to the Upload entity by ID if the given value is not nil.

func (*StorageManifestUpdateOne) SetNillableUploadId added in v1.2.2

func (_u *StorageManifestUpdateOne) SetNillableUploadId(v *int64) *StorageManifestUpdateOne

SetNillableUploadId sets the "uploadId" field if the given value is not nil.

func (*StorageManifestUpdateOne) SetParts added in v1.2.2

SetParts sets the "parts" field.

func (*StorageManifestUpdateOne) SetUpload added in v1.2.2

SetUpload sets the "upload" edge to the Upload entity.

func (*StorageManifestUpdateOne) SetUploadID added in v1.2.2

SetUploadID sets the "upload" edge to the Upload entity by ID.

func (*StorageManifestUpdateOne) SetUploadId added in v1.2.2

SetUploadId sets the "uploadId" field.

func (*StorageManifestUpdateOne) Where added in v1.2.2

Where appends a list predicates to the StorageManifestUpdate builder.

type StorageManifests added in v1.2.2

type StorageManifests []*StorageManifest

StorageManifests is a parsable slice of StorageManifest.

type StorageReaderLease

type StorageReaderLease struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// StorageLocationId holds the value of the "storageLocationId" field.
	StorageLocationId string `json:"storageLocationId,omitempty"`
	// Scope holds the value of the "scope" field.
	Scope storagereaderlease.Scope `json:"scope,omitempty"`
	// ExpiresAt holds the value of the "expiresAt" field.
	ExpiresAt int64 `json:"expiresAt,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StorageReaderLeaseQuery when eager-loading is set.
	Edges StorageReaderLeaseEdges `json:"edges"`
	// contains filtered or unexported fields
}

StorageReaderLease is the model entity for the StorageReaderLease schema.

func (*StorageReaderLease) ExecContext

func (c *StorageReaderLease) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLease) QueryContext

func (c *StorageReaderLease) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLease) QueryStorageLocation

func (_m *StorageReaderLease) QueryStorageLocation() *StorageLocationQuery

QueryStorageLocation queries the "storageLocation" edge of the StorageReaderLease entity.

func (*StorageReaderLease) String

func (_m *StorageReaderLease) String() string

String implements the fmt.Stringer.

func (*StorageReaderLease) Unwrap

func (_m *StorageReaderLease) Unwrap() *StorageReaderLease

Unwrap unwraps the StorageReaderLease 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 (*StorageReaderLease) Update

Update returns a builder for updating this StorageReaderLease. Note that you need to call StorageReaderLease.Unwrap() before calling this method if this StorageReaderLease was returned from a transaction, and the transaction was committed or rolled back.

func (*StorageReaderLease) Value

func (_m *StorageReaderLease) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the StorageReaderLease. This includes values selected through modifiers, order, etc.

type StorageReaderLeaseClient

type StorageReaderLeaseClient struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseClient is a client for the StorageReaderLease schema.

func NewStorageReaderLeaseClient

func NewStorageReaderLeaseClient(c config) *StorageReaderLeaseClient

NewStorageReaderLeaseClient returns a client for the StorageReaderLease from the given config.

func (*StorageReaderLeaseClient) Create

Create returns a builder for creating a StorageReaderLease entity.

func (*StorageReaderLeaseClient) CreateBulk

CreateBulk returns a builder for creating a bulk of StorageReaderLease entities.

func (*StorageReaderLeaseClient) Delete

Delete returns a delete builder for StorageReaderLease.

func (*StorageReaderLeaseClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StorageReaderLeaseClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*StorageReaderLeaseClient) ExecContext

func (c *StorageReaderLeaseClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseClient) Get

Get returns a StorageReaderLease entity by its id.

func (*StorageReaderLeaseClient) GetX

GetX is like Get, but panics if an error occurs.

func (*StorageReaderLeaseClient) Hooks

func (c *StorageReaderLeaseClient) Hooks() []Hook

Hooks returns the client hooks.

func (*StorageReaderLeaseClient) Intercept

func (c *StorageReaderLeaseClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `storagereaderlease.Intercept(f(g(h())))`.

func (*StorageReaderLeaseClient) Interceptors

func (c *StorageReaderLeaseClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*StorageReaderLeaseClient) MapCreateBulk

func (c *StorageReaderLeaseClient) MapCreateBulk(slice any, setFunc func(*StorageReaderLeaseCreate, int)) *StorageReaderLeaseCreateBulk

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 (*StorageReaderLeaseClient) Query

Query returns a query builder for StorageReaderLease.

func (*StorageReaderLeaseClient) QueryContext

func (c *StorageReaderLeaseClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseClient) QueryStorageLocation

QueryStorageLocation queries the storageLocation edge of a StorageReaderLease.

func (*StorageReaderLeaseClient) Update

Update returns an update builder for StorageReaderLease.

func (*StorageReaderLeaseClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StorageReaderLeaseClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StorageReaderLeaseClient) Use

func (c *StorageReaderLeaseClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `storagereaderlease.Hooks(f(g(h())))`.

type StorageReaderLeaseCreate

type StorageReaderLeaseCreate struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseCreate is the builder for creating a StorageReaderLease entity.

func (*StorageReaderLeaseCreate) Exec

Exec executes the query.

func (*StorageReaderLeaseCreate) ExecContext

func (c *StorageReaderLeaseCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseCreate) ExecX

func (_c *StorageReaderLeaseCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StorageReaderLeaseCreate) Mutation

Mutation returns the StorageReaderLeaseMutation object of the builder.

func (*StorageReaderLeaseCreate) QueryContext

func (c *StorageReaderLeaseCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseCreate) Save

Save creates the StorageReaderLease in the database.

func (*StorageReaderLeaseCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StorageReaderLeaseCreate) SetExpiresAt

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseCreate) SetID

SetID sets the "id" field.

func (*StorageReaderLeaseCreate) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseCreate) SetStorageLocation

SetStorageLocation sets the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseCreate) SetStorageLocationID

func (_c *StorageReaderLeaseCreate) SetStorageLocationID(id string) *StorageReaderLeaseCreate

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by ID.

func (*StorageReaderLeaseCreate) SetStorageLocationId

func (_c *StorageReaderLeaseCreate) SetStorageLocationId(v string) *StorageReaderLeaseCreate

SetStorageLocationId sets the "storageLocationId" field.

type StorageReaderLeaseCreateBulk

type StorageReaderLeaseCreateBulk struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseCreateBulk is the builder for creating many StorageReaderLease entities in bulk.

func (*StorageReaderLeaseCreateBulk) Exec

Exec executes the query.

func (*StorageReaderLeaseCreateBulk) ExecContext

func (c *StorageReaderLeaseCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*StorageReaderLeaseCreateBulk) QueryContext

func (c *StorageReaderLeaseCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseCreateBulk) Save

Save creates the StorageReaderLease entities in the database.

func (*StorageReaderLeaseCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type StorageReaderLeaseDelete

type StorageReaderLeaseDelete struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseDelete is the builder for deleting a StorageReaderLease entity.

func (*StorageReaderLeaseDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*StorageReaderLeaseDelete) ExecContext

func (c *StorageReaderLeaseDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*StorageReaderLeaseDelete) QueryContext

func (c *StorageReaderLeaseDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseDelete) Where

Where appends a list predicates to the StorageReaderLeaseDelete builder.

type StorageReaderLeaseDeleteOne

type StorageReaderLeaseDeleteOne struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseDeleteOne is the builder for deleting a single StorageReaderLease entity.

func (*StorageReaderLeaseDeleteOne) Exec

Exec executes the deletion query.

func (*StorageReaderLeaseDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*StorageReaderLeaseDeleteOne) Where

Where appends a list predicates to the StorageReaderLeaseDelete builder.

type StorageReaderLeaseEdges

type StorageReaderLeaseEdges struct {
	// StorageLocation holds the value of the storageLocation edge.
	StorageLocation *StorageLocation `json:"storageLocation,omitempty"`
	// contains filtered or unexported fields
}

StorageReaderLeaseEdges holds the relations/edges for other nodes in the graph.

func (StorageReaderLeaseEdges) StorageLocationOrErr

func (e StorageReaderLeaseEdges) StorageLocationOrErr() (*StorageLocation, error)

StorageLocationOrErr returns the StorageLocation value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type StorageReaderLeaseGroupBy

type StorageReaderLeaseGroupBy struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseGroupBy is the group-by builder for StorageReaderLease entities.

func (*StorageReaderLeaseGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*StorageReaderLeaseGroupBy) Bool

func (s *StorageReaderLeaseGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) BoolX

func (s *StorageReaderLeaseGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) Bools

func (s *StorageReaderLeaseGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) BoolsX

func (s *StorageReaderLeaseGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) Float64

func (s *StorageReaderLeaseGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) Float64X

func (s *StorageReaderLeaseGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) Float64s

func (s *StorageReaderLeaseGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) Float64sX

func (s *StorageReaderLeaseGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) Int

func (s *StorageReaderLeaseGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) IntX

func (s *StorageReaderLeaseGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) Ints

func (s *StorageReaderLeaseGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) IntsX

func (s *StorageReaderLeaseGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*StorageReaderLeaseGroupBy) ScanX

func (s *StorageReaderLeaseGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) String

func (s *StorageReaderLeaseGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) StringX

func (s *StorageReaderLeaseGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StorageReaderLeaseGroupBy) Strings

func (s *StorageReaderLeaseGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseGroupBy) StringsX

func (s *StorageReaderLeaseGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StorageReaderLeaseMutation

type StorageReaderLeaseMutation struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseMutation represents an operation that mutates the StorageReaderLease nodes in the graph.

func (*StorageReaderLeaseMutation) AddExpiresAt

func (m *StorageReaderLeaseMutation) AddExpiresAt(i int64)

AddExpiresAt adds i to the "expiresAt" field.

func (*StorageReaderLeaseMutation) AddField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) AddedEdges

func (m *StorageReaderLeaseMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*StorageReaderLeaseMutation) AddedExpiresAt

func (m *StorageReaderLeaseMutation) AddedExpiresAt() (r int64, exists bool)

AddedExpiresAt returns the value that was added to the "expiresAt" field in this mutation.

func (*StorageReaderLeaseMutation) AddedField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) AddedFields

func (m *StorageReaderLeaseMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*StorageReaderLeaseMutation) AddedIDs

func (m *StorageReaderLeaseMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*StorageReaderLeaseMutation) ClearEdge

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ClearField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ClearStorageLocation

func (m *StorageReaderLeaseMutation) ClearStorageLocation()

ClearStorageLocation clears the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseMutation) ClearedEdges

func (m *StorageReaderLeaseMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*StorageReaderLeaseMutation) ClearedFields

func (m *StorageReaderLeaseMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (StorageReaderLeaseMutation) Client

func (m StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) EdgeCleared

func (m *StorageReaderLeaseMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*StorageReaderLeaseMutation) ExecContext

func (c *StorageReaderLeaseMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseMutation) ExpiresAt

func (m *StorageReaderLeaseMutation) ExpiresAt() (r int64, exists bool)

ExpiresAt returns the value of the "expiresAt" field in the mutation.

func (*StorageReaderLeaseMutation) Field

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) FieldCleared

func (m *StorageReaderLeaseMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*StorageReaderLeaseMutation) Fields

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ID

func (m *StorageReaderLeaseMutation) ID() (id string, 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 (*StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) OldExpiresAt

func (m *StorageReaderLeaseMutation) OldExpiresAt(ctx context.Context) (v int64, err error)

OldExpiresAt returns the old "expiresAt" field's value of the StorageReaderLease entity. If the StorageReaderLease 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 (*StorageReaderLeaseMutation) OldField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) OldScope

OldScope returns the old "scope" field's value of the StorageReaderLease entity. If the StorageReaderLease 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 (*StorageReaderLeaseMutation) OldStorageLocationId

func (m *StorageReaderLeaseMutation) OldStorageLocationId(ctx context.Context) (v string, err error)

OldStorageLocationId returns the old "storageLocationId" field's value of the StorageReaderLease entity. If the StorageReaderLease 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 (*StorageReaderLeaseMutation) Op

Op returns the operation name.

func (*StorageReaderLeaseMutation) QueryContext

func (c *StorageReaderLeaseMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseMutation) RemovedEdges

func (m *StorageReaderLeaseMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*StorageReaderLeaseMutation) RemovedIDs

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ResetEdge

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ResetExpiresAt

func (m *StorageReaderLeaseMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expiresAt" field.

func (*StorageReaderLeaseMutation) ResetField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) ResetScope

func (m *StorageReaderLeaseMutation) ResetScope()

ResetScope resets all changes to the "scope" field.

func (*StorageReaderLeaseMutation) ResetStorageLocation

func (m *StorageReaderLeaseMutation) ResetStorageLocation()

ResetStorageLocation resets all changes to the "storageLocation" edge.

func (*StorageReaderLeaseMutation) ResetStorageLocationId

func (m *StorageReaderLeaseMutation) ResetStorageLocationId()

ResetStorageLocationId resets all changes to the "storageLocationId" field.

func (*StorageReaderLeaseMutation) Scope

Scope returns the value of the "scope" field in the mutation.

func (*StorageReaderLeaseMutation) SetExpiresAt

func (m *StorageReaderLeaseMutation) SetExpiresAt(i int64)

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseMutation) SetField

func (m *StorageReaderLeaseMutation) 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 (*StorageReaderLeaseMutation) SetID

func (m *StorageReaderLeaseMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of StorageReaderLease entities.

func (*StorageReaderLeaseMutation) SetOp

func (m *StorageReaderLeaseMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StorageReaderLeaseMutation) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseMutation) SetStorageLocationID

func (m *StorageReaderLeaseMutation) SetStorageLocationID(id string)

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by id.

func (*StorageReaderLeaseMutation) SetStorageLocationId

func (m *StorageReaderLeaseMutation) SetStorageLocationId(s string)

SetStorageLocationId sets the "storageLocationId" field.

func (*StorageReaderLeaseMutation) StorageLocationCleared

func (m *StorageReaderLeaseMutation) StorageLocationCleared() bool

StorageLocationCleared reports if the "storageLocation" edge to the StorageLocation entity was cleared.

func (*StorageReaderLeaseMutation) StorageLocationID

func (m *StorageReaderLeaseMutation) StorageLocationID() (id string, exists bool)

StorageLocationID returns the "storageLocation" edge ID in the mutation.

func (*StorageReaderLeaseMutation) StorageLocationIDs

func (m *StorageReaderLeaseMutation) StorageLocationIDs() (ids []string)

StorageLocationIDs returns the "storageLocation" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StorageLocationID instead. It exists only for internal usage by the builders.

func (*StorageReaderLeaseMutation) StorageLocationId

func (m *StorageReaderLeaseMutation) StorageLocationId() (r string, exists bool)

StorageLocationId returns the value of the "storageLocationId" field in the mutation.

func (StorageReaderLeaseMutation) Tx

func (m StorageReaderLeaseMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*StorageReaderLeaseMutation) Type

Type returns the node type of this mutation (StorageReaderLease).

func (*StorageReaderLeaseMutation) Where

Where appends a list predicates to the StorageReaderLeaseMutation builder.

func (*StorageReaderLeaseMutation) WhereP

func (m *StorageReaderLeaseMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the StorageReaderLeaseMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type StorageReaderLeaseQuery

type StorageReaderLeaseQuery struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseQuery is the builder for querying StorageReaderLease entities.

func (*StorageReaderLeaseQuery) Aggregate

Aggregate returns a StorageReaderLeaseSelect configured with the given aggregations.

func (*StorageReaderLeaseQuery) All

All executes the query and returns a list of StorageReaderLeases.

func (*StorageReaderLeaseQuery) AllX

AllX is like All, but panics if an error occurs.

func (*StorageReaderLeaseQuery) Clone

Clone returns a duplicate of the StorageReaderLeaseQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*StorageReaderLeaseQuery) Count

func (_q *StorageReaderLeaseQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StorageReaderLeaseQuery) CountX

func (_q *StorageReaderLeaseQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*StorageReaderLeaseQuery) ExecContext

func (c *StorageReaderLeaseQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseQuery) Exist

func (_q *StorageReaderLeaseQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*StorageReaderLeaseQuery) ExistX

func (_q *StorageReaderLeaseQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*StorageReaderLeaseQuery) First

First returns the first StorageReaderLease entity from the query. Returns a *NotFoundError when no StorageReaderLease was found.

func (*StorageReaderLeaseQuery) FirstID

func (_q *StorageReaderLeaseQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first StorageReaderLease ID from the query. Returns a *NotFoundError when no StorageReaderLease ID was found.

func (*StorageReaderLeaseQuery) FirstIDX

func (_q *StorageReaderLeaseQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*StorageReaderLeaseQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*StorageReaderLeaseQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*StorageReaderLeaseQuery) ForUpdate

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*StorageReaderLeaseQuery) GroupBy

func (_q *StorageReaderLeaseQuery) GroupBy(field string, fields ...string) *StorageReaderLeaseGroupBy

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 {
	StorageLocationId string `json:"storageLocationId,omitempty"`
	Count int `json:"count,omitempty"`
}

client.StorageReaderLease.Query().
	GroupBy(storagereaderlease.FieldStorageLocationId).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*StorageReaderLeaseQuery) IDs

func (_q *StorageReaderLeaseQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of StorageReaderLease IDs.

func (*StorageReaderLeaseQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*StorageReaderLeaseQuery) Limit

Limit the number of records to be returned by this query.

func (*StorageReaderLeaseQuery) Offset

Offset to start from.

func (*StorageReaderLeaseQuery) Only

Only returns a single StorageReaderLease entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StorageReaderLease entity is found. Returns a *NotFoundError when no StorageReaderLease entities are found.

func (*StorageReaderLeaseQuery) OnlyID

func (_q *StorageReaderLeaseQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only StorageReaderLease ID in the query. Returns a *NotSingularError when more than one StorageReaderLease ID is found. Returns a *NotFoundError when no entities are found.

func (*StorageReaderLeaseQuery) OnlyIDX

func (_q *StorageReaderLeaseQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*StorageReaderLeaseQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*StorageReaderLeaseQuery) Order

Order specifies how the records should be ordered.

func (*StorageReaderLeaseQuery) QueryContext

func (c *StorageReaderLeaseQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseQuery) QueryStorageLocation

func (_q *StorageReaderLeaseQuery) QueryStorageLocation() *StorageLocationQuery

QueryStorageLocation chains the current query on the "storageLocation" edge.

func (*StorageReaderLeaseQuery) Select

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 {
	StorageLocationId string `json:"storageLocationId,omitempty"`
}

client.StorageReaderLease.Query().
	Select(storagereaderlease.FieldStorageLocationId).
	Scan(ctx, &v)

func (*StorageReaderLeaseQuery) Unique

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 (*StorageReaderLeaseQuery) Where

Where adds a new predicate for the StorageReaderLeaseQuery builder.

func (*StorageReaderLeaseQuery) WithStorageLocation

func (_q *StorageReaderLeaseQuery) WithStorageLocation(opts ...func(*StorageLocationQuery)) *StorageReaderLeaseQuery

WithStorageLocation tells the query-builder to eager-load the nodes that are connected to the "storageLocation" edge. The optional arguments are used to configure the query builder of the edge.

type StorageReaderLeaseSelect

type StorageReaderLeaseSelect struct {
	*StorageReaderLeaseQuery
	// contains filtered or unexported fields
}

StorageReaderLeaseSelect is the builder for selecting fields of StorageReaderLease entities.

func (*StorageReaderLeaseSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*StorageReaderLeaseSelect) Bool

func (s *StorageReaderLeaseSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) BoolX

func (s *StorageReaderLeaseSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StorageReaderLeaseSelect) Bools

func (s *StorageReaderLeaseSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) BoolsX

func (s *StorageReaderLeaseSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (StorageReaderLeaseSelect) ExecContext

func (c StorageReaderLeaseSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseSelect) Float64

func (s *StorageReaderLeaseSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) Float64X

func (s *StorageReaderLeaseSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StorageReaderLeaseSelect) Float64s

func (s *StorageReaderLeaseSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) Float64sX

func (s *StorageReaderLeaseSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StorageReaderLeaseSelect) Int

func (s *StorageReaderLeaseSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) IntX

func (s *StorageReaderLeaseSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StorageReaderLeaseSelect) Ints

func (s *StorageReaderLeaseSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) IntsX

func (s *StorageReaderLeaseSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (StorageReaderLeaseSelect) QueryContext

func (c StorageReaderLeaseSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*StorageReaderLeaseSelect) ScanX

func (s *StorageReaderLeaseSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StorageReaderLeaseSelect) String

func (s *StorageReaderLeaseSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) StringX

func (s *StorageReaderLeaseSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StorageReaderLeaseSelect) Strings

func (s *StorageReaderLeaseSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StorageReaderLeaseSelect) StringsX

func (s *StorageReaderLeaseSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StorageReaderLeaseUpdate

type StorageReaderLeaseUpdate struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseUpdate is the builder for updating StorageReaderLease entities.

func (*StorageReaderLeaseUpdate) AddExpiresAt

AddExpiresAt adds value to the "expiresAt" field.

func (*StorageReaderLeaseUpdate) ClearStorageLocation

func (_u *StorageReaderLeaseUpdate) ClearStorageLocation() *StorageReaderLeaseUpdate

ClearStorageLocation clears the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdate) Exec

Exec executes the query.

func (*StorageReaderLeaseUpdate) ExecContext

func (c *StorageReaderLeaseUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseUpdate) ExecX

func (_u *StorageReaderLeaseUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StorageReaderLeaseUpdate) Mutation

Mutation returns the StorageReaderLeaseMutation object of the builder.

func (*StorageReaderLeaseUpdate) QueryContext

func (c *StorageReaderLeaseUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*StorageReaderLeaseUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*StorageReaderLeaseUpdate) SetExpiresAt

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseUpdate) SetNillableExpiresAt

func (_u *StorageReaderLeaseUpdate) SetNillableExpiresAt(v *int64) *StorageReaderLeaseUpdate

SetNillableExpiresAt sets the "expiresAt" field if the given value is not nil.

func (*StorageReaderLeaseUpdate) SetNillableScope

SetNillableScope sets the "scope" field if the given value is not nil.

func (*StorageReaderLeaseUpdate) SetNillableStorageLocationId

func (_u *StorageReaderLeaseUpdate) SetNillableStorageLocationId(v *string) *StorageReaderLeaseUpdate

SetNillableStorageLocationId sets the "storageLocationId" field if the given value is not nil.

func (*StorageReaderLeaseUpdate) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseUpdate) SetStorageLocation

SetStorageLocation sets the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdate) SetStorageLocationID

func (_u *StorageReaderLeaseUpdate) SetStorageLocationID(id string) *StorageReaderLeaseUpdate

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by ID.

func (*StorageReaderLeaseUpdate) SetStorageLocationId

func (_u *StorageReaderLeaseUpdate) SetStorageLocationId(v string) *StorageReaderLeaseUpdate

SetStorageLocationId sets the "storageLocationId" field.

func (*StorageReaderLeaseUpdate) Where

Where appends a list predicates to the StorageReaderLeaseUpdate builder.

type StorageReaderLeaseUpdateOne

type StorageReaderLeaseUpdateOne struct {
	// contains filtered or unexported fields
}

StorageReaderLeaseUpdateOne is the builder for updating a single StorageReaderLease entity.

func (*StorageReaderLeaseUpdateOne) AddExpiresAt

AddExpiresAt adds value to the "expiresAt" field.

func (*StorageReaderLeaseUpdateOne) ClearStorageLocation

func (_u *StorageReaderLeaseUpdateOne) ClearStorageLocation() *StorageReaderLeaseUpdateOne

ClearStorageLocation clears the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdateOne) Exec

Exec executes the query on the entity.

func (*StorageReaderLeaseUpdateOne) ExecContext

func (c *StorageReaderLeaseUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*StorageReaderLeaseUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*StorageReaderLeaseUpdateOne) Mutation

Mutation returns the StorageReaderLeaseMutation object of the builder.

func (*StorageReaderLeaseUpdateOne) QueryContext

func (c *StorageReaderLeaseUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*StorageReaderLeaseUpdateOne) Save

Save executes the query and returns the updated StorageReaderLease entity.

func (*StorageReaderLeaseUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*StorageReaderLeaseUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*StorageReaderLeaseUpdateOne) SetExpiresAt

SetExpiresAt sets the "expiresAt" field.

func (*StorageReaderLeaseUpdateOne) SetNillableExpiresAt

func (_u *StorageReaderLeaseUpdateOne) SetNillableExpiresAt(v *int64) *StorageReaderLeaseUpdateOne

SetNillableExpiresAt sets the "expiresAt" field if the given value is not nil.

func (*StorageReaderLeaseUpdateOne) SetNillableScope

SetNillableScope sets the "scope" field if the given value is not nil.

func (*StorageReaderLeaseUpdateOne) SetNillableStorageLocationId

func (_u *StorageReaderLeaseUpdateOne) SetNillableStorageLocationId(v *string) *StorageReaderLeaseUpdateOne

SetNillableStorageLocationId sets the "storageLocationId" field if the given value is not nil.

func (*StorageReaderLeaseUpdateOne) SetScope

SetScope sets the "scope" field.

func (*StorageReaderLeaseUpdateOne) SetStorageLocation

SetStorageLocation sets the "storageLocation" edge to the StorageLocation entity.

func (*StorageReaderLeaseUpdateOne) SetStorageLocationID

func (_u *StorageReaderLeaseUpdateOne) SetStorageLocationID(id string) *StorageReaderLeaseUpdateOne

SetStorageLocationID sets the "storageLocation" edge to the StorageLocation entity by ID.

func (*StorageReaderLeaseUpdateOne) SetStorageLocationId

func (_u *StorageReaderLeaseUpdateOne) SetStorageLocationId(v string) *StorageReaderLeaseUpdateOne

SetStorageLocationId sets the "storageLocationId" field.

func (*StorageReaderLeaseUpdateOne) Where

Where appends a list predicates to the StorageReaderLeaseUpdate builder.

type StorageReaderLeases

type StorageReaderLeases []*StorageReaderLease

StorageReaderLeases is a parsable slice of StorageReaderLease.

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 {

	// CacheEntry is the client for interacting with the CacheEntry builders.
	CacheEntry *CacheEntryClient
	// JobLock is the client for interacting with the JobLock builders.
	JobLock *JobLockClient
	// StorageDeletion is the client for interacting with the StorageDeletion builders.
	StorageDeletion *StorageDeletionClient
	// StorageLocation is the client for interacting with the StorageLocation builders.
	StorageLocation *StorageLocationClient
	// StorageManifest is the client for interacting with the StorageManifest builders.
	StorageManifest *StorageManifestClient
	// StorageReaderLease is the client for interacting with the StorageReaderLease builders.
	StorageReaderLease *StorageReaderLeaseClient
	// Upload is the client for interacting with the Upload builders.
	Upload *UploadClient
	// UploadBlock is the client for interacting with the UploadBlock builders.
	UploadBlock *UploadBlockClient
	// 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) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type Upload

type Upload struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Version holds the value of the "version" field.
	Version string `json:"version,omitempty"`
	// Scope holds the value of the "scope" field.
	Scope string `json:"scope,omitempty"`
	// RepoId holds the value of the "repoId" field.
	RepoId string `json:"repoId,omitempty"`
	// CreatedAt holds the value of the "createdAt" field.
	CreatedAt int64 `json:"createdAt,omitempty"`
	// LastPartUploadedAt holds the value of the "lastPartUploadedAt" field.
	LastPartUploadedAt *int64 `json:"lastPartUploadedAt,omitempty"`
	// StartedPartUploadCount holds the value of the "startedPartUploadCount" field.
	StartedPartUploadCount int `json:"startedPartUploadCount,omitempty"`
	// FinishedPartUploadCount holds the value of the "finishedPartUploadCount" field.
	FinishedPartUploadCount int `json:"finishedPartUploadCount,omitempty"`
	// FolderName holds the value of the "folderName" field.
	FolderName string `json:"folderName,omitempty"`
	// CommittedPartCount holds the value of the "committedPartCount" field.
	CommittedPartCount *int `json:"committedPartCount,omitempty"`
	// TupleHash holds the value of the "tupleHash" field.
	TupleHash *string `json:"tupleHash,omitempty"`
	// BlockManifestVersion holds the value of the "blockManifestVersion" field.
	BlockManifestVersion int64 `json:"blockManifestVersion,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UploadQuery when eager-loading is set.
	Edges UploadEdges `json:"edges"`
	// contains filtered or unexported fields
}

Upload is the model entity for the Upload schema.

func (*Upload) ExecContext

func (c *Upload) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Upload) QueryBlocks added in v1.2.2

func (_m *Upload) QueryBlocks() *UploadBlockQuery

QueryBlocks queries the "blocks" edge of the Upload entity.

func (*Upload) QueryContext

func (c *Upload) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Upload) QueryManifest added in v1.2.2

func (_m *Upload) QueryManifest() *StorageManifestQuery

QueryManifest queries the "manifest" edge of the Upload entity.

func (*Upload) String

func (_m *Upload) String() string

String implements the fmt.Stringer.

func (*Upload) Unwrap

func (_m *Upload) Unwrap() *Upload

Unwrap unwraps the Upload 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 (*Upload) Update

func (_m *Upload) Update() *UploadUpdateOne

Update returns a builder for updating this Upload. Note that you need to call Upload.Unwrap() before calling this method if this Upload was returned from a transaction, and the transaction was committed or rolled back.

func (*Upload) Value

func (_m *Upload) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Upload. This includes values selected through modifiers, order, etc.

type UploadBlock added in v1.2.2

type UploadBlock struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// UploadId holds the value of the "uploadId" field.
	UploadId int64 `json:"uploadId,omitempty"`
	// BlockHash holds the value of the "blockHash" field.
	BlockHash string `json:"blockHash,omitempty"`
	// CandidateId holds the value of the "candidateId" field.
	CandidateId string `json:"candidateId,omitempty"`
	// SizeBytes holds the value of the "sizeBytes" field.
	SizeBytes int64 `json:"sizeBytes,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UploadBlockQuery when eager-loading is set.
	Edges UploadBlockEdges `json:"edges"`
	// contains filtered or unexported fields
}

UploadBlock is the model entity for the UploadBlock schema.

func (*UploadBlock) ExecContext added in v1.2.2

func (c *UploadBlock) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlock) QueryContext added in v1.2.2

func (c *UploadBlock) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlock) QueryUpload added in v1.2.2

func (_m *UploadBlock) QueryUpload() *UploadQuery

QueryUpload queries the "upload" edge of the UploadBlock entity.

func (*UploadBlock) String added in v1.2.2

func (_m *UploadBlock) String() string

String implements the fmt.Stringer.

func (*UploadBlock) Unwrap added in v1.2.2

func (_m *UploadBlock) Unwrap() *UploadBlock

Unwrap unwraps the UploadBlock 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 (*UploadBlock) Update added in v1.2.2

func (_m *UploadBlock) Update() *UploadBlockUpdateOne

Update returns a builder for updating this UploadBlock. Note that you need to call UploadBlock.Unwrap() before calling this method if this UploadBlock was returned from a transaction, and the transaction was committed or rolled back.

func (*UploadBlock) Value added in v1.2.2

func (_m *UploadBlock) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UploadBlock. This includes values selected through modifiers, order, etc.

type UploadBlockClient added in v1.2.2

type UploadBlockClient struct {
	// contains filtered or unexported fields
}

UploadBlockClient is a client for the UploadBlock schema.

func NewUploadBlockClient added in v1.2.2

func NewUploadBlockClient(c config) *UploadBlockClient

NewUploadBlockClient returns a client for the UploadBlock from the given config.

func (*UploadBlockClient) Create added in v1.2.2

func (c *UploadBlockClient) Create() *UploadBlockCreate

Create returns a builder for creating a UploadBlock entity.

func (*UploadBlockClient) CreateBulk added in v1.2.2

func (c *UploadBlockClient) CreateBulk(builders ...*UploadBlockCreate) *UploadBlockCreateBulk

CreateBulk returns a builder for creating a bulk of UploadBlock entities.

func (*UploadBlockClient) Delete added in v1.2.2

func (c *UploadBlockClient) Delete() *UploadBlockDelete

Delete returns a delete builder for UploadBlock.

func (*UploadBlockClient) DeleteOne added in v1.2.2

DeleteOne returns a builder for deleting the given entity.

func (*UploadBlockClient) DeleteOneID added in v1.2.2

func (c *UploadBlockClient) DeleteOneID(id int) *UploadBlockDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UploadBlockClient) ExecContext added in v1.2.2

func (c *UploadBlockClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockClient) Get added in v1.2.2

func (c *UploadBlockClient) Get(ctx context.Context, id int) (*UploadBlock, error)

Get returns a UploadBlock entity by its id.

func (*UploadBlockClient) GetX added in v1.2.2

func (c *UploadBlockClient) GetX(ctx context.Context, id int) *UploadBlock

GetX is like Get, but panics if an error occurs.

func (*UploadBlockClient) Hooks added in v1.2.2

func (c *UploadBlockClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UploadBlockClient) Intercept added in v1.2.2

func (c *UploadBlockClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `uploadblock.Intercept(f(g(h())))`.

func (*UploadBlockClient) Interceptors added in v1.2.2

func (c *UploadBlockClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UploadBlockClient) MapCreateBulk added in v1.2.2

func (c *UploadBlockClient) MapCreateBulk(slice any, setFunc func(*UploadBlockCreate, int)) *UploadBlockCreateBulk

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 (*UploadBlockClient) Query added in v1.2.2

func (c *UploadBlockClient) Query() *UploadBlockQuery

Query returns a query builder for UploadBlock.

func (*UploadBlockClient) QueryContext added in v1.2.2

func (c *UploadBlockClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockClient) QueryUpload added in v1.2.2

func (c *UploadBlockClient) QueryUpload(_m *UploadBlock) *UploadQuery

QueryUpload queries the upload edge of a UploadBlock.

func (*UploadBlockClient) Update added in v1.2.2

func (c *UploadBlockClient) Update() *UploadBlockUpdate

Update returns an update builder for UploadBlock.

func (*UploadBlockClient) UpdateOne added in v1.2.2

UpdateOne returns an update builder for the given entity.

func (*UploadBlockClient) UpdateOneID added in v1.2.2

func (c *UploadBlockClient) UpdateOneID(id int) *UploadBlockUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UploadBlockClient) Use added in v1.2.2

func (c *UploadBlockClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `uploadblock.Hooks(f(g(h())))`.

type UploadBlockCreate added in v1.2.2

type UploadBlockCreate struct {
	// contains filtered or unexported fields
}

UploadBlockCreate is the builder for creating a UploadBlock entity.

func (*UploadBlockCreate) Exec added in v1.2.2

func (_c *UploadBlockCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadBlockCreate) ExecContext added in v1.2.2

func (c *UploadBlockCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockCreate) ExecX added in v1.2.2

func (_c *UploadBlockCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadBlockCreate) Mutation added in v1.2.2

func (_c *UploadBlockCreate) Mutation() *UploadBlockMutation

Mutation returns the UploadBlockMutation object of the builder.

func (*UploadBlockCreate) QueryContext added in v1.2.2

func (c *UploadBlockCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockCreate) Save added in v1.2.2

Save creates the UploadBlock in the database.

func (*UploadBlockCreate) SaveX added in v1.2.2

func (_c *UploadBlockCreate) SaveX(ctx context.Context) *UploadBlock

SaveX calls Save and panics if Save returns an error.

func (*UploadBlockCreate) SetBlockHash added in v1.2.2

func (_c *UploadBlockCreate) SetBlockHash(v string) *UploadBlockCreate

SetBlockHash sets the "blockHash" field.

func (*UploadBlockCreate) SetCandidateId added in v1.2.2

func (_c *UploadBlockCreate) SetCandidateId(v string) *UploadBlockCreate

SetCandidateId sets the "candidateId" field.

func (*UploadBlockCreate) SetSizeBytes added in v1.2.2

func (_c *UploadBlockCreate) SetSizeBytes(v int64) *UploadBlockCreate

SetSizeBytes sets the "sizeBytes" field.

func (*UploadBlockCreate) SetUpload added in v1.2.2

func (_c *UploadBlockCreate) SetUpload(v *Upload) *UploadBlockCreate

SetUpload sets the "upload" edge to the Upload entity.

func (*UploadBlockCreate) SetUploadID added in v1.2.2

func (_c *UploadBlockCreate) SetUploadID(id int64) *UploadBlockCreate

SetUploadID sets the "upload" edge to the Upload entity by ID.

func (*UploadBlockCreate) SetUploadId added in v1.2.2

func (_c *UploadBlockCreate) SetUploadId(v int64) *UploadBlockCreate

SetUploadId sets the "uploadId" field.

type UploadBlockCreateBulk added in v1.2.2

type UploadBlockCreateBulk struct {
	// contains filtered or unexported fields
}

UploadBlockCreateBulk is the builder for creating many UploadBlock entities in bulk.

func (*UploadBlockCreateBulk) Exec added in v1.2.2

Exec executes the query.

func (*UploadBlockCreateBulk) ExecContext added in v1.2.2

func (c *UploadBlockCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockCreateBulk) ExecX added in v1.2.2

func (_c *UploadBlockCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadBlockCreateBulk) QueryContext added in v1.2.2

func (c *UploadBlockCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockCreateBulk) Save added in v1.2.2

Save creates the UploadBlock entities in the database.

func (*UploadBlockCreateBulk) SaveX added in v1.2.2

SaveX is like Save, but panics if an error occurs.

type UploadBlockDelete added in v1.2.2

type UploadBlockDelete struct {
	// contains filtered or unexported fields
}

UploadBlockDelete is the builder for deleting a UploadBlock entity.

func (*UploadBlockDelete) Exec added in v1.2.2

func (_d *UploadBlockDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UploadBlockDelete) ExecContext added in v1.2.2

func (c *UploadBlockDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockDelete) ExecX added in v1.2.2

func (_d *UploadBlockDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UploadBlockDelete) QueryContext added in v1.2.2

func (c *UploadBlockDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockDelete) Where added in v1.2.2

Where appends a list predicates to the UploadBlockDelete builder.

type UploadBlockDeleteOne added in v1.2.2

type UploadBlockDeleteOne struct {
	// contains filtered or unexported fields
}

UploadBlockDeleteOne is the builder for deleting a single UploadBlock entity.

func (*UploadBlockDeleteOne) Exec added in v1.2.2

func (_d *UploadBlockDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UploadBlockDeleteOne) ExecX added in v1.2.2

func (_d *UploadBlockDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadBlockDeleteOne) Where added in v1.2.2

Where appends a list predicates to the UploadBlockDelete builder.

type UploadBlockEdges added in v1.2.2

type UploadBlockEdges struct {
	// Upload holds the value of the upload edge.
	Upload *Upload `json:"upload,omitempty"`
	// contains filtered or unexported fields
}

UploadBlockEdges holds the relations/edges for other nodes in the graph.

func (UploadBlockEdges) UploadOrErr added in v1.2.2

func (e UploadBlockEdges) UploadOrErr() (*Upload, error)

UploadOrErr returns the Upload value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UploadBlockGroupBy added in v1.2.2

type UploadBlockGroupBy struct {
	// contains filtered or unexported fields
}

UploadBlockGroupBy is the group-by builder for UploadBlock entities.

func (*UploadBlockGroupBy) Aggregate added in v1.2.2

func (_g *UploadBlockGroupBy) Aggregate(fns ...AggregateFunc) *UploadBlockGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UploadBlockGroupBy) Bool added in v1.2.2

func (s *UploadBlockGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) BoolX added in v1.2.2

func (s *UploadBlockGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UploadBlockGroupBy) Bools added in v1.2.2

func (s *UploadBlockGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) BoolsX added in v1.2.2

func (s *UploadBlockGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UploadBlockGroupBy) Float64 added in v1.2.2

func (s *UploadBlockGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) Float64X added in v1.2.2

func (s *UploadBlockGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UploadBlockGroupBy) Float64s added in v1.2.2

func (s *UploadBlockGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) Float64sX added in v1.2.2

func (s *UploadBlockGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UploadBlockGroupBy) Int added in v1.2.2

func (s *UploadBlockGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) IntX added in v1.2.2

func (s *UploadBlockGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UploadBlockGroupBy) Ints added in v1.2.2

func (s *UploadBlockGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) IntsX added in v1.2.2

func (s *UploadBlockGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UploadBlockGroupBy) Scan added in v1.2.2

func (_g *UploadBlockGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UploadBlockGroupBy) ScanX added in v1.2.2

func (s *UploadBlockGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UploadBlockGroupBy) String added in v1.2.2

func (s *UploadBlockGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) StringX added in v1.2.2

func (s *UploadBlockGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UploadBlockGroupBy) Strings added in v1.2.2

func (s *UploadBlockGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UploadBlockGroupBy) StringsX added in v1.2.2

func (s *UploadBlockGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UploadBlockMutation added in v1.2.2

type UploadBlockMutation struct {
	// contains filtered or unexported fields
}

UploadBlockMutation represents an operation that mutates the UploadBlock nodes in the graph.

func (*UploadBlockMutation) AddField added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) AddSizeBytes added in v1.2.2

func (m *UploadBlockMutation) AddSizeBytes(i int64)

AddSizeBytes adds i to the "sizeBytes" field.

func (*UploadBlockMutation) AddedEdges added in v1.2.2

func (m *UploadBlockMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UploadBlockMutation) AddedField added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) AddedFields added in v1.2.2

func (m *UploadBlockMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UploadBlockMutation) AddedIDs added in v1.2.2

func (m *UploadBlockMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UploadBlockMutation) AddedSizeBytes added in v1.2.2

func (m *UploadBlockMutation) AddedSizeBytes() (r int64, exists bool)

AddedSizeBytes returns the value that was added to the "sizeBytes" field in this mutation.

func (*UploadBlockMutation) BlockHash added in v1.2.2

func (m *UploadBlockMutation) BlockHash() (r string, exists bool)

BlockHash returns the value of the "blockHash" field in the mutation.

func (*UploadBlockMutation) CandidateId added in v1.2.2

func (m *UploadBlockMutation) CandidateId() (r string, exists bool)

CandidateId returns the value of the "candidateId" field in the mutation.

func (*UploadBlockMutation) ClearEdge added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) ClearField added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) ClearUpload added in v1.2.2

func (m *UploadBlockMutation) ClearUpload()

ClearUpload clears the "upload" edge to the Upload entity.

func (*UploadBlockMutation) ClearedEdges added in v1.2.2

func (m *UploadBlockMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UploadBlockMutation) ClearedFields added in v1.2.2

func (m *UploadBlockMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UploadBlockMutation) Client added in v1.2.2

func (m UploadBlockMutation) 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 (*UploadBlockMutation) EdgeCleared added in v1.2.2

func (m *UploadBlockMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UploadBlockMutation) ExecContext added in v1.2.2

func (c *UploadBlockMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockMutation) Field added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) FieldCleared added in v1.2.2

func (m *UploadBlockMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UploadBlockMutation) Fields added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) ID added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) IDs added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) OldBlockHash added in v1.2.2

func (m *UploadBlockMutation) OldBlockHash(ctx context.Context) (v string, err error)

OldBlockHash returns the old "blockHash" field's value of the UploadBlock entity. If the UploadBlock 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 (*UploadBlockMutation) OldCandidateId added in v1.2.2

func (m *UploadBlockMutation) OldCandidateId(ctx context.Context) (v string, err error)

OldCandidateId returns the old "candidateId" field's value of the UploadBlock entity. If the UploadBlock 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 (*UploadBlockMutation) OldField added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) OldSizeBytes added in v1.2.2

func (m *UploadBlockMutation) OldSizeBytes(ctx context.Context) (v int64, err error)

OldSizeBytes returns the old "sizeBytes" field's value of the UploadBlock entity. If the UploadBlock 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 (*UploadBlockMutation) OldUploadId added in v1.2.2

func (m *UploadBlockMutation) OldUploadId(ctx context.Context) (v int64, err error)

OldUploadId returns the old "uploadId" field's value of the UploadBlock entity. If the UploadBlock 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 (*UploadBlockMutation) Op added in v1.2.2

func (m *UploadBlockMutation) Op() Op

Op returns the operation name.

func (*UploadBlockMutation) QueryContext added in v1.2.2

func (c *UploadBlockMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockMutation) RemovedEdges added in v1.2.2

func (m *UploadBlockMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UploadBlockMutation) RemovedIDs added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) ResetBlockHash added in v1.2.2

func (m *UploadBlockMutation) ResetBlockHash()

ResetBlockHash resets all changes to the "blockHash" field.

func (*UploadBlockMutation) ResetCandidateId added in v1.2.2

func (m *UploadBlockMutation) ResetCandidateId()

ResetCandidateId resets all changes to the "candidateId" field.

func (*UploadBlockMutation) ResetEdge added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) ResetField added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) ResetSizeBytes added in v1.2.2

func (m *UploadBlockMutation) ResetSizeBytes()

ResetSizeBytes resets all changes to the "sizeBytes" field.

func (*UploadBlockMutation) ResetUpload added in v1.2.2

func (m *UploadBlockMutation) ResetUpload()

ResetUpload resets all changes to the "upload" edge.

func (*UploadBlockMutation) ResetUploadId added in v1.2.2

func (m *UploadBlockMutation) ResetUploadId()

ResetUploadId resets all changes to the "uploadId" field.

func (*UploadBlockMutation) SetBlockHash added in v1.2.2

func (m *UploadBlockMutation) SetBlockHash(s string)

SetBlockHash sets the "blockHash" field.

func (*UploadBlockMutation) SetCandidateId added in v1.2.2

func (m *UploadBlockMutation) SetCandidateId(s string)

SetCandidateId sets the "candidateId" field.

func (*UploadBlockMutation) SetField added in v1.2.2

func (m *UploadBlockMutation) 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 (*UploadBlockMutation) SetOp added in v1.2.2

func (m *UploadBlockMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UploadBlockMutation) SetSizeBytes added in v1.2.2

func (m *UploadBlockMutation) SetSizeBytes(i int64)

SetSizeBytes sets the "sizeBytes" field.

func (*UploadBlockMutation) SetUploadID added in v1.2.2

func (m *UploadBlockMutation) SetUploadID(id int64)

SetUploadID sets the "upload" edge to the Upload entity by id.

func (*UploadBlockMutation) SetUploadId added in v1.2.2

func (m *UploadBlockMutation) SetUploadId(i int64)

SetUploadId sets the "uploadId" field.

func (*UploadBlockMutation) SizeBytes added in v1.2.2

func (m *UploadBlockMutation) SizeBytes() (r int64, exists bool)

SizeBytes returns the value of the "sizeBytes" field in the mutation.

func (UploadBlockMutation) Tx added in v1.2.2

func (m UploadBlockMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UploadBlockMutation) Type added in v1.2.2

func (m *UploadBlockMutation) Type() string

Type returns the node type of this mutation (UploadBlock).

func (*UploadBlockMutation) UploadCleared added in v1.2.2

func (m *UploadBlockMutation) UploadCleared() bool

UploadCleared reports if the "upload" edge to the Upload entity was cleared.

func (*UploadBlockMutation) UploadID added in v1.2.2

func (m *UploadBlockMutation) UploadID() (id int64, exists bool)

UploadID returns the "upload" edge ID in the mutation.

func (*UploadBlockMutation) UploadIDs added in v1.2.2

func (m *UploadBlockMutation) UploadIDs() (ids []int64)

UploadIDs returns the "upload" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UploadID instead. It exists only for internal usage by the builders.

func (*UploadBlockMutation) UploadId added in v1.2.2

func (m *UploadBlockMutation) UploadId() (r int64, exists bool)

UploadId returns the value of the "uploadId" field in the mutation.

func (*UploadBlockMutation) Where added in v1.2.2

func (m *UploadBlockMutation) Where(ps ...predicate.UploadBlock)

Where appends a list predicates to the UploadBlockMutation builder.

func (*UploadBlockMutation) WhereP added in v1.2.2

func (m *UploadBlockMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UploadBlockMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UploadBlockQuery added in v1.2.2

type UploadBlockQuery struct {
	// contains filtered or unexported fields
}

UploadBlockQuery is the builder for querying UploadBlock entities.

func (*UploadBlockQuery) Aggregate added in v1.2.2

func (_q *UploadBlockQuery) Aggregate(fns ...AggregateFunc) *UploadBlockSelect

Aggregate returns a UploadBlockSelect configured with the given aggregations.

func (*UploadBlockQuery) All added in v1.2.2

func (_q *UploadBlockQuery) All(ctx context.Context) ([]*UploadBlock, error)

All executes the query and returns a list of UploadBlocks.

func (*UploadBlockQuery) AllX added in v1.2.2

func (_q *UploadBlockQuery) AllX(ctx context.Context) []*UploadBlock

AllX is like All, but panics if an error occurs.

func (*UploadBlockQuery) Clone added in v1.2.2

func (_q *UploadBlockQuery) Clone() *UploadBlockQuery

Clone returns a duplicate of the UploadBlockQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UploadBlockQuery) Count added in v1.2.2

func (_q *UploadBlockQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UploadBlockQuery) CountX added in v1.2.2

func (_q *UploadBlockQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UploadBlockQuery) ExecContext added in v1.2.2

func (c *UploadBlockQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockQuery) Exist added in v1.2.2

func (_q *UploadBlockQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UploadBlockQuery) ExistX added in v1.2.2

func (_q *UploadBlockQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UploadBlockQuery) First added in v1.2.2

func (_q *UploadBlockQuery) First(ctx context.Context) (*UploadBlock, error)

First returns the first UploadBlock entity from the query. Returns a *NotFoundError when no UploadBlock was found.

func (*UploadBlockQuery) FirstID added in v1.2.2

func (_q *UploadBlockQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UploadBlock ID from the query. Returns a *NotFoundError when no UploadBlock ID was found.

func (*UploadBlockQuery) FirstIDX added in v1.2.2

func (_q *UploadBlockQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UploadBlockQuery) FirstX added in v1.2.2

func (_q *UploadBlockQuery) FirstX(ctx context.Context) *UploadBlock

FirstX is like First, but panics if an error occurs.

func (*UploadBlockQuery) ForShare added in v1.2.2

func (_q *UploadBlockQuery) ForShare(opts ...sql.LockOption) *UploadBlockQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*UploadBlockQuery) ForUpdate added in v1.2.2

func (_q *UploadBlockQuery) ForUpdate(opts ...sql.LockOption) *UploadBlockQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*UploadBlockQuery) GroupBy added in v1.2.2

func (_q *UploadBlockQuery) GroupBy(field string, fields ...string) *UploadBlockGroupBy

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 {
	UploadId int64 `json:"uploadId,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UploadBlock.Query().
	GroupBy(uploadblock.FieldUploadId).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UploadBlockQuery) IDs added in v1.2.2

func (_q *UploadBlockQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UploadBlock IDs.

func (*UploadBlockQuery) IDsX added in v1.2.2

func (_q *UploadBlockQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UploadBlockQuery) Limit added in v1.2.2

func (_q *UploadBlockQuery) Limit(limit int) *UploadBlockQuery

Limit the number of records to be returned by this query.

func (*UploadBlockQuery) Offset added in v1.2.2

func (_q *UploadBlockQuery) Offset(offset int) *UploadBlockQuery

Offset to start from.

func (*UploadBlockQuery) Only added in v1.2.2

func (_q *UploadBlockQuery) Only(ctx context.Context) (*UploadBlock, error)

Only returns a single UploadBlock entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UploadBlock entity is found. Returns a *NotFoundError when no UploadBlock entities are found.

func (*UploadBlockQuery) OnlyID added in v1.2.2

func (_q *UploadBlockQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UploadBlock ID in the query. Returns a *NotSingularError when more than one UploadBlock ID is found. Returns a *NotFoundError when no entities are found.

func (*UploadBlockQuery) OnlyIDX added in v1.2.2

func (_q *UploadBlockQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UploadBlockQuery) OnlyX added in v1.2.2

func (_q *UploadBlockQuery) OnlyX(ctx context.Context) *UploadBlock

OnlyX is like Only, but panics if an error occurs.

func (*UploadBlockQuery) Order added in v1.2.2

Order specifies how the records should be ordered.

func (*UploadBlockQuery) QueryContext added in v1.2.2

func (c *UploadBlockQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockQuery) QueryUpload added in v1.2.2

func (_q *UploadBlockQuery) QueryUpload() *UploadQuery

QueryUpload chains the current query on the "upload" edge.

func (*UploadBlockQuery) Select added in v1.2.2

func (_q *UploadBlockQuery) Select(fields ...string) *UploadBlockSelect

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 {
	UploadId int64 `json:"uploadId,omitempty"`
}

client.UploadBlock.Query().
	Select(uploadblock.FieldUploadId).
	Scan(ctx, &v)

func (*UploadBlockQuery) Unique added in v1.2.2

func (_q *UploadBlockQuery) Unique(unique bool) *UploadBlockQuery

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 (*UploadBlockQuery) Where added in v1.2.2

Where adds a new predicate for the UploadBlockQuery builder.

func (*UploadBlockQuery) WithUpload added in v1.2.2

func (_q *UploadBlockQuery) WithUpload(opts ...func(*UploadQuery)) *UploadBlockQuery

WithUpload tells the query-builder to eager-load the nodes that are connected to the "upload" edge. The optional arguments are used to configure the query builder of the edge.

type UploadBlockSelect added in v1.2.2

type UploadBlockSelect struct {
	*UploadBlockQuery
	// contains filtered or unexported fields
}

UploadBlockSelect is the builder for selecting fields of UploadBlock entities.

func (*UploadBlockSelect) Aggregate added in v1.2.2

func (_s *UploadBlockSelect) Aggregate(fns ...AggregateFunc) *UploadBlockSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UploadBlockSelect) Bool added in v1.2.2

func (s *UploadBlockSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) BoolX added in v1.2.2

func (s *UploadBlockSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UploadBlockSelect) Bools added in v1.2.2

func (s *UploadBlockSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) BoolsX added in v1.2.2

func (s *UploadBlockSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UploadBlockSelect) ExecContext added in v1.2.2

func (c UploadBlockSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockSelect) Float64 added in v1.2.2

func (s *UploadBlockSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) Float64X added in v1.2.2

func (s *UploadBlockSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UploadBlockSelect) Float64s added in v1.2.2

func (s *UploadBlockSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) Float64sX added in v1.2.2

func (s *UploadBlockSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UploadBlockSelect) Int added in v1.2.2

func (s *UploadBlockSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) IntX added in v1.2.2

func (s *UploadBlockSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UploadBlockSelect) Ints added in v1.2.2

func (s *UploadBlockSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) IntsX added in v1.2.2

func (s *UploadBlockSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (UploadBlockSelect) QueryContext added in v1.2.2

func (c UploadBlockSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockSelect) Scan added in v1.2.2

func (_s *UploadBlockSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UploadBlockSelect) ScanX added in v1.2.2

func (s *UploadBlockSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UploadBlockSelect) String added in v1.2.2

func (s *UploadBlockSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) StringX added in v1.2.2

func (s *UploadBlockSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UploadBlockSelect) Strings added in v1.2.2

func (s *UploadBlockSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UploadBlockSelect) StringsX added in v1.2.2

func (s *UploadBlockSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UploadBlockUpdate added in v1.2.2

type UploadBlockUpdate struct {
	// contains filtered or unexported fields
}

UploadBlockUpdate is the builder for updating UploadBlock entities.

func (*UploadBlockUpdate) AddSizeBytes added in v1.2.2

func (_u *UploadBlockUpdate) AddSizeBytes(v int64) *UploadBlockUpdate

AddSizeBytes adds value to the "sizeBytes" field.

func (*UploadBlockUpdate) Exec added in v1.2.2

func (_u *UploadBlockUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadBlockUpdate) ExecContext added in v1.2.2

func (c *UploadBlockUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockUpdate) ExecX added in v1.2.2

func (_u *UploadBlockUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadBlockUpdate) Mutation added in v1.2.2

func (_u *UploadBlockUpdate) Mutation() *UploadBlockMutation

Mutation returns the UploadBlockMutation object of the builder.

func (*UploadBlockUpdate) QueryContext added in v1.2.2

func (c *UploadBlockUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockUpdate) Save added in v1.2.2

func (_u *UploadBlockUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UploadBlockUpdate) SaveX added in v1.2.2

func (_u *UploadBlockUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UploadBlockUpdate) SetCandidateId added in v1.2.2

func (_u *UploadBlockUpdate) SetCandidateId(v string) *UploadBlockUpdate

SetCandidateId sets the "candidateId" field.

func (*UploadBlockUpdate) SetNillableCandidateId added in v1.2.2

func (_u *UploadBlockUpdate) SetNillableCandidateId(v *string) *UploadBlockUpdate

SetNillableCandidateId sets the "candidateId" field if the given value is not nil.

func (*UploadBlockUpdate) SetNillableSizeBytes added in v1.2.2

func (_u *UploadBlockUpdate) SetNillableSizeBytes(v *int64) *UploadBlockUpdate

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*UploadBlockUpdate) SetSizeBytes added in v1.2.2

func (_u *UploadBlockUpdate) SetSizeBytes(v int64) *UploadBlockUpdate

SetSizeBytes sets the "sizeBytes" field.

func (*UploadBlockUpdate) Where added in v1.2.2

Where appends a list predicates to the UploadBlockUpdate builder.

type UploadBlockUpdateOne added in v1.2.2

type UploadBlockUpdateOne struct {
	// contains filtered or unexported fields
}

UploadBlockUpdateOne is the builder for updating a single UploadBlock entity.

func (*UploadBlockUpdateOne) AddSizeBytes added in v1.2.2

func (_u *UploadBlockUpdateOne) AddSizeBytes(v int64) *UploadBlockUpdateOne

AddSizeBytes adds value to the "sizeBytes" field.

func (*UploadBlockUpdateOne) Exec added in v1.2.2

func (_u *UploadBlockUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UploadBlockUpdateOne) ExecContext added in v1.2.2

func (c *UploadBlockUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadBlockUpdateOne) ExecX added in v1.2.2

func (_u *UploadBlockUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadBlockUpdateOne) Mutation added in v1.2.2

func (_u *UploadBlockUpdateOne) Mutation() *UploadBlockMutation

Mutation returns the UploadBlockMutation object of the builder.

func (*UploadBlockUpdateOne) QueryContext added in v1.2.2

func (c *UploadBlockUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadBlockUpdateOne) Save added in v1.2.2

Save executes the query and returns the updated UploadBlock entity.

func (*UploadBlockUpdateOne) SaveX added in v1.2.2

SaveX is like Save, but panics if an error occurs.

func (*UploadBlockUpdateOne) Select added in v1.2.2

func (_u *UploadBlockUpdateOne) Select(field string, fields ...string) *UploadBlockUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UploadBlockUpdateOne) SetCandidateId added in v1.2.2

func (_u *UploadBlockUpdateOne) SetCandidateId(v string) *UploadBlockUpdateOne

SetCandidateId sets the "candidateId" field.

func (*UploadBlockUpdateOne) SetNillableCandidateId added in v1.2.2

func (_u *UploadBlockUpdateOne) SetNillableCandidateId(v *string) *UploadBlockUpdateOne

SetNillableCandidateId sets the "candidateId" field if the given value is not nil.

func (*UploadBlockUpdateOne) SetNillableSizeBytes added in v1.2.2

func (_u *UploadBlockUpdateOne) SetNillableSizeBytes(v *int64) *UploadBlockUpdateOne

SetNillableSizeBytes sets the "sizeBytes" field if the given value is not nil.

func (*UploadBlockUpdateOne) SetSizeBytes added in v1.2.2

func (_u *UploadBlockUpdateOne) SetSizeBytes(v int64) *UploadBlockUpdateOne

SetSizeBytes sets the "sizeBytes" field.

func (*UploadBlockUpdateOne) Where added in v1.2.2

Where appends a list predicates to the UploadBlockUpdate builder.

type UploadBlocks added in v1.2.2

type UploadBlocks []*UploadBlock

UploadBlocks is a parsable slice of UploadBlock.

type UploadClient

type UploadClient struct {
	// contains filtered or unexported fields
}

UploadClient is a client for the Upload schema.

func NewUploadClient

func NewUploadClient(c config) *UploadClient

NewUploadClient returns a client for the Upload from the given config.

func (*UploadClient) Create

func (c *UploadClient) Create() *UploadCreate

Create returns a builder for creating a Upload entity.

func (*UploadClient) CreateBulk

func (c *UploadClient) CreateBulk(builders ...*UploadCreate) *UploadCreateBulk

CreateBulk returns a builder for creating a bulk of Upload entities.

func (*UploadClient) Delete

func (c *UploadClient) Delete() *UploadDelete

Delete returns a delete builder for Upload.

func (*UploadClient) DeleteOne

func (c *UploadClient) DeleteOne(_m *Upload) *UploadDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UploadClient) DeleteOneID

func (c *UploadClient) DeleteOneID(id int64) *UploadDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UploadClient) ExecContext

func (c *UploadClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadClient) Get

func (c *UploadClient) Get(ctx context.Context, id int64) (*Upload, error)

Get returns a Upload entity by its id.

func (*UploadClient) GetX

func (c *UploadClient) GetX(ctx context.Context, id int64) *Upload

GetX is like Get, but panics if an error occurs.

func (*UploadClient) Hooks

func (c *UploadClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UploadClient) Intercept

func (c *UploadClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `upload.Intercept(f(g(h())))`.

func (*UploadClient) Interceptors

func (c *UploadClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UploadClient) MapCreateBulk

func (c *UploadClient) MapCreateBulk(slice any, setFunc func(*UploadCreate, int)) *UploadCreateBulk

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 (*UploadClient) Query

func (c *UploadClient) Query() *UploadQuery

Query returns a query builder for Upload.

func (*UploadClient) QueryBlocks added in v1.2.2

func (c *UploadClient) QueryBlocks(_m *Upload) *UploadBlockQuery

QueryBlocks queries the blocks edge of a Upload.

func (*UploadClient) QueryContext

func (c *UploadClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadClient) QueryManifest added in v1.2.2

func (c *UploadClient) QueryManifest(_m *Upload) *StorageManifestQuery

QueryManifest queries the manifest edge of a Upload.

func (*UploadClient) Update

func (c *UploadClient) Update() *UploadUpdate

Update returns an update builder for Upload.

func (*UploadClient) UpdateOne

func (c *UploadClient) UpdateOne(_m *Upload) *UploadUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UploadClient) UpdateOneID

func (c *UploadClient) UpdateOneID(id int64) *UploadUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UploadClient) Use

func (c *UploadClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `upload.Hooks(f(g(h())))`.

type UploadCreate

type UploadCreate struct {
	// contains filtered or unexported fields
}

UploadCreate is the builder for creating a Upload entity.

func (*UploadCreate) AddBlockIDs added in v1.2.2

func (_c *UploadCreate) AddBlockIDs(ids ...int) *UploadCreate

AddBlockIDs adds the "blocks" edge to the UploadBlock entity by IDs.

func (*UploadCreate) AddBlocks added in v1.2.2

func (_c *UploadCreate) AddBlocks(v ...*UploadBlock) *UploadCreate

AddBlocks adds the "blocks" edges to the UploadBlock entity.

func (*UploadCreate) Exec

func (_c *UploadCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadCreate) ExecContext

func (c *UploadCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadCreate) ExecX

func (_c *UploadCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadCreate) Mutation

func (_c *UploadCreate) Mutation() *UploadMutation

Mutation returns the UploadMutation object of the builder.

func (*UploadCreate) QueryContext

func (c *UploadCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadCreate) Save

func (_c *UploadCreate) Save(ctx context.Context) (*Upload, error)

Save creates the Upload in the database.

func (*UploadCreate) SaveX

func (_c *UploadCreate) SaveX(ctx context.Context) *Upload

SaveX calls Save and panics if Save returns an error.

func (*UploadCreate) SetBlockManifestVersion added in v1.2.2

func (_c *UploadCreate) SetBlockManifestVersion(v int64) *UploadCreate

SetBlockManifestVersion sets the "blockManifestVersion" field.

func (*UploadCreate) SetCommittedPartCount

func (_c *UploadCreate) SetCommittedPartCount(v int) *UploadCreate

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadCreate) SetCreatedAt

func (_c *UploadCreate) SetCreatedAt(v int64) *UploadCreate

SetCreatedAt sets the "createdAt" field.

func (*UploadCreate) SetFinishedPartUploadCount

func (_c *UploadCreate) SetFinishedPartUploadCount(v int) *UploadCreate

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadCreate) SetFolderName

func (_c *UploadCreate) SetFolderName(v string) *UploadCreate

SetFolderName sets the "folderName" field.

func (*UploadCreate) SetID

func (_c *UploadCreate) SetID(v int64) *UploadCreate

SetID sets the "id" field.

func (*UploadCreate) SetKey

func (_c *UploadCreate) SetKey(v string) *UploadCreate

SetKey sets the "key" field.

func (*UploadCreate) SetLastPartUploadedAt

func (_c *UploadCreate) SetLastPartUploadedAt(v int64) *UploadCreate

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadCreate) SetManifest added in v1.2.2

func (_c *UploadCreate) SetManifest(v *StorageManifest) *UploadCreate

SetManifest sets the "manifest" edge to the StorageManifest entity.

func (*UploadCreate) SetManifestID added in v1.2.2

func (_c *UploadCreate) SetManifestID(id int) *UploadCreate

SetManifestID sets the "manifest" edge to the StorageManifest entity by ID.

func (*UploadCreate) SetNillableBlockManifestVersion added in v1.2.2

func (_c *UploadCreate) SetNillableBlockManifestVersion(v *int64) *UploadCreate

SetNillableBlockManifestVersion sets the "blockManifestVersion" field if the given value is not nil.

func (*UploadCreate) SetNillableCommittedPartCount

func (_c *UploadCreate) SetNillableCommittedPartCount(v *int) *UploadCreate

SetNillableCommittedPartCount sets the "committedPartCount" field if the given value is not nil.

func (*UploadCreate) SetNillableFinishedPartUploadCount

func (_c *UploadCreate) SetNillableFinishedPartUploadCount(v *int) *UploadCreate

SetNillableFinishedPartUploadCount sets the "finishedPartUploadCount" field if the given value is not nil.

func (*UploadCreate) SetNillableLastPartUploadedAt

func (_c *UploadCreate) SetNillableLastPartUploadedAt(v *int64) *UploadCreate

SetNillableLastPartUploadedAt sets the "lastPartUploadedAt" field if the given value is not nil.

func (*UploadCreate) SetNillableManifestID added in v1.2.2

func (_c *UploadCreate) SetNillableManifestID(id *int) *UploadCreate

SetNillableManifestID sets the "manifest" edge to the StorageManifest entity by ID if the given value is not nil.

func (*UploadCreate) SetNillableStartedPartUploadCount

func (_c *UploadCreate) SetNillableStartedPartUploadCount(v *int) *UploadCreate

SetNillableStartedPartUploadCount sets the "startedPartUploadCount" field if the given value is not nil.

func (*UploadCreate) SetNillableTupleHash

func (_c *UploadCreate) SetNillableTupleHash(v *string) *UploadCreate

SetNillableTupleHash sets the "tupleHash" field if the given value is not nil.

func (*UploadCreate) SetRepoId

func (_c *UploadCreate) SetRepoId(v string) *UploadCreate

SetRepoId sets the "repoId" field.

func (*UploadCreate) SetScope

func (_c *UploadCreate) SetScope(v string) *UploadCreate

SetScope sets the "scope" field.

func (*UploadCreate) SetStartedPartUploadCount

func (_c *UploadCreate) SetStartedPartUploadCount(v int) *UploadCreate

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadCreate) SetTupleHash

func (_c *UploadCreate) SetTupleHash(v string) *UploadCreate

SetTupleHash sets the "tupleHash" field.

func (*UploadCreate) SetVersion

func (_c *UploadCreate) SetVersion(v string) *UploadCreate

SetVersion sets the "version" field.

type UploadCreateBulk

type UploadCreateBulk struct {
	// contains filtered or unexported fields
}

UploadCreateBulk is the builder for creating many Upload entities in bulk.

func (*UploadCreateBulk) Exec

func (_c *UploadCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadCreateBulk) ExecContext

func (c *UploadCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadCreateBulk) ExecX

func (_c *UploadCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadCreateBulk) QueryContext

func (c *UploadCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadCreateBulk) Save

func (_c *UploadCreateBulk) Save(ctx context.Context) ([]*Upload, error)

Save creates the Upload entities in the database.

func (*UploadCreateBulk) SaveX

func (_c *UploadCreateBulk) SaveX(ctx context.Context) []*Upload

SaveX is like Save, but panics if an error occurs.

type UploadDelete

type UploadDelete struct {
	// contains filtered or unexported fields
}

UploadDelete is the builder for deleting a Upload entity.

func (*UploadDelete) Exec

func (_d *UploadDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UploadDelete) ExecContext

func (c *UploadDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadDelete) ExecX

func (_d *UploadDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UploadDelete) QueryContext

func (c *UploadDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadDelete) Where

func (_d *UploadDelete) Where(ps ...predicate.Upload) *UploadDelete

Where appends a list predicates to the UploadDelete builder.

type UploadDeleteOne

type UploadDeleteOne struct {
	// contains filtered or unexported fields
}

UploadDeleteOne is the builder for deleting a single Upload entity.

func (*UploadDeleteOne) Exec

func (_d *UploadDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UploadDeleteOne) ExecX

func (_d *UploadDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadDeleteOne) Where

func (_d *UploadDeleteOne) Where(ps ...predicate.Upload) *UploadDeleteOne

Where appends a list predicates to the UploadDelete builder.

type UploadEdges added in v1.2.2

type UploadEdges struct {
	// Blocks holds the value of the blocks edge.
	Blocks []*UploadBlock `json:"blocks,omitempty"`
	// Manifest holds the value of the manifest edge.
	Manifest *StorageManifest `json:"manifest,omitempty"`
	// contains filtered or unexported fields
}

UploadEdges holds the relations/edges for other nodes in the graph.

func (UploadEdges) BlocksOrErr added in v1.2.2

func (e UploadEdges) BlocksOrErr() ([]*UploadBlock, error)

BlocksOrErr returns the Blocks value or an error if the edge was not loaded in eager-loading.

func (UploadEdges) ManifestOrErr added in v1.2.2

func (e UploadEdges) ManifestOrErr() (*StorageManifest, error)

ManifestOrErr returns the Manifest value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UploadGroupBy

type UploadGroupBy struct {
	// contains filtered or unexported fields
}

UploadGroupBy is the group-by builder for Upload entities.

func (*UploadGroupBy) Aggregate

func (_g *UploadGroupBy) Aggregate(fns ...AggregateFunc) *UploadGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UploadGroupBy) Bool

func (s *UploadGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) BoolX

func (s *UploadGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UploadGroupBy) Bools

func (s *UploadGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) BoolsX

func (s *UploadGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UploadGroupBy) Float64

func (s *UploadGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) Float64X

func (s *UploadGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UploadGroupBy) Float64s

func (s *UploadGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) Float64sX

func (s *UploadGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UploadGroupBy) Int

func (s *UploadGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) IntX

func (s *UploadGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UploadGroupBy) Ints

func (s *UploadGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) IntsX

func (s *UploadGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UploadGroupBy) Scan

func (_g *UploadGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UploadGroupBy) ScanX

func (s *UploadGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UploadGroupBy) String

func (s *UploadGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) StringX

func (s *UploadGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UploadGroupBy) Strings

func (s *UploadGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UploadGroupBy) StringsX

func (s *UploadGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UploadMutation

type UploadMutation struct {
	// contains filtered or unexported fields
}

UploadMutation represents an operation that mutates the Upload nodes in the graph.

func (*UploadMutation) AddBlockIDs added in v1.2.2

func (m *UploadMutation) AddBlockIDs(ids ...int)

AddBlockIDs adds the "blocks" edge to the UploadBlock entity by ids.

func (*UploadMutation) AddBlockManifestVersion added in v1.2.2

func (m *UploadMutation) AddBlockManifestVersion(i int64)

AddBlockManifestVersion adds i to the "blockManifestVersion" field.

func (*UploadMutation) AddCommittedPartCount

func (m *UploadMutation) AddCommittedPartCount(i int)

AddCommittedPartCount adds i to the "committedPartCount" field.

func (*UploadMutation) AddCreatedAt

func (m *UploadMutation) AddCreatedAt(i int64)

AddCreatedAt adds i to the "createdAt" field.

func (*UploadMutation) AddField

func (m *UploadMutation) 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 (*UploadMutation) AddFinishedPartUploadCount

func (m *UploadMutation) AddFinishedPartUploadCount(i int)

AddFinishedPartUploadCount adds i to the "finishedPartUploadCount" field.

func (*UploadMutation) AddLastPartUploadedAt

func (m *UploadMutation) AddLastPartUploadedAt(i int64)

AddLastPartUploadedAt adds i to the "lastPartUploadedAt" field.

func (*UploadMutation) AddStartedPartUploadCount

func (m *UploadMutation) AddStartedPartUploadCount(i int)

AddStartedPartUploadCount adds i to the "startedPartUploadCount" field.

func (*UploadMutation) AddedBlockManifestVersion added in v1.2.2

func (m *UploadMutation) AddedBlockManifestVersion() (r int64, exists bool)

AddedBlockManifestVersion returns the value that was added to the "blockManifestVersion" field in this mutation.

func (*UploadMutation) AddedCommittedPartCount

func (m *UploadMutation) AddedCommittedPartCount() (r int, exists bool)

AddedCommittedPartCount returns the value that was added to the "committedPartCount" field in this mutation.

func (*UploadMutation) AddedCreatedAt

func (m *UploadMutation) AddedCreatedAt() (r int64, exists bool)

AddedCreatedAt returns the value that was added to the "createdAt" field in this mutation.

func (*UploadMutation) AddedEdges

func (m *UploadMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UploadMutation) AddedField

func (m *UploadMutation) 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 (*UploadMutation) AddedFields

func (m *UploadMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UploadMutation) AddedFinishedPartUploadCount

func (m *UploadMutation) AddedFinishedPartUploadCount() (r int, exists bool)

AddedFinishedPartUploadCount returns the value that was added to the "finishedPartUploadCount" field in this mutation.

func (*UploadMutation) AddedIDs

func (m *UploadMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UploadMutation) AddedLastPartUploadedAt

func (m *UploadMutation) AddedLastPartUploadedAt() (r int64, exists bool)

AddedLastPartUploadedAt returns the value that was added to the "lastPartUploadedAt" field in this mutation.

func (*UploadMutation) AddedStartedPartUploadCount

func (m *UploadMutation) AddedStartedPartUploadCount() (r int, exists bool)

AddedStartedPartUploadCount returns the value that was added to the "startedPartUploadCount" field in this mutation.

func (*UploadMutation) BlockManifestVersion added in v1.2.2

func (m *UploadMutation) BlockManifestVersion() (r int64, exists bool)

BlockManifestVersion returns the value of the "blockManifestVersion" field in the mutation.

func (*UploadMutation) BlocksCleared added in v1.2.2

func (m *UploadMutation) BlocksCleared() bool

BlocksCleared reports if the "blocks" edge to the UploadBlock entity was cleared.

func (*UploadMutation) BlocksIDs added in v1.2.2

func (m *UploadMutation) BlocksIDs() (ids []int)

BlocksIDs returns the "blocks" edge IDs in the mutation.

func (*UploadMutation) ClearBlocks added in v1.2.2

func (m *UploadMutation) ClearBlocks()

ClearBlocks clears the "blocks" edge to the UploadBlock entity.

func (*UploadMutation) ClearCommittedPartCount

func (m *UploadMutation) ClearCommittedPartCount()

ClearCommittedPartCount clears the value of the "committedPartCount" field.

func (*UploadMutation) ClearEdge

func (m *UploadMutation) 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 (*UploadMutation) ClearField

func (m *UploadMutation) 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 (*UploadMutation) ClearLastPartUploadedAt

func (m *UploadMutation) ClearLastPartUploadedAt()

ClearLastPartUploadedAt clears the value of the "lastPartUploadedAt" field.

func (*UploadMutation) ClearManifest added in v1.2.2

func (m *UploadMutation) ClearManifest()

ClearManifest clears the "manifest" edge to the StorageManifest entity.

func (*UploadMutation) ClearTupleHash

func (m *UploadMutation) ClearTupleHash()

ClearTupleHash clears the value of the "tupleHash" field.

func (*UploadMutation) ClearedEdges

func (m *UploadMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UploadMutation) ClearedFields

func (m *UploadMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UploadMutation) Client

func (m UploadMutation) 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 (*UploadMutation) CommittedPartCount

func (m *UploadMutation) CommittedPartCount() (r int, exists bool)

CommittedPartCount returns the value of the "committedPartCount" field in the mutation.

func (*UploadMutation) CommittedPartCountCleared

func (m *UploadMutation) CommittedPartCountCleared() bool

CommittedPartCountCleared returns if the "committedPartCount" field was cleared in this mutation.

func (*UploadMutation) CreatedAt

func (m *UploadMutation) CreatedAt() (r int64, exists bool)

CreatedAt returns the value of the "createdAt" field in the mutation.

func (*UploadMutation) EdgeCleared

func (m *UploadMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UploadMutation) ExecContext

func (c *UploadMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadMutation) Field

func (m *UploadMutation) 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 (*UploadMutation) FieldCleared

func (m *UploadMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UploadMutation) Fields

func (m *UploadMutation) 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 (*UploadMutation) FinishedPartUploadCount

func (m *UploadMutation) FinishedPartUploadCount() (r int, exists bool)

FinishedPartUploadCount returns the value of the "finishedPartUploadCount" field in the mutation.

func (*UploadMutation) FolderName

func (m *UploadMutation) FolderName() (r string, exists bool)

FolderName returns the value of the "folderName" field in the mutation.

func (*UploadMutation) ID

func (m *UploadMutation) ID() (id int64, 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 (*UploadMutation) IDs

func (m *UploadMutation) IDs(ctx context.Context) ([]int64, 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 (*UploadMutation) Key

func (m *UploadMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*UploadMutation) LastPartUploadedAt

func (m *UploadMutation) LastPartUploadedAt() (r int64, exists bool)

LastPartUploadedAt returns the value of the "lastPartUploadedAt" field in the mutation.

func (*UploadMutation) LastPartUploadedAtCleared

func (m *UploadMutation) LastPartUploadedAtCleared() bool

LastPartUploadedAtCleared returns if the "lastPartUploadedAt" field was cleared in this mutation.

func (*UploadMutation) ManifestCleared added in v1.2.2

func (m *UploadMutation) ManifestCleared() bool

ManifestCleared reports if the "manifest" edge to the StorageManifest entity was cleared.

func (*UploadMutation) ManifestID added in v1.2.2

func (m *UploadMutation) ManifestID() (id int, exists bool)

ManifestID returns the "manifest" edge ID in the mutation.

func (*UploadMutation) ManifestIDs added in v1.2.2

func (m *UploadMutation) ManifestIDs() (ids []int)

ManifestIDs returns the "manifest" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ManifestID instead. It exists only for internal usage by the builders.

func (*UploadMutation) OldBlockManifestVersion added in v1.2.2

func (m *UploadMutation) OldBlockManifestVersion(ctx context.Context) (v int64, err error)

OldBlockManifestVersion returns the old "blockManifestVersion" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldCommittedPartCount

func (m *UploadMutation) OldCommittedPartCount(ctx context.Context) (v *int, err error)

OldCommittedPartCount returns the old "committedPartCount" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldCreatedAt

func (m *UploadMutation) OldCreatedAt(ctx context.Context) (v int64, err error)

OldCreatedAt returns the old "createdAt" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldField

func (m *UploadMutation) 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 (*UploadMutation) OldFinishedPartUploadCount

func (m *UploadMutation) OldFinishedPartUploadCount(ctx context.Context) (v int, err error)

OldFinishedPartUploadCount returns the old "finishedPartUploadCount" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldFolderName

func (m *UploadMutation) OldFolderName(ctx context.Context) (v string, err error)

OldFolderName returns the old "folderName" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldKey

func (m *UploadMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldLastPartUploadedAt

func (m *UploadMutation) OldLastPartUploadedAt(ctx context.Context) (v *int64, err error)

OldLastPartUploadedAt returns the old "lastPartUploadedAt" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldRepoId

func (m *UploadMutation) OldRepoId(ctx context.Context) (v string, err error)

OldRepoId returns the old "repoId" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldScope

func (m *UploadMutation) OldScope(ctx context.Context) (v string, err error)

OldScope returns the old "scope" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldStartedPartUploadCount

func (m *UploadMutation) OldStartedPartUploadCount(ctx context.Context) (v int, err error)

OldStartedPartUploadCount returns the old "startedPartUploadCount" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldTupleHash

func (m *UploadMutation) OldTupleHash(ctx context.Context) (v *string, err error)

OldTupleHash returns the old "tupleHash" field's value of the Upload entity. If the Upload 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 (*UploadMutation) OldVersion

func (m *UploadMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the Upload entity. If the Upload 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 (*UploadMutation) Op

func (m *UploadMutation) Op() Op

Op returns the operation name.

func (*UploadMutation) QueryContext

func (c *UploadMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadMutation) RemoveBlockIDs added in v1.2.2

func (m *UploadMutation) RemoveBlockIDs(ids ...int)

RemoveBlockIDs removes the "blocks" edge to the UploadBlock entity by IDs.

func (*UploadMutation) RemovedBlocksIDs added in v1.2.2

func (m *UploadMutation) RemovedBlocksIDs() (ids []int)

RemovedBlocks returns the removed IDs of the "blocks" edge to the UploadBlock entity.

func (*UploadMutation) RemovedEdges

func (m *UploadMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UploadMutation) RemovedIDs

func (m *UploadMutation) 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 (*UploadMutation) RepoId

func (m *UploadMutation) RepoId() (r string, exists bool)

RepoId returns the value of the "repoId" field in the mutation.

func (*UploadMutation) ResetBlockManifestVersion added in v1.2.2

func (m *UploadMutation) ResetBlockManifestVersion()

ResetBlockManifestVersion resets all changes to the "blockManifestVersion" field.

func (*UploadMutation) ResetBlocks added in v1.2.2

func (m *UploadMutation) ResetBlocks()

ResetBlocks resets all changes to the "blocks" edge.

func (*UploadMutation) ResetCommittedPartCount

func (m *UploadMutation) ResetCommittedPartCount()

ResetCommittedPartCount resets all changes to the "committedPartCount" field.

func (*UploadMutation) ResetCreatedAt

func (m *UploadMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "createdAt" field.

func (*UploadMutation) ResetEdge

func (m *UploadMutation) 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 (*UploadMutation) ResetField

func (m *UploadMutation) 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 (*UploadMutation) ResetFinishedPartUploadCount

func (m *UploadMutation) ResetFinishedPartUploadCount()

ResetFinishedPartUploadCount resets all changes to the "finishedPartUploadCount" field.

func (*UploadMutation) ResetFolderName

func (m *UploadMutation) ResetFolderName()

ResetFolderName resets all changes to the "folderName" field.

func (*UploadMutation) ResetKey

func (m *UploadMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*UploadMutation) ResetLastPartUploadedAt

func (m *UploadMutation) ResetLastPartUploadedAt()

ResetLastPartUploadedAt resets all changes to the "lastPartUploadedAt" field.

func (*UploadMutation) ResetManifest added in v1.2.2

func (m *UploadMutation) ResetManifest()

ResetManifest resets all changes to the "manifest" edge.

func (*UploadMutation) ResetRepoId

func (m *UploadMutation) ResetRepoId()

ResetRepoId resets all changes to the "repoId" field.

func (*UploadMutation) ResetScope

func (m *UploadMutation) ResetScope()

ResetScope resets all changes to the "scope" field.

func (*UploadMutation) ResetStartedPartUploadCount

func (m *UploadMutation) ResetStartedPartUploadCount()

ResetStartedPartUploadCount resets all changes to the "startedPartUploadCount" field.

func (*UploadMutation) ResetTupleHash

func (m *UploadMutation) ResetTupleHash()

ResetTupleHash resets all changes to the "tupleHash" field.

func (*UploadMutation) ResetVersion

func (m *UploadMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*UploadMutation) Scope

func (m *UploadMutation) Scope() (r string, exists bool)

Scope returns the value of the "scope" field in the mutation.

func (*UploadMutation) SetBlockManifestVersion added in v1.2.2

func (m *UploadMutation) SetBlockManifestVersion(i int64)

SetBlockManifestVersion sets the "blockManifestVersion" field.

func (*UploadMutation) SetCommittedPartCount

func (m *UploadMutation) SetCommittedPartCount(i int)

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadMutation) SetCreatedAt

func (m *UploadMutation) SetCreatedAt(i int64)

SetCreatedAt sets the "createdAt" field.

func (*UploadMutation) SetField

func (m *UploadMutation) 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 (*UploadMutation) SetFinishedPartUploadCount

func (m *UploadMutation) SetFinishedPartUploadCount(i int)

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadMutation) SetFolderName

func (m *UploadMutation) SetFolderName(s string)

SetFolderName sets the "folderName" field.

func (*UploadMutation) SetID

func (m *UploadMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Upload entities.

func (*UploadMutation) SetKey

func (m *UploadMutation) SetKey(s string)

SetKey sets the "key" field.

func (*UploadMutation) SetLastPartUploadedAt

func (m *UploadMutation) SetLastPartUploadedAt(i int64)

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadMutation) SetManifestID added in v1.2.2

func (m *UploadMutation) SetManifestID(id int)

SetManifestID sets the "manifest" edge to the StorageManifest entity by id.

func (*UploadMutation) SetOp

func (m *UploadMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UploadMutation) SetRepoId

func (m *UploadMutation) SetRepoId(s string)

SetRepoId sets the "repoId" field.

func (*UploadMutation) SetScope

func (m *UploadMutation) SetScope(s string)

SetScope sets the "scope" field.

func (*UploadMutation) SetStartedPartUploadCount

func (m *UploadMutation) SetStartedPartUploadCount(i int)

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadMutation) SetTupleHash

func (m *UploadMutation) SetTupleHash(s string)

SetTupleHash sets the "tupleHash" field.

func (*UploadMutation) SetVersion

func (m *UploadMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*UploadMutation) StartedPartUploadCount

func (m *UploadMutation) StartedPartUploadCount() (r int, exists bool)

StartedPartUploadCount returns the value of the "startedPartUploadCount" field in the mutation.

func (*UploadMutation) TupleHash

func (m *UploadMutation) TupleHash() (r string, exists bool)

TupleHash returns the value of the "tupleHash" field in the mutation.

func (*UploadMutation) TupleHashCleared

func (m *UploadMutation) TupleHashCleared() bool

TupleHashCleared returns if the "tupleHash" field was cleared in this mutation.

func (UploadMutation) Tx

func (m UploadMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UploadMutation) Type

func (m *UploadMutation) Type() string

Type returns the node type of this mutation (Upload).

func (*UploadMutation) Version

func (m *UploadMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*UploadMutation) Where

func (m *UploadMutation) Where(ps ...predicate.Upload)

Where appends a list predicates to the UploadMutation builder.

func (*UploadMutation) WhereP

func (m *UploadMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UploadMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UploadQuery

type UploadQuery struct {
	// contains filtered or unexported fields
}

UploadQuery is the builder for querying Upload entities.

func (*UploadQuery) Aggregate

func (_q *UploadQuery) Aggregate(fns ...AggregateFunc) *UploadSelect

Aggregate returns a UploadSelect configured with the given aggregations.

func (*UploadQuery) All

func (_q *UploadQuery) All(ctx context.Context) ([]*Upload, error)

All executes the query and returns a list of Uploads.

func (*UploadQuery) AllX

func (_q *UploadQuery) AllX(ctx context.Context) []*Upload

AllX is like All, but panics if an error occurs.

func (*UploadQuery) Clone

func (_q *UploadQuery) Clone() *UploadQuery

Clone returns a duplicate of the UploadQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UploadQuery) Count

func (_q *UploadQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UploadQuery) CountX

func (_q *UploadQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UploadQuery) ExecContext

func (c *UploadQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadQuery) Exist

func (_q *UploadQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UploadQuery) ExistX

func (_q *UploadQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UploadQuery) First

func (_q *UploadQuery) First(ctx context.Context) (*Upload, error)

First returns the first Upload entity from the query. Returns a *NotFoundError when no Upload was found.

func (*UploadQuery) FirstID

func (_q *UploadQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first Upload ID from the query. Returns a *NotFoundError when no Upload ID was found.

func (*UploadQuery) FirstIDX

func (_q *UploadQuery) FirstIDX(ctx context.Context) int64

FirstIDX is like FirstID, but panics if an error occurs.

func (*UploadQuery) FirstX

func (_q *UploadQuery) FirstX(ctx context.Context) *Upload

FirstX is like First, but panics if an error occurs.

func (*UploadQuery) ForShare

func (_q *UploadQuery) ForShare(opts ...sql.LockOption) *UploadQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*UploadQuery) ForUpdate

func (_q *UploadQuery) ForUpdate(opts ...sql.LockOption) *UploadQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*UploadQuery) GroupBy

func (_q *UploadQuery) GroupBy(field string, fields ...string) *UploadGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Upload.Query().
	GroupBy(upload.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UploadQuery) IDs

func (_q *UploadQuery) IDs(ctx context.Context) (ids []int64, err error)

IDs executes the query and returns a list of Upload IDs.

func (*UploadQuery) IDsX

func (_q *UploadQuery) IDsX(ctx context.Context) []int64

IDsX is like IDs, but panics if an error occurs.

func (*UploadQuery) Limit

func (_q *UploadQuery) Limit(limit int) *UploadQuery

Limit the number of records to be returned by this query.

func (*UploadQuery) Offset

func (_q *UploadQuery) Offset(offset int) *UploadQuery

Offset to start from.

func (*UploadQuery) Only

func (_q *UploadQuery) Only(ctx context.Context) (*Upload, error)

Only returns a single Upload entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Upload entity is found. Returns a *NotFoundError when no Upload entities are found.

func (*UploadQuery) OnlyID

func (_q *UploadQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID is like Only, but returns the only Upload ID in the query. Returns a *NotSingularError when more than one Upload ID is found. Returns a *NotFoundError when no entities are found.

func (*UploadQuery) OnlyIDX

func (_q *UploadQuery) OnlyIDX(ctx context.Context) int64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UploadQuery) OnlyX

func (_q *UploadQuery) OnlyX(ctx context.Context) *Upload

OnlyX is like Only, but panics if an error occurs.

func (*UploadQuery) Order

func (_q *UploadQuery) Order(o ...upload.OrderOption) *UploadQuery

Order specifies how the records should be ordered.

func (*UploadQuery) QueryBlocks added in v1.2.2

func (_q *UploadQuery) QueryBlocks() *UploadBlockQuery

QueryBlocks chains the current query on the "blocks" edge.

func (*UploadQuery) QueryContext

func (c *UploadQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadQuery) QueryManifest added in v1.2.2

func (_q *UploadQuery) QueryManifest() *StorageManifestQuery

QueryManifest chains the current query on the "manifest" edge.

func (*UploadQuery) Select

func (_q *UploadQuery) Select(fields ...string) *UploadSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
}

client.Upload.Query().
	Select(upload.FieldKey).
	Scan(ctx, &v)

func (*UploadQuery) Unique

func (_q *UploadQuery) Unique(unique bool) *UploadQuery

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 (*UploadQuery) Where

func (_q *UploadQuery) Where(ps ...predicate.Upload) *UploadQuery

Where adds a new predicate for the UploadQuery builder.

func (*UploadQuery) WithBlocks added in v1.2.2

func (_q *UploadQuery) WithBlocks(opts ...func(*UploadBlockQuery)) *UploadQuery

WithBlocks tells the query-builder to eager-load the nodes that are connected to the "blocks" edge. The optional arguments are used to configure the query builder of the edge.

func (*UploadQuery) WithManifest added in v1.2.2

func (_q *UploadQuery) WithManifest(opts ...func(*StorageManifestQuery)) *UploadQuery

WithManifest tells the query-builder to eager-load the nodes that are connected to the "manifest" edge. The optional arguments are used to configure the query builder of the edge.

type UploadSelect

type UploadSelect struct {
	*UploadQuery
	// contains filtered or unexported fields
}

UploadSelect is the builder for selecting fields of Upload entities.

func (*UploadSelect) Aggregate

func (_s *UploadSelect) Aggregate(fns ...AggregateFunc) *UploadSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UploadSelect) Bool

func (s *UploadSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UploadSelect) BoolX

func (s *UploadSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UploadSelect) Bools

func (s *UploadSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UploadSelect) BoolsX

func (s *UploadSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UploadSelect) ExecContext

func (c UploadSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadSelect) Float64

func (s *UploadSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UploadSelect) Float64X

func (s *UploadSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UploadSelect) Float64s

func (s *UploadSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UploadSelect) Float64sX

func (s *UploadSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UploadSelect) Int

func (s *UploadSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UploadSelect) IntX

func (s *UploadSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UploadSelect) Ints

func (s *UploadSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UploadSelect) IntsX

func (s *UploadSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (UploadSelect) QueryContext

func (c UploadSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadSelect) Scan

func (_s *UploadSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UploadSelect) ScanX

func (s *UploadSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UploadSelect) String

func (s *UploadSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UploadSelect) StringX

func (s *UploadSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UploadSelect) Strings

func (s *UploadSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UploadSelect) StringsX

func (s *UploadSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UploadUpdate

type UploadUpdate struct {
	// contains filtered or unexported fields
}

UploadUpdate is the builder for updating Upload entities.

func (*UploadUpdate) AddBlockIDs added in v1.2.2

func (_u *UploadUpdate) AddBlockIDs(ids ...int) *UploadUpdate

AddBlockIDs adds the "blocks" edge to the UploadBlock entity by IDs.

func (*UploadUpdate) AddBlockManifestVersion added in v1.2.2

func (_u *UploadUpdate) AddBlockManifestVersion(v int64) *UploadUpdate

AddBlockManifestVersion adds value to the "blockManifestVersion" field.

func (*UploadUpdate) AddBlocks added in v1.2.2

func (_u *UploadUpdate) AddBlocks(v ...*UploadBlock) *UploadUpdate

AddBlocks adds the "blocks" edges to the UploadBlock entity.

func (*UploadUpdate) AddCommittedPartCount

func (_u *UploadUpdate) AddCommittedPartCount(v int) *UploadUpdate

AddCommittedPartCount adds value to the "committedPartCount" field.

func (*UploadUpdate) AddCreatedAt

func (_u *UploadUpdate) AddCreatedAt(v int64) *UploadUpdate

AddCreatedAt adds value to the "createdAt" field.

func (*UploadUpdate) AddFinishedPartUploadCount

func (_u *UploadUpdate) AddFinishedPartUploadCount(v int) *UploadUpdate

AddFinishedPartUploadCount adds value to the "finishedPartUploadCount" field.

func (*UploadUpdate) AddLastPartUploadedAt

func (_u *UploadUpdate) AddLastPartUploadedAt(v int64) *UploadUpdate

AddLastPartUploadedAt adds value to the "lastPartUploadedAt" field.

func (*UploadUpdate) AddStartedPartUploadCount

func (_u *UploadUpdate) AddStartedPartUploadCount(v int) *UploadUpdate

AddStartedPartUploadCount adds value to the "startedPartUploadCount" field.

func (*UploadUpdate) ClearBlocks added in v1.2.2

func (_u *UploadUpdate) ClearBlocks() *UploadUpdate

ClearBlocks clears all "blocks" edges to the UploadBlock entity.

func (*UploadUpdate) ClearCommittedPartCount

func (_u *UploadUpdate) ClearCommittedPartCount() *UploadUpdate

ClearCommittedPartCount clears the value of the "committedPartCount" field.

func (*UploadUpdate) ClearLastPartUploadedAt

func (_u *UploadUpdate) ClearLastPartUploadedAt() *UploadUpdate

ClearLastPartUploadedAt clears the value of the "lastPartUploadedAt" field.

func (*UploadUpdate) ClearManifest added in v1.2.2

func (_u *UploadUpdate) ClearManifest() *UploadUpdate

ClearManifest clears the "manifest" edge to the StorageManifest entity.

func (*UploadUpdate) ClearTupleHash

func (_u *UploadUpdate) ClearTupleHash() *UploadUpdate

ClearTupleHash clears the value of the "tupleHash" field.

func (*UploadUpdate) Exec

func (_u *UploadUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UploadUpdate) ExecContext

func (c *UploadUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadUpdate) ExecX

func (_u *UploadUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadUpdate) Mutation

func (_u *UploadUpdate) Mutation() *UploadMutation

Mutation returns the UploadMutation object of the builder.

func (*UploadUpdate) QueryContext

func (c *UploadUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadUpdate) RemoveBlockIDs added in v1.2.2

func (_u *UploadUpdate) RemoveBlockIDs(ids ...int) *UploadUpdate

RemoveBlockIDs removes the "blocks" edge to UploadBlock entities by IDs.

func (*UploadUpdate) RemoveBlocks added in v1.2.2

func (_u *UploadUpdate) RemoveBlocks(v ...*UploadBlock) *UploadUpdate

RemoveBlocks removes "blocks" edges to UploadBlock entities.

func (*UploadUpdate) Save

func (_u *UploadUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UploadUpdate) SaveX

func (_u *UploadUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UploadUpdate) SetBlockManifestVersion added in v1.2.2

func (_u *UploadUpdate) SetBlockManifestVersion(v int64) *UploadUpdate

SetBlockManifestVersion sets the "blockManifestVersion" field.

func (*UploadUpdate) SetCommittedPartCount

func (_u *UploadUpdate) SetCommittedPartCount(v int) *UploadUpdate

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadUpdate) SetCreatedAt

func (_u *UploadUpdate) SetCreatedAt(v int64) *UploadUpdate

SetCreatedAt sets the "createdAt" field.

func (*UploadUpdate) SetFinishedPartUploadCount

func (_u *UploadUpdate) SetFinishedPartUploadCount(v int) *UploadUpdate

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadUpdate) SetFolderName

func (_u *UploadUpdate) SetFolderName(v string) *UploadUpdate

SetFolderName sets the "folderName" field.

func (*UploadUpdate) SetKey

func (_u *UploadUpdate) SetKey(v string) *UploadUpdate

SetKey sets the "key" field.

func (*UploadUpdate) SetLastPartUploadedAt

func (_u *UploadUpdate) SetLastPartUploadedAt(v int64) *UploadUpdate

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadUpdate) SetManifest added in v1.2.2

func (_u *UploadUpdate) SetManifest(v *StorageManifest) *UploadUpdate

SetManifest sets the "manifest" edge to the StorageManifest entity.

func (*UploadUpdate) SetManifestID added in v1.2.2

func (_u *UploadUpdate) SetManifestID(id int) *UploadUpdate

SetManifestID sets the "manifest" edge to the StorageManifest entity by ID.

func (*UploadUpdate) SetNillableBlockManifestVersion added in v1.2.2

func (_u *UploadUpdate) SetNillableBlockManifestVersion(v *int64) *UploadUpdate

SetNillableBlockManifestVersion sets the "blockManifestVersion" field if the given value is not nil.

func (*UploadUpdate) SetNillableCommittedPartCount

func (_u *UploadUpdate) SetNillableCommittedPartCount(v *int) *UploadUpdate

SetNillableCommittedPartCount sets the "committedPartCount" field if the given value is not nil.

func (*UploadUpdate) SetNillableCreatedAt

func (_u *UploadUpdate) SetNillableCreatedAt(v *int64) *UploadUpdate

SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.

func (*UploadUpdate) SetNillableFinishedPartUploadCount

func (_u *UploadUpdate) SetNillableFinishedPartUploadCount(v *int) *UploadUpdate

SetNillableFinishedPartUploadCount sets the "finishedPartUploadCount" field if the given value is not nil.

func (*UploadUpdate) SetNillableFolderName

func (_u *UploadUpdate) SetNillableFolderName(v *string) *UploadUpdate

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*UploadUpdate) SetNillableKey

func (_u *UploadUpdate) SetNillableKey(v *string) *UploadUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*UploadUpdate) SetNillableLastPartUploadedAt

func (_u *UploadUpdate) SetNillableLastPartUploadedAt(v *int64) *UploadUpdate

SetNillableLastPartUploadedAt sets the "lastPartUploadedAt" field if the given value is not nil.

func (*UploadUpdate) SetNillableManifestID added in v1.2.2

func (_u *UploadUpdate) SetNillableManifestID(id *int) *UploadUpdate

SetNillableManifestID sets the "manifest" edge to the StorageManifest entity by ID if the given value is not nil.

func (*UploadUpdate) SetNillableRepoId

func (_u *UploadUpdate) SetNillableRepoId(v *string) *UploadUpdate

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*UploadUpdate) SetNillableScope

func (_u *UploadUpdate) SetNillableScope(v *string) *UploadUpdate

SetNillableScope sets the "scope" field if the given value is not nil.

func (*UploadUpdate) SetNillableStartedPartUploadCount

func (_u *UploadUpdate) SetNillableStartedPartUploadCount(v *int) *UploadUpdate

SetNillableStartedPartUploadCount sets the "startedPartUploadCount" field if the given value is not nil.

func (*UploadUpdate) SetNillableTupleHash

func (_u *UploadUpdate) SetNillableTupleHash(v *string) *UploadUpdate

SetNillableTupleHash sets the "tupleHash" field if the given value is not nil.

func (*UploadUpdate) SetNillableVersion

func (_u *UploadUpdate) SetNillableVersion(v *string) *UploadUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*UploadUpdate) SetRepoId

func (_u *UploadUpdate) SetRepoId(v string) *UploadUpdate

SetRepoId sets the "repoId" field.

func (*UploadUpdate) SetScope

func (_u *UploadUpdate) SetScope(v string) *UploadUpdate

SetScope sets the "scope" field.

func (*UploadUpdate) SetStartedPartUploadCount

func (_u *UploadUpdate) SetStartedPartUploadCount(v int) *UploadUpdate

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadUpdate) SetTupleHash

func (_u *UploadUpdate) SetTupleHash(v string) *UploadUpdate

SetTupleHash sets the "tupleHash" field.

func (*UploadUpdate) SetVersion

func (_u *UploadUpdate) SetVersion(v string) *UploadUpdate

SetVersion sets the "version" field.

func (*UploadUpdate) Where

func (_u *UploadUpdate) Where(ps ...predicate.Upload) *UploadUpdate

Where appends a list predicates to the UploadUpdate builder.

type UploadUpdateOne

type UploadUpdateOne struct {
	// contains filtered or unexported fields
}

UploadUpdateOne is the builder for updating a single Upload entity.

func (*UploadUpdateOne) AddBlockIDs added in v1.2.2

func (_u *UploadUpdateOne) AddBlockIDs(ids ...int) *UploadUpdateOne

AddBlockIDs adds the "blocks" edge to the UploadBlock entity by IDs.

func (*UploadUpdateOne) AddBlockManifestVersion added in v1.2.2

func (_u *UploadUpdateOne) AddBlockManifestVersion(v int64) *UploadUpdateOne

AddBlockManifestVersion adds value to the "blockManifestVersion" field.

func (*UploadUpdateOne) AddBlocks added in v1.2.2

func (_u *UploadUpdateOne) AddBlocks(v ...*UploadBlock) *UploadUpdateOne

AddBlocks adds the "blocks" edges to the UploadBlock entity.

func (*UploadUpdateOne) AddCommittedPartCount

func (_u *UploadUpdateOne) AddCommittedPartCount(v int) *UploadUpdateOne

AddCommittedPartCount adds value to the "committedPartCount" field.

func (*UploadUpdateOne) AddCreatedAt

func (_u *UploadUpdateOne) AddCreatedAt(v int64) *UploadUpdateOne

AddCreatedAt adds value to the "createdAt" field.

func (*UploadUpdateOne) AddFinishedPartUploadCount

func (_u *UploadUpdateOne) AddFinishedPartUploadCount(v int) *UploadUpdateOne

AddFinishedPartUploadCount adds value to the "finishedPartUploadCount" field.

func (*UploadUpdateOne) AddLastPartUploadedAt

func (_u *UploadUpdateOne) AddLastPartUploadedAt(v int64) *UploadUpdateOne

AddLastPartUploadedAt adds value to the "lastPartUploadedAt" field.

func (*UploadUpdateOne) AddStartedPartUploadCount

func (_u *UploadUpdateOne) AddStartedPartUploadCount(v int) *UploadUpdateOne

AddStartedPartUploadCount adds value to the "startedPartUploadCount" field.

func (*UploadUpdateOne) ClearBlocks added in v1.2.2

func (_u *UploadUpdateOne) ClearBlocks() *UploadUpdateOne

ClearBlocks clears all "blocks" edges to the UploadBlock entity.

func (*UploadUpdateOne) ClearCommittedPartCount

func (_u *UploadUpdateOne) ClearCommittedPartCount() *UploadUpdateOne

ClearCommittedPartCount clears the value of the "committedPartCount" field.

func (*UploadUpdateOne) ClearLastPartUploadedAt

func (_u *UploadUpdateOne) ClearLastPartUploadedAt() *UploadUpdateOne

ClearLastPartUploadedAt clears the value of the "lastPartUploadedAt" field.

func (*UploadUpdateOne) ClearManifest added in v1.2.2

func (_u *UploadUpdateOne) ClearManifest() *UploadUpdateOne

ClearManifest clears the "manifest" edge to the StorageManifest entity.

func (*UploadUpdateOne) ClearTupleHash

func (_u *UploadUpdateOne) ClearTupleHash() *UploadUpdateOne

ClearTupleHash clears the value of the "tupleHash" field.

func (*UploadUpdateOne) Exec

func (_u *UploadUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UploadUpdateOne) ExecContext

func (c *UploadUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UploadUpdateOne) ExecX

func (_u *UploadUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UploadUpdateOne) Mutation

func (_u *UploadUpdateOne) Mutation() *UploadMutation

Mutation returns the UploadMutation object of the builder.

func (*UploadUpdateOne) QueryContext

func (c *UploadUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UploadUpdateOne) RemoveBlockIDs added in v1.2.2

func (_u *UploadUpdateOne) RemoveBlockIDs(ids ...int) *UploadUpdateOne

RemoveBlockIDs removes the "blocks" edge to UploadBlock entities by IDs.

func (*UploadUpdateOne) RemoveBlocks added in v1.2.2

func (_u *UploadUpdateOne) RemoveBlocks(v ...*UploadBlock) *UploadUpdateOne

RemoveBlocks removes "blocks" edges to UploadBlock entities.

func (*UploadUpdateOne) Save

func (_u *UploadUpdateOne) Save(ctx context.Context) (*Upload, error)

Save executes the query and returns the updated Upload entity.

func (*UploadUpdateOne) SaveX

func (_u *UploadUpdateOne) SaveX(ctx context.Context) *Upload

SaveX is like Save, but panics if an error occurs.

func (*UploadUpdateOne) Select

func (_u *UploadUpdateOne) Select(field string, fields ...string) *UploadUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UploadUpdateOne) SetBlockManifestVersion added in v1.2.2

func (_u *UploadUpdateOne) SetBlockManifestVersion(v int64) *UploadUpdateOne

SetBlockManifestVersion sets the "blockManifestVersion" field.

func (*UploadUpdateOne) SetCommittedPartCount

func (_u *UploadUpdateOne) SetCommittedPartCount(v int) *UploadUpdateOne

SetCommittedPartCount sets the "committedPartCount" field.

func (*UploadUpdateOne) SetCreatedAt

func (_u *UploadUpdateOne) SetCreatedAt(v int64) *UploadUpdateOne

SetCreatedAt sets the "createdAt" field.

func (*UploadUpdateOne) SetFinishedPartUploadCount

func (_u *UploadUpdateOne) SetFinishedPartUploadCount(v int) *UploadUpdateOne

SetFinishedPartUploadCount sets the "finishedPartUploadCount" field.

func (*UploadUpdateOne) SetFolderName

func (_u *UploadUpdateOne) SetFolderName(v string) *UploadUpdateOne

SetFolderName sets the "folderName" field.

func (*UploadUpdateOne) SetKey

func (_u *UploadUpdateOne) SetKey(v string) *UploadUpdateOne

SetKey sets the "key" field.

func (*UploadUpdateOne) SetLastPartUploadedAt

func (_u *UploadUpdateOne) SetLastPartUploadedAt(v int64) *UploadUpdateOne

SetLastPartUploadedAt sets the "lastPartUploadedAt" field.

func (*UploadUpdateOne) SetManifest added in v1.2.2

func (_u *UploadUpdateOne) SetManifest(v *StorageManifest) *UploadUpdateOne

SetManifest sets the "manifest" edge to the StorageManifest entity.

func (*UploadUpdateOne) SetManifestID added in v1.2.2

func (_u *UploadUpdateOne) SetManifestID(id int) *UploadUpdateOne

SetManifestID sets the "manifest" edge to the StorageManifest entity by ID.

func (*UploadUpdateOne) SetNillableBlockManifestVersion added in v1.2.2

func (_u *UploadUpdateOne) SetNillableBlockManifestVersion(v *int64) *UploadUpdateOne

SetNillableBlockManifestVersion sets the "blockManifestVersion" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableCommittedPartCount

func (_u *UploadUpdateOne) SetNillableCommittedPartCount(v *int) *UploadUpdateOne

SetNillableCommittedPartCount sets the "committedPartCount" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableCreatedAt

func (_u *UploadUpdateOne) SetNillableCreatedAt(v *int64) *UploadUpdateOne

SetNillableCreatedAt sets the "createdAt" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableFinishedPartUploadCount

func (_u *UploadUpdateOne) SetNillableFinishedPartUploadCount(v *int) *UploadUpdateOne

SetNillableFinishedPartUploadCount sets the "finishedPartUploadCount" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableFolderName

func (_u *UploadUpdateOne) SetNillableFolderName(v *string) *UploadUpdateOne

SetNillableFolderName sets the "folderName" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableKey

func (_u *UploadUpdateOne) SetNillableKey(v *string) *UploadUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableLastPartUploadedAt

func (_u *UploadUpdateOne) SetNillableLastPartUploadedAt(v *int64) *UploadUpdateOne

SetNillableLastPartUploadedAt sets the "lastPartUploadedAt" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableManifestID added in v1.2.2

func (_u *UploadUpdateOne) SetNillableManifestID(id *int) *UploadUpdateOne

SetNillableManifestID sets the "manifest" edge to the StorageManifest entity by ID if the given value is not nil.

func (*UploadUpdateOne) SetNillableRepoId

func (_u *UploadUpdateOne) SetNillableRepoId(v *string) *UploadUpdateOne

SetNillableRepoId sets the "repoId" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableScope

func (_u *UploadUpdateOne) SetNillableScope(v *string) *UploadUpdateOne

SetNillableScope sets the "scope" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableStartedPartUploadCount

func (_u *UploadUpdateOne) SetNillableStartedPartUploadCount(v *int) *UploadUpdateOne

SetNillableStartedPartUploadCount sets the "startedPartUploadCount" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableTupleHash

func (_u *UploadUpdateOne) SetNillableTupleHash(v *string) *UploadUpdateOne

SetNillableTupleHash sets the "tupleHash" field if the given value is not nil.

func (*UploadUpdateOne) SetNillableVersion

func (_u *UploadUpdateOne) SetNillableVersion(v *string) *UploadUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*UploadUpdateOne) SetRepoId

func (_u *UploadUpdateOne) SetRepoId(v string) *UploadUpdateOne

SetRepoId sets the "repoId" field.

func (*UploadUpdateOne) SetScope

func (_u *UploadUpdateOne) SetScope(v string) *UploadUpdateOne

SetScope sets the "scope" field.

func (*UploadUpdateOne) SetStartedPartUploadCount

func (_u *UploadUpdateOne) SetStartedPartUploadCount(v int) *UploadUpdateOne

SetStartedPartUploadCount sets the "startedPartUploadCount" field.

func (*UploadUpdateOne) SetTupleHash

func (_u *UploadUpdateOne) SetTupleHash(v string) *UploadUpdateOne

SetTupleHash sets the "tupleHash" field.

func (*UploadUpdateOne) SetVersion

func (_u *UploadUpdateOne) SetVersion(v string) *UploadUpdateOne

SetVersion sets the "version" field.

func (*UploadUpdateOne) Where

func (_u *UploadUpdateOne) Where(ps ...predicate.Upload) *UploadUpdateOne

Where appends a list predicates to the UploadUpdate builder.

type Uploads

type Uploads []*Upload

Uploads is a parsable slice of Upload.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL