ent

package
v0.0.0-...-2ff182f Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 31 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.
	TypeLaunchpad = "Launchpad"
	TypeMint      = "Mint"
	TypeProject   = "Project"
)

Variables

View Source
var DefaultLaunchpadOrder = &LaunchpadOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &LaunchpadOrderField{
		Value: func(l *Launchpad) (ent.Value, error) {
			return l.ID, nil
		},
		column: launchpad.FieldID,
		toTerm: launchpad.ByID,
		toCursor: func(l *Launchpad) Cursor {
			return Cursor{ID: l.ID}
		},
	},
}

DefaultLaunchpadOrder is the default ordering of Launchpad.

View Source
var DefaultMintOrder = &MintOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MintOrderField{
		Value: func(m *Mint) (ent.Value, error) {
			return m.ID, nil
		},
		column: mint.FieldID,
		toTerm: mint.ByID,
		toCursor: func(m *Mint) Cursor {
			return Cursor{ID: m.ID}
		},
	},
}

DefaultMintOrder is the default ordering of Mint.

View Source
var DefaultProjectOrder = &ProjectOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ProjectOrderField{
		Value: func(pr *Project) (ent.Value, error) {
			return pr.ID, nil
		},
		column: project.FieldID,
		toTerm: project.ByID,
		toCursor: func(pr *Project) Cursor {
			return Cursor{ID: pr.ID}
		},
	},
}

DefaultProjectOrder is the default ordering of Project.

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.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

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
	// Launchpad is the client for interacting with the Launchpad builders.
	Launchpad *LaunchpadClient
	// Mint is the client for interacting with the Mint builders.
	Mint *MintClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// 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 NewTestClient

func NewTestClient(t *testing.T) *Client

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().
	Launchpad.
	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) Noder

func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

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

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

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 Launchpad

type Launchpad struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// IsReady holds the value of the "is_ready" field.
	IsReady bool `json:"is_ready,omitempty"`
	// MinterContract holds the value of the "minter_contract" field.
	MinterContract schema.MinterContract `json:"minter_contract,omitempty"`
	// WhitelistedSaleOpen holds the value of the "whitelisted_sale_open" field.
	WhitelistedSaleOpen bool `json:"whitelisted_sale_open,omitempty"`
	// PublicSaleOpen holds the value of the "public_sale_open" field.
	PublicSaleOpen bool `json:"public_sale_open,omitempty"`
	// IsSoldOut holds the value of the "is_sold_out" field.
	IsSoldOut bool `json:"is_sold_out,omitempty"`
	// IsCanceled holds the value of the "is_canceled" field.
	IsCanceled bool `json:"is_canceled,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the LaunchpadQuery when eager-loading is set.
	Edges LaunchpadEdges `json:"edges"`
	// contains filtered or unexported fields
}

Launchpad is the model entity for the Launchpad schema.

func (*Launchpad) IsNode

func (*Launchpad) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Launchpad) Project

func (l *Launchpad) Project(ctx context.Context) (*Project, error)

func (*Launchpad) QueryProject

func (l *Launchpad) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Launchpad entity.

func (*Launchpad) String

func (l *Launchpad) String() string

String implements the fmt.Stringer.

func (*Launchpad) ToEdge

func (l *Launchpad) ToEdge(order *LaunchpadOrder) *LaunchpadEdge

ToEdge converts Launchpad into LaunchpadEdge.

func (*Launchpad) Unwrap

func (l *Launchpad) Unwrap() *Launchpad

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

func (l *Launchpad) Update() *LaunchpadUpdateOne

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

func (*Launchpad) Value

func (l *Launchpad) Value(name string) (ent.Value, error)

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

type LaunchpadClient

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

LaunchpadClient is a client for the Launchpad schema.

func NewLaunchpadClient

func NewLaunchpadClient(c config) *LaunchpadClient

NewLaunchpadClient returns a client for the Launchpad from the given config.

func (*LaunchpadClient) Create

func (c *LaunchpadClient) Create() *LaunchpadCreate

Create returns a builder for creating a Launchpad entity.

func (*LaunchpadClient) CreateBulk

func (c *LaunchpadClient) CreateBulk(builders ...*LaunchpadCreate) *LaunchpadCreateBulk

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

func (*LaunchpadClient) Delete

func (c *LaunchpadClient) Delete() *LaunchpadDelete

Delete returns a delete builder for Launchpad.

func (*LaunchpadClient) DeleteOne

func (c *LaunchpadClient) DeleteOne(l *Launchpad) *LaunchpadDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LaunchpadClient) DeleteOneID

func (c *LaunchpadClient) DeleteOneID(id int) *LaunchpadDeleteOne

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

func (*LaunchpadClient) Get

func (c *LaunchpadClient) Get(ctx context.Context, id int) (*Launchpad, error)

Get returns a Launchpad entity by its id.

func (*LaunchpadClient) GetX

func (c *LaunchpadClient) GetX(ctx context.Context, id int) *Launchpad

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

func (*LaunchpadClient) Hooks

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

Hooks returns the client hooks.

func (*LaunchpadClient) Intercept

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

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

func (*LaunchpadClient) Interceptors

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

Interceptors returns the client interceptors.

func (*LaunchpadClient) MapCreateBulk

func (c *LaunchpadClient) MapCreateBulk(slice any, setFunc func(*LaunchpadCreate, int)) *LaunchpadCreateBulk

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

func (c *LaunchpadClient) Query() *LaunchpadQuery

Query returns a query builder for Launchpad.

func (*LaunchpadClient) QueryProject

func (c *LaunchpadClient) QueryProject(l *Launchpad) *ProjectQuery

QueryProject queries the project edge of a Launchpad.

func (*LaunchpadClient) Update

func (c *LaunchpadClient) Update() *LaunchpadUpdate

Update returns an update builder for Launchpad.

func (*LaunchpadClient) UpdateOne

func (c *LaunchpadClient) UpdateOne(l *Launchpad) *LaunchpadUpdateOne

UpdateOne returns an update builder for the given entity.

func (*LaunchpadClient) UpdateOneID

func (c *LaunchpadClient) UpdateOneID(id int) *LaunchpadUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LaunchpadClient) Use

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

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

type LaunchpadConnection

type LaunchpadConnection struct {
	Edges      []*LaunchpadEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

LaunchpadConnection is the connection containing edges to Launchpad.

type LaunchpadCreate

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

LaunchpadCreate is the builder for creating a Launchpad entity.

func (*LaunchpadCreate) Exec

func (lc *LaunchpadCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LaunchpadCreate) ExecX

func (lc *LaunchpadCreate) ExecX(ctx context.Context)

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

func (*LaunchpadCreate) Mutation

func (lc *LaunchpadCreate) Mutation() *LaunchpadMutation

Mutation returns the LaunchpadMutation object of the builder.

func (*LaunchpadCreate) OnConflict

func (lc *LaunchpadCreate) OnConflict(opts ...sql.ConflictOption) *LaunchpadUpsertOne

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

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

func (*LaunchpadCreate) OnConflictColumns

func (lc *LaunchpadCreate) OnConflictColumns(columns ...string) *LaunchpadUpsertOne

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

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

func (*LaunchpadCreate) Save

func (lc *LaunchpadCreate) Save(ctx context.Context) (*Launchpad, error)

Save creates the Launchpad in the database.

func (*LaunchpadCreate) SaveX

func (lc *LaunchpadCreate) SaveX(ctx context.Context) *Launchpad

SaveX calls Save and panics if Save returns an error.

func (*LaunchpadCreate) SetIsCanceled

func (lc *LaunchpadCreate) SetIsCanceled(b bool) *LaunchpadCreate

SetIsCanceled sets the "is_canceled" field.

func (*LaunchpadCreate) SetIsReady

func (lc *LaunchpadCreate) SetIsReady(b bool) *LaunchpadCreate

SetIsReady sets the "is_ready" field.

func (*LaunchpadCreate) SetIsSoldOut

func (lc *LaunchpadCreate) SetIsSoldOut(b bool) *LaunchpadCreate

SetIsSoldOut sets the "is_sold_out" field.

func (*LaunchpadCreate) SetMinterContract

func (lc *LaunchpadCreate) SetMinterContract(sc schema.MinterContract) *LaunchpadCreate

SetMinterContract sets the "minter_contract" field.

func (*LaunchpadCreate) SetNillableIsCanceled

func (lc *LaunchpadCreate) SetNillableIsCanceled(b *bool) *LaunchpadCreate

SetNillableIsCanceled sets the "is_canceled" field if the given value is not nil.

func (*LaunchpadCreate) SetNillableIsReady

func (lc *LaunchpadCreate) SetNillableIsReady(b *bool) *LaunchpadCreate

SetNillableIsReady sets the "is_ready" field if the given value is not nil.

func (*LaunchpadCreate) SetNillableIsSoldOut

func (lc *LaunchpadCreate) SetNillableIsSoldOut(b *bool) *LaunchpadCreate

SetNillableIsSoldOut sets the "is_sold_out" field if the given value is not nil.

func (*LaunchpadCreate) SetNillablePublicSaleOpen

func (lc *LaunchpadCreate) SetNillablePublicSaleOpen(b *bool) *LaunchpadCreate

SetNillablePublicSaleOpen sets the "public_sale_open" field if the given value is not nil.

func (*LaunchpadCreate) SetNillableWhitelistedSaleOpen

func (lc *LaunchpadCreate) SetNillableWhitelistedSaleOpen(b *bool) *LaunchpadCreate

SetNillableWhitelistedSaleOpen sets the "whitelisted_sale_open" field if the given value is not nil.

func (*LaunchpadCreate) SetProject

func (lc *LaunchpadCreate) SetProject(p *Project) *LaunchpadCreate

SetProject sets the "project" edge to the Project entity.

func (*LaunchpadCreate) SetProjectID

func (lc *LaunchpadCreate) SetProjectID(id int) *LaunchpadCreate

SetProjectID sets the "project" edge to the Project entity by ID.

func (*LaunchpadCreate) SetPublicSaleOpen

func (lc *LaunchpadCreate) SetPublicSaleOpen(b bool) *LaunchpadCreate

SetPublicSaleOpen sets the "public_sale_open" field.

func (*LaunchpadCreate) SetWhitelistedSaleOpen

func (lc *LaunchpadCreate) SetWhitelistedSaleOpen(b bool) *LaunchpadCreate

SetWhitelistedSaleOpen sets the "whitelisted_sale_open" field.

type LaunchpadCreateBulk

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

LaunchpadCreateBulk is the builder for creating many Launchpad entities in bulk.

func (*LaunchpadCreateBulk) Exec

func (lcb *LaunchpadCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LaunchpadCreateBulk) ExecX

func (lcb *LaunchpadCreateBulk) ExecX(ctx context.Context)

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

func (*LaunchpadCreateBulk) OnConflict

func (lcb *LaunchpadCreateBulk) OnConflict(opts ...sql.ConflictOption) *LaunchpadUpsertBulk

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

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

func (*LaunchpadCreateBulk) OnConflictColumns

func (lcb *LaunchpadCreateBulk) OnConflictColumns(columns ...string) *LaunchpadUpsertBulk

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

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

func (*LaunchpadCreateBulk) Save

func (lcb *LaunchpadCreateBulk) Save(ctx context.Context) ([]*Launchpad, error)

Save creates the Launchpad entities in the database.

func (*LaunchpadCreateBulk) SaveX

func (lcb *LaunchpadCreateBulk) SaveX(ctx context.Context) []*Launchpad

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

type LaunchpadDelete

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

LaunchpadDelete is the builder for deleting a Launchpad entity.

func (*LaunchpadDelete) Exec

func (ld *LaunchpadDelete) Exec(ctx context.Context) (int, error)

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

func (*LaunchpadDelete) ExecX

func (ld *LaunchpadDelete) ExecX(ctx context.Context) int

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

func (*LaunchpadDelete) Where

Where appends a list predicates to the LaunchpadDelete builder.

type LaunchpadDeleteOne

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

LaunchpadDeleteOne is the builder for deleting a single Launchpad entity.

func (*LaunchpadDeleteOne) Exec

func (ldo *LaunchpadDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LaunchpadDeleteOne) ExecX

func (ldo *LaunchpadDeleteOne) ExecX(ctx context.Context)

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

func (*LaunchpadDeleteOne) Where

Where appends a list predicates to the LaunchpadDelete builder.

type LaunchpadEdge

type LaunchpadEdge struct {
	Node   *Launchpad `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

LaunchpadEdge is the edge representation of Launchpad.

type LaunchpadEdges

type LaunchpadEdges struct {
	// Project holds the value of the project edge.
	Project *Project `json:"project,omitempty"`
	// contains filtered or unexported fields
}

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

func (LaunchpadEdges) ProjectOrErr

func (e LaunchpadEdges) ProjectOrErr() (*Project, error)

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

type LaunchpadGroupBy

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

LaunchpadGroupBy is the group-by builder for Launchpad entities.

func (*LaunchpadGroupBy) Aggregate

func (lgb *LaunchpadGroupBy) Aggregate(fns ...AggregateFunc) *LaunchpadGroupBy

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

func (*LaunchpadGroupBy) Bool

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

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

func (*LaunchpadGroupBy) BoolX

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

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

func (*LaunchpadGroupBy) Bools

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

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

func (*LaunchpadGroupBy) BoolsX

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

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

func (*LaunchpadGroupBy) Float64

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

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

func (*LaunchpadGroupBy) Float64X

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

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

func (*LaunchpadGroupBy) Float64s

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

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

func (*LaunchpadGroupBy) Float64sX

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

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

func (*LaunchpadGroupBy) Int

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

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

func (*LaunchpadGroupBy) IntX

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

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

func (*LaunchpadGroupBy) Ints

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

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

func (*LaunchpadGroupBy) IntsX

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

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

func (*LaunchpadGroupBy) Scan

func (lgb *LaunchpadGroupBy) Scan(ctx context.Context, v any) error

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

func (*LaunchpadGroupBy) ScanX

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

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

func (*LaunchpadGroupBy) String

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

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

func (*LaunchpadGroupBy) StringX

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

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

func (*LaunchpadGroupBy) Strings

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

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

func (*LaunchpadGroupBy) StringsX

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

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

type LaunchpadMutation

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

LaunchpadMutation represents an operation that mutates the Launchpad nodes in the graph.

func (*LaunchpadMutation) AddField

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

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

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

func (*LaunchpadMutation) AddedField

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

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

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

func (*LaunchpadMutation) AddedIDs

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

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

func (*LaunchpadMutation) ClearEdge

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

func (m *LaunchpadMutation) 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 (*LaunchpadMutation) ClearProject

func (m *LaunchpadMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*LaunchpadMutation) ClearedEdges

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

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

func (*LaunchpadMutation) ClearedFields

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

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

func (LaunchpadMutation) Client

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

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

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

func (*LaunchpadMutation) Field

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

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

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

func (*LaunchpadMutation) Fields

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

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

func (m *LaunchpadMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*LaunchpadMutation) IsCanceled

func (m *LaunchpadMutation) IsCanceled() (r bool, exists bool)

IsCanceled returns the value of the "is_canceled" field in the mutation.

func (*LaunchpadMutation) IsReady

func (m *LaunchpadMutation) IsReady() (r bool, exists bool)

IsReady returns the value of the "is_ready" field in the mutation.

func (*LaunchpadMutation) IsSoldOut

func (m *LaunchpadMutation) IsSoldOut() (r bool, exists bool)

IsSoldOut returns the value of the "is_sold_out" field in the mutation.

func (*LaunchpadMutation) MinterContract

func (m *LaunchpadMutation) MinterContract() (r schema.MinterContract, exists bool)

MinterContract returns the value of the "minter_contract" field in the mutation.

func (*LaunchpadMutation) OldField

func (m *LaunchpadMutation) 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 (*LaunchpadMutation) OldIsCanceled

func (m *LaunchpadMutation) OldIsCanceled(ctx context.Context) (v bool, err error)

OldIsCanceled returns the old "is_canceled" field's value of the Launchpad entity. If the Launchpad 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 (*LaunchpadMutation) OldIsReady

func (m *LaunchpadMutation) OldIsReady(ctx context.Context) (v bool, err error)

OldIsReady returns the old "is_ready" field's value of the Launchpad entity. If the Launchpad 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 (*LaunchpadMutation) OldIsSoldOut

func (m *LaunchpadMutation) OldIsSoldOut(ctx context.Context) (v bool, err error)

OldIsSoldOut returns the old "is_sold_out" field's value of the Launchpad entity. If the Launchpad 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 (*LaunchpadMutation) OldMinterContract

func (m *LaunchpadMutation) OldMinterContract(ctx context.Context) (v schema.MinterContract, err error)

OldMinterContract returns the old "minter_contract" field's value of the Launchpad entity. If the Launchpad 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 (*LaunchpadMutation) OldPublicSaleOpen

func (m *LaunchpadMutation) OldPublicSaleOpen(ctx context.Context) (v bool, err error)

OldPublicSaleOpen returns the old "public_sale_open" field's value of the Launchpad entity. If the Launchpad 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 (*LaunchpadMutation) OldWhitelistedSaleOpen

func (m *LaunchpadMutation) OldWhitelistedSaleOpen(ctx context.Context) (v bool, err error)

OldWhitelistedSaleOpen returns the old "whitelisted_sale_open" field's value of the Launchpad entity. If the Launchpad 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 (*LaunchpadMutation) Op

func (m *LaunchpadMutation) Op() Op

Op returns the operation name.

func (*LaunchpadMutation) ProjectCleared

func (m *LaunchpadMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*LaunchpadMutation) ProjectID

func (m *LaunchpadMutation) ProjectID() (id int, exists bool)

ProjectID returns the "project" edge ID in the mutation.

func (*LaunchpadMutation) ProjectIDs

func (m *LaunchpadMutation) ProjectIDs() (ids []int)

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

func (*LaunchpadMutation) PublicSaleOpen

func (m *LaunchpadMutation) PublicSaleOpen() (r bool, exists bool)

PublicSaleOpen returns the value of the "public_sale_open" field in the mutation.

func (*LaunchpadMutation) RemovedEdges

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

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

func (*LaunchpadMutation) RemovedIDs

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

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

func (m *LaunchpadMutation) 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 (*LaunchpadMutation) ResetIsCanceled

func (m *LaunchpadMutation) ResetIsCanceled()

ResetIsCanceled resets all changes to the "is_canceled" field.

func (*LaunchpadMutation) ResetIsReady

func (m *LaunchpadMutation) ResetIsReady()

ResetIsReady resets all changes to the "is_ready" field.

func (*LaunchpadMutation) ResetIsSoldOut

func (m *LaunchpadMutation) ResetIsSoldOut()

ResetIsSoldOut resets all changes to the "is_sold_out" field.

func (*LaunchpadMutation) ResetMinterContract

func (m *LaunchpadMutation) ResetMinterContract()

ResetMinterContract resets all changes to the "minter_contract" field.

func (*LaunchpadMutation) ResetProject

func (m *LaunchpadMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*LaunchpadMutation) ResetPublicSaleOpen

func (m *LaunchpadMutation) ResetPublicSaleOpen()

ResetPublicSaleOpen resets all changes to the "public_sale_open" field.

func (*LaunchpadMutation) ResetWhitelistedSaleOpen

func (m *LaunchpadMutation) ResetWhitelistedSaleOpen()

ResetWhitelistedSaleOpen resets all changes to the "whitelisted_sale_open" field.

func (*LaunchpadMutation) SetField

func (m *LaunchpadMutation) 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 (*LaunchpadMutation) SetIsCanceled

func (m *LaunchpadMutation) SetIsCanceled(b bool)

SetIsCanceled sets the "is_canceled" field.

func (*LaunchpadMutation) SetIsReady

func (m *LaunchpadMutation) SetIsReady(b bool)

SetIsReady sets the "is_ready" field.

func (*LaunchpadMutation) SetIsSoldOut

func (m *LaunchpadMutation) SetIsSoldOut(b bool)

SetIsSoldOut sets the "is_sold_out" field.

func (*LaunchpadMutation) SetMinterContract

func (m *LaunchpadMutation) SetMinterContract(sc schema.MinterContract)

SetMinterContract sets the "minter_contract" field.

func (*LaunchpadMutation) SetOp

func (m *LaunchpadMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*LaunchpadMutation) SetProjectID

func (m *LaunchpadMutation) SetProjectID(id int)

SetProjectID sets the "project" edge to the Project entity by id.

func (*LaunchpadMutation) SetPublicSaleOpen

func (m *LaunchpadMutation) SetPublicSaleOpen(b bool)

SetPublicSaleOpen sets the "public_sale_open" field.

func (*LaunchpadMutation) SetWhitelistedSaleOpen

func (m *LaunchpadMutation) SetWhitelistedSaleOpen(b bool)

SetWhitelistedSaleOpen sets the "whitelisted_sale_open" field.

func (LaunchpadMutation) Tx

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

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

func (*LaunchpadMutation) Type

func (m *LaunchpadMutation) Type() string

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

func (*LaunchpadMutation) Where

func (m *LaunchpadMutation) Where(ps ...predicate.Launchpad)

Where appends a list predicates to the LaunchpadMutation builder.

func (*LaunchpadMutation) WhereP

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

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

func (*LaunchpadMutation) WhitelistedSaleOpen

func (m *LaunchpadMutation) WhitelistedSaleOpen() (r bool, exists bool)

WhitelistedSaleOpen returns the value of the "whitelisted_sale_open" field in the mutation.

type LaunchpadOrder

type LaunchpadOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *LaunchpadOrderField `json:"field"`
}

LaunchpadOrder defines the ordering of Launchpad.

type LaunchpadOrderField

type LaunchpadOrderField struct {
	// Value extracts the ordering value from the given Launchpad.
	Value func(*Launchpad) (ent.Value, error)
	// contains filtered or unexported fields
}

LaunchpadOrderField defines the ordering field of Launchpad.

type LaunchpadPaginateOption

type LaunchpadPaginateOption func(*launchpadPager) error

LaunchpadPaginateOption enables pagination customization.

func WithLaunchpadFilter

func WithLaunchpadFilter(filter func(*LaunchpadQuery) (*LaunchpadQuery, error)) LaunchpadPaginateOption

WithLaunchpadFilter configures pagination filter.

func WithLaunchpadOrder

func WithLaunchpadOrder(order *LaunchpadOrder) LaunchpadPaginateOption

WithLaunchpadOrder configures pagination ordering.

type LaunchpadQuery

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

LaunchpadQuery is the builder for querying Launchpad entities.

func (*LaunchpadQuery) Aggregate

func (lq *LaunchpadQuery) Aggregate(fns ...AggregateFunc) *LaunchpadSelect

Aggregate returns a LaunchpadSelect configured with the given aggregations.

func (*LaunchpadQuery) All

func (lq *LaunchpadQuery) All(ctx context.Context) ([]*Launchpad, error)

All executes the query and returns a list of Launchpads.

func (*LaunchpadQuery) AllX

func (lq *LaunchpadQuery) AllX(ctx context.Context) []*Launchpad

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

func (*LaunchpadQuery) Clone

func (lq *LaunchpadQuery) Clone() *LaunchpadQuery

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

func (*LaunchpadQuery) CollectFields

func (l *LaunchpadQuery) CollectFields(ctx context.Context, satisfies ...string) (*LaunchpadQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*LaunchpadQuery) Count

func (lq *LaunchpadQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LaunchpadQuery) CountX

func (lq *LaunchpadQuery) CountX(ctx context.Context) int

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

func (*LaunchpadQuery) Exist

func (lq *LaunchpadQuery) Exist(ctx context.Context) (bool, error)

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

func (*LaunchpadQuery) ExistX

func (lq *LaunchpadQuery) ExistX(ctx context.Context) bool

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

func (*LaunchpadQuery) First

func (lq *LaunchpadQuery) First(ctx context.Context) (*Launchpad, error)

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

func (*LaunchpadQuery) FirstID

func (lq *LaunchpadQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*LaunchpadQuery) FirstIDX

func (lq *LaunchpadQuery) FirstIDX(ctx context.Context) int

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

func (*LaunchpadQuery) FirstX

func (lq *LaunchpadQuery) FirstX(ctx context.Context) *Launchpad

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

func (*LaunchpadQuery) GroupBy

func (lq *LaunchpadQuery) GroupBy(field string, fields ...string) *LaunchpadGroupBy

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 {
	IsReady bool `json:"is_ready,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Launchpad.Query().
	GroupBy(launchpad.FieldIsReady).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LaunchpadQuery) IDs

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

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

func (*LaunchpadQuery) IDsX

func (lq *LaunchpadQuery) IDsX(ctx context.Context) []int

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

func (*LaunchpadQuery) Limit

func (lq *LaunchpadQuery) Limit(limit int) *LaunchpadQuery

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

func (*LaunchpadQuery) Offset

func (lq *LaunchpadQuery) Offset(offset int) *LaunchpadQuery

Offset to start from.

func (*LaunchpadQuery) Only

func (lq *LaunchpadQuery) Only(ctx context.Context) (*Launchpad, error)

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

func (*LaunchpadQuery) OnlyID

func (lq *LaunchpadQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*LaunchpadQuery) OnlyIDX

func (lq *LaunchpadQuery) OnlyIDX(ctx context.Context) int

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

func (*LaunchpadQuery) OnlyX

func (lq *LaunchpadQuery) OnlyX(ctx context.Context) *Launchpad

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

func (*LaunchpadQuery) Order

Order specifies how the records should be ordered.

func (*LaunchpadQuery) Paginate

func (l *LaunchpadQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...LaunchpadPaginateOption,
) (*LaunchpadConnection, error)

Paginate executes the query and returns a relay based cursor connection to Launchpad.

func (*LaunchpadQuery) QueryProject

func (lq *LaunchpadQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*LaunchpadQuery) Select

func (lq *LaunchpadQuery) Select(fields ...string) *LaunchpadSelect

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 {
	IsReady bool `json:"is_ready,omitempty"`
}

client.Launchpad.Query().
	Select(launchpad.FieldIsReady).
	Scan(ctx, &v)

func (*LaunchpadQuery) Unique

func (lq *LaunchpadQuery) Unique(unique bool) *LaunchpadQuery

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

Where adds a new predicate for the LaunchpadQuery builder.

func (*LaunchpadQuery) WithProject

func (lq *LaunchpadQuery) WithProject(opts ...func(*ProjectQuery)) *LaunchpadQuery

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

type LaunchpadSelect

type LaunchpadSelect struct {
	*LaunchpadQuery
	// contains filtered or unexported fields
}

LaunchpadSelect is the builder for selecting fields of Launchpad entities.

func (*LaunchpadSelect) Aggregate

func (ls *LaunchpadSelect) Aggregate(fns ...AggregateFunc) *LaunchpadSelect

Aggregate adds the given aggregation functions to the selector query.

func (*LaunchpadSelect) Bool

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

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

func (*LaunchpadSelect) BoolX

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

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

func (*LaunchpadSelect) Bools

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

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

func (*LaunchpadSelect) BoolsX

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

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

func (*LaunchpadSelect) Float64

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

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

func (*LaunchpadSelect) Float64X

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

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

func (*LaunchpadSelect) Float64s

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

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

func (*LaunchpadSelect) Float64sX

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

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

func (*LaunchpadSelect) Int

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

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

func (*LaunchpadSelect) IntX

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

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

func (*LaunchpadSelect) Ints

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

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

func (*LaunchpadSelect) IntsX

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

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

func (*LaunchpadSelect) Scan

func (ls *LaunchpadSelect) Scan(ctx context.Context, v any) error

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

func (*LaunchpadSelect) ScanX

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

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

func (*LaunchpadSelect) String

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

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

func (*LaunchpadSelect) StringX

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

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

func (*LaunchpadSelect) Strings

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

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

func (*LaunchpadSelect) StringsX

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

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

type LaunchpadUpdate

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

LaunchpadUpdate is the builder for updating Launchpad entities.

func (*LaunchpadUpdate) ClearProject

func (lu *LaunchpadUpdate) ClearProject() *LaunchpadUpdate

ClearProject clears the "project" edge to the Project entity.

func (*LaunchpadUpdate) Exec

func (lu *LaunchpadUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LaunchpadUpdate) ExecX

func (lu *LaunchpadUpdate) ExecX(ctx context.Context)

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

func (*LaunchpadUpdate) Mutation

func (lu *LaunchpadUpdate) Mutation() *LaunchpadMutation

Mutation returns the LaunchpadMutation object of the builder.

func (*LaunchpadUpdate) Save

func (lu *LaunchpadUpdate) Save(ctx context.Context) (int, error)

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

func (*LaunchpadUpdate) SaveX

func (lu *LaunchpadUpdate) SaveX(ctx context.Context) int

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

func (*LaunchpadUpdate) SetIsCanceled

func (lu *LaunchpadUpdate) SetIsCanceled(b bool) *LaunchpadUpdate

SetIsCanceled sets the "is_canceled" field.

func (*LaunchpadUpdate) SetIsReady

func (lu *LaunchpadUpdate) SetIsReady(b bool) *LaunchpadUpdate

SetIsReady sets the "is_ready" field.

func (*LaunchpadUpdate) SetIsSoldOut

func (lu *LaunchpadUpdate) SetIsSoldOut(b bool) *LaunchpadUpdate

SetIsSoldOut sets the "is_sold_out" field.

func (*LaunchpadUpdate) SetMinterContract

func (lu *LaunchpadUpdate) SetMinterContract(sc schema.MinterContract) *LaunchpadUpdate

SetMinterContract sets the "minter_contract" field.

func (*LaunchpadUpdate) SetNillableIsCanceled

func (lu *LaunchpadUpdate) SetNillableIsCanceled(b *bool) *LaunchpadUpdate

SetNillableIsCanceled sets the "is_canceled" field if the given value is not nil.

func (*LaunchpadUpdate) SetNillableIsReady

func (lu *LaunchpadUpdate) SetNillableIsReady(b *bool) *LaunchpadUpdate

SetNillableIsReady sets the "is_ready" field if the given value is not nil.

func (*LaunchpadUpdate) SetNillableIsSoldOut

func (lu *LaunchpadUpdate) SetNillableIsSoldOut(b *bool) *LaunchpadUpdate

SetNillableIsSoldOut sets the "is_sold_out" field if the given value is not nil.

func (*LaunchpadUpdate) SetNillableMinterContract

func (lu *LaunchpadUpdate) SetNillableMinterContract(sc *schema.MinterContract) *LaunchpadUpdate

SetNillableMinterContract sets the "minter_contract" field if the given value is not nil.

func (*LaunchpadUpdate) SetNillablePublicSaleOpen

func (lu *LaunchpadUpdate) SetNillablePublicSaleOpen(b *bool) *LaunchpadUpdate

SetNillablePublicSaleOpen sets the "public_sale_open" field if the given value is not nil.

func (*LaunchpadUpdate) SetNillableWhitelistedSaleOpen

func (lu *LaunchpadUpdate) SetNillableWhitelistedSaleOpen(b *bool) *LaunchpadUpdate

SetNillableWhitelistedSaleOpen sets the "whitelisted_sale_open" field if the given value is not nil.

func (*LaunchpadUpdate) SetProject

func (lu *LaunchpadUpdate) SetProject(p *Project) *LaunchpadUpdate

SetProject sets the "project" edge to the Project entity.

func (*LaunchpadUpdate) SetProjectID

func (lu *LaunchpadUpdate) SetProjectID(id int) *LaunchpadUpdate

SetProjectID sets the "project" edge to the Project entity by ID.

func (*LaunchpadUpdate) SetPublicSaleOpen

func (lu *LaunchpadUpdate) SetPublicSaleOpen(b bool) *LaunchpadUpdate

SetPublicSaleOpen sets the "public_sale_open" field.

func (*LaunchpadUpdate) SetWhitelistedSaleOpen

func (lu *LaunchpadUpdate) SetWhitelistedSaleOpen(b bool) *LaunchpadUpdate

SetWhitelistedSaleOpen sets the "whitelisted_sale_open" field.

func (*LaunchpadUpdate) Where

Where appends a list predicates to the LaunchpadUpdate builder.

type LaunchpadUpdateOne

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

LaunchpadUpdateOne is the builder for updating a single Launchpad entity.

func (*LaunchpadUpdateOne) ClearProject

func (luo *LaunchpadUpdateOne) ClearProject() *LaunchpadUpdateOne

ClearProject clears the "project" edge to the Project entity.

func (*LaunchpadUpdateOne) Exec

func (luo *LaunchpadUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LaunchpadUpdateOne) ExecX

func (luo *LaunchpadUpdateOne) ExecX(ctx context.Context)

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

func (*LaunchpadUpdateOne) Mutation

func (luo *LaunchpadUpdateOne) Mutation() *LaunchpadMutation

Mutation returns the LaunchpadMutation object of the builder.

func (*LaunchpadUpdateOne) Save

func (luo *LaunchpadUpdateOne) Save(ctx context.Context) (*Launchpad, error)

Save executes the query and returns the updated Launchpad entity.

func (*LaunchpadUpdateOne) SaveX

func (luo *LaunchpadUpdateOne) SaveX(ctx context.Context) *Launchpad

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

func (*LaunchpadUpdateOne) Select

func (luo *LaunchpadUpdateOne) Select(field string, fields ...string) *LaunchpadUpdateOne

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

func (*LaunchpadUpdateOne) SetIsCanceled

func (luo *LaunchpadUpdateOne) SetIsCanceled(b bool) *LaunchpadUpdateOne

SetIsCanceled sets the "is_canceled" field.

func (*LaunchpadUpdateOne) SetIsReady

func (luo *LaunchpadUpdateOne) SetIsReady(b bool) *LaunchpadUpdateOne

SetIsReady sets the "is_ready" field.

func (*LaunchpadUpdateOne) SetIsSoldOut

func (luo *LaunchpadUpdateOne) SetIsSoldOut(b bool) *LaunchpadUpdateOne

SetIsSoldOut sets the "is_sold_out" field.

func (*LaunchpadUpdateOne) SetMinterContract

func (luo *LaunchpadUpdateOne) SetMinterContract(sc schema.MinterContract) *LaunchpadUpdateOne

SetMinterContract sets the "minter_contract" field.

func (*LaunchpadUpdateOne) SetNillableIsCanceled

func (luo *LaunchpadUpdateOne) SetNillableIsCanceled(b *bool) *LaunchpadUpdateOne

SetNillableIsCanceled sets the "is_canceled" field if the given value is not nil.

func (*LaunchpadUpdateOne) SetNillableIsReady

func (luo *LaunchpadUpdateOne) SetNillableIsReady(b *bool) *LaunchpadUpdateOne

SetNillableIsReady sets the "is_ready" field if the given value is not nil.

func (*LaunchpadUpdateOne) SetNillableIsSoldOut

func (luo *LaunchpadUpdateOne) SetNillableIsSoldOut(b *bool) *LaunchpadUpdateOne

SetNillableIsSoldOut sets the "is_sold_out" field if the given value is not nil.

func (*LaunchpadUpdateOne) SetNillableMinterContract

func (luo *LaunchpadUpdateOne) SetNillableMinterContract(sc *schema.MinterContract) *LaunchpadUpdateOne

SetNillableMinterContract sets the "minter_contract" field if the given value is not nil.

func (*LaunchpadUpdateOne) SetNillablePublicSaleOpen

func (luo *LaunchpadUpdateOne) SetNillablePublicSaleOpen(b *bool) *LaunchpadUpdateOne

SetNillablePublicSaleOpen sets the "public_sale_open" field if the given value is not nil.

func (*LaunchpadUpdateOne) SetNillableWhitelistedSaleOpen

func (luo *LaunchpadUpdateOne) SetNillableWhitelistedSaleOpen(b *bool) *LaunchpadUpdateOne

SetNillableWhitelistedSaleOpen sets the "whitelisted_sale_open" field if the given value is not nil.

func (*LaunchpadUpdateOne) SetProject

func (luo *LaunchpadUpdateOne) SetProject(p *Project) *LaunchpadUpdateOne

SetProject sets the "project" edge to the Project entity.

func (*LaunchpadUpdateOne) SetProjectID

func (luo *LaunchpadUpdateOne) SetProjectID(id int) *LaunchpadUpdateOne

SetProjectID sets the "project" edge to the Project entity by ID.

func (*LaunchpadUpdateOne) SetPublicSaleOpen

func (luo *LaunchpadUpdateOne) SetPublicSaleOpen(b bool) *LaunchpadUpdateOne

SetPublicSaleOpen sets the "public_sale_open" field.

func (*LaunchpadUpdateOne) SetWhitelistedSaleOpen

func (luo *LaunchpadUpdateOne) SetWhitelistedSaleOpen(b bool) *LaunchpadUpdateOne

SetWhitelistedSaleOpen sets the "whitelisted_sale_open" field.

func (*LaunchpadUpdateOne) Where

Where appends a list predicates to the LaunchpadUpdate builder.

type LaunchpadUpsert

type LaunchpadUpsert struct {
	*sql.UpdateSet
}

LaunchpadUpsert is the "OnConflict" setter.

func (*LaunchpadUpsert) SetIsCanceled

func (u *LaunchpadUpsert) SetIsCanceled(v bool) *LaunchpadUpsert

SetIsCanceled sets the "is_canceled" field.

func (*LaunchpadUpsert) SetIsReady

func (u *LaunchpadUpsert) SetIsReady(v bool) *LaunchpadUpsert

SetIsReady sets the "is_ready" field.

func (*LaunchpadUpsert) SetIsSoldOut

func (u *LaunchpadUpsert) SetIsSoldOut(v bool) *LaunchpadUpsert

SetIsSoldOut sets the "is_sold_out" field.

func (*LaunchpadUpsert) SetMinterContract

func (u *LaunchpadUpsert) SetMinterContract(v schema.MinterContract) *LaunchpadUpsert

SetMinterContract sets the "minter_contract" field.

func (*LaunchpadUpsert) SetPublicSaleOpen

func (u *LaunchpadUpsert) SetPublicSaleOpen(v bool) *LaunchpadUpsert

SetPublicSaleOpen sets the "public_sale_open" field.

func (*LaunchpadUpsert) SetWhitelistedSaleOpen

func (u *LaunchpadUpsert) SetWhitelistedSaleOpen(v bool) *LaunchpadUpsert

SetWhitelistedSaleOpen sets the "whitelisted_sale_open" field.

func (*LaunchpadUpsert) UpdateIsCanceled

func (u *LaunchpadUpsert) UpdateIsCanceled() *LaunchpadUpsert

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

func (*LaunchpadUpsert) UpdateIsReady

func (u *LaunchpadUpsert) UpdateIsReady() *LaunchpadUpsert

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

func (*LaunchpadUpsert) UpdateIsSoldOut

func (u *LaunchpadUpsert) UpdateIsSoldOut() *LaunchpadUpsert

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

func (*LaunchpadUpsert) UpdateMinterContract

func (u *LaunchpadUpsert) UpdateMinterContract() *LaunchpadUpsert

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

func (*LaunchpadUpsert) UpdatePublicSaleOpen

func (u *LaunchpadUpsert) UpdatePublicSaleOpen() *LaunchpadUpsert

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

func (*LaunchpadUpsert) UpdateWhitelistedSaleOpen

func (u *LaunchpadUpsert) UpdateWhitelistedSaleOpen() *LaunchpadUpsert

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

type LaunchpadUpsertBulk

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

LaunchpadUpsertBulk is the builder for "upsert"-ing a bulk of Launchpad nodes.

func (*LaunchpadUpsertBulk) DoNothing

func (u *LaunchpadUpsertBulk) DoNothing() *LaunchpadUpsertBulk

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

func (*LaunchpadUpsertBulk) Exec

Exec executes the query.

func (*LaunchpadUpsertBulk) ExecX

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

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

func (*LaunchpadUpsertBulk) Ignore

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

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

func (*LaunchpadUpsertBulk) SetIsCanceled

func (u *LaunchpadUpsertBulk) SetIsCanceled(v bool) *LaunchpadUpsertBulk

SetIsCanceled sets the "is_canceled" field.

func (*LaunchpadUpsertBulk) SetIsReady

func (u *LaunchpadUpsertBulk) SetIsReady(v bool) *LaunchpadUpsertBulk

SetIsReady sets the "is_ready" field.

func (*LaunchpadUpsertBulk) SetIsSoldOut

func (u *LaunchpadUpsertBulk) SetIsSoldOut(v bool) *LaunchpadUpsertBulk

SetIsSoldOut sets the "is_sold_out" field.

func (*LaunchpadUpsertBulk) SetMinterContract

SetMinterContract sets the "minter_contract" field.

func (*LaunchpadUpsertBulk) SetPublicSaleOpen

func (u *LaunchpadUpsertBulk) SetPublicSaleOpen(v bool) *LaunchpadUpsertBulk

SetPublicSaleOpen sets the "public_sale_open" field.

func (*LaunchpadUpsertBulk) SetWhitelistedSaleOpen

func (u *LaunchpadUpsertBulk) SetWhitelistedSaleOpen(v bool) *LaunchpadUpsertBulk

SetWhitelistedSaleOpen sets the "whitelisted_sale_open" field.

func (*LaunchpadUpsertBulk) Update

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

func (*LaunchpadUpsertBulk) UpdateIsCanceled

func (u *LaunchpadUpsertBulk) UpdateIsCanceled() *LaunchpadUpsertBulk

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

func (*LaunchpadUpsertBulk) UpdateIsReady

func (u *LaunchpadUpsertBulk) UpdateIsReady() *LaunchpadUpsertBulk

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

func (*LaunchpadUpsertBulk) UpdateIsSoldOut

func (u *LaunchpadUpsertBulk) UpdateIsSoldOut() *LaunchpadUpsertBulk

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

func (*LaunchpadUpsertBulk) UpdateMinterContract

func (u *LaunchpadUpsertBulk) UpdateMinterContract() *LaunchpadUpsertBulk

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

func (*LaunchpadUpsertBulk) UpdateNewValues

func (u *LaunchpadUpsertBulk) UpdateNewValues() *LaunchpadUpsertBulk

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

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

func (*LaunchpadUpsertBulk) UpdatePublicSaleOpen

func (u *LaunchpadUpsertBulk) UpdatePublicSaleOpen() *LaunchpadUpsertBulk

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

func (*LaunchpadUpsertBulk) UpdateWhitelistedSaleOpen

func (u *LaunchpadUpsertBulk) UpdateWhitelistedSaleOpen() *LaunchpadUpsertBulk

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

type LaunchpadUpsertOne

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

LaunchpadUpsertOne is the builder for "upsert"-ing

one Launchpad node.

func (*LaunchpadUpsertOne) DoNothing

func (u *LaunchpadUpsertOne) DoNothing() *LaunchpadUpsertOne

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

func (*LaunchpadUpsertOne) Exec

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

Exec executes the query.

func (*LaunchpadUpsertOne) ExecX

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

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

func (*LaunchpadUpsertOne) ID

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

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

func (*LaunchpadUpsertOne) IDX

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

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

func (*LaunchpadUpsertOne) Ignore

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

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

func (*LaunchpadUpsertOne) SetIsCanceled

func (u *LaunchpadUpsertOne) SetIsCanceled(v bool) *LaunchpadUpsertOne

SetIsCanceled sets the "is_canceled" field.

func (*LaunchpadUpsertOne) SetIsReady

func (u *LaunchpadUpsertOne) SetIsReady(v bool) *LaunchpadUpsertOne

SetIsReady sets the "is_ready" field.

func (*LaunchpadUpsertOne) SetIsSoldOut

func (u *LaunchpadUpsertOne) SetIsSoldOut(v bool) *LaunchpadUpsertOne

SetIsSoldOut sets the "is_sold_out" field.

func (*LaunchpadUpsertOne) SetMinterContract

SetMinterContract sets the "minter_contract" field.

func (*LaunchpadUpsertOne) SetPublicSaleOpen

func (u *LaunchpadUpsertOne) SetPublicSaleOpen(v bool) *LaunchpadUpsertOne

SetPublicSaleOpen sets the "public_sale_open" field.

func (*LaunchpadUpsertOne) SetWhitelistedSaleOpen

func (u *LaunchpadUpsertOne) SetWhitelistedSaleOpen(v bool) *LaunchpadUpsertOne

SetWhitelistedSaleOpen sets the "whitelisted_sale_open" field.

func (*LaunchpadUpsertOne) Update

func (u *LaunchpadUpsertOne) Update(set func(*LaunchpadUpsert)) *LaunchpadUpsertOne

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

func (*LaunchpadUpsertOne) UpdateIsCanceled

func (u *LaunchpadUpsertOne) UpdateIsCanceled() *LaunchpadUpsertOne

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

func (*LaunchpadUpsertOne) UpdateIsReady

func (u *LaunchpadUpsertOne) UpdateIsReady() *LaunchpadUpsertOne

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

func (*LaunchpadUpsertOne) UpdateIsSoldOut

func (u *LaunchpadUpsertOne) UpdateIsSoldOut() *LaunchpadUpsertOne

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

func (*LaunchpadUpsertOne) UpdateMinterContract

func (u *LaunchpadUpsertOne) UpdateMinterContract() *LaunchpadUpsertOne

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

func (*LaunchpadUpsertOne) UpdateNewValues

func (u *LaunchpadUpsertOne) UpdateNewValues() *LaunchpadUpsertOne

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

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

func (*LaunchpadUpsertOne) UpdatePublicSaleOpen

func (u *LaunchpadUpsertOne) UpdatePublicSaleOpen() *LaunchpadUpsertOne

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

func (*LaunchpadUpsertOne) UpdateWhitelistedSaleOpen

func (u *LaunchpadUpsertOne) UpdateWhitelistedSaleOpen() *LaunchpadUpsertOne

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

type Launchpads

type Launchpads []*Launchpad

Launchpads is a parsable slice of Launchpad.

type Mint

type Mint struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// MinValuePerTx holds the value of the "min_value_per_tx" field.
	MinValuePerTx string `json:"min_value_per_tx,omitempty"`
	// MaxValuePerTx holds the value of the "max_value_per_tx" field.
	MaxValuePerTx string `json:"max_value_per_tx,omitempty"`
	// MinterAddress holds the value of the "minter_address" field.
	MinterAddress string `json:"minter_address,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MintQuery when eager-loading is set.
	Edges MintEdges `json:"edges"`
	// contains filtered or unexported fields
}

Mint is the model entity for the Mint schema.

func (*Mint) IsNode

func (*Mint) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Mint) Project

func (m *Mint) Project(ctx context.Context) (*Project, error)

func (*Mint) QueryProject

func (m *Mint) QueryProject() *ProjectQuery

QueryProject queries the "project" edge of the Mint entity.

func (*Mint) String

func (m *Mint) String() string

String implements the fmt.Stringer.

func (*Mint) ToEdge

func (m *Mint) ToEdge(order *MintOrder) *MintEdge

ToEdge converts Mint into MintEdge.

func (*Mint) Unwrap

func (m *Mint) Unwrap() *Mint

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

func (m *Mint) Update() *MintUpdateOne

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

func (*Mint) Value

func (m *Mint) Value(name string) (ent.Value, error)

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

type MintClient

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

MintClient is a client for the Mint schema.

func NewMintClient

func NewMintClient(c config) *MintClient

NewMintClient returns a client for the Mint from the given config.

func (*MintClient) Create

func (c *MintClient) Create() *MintCreate

Create returns a builder for creating a Mint entity.

func (*MintClient) CreateBulk

func (c *MintClient) CreateBulk(builders ...*MintCreate) *MintCreateBulk

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

func (*MintClient) Delete

func (c *MintClient) Delete() *MintDelete

Delete returns a delete builder for Mint.

func (*MintClient) DeleteOne

func (c *MintClient) DeleteOne(m *Mint) *MintDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MintClient) DeleteOneID

func (c *MintClient) DeleteOneID(id int) *MintDeleteOne

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

func (*MintClient) Get

func (c *MintClient) Get(ctx context.Context, id int) (*Mint, error)

Get returns a Mint entity by its id.

func (*MintClient) GetX

func (c *MintClient) GetX(ctx context.Context, id int) *Mint

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

func (*MintClient) Hooks

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

Hooks returns the client hooks.

func (*MintClient) Intercept

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

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

func (*MintClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MintClient) MapCreateBulk

func (c *MintClient) MapCreateBulk(slice any, setFunc func(*MintCreate, int)) *MintCreateBulk

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

func (c *MintClient) Query() *MintQuery

Query returns a query builder for Mint.

func (*MintClient) QueryProject

func (c *MintClient) QueryProject(m *Mint) *ProjectQuery

QueryProject queries the project edge of a Mint.

func (*MintClient) Update

func (c *MintClient) Update() *MintUpdate

Update returns an update builder for Mint.

func (*MintClient) UpdateOne

func (c *MintClient) UpdateOne(m *Mint) *MintUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MintClient) UpdateOneID

func (c *MintClient) UpdateOneID(id int) *MintUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MintClient) Use

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

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

type MintConnection

type MintConnection struct {
	Edges      []*MintEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

MintConnection is the connection containing edges to Mint.

type MintCreate

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

MintCreate is the builder for creating a Mint entity.

func (*MintCreate) Exec

func (mc *MintCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MintCreate) ExecX

func (mc *MintCreate) ExecX(ctx context.Context)

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

func (*MintCreate) Mutation

func (mc *MintCreate) Mutation() *MintMutation

Mutation returns the MintMutation object of the builder.

func (*MintCreate) OnConflict

func (mc *MintCreate) OnConflict(opts ...sql.ConflictOption) *MintUpsertOne

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

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

func (*MintCreate) OnConflictColumns

func (mc *MintCreate) OnConflictColumns(columns ...string) *MintUpsertOne

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

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

func (*MintCreate) Save

func (mc *MintCreate) Save(ctx context.Context) (*Mint, error)

Save creates the Mint in the database.

func (*MintCreate) SaveX

func (mc *MintCreate) SaveX(ctx context.Context) *Mint

SaveX calls Save and panics if Save returns an error.

func (*MintCreate) SetMaxValuePerTx

func (mc *MintCreate) SetMaxValuePerTx(s string) *MintCreate

SetMaxValuePerTx sets the "max_value_per_tx" field.

func (*MintCreate) SetMinValuePerTx

func (mc *MintCreate) SetMinValuePerTx(s string) *MintCreate

SetMinValuePerTx sets the "min_value_per_tx" field.

func (*MintCreate) SetMinterAddress

func (mc *MintCreate) SetMinterAddress(s string) *MintCreate

SetMinterAddress sets the "minter_address" field.

func (*MintCreate) SetProject

func (mc *MintCreate) SetProject(p *Project) *MintCreate

SetProject sets the "project" edge to the Project entity.

func (*MintCreate) SetProjectID

func (mc *MintCreate) SetProjectID(id int) *MintCreate

SetProjectID sets the "project" edge to the Project entity by ID.

type MintCreateBulk

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

MintCreateBulk is the builder for creating many Mint entities in bulk.

func (*MintCreateBulk) Exec

func (mcb *MintCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MintCreateBulk) ExecX

func (mcb *MintCreateBulk) ExecX(ctx context.Context)

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

func (*MintCreateBulk) OnConflict

func (mcb *MintCreateBulk) OnConflict(opts ...sql.ConflictOption) *MintUpsertBulk

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

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

func (*MintCreateBulk) OnConflictColumns

func (mcb *MintCreateBulk) OnConflictColumns(columns ...string) *MintUpsertBulk

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

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

func (*MintCreateBulk) Save

func (mcb *MintCreateBulk) Save(ctx context.Context) ([]*Mint, error)

Save creates the Mint entities in the database.

func (*MintCreateBulk) SaveX

func (mcb *MintCreateBulk) SaveX(ctx context.Context) []*Mint

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

type MintDelete

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

MintDelete is the builder for deleting a Mint entity.

func (*MintDelete) Exec

func (md *MintDelete) Exec(ctx context.Context) (int, error)

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

func (*MintDelete) ExecX

func (md *MintDelete) ExecX(ctx context.Context) int

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

func (*MintDelete) Where

func (md *MintDelete) Where(ps ...predicate.Mint) *MintDelete

Where appends a list predicates to the MintDelete builder.

type MintDeleteOne

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

MintDeleteOne is the builder for deleting a single Mint entity.

func (*MintDeleteOne) Exec

func (mdo *MintDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MintDeleteOne) ExecX

func (mdo *MintDeleteOne) ExecX(ctx context.Context)

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

func (*MintDeleteOne) Where

func (mdo *MintDeleteOne) Where(ps ...predicate.Mint) *MintDeleteOne

Where appends a list predicates to the MintDelete builder.

type MintEdge

type MintEdge struct {
	Node   *Mint  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

MintEdge is the edge representation of Mint.

type MintEdges

type MintEdges struct {
	// Project holds the value of the project edge.
	Project *Project `json:"project,omitempty"`
	// contains filtered or unexported fields
}

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

func (MintEdges) ProjectOrErr

func (e MintEdges) ProjectOrErr() (*Project, error)

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

type MintGroupBy

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

MintGroupBy is the group-by builder for Mint entities.

func (*MintGroupBy) Aggregate

func (mgb *MintGroupBy) Aggregate(fns ...AggregateFunc) *MintGroupBy

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

func (*MintGroupBy) Bool

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

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

func (*MintGroupBy) BoolX

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

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

func (*MintGroupBy) Bools

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

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

func (*MintGroupBy) BoolsX

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

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

func (*MintGroupBy) Float64

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

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

func (*MintGroupBy) Float64X

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

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

func (*MintGroupBy) Float64s

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

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

func (*MintGroupBy) Float64sX

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

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

func (*MintGroupBy) Int

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

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

func (*MintGroupBy) IntX

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

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

func (*MintGroupBy) Ints

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

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

func (*MintGroupBy) IntsX

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

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

func (*MintGroupBy) Scan

func (mgb *MintGroupBy) Scan(ctx context.Context, v any) error

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

func (*MintGroupBy) ScanX

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

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

func (*MintGroupBy) String

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

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

func (*MintGroupBy) StringX

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

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

func (*MintGroupBy) Strings

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

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

func (*MintGroupBy) StringsX

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

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

type MintMutation

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

MintMutation represents an operation that mutates the Mint nodes in the graph.

func (*MintMutation) AddField

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

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

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

func (*MintMutation) AddedField

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

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

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

func (*MintMutation) AddedIDs

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

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

func (*MintMutation) ClearEdge

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

func (m *MintMutation) 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 (*MintMutation) ClearProject

func (m *MintMutation) ClearProject()

ClearProject clears the "project" edge to the Project entity.

func (*MintMutation) ClearedEdges

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

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

func (*MintMutation) ClearedFields

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

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

func (MintMutation) Client

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

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

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

func (*MintMutation) Field

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

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

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

func (*MintMutation) Fields

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

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

func (m *MintMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MintMutation) MaxValuePerTx

func (m *MintMutation) MaxValuePerTx() (r string, exists bool)

MaxValuePerTx returns the value of the "max_value_per_tx" field in the mutation.

func (*MintMutation) MinValuePerTx

func (m *MintMutation) MinValuePerTx() (r string, exists bool)

MinValuePerTx returns the value of the "min_value_per_tx" field in the mutation.

func (*MintMutation) MinterAddress

func (m *MintMutation) MinterAddress() (r string, exists bool)

MinterAddress returns the value of the "minter_address" field in the mutation.

func (*MintMutation) OldField

func (m *MintMutation) 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 (*MintMutation) OldMaxValuePerTx

func (m *MintMutation) OldMaxValuePerTx(ctx context.Context) (v string, err error)

OldMaxValuePerTx returns the old "max_value_per_tx" field's value of the Mint entity. If the Mint 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 (*MintMutation) OldMinValuePerTx

func (m *MintMutation) OldMinValuePerTx(ctx context.Context) (v string, err error)

OldMinValuePerTx returns the old "min_value_per_tx" field's value of the Mint entity. If the Mint 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 (*MintMutation) OldMinterAddress

func (m *MintMutation) OldMinterAddress(ctx context.Context) (v string, err error)

OldMinterAddress returns the old "minter_address" field's value of the Mint entity. If the Mint 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 (*MintMutation) Op

func (m *MintMutation) Op() Op

Op returns the operation name.

func (*MintMutation) ProjectCleared

func (m *MintMutation) ProjectCleared() bool

ProjectCleared reports if the "project" edge to the Project entity was cleared.

func (*MintMutation) ProjectID

func (m *MintMutation) ProjectID() (id int, exists bool)

ProjectID returns the "project" edge ID in the mutation.

func (*MintMutation) ProjectIDs

func (m *MintMutation) ProjectIDs() (ids []int)

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

func (*MintMutation) RemovedEdges

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

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

func (*MintMutation) RemovedIDs

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

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

func (m *MintMutation) 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 (*MintMutation) ResetMaxValuePerTx

func (m *MintMutation) ResetMaxValuePerTx()

ResetMaxValuePerTx resets all changes to the "max_value_per_tx" field.

func (*MintMutation) ResetMinValuePerTx

func (m *MintMutation) ResetMinValuePerTx()

ResetMinValuePerTx resets all changes to the "min_value_per_tx" field.

func (*MintMutation) ResetMinterAddress

func (m *MintMutation) ResetMinterAddress()

ResetMinterAddress resets all changes to the "minter_address" field.

func (*MintMutation) ResetProject

func (m *MintMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*MintMutation) SetField

func (m *MintMutation) 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 (*MintMutation) SetMaxValuePerTx

func (m *MintMutation) SetMaxValuePerTx(s string)

SetMaxValuePerTx sets the "max_value_per_tx" field.

func (*MintMutation) SetMinValuePerTx

func (m *MintMutation) SetMinValuePerTx(s string)

SetMinValuePerTx sets the "min_value_per_tx" field.

func (*MintMutation) SetMinterAddress

func (m *MintMutation) SetMinterAddress(s string)

SetMinterAddress sets the "minter_address" field.

func (*MintMutation) SetOp

func (m *MintMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MintMutation) SetProjectID

func (m *MintMutation) SetProjectID(id int)

SetProjectID sets the "project" edge to the Project entity by id.

func (MintMutation) Tx

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

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

func (*MintMutation) Type

func (m *MintMutation) Type() string

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

func (*MintMutation) Where

func (m *MintMutation) Where(ps ...predicate.Mint)

Where appends a list predicates to the MintMutation builder.

func (*MintMutation) WhereP

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

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

type MintOrder

type MintOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *MintOrderField `json:"field"`
}

MintOrder defines the ordering of Mint.

type MintOrderField

type MintOrderField struct {
	// Value extracts the ordering value from the given Mint.
	Value func(*Mint) (ent.Value, error)
	// contains filtered or unexported fields
}

MintOrderField defines the ordering field of Mint.

type MintPaginateOption

type MintPaginateOption func(*mintPager) error

MintPaginateOption enables pagination customization.

func WithMintFilter

func WithMintFilter(filter func(*MintQuery) (*MintQuery, error)) MintPaginateOption

WithMintFilter configures pagination filter.

func WithMintOrder

func WithMintOrder(order *MintOrder) MintPaginateOption

WithMintOrder configures pagination ordering.

type MintQuery

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

MintQuery is the builder for querying Mint entities.

func (*MintQuery) Aggregate

func (mq *MintQuery) Aggregate(fns ...AggregateFunc) *MintSelect

Aggregate returns a MintSelect configured with the given aggregations.

func (*MintQuery) All

func (mq *MintQuery) All(ctx context.Context) ([]*Mint, error)

All executes the query and returns a list of Mints.

func (*MintQuery) AllX

func (mq *MintQuery) AllX(ctx context.Context) []*Mint

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

func (*MintQuery) Clone

func (mq *MintQuery) Clone() *MintQuery

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

func (*MintQuery) CollectFields

func (m *MintQuery) CollectFields(ctx context.Context, satisfies ...string) (*MintQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MintQuery) Count

func (mq *MintQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MintQuery) CountX

func (mq *MintQuery) CountX(ctx context.Context) int

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

func (*MintQuery) Exist

func (mq *MintQuery) Exist(ctx context.Context) (bool, error)

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

func (*MintQuery) ExistX

func (mq *MintQuery) ExistX(ctx context.Context) bool

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

func (*MintQuery) First

func (mq *MintQuery) First(ctx context.Context) (*Mint, error)

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

func (*MintQuery) FirstID

func (mq *MintQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MintQuery) FirstIDX

func (mq *MintQuery) FirstIDX(ctx context.Context) int

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

func (*MintQuery) FirstX

func (mq *MintQuery) FirstX(ctx context.Context) *Mint

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

func (*MintQuery) GroupBy

func (mq *MintQuery) GroupBy(field string, fields ...string) *MintGroupBy

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

client.Mint.Query().
	GroupBy(mint.FieldMinValuePerTx).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MintQuery) IDs

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

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

func (*MintQuery) IDsX

func (mq *MintQuery) IDsX(ctx context.Context) []int

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

func (*MintQuery) Limit

func (mq *MintQuery) Limit(limit int) *MintQuery

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

func (*MintQuery) Offset

func (mq *MintQuery) Offset(offset int) *MintQuery

Offset to start from.

func (*MintQuery) Only

func (mq *MintQuery) Only(ctx context.Context) (*Mint, error)

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

func (*MintQuery) OnlyID

func (mq *MintQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MintQuery) OnlyIDX

func (mq *MintQuery) OnlyIDX(ctx context.Context) int

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

func (*MintQuery) OnlyX

func (mq *MintQuery) OnlyX(ctx context.Context) *Mint

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

func (*MintQuery) Order

func (mq *MintQuery) Order(o ...mint.OrderOption) *MintQuery

Order specifies how the records should be ordered.

func (*MintQuery) Paginate

func (m *MintQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MintPaginateOption,
) (*MintConnection, error)

Paginate executes the query and returns a relay based cursor connection to Mint.

func (*MintQuery) QueryProject

func (mq *MintQuery) QueryProject() *ProjectQuery

QueryProject chains the current query on the "project" edge.

func (*MintQuery) Select

func (mq *MintQuery) Select(fields ...string) *MintSelect

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

client.Mint.Query().
	Select(mint.FieldMinValuePerTx).
	Scan(ctx, &v)

func (*MintQuery) Unique

func (mq *MintQuery) Unique(unique bool) *MintQuery

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

func (mq *MintQuery) Where(ps ...predicate.Mint) *MintQuery

Where adds a new predicate for the MintQuery builder.

func (*MintQuery) WithProject

func (mq *MintQuery) WithProject(opts ...func(*ProjectQuery)) *MintQuery

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

type MintSelect

type MintSelect struct {
	*MintQuery
	// contains filtered or unexported fields
}

MintSelect is the builder for selecting fields of Mint entities.

func (*MintSelect) Aggregate

func (ms *MintSelect) Aggregate(fns ...AggregateFunc) *MintSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MintSelect) Bool

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

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

func (*MintSelect) BoolX

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

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

func (*MintSelect) Bools

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

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

func (*MintSelect) BoolsX

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

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

func (*MintSelect) Float64

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

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

func (*MintSelect) Float64X

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

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

func (*MintSelect) Float64s

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

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

func (*MintSelect) Float64sX

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

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

func (*MintSelect) Int

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

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

func (*MintSelect) IntX

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

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

func (*MintSelect) Ints

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

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

func (*MintSelect) IntsX

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

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

func (*MintSelect) Scan

func (ms *MintSelect) Scan(ctx context.Context, v any) error

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

func (*MintSelect) ScanX

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

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

func (*MintSelect) String

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

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

func (*MintSelect) StringX

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

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

func (*MintSelect) Strings

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

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

func (*MintSelect) StringsX

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

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

type MintUpdate

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

MintUpdate is the builder for updating Mint entities.

func (*MintUpdate) ClearProject

func (mu *MintUpdate) ClearProject() *MintUpdate

ClearProject clears the "project" edge to the Project entity.

func (*MintUpdate) Exec

func (mu *MintUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MintUpdate) ExecX

func (mu *MintUpdate) ExecX(ctx context.Context)

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

func (*MintUpdate) Mutation

func (mu *MintUpdate) Mutation() *MintMutation

Mutation returns the MintMutation object of the builder.

func (*MintUpdate) Save

func (mu *MintUpdate) Save(ctx context.Context) (int, error)

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

func (*MintUpdate) SaveX

func (mu *MintUpdate) SaveX(ctx context.Context) int

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

func (*MintUpdate) SetMaxValuePerTx

func (mu *MintUpdate) SetMaxValuePerTx(s string) *MintUpdate

SetMaxValuePerTx sets the "max_value_per_tx" field.

func (*MintUpdate) SetMinValuePerTx

func (mu *MintUpdate) SetMinValuePerTx(s string) *MintUpdate

SetMinValuePerTx sets the "min_value_per_tx" field.

func (*MintUpdate) SetMinterAddress

func (mu *MintUpdate) SetMinterAddress(s string) *MintUpdate

SetMinterAddress sets the "minter_address" field.

func (*MintUpdate) SetNillableMaxValuePerTx

func (mu *MintUpdate) SetNillableMaxValuePerTx(s *string) *MintUpdate

SetNillableMaxValuePerTx sets the "max_value_per_tx" field if the given value is not nil.

func (*MintUpdate) SetNillableMinValuePerTx

func (mu *MintUpdate) SetNillableMinValuePerTx(s *string) *MintUpdate

SetNillableMinValuePerTx sets the "min_value_per_tx" field if the given value is not nil.

func (*MintUpdate) SetNillableMinterAddress

func (mu *MintUpdate) SetNillableMinterAddress(s *string) *MintUpdate

SetNillableMinterAddress sets the "minter_address" field if the given value is not nil.

func (*MintUpdate) SetProject

func (mu *MintUpdate) SetProject(p *Project) *MintUpdate

SetProject sets the "project" edge to the Project entity.

func (*MintUpdate) SetProjectID

func (mu *MintUpdate) SetProjectID(id int) *MintUpdate

SetProjectID sets the "project" edge to the Project entity by ID.

func (*MintUpdate) Where

func (mu *MintUpdate) Where(ps ...predicate.Mint) *MintUpdate

Where appends a list predicates to the MintUpdate builder.

type MintUpdateOne

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

MintUpdateOne is the builder for updating a single Mint entity.

func (*MintUpdateOne) ClearProject

func (muo *MintUpdateOne) ClearProject() *MintUpdateOne

ClearProject clears the "project" edge to the Project entity.

func (*MintUpdateOne) Exec

func (muo *MintUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MintUpdateOne) ExecX

func (muo *MintUpdateOne) ExecX(ctx context.Context)

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

func (*MintUpdateOne) Mutation

func (muo *MintUpdateOne) Mutation() *MintMutation

Mutation returns the MintMutation object of the builder.

func (*MintUpdateOne) Save

func (muo *MintUpdateOne) Save(ctx context.Context) (*Mint, error)

Save executes the query and returns the updated Mint entity.

func (*MintUpdateOne) SaveX

func (muo *MintUpdateOne) SaveX(ctx context.Context) *Mint

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

func (*MintUpdateOne) Select

func (muo *MintUpdateOne) Select(field string, fields ...string) *MintUpdateOne

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

func (*MintUpdateOne) SetMaxValuePerTx

func (muo *MintUpdateOne) SetMaxValuePerTx(s string) *MintUpdateOne

SetMaxValuePerTx sets the "max_value_per_tx" field.

func (*MintUpdateOne) SetMinValuePerTx

func (muo *MintUpdateOne) SetMinValuePerTx(s string) *MintUpdateOne

SetMinValuePerTx sets the "min_value_per_tx" field.

func (*MintUpdateOne) SetMinterAddress

func (muo *MintUpdateOne) SetMinterAddress(s string) *MintUpdateOne

SetMinterAddress sets the "minter_address" field.

func (*MintUpdateOne) SetNillableMaxValuePerTx

func (muo *MintUpdateOne) SetNillableMaxValuePerTx(s *string) *MintUpdateOne

SetNillableMaxValuePerTx sets the "max_value_per_tx" field if the given value is not nil.

func (*MintUpdateOne) SetNillableMinValuePerTx

func (muo *MintUpdateOne) SetNillableMinValuePerTx(s *string) *MintUpdateOne

SetNillableMinValuePerTx sets the "min_value_per_tx" field if the given value is not nil.

func (*MintUpdateOne) SetNillableMinterAddress

func (muo *MintUpdateOne) SetNillableMinterAddress(s *string) *MintUpdateOne

SetNillableMinterAddress sets the "minter_address" field if the given value is not nil.

func (*MintUpdateOne) SetProject

func (muo *MintUpdateOne) SetProject(p *Project) *MintUpdateOne

SetProject sets the "project" edge to the Project entity.

func (*MintUpdateOne) SetProjectID

func (muo *MintUpdateOne) SetProjectID(id int) *MintUpdateOne

SetProjectID sets the "project" edge to the Project entity by ID.

func (*MintUpdateOne) Where

func (muo *MintUpdateOne) Where(ps ...predicate.Mint) *MintUpdateOne

Where appends a list predicates to the MintUpdate builder.

type MintUpsert

type MintUpsert struct {
	*sql.UpdateSet
}

MintUpsert is the "OnConflict" setter.

func (*MintUpsert) SetMaxValuePerTx

func (u *MintUpsert) SetMaxValuePerTx(v string) *MintUpsert

SetMaxValuePerTx sets the "max_value_per_tx" field.

func (*MintUpsert) SetMinValuePerTx

func (u *MintUpsert) SetMinValuePerTx(v string) *MintUpsert

SetMinValuePerTx sets the "min_value_per_tx" field.

func (*MintUpsert) SetMinterAddress

func (u *MintUpsert) SetMinterAddress(v string) *MintUpsert

SetMinterAddress sets the "minter_address" field.

func (*MintUpsert) UpdateMaxValuePerTx

func (u *MintUpsert) UpdateMaxValuePerTx() *MintUpsert

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

func (*MintUpsert) UpdateMinValuePerTx

func (u *MintUpsert) UpdateMinValuePerTx() *MintUpsert

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

func (*MintUpsert) UpdateMinterAddress

func (u *MintUpsert) UpdateMinterAddress() *MintUpsert

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

type MintUpsertBulk

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

MintUpsertBulk is the builder for "upsert"-ing a bulk of Mint nodes.

func (*MintUpsertBulk) DoNothing

func (u *MintUpsertBulk) DoNothing() *MintUpsertBulk

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

func (*MintUpsertBulk) Exec

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

Exec executes the query.

func (*MintUpsertBulk) ExecX

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

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

func (*MintUpsertBulk) Ignore

func (u *MintUpsertBulk) Ignore() *MintUpsertBulk

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

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

func (*MintUpsertBulk) SetMaxValuePerTx

func (u *MintUpsertBulk) SetMaxValuePerTx(v string) *MintUpsertBulk

SetMaxValuePerTx sets the "max_value_per_tx" field.

func (*MintUpsertBulk) SetMinValuePerTx

func (u *MintUpsertBulk) SetMinValuePerTx(v string) *MintUpsertBulk

SetMinValuePerTx sets the "min_value_per_tx" field.

func (*MintUpsertBulk) SetMinterAddress

func (u *MintUpsertBulk) SetMinterAddress(v string) *MintUpsertBulk

SetMinterAddress sets the "minter_address" field.

func (*MintUpsertBulk) Update

func (u *MintUpsertBulk) Update(set func(*MintUpsert)) *MintUpsertBulk

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

func (*MintUpsertBulk) UpdateMaxValuePerTx

func (u *MintUpsertBulk) UpdateMaxValuePerTx() *MintUpsertBulk

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

func (*MintUpsertBulk) UpdateMinValuePerTx

func (u *MintUpsertBulk) UpdateMinValuePerTx() *MintUpsertBulk

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

func (*MintUpsertBulk) UpdateMinterAddress

func (u *MintUpsertBulk) UpdateMinterAddress() *MintUpsertBulk

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

func (*MintUpsertBulk) UpdateNewValues

func (u *MintUpsertBulk) UpdateNewValues() *MintUpsertBulk

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

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

type MintUpsertOne

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

MintUpsertOne is the builder for "upsert"-ing

one Mint node.

func (*MintUpsertOne) DoNothing

func (u *MintUpsertOne) DoNothing() *MintUpsertOne

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

func (*MintUpsertOne) Exec

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

Exec executes the query.

func (*MintUpsertOne) ExecX

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

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

func (*MintUpsertOne) ID

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

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

func (*MintUpsertOne) IDX

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

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

func (*MintUpsertOne) Ignore

func (u *MintUpsertOne) Ignore() *MintUpsertOne

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

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

func (*MintUpsertOne) SetMaxValuePerTx

func (u *MintUpsertOne) SetMaxValuePerTx(v string) *MintUpsertOne

SetMaxValuePerTx sets the "max_value_per_tx" field.

func (*MintUpsertOne) SetMinValuePerTx

func (u *MintUpsertOne) SetMinValuePerTx(v string) *MintUpsertOne

SetMinValuePerTx sets the "min_value_per_tx" field.

func (*MintUpsertOne) SetMinterAddress

func (u *MintUpsertOne) SetMinterAddress(v string) *MintUpsertOne

SetMinterAddress sets the "minter_address" field.

func (*MintUpsertOne) Update

func (u *MintUpsertOne) Update(set func(*MintUpsert)) *MintUpsertOne

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

func (*MintUpsertOne) UpdateMaxValuePerTx

func (u *MintUpsertOne) UpdateMaxValuePerTx() *MintUpsertOne

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

func (*MintUpsertOne) UpdateMinValuePerTx

func (u *MintUpsertOne) UpdateMinValuePerTx() *MintUpsertOne

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

func (*MintUpsertOne) UpdateMinterAddress

func (u *MintUpsertOne) UpdateMinterAddress() *MintUpsertOne

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

func (*MintUpsertOne) UpdateNewValues

func (u *MintUpsertOne) UpdateNewValues() *MintUpsertOne

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

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

type Mints

type Mints []*Mint

Mints is a parsable slice of Mint.

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 NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

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 OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

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 PageInfo

type PageInfo = entgql.PageInfo[int]

Common entgql types.

type Policy

type Policy = ent.Policy

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

type Project

type Project struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Address holds the value of the "address" field.
	Address string `json:"address,omitempty"`
	// Slot holds the value of the "slot" field.
	Slot int `json:"slot,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Slug holds the value of the "slug" field.
	Slug string `json:"slug,omitempty"`
	// ValueDecimal holds the value of the "value_decimal" field.
	ValueDecimal int `json:"value_decimal,omitempty"`
	// ForecastedApr holds the value of the "forecasted_apr" field.
	ForecastedApr string `json:"forecasted_apr,omitempty"`
	// TotalValue holds the value of the "total_value" field.
	TotalValue string `json:"total_value,omitempty"`
	// PaymentToken holds the value of the "payment_token" field.
	PaymentToken schema.PaymentToken `json:"payment_token,omitempty"`
	// Metadata holds the value of the "metadata" field.
	Metadata schema.Metadata `json:"metadata,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProjectQuery when eager-loading is set.
	Edges ProjectEdges `json:"edges"`
	// contains filtered or unexported fields
}

Project is the model entity for the Project schema.

func (*Project) IsNode

func (*Project) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Project) Launchpad

func (pr *Project) Launchpad(ctx context.Context) (*Launchpad, error)

func (*Project) Mint

func (pr *Project) Mint(ctx context.Context) (*Mint, error)

func (*Project) QueryLaunchpad

func (pr *Project) QueryLaunchpad() *LaunchpadQuery

QueryLaunchpad queries the "launchpad" edge of the Project entity.

func (*Project) QueryMint

func (pr *Project) QueryMint() *MintQuery

QueryMint queries the "mint" edge of the Project entity.

func (*Project) String

func (pr *Project) String() string

String implements the fmt.Stringer.

func (*Project) ToEdge

func (pr *Project) ToEdge(order *ProjectOrder) *ProjectEdge

ToEdge converts Project into ProjectEdge.

func (*Project) Unwrap

func (pr *Project) Unwrap() *Project

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

func (pr *Project) Update() *ProjectUpdateOne

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

func (*Project) Value

func (pr *Project) Value(name string) (ent.Value, error)

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

type ProjectClient

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

ProjectClient is a client for the Project schema.

func NewProjectClient

func NewProjectClient(c config) *ProjectClient

NewProjectClient returns a client for the Project from the given config.

func (*ProjectClient) Create

func (c *ProjectClient) Create() *ProjectCreate

Create returns a builder for creating a Project entity.

func (*ProjectClient) CreateBulk

func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk

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

func (*ProjectClient) Delete

func (c *ProjectClient) Delete() *ProjectDelete

Delete returns a delete builder for Project.

func (*ProjectClient) DeleteOne

func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProjectClient) DeleteOneID

func (c *ProjectClient) DeleteOneID(id int) *ProjectDeleteOne

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

func (*ProjectClient) Get

func (c *ProjectClient) Get(ctx context.Context, id int) (*Project, error)

Get returns a Project entity by its id.

func (*ProjectClient) GetX

func (c *ProjectClient) GetX(ctx context.Context, id int) *Project

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

func (*ProjectClient) Hooks

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

Hooks returns the client hooks.

func (*ProjectClient) Intercept

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

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

func (*ProjectClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ProjectClient) MapCreateBulk

func (c *ProjectClient) MapCreateBulk(slice any, setFunc func(*ProjectCreate, int)) *ProjectCreateBulk

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

func (c *ProjectClient) Query() *ProjectQuery

Query returns a query builder for Project.

func (*ProjectClient) QueryLaunchpad

func (c *ProjectClient) QueryLaunchpad(pr *Project) *LaunchpadQuery

QueryLaunchpad queries the launchpad edge of a Project.

func (*ProjectClient) QueryMint

func (c *ProjectClient) QueryMint(pr *Project) *MintQuery

QueryMint queries the mint edge of a Project.

func (*ProjectClient) Update

func (c *ProjectClient) Update() *ProjectUpdate

Update returns an update builder for Project.

func (*ProjectClient) UpdateOne

func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProjectClient) UpdateOneID

func (c *ProjectClient) UpdateOneID(id int) *ProjectUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProjectClient) Use

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

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

type ProjectConnection

type ProjectConnection struct {
	Edges      []*ProjectEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

ProjectConnection is the connection containing edges to Project.

type ProjectCreate

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

ProjectCreate is the builder for creating a Project entity.

func (*ProjectCreate) Exec

func (pc *ProjectCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreate) ExecX

func (pc *ProjectCreate) ExecX(ctx context.Context)

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

func (*ProjectCreate) Mutation

func (pc *ProjectCreate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectCreate) OnConflict

func (pc *ProjectCreate) OnConflict(opts ...sql.ConflictOption) *ProjectUpsertOne

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

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

func (*ProjectCreate) OnConflictColumns

func (pc *ProjectCreate) OnConflictColumns(columns ...string) *ProjectUpsertOne

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

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

func (*ProjectCreate) Save

func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)

Save creates the Project in the database.

func (*ProjectCreate) SaveX

func (pc *ProjectCreate) SaveX(ctx context.Context) *Project

SaveX calls Save and panics if Save returns an error.

func (*ProjectCreate) SetAddress

func (pc *ProjectCreate) SetAddress(s string) *ProjectCreate

SetAddress sets the "address" field.

func (*ProjectCreate) SetForecastedApr

func (pc *ProjectCreate) SetForecastedApr(s string) *ProjectCreate

SetForecastedApr sets the "forecasted_apr" field.

func (*ProjectCreate) SetLaunchpad

func (pc *ProjectCreate) SetLaunchpad(l *Launchpad) *ProjectCreate

SetLaunchpad sets the "launchpad" edge to the Launchpad entity.

func (*ProjectCreate) SetLaunchpadID

func (pc *ProjectCreate) SetLaunchpadID(id int) *ProjectCreate

SetLaunchpadID sets the "launchpad" edge to the Launchpad entity by ID.

func (*ProjectCreate) SetMetadata

func (pc *ProjectCreate) SetMetadata(s schema.Metadata) *ProjectCreate

SetMetadata sets the "metadata" field.

func (*ProjectCreate) SetMint

func (pc *ProjectCreate) SetMint(m *Mint) *ProjectCreate

SetMint sets the "mint" edge to the Mint entity.

func (*ProjectCreate) SetMintID

func (pc *ProjectCreate) SetMintID(id int) *ProjectCreate

SetMintID sets the "mint" edge to the Mint entity by ID.

func (*ProjectCreate) SetName

func (pc *ProjectCreate) SetName(s string) *ProjectCreate

SetName sets the "name" field.

func (*ProjectCreate) SetNillableForecastedApr

func (pc *ProjectCreate) SetNillableForecastedApr(s *string) *ProjectCreate

SetNillableForecastedApr sets the "forecasted_apr" field if the given value is not nil.

func (*ProjectCreate) SetNillableLaunchpadID

func (pc *ProjectCreate) SetNillableLaunchpadID(id *int) *ProjectCreate

SetNillableLaunchpadID sets the "launchpad" edge to the Launchpad entity by ID if the given value is not nil.

func (*ProjectCreate) SetNillableMintID

func (pc *ProjectCreate) SetNillableMintID(id *int) *ProjectCreate

SetNillableMintID sets the "mint" edge to the Mint entity by ID if the given value is not nil.

func (*ProjectCreate) SetPaymentToken

func (pc *ProjectCreate) SetPaymentToken(st schema.PaymentToken) *ProjectCreate

SetPaymentToken sets the "payment_token" field.

func (*ProjectCreate) SetSlot

func (pc *ProjectCreate) SetSlot(i int) *ProjectCreate

SetSlot sets the "slot" field.

func (*ProjectCreate) SetSlug

func (pc *ProjectCreate) SetSlug(s string) *ProjectCreate

SetSlug sets the "slug" field.

func (*ProjectCreate) SetTotalValue

func (pc *ProjectCreate) SetTotalValue(s string) *ProjectCreate

SetTotalValue sets the "total_value" field.

func (*ProjectCreate) SetValueDecimal

func (pc *ProjectCreate) SetValueDecimal(i int) *ProjectCreate

SetValueDecimal sets the "value_decimal" field.

type ProjectCreateBulk

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

ProjectCreateBulk is the builder for creating many Project entities in bulk.

func (*ProjectCreateBulk) Exec

func (pcb *ProjectCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreateBulk) ExecX

func (pcb *ProjectCreateBulk) ExecX(ctx context.Context)

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

func (*ProjectCreateBulk) OnConflict

func (pcb *ProjectCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProjectUpsertBulk

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

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

func (*ProjectCreateBulk) OnConflictColumns

func (pcb *ProjectCreateBulk) OnConflictColumns(columns ...string) *ProjectUpsertBulk

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

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

func (*ProjectCreateBulk) Save

func (pcb *ProjectCreateBulk) Save(ctx context.Context) ([]*Project, error)

Save creates the Project entities in the database.

func (*ProjectCreateBulk) SaveX

func (pcb *ProjectCreateBulk) SaveX(ctx context.Context) []*Project

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

type ProjectDelete

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

ProjectDelete is the builder for deleting a Project entity.

func (*ProjectDelete) Exec

func (pd *ProjectDelete) Exec(ctx context.Context) (int, error)

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

func (*ProjectDelete) ExecX

func (pd *ProjectDelete) ExecX(ctx context.Context) int

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

func (*ProjectDelete) Where

func (pd *ProjectDelete) Where(ps ...predicate.Project) *ProjectDelete

Where appends a list predicates to the ProjectDelete builder.

type ProjectDeleteOne

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

ProjectDeleteOne is the builder for deleting a single Project entity.

func (*ProjectDeleteOne) Exec

func (pdo *ProjectDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProjectDeleteOne) ExecX

func (pdo *ProjectDeleteOne) ExecX(ctx context.Context)

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

func (*ProjectDeleteOne) Where

Where appends a list predicates to the ProjectDelete builder.

type ProjectEdge

type ProjectEdge struct {
	Node   *Project `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

ProjectEdge is the edge representation of Project.

type ProjectEdges

type ProjectEdges struct {
	// Mint holds the value of the mint edge.
	Mint *Mint `json:"mint,omitempty"`
	// Launchpad holds the value of the launchpad edge.
	Launchpad *Launchpad `json:"launchpad,omitempty"`
	// contains filtered or unexported fields
}

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

func (ProjectEdges) LaunchpadOrErr

func (e ProjectEdges) LaunchpadOrErr() (*Launchpad, error)

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

func (ProjectEdges) MintOrErr

func (e ProjectEdges) MintOrErr() (*Mint, error)

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

type ProjectGroupBy

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

ProjectGroupBy is the group-by builder for Project entities.

func (*ProjectGroupBy) Aggregate

func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy

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

func (*ProjectGroupBy) Bool

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

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

func (*ProjectGroupBy) BoolX

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

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

func (*ProjectGroupBy) Bools

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

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

func (*ProjectGroupBy) BoolsX

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

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

func (*ProjectGroupBy) Float64

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

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

func (*ProjectGroupBy) Float64X

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

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

func (*ProjectGroupBy) Float64s

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

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

func (*ProjectGroupBy) Float64sX

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

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

func (*ProjectGroupBy) Int

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

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

func (*ProjectGroupBy) IntX

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

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

func (*ProjectGroupBy) Ints

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

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

func (*ProjectGroupBy) IntsX

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

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

func (*ProjectGroupBy) Scan

func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error

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

func (*ProjectGroupBy) ScanX

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

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

func (*ProjectGroupBy) String

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

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

func (*ProjectGroupBy) StringX

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

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

func (*ProjectGroupBy) Strings

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

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

func (*ProjectGroupBy) StringsX

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

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

type ProjectMutation

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

ProjectMutation represents an operation that mutates the Project nodes in the graph.

func (*ProjectMutation) AddField

func (m *ProjectMutation) 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 (*ProjectMutation) AddSlot

func (m *ProjectMutation) AddSlot(i int)

AddSlot adds i to the "slot" field.

func (*ProjectMutation) AddValueDecimal

func (m *ProjectMutation) AddValueDecimal(i int)

AddValueDecimal adds i to the "value_decimal" field.

func (*ProjectMutation) AddedEdges

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

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

func (*ProjectMutation) AddedField

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

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

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

func (*ProjectMutation) AddedIDs

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

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

func (*ProjectMutation) AddedSlot

func (m *ProjectMutation) AddedSlot() (r int, exists bool)

AddedSlot returns the value that was added to the "slot" field in this mutation.

func (*ProjectMutation) AddedValueDecimal

func (m *ProjectMutation) AddedValueDecimal() (r int, exists bool)

AddedValueDecimal returns the value that was added to the "value_decimal" field in this mutation.

func (*ProjectMutation) Address

func (m *ProjectMutation) Address() (r string, exists bool)

Address returns the value of the "address" field in the mutation.

func (*ProjectMutation) ClearEdge

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

func (m *ProjectMutation) 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 (*ProjectMutation) ClearForecastedApr

func (m *ProjectMutation) ClearForecastedApr()

ClearForecastedApr clears the value of the "forecasted_apr" field.

func (*ProjectMutation) ClearLaunchpad

func (m *ProjectMutation) ClearLaunchpad()

ClearLaunchpad clears the "launchpad" edge to the Launchpad entity.

func (*ProjectMutation) ClearMint

func (m *ProjectMutation) ClearMint()

ClearMint clears the "mint" edge to the Mint entity.

func (*ProjectMutation) ClearedEdges

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

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

func (*ProjectMutation) ClearedFields

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

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

func (ProjectMutation) Client

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

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

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

func (*ProjectMutation) Field

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

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

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

func (*ProjectMutation) Fields

func (m *ProjectMutation) 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 (*ProjectMutation) ForecastedApr

func (m *ProjectMutation) ForecastedApr() (r string, exists bool)

ForecastedApr returns the value of the "forecasted_apr" field in the mutation.

func (*ProjectMutation) ForecastedAprCleared

func (m *ProjectMutation) ForecastedAprCleared() bool

ForecastedAprCleared returns if the "forecasted_apr" field was cleared in this mutation.

func (*ProjectMutation) ID

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

func (m *ProjectMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ProjectMutation) LaunchpadCleared

func (m *ProjectMutation) LaunchpadCleared() bool

LaunchpadCleared reports if the "launchpad" edge to the Launchpad entity was cleared.

func (*ProjectMutation) LaunchpadID

func (m *ProjectMutation) LaunchpadID() (id int, exists bool)

LaunchpadID returns the "launchpad" edge ID in the mutation.

func (*ProjectMutation) LaunchpadIDs

func (m *ProjectMutation) LaunchpadIDs() (ids []int)

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

func (*ProjectMutation) Metadata

func (m *ProjectMutation) Metadata() (r schema.Metadata, exists bool)

Metadata returns the value of the "metadata" field in the mutation.

func (*ProjectMutation) MintCleared

func (m *ProjectMutation) MintCleared() bool

MintCleared reports if the "mint" edge to the Mint entity was cleared.

func (*ProjectMutation) MintID

func (m *ProjectMutation) MintID() (id int, exists bool)

MintID returns the "mint" edge ID in the mutation.

func (*ProjectMutation) MintIDs

func (m *ProjectMutation) MintIDs() (ids []int)

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

func (*ProjectMutation) Name

func (m *ProjectMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ProjectMutation) OldAddress

func (m *ProjectMutation) OldAddress(ctx context.Context) (v string, err error)

OldAddress returns the old "address" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldField

func (m *ProjectMutation) 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 (*ProjectMutation) OldForecastedApr

func (m *ProjectMutation) OldForecastedApr(ctx context.Context) (v string, err error)

OldForecastedApr returns the old "forecasted_apr" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldMetadata

func (m *ProjectMutation) OldMetadata(ctx context.Context) (v schema.Metadata, err error)

OldMetadata returns the old "metadata" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldName

func (m *ProjectMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldPaymentToken

func (m *ProjectMutation) OldPaymentToken(ctx context.Context) (v schema.PaymentToken, err error)

OldPaymentToken returns the old "payment_token" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldSlot

func (m *ProjectMutation) OldSlot(ctx context.Context) (v int, err error)

OldSlot returns the old "slot" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldSlug

func (m *ProjectMutation) OldSlug(ctx context.Context) (v string, err error)

OldSlug returns the old "slug" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldTotalValue

func (m *ProjectMutation) OldTotalValue(ctx context.Context) (v string, err error)

OldTotalValue returns the old "total_value" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldValueDecimal

func (m *ProjectMutation) OldValueDecimal(ctx context.Context) (v int, err error)

OldValueDecimal returns the old "value_decimal" field's value of the Project entity. If the Project 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 (*ProjectMutation) Op

func (m *ProjectMutation) Op() Op

Op returns the operation name.

func (*ProjectMutation) PaymentToken

func (m *ProjectMutation) PaymentToken() (r schema.PaymentToken, exists bool)

PaymentToken returns the value of the "payment_token" field in the mutation.

func (*ProjectMutation) RemovedEdges

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

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

func (*ProjectMutation) RemovedIDs

func (m *ProjectMutation) 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 (*ProjectMutation) ResetAddress

func (m *ProjectMutation) ResetAddress()

ResetAddress resets all changes to the "address" field.

func (*ProjectMutation) ResetEdge

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

func (m *ProjectMutation) 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 (*ProjectMutation) ResetForecastedApr

func (m *ProjectMutation) ResetForecastedApr()

ResetForecastedApr resets all changes to the "forecasted_apr" field.

func (*ProjectMutation) ResetLaunchpad

func (m *ProjectMutation) ResetLaunchpad()

ResetLaunchpad resets all changes to the "launchpad" edge.

func (*ProjectMutation) ResetMetadata

func (m *ProjectMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" field.

func (*ProjectMutation) ResetMint

func (m *ProjectMutation) ResetMint()

ResetMint resets all changes to the "mint" edge.

func (*ProjectMutation) ResetName

func (m *ProjectMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProjectMutation) ResetPaymentToken

func (m *ProjectMutation) ResetPaymentToken()

ResetPaymentToken resets all changes to the "payment_token" field.

func (*ProjectMutation) ResetSlot

func (m *ProjectMutation) ResetSlot()

ResetSlot resets all changes to the "slot" field.

func (*ProjectMutation) ResetSlug

func (m *ProjectMutation) ResetSlug()

ResetSlug resets all changes to the "slug" field.

func (*ProjectMutation) ResetTotalValue

func (m *ProjectMutation) ResetTotalValue()

ResetTotalValue resets all changes to the "total_value" field.

func (*ProjectMutation) ResetValueDecimal

func (m *ProjectMutation) ResetValueDecimal()

ResetValueDecimal resets all changes to the "value_decimal" field.

func (*ProjectMutation) SetAddress

func (m *ProjectMutation) SetAddress(s string)

SetAddress sets the "address" field.

func (*ProjectMutation) SetField

func (m *ProjectMutation) 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 (*ProjectMutation) SetForecastedApr

func (m *ProjectMutation) SetForecastedApr(s string)

SetForecastedApr sets the "forecasted_apr" field.

func (*ProjectMutation) SetLaunchpadID

func (m *ProjectMutation) SetLaunchpadID(id int)

SetLaunchpadID sets the "launchpad" edge to the Launchpad entity by id.

func (*ProjectMutation) SetMetadata

func (m *ProjectMutation) SetMetadata(s schema.Metadata)

SetMetadata sets the "metadata" field.

func (*ProjectMutation) SetMintID

func (m *ProjectMutation) SetMintID(id int)

SetMintID sets the "mint" edge to the Mint entity by id.

func (*ProjectMutation) SetName

func (m *ProjectMutation) SetName(s string)

SetName sets the "name" field.

func (*ProjectMutation) SetOp

func (m *ProjectMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProjectMutation) SetPaymentToken

func (m *ProjectMutation) SetPaymentToken(st schema.PaymentToken)

SetPaymentToken sets the "payment_token" field.

func (*ProjectMutation) SetSlot

func (m *ProjectMutation) SetSlot(i int)

SetSlot sets the "slot" field.

func (*ProjectMutation) SetSlug

func (m *ProjectMutation) SetSlug(s string)

SetSlug sets the "slug" field.

func (*ProjectMutation) SetTotalValue

func (m *ProjectMutation) SetTotalValue(s string)

SetTotalValue sets the "total_value" field.

func (*ProjectMutation) SetValueDecimal

func (m *ProjectMutation) SetValueDecimal(i int)

SetValueDecimal sets the "value_decimal" field.

func (*ProjectMutation) Slot

func (m *ProjectMutation) Slot() (r int, exists bool)

Slot returns the value of the "slot" field in the mutation.

func (*ProjectMutation) Slug

func (m *ProjectMutation) Slug() (r string, exists bool)

Slug returns the value of the "slug" field in the mutation.

func (*ProjectMutation) TotalValue

func (m *ProjectMutation) TotalValue() (r string, exists bool)

TotalValue returns the value of the "total_value" field in the mutation.

func (ProjectMutation) Tx

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

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

func (*ProjectMutation) Type

func (m *ProjectMutation) Type() string

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

func (*ProjectMutation) ValueDecimal

func (m *ProjectMutation) ValueDecimal() (r int, exists bool)

ValueDecimal returns the value of the "value_decimal" field in the mutation.

func (*ProjectMutation) Where

func (m *ProjectMutation) Where(ps ...predicate.Project)

Where appends a list predicates to the ProjectMutation builder.

func (*ProjectMutation) WhereP

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

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

type ProjectOrder

type ProjectOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *ProjectOrderField `json:"field"`
}

ProjectOrder defines the ordering of Project.

type ProjectOrderField

type ProjectOrderField struct {
	// Value extracts the ordering value from the given Project.
	Value func(*Project) (ent.Value, error)
	// contains filtered or unexported fields
}

ProjectOrderField defines the ordering field of Project.

type ProjectPaginateOption

type ProjectPaginateOption func(*projectPager) error

ProjectPaginateOption enables pagination customization.

func WithProjectFilter

func WithProjectFilter(filter func(*ProjectQuery) (*ProjectQuery, error)) ProjectPaginateOption

WithProjectFilter configures pagination filter.

func WithProjectOrder

func WithProjectOrder(order *ProjectOrder) ProjectPaginateOption

WithProjectOrder configures pagination ordering.

type ProjectQuery

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

ProjectQuery is the builder for querying Project entities.

func (*ProjectQuery) Aggregate

func (pq *ProjectQuery) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate returns a ProjectSelect configured with the given aggregations.

func (*ProjectQuery) All

func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)

All executes the query and returns a list of Projects.

func (*ProjectQuery) AllX

func (pq *ProjectQuery) AllX(ctx context.Context) []*Project

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

func (*ProjectQuery) Clone

func (pq *ProjectQuery) Clone() *ProjectQuery

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

func (*ProjectQuery) CollectFields

func (pr *ProjectQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProjectQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ProjectQuery) Count

func (pq *ProjectQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProjectQuery) CountX

func (pq *ProjectQuery) CountX(ctx context.Context) int

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

func (*ProjectQuery) Exist

func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)

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

func (*ProjectQuery) ExistX

func (pq *ProjectQuery) ExistX(ctx context.Context) bool

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

func (*ProjectQuery) First

func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)

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

func (*ProjectQuery) FirstID

func (pq *ProjectQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ProjectQuery) FirstIDX

func (pq *ProjectQuery) FirstIDX(ctx context.Context) int

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

func (*ProjectQuery) FirstX

func (pq *ProjectQuery) FirstX(ctx context.Context) *Project

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

func (*ProjectQuery) GroupBy

func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy

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

client.Project.Query().
	GroupBy(project.FieldAddress).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProjectQuery) IDs

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

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

func (*ProjectQuery) IDsX

func (pq *ProjectQuery) IDsX(ctx context.Context) []int

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

func (*ProjectQuery) Limit

func (pq *ProjectQuery) Limit(limit int) *ProjectQuery

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

func (*ProjectQuery) Offset

func (pq *ProjectQuery) Offset(offset int) *ProjectQuery

Offset to start from.

func (*ProjectQuery) Only

func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)

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

func (*ProjectQuery) OnlyID

func (pq *ProjectQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ProjectQuery) OnlyIDX

func (pq *ProjectQuery) OnlyIDX(ctx context.Context) int

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

func (*ProjectQuery) OnlyX

func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project

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

func (*ProjectQuery) Order

func (pq *ProjectQuery) Order(o ...project.OrderOption) *ProjectQuery

Order specifies how the records should be ordered.

func (*ProjectQuery) Paginate

func (pr *ProjectQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ProjectPaginateOption,
) (*ProjectConnection, error)

Paginate executes the query and returns a relay based cursor connection to Project.

func (*ProjectQuery) QueryLaunchpad

func (pq *ProjectQuery) QueryLaunchpad() *LaunchpadQuery

QueryLaunchpad chains the current query on the "launchpad" edge.

func (*ProjectQuery) QueryMint

func (pq *ProjectQuery) QueryMint() *MintQuery

QueryMint chains the current query on the "mint" edge.

func (*ProjectQuery) Select

func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect

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

client.Project.Query().
	Select(project.FieldAddress).
	Scan(ctx, &v)

func (*ProjectQuery) Unique

func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery

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

func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery

Where adds a new predicate for the ProjectQuery builder.

func (*ProjectQuery) WithLaunchpad

func (pq *ProjectQuery) WithLaunchpad(opts ...func(*LaunchpadQuery)) *ProjectQuery

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

func (*ProjectQuery) WithMint

func (pq *ProjectQuery) WithMint(opts ...func(*MintQuery)) *ProjectQuery

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

type ProjectSelect

type ProjectSelect struct {
	*ProjectQuery
	// contains filtered or unexported fields
}

ProjectSelect is the builder for selecting fields of Project entities.

func (*ProjectSelect) Aggregate

func (ps *ProjectSelect) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProjectSelect) Bool

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

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

func (*ProjectSelect) BoolX

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

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

func (*ProjectSelect) Bools

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

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

func (*ProjectSelect) BoolsX

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

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

func (*ProjectSelect) Float64

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

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

func (*ProjectSelect) Float64X

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

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

func (*ProjectSelect) Float64s

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

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

func (*ProjectSelect) Float64sX

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

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

func (*ProjectSelect) Int

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

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

func (*ProjectSelect) IntX

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

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

func (*ProjectSelect) Ints

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

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

func (*ProjectSelect) IntsX

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

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

func (*ProjectSelect) Scan

func (ps *ProjectSelect) Scan(ctx context.Context, v any) error

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

func (*ProjectSelect) ScanX

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

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

func (*ProjectSelect) String

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

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

func (*ProjectSelect) StringX

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

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

func (*ProjectSelect) Strings

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

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

func (*ProjectSelect) StringsX

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

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

type ProjectUpdate

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

ProjectUpdate is the builder for updating Project entities.

func (*ProjectUpdate) AddSlot

func (pu *ProjectUpdate) AddSlot(i int) *ProjectUpdate

AddSlot adds i to the "slot" field.

func (*ProjectUpdate) AddValueDecimal

func (pu *ProjectUpdate) AddValueDecimal(i int) *ProjectUpdate

AddValueDecimal adds i to the "value_decimal" field.

func (*ProjectUpdate) ClearForecastedApr

func (pu *ProjectUpdate) ClearForecastedApr() *ProjectUpdate

ClearForecastedApr clears the value of the "forecasted_apr" field.

func (*ProjectUpdate) ClearLaunchpad

func (pu *ProjectUpdate) ClearLaunchpad() *ProjectUpdate

ClearLaunchpad clears the "launchpad" edge to the Launchpad entity.

func (*ProjectUpdate) ClearMint

func (pu *ProjectUpdate) ClearMint() *ProjectUpdate

ClearMint clears the "mint" edge to the Mint entity.

func (*ProjectUpdate) Exec

func (pu *ProjectUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpdate) ExecX

func (pu *ProjectUpdate) ExecX(ctx context.Context)

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

func (*ProjectUpdate) Mutation

func (pu *ProjectUpdate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdate) Save

func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)

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

func (*ProjectUpdate) SaveX

func (pu *ProjectUpdate) SaveX(ctx context.Context) int

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

func (*ProjectUpdate) SetAddress

func (pu *ProjectUpdate) SetAddress(s string) *ProjectUpdate

SetAddress sets the "address" field.

func (*ProjectUpdate) SetForecastedApr

func (pu *ProjectUpdate) SetForecastedApr(s string) *ProjectUpdate

SetForecastedApr sets the "forecasted_apr" field.

func (*ProjectUpdate) SetLaunchpad

func (pu *ProjectUpdate) SetLaunchpad(l *Launchpad) *ProjectUpdate

SetLaunchpad sets the "launchpad" edge to the Launchpad entity.

func (*ProjectUpdate) SetLaunchpadID

func (pu *ProjectUpdate) SetLaunchpadID(id int) *ProjectUpdate

SetLaunchpadID sets the "launchpad" edge to the Launchpad entity by ID.

func (*ProjectUpdate) SetMetadata

func (pu *ProjectUpdate) SetMetadata(s schema.Metadata) *ProjectUpdate

SetMetadata sets the "metadata" field.

func (*ProjectUpdate) SetMint

func (pu *ProjectUpdate) SetMint(m *Mint) *ProjectUpdate

SetMint sets the "mint" edge to the Mint entity.

func (*ProjectUpdate) SetMintID

func (pu *ProjectUpdate) SetMintID(id int) *ProjectUpdate

SetMintID sets the "mint" edge to the Mint entity by ID.

func (*ProjectUpdate) SetName

func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate

SetName sets the "name" field.

func (*ProjectUpdate) SetNillableAddress

func (pu *ProjectUpdate) SetNillableAddress(s *string) *ProjectUpdate

SetNillableAddress sets the "address" field if the given value is not nil.

func (*ProjectUpdate) SetNillableForecastedApr

func (pu *ProjectUpdate) SetNillableForecastedApr(s *string) *ProjectUpdate

SetNillableForecastedApr sets the "forecasted_apr" field if the given value is not nil.

func (*ProjectUpdate) SetNillableLaunchpadID

func (pu *ProjectUpdate) SetNillableLaunchpadID(id *int) *ProjectUpdate

SetNillableLaunchpadID sets the "launchpad" edge to the Launchpad entity by ID if the given value is not nil.

func (*ProjectUpdate) SetNillableMetadata

func (pu *ProjectUpdate) SetNillableMetadata(s *schema.Metadata) *ProjectUpdate

SetNillableMetadata sets the "metadata" field if the given value is not nil.

func (*ProjectUpdate) SetNillableMintID

func (pu *ProjectUpdate) SetNillableMintID(id *int) *ProjectUpdate

SetNillableMintID sets the "mint" edge to the Mint entity by ID if the given value is not nil.

func (*ProjectUpdate) SetNillableName

func (pu *ProjectUpdate) SetNillableName(s *string) *ProjectUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*ProjectUpdate) SetNillablePaymentToken

func (pu *ProjectUpdate) SetNillablePaymentToken(st *schema.PaymentToken) *ProjectUpdate

SetNillablePaymentToken sets the "payment_token" field if the given value is not nil.

func (*ProjectUpdate) SetNillableSlot

func (pu *ProjectUpdate) SetNillableSlot(i *int) *ProjectUpdate

SetNillableSlot sets the "slot" field if the given value is not nil.

func (*ProjectUpdate) SetNillableSlug

func (pu *ProjectUpdate) SetNillableSlug(s *string) *ProjectUpdate

SetNillableSlug sets the "slug" field if the given value is not nil.

func (*ProjectUpdate) SetNillableTotalValue

func (pu *ProjectUpdate) SetNillableTotalValue(s *string) *ProjectUpdate

SetNillableTotalValue sets the "total_value" field if the given value is not nil.

func (*ProjectUpdate) SetNillableValueDecimal

func (pu *ProjectUpdate) SetNillableValueDecimal(i *int) *ProjectUpdate

SetNillableValueDecimal sets the "value_decimal" field if the given value is not nil.

func (*ProjectUpdate) SetPaymentToken

func (pu *ProjectUpdate) SetPaymentToken(st schema.PaymentToken) *ProjectUpdate

SetPaymentToken sets the "payment_token" field.

func (*ProjectUpdate) SetSlot

func (pu *ProjectUpdate) SetSlot(i int) *ProjectUpdate

SetSlot sets the "slot" field.

func (*ProjectUpdate) SetSlug

func (pu *ProjectUpdate) SetSlug(s string) *ProjectUpdate

SetSlug sets the "slug" field.

func (*ProjectUpdate) SetTotalValue

func (pu *ProjectUpdate) SetTotalValue(s string) *ProjectUpdate

SetTotalValue sets the "total_value" field.

func (*ProjectUpdate) SetValueDecimal

func (pu *ProjectUpdate) SetValueDecimal(i int) *ProjectUpdate

SetValueDecimal sets the "value_decimal" field.

func (*ProjectUpdate) Where

func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate

Where appends a list predicates to the ProjectUpdate builder.

type ProjectUpdateOne

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

ProjectUpdateOne is the builder for updating a single Project entity.

func (*ProjectUpdateOne) AddSlot

func (puo *ProjectUpdateOne) AddSlot(i int) *ProjectUpdateOne

AddSlot adds i to the "slot" field.

func (*ProjectUpdateOne) AddValueDecimal

func (puo *ProjectUpdateOne) AddValueDecimal(i int) *ProjectUpdateOne

AddValueDecimal adds i to the "value_decimal" field.

func (*ProjectUpdateOne) ClearForecastedApr

func (puo *ProjectUpdateOne) ClearForecastedApr() *ProjectUpdateOne

ClearForecastedApr clears the value of the "forecasted_apr" field.

func (*ProjectUpdateOne) ClearLaunchpad

func (puo *ProjectUpdateOne) ClearLaunchpad() *ProjectUpdateOne

ClearLaunchpad clears the "launchpad" edge to the Launchpad entity.

func (*ProjectUpdateOne) ClearMint

func (puo *ProjectUpdateOne) ClearMint() *ProjectUpdateOne

ClearMint clears the "mint" edge to the Mint entity.

func (*ProjectUpdateOne) Exec

func (puo *ProjectUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProjectUpdateOne) ExecX

func (puo *ProjectUpdateOne) ExecX(ctx context.Context)

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

func (*ProjectUpdateOne) Mutation

func (puo *ProjectUpdateOne) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdateOne) Save

func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)

Save executes the query and returns the updated Project entity.

func (*ProjectUpdateOne) SaveX

func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project

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

func (*ProjectUpdateOne) Select

func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne

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

func (*ProjectUpdateOne) SetAddress

func (puo *ProjectUpdateOne) SetAddress(s string) *ProjectUpdateOne

SetAddress sets the "address" field.

func (*ProjectUpdateOne) SetForecastedApr

func (puo *ProjectUpdateOne) SetForecastedApr(s string) *ProjectUpdateOne

SetForecastedApr sets the "forecasted_apr" field.

func (*ProjectUpdateOne) SetLaunchpad

func (puo *ProjectUpdateOne) SetLaunchpad(l *Launchpad) *ProjectUpdateOne

SetLaunchpad sets the "launchpad" edge to the Launchpad entity.

func (*ProjectUpdateOne) SetLaunchpadID

func (puo *ProjectUpdateOne) SetLaunchpadID(id int) *ProjectUpdateOne

SetLaunchpadID sets the "launchpad" edge to the Launchpad entity by ID.

func (*ProjectUpdateOne) SetMetadata

func (puo *ProjectUpdateOne) SetMetadata(s schema.Metadata) *ProjectUpdateOne

SetMetadata sets the "metadata" field.

func (*ProjectUpdateOne) SetMint

func (puo *ProjectUpdateOne) SetMint(m *Mint) *ProjectUpdateOne

SetMint sets the "mint" edge to the Mint entity.

func (*ProjectUpdateOne) SetMintID

func (puo *ProjectUpdateOne) SetMintID(id int) *ProjectUpdateOne

SetMintID sets the "mint" edge to the Mint entity by ID.

func (*ProjectUpdateOne) SetName

func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne

SetName sets the "name" field.

func (*ProjectUpdateOne) SetNillableAddress

func (puo *ProjectUpdateOne) SetNillableAddress(s *string) *ProjectUpdateOne

SetNillableAddress sets the "address" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableForecastedApr

func (puo *ProjectUpdateOne) SetNillableForecastedApr(s *string) *ProjectUpdateOne

SetNillableForecastedApr sets the "forecasted_apr" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableLaunchpadID

func (puo *ProjectUpdateOne) SetNillableLaunchpadID(id *int) *ProjectUpdateOne

SetNillableLaunchpadID sets the "launchpad" edge to the Launchpad entity by ID if the given value is not nil.

func (*ProjectUpdateOne) SetNillableMetadata

func (puo *ProjectUpdateOne) SetNillableMetadata(s *schema.Metadata) *ProjectUpdateOne

SetNillableMetadata sets the "metadata" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableMintID

func (puo *ProjectUpdateOne) SetNillableMintID(id *int) *ProjectUpdateOne

SetNillableMintID sets the "mint" edge to the Mint entity by ID if the given value is not nil.

func (*ProjectUpdateOne) SetNillableName

func (puo *ProjectUpdateOne) SetNillableName(s *string) *ProjectUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillablePaymentToken

func (puo *ProjectUpdateOne) SetNillablePaymentToken(st *schema.PaymentToken) *ProjectUpdateOne

SetNillablePaymentToken sets the "payment_token" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableSlot

func (puo *ProjectUpdateOne) SetNillableSlot(i *int) *ProjectUpdateOne

SetNillableSlot sets the "slot" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableSlug

func (puo *ProjectUpdateOne) SetNillableSlug(s *string) *ProjectUpdateOne

SetNillableSlug sets the "slug" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableTotalValue

func (puo *ProjectUpdateOne) SetNillableTotalValue(s *string) *ProjectUpdateOne

SetNillableTotalValue sets the "total_value" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableValueDecimal

func (puo *ProjectUpdateOne) SetNillableValueDecimal(i *int) *ProjectUpdateOne

SetNillableValueDecimal sets the "value_decimal" field if the given value is not nil.

func (*ProjectUpdateOne) SetPaymentToken

func (puo *ProjectUpdateOne) SetPaymentToken(st schema.PaymentToken) *ProjectUpdateOne

SetPaymentToken sets the "payment_token" field.

func (*ProjectUpdateOne) SetSlot

func (puo *ProjectUpdateOne) SetSlot(i int) *ProjectUpdateOne

SetSlot sets the "slot" field.

func (*ProjectUpdateOne) SetSlug

func (puo *ProjectUpdateOne) SetSlug(s string) *ProjectUpdateOne

SetSlug sets the "slug" field.

func (*ProjectUpdateOne) SetTotalValue

func (puo *ProjectUpdateOne) SetTotalValue(s string) *ProjectUpdateOne

SetTotalValue sets the "total_value" field.

func (*ProjectUpdateOne) SetValueDecimal

func (puo *ProjectUpdateOne) SetValueDecimal(i int) *ProjectUpdateOne

SetValueDecimal sets the "value_decimal" field.

func (*ProjectUpdateOne) Where

Where appends a list predicates to the ProjectUpdate builder.

type ProjectUpsert

type ProjectUpsert struct {
	*sql.UpdateSet
}

ProjectUpsert is the "OnConflict" setter.

func (*ProjectUpsert) AddSlot

func (u *ProjectUpsert) AddSlot(v int) *ProjectUpsert

AddSlot adds v to the "slot" field.

func (*ProjectUpsert) AddValueDecimal

func (u *ProjectUpsert) AddValueDecimal(v int) *ProjectUpsert

AddValueDecimal adds v to the "value_decimal" field.

func (*ProjectUpsert) ClearForecastedApr

func (u *ProjectUpsert) ClearForecastedApr() *ProjectUpsert

ClearForecastedApr clears the value of the "forecasted_apr" field.

func (*ProjectUpsert) SetAddress

func (u *ProjectUpsert) SetAddress(v string) *ProjectUpsert

SetAddress sets the "address" field.

func (*ProjectUpsert) SetForecastedApr

func (u *ProjectUpsert) SetForecastedApr(v string) *ProjectUpsert

SetForecastedApr sets the "forecasted_apr" field.

func (*ProjectUpsert) SetMetadata

func (u *ProjectUpsert) SetMetadata(v schema.Metadata) *ProjectUpsert

SetMetadata sets the "metadata" field.

func (*ProjectUpsert) SetName

func (u *ProjectUpsert) SetName(v string) *ProjectUpsert

SetName sets the "name" field.

func (*ProjectUpsert) SetPaymentToken

func (u *ProjectUpsert) SetPaymentToken(v schema.PaymentToken) *ProjectUpsert

SetPaymentToken sets the "payment_token" field.

func (*ProjectUpsert) SetSlot

func (u *ProjectUpsert) SetSlot(v int) *ProjectUpsert

SetSlot sets the "slot" field.

func (*ProjectUpsert) SetSlug

func (u *ProjectUpsert) SetSlug(v string) *ProjectUpsert

SetSlug sets the "slug" field.

func (*ProjectUpsert) SetTotalValue

func (u *ProjectUpsert) SetTotalValue(v string) *ProjectUpsert

SetTotalValue sets the "total_value" field.

func (*ProjectUpsert) SetValueDecimal

func (u *ProjectUpsert) SetValueDecimal(v int) *ProjectUpsert

SetValueDecimal sets the "value_decimal" field.

func (*ProjectUpsert) UpdateAddress

func (u *ProjectUpsert) UpdateAddress() *ProjectUpsert

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

func (*ProjectUpsert) UpdateForecastedApr

func (u *ProjectUpsert) UpdateForecastedApr() *ProjectUpsert

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

func (*ProjectUpsert) UpdateMetadata

func (u *ProjectUpsert) UpdateMetadata() *ProjectUpsert

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

func (*ProjectUpsert) UpdateName

func (u *ProjectUpsert) UpdateName() *ProjectUpsert

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

func (*ProjectUpsert) UpdatePaymentToken

func (u *ProjectUpsert) UpdatePaymentToken() *ProjectUpsert

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

func (*ProjectUpsert) UpdateSlot

func (u *ProjectUpsert) UpdateSlot() *ProjectUpsert

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

func (*ProjectUpsert) UpdateSlug

func (u *ProjectUpsert) UpdateSlug() *ProjectUpsert

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

func (*ProjectUpsert) UpdateTotalValue

func (u *ProjectUpsert) UpdateTotalValue() *ProjectUpsert

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

func (*ProjectUpsert) UpdateValueDecimal

func (u *ProjectUpsert) UpdateValueDecimal() *ProjectUpsert

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

type ProjectUpsertBulk

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

ProjectUpsertBulk is the builder for "upsert"-ing a bulk of Project nodes.

func (*ProjectUpsertBulk) AddSlot

func (u *ProjectUpsertBulk) AddSlot(v int) *ProjectUpsertBulk

AddSlot adds v to the "slot" field.

func (*ProjectUpsertBulk) AddValueDecimal

func (u *ProjectUpsertBulk) AddValueDecimal(v int) *ProjectUpsertBulk

AddValueDecimal adds v to the "value_decimal" field.

func (*ProjectUpsertBulk) ClearForecastedApr

func (u *ProjectUpsertBulk) ClearForecastedApr() *ProjectUpsertBulk

ClearForecastedApr clears the value of the "forecasted_apr" field.

func (*ProjectUpsertBulk) DoNothing

func (u *ProjectUpsertBulk) DoNothing() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) Exec

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

Exec executes the query.

func (*ProjectUpsertBulk) ExecX

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

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

func (*ProjectUpsertBulk) Ignore

func (u *ProjectUpsertBulk) Ignore() *ProjectUpsertBulk

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

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

func (*ProjectUpsertBulk) SetAddress

func (u *ProjectUpsertBulk) SetAddress(v string) *ProjectUpsertBulk

SetAddress sets the "address" field.

func (*ProjectUpsertBulk) SetForecastedApr

func (u *ProjectUpsertBulk) SetForecastedApr(v string) *ProjectUpsertBulk

SetForecastedApr sets the "forecasted_apr" field.

func (*ProjectUpsertBulk) SetMetadata

SetMetadata sets the "metadata" field.

func (*ProjectUpsertBulk) SetName

SetName sets the "name" field.

func (*ProjectUpsertBulk) SetPaymentToken

func (u *ProjectUpsertBulk) SetPaymentToken(v schema.PaymentToken) *ProjectUpsertBulk

SetPaymentToken sets the "payment_token" field.

func (*ProjectUpsertBulk) SetSlot

func (u *ProjectUpsertBulk) SetSlot(v int) *ProjectUpsertBulk

SetSlot sets the "slot" field.

func (*ProjectUpsertBulk) SetSlug

SetSlug sets the "slug" field.

func (*ProjectUpsertBulk) SetTotalValue

func (u *ProjectUpsertBulk) SetTotalValue(v string) *ProjectUpsertBulk

SetTotalValue sets the "total_value" field.

func (*ProjectUpsertBulk) SetValueDecimal

func (u *ProjectUpsertBulk) SetValueDecimal(v int) *ProjectUpsertBulk

SetValueDecimal sets the "value_decimal" field.

func (*ProjectUpsertBulk) Update

func (u *ProjectUpsertBulk) Update(set func(*ProjectUpsert)) *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateAddress

func (u *ProjectUpsertBulk) UpdateAddress() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateForecastedApr

func (u *ProjectUpsertBulk) UpdateForecastedApr() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateMetadata

func (u *ProjectUpsertBulk) UpdateMetadata() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateName

func (u *ProjectUpsertBulk) UpdateName() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateNewValues

func (u *ProjectUpsertBulk) UpdateNewValues() *ProjectUpsertBulk

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

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

func (*ProjectUpsertBulk) UpdatePaymentToken

func (u *ProjectUpsertBulk) UpdatePaymentToken() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateSlot

func (u *ProjectUpsertBulk) UpdateSlot() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateSlug

func (u *ProjectUpsertBulk) UpdateSlug() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateTotalValue

func (u *ProjectUpsertBulk) UpdateTotalValue() *ProjectUpsertBulk

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

func (*ProjectUpsertBulk) UpdateValueDecimal

func (u *ProjectUpsertBulk) UpdateValueDecimal() *ProjectUpsertBulk

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

type ProjectUpsertOne

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

ProjectUpsertOne is the builder for "upsert"-ing

one Project node.

func (*ProjectUpsertOne) AddSlot

func (u *ProjectUpsertOne) AddSlot(v int) *ProjectUpsertOne

AddSlot adds v to the "slot" field.

func (*ProjectUpsertOne) AddValueDecimal

func (u *ProjectUpsertOne) AddValueDecimal(v int) *ProjectUpsertOne

AddValueDecimal adds v to the "value_decimal" field.

func (*ProjectUpsertOne) ClearForecastedApr

func (u *ProjectUpsertOne) ClearForecastedApr() *ProjectUpsertOne

ClearForecastedApr clears the value of the "forecasted_apr" field.

func (*ProjectUpsertOne) DoNothing

func (u *ProjectUpsertOne) DoNothing() *ProjectUpsertOne

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

func (*ProjectUpsertOne) Exec

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

Exec executes the query.

func (*ProjectUpsertOne) ExecX

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

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

func (*ProjectUpsertOne) ID

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

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

func (*ProjectUpsertOne) IDX

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

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

func (*ProjectUpsertOne) Ignore

func (u *ProjectUpsertOne) Ignore() *ProjectUpsertOne

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

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

func (*ProjectUpsertOne) SetAddress

func (u *ProjectUpsertOne) SetAddress(v string) *ProjectUpsertOne

SetAddress sets the "address" field.

func (*ProjectUpsertOne) SetForecastedApr

func (u *ProjectUpsertOne) SetForecastedApr(v string) *ProjectUpsertOne

SetForecastedApr sets the "forecasted_apr" field.

func (*ProjectUpsertOne) SetMetadata

func (u *ProjectUpsertOne) SetMetadata(v schema.Metadata) *ProjectUpsertOne

SetMetadata sets the "metadata" field.

func (*ProjectUpsertOne) SetName

func (u *ProjectUpsertOne) SetName(v string) *ProjectUpsertOne

SetName sets the "name" field.

func (*ProjectUpsertOne) SetPaymentToken

func (u *ProjectUpsertOne) SetPaymentToken(v schema.PaymentToken) *ProjectUpsertOne

SetPaymentToken sets the "payment_token" field.

func (*ProjectUpsertOne) SetSlot

func (u *ProjectUpsertOne) SetSlot(v int) *ProjectUpsertOne

SetSlot sets the "slot" field.

func (*ProjectUpsertOne) SetSlug

func (u *ProjectUpsertOne) SetSlug(v string) *ProjectUpsertOne

SetSlug sets the "slug" field.

func (*ProjectUpsertOne) SetTotalValue

func (u *ProjectUpsertOne) SetTotalValue(v string) *ProjectUpsertOne

SetTotalValue sets the "total_value" field.

func (*ProjectUpsertOne) SetValueDecimal

func (u *ProjectUpsertOne) SetValueDecimal(v int) *ProjectUpsertOne

SetValueDecimal sets the "value_decimal" field.

func (*ProjectUpsertOne) Update

func (u *ProjectUpsertOne) Update(set func(*ProjectUpsert)) *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateAddress

func (u *ProjectUpsertOne) UpdateAddress() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateForecastedApr

func (u *ProjectUpsertOne) UpdateForecastedApr() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateMetadata

func (u *ProjectUpsertOne) UpdateMetadata() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateName

func (u *ProjectUpsertOne) UpdateName() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateNewValues

func (u *ProjectUpsertOne) UpdateNewValues() *ProjectUpsertOne

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

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

func (*ProjectUpsertOne) UpdatePaymentToken

func (u *ProjectUpsertOne) UpdatePaymentToken() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateSlot

func (u *ProjectUpsertOne) UpdateSlot() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateSlug

func (u *ProjectUpsertOne) UpdateSlug() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateTotalValue

func (u *ProjectUpsertOne) UpdateTotalValue() *ProjectUpsertOne

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

func (*ProjectUpsertOne) UpdateValueDecimal

func (u *ProjectUpsertOne) UpdateValueDecimal() *ProjectUpsertOne

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

type Projects

type Projects []*Project

Projects is a parsable slice of Project.

type Querier

type Querier = ent.Querier

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

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

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

type Query

type Query = ent.Query

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

type QueryContext

type QueryContext = ent.QueryContext

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

type RollbackFunc

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

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

func (RollbackFunc) Rollback

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

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

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

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

type Rollbacker

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

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

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

type Traverser

type Traverser = ent.Traverser

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

type Tx

type Tx struct {

	// Launchpad is the client for interacting with the Launchpad builders.
	Launchpad *LaunchpadClient
	// Mint is the client for interacting with the Mint builders.
	Mint *MintClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

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

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

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

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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