ent

package
v0.0.0-...-abfe2d9 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

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

	// Node types.
	TypeCompatibilityResult = "CompatibilityResult"
	TypeRegisteredContract  = "RegisteredContract"
	TypeRegisteredProvider  = "RegisteredProvider"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// CompatibilityResult is the client for interacting with the CompatibilityResult builders.
	CompatibilityResult *CompatibilityResultClient
	// RegisteredContract is the client for interacting with the RegisteredContract builders.
	RegisteredContract *RegisteredContractClient
	// RegisteredProvider is the client for interacting with the RegisteredProvider builders.
	RegisteredProvider *RegisteredProviderClient
	// 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().
	CompatibilityResult.
	Query().
	Count(ctx)

func (*Client) Intercept

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

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

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

Mutate implements the ent.Mutator interface.

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type CompatibilityResult

type CompatibilityResult struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// RequirementContractID holds the value of the "requirement_contract_id" field.
	RequirementContractID string `json:"requirement_contract_id,omitempty"`
	// ProviderContractID holds the value of the "provider_contract_id" field.
	ProviderContractID string `json:"provider_contract_id,omitempty"`
	// Result holds the value of the "result" field.
	Result bool `json:"result,omitempty"`
	// Mapping holds the value of the "mapping" field.
	Mapping schema.ParticipantNameMapping `json:"mapping,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CompatibilityResultQuery when eager-loading is set.
	Edges CompatibilityResultEdges `json:"edges"`
	// contains filtered or unexported fields
}

CompatibilityResult is the model entity for the CompatibilityResult schema.

func (*CompatibilityResult) QueryProviderContract

func (cr *CompatibilityResult) QueryProviderContract() *RegisteredContractQuery

QueryProviderContract queries the "provider_contract" edge of the CompatibilityResult entity.

func (*CompatibilityResult) QueryRequirementContract

func (cr *CompatibilityResult) QueryRequirementContract() *RegisteredContractQuery

QueryRequirementContract queries the "requirement_contract" edge of the CompatibilityResult entity.

func (*CompatibilityResult) String

func (cr *CompatibilityResult) String() string

String implements the fmt.Stringer.

func (*CompatibilityResult) Unwrap

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

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

func (*CompatibilityResult) Value

func (cr *CompatibilityResult) Value(name string) (ent.Value, error)

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

type CompatibilityResultClient

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

CompatibilityResultClient is a client for the CompatibilityResult schema.

func NewCompatibilityResultClient

func NewCompatibilityResultClient(c config) *CompatibilityResultClient

NewCompatibilityResultClient returns a client for the CompatibilityResult from the given config.

func (*CompatibilityResultClient) Create

Create returns a builder for creating a CompatibilityResult entity.

func (*CompatibilityResultClient) CreateBulk

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

func (*CompatibilityResultClient) Delete

Delete returns a delete builder for CompatibilityResult.

func (*CompatibilityResultClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CompatibilityResultClient) DeleteOneID

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

func (*CompatibilityResultClient) Get

Get returns a CompatibilityResult entity by its id.

func (*CompatibilityResultClient) GetX

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

func (*CompatibilityResultClient) Hooks

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

Hooks returns the client hooks.

func (*CompatibilityResultClient) Intercept

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

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

func (*CompatibilityResultClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CompatibilityResultClient) MapCreateBulk

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

Query returns a query builder for CompatibilityResult.

func (*CompatibilityResultClient) QueryProviderContract

QueryProviderContract queries the provider_contract edge of a CompatibilityResult.

func (*CompatibilityResultClient) QueryRequirementContract

func (c *CompatibilityResultClient) QueryRequirementContract(cr *CompatibilityResult) *RegisteredContractQuery

QueryRequirementContract queries the requirement_contract edge of a CompatibilityResult.

func (*CompatibilityResultClient) Update

Update returns an update builder for CompatibilityResult.

func (*CompatibilityResultClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CompatibilityResultClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*CompatibilityResultClient) Use

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

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

type CompatibilityResultCreate

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

CompatibilityResultCreate is the builder for creating a CompatibilityResult entity.

func (*CompatibilityResultCreate) Exec

Exec executes the query.

func (*CompatibilityResultCreate) ExecX

func (crc *CompatibilityResultCreate) ExecX(ctx context.Context)

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

func (*CompatibilityResultCreate) Mutation

Mutation returns the CompatibilityResultMutation object of the builder.

func (*CompatibilityResultCreate) Save

Save creates the CompatibilityResult in the database.

func (*CompatibilityResultCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CompatibilityResultCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*CompatibilityResultCreate) SetMapping

SetMapping sets the "mapping" field.

func (*CompatibilityResultCreate) SetNillableCreatedAt

func (crc *CompatibilityResultCreate) SetNillableCreatedAt(t *time.Time) *CompatibilityResultCreate

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

func (*CompatibilityResultCreate) SetNillableUpdatedAt

func (crc *CompatibilityResultCreate) SetNillableUpdatedAt(t *time.Time) *CompatibilityResultCreate

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

func (*CompatibilityResultCreate) SetProviderContract

SetProviderContract sets the "provider_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultCreate) SetProviderContractID

func (crc *CompatibilityResultCreate) SetProviderContractID(s string) *CompatibilityResultCreate

SetProviderContractID sets the "provider_contract_id" field.

func (*CompatibilityResultCreate) SetRequirementContract

SetRequirementContract sets the "requirement_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultCreate) SetRequirementContractID

func (crc *CompatibilityResultCreate) SetRequirementContractID(s string) *CompatibilityResultCreate

SetRequirementContractID sets the "requirement_contract_id" field.

func (*CompatibilityResultCreate) SetResult

SetResult sets the "result" field.

func (*CompatibilityResultCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type CompatibilityResultCreateBulk

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

CompatibilityResultCreateBulk is the builder for creating many CompatibilityResult entities in bulk.

func (*CompatibilityResultCreateBulk) Exec

Exec executes the query.

func (*CompatibilityResultCreateBulk) ExecX

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

func (*CompatibilityResultCreateBulk) Save

Save creates the CompatibilityResult entities in the database.

func (*CompatibilityResultCreateBulk) SaveX

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

type CompatibilityResultDelete

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

CompatibilityResultDelete is the builder for deleting a CompatibilityResult entity.

func (*CompatibilityResultDelete) Exec

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

func (*CompatibilityResultDelete) ExecX

func (crd *CompatibilityResultDelete) ExecX(ctx context.Context) int

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

func (*CompatibilityResultDelete) Where

Where appends a list predicates to the CompatibilityResultDelete builder.

type CompatibilityResultDeleteOne

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

CompatibilityResultDeleteOne is the builder for deleting a single CompatibilityResult entity.

func (*CompatibilityResultDeleteOne) Exec

Exec executes the deletion query.

func (*CompatibilityResultDeleteOne) ExecX

func (crdo *CompatibilityResultDeleteOne) ExecX(ctx context.Context)

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

func (*CompatibilityResultDeleteOne) Where

Where appends a list predicates to the CompatibilityResultDelete builder.

type CompatibilityResultEdges

type CompatibilityResultEdges struct {
	// RequirementContract holds the value of the requirement_contract edge.
	RequirementContract *RegisteredContract `json:"requirement_contract,omitempty"`
	// ProviderContract holds the value of the provider_contract edge.
	ProviderContract *RegisteredContract `json:"provider_contract,omitempty"`
	// contains filtered or unexported fields
}

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

func (CompatibilityResultEdges) ProviderContractOrErr

func (e CompatibilityResultEdges) ProviderContractOrErr() (*RegisteredContract, error)

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

func (CompatibilityResultEdges) RequirementContractOrErr

func (e CompatibilityResultEdges) RequirementContractOrErr() (*RegisteredContract, error)

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

type CompatibilityResultGroupBy

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

CompatibilityResultGroupBy is the group-by builder for CompatibilityResult entities.

func (*CompatibilityResultGroupBy) Aggregate

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

func (*CompatibilityResultGroupBy) Bool

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

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

func (*CompatibilityResultGroupBy) BoolX

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

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

func (*CompatibilityResultGroupBy) Bools

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

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

func (*CompatibilityResultGroupBy) BoolsX

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

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

func (*CompatibilityResultGroupBy) Float64

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

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

func (*CompatibilityResultGroupBy) Float64X

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

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

func (*CompatibilityResultGroupBy) Float64s

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

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

func (*CompatibilityResultGroupBy) Float64sX

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

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

func (*CompatibilityResultGroupBy) Int

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

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

func (*CompatibilityResultGroupBy) IntX

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

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

func (*CompatibilityResultGroupBy) Ints

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

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

func (*CompatibilityResultGroupBy) IntsX

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

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

func (*CompatibilityResultGroupBy) Scan

func (crgb *CompatibilityResultGroupBy) Scan(ctx context.Context, v any) error

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

func (*CompatibilityResultGroupBy) ScanX

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

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

func (*CompatibilityResultGroupBy) String

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

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

func (*CompatibilityResultGroupBy) StringX

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

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

func (*CompatibilityResultGroupBy) Strings

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

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

func (*CompatibilityResultGroupBy) StringsX

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

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

type CompatibilityResultMutation

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

CompatibilityResultMutation represents an operation that mutates the CompatibilityResult nodes in the graph.

func (*CompatibilityResultMutation) AddField

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

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

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

func (*CompatibilityResultMutation) AddedField

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

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

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

func (*CompatibilityResultMutation) AddedIDs

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

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

func (*CompatibilityResultMutation) ClearEdge

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

func (m *CompatibilityResultMutation) 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 (*CompatibilityResultMutation) ClearMapping

func (m *CompatibilityResultMutation) ClearMapping()

ClearMapping clears the value of the "mapping" field.

func (*CompatibilityResultMutation) ClearProviderContract

func (m *CompatibilityResultMutation) ClearProviderContract()

ClearProviderContract clears the "provider_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultMutation) ClearRequirementContract

func (m *CompatibilityResultMutation) ClearRequirementContract()

ClearRequirementContract clears the "requirement_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultMutation) ClearedEdges

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

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

func (*CompatibilityResultMutation) ClearedFields

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

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

func (CompatibilityResultMutation) Client

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

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

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

func (*CompatibilityResultMutation) EdgeCleared

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

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

func (*CompatibilityResultMutation) Field

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

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

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

func (*CompatibilityResultMutation) Fields

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

func (m *CompatibilityResultMutation) 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 (*CompatibilityResultMutation) 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 (*CompatibilityResultMutation) Mapping

Mapping returns the value of the "mapping" field in the mutation.

func (*CompatibilityResultMutation) MappingCleared

func (m *CompatibilityResultMutation) MappingCleared() bool

MappingCleared returns if the "mapping" field was cleared in this mutation.

func (*CompatibilityResultMutation) OldCreatedAt

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

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

func (m *CompatibilityResultMutation) 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 (*CompatibilityResultMutation) OldMapping

OldMapping returns the old "mapping" field's value of the CompatibilityResult entity. If the CompatibilityResult 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 (*CompatibilityResultMutation) OldProviderContractID

func (m *CompatibilityResultMutation) OldProviderContractID(ctx context.Context) (v string, err error)

OldProviderContractID returns the old "provider_contract_id" field's value of the CompatibilityResult entity. If the CompatibilityResult 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 (*CompatibilityResultMutation) OldRequirementContractID

func (m *CompatibilityResultMutation) OldRequirementContractID(ctx context.Context) (v string, err error)

OldRequirementContractID returns the old "requirement_contract_id" field's value of the CompatibilityResult entity. If the CompatibilityResult 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 (*CompatibilityResultMutation) OldResult

func (m *CompatibilityResultMutation) OldResult(ctx context.Context) (v bool, err error)

OldResult returns the old "result" field's value of the CompatibilityResult entity. If the CompatibilityResult 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 (*CompatibilityResultMutation) OldUpdatedAt

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

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

Op returns the operation name.

func (*CompatibilityResultMutation) ProviderContractCleared

func (m *CompatibilityResultMutation) ProviderContractCleared() bool

ProviderContractCleared reports if the "provider_contract" edge to the RegisteredContract entity was cleared.

func (*CompatibilityResultMutation) ProviderContractID

func (m *CompatibilityResultMutation) ProviderContractID() (r string, exists bool)

ProviderContractID returns the value of the "provider_contract_id" field in the mutation.

func (*CompatibilityResultMutation) ProviderContractIDs

func (m *CompatibilityResultMutation) ProviderContractIDs() (ids []string)

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

func (*CompatibilityResultMutation) RemovedEdges

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

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

func (*CompatibilityResultMutation) RemovedIDs

func (m *CompatibilityResultMutation) 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 (*CompatibilityResultMutation) RequirementContractCleared

func (m *CompatibilityResultMutation) RequirementContractCleared() bool

RequirementContractCleared reports if the "requirement_contract" edge to the RegisteredContract entity was cleared.

func (*CompatibilityResultMutation) RequirementContractID

func (m *CompatibilityResultMutation) RequirementContractID() (r string, exists bool)

RequirementContractID returns the value of the "requirement_contract_id" field in the mutation.

func (*CompatibilityResultMutation) RequirementContractIDs

func (m *CompatibilityResultMutation) RequirementContractIDs() (ids []string)

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

func (*CompatibilityResultMutation) ResetCreatedAt

func (m *CompatibilityResultMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CompatibilityResultMutation) ResetEdge

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

func (m *CompatibilityResultMutation) 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 (*CompatibilityResultMutation) ResetMapping

func (m *CompatibilityResultMutation) ResetMapping()

ResetMapping resets all changes to the "mapping" field.

func (*CompatibilityResultMutation) ResetProviderContract

func (m *CompatibilityResultMutation) ResetProviderContract()

ResetProviderContract resets all changes to the "provider_contract" edge.

func (*CompatibilityResultMutation) ResetProviderContractID

func (m *CompatibilityResultMutation) ResetProviderContractID()

ResetProviderContractID resets all changes to the "provider_contract_id" field.

func (*CompatibilityResultMutation) ResetRequirementContract

func (m *CompatibilityResultMutation) ResetRequirementContract()

ResetRequirementContract resets all changes to the "requirement_contract" edge.

func (*CompatibilityResultMutation) ResetRequirementContractID

func (m *CompatibilityResultMutation) ResetRequirementContractID()

ResetRequirementContractID resets all changes to the "requirement_contract_id" field.

func (*CompatibilityResultMutation) ResetResult

func (m *CompatibilityResultMutation) ResetResult()

ResetResult resets all changes to the "result" field.

func (*CompatibilityResultMutation) ResetUpdatedAt

func (m *CompatibilityResultMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CompatibilityResultMutation) Result

func (m *CompatibilityResultMutation) Result() (r bool, exists bool)

Result returns the value of the "result" field in the mutation.

func (*CompatibilityResultMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*CompatibilityResultMutation) SetField

func (m *CompatibilityResultMutation) 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 (*CompatibilityResultMutation) SetMapping

SetMapping sets the "mapping" field.

func (*CompatibilityResultMutation) SetOp

func (m *CompatibilityResultMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CompatibilityResultMutation) SetProviderContractID

func (m *CompatibilityResultMutation) SetProviderContractID(s string)

SetProviderContractID sets the "provider_contract_id" field.

func (*CompatibilityResultMutation) SetRequirementContractID

func (m *CompatibilityResultMutation) SetRequirementContractID(s string)

SetRequirementContractID sets the "requirement_contract_id" field.

func (*CompatibilityResultMutation) SetResult

func (m *CompatibilityResultMutation) SetResult(b bool)

SetResult sets the "result" field.

func (*CompatibilityResultMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (CompatibilityResultMutation) Tx

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

func (*CompatibilityResultMutation) Type

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

func (*CompatibilityResultMutation) UpdatedAt

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

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

func (*CompatibilityResultMutation) Where

Where appends a list predicates to the CompatibilityResultMutation builder.

func (*CompatibilityResultMutation) WhereP

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

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

type CompatibilityResultQuery

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

CompatibilityResultQuery is the builder for querying CompatibilityResult entities.

func (*CompatibilityResultQuery) Aggregate

Aggregate returns a CompatibilityResultSelect configured with the given aggregations.

func (*CompatibilityResultQuery) All

All executes the query and returns a list of CompatibilityResults.

func (*CompatibilityResultQuery) AllX

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

func (*CompatibilityResultQuery) Clone

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

func (*CompatibilityResultQuery) Count

func (crq *CompatibilityResultQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CompatibilityResultQuery) CountX

func (crq *CompatibilityResultQuery) CountX(ctx context.Context) int

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

func (*CompatibilityResultQuery) Exist

func (crq *CompatibilityResultQuery) Exist(ctx context.Context) (bool, error)

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

func (*CompatibilityResultQuery) ExistX

func (crq *CompatibilityResultQuery) ExistX(ctx context.Context) bool

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

func (*CompatibilityResultQuery) First

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

func (*CompatibilityResultQuery) FirstID

func (crq *CompatibilityResultQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CompatibilityResultQuery) FirstIDX

func (crq *CompatibilityResultQuery) FirstIDX(ctx context.Context) int

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

func (*CompatibilityResultQuery) FirstX

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

func (*CompatibilityResultQuery) GroupBy

func (crq *CompatibilityResultQuery) GroupBy(field string, fields ...string) *CompatibilityResultGroupBy

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

client.CompatibilityResult.Query().
	GroupBy(compatibilityresult.FieldRequirementContractID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CompatibilityResultQuery) IDs

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

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

func (*CompatibilityResultQuery) IDsX

func (crq *CompatibilityResultQuery) IDsX(ctx context.Context) []int

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

func (*CompatibilityResultQuery) Limit

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

func (*CompatibilityResultQuery) Offset

Offset to start from.

func (*CompatibilityResultQuery) Only

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

func (*CompatibilityResultQuery) OnlyID

func (crq *CompatibilityResultQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CompatibilityResultQuery) OnlyIDX

func (crq *CompatibilityResultQuery) OnlyIDX(ctx context.Context) int

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

func (*CompatibilityResultQuery) OnlyX

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

func (*CompatibilityResultQuery) Order

Order specifies how the records should be ordered.

func (*CompatibilityResultQuery) QueryProviderContract

func (crq *CompatibilityResultQuery) QueryProviderContract() *RegisteredContractQuery

QueryProviderContract chains the current query on the "provider_contract" edge.

func (*CompatibilityResultQuery) QueryRequirementContract

func (crq *CompatibilityResultQuery) QueryRequirementContract() *RegisteredContractQuery

QueryRequirementContract chains the current query on the "requirement_contract" edge.

func (*CompatibilityResultQuery) 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 {
	RequirementContractID string `json:"requirement_contract_id,omitempty"`
}

client.CompatibilityResult.Query().
	Select(compatibilityresult.FieldRequirementContractID).
	Scan(ctx, &v)

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

Where adds a new predicate for the CompatibilityResultQuery builder.

func (*CompatibilityResultQuery) WithProviderContract

func (crq *CompatibilityResultQuery) WithProviderContract(opts ...func(*RegisteredContractQuery)) *CompatibilityResultQuery

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

func (*CompatibilityResultQuery) WithRequirementContract

func (crq *CompatibilityResultQuery) WithRequirementContract(opts ...func(*RegisteredContractQuery)) *CompatibilityResultQuery

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

type CompatibilityResultSelect

type CompatibilityResultSelect struct {
	*CompatibilityResultQuery
	// contains filtered or unexported fields
}

CompatibilityResultSelect is the builder for selecting fields of CompatibilityResult entities.

func (*CompatibilityResultSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*CompatibilityResultSelect) Bool

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

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

func (*CompatibilityResultSelect) BoolX

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

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

func (*CompatibilityResultSelect) Bools

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

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

func (*CompatibilityResultSelect) BoolsX

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

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

func (*CompatibilityResultSelect) Float64

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

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

func (*CompatibilityResultSelect) Float64X

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

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

func (*CompatibilityResultSelect) Float64s

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

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

func (*CompatibilityResultSelect) Float64sX

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

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

func (*CompatibilityResultSelect) Int

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

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

func (*CompatibilityResultSelect) IntX

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

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

func (*CompatibilityResultSelect) Ints

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

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

func (*CompatibilityResultSelect) IntsX

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

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

func (*CompatibilityResultSelect) Scan

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

func (*CompatibilityResultSelect) ScanX

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

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

func (*CompatibilityResultSelect) String

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

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

func (*CompatibilityResultSelect) StringX

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

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

func (*CompatibilityResultSelect) Strings

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

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

func (*CompatibilityResultSelect) StringsX

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

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

type CompatibilityResultUpdate

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

CompatibilityResultUpdate is the builder for updating CompatibilityResult entities.

func (*CompatibilityResultUpdate) ClearMapping

ClearMapping clears the value of the "mapping" field.

func (*CompatibilityResultUpdate) ClearProviderContract

func (cru *CompatibilityResultUpdate) ClearProviderContract() *CompatibilityResultUpdate

ClearProviderContract clears the "provider_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdate) ClearRequirementContract

func (cru *CompatibilityResultUpdate) ClearRequirementContract() *CompatibilityResultUpdate

ClearRequirementContract clears the "requirement_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdate) Exec

Exec executes the query.

func (*CompatibilityResultUpdate) ExecX

func (cru *CompatibilityResultUpdate) ExecX(ctx context.Context)

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

func (*CompatibilityResultUpdate) Mutation

Mutation returns the CompatibilityResultMutation object of the builder.

func (*CompatibilityResultUpdate) Save

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

func (*CompatibilityResultUpdate) SaveX

func (cru *CompatibilityResultUpdate) SaveX(ctx context.Context) int

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

func (*CompatibilityResultUpdate) SetMapping

SetMapping sets the "mapping" field.

func (*CompatibilityResultUpdate) SetProviderContract

SetProviderContract sets the "provider_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdate) SetProviderContractID

func (cru *CompatibilityResultUpdate) SetProviderContractID(s string) *CompatibilityResultUpdate

SetProviderContractID sets the "provider_contract_id" field.

func (*CompatibilityResultUpdate) SetRequirementContract

SetRequirementContract sets the "requirement_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdate) SetRequirementContractID

func (cru *CompatibilityResultUpdate) SetRequirementContractID(s string) *CompatibilityResultUpdate

SetRequirementContractID sets the "requirement_contract_id" field.

func (*CompatibilityResultUpdate) SetResult

SetResult sets the "result" field.

func (*CompatibilityResultUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*CompatibilityResultUpdate) Where

Where appends a list predicates to the CompatibilityResultUpdate builder.

type CompatibilityResultUpdateOne

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

CompatibilityResultUpdateOne is the builder for updating a single CompatibilityResult entity.

func (*CompatibilityResultUpdateOne) ClearMapping

ClearMapping clears the value of the "mapping" field.

func (*CompatibilityResultUpdateOne) ClearProviderContract

func (cruo *CompatibilityResultUpdateOne) ClearProviderContract() *CompatibilityResultUpdateOne

ClearProviderContract clears the "provider_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdateOne) ClearRequirementContract

func (cruo *CompatibilityResultUpdateOne) ClearRequirementContract() *CompatibilityResultUpdateOne

ClearRequirementContract clears the "requirement_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdateOne) Exec

Exec executes the query on the entity.

func (*CompatibilityResultUpdateOne) ExecX

func (cruo *CompatibilityResultUpdateOne) ExecX(ctx context.Context)

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

func (*CompatibilityResultUpdateOne) Mutation

Mutation returns the CompatibilityResultMutation object of the builder.

func (*CompatibilityResultUpdateOne) Save

Save executes the query and returns the updated CompatibilityResult entity.

func (*CompatibilityResultUpdateOne) SaveX

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

func (*CompatibilityResultUpdateOne) 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 (*CompatibilityResultUpdateOne) SetMapping

SetMapping sets the "mapping" field.

func (*CompatibilityResultUpdateOne) SetProviderContract

SetProviderContract sets the "provider_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdateOne) SetProviderContractID

func (cruo *CompatibilityResultUpdateOne) SetProviderContractID(s string) *CompatibilityResultUpdateOne

SetProviderContractID sets the "provider_contract_id" field.

func (*CompatibilityResultUpdateOne) SetRequirementContract

SetRequirementContract sets the "requirement_contract" edge to the RegisteredContract entity.

func (*CompatibilityResultUpdateOne) SetRequirementContractID

func (cruo *CompatibilityResultUpdateOne) SetRequirementContractID(s string) *CompatibilityResultUpdateOne

SetRequirementContractID sets the "requirement_contract_id" field.

func (*CompatibilityResultUpdateOne) SetResult

SetResult sets the "result" field.

func (*CompatibilityResultUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*CompatibilityResultUpdateOne) Where

Where appends a list predicates to the CompatibilityResultUpdate builder.

type CompatibilityResults

type CompatibilityResults []*CompatibilityResult

CompatibilityResults is a parsable slice of CompatibilityResult.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

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

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

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

type Policy

type Policy = ent.Policy

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

type Querier

type Querier = ent.Querier

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

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

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

type Query

type Query = ent.Query

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

type QueryContext

type QueryContext = ent.QueryContext

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

type RegisteredContract

type RegisteredContract struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Format holds the value of the "format" field.
	Format int `json:"format,omitempty"`
	// Contract holds the value of the "contract" field.
	Contract []byte `json:"contract,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RegisteredContractQuery when eager-loading is set.
	Edges RegisteredContractEdges `json:"edges"`
	// contains filtered or unexported fields
}

RegisteredContract is the model entity for the RegisteredContract schema.

func (*RegisteredContract) QueryCompatibilityResultsAsProvider

func (rc *RegisteredContract) QueryCompatibilityResultsAsProvider() *CompatibilityResultQuery

QueryCompatibilityResultsAsProvider queries the "compatibility_results_as_provider" edge of the RegisteredContract entity.

func (*RegisteredContract) QueryCompatibilityResultsAsRequirement

func (rc *RegisteredContract) QueryCompatibilityResultsAsRequirement() *CompatibilityResultQuery

QueryCompatibilityResultsAsRequirement queries the "compatibility_results_as_requirement" edge of the RegisteredContract entity.

func (*RegisteredContract) QueryProviders

func (rc *RegisteredContract) QueryProviders() *RegisteredProviderQuery

QueryProviders queries the "providers" edge of the RegisteredContract entity.

func (*RegisteredContract) String

func (rc *RegisteredContract) String() string

String implements the fmt.Stringer.

func (*RegisteredContract) Unwrap

func (rc *RegisteredContract) Unwrap() *RegisteredContract

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

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

func (*RegisteredContract) Value

func (rc *RegisteredContract) Value(name string) (ent.Value, error)

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

type RegisteredContractClient

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

RegisteredContractClient is a client for the RegisteredContract schema.

func NewRegisteredContractClient

func NewRegisteredContractClient(c config) *RegisteredContractClient

NewRegisteredContractClient returns a client for the RegisteredContract from the given config.

func (*RegisteredContractClient) Create

Create returns a builder for creating a RegisteredContract entity.

func (*RegisteredContractClient) CreateBulk

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

func (*RegisteredContractClient) Delete

Delete returns a delete builder for RegisteredContract.

func (*RegisteredContractClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RegisteredContractClient) DeleteOneID

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

func (*RegisteredContractClient) Get

Get returns a RegisteredContract entity by its id.

func (*RegisteredContractClient) GetX

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

func (*RegisteredContractClient) Hooks

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

Hooks returns the client hooks.

func (*RegisteredContractClient) Intercept

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

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

func (*RegisteredContractClient) Interceptors

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

Interceptors returns the client interceptors.

func (*RegisteredContractClient) MapCreateBulk

func (c *RegisteredContractClient) MapCreateBulk(slice any, setFunc func(*RegisteredContractCreate, int)) *RegisteredContractCreateBulk

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

Query returns a query builder for RegisteredContract.

func (*RegisteredContractClient) QueryCompatibilityResultsAsProvider

func (c *RegisteredContractClient) QueryCompatibilityResultsAsProvider(rc *RegisteredContract) *CompatibilityResultQuery

QueryCompatibilityResultsAsProvider queries the compatibility_results_as_provider edge of a RegisteredContract.

func (*RegisteredContractClient) QueryCompatibilityResultsAsRequirement

func (c *RegisteredContractClient) QueryCompatibilityResultsAsRequirement(rc *RegisteredContract) *CompatibilityResultQuery

QueryCompatibilityResultsAsRequirement queries the compatibility_results_as_requirement edge of a RegisteredContract.

func (*RegisteredContractClient) QueryProviders

QueryProviders queries the providers edge of a RegisteredContract.

func (*RegisteredContractClient) Update

Update returns an update builder for RegisteredContract.

func (*RegisteredContractClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RegisteredContractClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*RegisteredContractClient) Use

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

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

type RegisteredContractCreate

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

RegisteredContractCreate is the builder for creating a RegisteredContract entity.

func (*RegisteredContractCreate) AddCompatibilityResultsAsProvider

func (rcc *RegisteredContractCreate) AddCompatibilityResultsAsProvider(c ...*CompatibilityResult) *RegisteredContractCreate

AddCompatibilityResultsAsProvider adds the "compatibility_results_as_provider" edges to the CompatibilityResult entity.

func (*RegisteredContractCreate) AddCompatibilityResultsAsProviderIDs

func (rcc *RegisteredContractCreate) AddCompatibilityResultsAsProviderIDs(ids ...int) *RegisteredContractCreate

AddCompatibilityResultsAsProviderIDs adds the "compatibility_results_as_provider" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractCreate) AddCompatibilityResultsAsRequirement

func (rcc *RegisteredContractCreate) AddCompatibilityResultsAsRequirement(c ...*CompatibilityResult) *RegisteredContractCreate

AddCompatibilityResultsAsRequirement adds the "compatibility_results_as_requirement" edges to the CompatibilityResult entity.

func (*RegisteredContractCreate) AddCompatibilityResultsAsRequirementIDs

func (rcc *RegisteredContractCreate) AddCompatibilityResultsAsRequirementIDs(ids ...int) *RegisteredContractCreate

AddCompatibilityResultsAsRequirementIDs adds the "compatibility_results_as_requirement" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractCreate) AddProviderIDs

func (rcc *RegisteredContractCreate) AddProviderIDs(ids ...uuid.UUID) *RegisteredContractCreate

AddProviderIDs adds the "providers" edge to the RegisteredProvider entity by IDs.

func (*RegisteredContractCreate) AddProviders

AddProviders adds the "providers" edges to the RegisteredProvider entity.

func (*RegisteredContractCreate) Exec

Exec executes the query.

func (*RegisteredContractCreate) ExecX

func (rcc *RegisteredContractCreate) ExecX(ctx context.Context)

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

func (*RegisteredContractCreate) Mutation

Mutation returns the RegisteredContractMutation object of the builder.

func (*RegisteredContractCreate) Save

Save creates the RegisteredContract in the database.

func (*RegisteredContractCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RegisteredContractCreate) SetContract

SetContract sets the "contract" field.

func (*RegisteredContractCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*RegisteredContractCreate) SetFormat

SetFormat sets the "format" field.

func (*RegisteredContractCreate) SetID

SetID sets the "id" field.

func (*RegisteredContractCreate) SetNillableCreatedAt

func (rcc *RegisteredContractCreate) SetNillableCreatedAt(t *time.Time) *RegisteredContractCreate

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

type RegisteredContractCreateBulk

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

RegisteredContractCreateBulk is the builder for creating many RegisteredContract entities in bulk.

func (*RegisteredContractCreateBulk) Exec

Exec executes the query.

func (*RegisteredContractCreateBulk) ExecX

func (rccb *RegisteredContractCreateBulk) ExecX(ctx context.Context)

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

func (*RegisteredContractCreateBulk) Save

Save creates the RegisteredContract entities in the database.

func (*RegisteredContractCreateBulk) SaveX

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

type RegisteredContractDelete

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

RegisteredContractDelete is the builder for deleting a RegisteredContract entity.

func (*RegisteredContractDelete) Exec

func (rcd *RegisteredContractDelete) Exec(ctx context.Context) (int, error)

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

func (*RegisteredContractDelete) ExecX

func (rcd *RegisteredContractDelete) ExecX(ctx context.Context) int

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

func (*RegisteredContractDelete) Where

Where appends a list predicates to the RegisteredContractDelete builder.

type RegisteredContractDeleteOne

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

RegisteredContractDeleteOne is the builder for deleting a single RegisteredContract entity.

func (*RegisteredContractDeleteOne) Exec

Exec executes the deletion query.

func (*RegisteredContractDeleteOne) ExecX

func (rcdo *RegisteredContractDeleteOne) ExecX(ctx context.Context)

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

func (*RegisteredContractDeleteOne) Where

Where appends a list predicates to the RegisteredContractDelete builder.

type RegisteredContractEdges

type RegisteredContractEdges struct {
	// Providers holds the value of the providers edge.
	Providers []*RegisteredProvider `json:"providers,omitempty"`
	// CompatibilityResultsAsRequirement holds the value of the compatibility_results_as_requirement edge.
	CompatibilityResultsAsRequirement []*CompatibilityResult `json:"compatibility_results_as_requirement,omitempty"`
	// CompatibilityResultsAsProvider holds the value of the compatibility_results_as_provider edge.
	CompatibilityResultsAsProvider []*CompatibilityResult `json:"compatibility_results_as_provider,omitempty"`
	// contains filtered or unexported fields
}

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

func (RegisteredContractEdges) CompatibilityResultsAsProviderOrErr

func (e RegisteredContractEdges) CompatibilityResultsAsProviderOrErr() ([]*CompatibilityResult, error)

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

func (RegisteredContractEdges) CompatibilityResultsAsRequirementOrErr

func (e RegisteredContractEdges) CompatibilityResultsAsRequirementOrErr() ([]*CompatibilityResult, error)

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

func (RegisteredContractEdges) ProvidersOrErr

func (e RegisteredContractEdges) ProvidersOrErr() ([]*RegisteredProvider, error)

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

type RegisteredContractGroupBy

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

RegisteredContractGroupBy is the group-by builder for RegisteredContract entities.

func (*RegisteredContractGroupBy) Aggregate

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

func (*RegisteredContractGroupBy) Bool

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

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

func (*RegisteredContractGroupBy) BoolX

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

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

func (*RegisteredContractGroupBy) Bools

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

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

func (*RegisteredContractGroupBy) BoolsX

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

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

func (*RegisteredContractGroupBy) Float64

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

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

func (*RegisteredContractGroupBy) Float64X

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

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

func (*RegisteredContractGroupBy) Float64s

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

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

func (*RegisteredContractGroupBy) Float64sX

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

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

func (*RegisteredContractGroupBy) Int

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

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

func (*RegisteredContractGroupBy) IntX

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

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

func (*RegisteredContractGroupBy) Ints

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

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

func (*RegisteredContractGroupBy) IntsX

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

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

func (*RegisteredContractGroupBy) Scan

func (rcgb *RegisteredContractGroupBy) Scan(ctx context.Context, v any) error

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

func (*RegisteredContractGroupBy) ScanX

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

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

func (*RegisteredContractGroupBy) String

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

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

func (*RegisteredContractGroupBy) StringX

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

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

func (*RegisteredContractGroupBy) Strings

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

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

func (*RegisteredContractGroupBy) StringsX

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

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

type RegisteredContractMutation

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

RegisteredContractMutation represents an operation that mutates the RegisteredContract nodes in the graph.

func (*RegisteredContractMutation) AddCompatibilityResultsAsProviderIDs

func (m *RegisteredContractMutation) AddCompatibilityResultsAsProviderIDs(ids ...int)

AddCompatibilityResultsAsProviderIDs adds the "compatibility_results_as_provider" edge to the CompatibilityResult entity by ids.

func (*RegisteredContractMutation) AddCompatibilityResultsAsRequirementIDs

func (m *RegisteredContractMutation) AddCompatibilityResultsAsRequirementIDs(ids ...int)

AddCompatibilityResultsAsRequirementIDs adds the "compatibility_results_as_requirement" edge to the CompatibilityResult entity by ids.

func (*RegisteredContractMutation) AddField

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) AddFormat

func (m *RegisteredContractMutation) AddFormat(i int)

AddFormat adds i to the "format" field.

func (*RegisteredContractMutation) AddProviderIDs

func (m *RegisteredContractMutation) AddProviderIDs(ids ...uuid.UUID)

AddProviderIDs adds the "providers" edge to the RegisteredProvider entity by ids.

func (*RegisteredContractMutation) AddedEdges

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

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

func (*RegisteredContractMutation) AddedField

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

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

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

func (*RegisteredContractMutation) AddedFormat

func (m *RegisteredContractMutation) AddedFormat() (r int, exists bool)

AddedFormat returns the value that was added to the "format" field in this mutation.

func (*RegisteredContractMutation) AddedIDs

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

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

func (*RegisteredContractMutation) ClearCompatibilityResultsAsProvider

func (m *RegisteredContractMutation) ClearCompatibilityResultsAsProvider()

ClearCompatibilityResultsAsProvider clears the "compatibility_results_as_provider" edge to the CompatibilityResult entity.

func (*RegisteredContractMutation) ClearCompatibilityResultsAsRequirement

func (m *RegisteredContractMutation) ClearCompatibilityResultsAsRequirement()

ClearCompatibilityResultsAsRequirement clears the "compatibility_results_as_requirement" edge to the CompatibilityResult entity.

func (*RegisteredContractMutation) ClearEdge

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

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) ClearProviders

func (m *RegisteredContractMutation) ClearProviders()

ClearProviders clears the "providers" edge to the RegisteredProvider entity.

func (*RegisteredContractMutation) ClearedEdges

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

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

func (*RegisteredContractMutation) ClearedFields

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

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

func (RegisteredContractMutation) Client

func (m RegisteredContractMutation) 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 (*RegisteredContractMutation) CompatibilityResultsAsProviderCleared

func (m *RegisteredContractMutation) CompatibilityResultsAsProviderCleared() bool

CompatibilityResultsAsProviderCleared reports if the "compatibility_results_as_provider" edge to the CompatibilityResult entity was cleared.

func (*RegisteredContractMutation) CompatibilityResultsAsProviderIDs

func (m *RegisteredContractMutation) CompatibilityResultsAsProviderIDs() (ids []int)

CompatibilityResultsAsProviderIDs returns the "compatibility_results_as_provider" edge IDs in the mutation.

func (*RegisteredContractMutation) CompatibilityResultsAsRequirementCleared

func (m *RegisteredContractMutation) CompatibilityResultsAsRequirementCleared() bool

CompatibilityResultsAsRequirementCleared reports if the "compatibility_results_as_requirement" edge to the CompatibilityResult entity was cleared.

func (*RegisteredContractMutation) CompatibilityResultsAsRequirementIDs

func (m *RegisteredContractMutation) CompatibilityResultsAsRequirementIDs() (ids []int)

CompatibilityResultsAsRequirementIDs returns the "compatibility_results_as_requirement" edge IDs in the mutation.

func (*RegisteredContractMutation) Contract

func (m *RegisteredContractMutation) Contract() (r []byte, exists bool)

Contract returns the value of the "contract" field in the mutation.

func (*RegisteredContractMutation) CreatedAt

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

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

func (*RegisteredContractMutation) EdgeCleared

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

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

func (*RegisteredContractMutation) Field

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

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

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

func (*RegisteredContractMutation) Fields

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) Format

func (m *RegisteredContractMutation) Format() (r int, exists bool)

Format returns the value of the "format" field in the mutation.

func (*RegisteredContractMutation) ID

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) 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 (*RegisteredContractMutation) OldContract

func (m *RegisteredContractMutation) OldContract(ctx context.Context) (v []byte, err error)

OldContract returns the old "contract" field's value of the RegisteredContract entity. If the RegisteredContract 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 (*RegisteredContractMutation) OldCreatedAt

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

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

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) OldFormat

func (m *RegisteredContractMutation) OldFormat(ctx context.Context) (v int, err error)

OldFormat returns the old "format" field's value of the RegisteredContract entity. If the RegisteredContract 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 (*RegisteredContractMutation) Op

Op returns the operation name.

func (*RegisteredContractMutation) ProvidersCleared

func (m *RegisteredContractMutation) ProvidersCleared() bool

ProvidersCleared reports if the "providers" edge to the RegisteredProvider entity was cleared.

func (*RegisteredContractMutation) ProvidersIDs

func (m *RegisteredContractMutation) ProvidersIDs() (ids []uuid.UUID)

ProvidersIDs returns the "providers" edge IDs in the mutation.

func (*RegisteredContractMutation) RemoveCompatibilityResultsAsProviderIDs

func (m *RegisteredContractMutation) RemoveCompatibilityResultsAsProviderIDs(ids ...int)

RemoveCompatibilityResultsAsProviderIDs removes the "compatibility_results_as_provider" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractMutation) RemoveCompatibilityResultsAsRequirementIDs

func (m *RegisteredContractMutation) RemoveCompatibilityResultsAsRequirementIDs(ids ...int)

RemoveCompatibilityResultsAsRequirementIDs removes the "compatibility_results_as_requirement" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractMutation) RemoveProviderIDs

func (m *RegisteredContractMutation) RemoveProviderIDs(ids ...uuid.UUID)

RemoveProviderIDs removes the "providers" edge to the RegisteredProvider entity by IDs.

func (*RegisteredContractMutation) RemovedCompatibilityResultsAsProviderIDs

func (m *RegisteredContractMutation) RemovedCompatibilityResultsAsProviderIDs() (ids []int)

RemovedCompatibilityResultsAsProvider returns the removed IDs of the "compatibility_results_as_provider" edge to the CompatibilityResult entity.

func (*RegisteredContractMutation) RemovedCompatibilityResultsAsRequirementIDs

func (m *RegisteredContractMutation) RemovedCompatibilityResultsAsRequirementIDs() (ids []int)

RemovedCompatibilityResultsAsRequirement returns the removed IDs of the "compatibility_results_as_requirement" edge to the CompatibilityResult entity.

func (*RegisteredContractMutation) RemovedEdges

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

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

func (*RegisteredContractMutation) RemovedIDs

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) RemovedProvidersIDs

func (m *RegisteredContractMutation) RemovedProvidersIDs() (ids []uuid.UUID)

RemovedProviders returns the removed IDs of the "providers" edge to the RegisteredProvider entity.

func (*RegisteredContractMutation) ResetCompatibilityResultsAsProvider

func (m *RegisteredContractMutation) ResetCompatibilityResultsAsProvider()

ResetCompatibilityResultsAsProvider resets all changes to the "compatibility_results_as_provider" edge.

func (*RegisteredContractMutation) ResetCompatibilityResultsAsRequirement

func (m *RegisteredContractMutation) ResetCompatibilityResultsAsRequirement()

ResetCompatibilityResultsAsRequirement resets all changes to the "compatibility_results_as_requirement" edge.

func (*RegisteredContractMutation) ResetContract

func (m *RegisteredContractMutation) ResetContract()

ResetContract resets all changes to the "contract" field.

func (*RegisteredContractMutation) ResetCreatedAt

func (m *RegisteredContractMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RegisteredContractMutation) ResetEdge

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

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) ResetFormat

func (m *RegisteredContractMutation) ResetFormat()

ResetFormat resets all changes to the "format" field.

func (*RegisteredContractMutation) ResetProviders

func (m *RegisteredContractMutation) ResetProviders()

ResetProviders resets all changes to the "providers" edge.

func (*RegisteredContractMutation) SetContract

func (m *RegisteredContractMutation) SetContract(b []byte)

SetContract sets the "contract" field.

func (*RegisteredContractMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*RegisteredContractMutation) SetField

func (m *RegisteredContractMutation) 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 (*RegisteredContractMutation) SetFormat

func (m *RegisteredContractMutation) SetFormat(i int)

SetFormat sets the "format" field.

func (*RegisteredContractMutation) SetID

func (m *RegisteredContractMutation) SetID(id string)

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

func (*RegisteredContractMutation) SetOp

func (m *RegisteredContractMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (RegisteredContractMutation) Tx

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

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

func (*RegisteredContractMutation) Type

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

func (*RegisteredContractMutation) Where

Where appends a list predicates to the RegisteredContractMutation builder.

func (*RegisteredContractMutation) WhereP

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

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

type RegisteredContractQuery

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

RegisteredContractQuery is the builder for querying RegisteredContract entities.

func (*RegisteredContractQuery) Aggregate

Aggregate returns a RegisteredContractSelect configured with the given aggregations.

func (*RegisteredContractQuery) All

All executes the query and returns a list of RegisteredContracts.

func (*RegisteredContractQuery) AllX

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

func (*RegisteredContractQuery) Clone

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

func (*RegisteredContractQuery) Count

func (rcq *RegisteredContractQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RegisteredContractQuery) CountX

func (rcq *RegisteredContractQuery) CountX(ctx context.Context) int

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

func (*RegisteredContractQuery) Exist

func (rcq *RegisteredContractQuery) Exist(ctx context.Context) (bool, error)

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

func (*RegisteredContractQuery) ExistX

func (rcq *RegisteredContractQuery) ExistX(ctx context.Context) bool

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

func (*RegisteredContractQuery) First

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

func (*RegisteredContractQuery) FirstID

func (rcq *RegisteredContractQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*RegisteredContractQuery) FirstIDX

func (rcq *RegisteredContractQuery) FirstIDX(ctx context.Context) string

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

func (*RegisteredContractQuery) FirstX

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

func (*RegisteredContractQuery) GroupBy

func (rcq *RegisteredContractQuery) GroupBy(field string, fields ...string) *RegisteredContractGroupBy

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 {
	Format int `json:"format,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RegisteredContract.Query().
	GroupBy(registeredcontract.FieldFormat).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RegisteredContractQuery) IDs

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

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

func (*RegisteredContractQuery) IDsX

func (rcq *RegisteredContractQuery) IDsX(ctx context.Context) []string

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

func (*RegisteredContractQuery) Limit

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

func (*RegisteredContractQuery) Offset

Offset to start from.

func (*RegisteredContractQuery) Only

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

func (*RegisteredContractQuery) OnlyID

func (rcq *RegisteredContractQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*RegisteredContractQuery) OnlyIDX

func (rcq *RegisteredContractQuery) OnlyIDX(ctx context.Context) string

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

func (*RegisteredContractQuery) OnlyX

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

func (*RegisteredContractQuery) Order

Order specifies how the records should be ordered.

func (*RegisteredContractQuery) QueryCompatibilityResultsAsProvider

func (rcq *RegisteredContractQuery) QueryCompatibilityResultsAsProvider() *CompatibilityResultQuery

QueryCompatibilityResultsAsProvider chains the current query on the "compatibility_results_as_provider" edge.

func (*RegisteredContractQuery) QueryCompatibilityResultsAsRequirement

func (rcq *RegisteredContractQuery) QueryCompatibilityResultsAsRequirement() *CompatibilityResultQuery

QueryCompatibilityResultsAsRequirement chains the current query on the "compatibility_results_as_requirement" edge.

func (*RegisteredContractQuery) QueryProviders

func (rcq *RegisteredContractQuery) QueryProviders() *RegisteredProviderQuery

QueryProviders chains the current query on the "providers" edge.

func (*RegisteredContractQuery) 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 {
	Format int `json:"format,omitempty"`
}

client.RegisteredContract.Query().
	Select(registeredcontract.FieldFormat).
	Scan(ctx, &v)

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

Where adds a new predicate for the RegisteredContractQuery builder.

func (*RegisteredContractQuery) WithCompatibilityResultsAsProvider

func (rcq *RegisteredContractQuery) WithCompatibilityResultsAsProvider(opts ...func(*CompatibilityResultQuery)) *RegisteredContractQuery

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

func (*RegisteredContractQuery) WithCompatibilityResultsAsRequirement

func (rcq *RegisteredContractQuery) WithCompatibilityResultsAsRequirement(opts ...func(*CompatibilityResultQuery)) *RegisteredContractQuery

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

func (*RegisteredContractQuery) WithProviders

func (rcq *RegisteredContractQuery) WithProviders(opts ...func(*RegisteredProviderQuery)) *RegisteredContractQuery

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

type RegisteredContractSelect

type RegisteredContractSelect struct {
	*RegisteredContractQuery
	// contains filtered or unexported fields
}

RegisteredContractSelect is the builder for selecting fields of RegisteredContract entities.

func (*RegisteredContractSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*RegisteredContractSelect) Bool

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

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

func (*RegisteredContractSelect) BoolX

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

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

func (*RegisteredContractSelect) Bools

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

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

func (*RegisteredContractSelect) BoolsX

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

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

func (*RegisteredContractSelect) Float64

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

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

func (*RegisteredContractSelect) Float64X

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

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

func (*RegisteredContractSelect) Float64s

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

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

func (*RegisteredContractSelect) Float64sX

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

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

func (*RegisteredContractSelect) Int

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

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

func (*RegisteredContractSelect) IntX

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

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

func (*RegisteredContractSelect) Ints

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

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

func (*RegisteredContractSelect) IntsX

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

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

func (*RegisteredContractSelect) Scan

func (rcs *RegisteredContractSelect) Scan(ctx context.Context, v any) error

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

func (*RegisteredContractSelect) ScanX

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

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

func (*RegisteredContractSelect) String

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

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

func (*RegisteredContractSelect) StringX

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

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

func (*RegisteredContractSelect) Strings

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

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

func (*RegisteredContractSelect) StringsX

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

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

type RegisteredContractUpdate

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

RegisteredContractUpdate is the builder for updating RegisteredContract entities.

func (*RegisteredContractUpdate) AddCompatibilityResultsAsProvider

func (rcu *RegisteredContractUpdate) AddCompatibilityResultsAsProvider(c ...*CompatibilityResult) *RegisteredContractUpdate

AddCompatibilityResultsAsProvider adds the "compatibility_results_as_provider" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdate) AddCompatibilityResultsAsProviderIDs

func (rcu *RegisteredContractUpdate) AddCompatibilityResultsAsProviderIDs(ids ...int) *RegisteredContractUpdate

AddCompatibilityResultsAsProviderIDs adds the "compatibility_results_as_provider" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractUpdate) AddCompatibilityResultsAsRequirement

func (rcu *RegisteredContractUpdate) AddCompatibilityResultsAsRequirement(c ...*CompatibilityResult) *RegisteredContractUpdate

AddCompatibilityResultsAsRequirement adds the "compatibility_results_as_requirement" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdate) AddCompatibilityResultsAsRequirementIDs

func (rcu *RegisteredContractUpdate) AddCompatibilityResultsAsRequirementIDs(ids ...int) *RegisteredContractUpdate

AddCompatibilityResultsAsRequirementIDs adds the "compatibility_results_as_requirement" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractUpdate) AddFormat

AddFormat adds i to the "format" field.

func (*RegisteredContractUpdate) AddProviderIDs

func (rcu *RegisteredContractUpdate) AddProviderIDs(ids ...uuid.UUID) *RegisteredContractUpdate

AddProviderIDs adds the "providers" edge to the RegisteredProvider entity by IDs.

func (*RegisteredContractUpdate) AddProviders

AddProviders adds the "providers" edges to the RegisteredProvider entity.

func (*RegisteredContractUpdate) ClearCompatibilityResultsAsProvider

func (rcu *RegisteredContractUpdate) ClearCompatibilityResultsAsProvider() *RegisteredContractUpdate

ClearCompatibilityResultsAsProvider clears all "compatibility_results_as_provider" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdate) ClearCompatibilityResultsAsRequirement

func (rcu *RegisteredContractUpdate) ClearCompatibilityResultsAsRequirement() *RegisteredContractUpdate

ClearCompatibilityResultsAsRequirement clears all "compatibility_results_as_requirement" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdate) ClearProviders

func (rcu *RegisteredContractUpdate) ClearProviders() *RegisteredContractUpdate

ClearProviders clears all "providers" edges to the RegisteredProvider entity.

func (*RegisteredContractUpdate) Exec

Exec executes the query.

func (*RegisteredContractUpdate) ExecX

func (rcu *RegisteredContractUpdate) ExecX(ctx context.Context)

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

func (*RegisteredContractUpdate) Mutation

Mutation returns the RegisteredContractMutation object of the builder.

func (*RegisteredContractUpdate) RemoveCompatibilityResultsAsProvider

func (rcu *RegisteredContractUpdate) RemoveCompatibilityResultsAsProvider(c ...*CompatibilityResult) *RegisteredContractUpdate

RemoveCompatibilityResultsAsProvider removes "compatibility_results_as_provider" edges to CompatibilityResult entities.

func (*RegisteredContractUpdate) RemoveCompatibilityResultsAsProviderIDs

func (rcu *RegisteredContractUpdate) RemoveCompatibilityResultsAsProviderIDs(ids ...int) *RegisteredContractUpdate

RemoveCompatibilityResultsAsProviderIDs removes the "compatibility_results_as_provider" edge to CompatibilityResult entities by IDs.

func (*RegisteredContractUpdate) RemoveCompatibilityResultsAsRequirement

func (rcu *RegisteredContractUpdate) RemoveCompatibilityResultsAsRequirement(c ...*CompatibilityResult) *RegisteredContractUpdate

RemoveCompatibilityResultsAsRequirement removes "compatibility_results_as_requirement" edges to CompatibilityResult entities.

func (*RegisteredContractUpdate) RemoveCompatibilityResultsAsRequirementIDs

func (rcu *RegisteredContractUpdate) RemoveCompatibilityResultsAsRequirementIDs(ids ...int) *RegisteredContractUpdate

RemoveCompatibilityResultsAsRequirementIDs removes the "compatibility_results_as_requirement" edge to CompatibilityResult entities by IDs.

func (*RegisteredContractUpdate) RemoveProviderIDs

func (rcu *RegisteredContractUpdate) RemoveProviderIDs(ids ...uuid.UUID) *RegisteredContractUpdate

RemoveProviderIDs removes the "providers" edge to RegisteredProvider entities by IDs.

func (*RegisteredContractUpdate) RemoveProviders

RemoveProviders removes "providers" edges to RegisteredProvider entities.

func (*RegisteredContractUpdate) Save

func (rcu *RegisteredContractUpdate) Save(ctx context.Context) (int, error)

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

func (*RegisteredContractUpdate) SaveX

func (rcu *RegisteredContractUpdate) SaveX(ctx context.Context) int

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

func (*RegisteredContractUpdate) SetContract

SetContract sets the "contract" field.

func (*RegisteredContractUpdate) SetFormat

SetFormat sets the "format" field.

func (*RegisteredContractUpdate) Where

Where appends a list predicates to the RegisteredContractUpdate builder.

type RegisteredContractUpdateOne

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

RegisteredContractUpdateOne is the builder for updating a single RegisteredContract entity.

func (*RegisteredContractUpdateOne) AddCompatibilityResultsAsProvider

func (rcuo *RegisteredContractUpdateOne) AddCompatibilityResultsAsProvider(c ...*CompatibilityResult) *RegisteredContractUpdateOne

AddCompatibilityResultsAsProvider adds the "compatibility_results_as_provider" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdateOne) AddCompatibilityResultsAsProviderIDs

func (rcuo *RegisteredContractUpdateOne) AddCompatibilityResultsAsProviderIDs(ids ...int) *RegisteredContractUpdateOne

AddCompatibilityResultsAsProviderIDs adds the "compatibility_results_as_provider" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractUpdateOne) AddCompatibilityResultsAsRequirement

func (rcuo *RegisteredContractUpdateOne) AddCompatibilityResultsAsRequirement(c ...*CompatibilityResult) *RegisteredContractUpdateOne

AddCompatibilityResultsAsRequirement adds the "compatibility_results_as_requirement" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdateOne) AddCompatibilityResultsAsRequirementIDs

func (rcuo *RegisteredContractUpdateOne) AddCompatibilityResultsAsRequirementIDs(ids ...int) *RegisteredContractUpdateOne

AddCompatibilityResultsAsRequirementIDs adds the "compatibility_results_as_requirement" edge to the CompatibilityResult entity by IDs.

func (*RegisteredContractUpdateOne) AddFormat

AddFormat adds i to the "format" field.

func (*RegisteredContractUpdateOne) AddProviderIDs

func (rcuo *RegisteredContractUpdateOne) AddProviderIDs(ids ...uuid.UUID) *RegisteredContractUpdateOne

AddProviderIDs adds the "providers" edge to the RegisteredProvider entity by IDs.

func (*RegisteredContractUpdateOne) AddProviders

AddProviders adds the "providers" edges to the RegisteredProvider entity.

func (*RegisteredContractUpdateOne) ClearCompatibilityResultsAsProvider

func (rcuo *RegisteredContractUpdateOne) ClearCompatibilityResultsAsProvider() *RegisteredContractUpdateOne

ClearCompatibilityResultsAsProvider clears all "compatibility_results_as_provider" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdateOne) ClearCompatibilityResultsAsRequirement

func (rcuo *RegisteredContractUpdateOne) ClearCompatibilityResultsAsRequirement() *RegisteredContractUpdateOne

ClearCompatibilityResultsAsRequirement clears all "compatibility_results_as_requirement" edges to the CompatibilityResult entity.

func (*RegisteredContractUpdateOne) ClearProviders

ClearProviders clears all "providers" edges to the RegisteredProvider entity.

func (*RegisteredContractUpdateOne) Exec

Exec executes the query on the entity.

func (*RegisteredContractUpdateOne) ExecX

func (rcuo *RegisteredContractUpdateOne) ExecX(ctx context.Context)

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

func (*RegisteredContractUpdateOne) Mutation

Mutation returns the RegisteredContractMutation object of the builder.

func (*RegisteredContractUpdateOne) RemoveCompatibilityResultsAsProvider

func (rcuo *RegisteredContractUpdateOne) RemoveCompatibilityResultsAsProvider(c ...*CompatibilityResult) *RegisteredContractUpdateOne

RemoveCompatibilityResultsAsProvider removes "compatibility_results_as_provider" edges to CompatibilityResult entities.

func (*RegisteredContractUpdateOne) RemoveCompatibilityResultsAsProviderIDs

func (rcuo *RegisteredContractUpdateOne) RemoveCompatibilityResultsAsProviderIDs(ids ...int) *RegisteredContractUpdateOne

RemoveCompatibilityResultsAsProviderIDs removes the "compatibility_results_as_provider" edge to CompatibilityResult entities by IDs.

func (*RegisteredContractUpdateOne) RemoveCompatibilityResultsAsRequirement

func (rcuo *RegisteredContractUpdateOne) RemoveCompatibilityResultsAsRequirement(c ...*CompatibilityResult) *RegisteredContractUpdateOne

RemoveCompatibilityResultsAsRequirement removes "compatibility_results_as_requirement" edges to CompatibilityResult entities.

func (*RegisteredContractUpdateOne) RemoveCompatibilityResultsAsRequirementIDs

func (rcuo *RegisteredContractUpdateOne) RemoveCompatibilityResultsAsRequirementIDs(ids ...int) *RegisteredContractUpdateOne

RemoveCompatibilityResultsAsRequirementIDs removes the "compatibility_results_as_requirement" edge to CompatibilityResult entities by IDs.

func (*RegisteredContractUpdateOne) RemoveProviderIDs

func (rcuo *RegisteredContractUpdateOne) RemoveProviderIDs(ids ...uuid.UUID) *RegisteredContractUpdateOne

RemoveProviderIDs removes the "providers" edge to RegisteredProvider entities by IDs.

func (*RegisteredContractUpdateOne) RemoveProviders

RemoveProviders removes "providers" edges to RegisteredProvider entities.

func (*RegisteredContractUpdateOne) Save

Save executes the query and returns the updated RegisteredContract entity.

func (*RegisteredContractUpdateOne) SaveX

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

func (*RegisteredContractUpdateOne) Select

func (rcuo *RegisteredContractUpdateOne) Select(field string, fields ...string) *RegisteredContractUpdateOne

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

func (*RegisteredContractUpdateOne) SetContract

SetContract sets the "contract" field.

func (*RegisteredContractUpdateOne) SetFormat

SetFormat sets the "format" field.

func (*RegisteredContractUpdateOne) Where

Where appends a list predicates to the RegisteredContractUpdate builder.

type RegisteredContracts

type RegisteredContracts []*RegisteredContract

RegisteredContracts is a parsable slice of RegisteredContract.

type RegisteredProvider

type RegisteredProvider struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// URL holds the value of the "url" field.
	URL *url.URL `json:"url,omitempty"`
	// ContractID holds the value of the "contract_id" field.
	ContractID string `json:"contract_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RegisteredProviderQuery when eager-loading is set.
	Edges RegisteredProviderEdges `json:"edges"`
	// contains filtered or unexported fields
}

RegisteredProvider is the model entity for the RegisteredProvider schema.

func (*RegisteredProvider) QueryContract

func (rp *RegisteredProvider) QueryContract() *RegisteredContractQuery

QueryContract queries the "contract" edge of the RegisteredProvider entity.

func (*RegisteredProvider) String

func (rp *RegisteredProvider) String() string

String implements the fmt.Stringer.

func (*RegisteredProvider) Unwrap

func (rp *RegisteredProvider) Unwrap() *RegisteredProvider

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

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

func (*RegisteredProvider) Value

func (rp *RegisteredProvider) Value(name string) (ent.Value, error)

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

type RegisteredProviderClient

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

RegisteredProviderClient is a client for the RegisteredProvider schema.

func NewRegisteredProviderClient

func NewRegisteredProviderClient(c config) *RegisteredProviderClient

NewRegisteredProviderClient returns a client for the RegisteredProvider from the given config.

func (*RegisteredProviderClient) Create

Create returns a builder for creating a RegisteredProvider entity.

func (*RegisteredProviderClient) CreateBulk

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

func (*RegisteredProviderClient) Delete

Delete returns a delete builder for RegisteredProvider.

func (*RegisteredProviderClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RegisteredProviderClient) DeleteOneID

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

func (*RegisteredProviderClient) Get

Get returns a RegisteredProvider entity by its id.

func (*RegisteredProviderClient) GetX

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

func (*RegisteredProviderClient) Hooks

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

Hooks returns the client hooks.

func (*RegisteredProviderClient) Intercept

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

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

func (*RegisteredProviderClient) Interceptors

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

Interceptors returns the client interceptors.

func (*RegisteredProviderClient) MapCreateBulk

func (c *RegisteredProviderClient) MapCreateBulk(slice any, setFunc func(*RegisteredProviderCreate, int)) *RegisteredProviderCreateBulk

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

Query returns a query builder for RegisteredProvider.

func (*RegisteredProviderClient) QueryContract

QueryContract queries the contract edge of a RegisteredProvider.

func (*RegisteredProviderClient) Update

Update returns an update builder for RegisteredProvider.

func (*RegisteredProviderClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RegisteredProviderClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*RegisteredProviderClient) Use

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

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

type RegisteredProviderCreate

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

RegisteredProviderCreate is the builder for creating a RegisteredProvider entity.

func (*RegisteredProviderCreate) Exec

Exec executes the query.

func (*RegisteredProviderCreate) ExecX

func (rpc *RegisteredProviderCreate) ExecX(ctx context.Context)

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

func (*RegisteredProviderCreate) Mutation

Mutation returns the RegisteredProviderMutation object of the builder.

func (*RegisteredProviderCreate) Save

Save creates the RegisteredProvider in the database.

func (*RegisteredProviderCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RegisteredProviderCreate) SetContract

SetContract sets the "contract" edge to the RegisteredContract entity.

func (*RegisteredProviderCreate) SetContractID

SetContractID sets the "contract_id" field.

func (*RegisteredProviderCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*RegisteredProviderCreate) SetID

SetID sets the "id" field.

func (*RegisteredProviderCreate) SetNillableCreatedAt

func (rpc *RegisteredProviderCreate) SetNillableCreatedAt(t *time.Time) *RegisteredProviderCreate

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

func (*RegisteredProviderCreate) SetNillableID

SetNillableID sets the "id" field if the given value is not nil.

func (*RegisteredProviderCreate) SetNillableUpdatedAt

func (rpc *RegisteredProviderCreate) SetNillableUpdatedAt(t *time.Time) *RegisteredProviderCreate

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

func (*RegisteredProviderCreate) SetURL

SetURL sets the "url" field.

func (*RegisteredProviderCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type RegisteredProviderCreateBulk

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

RegisteredProviderCreateBulk is the builder for creating many RegisteredProvider entities in bulk.

func (*RegisteredProviderCreateBulk) Exec

Exec executes the query.

func (*RegisteredProviderCreateBulk) ExecX

func (rpcb *RegisteredProviderCreateBulk) ExecX(ctx context.Context)

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

func (*RegisteredProviderCreateBulk) Save

Save creates the RegisteredProvider entities in the database.

func (*RegisteredProviderCreateBulk) SaveX

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

type RegisteredProviderDelete

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

RegisteredProviderDelete is the builder for deleting a RegisteredProvider entity.

func (*RegisteredProviderDelete) Exec

func (rpd *RegisteredProviderDelete) Exec(ctx context.Context) (int, error)

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

func (*RegisteredProviderDelete) ExecX

func (rpd *RegisteredProviderDelete) ExecX(ctx context.Context) int

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

func (*RegisteredProviderDelete) Where

Where appends a list predicates to the RegisteredProviderDelete builder.

type RegisteredProviderDeleteOne

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

RegisteredProviderDeleteOne is the builder for deleting a single RegisteredProvider entity.

func (*RegisteredProviderDeleteOne) Exec

Exec executes the deletion query.

func (*RegisteredProviderDeleteOne) ExecX

func (rpdo *RegisteredProviderDeleteOne) ExecX(ctx context.Context)

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

func (*RegisteredProviderDeleteOne) Where

Where appends a list predicates to the RegisteredProviderDelete builder.

type RegisteredProviderEdges

type RegisteredProviderEdges struct {
	// Contract holds the value of the contract edge.
	Contract *RegisteredContract `json:"contract,omitempty"`
	// contains filtered or unexported fields
}

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

func (RegisteredProviderEdges) ContractOrErr

func (e RegisteredProviderEdges) ContractOrErr() (*RegisteredContract, error)

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

type RegisteredProviderGroupBy

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

RegisteredProviderGroupBy is the group-by builder for RegisteredProvider entities.

func (*RegisteredProviderGroupBy) Aggregate

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

func (*RegisteredProviderGroupBy) Bool

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

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

func (*RegisteredProviderGroupBy) BoolX

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

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

func (*RegisteredProviderGroupBy) Bools

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

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

func (*RegisteredProviderGroupBy) BoolsX

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

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

func (*RegisteredProviderGroupBy) Float64

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

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

func (*RegisteredProviderGroupBy) Float64X

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

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

func (*RegisteredProviderGroupBy) Float64s

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

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

func (*RegisteredProviderGroupBy) Float64sX

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

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

func (*RegisteredProviderGroupBy) Int

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

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

func (*RegisteredProviderGroupBy) IntX

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

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

func (*RegisteredProviderGroupBy) Ints

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

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

func (*RegisteredProviderGroupBy) IntsX

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

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

func (*RegisteredProviderGroupBy) Scan

func (rpgb *RegisteredProviderGroupBy) Scan(ctx context.Context, v any) error

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

func (*RegisteredProviderGroupBy) ScanX

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

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

func (*RegisteredProviderGroupBy) String

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

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

func (*RegisteredProviderGroupBy) StringX

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

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

func (*RegisteredProviderGroupBy) Strings

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

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

func (*RegisteredProviderGroupBy) StringsX

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

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

type RegisteredProviderMutation

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

RegisteredProviderMutation represents an operation that mutates the RegisteredProvider nodes in the graph.

func (*RegisteredProviderMutation) AddField

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

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

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

func (*RegisteredProviderMutation) AddedField

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

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

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

func (*RegisteredProviderMutation) AddedIDs

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

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

func (*RegisteredProviderMutation) ClearContract

func (m *RegisteredProviderMutation) ClearContract()

ClearContract clears the "contract" edge to the RegisteredContract entity.

func (*RegisteredProviderMutation) ClearEdge

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

func (m *RegisteredProviderMutation) 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 (*RegisteredProviderMutation) ClearedEdges

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

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

func (*RegisteredProviderMutation) ClearedFields

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

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

func (RegisteredProviderMutation) Client

func (m RegisteredProviderMutation) 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 (*RegisteredProviderMutation) ContractCleared

func (m *RegisteredProviderMutation) ContractCleared() bool

ContractCleared reports if the "contract" edge to the RegisteredContract entity was cleared.

func (*RegisteredProviderMutation) ContractID

func (m *RegisteredProviderMutation) ContractID() (r string, exists bool)

ContractID returns the value of the "contract_id" field in the mutation.

func (*RegisteredProviderMutation) ContractIDs

func (m *RegisteredProviderMutation) ContractIDs() (ids []string)

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

func (*RegisteredProviderMutation) CreatedAt

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

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

func (*RegisteredProviderMutation) EdgeCleared

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

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

func (*RegisteredProviderMutation) Field

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

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

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

func (*RegisteredProviderMutation) Fields

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

func (m *RegisteredProviderMutation) ID() (id uuid.UUID, 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 (*RegisteredProviderMutation) 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 (*RegisteredProviderMutation) OldContractID

func (m *RegisteredProviderMutation) OldContractID(ctx context.Context) (v string, err error)

OldContractID returns the old "contract_id" field's value of the RegisteredProvider entity. If the RegisteredProvider 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 (*RegisteredProviderMutation) OldCreatedAt

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

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

func (m *RegisteredProviderMutation) 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 (*RegisteredProviderMutation) OldURL

func (m *RegisteredProviderMutation) OldURL(ctx context.Context) (v *url.URL, err error)

OldURL returns the old "url" field's value of the RegisteredProvider entity. If the RegisteredProvider 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 (*RegisteredProviderMutation) OldUpdatedAt

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

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

Op returns the operation name.

func (*RegisteredProviderMutation) RemovedEdges

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

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

func (*RegisteredProviderMutation) RemovedIDs

func (m *RegisteredProviderMutation) 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 (*RegisteredProviderMutation) ResetContract

func (m *RegisteredProviderMutation) ResetContract()

ResetContract resets all changes to the "contract" edge.

func (*RegisteredProviderMutation) ResetContractID

func (m *RegisteredProviderMutation) ResetContractID()

ResetContractID resets all changes to the "contract_id" field.

func (*RegisteredProviderMutation) ResetCreatedAt

func (m *RegisteredProviderMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RegisteredProviderMutation) ResetEdge

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

func (m *RegisteredProviderMutation) 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 (*RegisteredProviderMutation) ResetURL

func (m *RegisteredProviderMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*RegisteredProviderMutation) ResetUpdatedAt

func (m *RegisteredProviderMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RegisteredProviderMutation) SetContractID

func (m *RegisteredProviderMutation) SetContractID(s string)

SetContractID sets the "contract_id" field.

func (*RegisteredProviderMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*RegisteredProviderMutation) SetField

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

func (m *RegisteredProviderMutation) SetID(id uuid.UUID)

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

func (*RegisteredProviderMutation) SetOp

func (m *RegisteredProviderMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RegisteredProviderMutation) SetURL

func (m *RegisteredProviderMutation) SetURL(u *url.URL)

SetURL sets the "url" field.

func (*RegisteredProviderMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (RegisteredProviderMutation) Tx

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

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

func (*RegisteredProviderMutation) Type

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

func (*RegisteredProviderMutation) URL

func (m *RegisteredProviderMutation) URL() (r *url.URL, exists bool)

URL returns the value of the "url" field in the mutation.

func (*RegisteredProviderMutation) UpdatedAt

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

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

func (*RegisteredProviderMutation) Where

Where appends a list predicates to the RegisteredProviderMutation builder.

func (*RegisteredProviderMutation) WhereP

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

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

type RegisteredProviderQuery

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

RegisteredProviderQuery is the builder for querying RegisteredProvider entities.

func (*RegisteredProviderQuery) Aggregate

Aggregate returns a RegisteredProviderSelect configured with the given aggregations.

func (*RegisteredProviderQuery) All

All executes the query and returns a list of RegisteredProviders.

func (*RegisteredProviderQuery) AllX

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

func (*RegisteredProviderQuery) Clone

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

func (*RegisteredProviderQuery) Count

func (rpq *RegisteredProviderQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RegisteredProviderQuery) CountX

func (rpq *RegisteredProviderQuery) CountX(ctx context.Context) int

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

func (*RegisteredProviderQuery) Exist

func (rpq *RegisteredProviderQuery) Exist(ctx context.Context) (bool, error)

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

func (*RegisteredProviderQuery) ExistX

func (rpq *RegisteredProviderQuery) ExistX(ctx context.Context) bool

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

func (*RegisteredProviderQuery) First

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

func (*RegisteredProviderQuery) FirstID

func (rpq *RegisteredProviderQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*RegisteredProviderQuery) FirstIDX

func (rpq *RegisteredProviderQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*RegisteredProviderQuery) FirstX

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

func (*RegisteredProviderQuery) GroupBy

func (rpq *RegisteredProviderQuery) GroupBy(field string, fields ...string) *RegisteredProviderGroupBy

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 {
	URL *url.URL `json:"url,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RegisteredProvider.Query().
	GroupBy(registeredprovider.FieldURL).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RegisteredProviderQuery) IDs

func (rpq *RegisteredProviderQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*RegisteredProviderQuery) IDsX

func (rpq *RegisteredProviderQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*RegisteredProviderQuery) Limit

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

func (*RegisteredProviderQuery) Offset

Offset to start from.

func (*RegisteredProviderQuery) Only

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

func (*RegisteredProviderQuery) OnlyID

func (rpq *RegisteredProviderQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*RegisteredProviderQuery) OnlyIDX

func (rpq *RegisteredProviderQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*RegisteredProviderQuery) OnlyX

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

func (*RegisteredProviderQuery) Order

Order specifies how the records should be ordered.

func (*RegisteredProviderQuery) QueryContract

func (rpq *RegisteredProviderQuery) QueryContract() *RegisteredContractQuery

QueryContract chains the current query on the "contract" edge.

func (*RegisteredProviderQuery) 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 {
	URL *url.URL `json:"url,omitempty"`
}

client.RegisteredProvider.Query().
	Select(registeredprovider.FieldURL).
	Scan(ctx, &v)

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

Where adds a new predicate for the RegisteredProviderQuery builder.

func (*RegisteredProviderQuery) WithContract

func (rpq *RegisteredProviderQuery) WithContract(opts ...func(*RegisteredContractQuery)) *RegisteredProviderQuery

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

type RegisteredProviderSelect

type RegisteredProviderSelect struct {
	*RegisteredProviderQuery
	// contains filtered or unexported fields
}

RegisteredProviderSelect is the builder for selecting fields of RegisteredProvider entities.

func (*RegisteredProviderSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*RegisteredProviderSelect) Bool

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

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

func (*RegisteredProviderSelect) BoolX

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

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

func (*RegisteredProviderSelect) Bools

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

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

func (*RegisteredProviderSelect) BoolsX

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

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

func (*RegisteredProviderSelect) Float64

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

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

func (*RegisteredProviderSelect) Float64X

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

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

func (*RegisteredProviderSelect) Float64s

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

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

func (*RegisteredProviderSelect) Float64sX

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

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

func (*RegisteredProviderSelect) Int

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

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

func (*RegisteredProviderSelect) IntX

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

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

func (*RegisteredProviderSelect) Ints

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

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

func (*RegisteredProviderSelect) IntsX

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

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

func (*RegisteredProviderSelect) Scan

func (rps *RegisteredProviderSelect) Scan(ctx context.Context, v any) error

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

func (*RegisteredProviderSelect) ScanX

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

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

func (*RegisteredProviderSelect) String

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

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

func (*RegisteredProviderSelect) StringX

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

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

func (*RegisteredProviderSelect) Strings

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

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

func (*RegisteredProviderSelect) StringsX

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

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

type RegisteredProviderUpdate

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

RegisteredProviderUpdate is the builder for updating RegisteredProvider entities.

func (*RegisteredProviderUpdate) ClearContract

func (rpu *RegisteredProviderUpdate) ClearContract() *RegisteredProviderUpdate

ClearContract clears the "contract" edge to the RegisteredContract entity.

func (*RegisteredProviderUpdate) Exec

Exec executes the query.

func (*RegisteredProviderUpdate) ExecX

func (rpu *RegisteredProviderUpdate) ExecX(ctx context.Context)

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

func (*RegisteredProviderUpdate) Mutation

Mutation returns the RegisteredProviderMutation object of the builder.

func (*RegisteredProviderUpdate) Save

func (rpu *RegisteredProviderUpdate) Save(ctx context.Context) (int, error)

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

func (*RegisteredProviderUpdate) SaveX

func (rpu *RegisteredProviderUpdate) SaveX(ctx context.Context) int

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

func (*RegisteredProviderUpdate) SetContract

SetContract sets the "contract" edge to the RegisteredContract entity.

func (*RegisteredProviderUpdate) SetContractID

SetContractID sets the "contract_id" field.

func (*RegisteredProviderUpdate) SetURL

SetURL sets the "url" field.

func (*RegisteredProviderUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*RegisteredProviderUpdate) Where

Where appends a list predicates to the RegisteredProviderUpdate builder.

type RegisteredProviderUpdateOne

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

RegisteredProviderUpdateOne is the builder for updating a single RegisteredProvider entity.

func (*RegisteredProviderUpdateOne) ClearContract

ClearContract clears the "contract" edge to the RegisteredContract entity.

func (*RegisteredProviderUpdateOne) Exec

Exec executes the query on the entity.

func (*RegisteredProviderUpdateOne) ExecX

func (rpuo *RegisteredProviderUpdateOne) ExecX(ctx context.Context)

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

func (*RegisteredProviderUpdateOne) Mutation

Mutation returns the RegisteredProviderMutation object of the builder.

func (*RegisteredProviderUpdateOne) Save

Save executes the query and returns the updated RegisteredProvider entity.

func (*RegisteredProviderUpdateOne) SaveX

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

func (*RegisteredProviderUpdateOne) Select

func (rpuo *RegisteredProviderUpdateOne) Select(field string, fields ...string) *RegisteredProviderUpdateOne

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

func (*RegisteredProviderUpdateOne) SetContract

SetContract sets the "contract" edge to the RegisteredContract entity.

func (*RegisteredProviderUpdateOne) SetContractID

SetContractID sets the "contract_id" field.

func (*RegisteredProviderUpdateOne) SetURL

SetURL sets the "url" field.

func (*RegisteredProviderUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*RegisteredProviderUpdateOne) Where

Where appends a list predicates to the RegisteredProviderUpdate builder.

type RegisteredProviders

type RegisteredProviders []*RegisteredProvider

RegisteredProviders is a parsable slice of RegisteredProvider.

type RollbackFunc

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

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

func (RollbackFunc) Rollback

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

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

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

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

type Rollbacker

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

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

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

type Traverser

type Traverser = ent.Traverser

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

type Tx

type Tx struct {

	// CompatibilityResult is the client for interacting with the CompatibilityResult builders.
	CompatibilityResult *CompatibilityResultClient
	// RegisteredContract is the client for interacting with the RegisteredContract builders.
	RegisteredContract *RegisteredContractClient
	// RegisteredProvider is the client for interacting with the RegisteredProvider builders.
	RegisteredProvider *RegisteredProviderClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

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

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

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

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

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

Jump to

Keyboard shortcuts

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