ent

package
v0.0.0-...-18f4101 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 32 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.
	TypeCard             = "Card"
	TypeCardSpecialColor = "CardSpecialColor"
	TypeCardType         = "CardType"
	TypeDeck             = "Deck"
	TypeProduct          = "Product"
	TypeRevision         = "Revision"
)

Variables

View Source
var DefaultCardOrder = &CardOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CardOrderField{
		Value: func(c *Card) (ent.Value, error) {
			return c.ID, nil
		},
		column: card.FieldID,
		toTerm: card.ByID,
		toCursor: func(c *Card) Cursor {
			return Cursor{ID: c.ID}
		},
	},
}

DefaultCardOrder is the default ordering of Card.

View Source
var DefaultCardSpecialColorOrder = &CardSpecialColorOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CardSpecialColorOrderField{
		Value: func(csc *CardSpecialColor) (ent.Value, error) {
			return csc.ID, nil
		},
		column: cardspecialcolor.FieldID,
		toTerm: cardspecialcolor.ByID,
		toCursor: func(csc *CardSpecialColor) Cursor {
			return Cursor{ID: csc.ID}
		},
	},
}

DefaultCardSpecialColorOrder is the default ordering of CardSpecialColor.

View Source
var DefaultCardTypeOrder = &CardTypeOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &CardTypeOrderField{
		Value: func(ct *CardType) (ent.Value, error) {
			return ct.ID, nil
		},
		column: cardtype.FieldID,
		toTerm: cardtype.ByID,
		toCursor: func(ct *CardType) Cursor {
			return Cursor{ID: ct.ID}
		},
	},
}

DefaultCardTypeOrder is the default ordering of CardType.

View Source
var DefaultDeckOrder = &DeckOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &DeckOrderField{
		Value: func(d *Deck) (ent.Value, error) {
			return d.ID, nil
		},
		column: deck.FieldID,
		toTerm: deck.ByID,
		toCursor: func(d *Deck) Cursor {
			return Cursor{ID: d.ID}
		},
	},
}

DefaultDeckOrder is the default ordering of Deck.

View Source
var DefaultProductOrder = &ProductOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &ProductOrderField{
		Value: func(pr *Product) (ent.Value, error) {
			return pr.ID, nil
		},
		column: product.FieldID,
		toTerm: product.ByID,
		toCursor: func(pr *Product) Cursor {
			return Cursor{ID: pr.ID}
		},
	},
}

DefaultProductOrder is the default ordering of Product.

View Source
var DefaultRevisionOrder = &RevisionOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &RevisionOrderField{
		Value: func(r *Revision) (ent.Value, error) {
			return r.ID, nil
		},
		column: revision.FieldID,
		toTerm: revision.ByID,
		toCursor: func(r *Revision) Cursor {
			return Cursor{ID: r.ID}
		},
	},
}

DefaultRevisionOrder is the default ordering of Revision.

View Source
var ErrEmptyCardSpecialColorWhereInput = errors.New("ent: empty predicate CardSpecialColorWhereInput")

ErrEmptyCardSpecialColorWhereInput is returned in case the CardSpecialColorWhereInput is empty.

View Source
var ErrEmptyCardTypeWhereInput = errors.New("ent: empty predicate CardTypeWhereInput")

ErrEmptyCardTypeWhereInput is returned in case the CardTypeWhereInput is empty.

View Source
var ErrEmptyCardWhereInput = errors.New("ent: empty predicate CardWhereInput")

ErrEmptyCardWhereInput is returned in case the CardWhereInput is empty.

View Source
var ErrEmptyDeckWhereInput = errors.New("ent: empty predicate DeckWhereInput")

ErrEmptyDeckWhereInput is returned in case the DeckWhereInput is empty.

View Source
var ErrEmptyProductWhereInput = errors.New("ent: empty predicate ProductWhereInput")

ErrEmptyProductWhereInput is returned in case the ProductWhereInput is empty.

View Source
var ErrEmptyRevisionWhereInput = errors.New("ent: empty predicate RevisionWhereInput")

ErrEmptyRevisionWhereInput is returned in case the RevisionWhereInput is empty.

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 Card

type Card struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// LiteralID holds the value of the "literal_id" field.
	LiteralID string `json:"literal_id,omitempty"`
	// RevisionID holds the value of the "revision_id" field.
	RevisionID int `json:"revision_id,omitempty"`
	// PrintedID holds the value of the "printed_id" field.
	PrintedID *string `json:"printed_id,omitempty"`
	// PlayAgricolaCardID holds the value of the "play_agricola_card_id" field.
	PlayAgricolaCardID *string `json:"play_agricola_card_id,omitempty"`
	// DeckID holds the value of the "deck_id" field.
	DeckID int `json:"deck_id,omitempty"`
	// CardTypeID holds the value of the "card_type_id" field.
	CardTypeID int `json:"card_type_id,omitempty"`
	// CardSpecialColorID holds the value of the "card_special_color_id" field.
	CardSpecialColorID int `json:"card_special_color_id,omitempty"`
	// NameJa holds the value of the "name_ja" field.
	NameJa *string `json:"name_ja,omitempty"`
	// NameEn holds the value of the "name_en" field.
	NameEn *string `json:"name_en,omitempty"`
	// MinPlayersNumber holds the value of the "min_players_number" field.
	MinPlayersNumber *int `json:"min_players_number,omitempty"`
	// Prerequisite holds the value of the "prerequisite" field.
	Prerequisite *string `json:"prerequisite,omitempty"`
	// Cost holds the value of the "cost" field.
	Cost *string `json:"cost,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// Note holds the value of the "note" field.
	Note *string `json:"note,omitempty"`
	// IsOfficialJa holds the value of the "is_official_ja" field.
	IsOfficialJa bool `json:"is_official_ja,omitempty"`
	// VictoryPoint holds the value of the "victory_point" field.
	VictoryPoint *int `json:"victory_point,omitempty"`
	// SpecialVictoryPoint holds the value of the "special_victory_point" field.
	SpecialVictoryPoint *string `json:"special_victory_point,omitempty"`
	// HasArrow holds the value of the "has_arrow" field.
	HasArrow bool `json:"has_arrow,omitempty"`
	// HasBonusPointIcon holds the value of the "has_bonus_point_icon" field.
	HasBonusPointIcon bool `json:"has_bonus_point_icon,omitempty"`
	// HasNegativeBonusPointIcon holds the value of the "has_negative_bonus_point_icon" field.
	HasNegativeBonusPointIcon bool `json:"has_negative_bonus_point_icon,omitempty"`
	// HasPanIcon holds the value of the "has_pan_icon" field.
	HasPanIcon bool `json:"has_pan_icon,omitempty"`
	// HasBreadIcon holds the value of the "has_bread_icon" field.
	HasBreadIcon bool `json:"has_bread_icon,omitempty"`
	// HasFarmPlannerIcon holds the value of the "has_farm_planner_icon" field.
	HasFarmPlannerIcon bool `json:"has_farm_planner_icon,omitempty"`
	// HasActionsBoosterIcon holds the value of the "has_actions_booster_icon" field.
	HasActionsBoosterIcon bool `json:"has_actions_booster_icon,omitempty"`
	// HasPointsProviderIcon holds the value of the "has_points_provider_icon" field.
	HasPointsProviderIcon bool `json:"has_points_provider_icon,omitempty"`
	// HasGoodsProviderIcon holds the value of the "has_goods_provider_icon" field.
	HasGoodsProviderIcon bool `json:"has_goods_provider_icon,omitempty"`
	// HasFoodProviderIcon holds the value of the "has_food_provider_icon" field.
	HasFoodProviderIcon bool `json:"has_food_provider_icon,omitempty"`
	// HasCropProviderIcon holds the value of the "has_crop_provider_icon" field.
	HasCropProviderIcon bool `json:"has_crop_provider_icon,omitempty"`
	// HasBuildingResourceProviderIcon holds the value of the "has_building_resource_provider_icon" field.
	HasBuildingResourceProviderIcon bool `json:"has_building_resource_provider_icon,omitempty"`
	// HasLivestockProviderIcon holds the value of the "has_livestock_provider_icon" field.
	HasLivestockProviderIcon bool `json:"has_livestock_provider_icon,omitempty"`
	// HasCutPeatIcon holds the value of the "has_cut_peat_icon" field.
	HasCutPeatIcon bool `json:"has_cut_peat_icon,omitempty"`
	// HasFellTreesIcon holds the value of the "has_fell_trees_icon" field.
	HasFellTreesIcon bool `json:"has_fell_trees_icon,omitempty"`
	// HasSlashAndBurnIcon holds the value of the "has_slash_and_burn_icon" field.
	HasSlashAndBurnIcon bool `json:"has_slash_and_burn_icon,omitempty"`
	// HasHiringFareIcon holds the value of the "has_hiring_fare_icon" field.
	HasHiringFareIcon bool `json:"has_hiring_fare_icon,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CardQuery when eager-loading is set.
	Edges CardEdges `json:"edges"`
	// contains filtered or unexported fields
}

Card is the model entity for the Card schema.

func (*Card) Ancestors

func (c *Card) Ancestors(ctx context.Context) (result []*Card, err error)

func (*Card) CardSpecialColor

func (c *Card) CardSpecialColor(ctx context.Context) (*CardSpecialColor, error)

func (*Card) CardType

func (c *Card) CardType(ctx context.Context) (*CardType, error)

func (*Card) Children

func (c *Card) Children(ctx context.Context) (result []*Card, err error)

func (*Card) Deck

func (c *Card) Deck(ctx context.Context) (*Deck, error)

func (*Card) ExecContext

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

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

func (*Card) IsNode

func (*Card) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Card) NamedAncestors

func (c *Card) NamedAncestors(name string) ([]*Card, error)

NamedAncestors returns the Ancestors named value or an error if the edge was not loaded in eager-loading with this name.

func (*Card) NamedChildren

func (c *Card) NamedChildren(name string) ([]*Card, error)

NamedChildren returns the Children named value or an error if the edge was not loaded in eager-loading with this name.

func (*Card) NamedProducts

func (c *Card) NamedProducts(name string) ([]*Product, error)

NamedProducts returns the Products named value or an error if the edge was not loaded in eager-loading with this name.

func (*Card) Products

func (c *Card) Products(ctx context.Context) (result []*Product, err error)

func (*Card) QueryAncestors

func (c *Card) QueryAncestors() *CardQuery

QueryAncestors queries the "ancestors" edge of the Card entity.

func (*Card) QueryCardSpecialColor

func (c *Card) QueryCardSpecialColor() *CardSpecialColorQuery

QueryCardSpecialColor queries the "card_special_color" edge of the Card entity.

func (*Card) QueryCardType

func (c *Card) QueryCardType() *CardTypeQuery

QueryCardType queries the "card_type" edge of the Card entity.

func (*Card) QueryChildren

func (c *Card) QueryChildren() *CardQuery

QueryChildren queries the "children" edge of the Card entity.

func (*Card) QueryContext

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

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

func (*Card) QueryDeck

func (c *Card) QueryDeck() *DeckQuery

QueryDeck queries the "deck" edge of the Card entity.

func (*Card) QueryProducts

func (c *Card) QueryProducts() *ProductQuery

QueryProducts queries the "products" edge of the Card entity.

func (*Card) QueryRevision

func (c *Card) QueryRevision() *RevisionQuery

QueryRevision queries the "revision" edge of the Card entity.

func (*Card) Revision

func (c *Card) Revision(ctx context.Context) (*Revision, error)

func (*Card) String

func (c *Card) String() string

String implements the fmt.Stringer.

func (*Card) ToEdge

func (c *Card) ToEdge(order *CardOrder) *CardEdge

ToEdge converts Card into CardEdge.

func (*Card) Unwrap

func (c *Card) Unwrap() *Card

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

func (c *Card) Update() *CardUpdateOne

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

func (*Card) Value

func (c *Card) Value(name string) (ent.Value, error)

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

type CardClient

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

CardClient is a client for the Card schema.

func NewCardClient

func NewCardClient(c config) *CardClient

NewCardClient returns a client for the Card from the given config.

func (*CardClient) Create

func (c *CardClient) Create() *CardCreate

Create returns a builder for creating a Card entity.

func (*CardClient) CreateBulk

func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk

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

func (*CardClient) Delete

func (c *CardClient) Delete() *CardDelete

Delete returns a delete builder for Card.

func (*CardClient) DeleteOne

func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CardClient) DeleteOneID

func (c *CardClient) DeleteOneID(id int) *CardDeleteOne

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

func (*CardClient) ExecContext

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

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

func (*CardClient) Get

func (c *CardClient) Get(ctx context.Context, id int) (*Card, error)

Get returns a Card entity by its id.

func (*CardClient) GetX

func (c *CardClient) GetX(ctx context.Context, id int) *Card

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

func (*CardClient) Hooks

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

Hooks returns the client hooks.

func (*CardClient) Intercept

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

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

func (*CardClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CardClient) MapCreateBulk

func (c *CardClient) MapCreateBulk(slice any, setFunc func(*CardCreate, int)) *CardCreateBulk

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

func (c *CardClient) Query() *CardQuery

Query returns a query builder for Card.

func (*CardClient) QueryAncestors

func (c *CardClient) QueryAncestors(ca *Card) *CardQuery

QueryAncestors queries the ancestors edge of a Card.

func (*CardClient) QueryCardSpecialColor

func (c *CardClient) QueryCardSpecialColor(ca *Card) *CardSpecialColorQuery

QueryCardSpecialColor queries the card_special_color edge of a Card.

func (*CardClient) QueryCardType

func (c *CardClient) QueryCardType(ca *Card) *CardTypeQuery

QueryCardType queries the card_type edge of a Card.

func (*CardClient) QueryChildren

func (c *CardClient) QueryChildren(ca *Card) *CardQuery

QueryChildren queries the children edge of a Card.

func (*CardClient) QueryContext

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

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

func (*CardClient) QueryDeck

func (c *CardClient) QueryDeck(ca *Card) *DeckQuery

QueryDeck queries the deck edge of a Card.

func (*CardClient) QueryProducts

func (c *CardClient) QueryProducts(ca *Card) *ProductQuery

QueryProducts queries the products edge of a Card.

func (*CardClient) QueryRevision

func (c *CardClient) QueryRevision(ca *Card) *RevisionQuery

QueryRevision queries the revision edge of a Card.

func (*CardClient) Update

func (c *CardClient) Update() *CardUpdate

Update returns an update builder for Card.

func (*CardClient) UpdateOne

func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CardClient) UpdateOneID

func (c *CardClient) UpdateOneID(id int) *CardUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CardClient) Use

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

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

type CardConnection

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

CardConnection is the connection containing edges to Card.

type CardCreate

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

CardCreate is the builder for creating a Card entity.

func (*CardCreate) AddAncestorIDs

func (cc *CardCreate) AddAncestorIDs(ids ...int) *CardCreate

AddAncestorIDs adds the "ancestors" edge to the Card entity by IDs.

func (*CardCreate) AddAncestors

func (cc *CardCreate) AddAncestors(c ...*Card) *CardCreate

AddAncestors adds the "ancestors" edges to the Card entity.

func (*CardCreate) AddChildIDs

func (cc *CardCreate) AddChildIDs(ids ...int) *CardCreate

AddChildIDs adds the "children" edge to the Card entity by IDs.

func (*CardCreate) AddChildren

func (cc *CardCreate) AddChildren(c ...*Card) *CardCreate

AddChildren adds the "children" edges to the Card entity.

func (*CardCreate) AddProductIDs

func (cc *CardCreate) AddProductIDs(ids ...int) *CardCreate

AddProductIDs adds the "products" edge to the Product entity by IDs.

func (*CardCreate) AddProducts

func (cc *CardCreate) AddProducts(p ...*Product) *CardCreate

AddProducts adds the "products" edges to the Product entity.

func (*CardCreate) Exec

func (cc *CardCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardCreate) ExecContext

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

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

func (*CardCreate) ExecX

func (cc *CardCreate) ExecX(ctx context.Context)

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

func (*CardCreate) Mutation

func (cc *CardCreate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardCreate) OnConflict

func (cc *CardCreate) OnConflict(opts ...sql.ConflictOption) *CardUpsertOne

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

client.Card.Create().
	SetLiteralID(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.CardUpsert) {
		SetLiteralID(v+v).
	}).
	Exec(ctx)

func (*CardCreate) OnConflictColumns

func (cc *CardCreate) OnConflictColumns(columns ...string) *CardUpsertOne

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

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

func (*CardCreate) QueryContext

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

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

func (*CardCreate) Save

func (cc *CardCreate) Save(ctx context.Context) (*Card, error)

Save creates the Card in the database.

func (*CardCreate) SaveX

func (cc *CardCreate) SaveX(ctx context.Context) *Card

SaveX calls Save and panics if Save returns an error.

func (*CardCreate) SetCardSpecialColor

func (cc *CardCreate) SetCardSpecialColor(c *CardSpecialColor) *CardCreate

SetCardSpecialColor sets the "card_special_color" edge to the CardSpecialColor entity.

func (*CardCreate) SetCardSpecialColorID

func (cc *CardCreate) SetCardSpecialColorID(i int) *CardCreate

SetCardSpecialColorID sets the "card_special_color_id" field.

func (*CardCreate) SetCardType

func (cc *CardCreate) SetCardType(c *CardType) *CardCreate

SetCardType sets the "card_type" edge to the CardType entity.

func (*CardCreate) SetCardTypeID

func (cc *CardCreate) SetCardTypeID(i int) *CardCreate

SetCardTypeID sets the "card_type_id" field.

func (*CardCreate) SetCost

func (cc *CardCreate) SetCost(s string) *CardCreate

SetCost sets the "cost" field.

func (*CardCreate) SetDeck

func (cc *CardCreate) SetDeck(d *Deck) *CardCreate

SetDeck sets the "deck" edge to the Deck entity.

func (*CardCreate) SetDeckID

func (cc *CardCreate) SetDeckID(i int) *CardCreate

SetDeckID sets the "deck_id" field.

func (*CardCreate) SetDescription

func (cc *CardCreate) SetDescription(s string) *CardCreate

SetDescription sets the "description" field.

func (*CardCreate) SetHasActionsBoosterIcon

func (cc *CardCreate) SetHasActionsBoosterIcon(b bool) *CardCreate

SetHasActionsBoosterIcon sets the "has_actions_booster_icon" field.

func (*CardCreate) SetHasArrow

func (cc *CardCreate) SetHasArrow(b bool) *CardCreate

SetHasArrow sets the "has_arrow" field.

func (*CardCreate) SetHasBonusPointIcon

func (cc *CardCreate) SetHasBonusPointIcon(b bool) *CardCreate

SetHasBonusPointIcon sets the "has_bonus_point_icon" field.

func (*CardCreate) SetHasBreadIcon

func (cc *CardCreate) SetHasBreadIcon(b bool) *CardCreate

SetHasBreadIcon sets the "has_bread_icon" field.

func (*CardCreate) SetHasBuildingResourceProviderIcon

func (cc *CardCreate) SetHasBuildingResourceProviderIcon(b bool) *CardCreate

SetHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field.

func (*CardCreate) SetHasCropProviderIcon

func (cc *CardCreate) SetHasCropProviderIcon(b bool) *CardCreate

SetHasCropProviderIcon sets the "has_crop_provider_icon" field.

func (*CardCreate) SetHasCutPeatIcon

func (cc *CardCreate) SetHasCutPeatIcon(b bool) *CardCreate

SetHasCutPeatIcon sets the "has_cut_peat_icon" field.

func (*CardCreate) SetHasFarmPlannerIcon

func (cc *CardCreate) SetHasFarmPlannerIcon(b bool) *CardCreate

SetHasFarmPlannerIcon sets the "has_farm_planner_icon" field.

func (*CardCreate) SetHasFellTreesIcon

func (cc *CardCreate) SetHasFellTreesIcon(b bool) *CardCreate

SetHasFellTreesIcon sets the "has_fell_trees_icon" field.

func (*CardCreate) SetHasFoodProviderIcon

func (cc *CardCreate) SetHasFoodProviderIcon(b bool) *CardCreate

SetHasFoodProviderIcon sets the "has_food_provider_icon" field.

func (*CardCreate) SetHasGoodsProviderIcon

func (cc *CardCreate) SetHasGoodsProviderIcon(b bool) *CardCreate

SetHasGoodsProviderIcon sets the "has_goods_provider_icon" field.

func (*CardCreate) SetHasHiringFareIcon

func (cc *CardCreate) SetHasHiringFareIcon(b bool) *CardCreate

SetHasHiringFareIcon sets the "has_hiring_fare_icon" field.

func (*CardCreate) SetHasLivestockProviderIcon

func (cc *CardCreate) SetHasLivestockProviderIcon(b bool) *CardCreate

SetHasLivestockProviderIcon sets the "has_livestock_provider_icon" field.

func (*CardCreate) SetHasNegativeBonusPointIcon

func (cc *CardCreate) SetHasNegativeBonusPointIcon(b bool) *CardCreate

SetHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field.

func (*CardCreate) SetHasPanIcon

func (cc *CardCreate) SetHasPanIcon(b bool) *CardCreate

SetHasPanIcon sets the "has_pan_icon" field.

func (*CardCreate) SetHasPointsProviderIcon

func (cc *CardCreate) SetHasPointsProviderIcon(b bool) *CardCreate

SetHasPointsProviderIcon sets the "has_points_provider_icon" field.

func (*CardCreate) SetHasSlashAndBurnIcon

func (cc *CardCreate) SetHasSlashAndBurnIcon(b bool) *CardCreate

SetHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field.

func (*CardCreate) SetID

func (cc *CardCreate) SetID(i int) *CardCreate

SetID sets the "id" field.

func (*CardCreate) SetIsOfficialJa

func (cc *CardCreate) SetIsOfficialJa(b bool) *CardCreate

SetIsOfficialJa sets the "is_official_ja" field.

func (*CardCreate) SetLiteralID

func (cc *CardCreate) SetLiteralID(s string) *CardCreate

SetLiteralID sets the "literal_id" field.

func (*CardCreate) SetMinPlayersNumber

func (cc *CardCreate) SetMinPlayersNumber(i int) *CardCreate

SetMinPlayersNumber sets the "min_players_number" field.

func (*CardCreate) SetNameEn

func (cc *CardCreate) SetNameEn(s string) *CardCreate

SetNameEn sets the "name_en" field.

func (*CardCreate) SetNameJa

func (cc *CardCreate) SetNameJa(s string) *CardCreate

SetNameJa sets the "name_ja" field.

func (*CardCreate) SetNillableCardSpecialColorID

func (cc *CardCreate) SetNillableCardSpecialColorID(i *int) *CardCreate

SetNillableCardSpecialColorID sets the "card_special_color_id" field if the given value is not nil.

func (*CardCreate) SetNillableCost

func (cc *CardCreate) SetNillableCost(s *string) *CardCreate

SetNillableCost sets the "cost" field if the given value is not nil.

func (*CardCreate) SetNillableDeckID

func (cc *CardCreate) SetNillableDeckID(i *int) *CardCreate

SetNillableDeckID sets the "deck_id" field if the given value is not nil.

func (*CardCreate) SetNillableDescription

func (cc *CardCreate) SetNillableDescription(s *string) *CardCreate

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

func (*CardCreate) SetNillableMinPlayersNumber

func (cc *CardCreate) SetNillableMinPlayersNumber(i *int) *CardCreate

SetNillableMinPlayersNumber sets the "min_players_number" field if the given value is not nil.

func (*CardCreate) SetNillableNameEn

func (cc *CardCreate) SetNillableNameEn(s *string) *CardCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardCreate) SetNillableNameJa

func (cc *CardCreate) SetNillableNameJa(s *string) *CardCreate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*CardCreate) SetNillableNote

func (cc *CardCreate) SetNillableNote(s *string) *CardCreate

SetNillableNote sets the "note" field if the given value is not nil.

func (*CardCreate) SetNillablePlayAgricolaCardID

func (cc *CardCreate) SetNillablePlayAgricolaCardID(s *string) *CardCreate

SetNillablePlayAgricolaCardID sets the "play_agricola_card_id" field if the given value is not nil.

func (*CardCreate) SetNillablePrerequisite

func (cc *CardCreate) SetNillablePrerequisite(s *string) *CardCreate

SetNillablePrerequisite sets the "prerequisite" field if the given value is not nil.

func (*CardCreate) SetNillablePrintedID

func (cc *CardCreate) SetNillablePrintedID(s *string) *CardCreate

SetNillablePrintedID sets the "printed_id" field if the given value is not nil.

func (*CardCreate) SetNillableSpecialVictoryPoint

func (cc *CardCreate) SetNillableSpecialVictoryPoint(s *string) *CardCreate

SetNillableSpecialVictoryPoint sets the "special_victory_point" field if the given value is not nil.

func (*CardCreate) SetNillableVictoryPoint

func (cc *CardCreate) SetNillableVictoryPoint(i *int) *CardCreate

SetNillableVictoryPoint sets the "victory_point" field if the given value is not nil.

func (*CardCreate) SetNote

func (cc *CardCreate) SetNote(s string) *CardCreate

SetNote sets the "note" field.

func (*CardCreate) SetPlayAgricolaCardID

func (cc *CardCreate) SetPlayAgricolaCardID(s string) *CardCreate

SetPlayAgricolaCardID sets the "play_agricola_card_id" field.

func (*CardCreate) SetPrerequisite

func (cc *CardCreate) SetPrerequisite(s string) *CardCreate

SetPrerequisite sets the "prerequisite" field.

func (*CardCreate) SetPrintedID

func (cc *CardCreate) SetPrintedID(s string) *CardCreate

SetPrintedID sets the "printed_id" field.

func (*CardCreate) SetRevision

func (cc *CardCreate) SetRevision(r *Revision) *CardCreate

SetRevision sets the "revision" edge to the Revision entity.

func (*CardCreate) SetRevisionID

func (cc *CardCreate) SetRevisionID(i int) *CardCreate

SetRevisionID sets the "revision_id" field.

func (*CardCreate) SetSpecialVictoryPoint

func (cc *CardCreate) SetSpecialVictoryPoint(s string) *CardCreate

SetSpecialVictoryPoint sets the "special_victory_point" field.

func (*CardCreate) SetVictoryPoint

func (cc *CardCreate) SetVictoryPoint(i int) *CardCreate

SetVictoryPoint sets the "victory_point" field.

type CardCreateBulk

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

CardCreateBulk is the builder for creating many Card entities in bulk.

func (*CardCreateBulk) Exec

func (ccb *CardCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CardCreateBulk) ExecContext

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

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

func (*CardCreateBulk) ExecX

func (ccb *CardCreateBulk) ExecX(ctx context.Context)

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

func (*CardCreateBulk) OnConflict

func (ccb *CardCreateBulk) OnConflict(opts ...sql.ConflictOption) *CardUpsertBulk

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

client.Card.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.CardUpsert) {
		SetLiteralID(v+v).
	}).
	Exec(ctx)

func (*CardCreateBulk) OnConflictColumns

func (ccb *CardCreateBulk) OnConflictColumns(columns ...string) *CardUpsertBulk

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

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

func (*CardCreateBulk) QueryContext

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

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

func (*CardCreateBulk) Save

func (ccb *CardCreateBulk) Save(ctx context.Context) ([]*Card, error)

Save creates the Card entities in the database.

func (*CardCreateBulk) SaveX

func (ccb *CardCreateBulk) SaveX(ctx context.Context) []*Card

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

type CardDelete

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

CardDelete is the builder for deleting a Card entity.

func (*CardDelete) Exec

func (cd *CardDelete) Exec(ctx context.Context) (int, error)

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

func (*CardDelete) ExecContext

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

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

func (*CardDelete) ExecX

func (cd *CardDelete) ExecX(ctx context.Context) int

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

func (*CardDelete) QueryContext

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

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

func (*CardDelete) Where

func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete

Where appends a list predicates to the CardDelete builder.

type CardDeleteOne

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

CardDeleteOne is the builder for deleting a single Card entity.

func (*CardDeleteOne) Exec

func (cdo *CardDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CardDeleteOne) ExecX

func (cdo *CardDeleteOne) ExecX(ctx context.Context)

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

func (*CardDeleteOne) Where

func (cdo *CardDeleteOne) Where(ps ...predicate.Card) *CardDeleteOne

Where appends a list predicates to the CardDelete builder.

type CardEdge

type CardEdge struct {
	Node   *Card  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

CardEdge is the edge representation of Card.

type CardEdges

type CardEdges struct {
	// Revision holds the value of the revision edge.
	Revision *Revision `json:"revision,omitempty"`
	// Products holds the value of the products edge.
	Products []*Product `json:"products,omitempty"`
	// Deck holds the value of the deck edge.
	Deck *Deck `json:"deck,omitempty"`
	// CardType holds the value of the card_type edge.
	CardType *CardType `json:"card_type,omitempty"`
	// CardSpecialColor holds the value of the card_special_color edge.
	CardSpecialColor *CardSpecialColor `json:"card_special_color,omitempty"`
	// Children holds the value of the children edge.
	Children []*Card `json:"children,omitempty"`
	// Ancestors holds the value of the ancestors edge.
	Ancestors []*Card `json:"ancestors,omitempty"`
	// contains filtered or unexported fields
}

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

func (CardEdges) AncestorsOrErr

func (e CardEdges) AncestorsOrErr() ([]*Card, error)

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

func (CardEdges) CardSpecialColorOrErr

func (e CardEdges) CardSpecialColorOrErr() (*CardSpecialColor, error)

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

func (CardEdges) CardTypeOrErr

func (e CardEdges) CardTypeOrErr() (*CardType, error)

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

func (CardEdges) ChildrenOrErr

func (e CardEdges) ChildrenOrErr() ([]*Card, error)

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

func (CardEdges) DeckOrErr

func (e CardEdges) DeckOrErr() (*Deck, error)

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

func (CardEdges) ProductsOrErr

func (e CardEdges) ProductsOrErr() ([]*Product, error)

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

func (CardEdges) RevisionOrErr

func (e CardEdges) RevisionOrErr() (*Revision, error)

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

type CardGroupBy

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

CardGroupBy is the group-by builder for Card entities.

func (*CardGroupBy) Aggregate

func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy

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

func (*CardGroupBy) Bool

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

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

func (*CardGroupBy) BoolX

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

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

func (*CardGroupBy) Bools

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

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

func (*CardGroupBy) BoolsX

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

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

func (*CardGroupBy) Float64

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

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

func (*CardGroupBy) Float64X

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

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

func (*CardGroupBy) Float64s

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

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

func (*CardGroupBy) Float64sX

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

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

func (*CardGroupBy) Int

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

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

func (*CardGroupBy) IntX

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

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

func (*CardGroupBy) Ints

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

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

func (*CardGroupBy) IntsX

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

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

func (*CardGroupBy) Scan

func (cgb *CardGroupBy) Scan(ctx context.Context, v any) error

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

func (*CardGroupBy) ScanX

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

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

func (*CardGroupBy) String

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

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

func (*CardGroupBy) StringX

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

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

func (*CardGroupBy) Strings

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

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

func (*CardGroupBy) StringsX

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

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

type CardMutation

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

CardMutation represents an operation that mutates the Card nodes in the graph.

func (*CardMutation) AddAncestorIDs

func (m *CardMutation) AddAncestorIDs(ids ...int)

AddAncestorIDs adds the "ancestors" edge to the Card entity by ids.

func (*CardMutation) AddChildIDs

func (m *CardMutation) AddChildIDs(ids ...int)

AddChildIDs adds the "children" edge to the Card entity by ids.

func (*CardMutation) AddField

func (m *CardMutation) 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 (*CardMutation) AddMinPlayersNumber

func (m *CardMutation) AddMinPlayersNumber(i int)

AddMinPlayersNumber adds i to the "min_players_number" field.

func (*CardMutation) AddProductIDs

func (m *CardMutation) AddProductIDs(ids ...int)

AddProductIDs adds the "products" edge to the Product entity by ids.

func (*CardMutation) AddVictoryPoint

func (m *CardMutation) AddVictoryPoint(i int)

AddVictoryPoint adds i to the "victory_point" field.

func (*CardMutation) AddedEdges

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

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

func (*CardMutation) AddedField

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

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

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

func (*CardMutation) AddedIDs

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

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

func (*CardMutation) AddedMinPlayersNumber

func (m *CardMutation) AddedMinPlayersNumber() (r int, exists bool)

AddedMinPlayersNumber returns the value that was added to the "min_players_number" field in this mutation.

func (*CardMutation) AddedVictoryPoint

func (m *CardMutation) AddedVictoryPoint() (r int, exists bool)

AddedVictoryPoint returns the value that was added to the "victory_point" field in this mutation.

func (*CardMutation) AncestorsCleared

func (m *CardMutation) AncestorsCleared() bool

AncestorsCleared reports if the "ancestors" edge to the Card entity was cleared.

func (*CardMutation) AncestorsIDs

func (m *CardMutation) AncestorsIDs() (ids []int)

AncestorsIDs returns the "ancestors" edge IDs in the mutation.

func (*CardMutation) CardSpecialColorCleared

func (m *CardMutation) CardSpecialColorCleared() bool

CardSpecialColorCleared reports if the "card_special_color" edge to the CardSpecialColor entity was cleared.

func (*CardMutation) CardSpecialColorID

func (m *CardMutation) CardSpecialColorID() (r int, exists bool)

CardSpecialColorID returns the value of the "card_special_color_id" field in the mutation.

func (*CardMutation) CardSpecialColorIDCleared

func (m *CardMutation) CardSpecialColorIDCleared() bool

CardSpecialColorIDCleared returns if the "card_special_color_id" field was cleared in this mutation.

func (*CardMutation) CardSpecialColorIDs

func (m *CardMutation) CardSpecialColorIDs() (ids []int)

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

func (*CardMutation) CardTypeCleared

func (m *CardMutation) CardTypeCleared() bool

CardTypeCleared reports if the "card_type" edge to the CardType entity was cleared.

func (*CardMutation) CardTypeID

func (m *CardMutation) CardTypeID() (r int, exists bool)

CardTypeID returns the value of the "card_type_id" field in the mutation.

func (*CardMutation) CardTypeIDs

func (m *CardMutation) CardTypeIDs() (ids []int)

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

func (*CardMutation) ChildrenCleared

func (m *CardMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the Card entity was cleared.

func (*CardMutation) ChildrenIDs

func (m *CardMutation) ChildrenIDs() (ids []int)

ChildrenIDs returns the "children" edge IDs in the mutation.

func (*CardMutation) ClearAncestors

func (m *CardMutation) ClearAncestors()

ClearAncestors clears the "ancestors" edge to the Card entity.

func (*CardMutation) ClearCardSpecialColor

func (m *CardMutation) ClearCardSpecialColor()

ClearCardSpecialColor clears the "card_special_color" edge to the CardSpecialColor entity.

func (*CardMutation) ClearCardSpecialColorID

func (m *CardMutation) ClearCardSpecialColorID()

ClearCardSpecialColorID clears the value of the "card_special_color_id" field.

func (*CardMutation) ClearCardType

func (m *CardMutation) ClearCardType()

ClearCardType clears the "card_type" edge to the CardType entity.

func (*CardMutation) ClearChildren

func (m *CardMutation) ClearChildren()

ClearChildren clears the "children" edge to the Card entity.

func (*CardMutation) ClearCost

func (m *CardMutation) ClearCost()

ClearCost clears the value of the "cost" field.

func (*CardMutation) ClearDeck

func (m *CardMutation) ClearDeck()

ClearDeck clears the "deck" edge to the Deck entity.

func (*CardMutation) ClearDeckID

func (m *CardMutation) ClearDeckID()

ClearDeckID clears the value of the "deck_id" field.

func (*CardMutation) ClearDescription

func (m *CardMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*CardMutation) ClearEdge

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

func (m *CardMutation) 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 (*CardMutation) ClearMinPlayersNumber

func (m *CardMutation) ClearMinPlayersNumber()

ClearMinPlayersNumber clears the value of the "min_players_number" field.

func (*CardMutation) ClearNameEn

func (m *CardMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*CardMutation) ClearNameJa

func (m *CardMutation) ClearNameJa()

ClearNameJa clears the value of the "name_ja" field.

func (*CardMutation) ClearNote

func (m *CardMutation) ClearNote()

ClearNote clears the value of the "note" field.

func (*CardMutation) ClearPlayAgricolaCardID

func (m *CardMutation) ClearPlayAgricolaCardID()

ClearPlayAgricolaCardID clears the value of the "play_agricola_card_id" field.

func (*CardMutation) ClearPrerequisite

func (m *CardMutation) ClearPrerequisite()

ClearPrerequisite clears the value of the "prerequisite" field.

func (*CardMutation) ClearPrintedID

func (m *CardMutation) ClearPrintedID()

ClearPrintedID clears the value of the "printed_id" field.

func (*CardMutation) ClearProducts

func (m *CardMutation) ClearProducts()

ClearProducts clears the "products" edge to the Product entity.

func (*CardMutation) ClearRevision

func (m *CardMutation) ClearRevision()

ClearRevision clears the "revision" edge to the Revision entity.

func (*CardMutation) ClearSpecialVictoryPoint

func (m *CardMutation) ClearSpecialVictoryPoint()

ClearSpecialVictoryPoint clears the value of the "special_victory_point" field.

func (*CardMutation) ClearVictoryPoint

func (m *CardMutation) ClearVictoryPoint()

ClearVictoryPoint clears the value of the "victory_point" field.

func (*CardMutation) ClearedEdges

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

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

func (*CardMutation) ClearedFields

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

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

func (CardMutation) Client

func (m CardMutation) 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 (*CardMutation) Cost

func (m *CardMutation) Cost() (r string, exists bool)

Cost returns the value of the "cost" field in the mutation.

func (*CardMutation) CostCleared

func (m *CardMutation) CostCleared() bool

CostCleared returns if the "cost" field was cleared in this mutation.

func (*CardMutation) DeckCleared

func (m *CardMutation) DeckCleared() bool

DeckCleared reports if the "deck" edge to the Deck entity was cleared.

func (*CardMutation) DeckID

func (m *CardMutation) DeckID() (r int, exists bool)

DeckID returns the value of the "deck_id" field in the mutation.

func (*CardMutation) DeckIDCleared

func (m *CardMutation) DeckIDCleared() bool

DeckIDCleared returns if the "deck_id" field was cleared in this mutation.

func (*CardMutation) DeckIDs

func (m *CardMutation) DeckIDs() (ids []int)

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

func (*CardMutation) Description

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

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

func (*CardMutation) DescriptionCleared

func (m *CardMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*CardMutation) EdgeCleared

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

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

func (*CardMutation) ExecContext

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

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

func (*CardMutation) Field

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

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

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

func (*CardMutation) Fields

func (m *CardMutation) 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 (*CardMutation) HasActionsBoosterIcon

func (m *CardMutation) HasActionsBoosterIcon() (r bool, exists bool)

HasActionsBoosterIcon returns the value of the "has_actions_booster_icon" field in the mutation.

func (*CardMutation) HasArrow

func (m *CardMutation) HasArrow() (r bool, exists bool)

HasArrow returns the value of the "has_arrow" field in the mutation.

func (*CardMutation) HasBonusPointIcon

func (m *CardMutation) HasBonusPointIcon() (r bool, exists bool)

HasBonusPointIcon returns the value of the "has_bonus_point_icon" field in the mutation.

func (*CardMutation) HasBreadIcon

func (m *CardMutation) HasBreadIcon() (r bool, exists bool)

HasBreadIcon returns the value of the "has_bread_icon" field in the mutation.

func (*CardMutation) HasBuildingResourceProviderIcon

func (m *CardMutation) HasBuildingResourceProviderIcon() (r bool, exists bool)

HasBuildingResourceProviderIcon returns the value of the "has_building_resource_provider_icon" field in the mutation.

func (*CardMutation) HasCropProviderIcon

func (m *CardMutation) HasCropProviderIcon() (r bool, exists bool)

HasCropProviderIcon returns the value of the "has_crop_provider_icon" field in the mutation.

func (*CardMutation) HasCutPeatIcon

func (m *CardMutation) HasCutPeatIcon() (r bool, exists bool)

HasCutPeatIcon returns the value of the "has_cut_peat_icon" field in the mutation.

func (*CardMutation) HasFarmPlannerIcon

func (m *CardMutation) HasFarmPlannerIcon() (r bool, exists bool)

HasFarmPlannerIcon returns the value of the "has_farm_planner_icon" field in the mutation.

func (*CardMutation) HasFellTreesIcon

func (m *CardMutation) HasFellTreesIcon() (r bool, exists bool)

HasFellTreesIcon returns the value of the "has_fell_trees_icon" field in the mutation.

func (*CardMutation) HasFoodProviderIcon

func (m *CardMutation) HasFoodProviderIcon() (r bool, exists bool)

HasFoodProviderIcon returns the value of the "has_food_provider_icon" field in the mutation.

func (*CardMutation) HasGoodsProviderIcon

func (m *CardMutation) HasGoodsProviderIcon() (r bool, exists bool)

HasGoodsProviderIcon returns the value of the "has_goods_provider_icon" field in the mutation.

func (*CardMutation) HasHiringFareIcon

func (m *CardMutation) HasHiringFareIcon() (r bool, exists bool)

HasHiringFareIcon returns the value of the "has_hiring_fare_icon" field in the mutation.

func (*CardMutation) HasLivestockProviderIcon

func (m *CardMutation) HasLivestockProviderIcon() (r bool, exists bool)

HasLivestockProviderIcon returns the value of the "has_livestock_provider_icon" field in the mutation.

func (*CardMutation) HasNegativeBonusPointIcon

func (m *CardMutation) HasNegativeBonusPointIcon() (r bool, exists bool)

HasNegativeBonusPointIcon returns the value of the "has_negative_bonus_point_icon" field in the mutation.

func (*CardMutation) HasPanIcon

func (m *CardMutation) HasPanIcon() (r bool, exists bool)

HasPanIcon returns the value of the "has_pan_icon" field in the mutation.

func (*CardMutation) HasPointsProviderIcon

func (m *CardMutation) HasPointsProviderIcon() (r bool, exists bool)

HasPointsProviderIcon returns the value of the "has_points_provider_icon" field in the mutation.

func (*CardMutation) HasSlashAndBurnIcon

func (m *CardMutation) HasSlashAndBurnIcon() (r bool, exists bool)

HasSlashAndBurnIcon returns the value of the "has_slash_and_burn_icon" field in the mutation.

func (*CardMutation) ID

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

func (m *CardMutation) 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 (*CardMutation) IsOfficialJa

func (m *CardMutation) IsOfficialJa() (r bool, exists bool)

IsOfficialJa returns the value of the "is_official_ja" field in the mutation.

func (*CardMutation) LiteralID

func (m *CardMutation) LiteralID() (r string, exists bool)

LiteralID returns the value of the "literal_id" field in the mutation.

func (*CardMutation) MinPlayersNumber

func (m *CardMutation) MinPlayersNumber() (r int, exists bool)

MinPlayersNumber returns the value of the "min_players_number" field in the mutation.

func (*CardMutation) MinPlayersNumberCleared

func (m *CardMutation) MinPlayersNumberCleared() bool

MinPlayersNumberCleared returns if the "min_players_number" field was cleared in this mutation.

func (*CardMutation) NameEn

func (m *CardMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*CardMutation) NameEnCleared

func (m *CardMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*CardMutation) NameJa

func (m *CardMutation) NameJa() (r string, exists bool)

NameJa returns the value of the "name_ja" field in the mutation.

func (*CardMutation) NameJaCleared

func (m *CardMutation) NameJaCleared() bool

NameJaCleared returns if the "name_ja" field was cleared in this mutation.

func (*CardMutation) Note

func (m *CardMutation) Note() (r string, exists bool)

Note returns the value of the "note" field in the mutation.

func (*CardMutation) NoteCleared

func (m *CardMutation) NoteCleared() bool

NoteCleared returns if the "note" field was cleared in this mutation.

func (*CardMutation) OldCardSpecialColorID

func (m *CardMutation) OldCardSpecialColorID(ctx context.Context) (v int, err error)

OldCardSpecialColorID returns the old "card_special_color_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldCardTypeID

func (m *CardMutation) OldCardTypeID(ctx context.Context) (v int, err error)

OldCardTypeID returns the old "card_type_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldCost

func (m *CardMutation) OldCost(ctx context.Context) (v *string, err error)

OldCost returns the old "cost" field's value of the Card entity. If the Card 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 (*CardMutation) OldDeckID

func (m *CardMutation) OldDeckID(ctx context.Context) (v int, err error)

OldDeckID returns the old "deck_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldDescription

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

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

func (m *CardMutation) 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 (*CardMutation) OldHasActionsBoosterIcon

func (m *CardMutation) OldHasActionsBoosterIcon(ctx context.Context) (v bool, err error)

OldHasActionsBoosterIcon returns the old "has_actions_booster_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasArrow

func (m *CardMutation) OldHasArrow(ctx context.Context) (v bool, err error)

OldHasArrow returns the old "has_arrow" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasBonusPointIcon

func (m *CardMutation) OldHasBonusPointIcon(ctx context.Context) (v bool, err error)

OldHasBonusPointIcon returns the old "has_bonus_point_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasBreadIcon

func (m *CardMutation) OldHasBreadIcon(ctx context.Context) (v bool, err error)

OldHasBreadIcon returns the old "has_bread_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasBuildingResourceProviderIcon

func (m *CardMutation) OldHasBuildingResourceProviderIcon(ctx context.Context) (v bool, err error)

OldHasBuildingResourceProviderIcon returns the old "has_building_resource_provider_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasCropProviderIcon

func (m *CardMutation) OldHasCropProviderIcon(ctx context.Context) (v bool, err error)

OldHasCropProviderIcon returns the old "has_crop_provider_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasCutPeatIcon

func (m *CardMutation) OldHasCutPeatIcon(ctx context.Context) (v bool, err error)

OldHasCutPeatIcon returns the old "has_cut_peat_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasFarmPlannerIcon

func (m *CardMutation) OldHasFarmPlannerIcon(ctx context.Context) (v bool, err error)

OldHasFarmPlannerIcon returns the old "has_farm_planner_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasFellTreesIcon

func (m *CardMutation) OldHasFellTreesIcon(ctx context.Context) (v bool, err error)

OldHasFellTreesIcon returns the old "has_fell_trees_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasFoodProviderIcon

func (m *CardMutation) OldHasFoodProviderIcon(ctx context.Context) (v bool, err error)

OldHasFoodProviderIcon returns the old "has_food_provider_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasGoodsProviderIcon

func (m *CardMutation) OldHasGoodsProviderIcon(ctx context.Context) (v bool, err error)

OldHasGoodsProviderIcon returns the old "has_goods_provider_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasHiringFareIcon

func (m *CardMutation) OldHasHiringFareIcon(ctx context.Context) (v bool, err error)

OldHasHiringFareIcon returns the old "has_hiring_fare_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasLivestockProviderIcon

func (m *CardMutation) OldHasLivestockProviderIcon(ctx context.Context) (v bool, err error)

OldHasLivestockProviderIcon returns the old "has_livestock_provider_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasNegativeBonusPointIcon

func (m *CardMutation) OldHasNegativeBonusPointIcon(ctx context.Context) (v bool, err error)

OldHasNegativeBonusPointIcon returns the old "has_negative_bonus_point_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasPanIcon

func (m *CardMutation) OldHasPanIcon(ctx context.Context) (v bool, err error)

OldHasPanIcon returns the old "has_pan_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasPointsProviderIcon

func (m *CardMutation) OldHasPointsProviderIcon(ctx context.Context) (v bool, err error)

OldHasPointsProviderIcon returns the old "has_points_provider_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldHasSlashAndBurnIcon

func (m *CardMutation) OldHasSlashAndBurnIcon(ctx context.Context) (v bool, err error)

OldHasSlashAndBurnIcon returns the old "has_slash_and_burn_icon" field's value of the Card entity. If the Card 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 (*CardMutation) OldIsOfficialJa

func (m *CardMutation) OldIsOfficialJa(ctx context.Context) (v bool, err error)

OldIsOfficialJa returns the old "is_official_ja" field's value of the Card entity. If the Card 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 (*CardMutation) OldLiteralID

func (m *CardMutation) OldLiteralID(ctx context.Context) (v string, err error)

OldLiteralID returns the old "literal_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldMinPlayersNumber

func (m *CardMutation) OldMinPlayersNumber(ctx context.Context) (v *int, err error)

OldMinPlayersNumber returns the old "min_players_number" field's value of the Card entity. If the Card 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 (*CardMutation) OldNameEn

func (m *CardMutation) OldNameEn(ctx context.Context) (v *string, err error)

OldNameEn returns the old "name_en" field's value of the Card entity. If the Card 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 (*CardMutation) OldNameJa

func (m *CardMutation) OldNameJa(ctx context.Context) (v *string, err error)

OldNameJa returns the old "name_ja" field's value of the Card entity. If the Card 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 (*CardMutation) OldNote

func (m *CardMutation) OldNote(ctx context.Context) (v *string, err error)

OldNote returns the old "note" field's value of the Card entity. If the Card 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 (*CardMutation) OldPlayAgricolaCardID

func (m *CardMutation) OldPlayAgricolaCardID(ctx context.Context) (v *string, err error)

OldPlayAgricolaCardID returns the old "play_agricola_card_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldPrerequisite

func (m *CardMutation) OldPrerequisite(ctx context.Context) (v *string, err error)

OldPrerequisite returns the old "prerequisite" field's value of the Card entity. If the Card 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 (*CardMutation) OldPrintedID

func (m *CardMutation) OldPrintedID(ctx context.Context) (v *string, err error)

OldPrintedID returns the old "printed_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldRevisionID

func (m *CardMutation) OldRevisionID(ctx context.Context) (v int, err error)

OldRevisionID returns the old "revision_id" field's value of the Card entity. If the Card 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 (*CardMutation) OldSpecialVictoryPoint

func (m *CardMutation) OldSpecialVictoryPoint(ctx context.Context) (v *string, err error)

OldSpecialVictoryPoint returns the old "special_victory_point" field's value of the Card entity. If the Card 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 (*CardMutation) OldVictoryPoint

func (m *CardMutation) OldVictoryPoint(ctx context.Context) (v *int, err error)

OldVictoryPoint returns the old "victory_point" field's value of the Card entity. If the Card 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 (*CardMutation) Op

func (m *CardMutation) Op() Op

Op returns the operation name.

func (*CardMutation) PlayAgricolaCardID

func (m *CardMutation) PlayAgricolaCardID() (r string, exists bool)

PlayAgricolaCardID returns the value of the "play_agricola_card_id" field in the mutation.

func (*CardMutation) PlayAgricolaCardIDCleared

func (m *CardMutation) PlayAgricolaCardIDCleared() bool

PlayAgricolaCardIDCleared returns if the "play_agricola_card_id" field was cleared in this mutation.

func (*CardMutation) Prerequisite

func (m *CardMutation) Prerequisite() (r string, exists bool)

Prerequisite returns the value of the "prerequisite" field in the mutation.

func (*CardMutation) PrerequisiteCleared

func (m *CardMutation) PrerequisiteCleared() bool

PrerequisiteCleared returns if the "prerequisite" field was cleared in this mutation.

func (*CardMutation) PrintedID

func (m *CardMutation) PrintedID() (r string, exists bool)

PrintedID returns the value of the "printed_id" field in the mutation.

func (*CardMutation) PrintedIDCleared

func (m *CardMutation) PrintedIDCleared() bool

PrintedIDCleared returns if the "printed_id" field was cleared in this mutation.

func (*CardMutation) ProductsCleared

func (m *CardMutation) ProductsCleared() bool

ProductsCleared reports if the "products" edge to the Product entity was cleared.

func (*CardMutation) ProductsIDs

func (m *CardMutation) ProductsIDs() (ids []int)

ProductsIDs returns the "products" edge IDs in the mutation.

func (*CardMutation) QueryContext

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

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

func (*CardMutation) RemoveAncestorIDs

func (m *CardMutation) RemoveAncestorIDs(ids ...int)

RemoveAncestorIDs removes the "ancestors" edge to the Card entity by IDs.

func (*CardMutation) RemoveChildIDs

func (m *CardMutation) RemoveChildIDs(ids ...int)

RemoveChildIDs removes the "children" edge to the Card entity by IDs.

func (*CardMutation) RemoveProductIDs

func (m *CardMutation) RemoveProductIDs(ids ...int)

RemoveProductIDs removes the "products" edge to the Product entity by IDs.

func (*CardMutation) RemovedAncestorsIDs

func (m *CardMutation) RemovedAncestorsIDs() (ids []int)

RemovedAncestors returns the removed IDs of the "ancestors" edge to the Card entity.

func (*CardMutation) RemovedChildrenIDs

func (m *CardMutation) RemovedChildrenIDs() (ids []int)

RemovedChildren returns the removed IDs of the "children" edge to the Card entity.

func (*CardMutation) RemovedEdges

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

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

func (*CardMutation) RemovedIDs

func (m *CardMutation) 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 (*CardMutation) RemovedProductsIDs

func (m *CardMutation) RemovedProductsIDs() (ids []int)

RemovedProducts returns the removed IDs of the "products" edge to the Product entity.

func (*CardMutation) ResetAncestors

func (m *CardMutation) ResetAncestors()

ResetAncestors resets all changes to the "ancestors" edge.

func (*CardMutation) ResetCardSpecialColor

func (m *CardMutation) ResetCardSpecialColor()

ResetCardSpecialColor resets all changes to the "card_special_color" edge.

func (*CardMutation) ResetCardSpecialColorID

func (m *CardMutation) ResetCardSpecialColorID()

ResetCardSpecialColorID resets all changes to the "card_special_color_id" field.

func (*CardMutation) ResetCardType

func (m *CardMutation) ResetCardType()

ResetCardType resets all changes to the "card_type" edge.

func (*CardMutation) ResetCardTypeID

func (m *CardMutation) ResetCardTypeID()

ResetCardTypeID resets all changes to the "card_type_id" field.

func (*CardMutation) ResetChildren

func (m *CardMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

func (*CardMutation) ResetCost

func (m *CardMutation) ResetCost()

ResetCost resets all changes to the "cost" field.

func (*CardMutation) ResetDeck

func (m *CardMutation) ResetDeck()

ResetDeck resets all changes to the "deck" edge.

func (*CardMutation) ResetDeckID

func (m *CardMutation) ResetDeckID()

ResetDeckID resets all changes to the "deck_id" field.

func (*CardMutation) ResetDescription

func (m *CardMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*CardMutation) ResetEdge

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

func (m *CardMutation) 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 (*CardMutation) ResetHasActionsBoosterIcon

func (m *CardMutation) ResetHasActionsBoosterIcon()

ResetHasActionsBoosterIcon resets all changes to the "has_actions_booster_icon" field.

func (*CardMutation) ResetHasArrow

func (m *CardMutation) ResetHasArrow()

ResetHasArrow resets all changes to the "has_arrow" field.

func (*CardMutation) ResetHasBonusPointIcon

func (m *CardMutation) ResetHasBonusPointIcon()

ResetHasBonusPointIcon resets all changes to the "has_bonus_point_icon" field.

func (*CardMutation) ResetHasBreadIcon

func (m *CardMutation) ResetHasBreadIcon()

ResetHasBreadIcon resets all changes to the "has_bread_icon" field.

func (*CardMutation) ResetHasBuildingResourceProviderIcon

func (m *CardMutation) ResetHasBuildingResourceProviderIcon()

ResetHasBuildingResourceProviderIcon resets all changes to the "has_building_resource_provider_icon" field.

func (*CardMutation) ResetHasCropProviderIcon

func (m *CardMutation) ResetHasCropProviderIcon()

ResetHasCropProviderIcon resets all changes to the "has_crop_provider_icon" field.

func (*CardMutation) ResetHasCutPeatIcon

func (m *CardMutation) ResetHasCutPeatIcon()

ResetHasCutPeatIcon resets all changes to the "has_cut_peat_icon" field.

func (*CardMutation) ResetHasFarmPlannerIcon

func (m *CardMutation) ResetHasFarmPlannerIcon()

ResetHasFarmPlannerIcon resets all changes to the "has_farm_planner_icon" field.

func (*CardMutation) ResetHasFellTreesIcon

func (m *CardMutation) ResetHasFellTreesIcon()

ResetHasFellTreesIcon resets all changes to the "has_fell_trees_icon" field.

func (*CardMutation) ResetHasFoodProviderIcon

func (m *CardMutation) ResetHasFoodProviderIcon()

ResetHasFoodProviderIcon resets all changes to the "has_food_provider_icon" field.

func (*CardMutation) ResetHasGoodsProviderIcon

func (m *CardMutation) ResetHasGoodsProviderIcon()

ResetHasGoodsProviderIcon resets all changes to the "has_goods_provider_icon" field.

func (*CardMutation) ResetHasHiringFareIcon

func (m *CardMutation) ResetHasHiringFareIcon()

ResetHasHiringFareIcon resets all changes to the "has_hiring_fare_icon" field.

func (*CardMutation) ResetHasLivestockProviderIcon

func (m *CardMutation) ResetHasLivestockProviderIcon()

ResetHasLivestockProviderIcon resets all changes to the "has_livestock_provider_icon" field.

func (*CardMutation) ResetHasNegativeBonusPointIcon

func (m *CardMutation) ResetHasNegativeBonusPointIcon()

ResetHasNegativeBonusPointIcon resets all changes to the "has_negative_bonus_point_icon" field.

func (*CardMutation) ResetHasPanIcon

func (m *CardMutation) ResetHasPanIcon()

ResetHasPanIcon resets all changes to the "has_pan_icon" field.

func (*CardMutation) ResetHasPointsProviderIcon

func (m *CardMutation) ResetHasPointsProviderIcon()

ResetHasPointsProviderIcon resets all changes to the "has_points_provider_icon" field.

func (*CardMutation) ResetHasSlashAndBurnIcon

func (m *CardMutation) ResetHasSlashAndBurnIcon()

ResetHasSlashAndBurnIcon resets all changes to the "has_slash_and_burn_icon" field.

func (*CardMutation) ResetIsOfficialJa

func (m *CardMutation) ResetIsOfficialJa()

ResetIsOfficialJa resets all changes to the "is_official_ja" field.

func (*CardMutation) ResetLiteralID

func (m *CardMutation) ResetLiteralID()

ResetLiteralID resets all changes to the "literal_id" field.

func (*CardMutation) ResetMinPlayersNumber

func (m *CardMutation) ResetMinPlayersNumber()

ResetMinPlayersNumber resets all changes to the "min_players_number" field.

func (*CardMutation) ResetNameEn

func (m *CardMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*CardMutation) ResetNameJa

func (m *CardMutation) ResetNameJa()

ResetNameJa resets all changes to the "name_ja" field.

func (*CardMutation) ResetNote

func (m *CardMutation) ResetNote()

ResetNote resets all changes to the "note" field.

func (*CardMutation) ResetPlayAgricolaCardID

func (m *CardMutation) ResetPlayAgricolaCardID()

ResetPlayAgricolaCardID resets all changes to the "play_agricola_card_id" field.

func (*CardMutation) ResetPrerequisite

func (m *CardMutation) ResetPrerequisite()

ResetPrerequisite resets all changes to the "prerequisite" field.

func (*CardMutation) ResetPrintedID

func (m *CardMutation) ResetPrintedID()

ResetPrintedID resets all changes to the "printed_id" field.

func (*CardMutation) ResetProducts

func (m *CardMutation) ResetProducts()

ResetProducts resets all changes to the "products" edge.

func (*CardMutation) ResetRevision

func (m *CardMutation) ResetRevision()

ResetRevision resets all changes to the "revision" edge.

func (*CardMutation) ResetRevisionID

func (m *CardMutation) ResetRevisionID()

ResetRevisionID resets all changes to the "revision_id" field.

func (*CardMutation) ResetSpecialVictoryPoint

func (m *CardMutation) ResetSpecialVictoryPoint()

ResetSpecialVictoryPoint resets all changes to the "special_victory_point" field.

func (*CardMutation) ResetVictoryPoint

func (m *CardMutation) ResetVictoryPoint()

ResetVictoryPoint resets all changes to the "victory_point" field.

func (*CardMutation) RevisionCleared

func (m *CardMutation) RevisionCleared() bool

RevisionCleared reports if the "revision" edge to the Revision entity was cleared.

func (*CardMutation) RevisionID

func (m *CardMutation) RevisionID() (r int, exists bool)

RevisionID returns the value of the "revision_id" field in the mutation.

func (*CardMutation) RevisionIDs

func (m *CardMutation) RevisionIDs() (ids []int)

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

func (*CardMutation) SetCardSpecialColorID

func (m *CardMutation) SetCardSpecialColorID(i int)

SetCardSpecialColorID sets the "card_special_color_id" field.

func (*CardMutation) SetCardTypeID

func (m *CardMutation) SetCardTypeID(i int)

SetCardTypeID sets the "card_type_id" field.

func (*CardMutation) SetCost

func (m *CardMutation) SetCost(s string)

SetCost sets the "cost" field.

func (*CardMutation) SetDeckID

func (m *CardMutation) SetDeckID(i int)

SetDeckID sets the "deck_id" field.

func (*CardMutation) SetDescription

func (m *CardMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*CardMutation) SetField

func (m *CardMutation) 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 (*CardMutation) SetHasActionsBoosterIcon

func (m *CardMutation) SetHasActionsBoosterIcon(b bool)

SetHasActionsBoosterIcon sets the "has_actions_booster_icon" field.

func (*CardMutation) SetHasArrow

func (m *CardMutation) SetHasArrow(b bool)

SetHasArrow sets the "has_arrow" field.

func (*CardMutation) SetHasBonusPointIcon

func (m *CardMutation) SetHasBonusPointIcon(b bool)

SetHasBonusPointIcon sets the "has_bonus_point_icon" field.

func (*CardMutation) SetHasBreadIcon

func (m *CardMutation) SetHasBreadIcon(b bool)

SetHasBreadIcon sets the "has_bread_icon" field.

func (*CardMutation) SetHasBuildingResourceProviderIcon

func (m *CardMutation) SetHasBuildingResourceProviderIcon(b bool)

SetHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field.

func (*CardMutation) SetHasCropProviderIcon

func (m *CardMutation) SetHasCropProviderIcon(b bool)

SetHasCropProviderIcon sets the "has_crop_provider_icon" field.

func (*CardMutation) SetHasCutPeatIcon

func (m *CardMutation) SetHasCutPeatIcon(b bool)

SetHasCutPeatIcon sets the "has_cut_peat_icon" field.

func (*CardMutation) SetHasFarmPlannerIcon

func (m *CardMutation) SetHasFarmPlannerIcon(b bool)

SetHasFarmPlannerIcon sets the "has_farm_planner_icon" field.

func (*CardMutation) SetHasFellTreesIcon

func (m *CardMutation) SetHasFellTreesIcon(b bool)

SetHasFellTreesIcon sets the "has_fell_trees_icon" field.

func (*CardMutation) SetHasFoodProviderIcon

func (m *CardMutation) SetHasFoodProviderIcon(b bool)

SetHasFoodProviderIcon sets the "has_food_provider_icon" field.

func (*CardMutation) SetHasGoodsProviderIcon

func (m *CardMutation) SetHasGoodsProviderIcon(b bool)

SetHasGoodsProviderIcon sets the "has_goods_provider_icon" field.

func (*CardMutation) SetHasHiringFareIcon

func (m *CardMutation) SetHasHiringFareIcon(b bool)

SetHasHiringFareIcon sets the "has_hiring_fare_icon" field.

func (*CardMutation) SetHasLivestockProviderIcon

func (m *CardMutation) SetHasLivestockProviderIcon(b bool)

SetHasLivestockProviderIcon sets the "has_livestock_provider_icon" field.

func (*CardMutation) SetHasNegativeBonusPointIcon

func (m *CardMutation) SetHasNegativeBonusPointIcon(b bool)

SetHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field.

func (*CardMutation) SetHasPanIcon

func (m *CardMutation) SetHasPanIcon(b bool)

SetHasPanIcon sets the "has_pan_icon" field.

func (*CardMutation) SetHasPointsProviderIcon

func (m *CardMutation) SetHasPointsProviderIcon(b bool)

SetHasPointsProviderIcon sets the "has_points_provider_icon" field.

func (*CardMutation) SetHasSlashAndBurnIcon

func (m *CardMutation) SetHasSlashAndBurnIcon(b bool)

SetHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field.

func (*CardMutation) SetID

func (m *CardMutation) SetID(id int)

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

func (*CardMutation) SetIsOfficialJa

func (m *CardMutation) SetIsOfficialJa(b bool)

SetIsOfficialJa sets the "is_official_ja" field.

func (*CardMutation) SetLiteralID

func (m *CardMutation) SetLiteralID(s string)

SetLiteralID sets the "literal_id" field.

func (*CardMutation) SetMinPlayersNumber

func (m *CardMutation) SetMinPlayersNumber(i int)

SetMinPlayersNumber sets the "min_players_number" field.

func (*CardMutation) SetNameEn

func (m *CardMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*CardMutation) SetNameJa

func (m *CardMutation) SetNameJa(s string)

SetNameJa sets the "name_ja" field.

func (*CardMutation) SetNote

func (m *CardMutation) SetNote(s string)

SetNote sets the "note" field.

func (*CardMutation) SetOp

func (m *CardMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CardMutation) SetPlayAgricolaCardID

func (m *CardMutation) SetPlayAgricolaCardID(s string)

SetPlayAgricolaCardID sets the "play_agricola_card_id" field.

func (*CardMutation) SetPrerequisite

func (m *CardMutation) SetPrerequisite(s string)

SetPrerequisite sets the "prerequisite" field.

func (*CardMutation) SetPrintedID

func (m *CardMutation) SetPrintedID(s string)

SetPrintedID sets the "printed_id" field.

func (*CardMutation) SetRevisionID

func (m *CardMutation) SetRevisionID(i int)

SetRevisionID sets the "revision_id" field.

func (*CardMutation) SetSpecialVictoryPoint

func (m *CardMutation) SetSpecialVictoryPoint(s string)

SetSpecialVictoryPoint sets the "special_victory_point" field.

func (*CardMutation) SetVictoryPoint

func (m *CardMutation) SetVictoryPoint(i int)

SetVictoryPoint sets the "victory_point" field.

func (*CardMutation) SpecialVictoryPoint

func (m *CardMutation) SpecialVictoryPoint() (r string, exists bool)

SpecialVictoryPoint returns the value of the "special_victory_point" field in the mutation.

func (*CardMutation) SpecialVictoryPointCleared

func (m *CardMutation) SpecialVictoryPointCleared() bool

SpecialVictoryPointCleared returns if the "special_victory_point" field was cleared in this mutation.

func (CardMutation) Tx

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

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

func (*CardMutation) Type

func (m *CardMutation) Type() string

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

func (*CardMutation) VictoryPoint

func (m *CardMutation) VictoryPoint() (r int, exists bool)

VictoryPoint returns the value of the "victory_point" field in the mutation.

func (*CardMutation) VictoryPointCleared

func (m *CardMutation) VictoryPointCleared() bool

VictoryPointCleared returns if the "victory_point" field was cleared in this mutation.

func (*CardMutation) Where

func (m *CardMutation) Where(ps ...predicate.Card)

Where appends a list predicates to the CardMutation builder.

func (*CardMutation) WhereP

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

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

type CardOrder

type CardOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *CardOrderField `json:"field"`
}

CardOrder defines the ordering of Card.

type CardOrderField

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

CardOrderField defines the ordering field of Card.

type CardPaginateOption

type CardPaginateOption func(*cardPager) error

CardPaginateOption enables pagination customization.

func WithCardFilter

func WithCardFilter(filter func(*CardQuery) (*CardQuery, error)) CardPaginateOption

WithCardFilter configures pagination filter.

func WithCardOrder

func WithCardOrder(order *CardOrder) CardPaginateOption

WithCardOrder configures pagination ordering.

type CardQuery

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

CardQuery is the builder for querying Card entities.

func (*CardQuery) Aggregate

func (cq *CardQuery) Aggregate(fns ...AggregateFunc) *CardSelect

Aggregate returns a CardSelect configured with the given aggregations.

func (*CardQuery) All

func (cq *CardQuery) All(ctx context.Context) ([]*Card, error)

All executes the query and returns a list of Cards.

func (*CardQuery) AllX

func (cq *CardQuery) AllX(ctx context.Context) []*Card

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

func (*CardQuery) Clone

func (cq *CardQuery) Clone() *CardQuery

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

func (*CardQuery) CollectFields

func (c *CardQuery) CollectFields(ctx context.Context, satisfies ...string) (*CardQuery, error)

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

func (*CardQuery) Count

func (cq *CardQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CardQuery) CountX

func (cq *CardQuery) CountX(ctx context.Context) int

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

func (*CardQuery) ExecContext

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

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

func (*CardQuery) Exist

func (cq *CardQuery) Exist(ctx context.Context) (bool, error)

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

func (*CardQuery) ExistX

func (cq *CardQuery) ExistX(ctx context.Context) bool

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

func (*CardQuery) First

func (cq *CardQuery) First(ctx context.Context) (*Card, error)

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

func (*CardQuery) FirstID

func (cq *CardQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CardQuery) FirstIDX

func (cq *CardQuery) FirstIDX(ctx context.Context) int

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

func (*CardQuery) FirstX

func (cq *CardQuery) FirstX(ctx context.Context) *Card

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

func (*CardQuery) GroupBy

func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy

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

client.Card.Query().
	GroupBy(card.FieldLiteralID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CardQuery) IDs

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

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

func (*CardQuery) IDsX

func (cq *CardQuery) IDsX(ctx context.Context) []int

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

func (*CardQuery) Limit

func (cq *CardQuery) Limit(limit int) *CardQuery

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

func (*CardQuery) Offset

func (cq *CardQuery) Offset(offset int) *CardQuery

Offset to start from.

func (*CardQuery) Only

func (cq *CardQuery) Only(ctx context.Context) (*Card, error)

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

func (*CardQuery) OnlyID

func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CardQuery) OnlyIDX

func (cq *CardQuery) OnlyIDX(ctx context.Context) int

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

func (*CardQuery) OnlyX

func (cq *CardQuery) OnlyX(ctx context.Context) *Card

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

func (*CardQuery) Order

func (cq *CardQuery) Order(o ...card.OrderOption) *CardQuery

Order specifies how the records should be ordered.

func (*CardQuery) Paginate

func (c *CardQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CardPaginateOption,
) (*CardConnection, error)

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

func (*CardQuery) QueryAncestors

func (cq *CardQuery) QueryAncestors() *CardQuery

QueryAncestors chains the current query on the "ancestors" edge.

func (*CardQuery) QueryCardSpecialColor

func (cq *CardQuery) QueryCardSpecialColor() *CardSpecialColorQuery

QueryCardSpecialColor chains the current query on the "card_special_color" edge.

func (*CardQuery) QueryCardType

func (cq *CardQuery) QueryCardType() *CardTypeQuery

QueryCardType chains the current query on the "card_type" edge.

func (*CardQuery) QueryChildren

func (cq *CardQuery) QueryChildren() *CardQuery

QueryChildren chains the current query on the "children" edge.

func (*CardQuery) QueryContext

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

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

func (*CardQuery) QueryDeck

func (cq *CardQuery) QueryDeck() *DeckQuery

QueryDeck chains the current query on the "deck" edge.

func (*CardQuery) QueryProducts

func (cq *CardQuery) QueryProducts() *ProductQuery

QueryProducts chains the current query on the "products" edge.

func (*CardQuery) QueryRevision

func (cq *CardQuery) QueryRevision() *RevisionQuery

QueryRevision chains the current query on the "revision" edge.

func (*CardQuery) Select

func (cq *CardQuery) Select(fields ...string) *CardSelect

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

client.Card.Query().
	Select(card.FieldLiteralID).
	Scan(ctx, &v)

func (*CardQuery) Unique

func (cq *CardQuery) Unique(unique bool) *CardQuery

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

func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery

Where adds a new predicate for the CardQuery builder.

func (*CardQuery) WithAncestors

func (cq *CardQuery) WithAncestors(opts ...func(*CardQuery)) *CardQuery

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

func (*CardQuery) WithCardSpecialColor

func (cq *CardQuery) WithCardSpecialColor(opts ...func(*CardSpecialColorQuery)) *CardQuery

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

func (*CardQuery) WithCardType

func (cq *CardQuery) WithCardType(opts ...func(*CardTypeQuery)) *CardQuery

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

func (*CardQuery) WithChildren

func (cq *CardQuery) WithChildren(opts ...func(*CardQuery)) *CardQuery

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

func (*CardQuery) WithDeck

func (cq *CardQuery) WithDeck(opts ...func(*DeckQuery)) *CardQuery

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

func (*CardQuery) WithNamedAncestors

func (cq *CardQuery) WithNamedAncestors(name string, opts ...func(*CardQuery)) *CardQuery

WithNamedAncestors tells the query-builder to eager-load the nodes that are connected to the "ancestors" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CardQuery) WithNamedChildren

func (cq *CardQuery) WithNamedChildren(name string, opts ...func(*CardQuery)) *CardQuery

WithNamedChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CardQuery) WithNamedProducts

func (cq *CardQuery) WithNamedProducts(name string, opts ...func(*ProductQuery)) *CardQuery

WithNamedProducts tells the query-builder to eager-load the nodes that are connected to the "products" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*CardQuery) WithProducts

func (cq *CardQuery) WithProducts(opts ...func(*ProductQuery)) *CardQuery

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

func (*CardQuery) WithRevision

func (cq *CardQuery) WithRevision(opts ...func(*RevisionQuery)) *CardQuery

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

type CardSelect

type CardSelect struct {
	*CardQuery
	// contains filtered or unexported fields
}

CardSelect is the builder for selecting fields of Card entities.

func (*CardSelect) Aggregate

func (cs *CardSelect) Aggregate(fns ...AggregateFunc) *CardSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CardSelect) Bool

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

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

func (*CardSelect) BoolX

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

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

func (*CardSelect) Bools

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

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

func (*CardSelect) BoolsX

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

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

func (CardSelect) ExecContext

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

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

func (*CardSelect) Float64

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

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

func (*CardSelect) Float64X

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

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

func (*CardSelect) Float64s

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

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

func (*CardSelect) Float64sX

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

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

func (*CardSelect) Int

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

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

func (*CardSelect) IntX

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

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

func (*CardSelect) Ints

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

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

func (*CardSelect) IntsX

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

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

func (CardSelect) QueryContext

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

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

func (*CardSelect) Scan

func (cs *CardSelect) Scan(ctx context.Context, v any) error

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

func (*CardSelect) ScanX

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

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

func (*CardSelect) String

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

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

func (*CardSelect) StringX

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

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

func (*CardSelect) Strings

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

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

func (*CardSelect) StringsX

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

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

type CardSpecialColor

type CardSpecialColor struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// NameJa holds the value of the "name_ja" field.
	NameJa string `json:"name_ja,omitempty"`
	// NameEn holds the value of the "name_en" field.
	NameEn string `json:"name_en,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CardSpecialColorQuery when eager-loading is set.
	Edges CardSpecialColorEdges `json:"edges"`
	// contains filtered or unexported fields
}

CardSpecialColor is the model entity for the CardSpecialColor schema.

func (*CardSpecialColor) Cards

func (csc *CardSpecialColor) Cards(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *CardWhereInput,
) (*CardConnection, error)

func (*CardSpecialColor) ExecContext

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

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

func (*CardSpecialColor) IsNode

func (*CardSpecialColor) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*CardSpecialColor) NamedCards

func (csc *CardSpecialColor) NamedCards(name string) ([]*Card, error)

NamedCards returns the Cards named value or an error if the edge was not loaded in eager-loading with this name.

func (*CardSpecialColor) QueryCards

func (csc *CardSpecialColor) QueryCards() *CardQuery

QueryCards queries the "cards" edge of the CardSpecialColor entity.

func (*CardSpecialColor) QueryContext

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

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

func (*CardSpecialColor) String

func (csc *CardSpecialColor) String() string

String implements the fmt.Stringer.

func (*CardSpecialColor) ToEdge

ToEdge converts CardSpecialColor into CardSpecialColorEdge.

func (*CardSpecialColor) Unwrap

func (csc *CardSpecialColor) Unwrap() *CardSpecialColor

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

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

func (*CardSpecialColor) Value

func (csc *CardSpecialColor) Value(name string) (ent.Value, error)

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

type CardSpecialColorClient

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

CardSpecialColorClient is a client for the CardSpecialColor schema.

func NewCardSpecialColorClient

func NewCardSpecialColorClient(c config) *CardSpecialColorClient

NewCardSpecialColorClient returns a client for the CardSpecialColor from the given config.

func (*CardSpecialColorClient) Create

Create returns a builder for creating a CardSpecialColor entity.

func (*CardSpecialColorClient) CreateBulk

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

func (*CardSpecialColorClient) Delete

Delete returns a delete builder for CardSpecialColor.

func (*CardSpecialColorClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CardSpecialColorClient) DeleteOneID

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

func (*CardSpecialColorClient) ExecContext

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

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

func (*CardSpecialColorClient) Get

Get returns a CardSpecialColor entity by its id.

func (*CardSpecialColorClient) GetX

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

func (*CardSpecialColorClient) Hooks

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

Hooks returns the client hooks.

func (*CardSpecialColorClient) Intercept

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

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

func (*CardSpecialColorClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CardSpecialColorClient) MapCreateBulk

func (c *CardSpecialColorClient) MapCreateBulk(slice any, setFunc func(*CardSpecialColorCreate, int)) *CardSpecialColorCreateBulk

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

Query returns a query builder for CardSpecialColor.

func (*CardSpecialColorClient) QueryCards

func (c *CardSpecialColorClient) QueryCards(csc *CardSpecialColor) *CardQuery

QueryCards queries the cards edge of a CardSpecialColor.

func (*CardSpecialColorClient) QueryContext

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

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

func (*CardSpecialColorClient) Update

Update returns an update builder for CardSpecialColor.

func (*CardSpecialColorClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CardSpecialColorClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*CardSpecialColorClient) Use

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

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

type CardSpecialColorConnection

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

CardSpecialColorConnection is the connection containing edges to CardSpecialColor.

type CardSpecialColorCreate

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

CardSpecialColorCreate is the builder for creating a CardSpecialColor entity.

func (*CardSpecialColorCreate) AddCardIDs

func (cscc *CardSpecialColorCreate) AddCardIDs(ids ...int) *CardSpecialColorCreate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*CardSpecialColorCreate) AddCards

func (cscc *CardSpecialColorCreate) AddCards(c ...*Card) *CardSpecialColorCreate

AddCards adds the "cards" edges to the Card entity.

func (*CardSpecialColorCreate) Exec

func (cscc *CardSpecialColorCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardSpecialColorCreate) ExecContext

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

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

func (*CardSpecialColorCreate) ExecX

func (cscc *CardSpecialColorCreate) ExecX(ctx context.Context)

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

func (*CardSpecialColorCreate) Mutation

Mutation returns the CardSpecialColorMutation object of the builder.

func (*CardSpecialColorCreate) OnConflict

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

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

func (*CardSpecialColorCreate) OnConflictColumns

func (cscc *CardSpecialColorCreate) OnConflictColumns(columns ...string) *CardSpecialColorUpsertOne

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

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

func (*CardSpecialColorCreate) QueryContext

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

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

func (*CardSpecialColorCreate) Save

Save creates the CardSpecialColor in the database.

func (*CardSpecialColorCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CardSpecialColorCreate) SetID

SetID sets the "id" field.

func (*CardSpecialColorCreate) SetKey

SetKey sets the "key" field.

func (*CardSpecialColorCreate) SetNameEn

SetNameEn sets the "name_en" field.

func (*CardSpecialColorCreate) SetNameJa

SetNameJa sets the "name_ja" field.

func (*CardSpecialColorCreate) SetNillableNameEn

func (cscc *CardSpecialColorCreate) SetNillableNameEn(s *string) *CardSpecialColorCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardSpecialColorCreate) SetNillableNameJa

func (cscc *CardSpecialColorCreate) SetNillableNameJa(s *string) *CardSpecialColorCreate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

type CardSpecialColorCreateBulk

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

CardSpecialColorCreateBulk is the builder for creating many CardSpecialColor entities in bulk.

func (*CardSpecialColorCreateBulk) Exec

Exec executes the query.

func (*CardSpecialColorCreateBulk) ExecContext

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

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

func (*CardSpecialColorCreateBulk) ExecX

func (csccb *CardSpecialColorCreateBulk) ExecX(ctx context.Context)

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

func (*CardSpecialColorCreateBulk) OnConflict

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

client.CardSpecialColor.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.CardSpecialColorUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*CardSpecialColorCreateBulk) OnConflictColumns

func (csccb *CardSpecialColorCreateBulk) OnConflictColumns(columns ...string) *CardSpecialColorUpsertBulk

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

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

func (*CardSpecialColorCreateBulk) QueryContext

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

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

func (*CardSpecialColorCreateBulk) Save

Save creates the CardSpecialColor entities in the database.

func (*CardSpecialColorCreateBulk) SaveX

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

type CardSpecialColorDelete

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

CardSpecialColorDelete is the builder for deleting a CardSpecialColor entity.

func (*CardSpecialColorDelete) Exec

func (cscd *CardSpecialColorDelete) Exec(ctx context.Context) (int, error)

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

func (*CardSpecialColorDelete) ExecContext

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

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

func (*CardSpecialColorDelete) ExecX

func (cscd *CardSpecialColorDelete) ExecX(ctx context.Context) int

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

func (*CardSpecialColorDelete) QueryContext

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

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

func (*CardSpecialColorDelete) Where

Where appends a list predicates to the CardSpecialColorDelete builder.

type CardSpecialColorDeleteOne

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

CardSpecialColorDeleteOne is the builder for deleting a single CardSpecialColor entity.

func (*CardSpecialColorDeleteOne) Exec

Exec executes the deletion query.

func (*CardSpecialColorDeleteOne) ExecX

func (cscdo *CardSpecialColorDeleteOne) ExecX(ctx context.Context)

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

func (*CardSpecialColorDeleteOne) Where

Where appends a list predicates to the CardSpecialColorDelete builder.

type CardSpecialColorEdge

type CardSpecialColorEdge struct {
	Node   *CardSpecialColor `json:"node"`
	Cursor Cursor            `json:"cursor"`
}

CardSpecialColorEdge is the edge representation of CardSpecialColor.

type CardSpecialColorEdges

type CardSpecialColorEdges struct {
	// Cards holds the value of the cards edge.
	Cards []*Card `json:"cards,omitempty"`
	// contains filtered or unexported fields
}

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

func (CardSpecialColorEdges) CardsOrErr

func (e CardSpecialColorEdges) CardsOrErr() ([]*Card, error)

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

type CardSpecialColorGroupBy

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

CardSpecialColorGroupBy is the group-by builder for CardSpecialColor entities.

func (*CardSpecialColorGroupBy) Aggregate

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

func (*CardSpecialColorGroupBy) Bool

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

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

func (*CardSpecialColorGroupBy) BoolX

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

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

func (*CardSpecialColorGroupBy) Bools

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

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

func (*CardSpecialColorGroupBy) BoolsX

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

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

func (*CardSpecialColorGroupBy) Float64

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

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

func (*CardSpecialColorGroupBy) Float64X

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

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

func (*CardSpecialColorGroupBy) Float64s

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

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

func (*CardSpecialColorGroupBy) Float64sX

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

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

func (*CardSpecialColorGroupBy) Int

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

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

func (*CardSpecialColorGroupBy) IntX

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

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

func (*CardSpecialColorGroupBy) Ints

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

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

func (*CardSpecialColorGroupBy) IntsX

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

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

func (*CardSpecialColorGroupBy) Scan

func (cscgb *CardSpecialColorGroupBy) Scan(ctx context.Context, v any) error

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

func (*CardSpecialColorGroupBy) ScanX

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

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

func (*CardSpecialColorGroupBy) String

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

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

func (*CardSpecialColorGroupBy) StringX

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

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

func (*CardSpecialColorGroupBy) Strings

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

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

func (*CardSpecialColorGroupBy) StringsX

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

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

type CardSpecialColorMutation

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

CardSpecialColorMutation represents an operation that mutates the CardSpecialColor nodes in the graph.

func (*CardSpecialColorMutation) AddCardIDs

func (m *CardSpecialColorMutation) AddCardIDs(ids ...int)

AddCardIDs adds the "cards" edge to the Card entity by ids.

func (*CardSpecialColorMutation) AddField

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

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

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

func (*CardSpecialColorMutation) AddedField

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

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

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

func (*CardSpecialColorMutation) AddedIDs

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

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

func (*CardSpecialColorMutation) CardsCleared

func (m *CardSpecialColorMutation) CardsCleared() bool

CardsCleared reports if the "cards" edge to the Card entity was cleared.

func (*CardSpecialColorMutation) CardsIDs

func (m *CardSpecialColorMutation) CardsIDs() (ids []int)

CardsIDs returns the "cards" edge IDs in the mutation.

func (*CardSpecialColorMutation) ClearCards

func (m *CardSpecialColorMutation) ClearCards()

ClearCards clears the "cards" edge to the Card entity.

func (*CardSpecialColorMutation) ClearEdge

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

func (m *CardSpecialColorMutation) 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 (*CardSpecialColorMutation) ClearNameEn

func (m *CardSpecialColorMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*CardSpecialColorMutation) ClearNameJa

func (m *CardSpecialColorMutation) ClearNameJa()

ClearNameJa clears the value of the "name_ja" field.

func (*CardSpecialColorMutation) ClearedEdges

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

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

func (*CardSpecialColorMutation) ClearedFields

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

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

func (CardSpecialColorMutation) Client

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

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

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

func (*CardSpecialColorMutation) ExecContext

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

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

func (*CardSpecialColorMutation) Field

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

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

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

func (*CardSpecialColorMutation) Fields

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

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

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

func (*CardSpecialColorMutation) Key

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

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

func (*CardSpecialColorMutation) NameEn

func (m *CardSpecialColorMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*CardSpecialColorMutation) NameEnCleared

func (m *CardSpecialColorMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*CardSpecialColorMutation) NameJa

func (m *CardSpecialColorMutation) NameJa() (r string, exists bool)

NameJa returns the value of the "name_ja" field in the mutation.

func (*CardSpecialColorMutation) NameJaCleared

func (m *CardSpecialColorMutation) NameJaCleared() bool

NameJaCleared returns if the "name_ja" field was cleared in this mutation.

func (*CardSpecialColorMutation) OldField

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

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

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

func (m *CardSpecialColorMutation) OldNameEn(ctx context.Context) (v string, err error)

OldNameEn returns the old "name_en" field's value of the CardSpecialColor entity. If the CardSpecialColor 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 (*CardSpecialColorMutation) OldNameJa

func (m *CardSpecialColorMutation) OldNameJa(ctx context.Context) (v string, err error)

OldNameJa returns the old "name_ja" field's value of the CardSpecialColor entity. If the CardSpecialColor 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 (*CardSpecialColorMutation) Op

func (m *CardSpecialColorMutation) Op() Op

Op returns the operation name.

func (*CardSpecialColorMutation) QueryContext

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

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

func (*CardSpecialColorMutation) RemoveCardIDs

func (m *CardSpecialColorMutation) RemoveCardIDs(ids ...int)

RemoveCardIDs removes the "cards" edge to the Card entity by IDs.

func (*CardSpecialColorMutation) RemovedCardsIDs

func (m *CardSpecialColorMutation) RemovedCardsIDs() (ids []int)

RemovedCards returns the removed IDs of the "cards" edge to the Card entity.

func (*CardSpecialColorMutation) RemovedEdges

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

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

func (*CardSpecialColorMutation) RemovedIDs

func (m *CardSpecialColorMutation) 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 (*CardSpecialColorMutation) ResetCards

func (m *CardSpecialColorMutation) ResetCards()

ResetCards resets all changes to the "cards" edge.

func (*CardSpecialColorMutation) ResetEdge

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

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

func (m *CardSpecialColorMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*CardSpecialColorMutation) ResetNameEn

func (m *CardSpecialColorMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*CardSpecialColorMutation) ResetNameJa

func (m *CardSpecialColorMutation) ResetNameJa()

ResetNameJa resets all changes to the "name_ja" field.

func (*CardSpecialColorMutation) SetField

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

func (m *CardSpecialColorMutation) SetID(id int)

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

func (*CardSpecialColorMutation) SetKey

func (m *CardSpecialColorMutation) SetKey(s string)

SetKey sets the "key" field.

func (*CardSpecialColorMutation) SetNameEn

func (m *CardSpecialColorMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*CardSpecialColorMutation) SetNameJa

func (m *CardSpecialColorMutation) SetNameJa(s string)

SetNameJa sets the "name_ja" field.

func (*CardSpecialColorMutation) SetOp

func (m *CardSpecialColorMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (CardSpecialColorMutation) Tx

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

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

func (*CardSpecialColorMutation) Type

func (m *CardSpecialColorMutation) Type() string

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

func (*CardSpecialColorMutation) Where

Where appends a list predicates to the CardSpecialColorMutation builder.

func (*CardSpecialColorMutation) WhereP

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

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

type CardSpecialColorOrder

type CardSpecialColorOrder struct {
	Direction OrderDirection              `json:"direction"`
	Field     *CardSpecialColorOrderField `json:"field"`
}

CardSpecialColorOrder defines the ordering of CardSpecialColor.

type CardSpecialColorOrderField

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

CardSpecialColorOrderField defines the ordering field of CardSpecialColor.

type CardSpecialColorPaginateOption

type CardSpecialColorPaginateOption func(*cardspecialcolorPager) error

CardSpecialColorPaginateOption enables pagination customization.

func WithCardSpecialColorFilter

func WithCardSpecialColorFilter(filter func(*CardSpecialColorQuery) (*CardSpecialColorQuery, error)) CardSpecialColorPaginateOption

WithCardSpecialColorFilter configures pagination filter.

func WithCardSpecialColorOrder

func WithCardSpecialColorOrder(order *CardSpecialColorOrder) CardSpecialColorPaginateOption

WithCardSpecialColorOrder configures pagination ordering.

type CardSpecialColorQuery

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

CardSpecialColorQuery is the builder for querying CardSpecialColor entities.

func (*CardSpecialColorQuery) Aggregate

Aggregate returns a CardSpecialColorSelect configured with the given aggregations.

func (*CardSpecialColorQuery) All

All executes the query and returns a list of CardSpecialColors.

func (*CardSpecialColorQuery) AllX

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

func (*CardSpecialColorQuery) Clone

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

func (*CardSpecialColorQuery) CollectFields

func (csc *CardSpecialColorQuery) CollectFields(ctx context.Context, satisfies ...string) (*CardSpecialColorQuery, error)

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

func (*CardSpecialColorQuery) Count

func (cscq *CardSpecialColorQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CardSpecialColorQuery) CountX

func (cscq *CardSpecialColorQuery) CountX(ctx context.Context) int

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

func (*CardSpecialColorQuery) ExecContext

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

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

func (*CardSpecialColorQuery) Exist

func (cscq *CardSpecialColorQuery) Exist(ctx context.Context) (bool, error)

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

func (*CardSpecialColorQuery) ExistX

func (cscq *CardSpecialColorQuery) ExistX(ctx context.Context) bool

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

func (*CardSpecialColorQuery) First

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

func (*CardSpecialColorQuery) FirstID

func (cscq *CardSpecialColorQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CardSpecialColorQuery) FirstIDX

func (cscq *CardSpecialColorQuery) FirstIDX(ctx context.Context) int

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

func (*CardSpecialColorQuery) FirstX

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

func (*CardSpecialColorQuery) GroupBy

func (cscq *CardSpecialColorQuery) GroupBy(field string, fields ...string) *CardSpecialColorGroupBy

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

Example:

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

client.CardSpecialColor.Query().
	GroupBy(cardspecialcolor.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CardSpecialColorQuery) IDs

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

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

func (*CardSpecialColorQuery) IDsX

func (cscq *CardSpecialColorQuery) IDsX(ctx context.Context) []int

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

func (*CardSpecialColorQuery) Limit

func (cscq *CardSpecialColorQuery) Limit(limit int) *CardSpecialColorQuery

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

func (*CardSpecialColorQuery) Offset

func (cscq *CardSpecialColorQuery) Offset(offset int) *CardSpecialColorQuery

Offset to start from.

func (*CardSpecialColorQuery) Only

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

func (*CardSpecialColorQuery) OnlyID

func (cscq *CardSpecialColorQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CardSpecialColorQuery) OnlyIDX

func (cscq *CardSpecialColorQuery) OnlyIDX(ctx context.Context) int

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

func (*CardSpecialColorQuery) OnlyX

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

func (*CardSpecialColorQuery) Order

Order specifies how the records should be ordered.

func (*CardSpecialColorQuery) Paginate

func (csc *CardSpecialColorQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CardSpecialColorPaginateOption,
) (*CardSpecialColorConnection, error)

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

func (*CardSpecialColorQuery) QueryCards

func (cscq *CardSpecialColorQuery) QueryCards() *CardQuery

QueryCards chains the current query on the "cards" edge.

func (*CardSpecialColorQuery) QueryContext

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

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

func (*CardSpecialColorQuery) Select

func (cscq *CardSpecialColorQuery) Select(fields ...string) *CardSpecialColorSelect

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

Example:

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

client.CardSpecialColor.Query().
	Select(cardspecialcolor.FieldKey).
	Scan(ctx, &v)

func (*CardSpecialColorQuery) Unique

func (cscq *CardSpecialColorQuery) Unique(unique bool) *CardSpecialColorQuery

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

Where adds a new predicate for the CardSpecialColorQuery builder.

func (*CardSpecialColorQuery) WithCards

func (cscq *CardSpecialColorQuery) WithCards(opts ...func(*CardQuery)) *CardSpecialColorQuery

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

func (*CardSpecialColorQuery) WithNamedCards

func (cscq *CardSpecialColorQuery) WithNamedCards(name string, opts ...func(*CardQuery)) *CardSpecialColorQuery

WithNamedCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type CardSpecialColorSelect

type CardSpecialColorSelect struct {
	*CardSpecialColorQuery
	// contains filtered or unexported fields
}

CardSpecialColorSelect is the builder for selecting fields of CardSpecialColor entities.

func (*CardSpecialColorSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*CardSpecialColorSelect) Bool

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

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

func (*CardSpecialColorSelect) BoolX

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

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

func (*CardSpecialColorSelect) Bools

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

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

func (*CardSpecialColorSelect) BoolsX

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

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

func (CardSpecialColorSelect) ExecContext

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

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

func (*CardSpecialColorSelect) Float64

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

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

func (*CardSpecialColorSelect) Float64X

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

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

func (*CardSpecialColorSelect) Float64s

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

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

func (*CardSpecialColorSelect) Float64sX

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

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

func (*CardSpecialColorSelect) Int

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

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

func (*CardSpecialColorSelect) IntX

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

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

func (*CardSpecialColorSelect) Ints

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

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

func (*CardSpecialColorSelect) IntsX

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

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

func (CardSpecialColorSelect) QueryContext

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

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

func (*CardSpecialColorSelect) Scan

func (cscs *CardSpecialColorSelect) Scan(ctx context.Context, v any) error

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

func (*CardSpecialColorSelect) ScanX

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

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

func (*CardSpecialColorSelect) String

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

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

func (*CardSpecialColorSelect) StringX

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

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

func (*CardSpecialColorSelect) Strings

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

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

func (*CardSpecialColorSelect) StringsX

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

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

type CardSpecialColorUpdate

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

CardSpecialColorUpdate is the builder for updating CardSpecialColor entities.

func (*CardSpecialColorUpdate) AddCardIDs

func (cscu *CardSpecialColorUpdate) AddCardIDs(ids ...int) *CardSpecialColorUpdate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*CardSpecialColorUpdate) AddCards

func (cscu *CardSpecialColorUpdate) AddCards(c ...*Card) *CardSpecialColorUpdate

AddCards adds the "cards" edges to the Card entity.

func (*CardSpecialColorUpdate) ClearCards

func (cscu *CardSpecialColorUpdate) ClearCards() *CardSpecialColorUpdate

ClearCards clears all "cards" edges to the Card entity.

func (*CardSpecialColorUpdate) ClearNameEn

func (cscu *CardSpecialColorUpdate) ClearNameEn() *CardSpecialColorUpdate

ClearNameEn clears the value of the "name_en" field.

func (*CardSpecialColorUpdate) ClearNameJa

func (cscu *CardSpecialColorUpdate) ClearNameJa() *CardSpecialColorUpdate

ClearNameJa clears the value of the "name_ja" field.

func (*CardSpecialColorUpdate) Exec

func (cscu *CardSpecialColorUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardSpecialColorUpdate) ExecContext

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

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

func (*CardSpecialColorUpdate) ExecX

func (cscu *CardSpecialColorUpdate) ExecX(ctx context.Context)

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

func (*CardSpecialColorUpdate) Mutation

Mutation returns the CardSpecialColorMutation object of the builder.

func (*CardSpecialColorUpdate) QueryContext

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

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

func (*CardSpecialColorUpdate) RemoveCardIDs

func (cscu *CardSpecialColorUpdate) RemoveCardIDs(ids ...int) *CardSpecialColorUpdate

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*CardSpecialColorUpdate) RemoveCards

func (cscu *CardSpecialColorUpdate) RemoveCards(c ...*Card) *CardSpecialColorUpdate

RemoveCards removes "cards" edges to Card entities.

func (*CardSpecialColorUpdate) Save

func (cscu *CardSpecialColorUpdate) Save(ctx context.Context) (int, error)

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

func (*CardSpecialColorUpdate) SaveX

func (cscu *CardSpecialColorUpdate) SaveX(ctx context.Context) int

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

func (*CardSpecialColorUpdate) SetNameEn

SetNameEn sets the "name_en" field.

func (*CardSpecialColorUpdate) SetNameJa

SetNameJa sets the "name_ja" field.

func (*CardSpecialColorUpdate) SetNillableNameEn

func (cscu *CardSpecialColorUpdate) SetNillableNameEn(s *string) *CardSpecialColorUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardSpecialColorUpdate) SetNillableNameJa

func (cscu *CardSpecialColorUpdate) SetNillableNameJa(s *string) *CardSpecialColorUpdate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*CardSpecialColorUpdate) Where

Where appends a list predicates to the CardSpecialColorUpdate builder.

type CardSpecialColorUpdateOne

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

CardSpecialColorUpdateOne is the builder for updating a single CardSpecialColor entity.

func (*CardSpecialColorUpdateOne) AddCardIDs

func (cscuo *CardSpecialColorUpdateOne) AddCardIDs(ids ...int) *CardSpecialColorUpdateOne

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*CardSpecialColorUpdateOne) AddCards

AddCards adds the "cards" edges to the Card entity.

func (*CardSpecialColorUpdateOne) ClearCards

ClearCards clears all "cards" edges to the Card entity.

func (*CardSpecialColorUpdateOne) ClearNameEn

ClearNameEn clears the value of the "name_en" field.

func (*CardSpecialColorUpdateOne) ClearNameJa

ClearNameJa clears the value of the "name_ja" field.

func (*CardSpecialColorUpdateOne) Exec

Exec executes the query on the entity.

func (*CardSpecialColorUpdateOne) ExecContext

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

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

func (*CardSpecialColorUpdateOne) ExecX

func (cscuo *CardSpecialColorUpdateOne) ExecX(ctx context.Context)

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

func (*CardSpecialColorUpdateOne) Mutation

Mutation returns the CardSpecialColorMutation object of the builder.

func (*CardSpecialColorUpdateOne) QueryContext

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

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

func (*CardSpecialColorUpdateOne) RemoveCardIDs

func (cscuo *CardSpecialColorUpdateOne) RemoveCardIDs(ids ...int) *CardSpecialColorUpdateOne

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*CardSpecialColorUpdateOne) RemoveCards

func (cscuo *CardSpecialColorUpdateOne) RemoveCards(c ...*Card) *CardSpecialColorUpdateOne

RemoveCards removes "cards" edges to Card entities.

func (*CardSpecialColorUpdateOne) Save

Save executes the query and returns the updated CardSpecialColor entity.

func (*CardSpecialColorUpdateOne) SaveX

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

func (*CardSpecialColorUpdateOne) Select

func (cscuo *CardSpecialColorUpdateOne) Select(field string, fields ...string) *CardSpecialColorUpdateOne

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

func (*CardSpecialColorUpdateOne) SetNameEn

SetNameEn sets the "name_en" field.

func (*CardSpecialColorUpdateOne) SetNameJa

SetNameJa sets the "name_ja" field.

func (*CardSpecialColorUpdateOne) SetNillableNameEn

func (cscuo *CardSpecialColorUpdateOne) SetNillableNameEn(s *string) *CardSpecialColorUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardSpecialColorUpdateOne) SetNillableNameJa

func (cscuo *CardSpecialColorUpdateOne) SetNillableNameJa(s *string) *CardSpecialColorUpdateOne

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*CardSpecialColorUpdateOne) Where

Where appends a list predicates to the CardSpecialColorUpdate builder.

type CardSpecialColorUpsert

type CardSpecialColorUpsert struct {
	*sql.UpdateSet
}

CardSpecialColorUpsert is the "OnConflict" setter.

func (*CardSpecialColorUpsert) ClearNameEn

ClearNameEn clears the value of the "name_en" field.

func (*CardSpecialColorUpsert) ClearNameJa

ClearNameJa clears the value of the "name_ja" field.

func (*CardSpecialColorUpsert) SetNameEn

SetNameEn sets the "name_en" field.

func (*CardSpecialColorUpsert) SetNameJa

SetNameJa sets the "name_ja" field.

func (*CardSpecialColorUpsert) UpdateNameEn

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

func (*CardSpecialColorUpsert) UpdateNameJa

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

type CardSpecialColorUpsertBulk

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

CardSpecialColorUpsertBulk is the builder for "upsert"-ing a bulk of CardSpecialColor nodes.

func (*CardSpecialColorUpsertBulk) ClearNameEn

ClearNameEn clears the value of the "name_en" field.

func (*CardSpecialColorUpsertBulk) ClearNameJa

ClearNameJa clears the value of the "name_ja" field.

func (*CardSpecialColorUpsertBulk) DoNothing

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

func (*CardSpecialColorUpsertBulk) Exec

Exec executes the query.

func (*CardSpecialColorUpsertBulk) ExecX

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

func (*CardSpecialColorUpsertBulk) Ignore

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

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

func (*CardSpecialColorUpsertBulk) SetNameEn

SetNameEn sets the "name_en" field.

func (*CardSpecialColorUpsertBulk) SetNameJa

SetNameJa sets the "name_ja" field.

func (*CardSpecialColorUpsertBulk) Update

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

func (*CardSpecialColorUpsertBulk) UpdateNameEn

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

func (*CardSpecialColorUpsertBulk) UpdateNameJa

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

func (*CardSpecialColorUpsertBulk) UpdateNewValues

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

client.CardSpecialColor.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(cardspecialcolor.FieldID)
		}),
	).
	Exec(ctx)

type CardSpecialColorUpsertOne

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

CardSpecialColorUpsertOne is the builder for "upsert"-ing

one CardSpecialColor node.

func (*CardSpecialColorUpsertOne) ClearNameEn

ClearNameEn clears the value of the "name_en" field.

func (*CardSpecialColorUpsertOne) ClearNameJa

ClearNameJa clears the value of the "name_ja" field.

func (*CardSpecialColorUpsertOne) DoNothing

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

func (*CardSpecialColorUpsertOne) Exec

Exec executes the query.

func (*CardSpecialColorUpsertOne) ExecX

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

func (*CardSpecialColorUpsertOne) ID

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

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

func (*CardSpecialColorUpsertOne) IDX

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

func (*CardSpecialColorUpsertOne) Ignore

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

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

func (*CardSpecialColorUpsertOne) SetNameEn

SetNameEn sets the "name_en" field.

func (*CardSpecialColorUpsertOne) SetNameJa

SetNameJa sets the "name_ja" field.

func (*CardSpecialColorUpsertOne) Update

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

func (*CardSpecialColorUpsertOne) UpdateNameEn

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

func (*CardSpecialColorUpsertOne) UpdateNameJa

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

func (*CardSpecialColorUpsertOne) UpdateNewValues

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

client.CardSpecialColor.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(cardspecialcolor.FieldID)
		}),
	).
	Exec(ctx)

type CardSpecialColorWhereInput

type CardSpecialColorWhereInput struct {
	Predicates []predicate.CardSpecialColor  `json:"-"`
	Not        *CardSpecialColorWhereInput   `json:"not,omitempty"`
	Or         []*CardSpecialColorWhereInput `json:"or,omitempty"`
	And        []*CardSpecialColorWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "name_ja" field predicates.
	NameJa             *string  `json:"nameJa,omitempty"`
	NameJaNEQ          *string  `json:"nameJaNEQ,omitempty"`
	NameJaIn           []string `json:"nameJaIn,omitempty"`
	NameJaNotIn        []string `json:"nameJaNotIn,omitempty"`
	NameJaGT           *string  `json:"nameJaGT,omitempty"`
	NameJaGTE          *string  `json:"nameJaGTE,omitempty"`
	NameJaLT           *string  `json:"nameJaLT,omitempty"`
	NameJaLTE          *string  `json:"nameJaLTE,omitempty"`
	NameJaContains     *string  `json:"nameJaContains,omitempty"`
	NameJaHasPrefix    *string  `json:"nameJaHasPrefix,omitempty"`
	NameJaHasSuffix    *string  `json:"nameJaHasSuffix,omitempty"`
	NameJaIsNil        bool     `json:"nameJaIsNil,omitempty"`
	NameJaNotNil       bool     `json:"nameJaNotNil,omitempty"`
	NameJaEqualFold    *string  `json:"nameJaEqualFold,omitempty"`
	NameJaContainsFold *string  `json:"nameJaContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,omitempty"`

	// "cards" edge predicates.
	HasCards     *bool             `json:"hasCards,omitempty"`
	HasCardsWith []*CardWhereInput `json:"hasCardsWith,omitempty"`
}

CardSpecialColorWhereInput represents a where input for filtering CardSpecialColor queries.

func (*CardSpecialColorWhereInput) AddPredicates

func (i *CardSpecialColorWhereInput) AddPredicates(predicates ...predicate.CardSpecialColor)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*CardSpecialColorWhereInput) Filter

Filter applies the CardSpecialColorWhereInput filter on the CardSpecialColorQuery builder.

func (*CardSpecialColorWhereInput) P

P returns a predicate for filtering cardspecialcolors. An error is returned if the input is empty or invalid.

type CardSpecialColors

type CardSpecialColors []*CardSpecialColor

CardSpecialColors is a parsable slice of CardSpecialColor.

type CardType

type CardType struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// NameJa holds the value of the "name_ja" field.
	NameJa string `json:"name_ja,omitempty"`
	// NameEn holds the value of the "name_en" field.
	NameEn string `json:"name_en,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CardTypeQuery when eager-loading is set.
	Edges CardTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

CardType is the model entity for the CardType schema.

func (*CardType) Cards

func (ct *CardType) Cards(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *CardWhereInput,
) (*CardConnection, error)

func (*CardType) ExecContext

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

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

func (*CardType) IsNode

func (*CardType) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*CardType) NamedCards

func (ct *CardType) NamedCards(name string) ([]*Card, error)

NamedCards returns the Cards named value or an error if the edge was not loaded in eager-loading with this name.

func (*CardType) QueryCards

func (ct *CardType) QueryCards() *CardQuery

QueryCards queries the "cards" edge of the CardType entity.

func (*CardType) QueryContext

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

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

func (*CardType) String

func (ct *CardType) String() string

String implements the fmt.Stringer.

func (*CardType) ToEdge

func (ct *CardType) ToEdge(order *CardTypeOrder) *CardTypeEdge

ToEdge converts CardType into CardTypeEdge.

func (*CardType) Unwrap

func (ct *CardType) Unwrap() *CardType

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

func (ct *CardType) Update() *CardTypeUpdateOne

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

func (*CardType) Value

func (ct *CardType) Value(name string) (ent.Value, error)

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

type CardTypeClient

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

CardTypeClient is a client for the CardType schema.

func NewCardTypeClient

func NewCardTypeClient(c config) *CardTypeClient

NewCardTypeClient returns a client for the CardType from the given config.

func (*CardTypeClient) Create

func (c *CardTypeClient) Create() *CardTypeCreate

Create returns a builder for creating a CardType entity.

func (*CardTypeClient) CreateBulk

func (c *CardTypeClient) CreateBulk(builders ...*CardTypeCreate) *CardTypeCreateBulk

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

func (*CardTypeClient) Delete

func (c *CardTypeClient) Delete() *CardTypeDelete

Delete returns a delete builder for CardType.

func (*CardTypeClient) DeleteOne

func (c *CardTypeClient) DeleteOne(ct *CardType) *CardTypeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CardTypeClient) DeleteOneID

func (c *CardTypeClient) DeleteOneID(id int) *CardTypeDeleteOne

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

func (*CardTypeClient) ExecContext

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

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

func (*CardTypeClient) Get

func (c *CardTypeClient) Get(ctx context.Context, id int) (*CardType, error)

Get returns a CardType entity by its id.

func (*CardTypeClient) GetX

func (c *CardTypeClient) GetX(ctx context.Context, id int) *CardType

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

func (*CardTypeClient) Hooks

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

Hooks returns the client hooks.

func (*CardTypeClient) Intercept

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

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

func (*CardTypeClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CardTypeClient) MapCreateBulk

func (c *CardTypeClient) MapCreateBulk(slice any, setFunc func(*CardTypeCreate, int)) *CardTypeCreateBulk

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

func (c *CardTypeClient) Query() *CardTypeQuery

Query returns a query builder for CardType.

func (*CardTypeClient) QueryCards

func (c *CardTypeClient) QueryCards(ct *CardType) *CardQuery

QueryCards queries the cards edge of a CardType.

func (*CardTypeClient) QueryContext

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

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

func (*CardTypeClient) Update

func (c *CardTypeClient) Update() *CardTypeUpdate

Update returns an update builder for CardType.

func (*CardTypeClient) UpdateOne

func (c *CardTypeClient) UpdateOne(ct *CardType) *CardTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CardTypeClient) UpdateOneID

func (c *CardTypeClient) UpdateOneID(id int) *CardTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CardTypeClient) Use

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

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

type CardTypeConnection

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

CardTypeConnection is the connection containing edges to CardType.

type CardTypeCreate

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

CardTypeCreate is the builder for creating a CardType entity.

func (*CardTypeCreate) AddCardIDs

func (ctc *CardTypeCreate) AddCardIDs(ids ...int) *CardTypeCreate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*CardTypeCreate) AddCards

func (ctc *CardTypeCreate) AddCards(c ...*Card) *CardTypeCreate

AddCards adds the "cards" edges to the Card entity.

func (*CardTypeCreate) Exec

func (ctc *CardTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardTypeCreate) ExecContext

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

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

func (*CardTypeCreate) ExecX

func (ctc *CardTypeCreate) ExecX(ctx context.Context)

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

func (*CardTypeCreate) Mutation

func (ctc *CardTypeCreate) Mutation() *CardTypeMutation

Mutation returns the CardTypeMutation object of the builder.

func (*CardTypeCreate) OnConflict

func (ctc *CardTypeCreate) OnConflict(opts ...sql.ConflictOption) *CardTypeUpsertOne

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

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

func (*CardTypeCreate) OnConflictColumns

func (ctc *CardTypeCreate) OnConflictColumns(columns ...string) *CardTypeUpsertOne

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

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

func (*CardTypeCreate) QueryContext

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

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

func (*CardTypeCreate) Save

func (ctc *CardTypeCreate) Save(ctx context.Context) (*CardType, error)

Save creates the CardType in the database.

func (*CardTypeCreate) SaveX

func (ctc *CardTypeCreate) SaveX(ctx context.Context) *CardType

SaveX calls Save and panics if Save returns an error.

func (*CardTypeCreate) SetID

func (ctc *CardTypeCreate) SetID(i int) *CardTypeCreate

SetID sets the "id" field.

func (*CardTypeCreate) SetKey

func (ctc *CardTypeCreate) SetKey(s string) *CardTypeCreate

SetKey sets the "key" field.

func (*CardTypeCreate) SetNameEn

func (ctc *CardTypeCreate) SetNameEn(s string) *CardTypeCreate

SetNameEn sets the "name_en" field.

func (*CardTypeCreate) SetNameJa

func (ctc *CardTypeCreate) SetNameJa(s string) *CardTypeCreate

SetNameJa sets the "name_ja" field.

func (*CardTypeCreate) SetNillableNameEn

func (ctc *CardTypeCreate) SetNillableNameEn(s *string) *CardTypeCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardTypeCreate) SetNillableNameJa

func (ctc *CardTypeCreate) SetNillableNameJa(s *string) *CardTypeCreate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

type CardTypeCreateBulk

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

CardTypeCreateBulk is the builder for creating many CardType entities in bulk.

func (*CardTypeCreateBulk) Exec

func (ctcb *CardTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CardTypeCreateBulk) ExecContext

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

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

func (*CardTypeCreateBulk) ExecX

func (ctcb *CardTypeCreateBulk) ExecX(ctx context.Context)

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

func (*CardTypeCreateBulk) OnConflict

func (ctcb *CardTypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *CardTypeUpsertBulk

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

client.CardType.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.CardTypeUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*CardTypeCreateBulk) OnConflictColumns

func (ctcb *CardTypeCreateBulk) OnConflictColumns(columns ...string) *CardTypeUpsertBulk

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

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

func (*CardTypeCreateBulk) QueryContext

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

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

func (*CardTypeCreateBulk) Save

func (ctcb *CardTypeCreateBulk) Save(ctx context.Context) ([]*CardType, error)

Save creates the CardType entities in the database.

func (*CardTypeCreateBulk) SaveX

func (ctcb *CardTypeCreateBulk) SaveX(ctx context.Context) []*CardType

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

type CardTypeDelete

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

CardTypeDelete is the builder for deleting a CardType entity.

func (*CardTypeDelete) Exec

func (ctd *CardTypeDelete) Exec(ctx context.Context) (int, error)

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

func (*CardTypeDelete) ExecContext

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

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

func (*CardTypeDelete) ExecX

func (ctd *CardTypeDelete) ExecX(ctx context.Context) int

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

func (*CardTypeDelete) QueryContext

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

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

func (*CardTypeDelete) Where

func (ctd *CardTypeDelete) Where(ps ...predicate.CardType) *CardTypeDelete

Where appends a list predicates to the CardTypeDelete builder.

type CardTypeDeleteOne

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

CardTypeDeleteOne is the builder for deleting a single CardType entity.

func (*CardTypeDeleteOne) Exec

func (ctdo *CardTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CardTypeDeleteOne) ExecX

func (ctdo *CardTypeDeleteOne) ExecX(ctx context.Context)

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

func (*CardTypeDeleteOne) Where

Where appends a list predicates to the CardTypeDelete builder.

type CardTypeEdge

type CardTypeEdge struct {
	Node   *CardType `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

CardTypeEdge is the edge representation of CardType.

type CardTypeEdges

type CardTypeEdges struct {
	// Cards holds the value of the cards edge.
	Cards []*Card `json:"cards,omitempty"`
	// contains filtered or unexported fields
}

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

func (CardTypeEdges) CardsOrErr

func (e CardTypeEdges) CardsOrErr() ([]*Card, error)

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

type CardTypeGroupBy

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

CardTypeGroupBy is the group-by builder for CardType entities.

func (*CardTypeGroupBy) Aggregate

func (ctgb *CardTypeGroupBy) Aggregate(fns ...AggregateFunc) *CardTypeGroupBy

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

func (*CardTypeGroupBy) Bool

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

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

func (*CardTypeGroupBy) BoolX

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

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

func (*CardTypeGroupBy) Bools

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

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

func (*CardTypeGroupBy) BoolsX

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

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

func (*CardTypeGroupBy) Float64

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

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

func (*CardTypeGroupBy) Float64X

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

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

func (*CardTypeGroupBy) Float64s

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

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

func (*CardTypeGroupBy) Float64sX

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

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

func (*CardTypeGroupBy) Int

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

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

func (*CardTypeGroupBy) IntX

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

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

func (*CardTypeGroupBy) Ints

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

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

func (*CardTypeGroupBy) IntsX

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

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

func (*CardTypeGroupBy) Scan

func (ctgb *CardTypeGroupBy) Scan(ctx context.Context, v any) error

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

func (*CardTypeGroupBy) ScanX

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

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

func (*CardTypeGroupBy) String

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

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

func (*CardTypeGroupBy) StringX

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

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

func (*CardTypeGroupBy) Strings

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

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

func (*CardTypeGroupBy) StringsX

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

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

type CardTypeMutation

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

CardTypeMutation represents an operation that mutates the CardType nodes in the graph.

func (*CardTypeMutation) AddCardIDs

func (m *CardTypeMutation) AddCardIDs(ids ...int)

AddCardIDs adds the "cards" edge to the Card entity by ids.

func (*CardTypeMutation) AddField

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

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

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

func (*CardTypeMutation) AddedField

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

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

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

func (*CardTypeMutation) AddedIDs

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

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

func (*CardTypeMutation) CardsCleared

func (m *CardTypeMutation) CardsCleared() bool

CardsCleared reports if the "cards" edge to the Card entity was cleared.

func (*CardTypeMutation) CardsIDs

func (m *CardTypeMutation) CardsIDs() (ids []int)

CardsIDs returns the "cards" edge IDs in the mutation.

func (*CardTypeMutation) ClearCards

func (m *CardTypeMutation) ClearCards()

ClearCards clears the "cards" edge to the Card entity.

func (*CardTypeMutation) ClearEdge

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

func (m *CardTypeMutation) 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 (*CardTypeMutation) ClearNameEn

func (m *CardTypeMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*CardTypeMutation) ClearNameJa

func (m *CardTypeMutation) ClearNameJa()

ClearNameJa clears the value of the "name_ja" field.

func (*CardTypeMutation) ClearedEdges

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

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

func (*CardTypeMutation) ClearedFields

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

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

func (CardTypeMutation) Client

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

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

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

func (*CardTypeMutation) ExecContext

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

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

func (*CardTypeMutation) Field

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

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

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

func (*CardTypeMutation) Fields

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

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

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

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

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

func (*CardTypeMutation) NameEn

func (m *CardTypeMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*CardTypeMutation) NameEnCleared

func (m *CardTypeMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*CardTypeMutation) NameJa

func (m *CardTypeMutation) NameJa() (r string, exists bool)

NameJa returns the value of the "name_ja" field in the mutation.

func (*CardTypeMutation) NameJaCleared

func (m *CardTypeMutation) NameJaCleared() bool

NameJaCleared returns if the "name_ja" field was cleared in this mutation.

func (*CardTypeMutation) OldField

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

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

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

func (m *CardTypeMutation) OldNameEn(ctx context.Context) (v string, err error)

OldNameEn returns the old "name_en" field's value of the CardType entity. If the CardType 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 (*CardTypeMutation) OldNameJa

func (m *CardTypeMutation) OldNameJa(ctx context.Context) (v string, err error)

OldNameJa returns the old "name_ja" field's value of the CardType entity. If the CardType 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 (*CardTypeMutation) Op

func (m *CardTypeMutation) Op() Op

Op returns the operation name.

func (*CardTypeMutation) QueryContext

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

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

func (*CardTypeMutation) RemoveCardIDs

func (m *CardTypeMutation) RemoveCardIDs(ids ...int)

RemoveCardIDs removes the "cards" edge to the Card entity by IDs.

func (*CardTypeMutation) RemovedCardsIDs

func (m *CardTypeMutation) RemovedCardsIDs() (ids []int)

RemovedCards returns the removed IDs of the "cards" edge to the Card entity.

func (*CardTypeMutation) RemovedEdges

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

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

func (*CardTypeMutation) RemovedIDs

func (m *CardTypeMutation) 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 (*CardTypeMutation) ResetCards

func (m *CardTypeMutation) ResetCards()

ResetCards resets all changes to the "cards" edge.

func (*CardTypeMutation) ResetEdge

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

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

func (m *CardTypeMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*CardTypeMutation) ResetNameEn

func (m *CardTypeMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*CardTypeMutation) ResetNameJa

func (m *CardTypeMutation) ResetNameJa()

ResetNameJa resets all changes to the "name_ja" field.

func (*CardTypeMutation) SetField

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

func (m *CardTypeMutation) SetID(id int)

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

func (*CardTypeMutation) SetKey

func (m *CardTypeMutation) SetKey(s string)

SetKey sets the "key" field.

func (*CardTypeMutation) SetNameEn

func (m *CardTypeMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*CardTypeMutation) SetNameJa

func (m *CardTypeMutation) SetNameJa(s string)

SetNameJa sets the "name_ja" field.

func (*CardTypeMutation) SetOp

func (m *CardTypeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (CardTypeMutation) Tx

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

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

func (*CardTypeMutation) Type

func (m *CardTypeMutation) Type() string

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

func (*CardTypeMutation) Where

func (m *CardTypeMutation) Where(ps ...predicate.CardType)

Where appends a list predicates to the CardTypeMutation builder.

func (*CardTypeMutation) WhereP

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

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

type CardTypeOrder

type CardTypeOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *CardTypeOrderField `json:"field"`
}

CardTypeOrder defines the ordering of CardType.

type CardTypeOrderField

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

CardTypeOrderField defines the ordering field of CardType.

type CardTypePaginateOption

type CardTypePaginateOption func(*cardtypePager) error

CardTypePaginateOption enables pagination customization.

func WithCardTypeFilter

func WithCardTypeFilter(filter func(*CardTypeQuery) (*CardTypeQuery, error)) CardTypePaginateOption

WithCardTypeFilter configures pagination filter.

func WithCardTypeOrder

func WithCardTypeOrder(order *CardTypeOrder) CardTypePaginateOption

WithCardTypeOrder configures pagination ordering.

type CardTypeQuery

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

CardTypeQuery is the builder for querying CardType entities.

func (*CardTypeQuery) Aggregate

func (ctq *CardTypeQuery) Aggregate(fns ...AggregateFunc) *CardTypeSelect

Aggregate returns a CardTypeSelect configured with the given aggregations.

func (*CardTypeQuery) All

func (ctq *CardTypeQuery) All(ctx context.Context) ([]*CardType, error)

All executes the query and returns a list of CardTypes.

func (*CardTypeQuery) AllX

func (ctq *CardTypeQuery) AllX(ctx context.Context) []*CardType

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

func (*CardTypeQuery) Clone

func (ctq *CardTypeQuery) Clone() *CardTypeQuery

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

func (*CardTypeQuery) CollectFields

func (ct *CardTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*CardTypeQuery, error)

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

func (*CardTypeQuery) Count

func (ctq *CardTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CardTypeQuery) CountX

func (ctq *CardTypeQuery) CountX(ctx context.Context) int

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

func (*CardTypeQuery) ExecContext

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

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

func (*CardTypeQuery) Exist

func (ctq *CardTypeQuery) Exist(ctx context.Context) (bool, error)

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

func (*CardTypeQuery) ExistX

func (ctq *CardTypeQuery) ExistX(ctx context.Context) bool

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

func (*CardTypeQuery) First

func (ctq *CardTypeQuery) First(ctx context.Context) (*CardType, error)

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

func (*CardTypeQuery) FirstID

func (ctq *CardTypeQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CardTypeQuery) FirstIDX

func (ctq *CardTypeQuery) FirstIDX(ctx context.Context) int

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

func (*CardTypeQuery) FirstX

func (ctq *CardTypeQuery) FirstX(ctx context.Context) *CardType

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

func (*CardTypeQuery) GroupBy

func (ctq *CardTypeQuery) GroupBy(field string, fields ...string) *CardTypeGroupBy

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

Example:

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

client.CardType.Query().
	GroupBy(cardtype.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CardTypeQuery) IDs

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

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

func (*CardTypeQuery) IDsX

func (ctq *CardTypeQuery) IDsX(ctx context.Context) []int

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

func (*CardTypeQuery) Limit

func (ctq *CardTypeQuery) Limit(limit int) *CardTypeQuery

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

func (*CardTypeQuery) Offset

func (ctq *CardTypeQuery) Offset(offset int) *CardTypeQuery

Offset to start from.

func (*CardTypeQuery) Only

func (ctq *CardTypeQuery) Only(ctx context.Context) (*CardType, error)

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

func (*CardTypeQuery) OnlyID

func (ctq *CardTypeQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CardTypeQuery) OnlyIDX

func (ctq *CardTypeQuery) OnlyIDX(ctx context.Context) int

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

func (*CardTypeQuery) OnlyX

func (ctq *CardTypeQuery) OnlyX(ctx context.Context) *CardType

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

func (*CardTypeQuery) Order

func (ctq *CardTypeQuery) Order(o ...cardtype.OrderOption) *CardTypeQuery

Order specifies how the records should be ordered.

func (*CardTypeQuery) Paginate

func (ct *CardTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...CardTypePaginateOption,
) (*CardTypeConnection, error)

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

func (*CardTypeQuery) QueryCards

func (ctq *CardTypeQuery) QueryCards() *CardQuery

QueryCards chains the current query on the "cards" edge.

func (*CardTypeQuery) QueryContext

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

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

func (*CardTypeQuery) Select

func (ctq *CardTypeQuery) Select(fields ...string) *CardTypeSelect

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

Example:

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

client.CardType.Query().
	Select(cardtype.FieldKey).
	Scan(ctx, &v)

func (*CardTypeQuery) Unique

func (ctq *CardTypeQuery) Unique(unique bool) *CardTypeQuery

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

func (ctq *CardTypeQuery) Where(ps ...predicate.CardType) *CardTypeQuery

Where adds a new predicate for the CardTypeQuery builder.

func (*CardTypeQuery) WithCards

func (ctq *CardTypeQuery) WithCards(opts ...func(*CardQuery)) *CardTypeQuery

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

func (*CardTypeQuery) WithNamedCards

func (ctq *CardTypeQuery) WithNamedCards(name string, opts ...func(*CardQuery)) *CardTypeQuery

WithNamedCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type CardTypeSelect

type CardTypeSelect struct {
	*CardTypeQuery
	// contains filtered or unexported fields
}

CardTypeSelect is the builder for selecting fields of CardType entities.

func (*CardTypeSelect) Aggregate

func (cts *CardTypeSelect) Aggregate(fns ...AggregateFunc) *CardTypeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CardTypeSelect) Bool

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

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

func (*CardTypeSelect) BoolX

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

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

func (*CardTypeSelect) Bools

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

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

func (*CardTypeSelect) BoolsX

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

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

func (CardTypeSelect) ExecContext

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

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

func (*CardTypeSelect) Float64

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

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

func (*CardTypeSelect) Float64X

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

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

func (*CardTypeSelect) Float64s

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

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

func (*CardTypeSelect) Float64sX

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

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

func (*CardTypeSelect) Int

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

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

func (*CardTypeSelect) IntX

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

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

func (*CardTypeSelect) Ints

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

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

func (*CardTypeSelect) IntsX

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

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

func (CardTypeSelect) QueryContext

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

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

func (*CardTypeSelect) Scan

func (cts *CardTypeSelect) Scan(ctx context.Context, v any) error

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

func (*CardTypeSelect) ScanX

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

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

func (*CardTypeSelect) String

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

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

func (*CardTypeSelect) StringX

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

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

func (*CardTypeSelect) Strings

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

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

func (*CardTypeSelect) StringsX

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

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

type CardTypeUpdate

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

CardTypeUpdate is the builder for updating CardType entities.

func (*CardTypeUpdate) AddCardIDs

func (ctu *CardTypeUpdate) AddCardIDs(ids ...int) *CardTypeUpdate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*CardTypeUpdate) AddCards

func (ctu *CardTypeUpdate) AddCards(c ...*Card) *CardTypeUpdate

AddCards adds the "cards" edges to the Card entity.

func (*CardTypeUpdate) ClearCards

func (ctu *CardTypeUpdate) ClearCards() *CardTypeUpdate

ClearCards clears all "cards" edges to the Card entity.

func (*CardTypeUpdate) ClearNameEn

func (ctu *CardTypeUpdate) ClearNameEn() *CardTypeUpdate

ClearNameEn clears the value of the "name_en" field.

func (*CardTypeUpdate) ClearNameJa

func (ctu *CardTypeUpdate) ClearNameJa() *CardTypeUpdate

ClearNameJa clears the value of the "name_ja" field.

func (*CardTypeUpdate) Exec

func (ctu *CardTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardTypeUpdate) ExecContext

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

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

func (*CardTypeUpdate) ExecX

func (ctu *CardTypeUpdate) ExecX(ctx context.Context)

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

func (*CardTypeUpdate) Mutation

func (ctu *CardTypeUpdate) Mutation() *CardTypeMutation

Mutation returns the CardTypeMutation object of the builder.

func (*CardTypeUpdate) QueryContext

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

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

func (*CardTypeUpdate) RemoveCardIDs

func (ctu *CardTypeUpdate) RemoveCardIDs(ids ...int) *CardTypeUpdate

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*CardTypeUpdate) RemoveCards

func (ctu *CardTypeUpdate) RemoveCards(c ...*Card) *CardTypeUpdate

RemoveCards removes "cards" edges to Card entities.

func (*CardTypeUpdate) Save

func (ctu *CardTypeUpdate) Save(ctx context.Context) (int, error)

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

func (*CardTypeUpdate) SaveX

func (ctu *CardTypeUpdate) SaveX(ctx context.Context) int

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

func (*CardTypeUpdate) SetNameEn

func (ctu *CardTypeUpdate) SetNameEn(s string) *CardTypeUpdate

SetNameEn sets the "name_en" field.

func (*CardTypeUpdate) SetNameJa

func (ctu *CardTypeUpdate) SetNameJa(s string) *CardTypeUpdate

SetNameJa sets the "name_ja" field.

func (*CardTypeUpdate) SetNillableNameEn

func (ctu *CardTypeUpdate) SetNillableNameEn(s *string) *CardTypeUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardTypeUpdate) SetNillableNameJa

func (ctu *CardTypeUpdate) SetNillableNameJa(s *string) *CardTypeUpdate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*CardTypeUpdate) Where

func (ctu *CardTypeUpdate) Where(ps ...predicate.CardType) *CardTypeUpdate

Where appends a list predicates to the CardTypeUpdate builder.

type CardTypeUpdateOne

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

CardTypeUpdateOne is the builder for updating a single CardType entity.

func (*CardTypeUpdateOne) AddCardIDs

func (ctuo *CardTypeUpdateOne) AddCardIDs(ids ...int) *CardTypeUpdateOne

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*CardTypeUpdateOne) AddCards

func (ctuo *CardTypeUpdateOne) AddCards(c ...*Card) *CardTypeUpdateOne

AddCards adds the "cards" edges to the Card entity.

func (*CardTypeUpdateOne) ClearCards

func (ctuo *CardTypeUpdateOne) ClearCards() *CardTypeUpdateOne

ClearCards clears all "cards" edges to the Card entity.

func (*CardTypeUpdateOne) ClearNameEn

func (ctuo *CardTypeUpdateOne) ClearNameEn() *CardTypeUpdateOne

ClearNameEn clears the value of the "name_en" field.

func (*CardTypeUpdateOne) ClearNameJa

func (ctuo *CardTypeUpdateOne) ClearNameJa() *CardTypeUpdateOne

ClearNameJa clears the value of the "name_ja" field.

func (*CardTypeUpdateOne) Exec

func (ctuo *CardTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CardTypeUpdateOne) ExecContext

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

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

func (*CardTypeUpdateOne) ExecX

func (ctuo *CardTypeUpdateOne) ExecX(ctx context.Context)

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

func (*CardTypeUpdateOne) Mutation

func (ctuo *CardTypeUpdateOne) Mutation() *CardTypeMutation

Mutation returns the CardTypeMutation object of the builder.

func (*CardTypeUpdateOne) QueryContext

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

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

func (*CardTypeUpdateOne) RemoveCardIDs

func (ctuo *CardTypeUpdateOne) RemoveCardIDs(ids ...int) *CardTypeUpdateOne

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*CardTypeUpdateOne) RemoveCards

func (ctuo *CardTypeUpdateOne) RemoveCards(c ...*Card) *CardTypeUpdateOne

RemoveCards removes "cards" edges to Card entities.

func (*CardTypeUpdateOne) Save

func (ctuo *CardTypeUpdateOne) Save(ctx context.Context) (*CardType, error)

Save executes the query and returns the updated CardType entity.

func (*CardTypeUpdateOne) SaveX

func (ctuo *CardTypeUpdateOne) SaveX(ctx context.Context) *CardType

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

func (*CardTypeUpdateOne) Select

func (ctuo *CardTypeUpdateOne) Select(field string, fields ...string) *CardTypeUpdateOne

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

func (*CardTypeUpdateOne) SetNameEn

func (ctuo *CardTypeUpdateOne) SetNameEn(s string) *CardTypeUpdateOne

SetNameEn sets the "name_en" field.

func (*CardTypeUpdateOne) SetNameJa

func (ctuo *CardTypeUpdateOne) SetNameJa(s string) *CardTypeUpdateOne

SetNameJa sets the "name_ja" field.

func (*CardTypeUpdateOne) SetNillableNameEn

func (ctuo *CardTypeUpdateOne) SetNillableNameEn(s *string) *CardTypeUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardTypeUpdateOne) SetNillableNameJa

func (ctuo *CardTypeUpdateOne) SetNillableNameJa(s *string) *CardTypeUpdateOne

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*CardTypeUpdateOne) Where

Where appends a list predicates to the CardTypeUpdate builder.

type CardTypeUpsert

type CardTypeUpsert struct {
	*sql.UpdateSet
}

CardTypeUpsert is the "OnConflict" setter.

func (*CardTypeUpsert) ClearNameEn

func (u *CardTypeUpsert) ClearNameEn() *CardTypeUpsert

ClearNameEn clears the value of the "name_en" field.

func (*CardTypeUpsert) ClearNameJa

func (u *CardTypeUpsert) ClearNameJa() *CardTypeUpsert

ClearNameJa clears the value of the "name_ja" field.

func (*CardTypeUpsert) SetNameEn

func (u *CardTypeUpsert) SetNameEn(v string) *CardTypeUpsert

SetNameEn sets the "name_en" field.

func (*CardTypeUpsert) SetNameJa

func (u *CardTypeUpsert) SetNameJa(v string) *CardTypeUpsert

SetNameJa sets the "name_ja" field.

func (*CardTypeUpsert) UpdateNameEn

func (u *CardTypeUpsert) UpdateNameEn() *CardTypeUpsert

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

func (*CardTypeUpsert) UpdateNameJa

func (u *CardTypeUpsert) UpdateNameJa() *CardTypeUpsert

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

type CardTypeUpsertBulk

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

CardTypeUpsertBulk is the builder for "upsert"-ing a bulk of CardType nodes.

func (*CardTypeUpsertBulk) ClearNameEn

func (u *CardTypeUpsertBulk) ClearNameEn() *CardTypeUpsertBulk

ClearNameEn clears the value of the "name_en" field.

func (*CardTypeUpsertBulk) ClearNameJa

func (u *CardTypeUpsertBulk) ClearNameJa() *CardTypeUpsertBulk

ClearNameJa clears the value of the "name_ja" field.

func (*CardTypeUpsertBulk) DoNothing

func (u *CardTypeUpsertBulk) DoNothing() *CardTypeUpsertBulk

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

func (*CardTypeUpsertBulk) Exec

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

Exec executes the query.

func (*CardTypeUpsertBulk) ExecX

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

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

func (*CardTypeUpsertBulk) Ignore

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

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

func (*CardTypeUpsertBulk) SetNameEn

func (u *CardTypeUpsertBulk) SetNameEn(v string) *CardTypeUpsertBulk

SetNameEn sets the "name_en" field.

func (*CardTypeUpsertBulk) SetNameJa

func (u *CardTypeUpsertBulk) SetNameJa(v string) *CardTypeUpsertBulk

SetNameJa sets the "name_ja" field.

func (*CardTypeUpsertBulk) Update

func (u *CardTypeUpsertBulk) Update(set func(*CardTypeUpsert)) *CardTypeUpsertBulk

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

func (*CardTypeUpsertBulk) UpdateNameEn

func (u *CardTypeUpsertBulk) UpdateNameEn() *CardTypeUpsertBulk

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

func (*CardTypeUpsertBulk) UpdateNameJa

func (u *CardTypeUpsertBulk) UpdateNameJa() *CardTypeUpsertBulk

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

func (*CardTypeUpsertBulk) UpdateNewValues

func (u *CardTypeUpsertBulk) UpdateNewValues() *CardTypeUpsertBulk

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

client.CardType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(cardtype.FieldID)
		}),
	).
	Exec(ctx)

type CardTypeUpsertOne

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

CardTypeUpsertOne is the builder for "upsert"-ing

one CardType node.

func (*CardTypeUpsertOne) ClearNameEn

func (u *CardTypeUpsertOne) ClearNameEn() *CardTypeUpsertOne

ClearNameEn clears the value of the "name_en" field.

func (*CardTypeUpsertOne) ClearNameJa

func (u *CardTypeUpsertOne) ClearNameJa() *CardTypeUpsertOne

ClearNameJa clears the value of the "name_ja" field.

func (*CardTypeUpsertOne) DoNothing

func (u *CardTypeUpsertOne) DoNothing() *CardTypeUpsertOne

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

func (*CardTypeUpsertOne) Exec

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

Exec executes the query.

func (*CardTypeUpsertOne) ExecX

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

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

func (*CardTypeUpsertOne) ID

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

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

func (*CardTypeUpsertOne) IDX

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

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

func (*CardTypeUpsertOne) Ignore

func (u *CardTypeUpsertOne) Ignore() *CardTypeUpsertOne

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

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

func (*CardTypeUpsertOne) SetNameEn

func (u *CardTypeUpsertOne) SetNameEn(v string) *CardTypeUpsertOne

SetNameEn sets the "name_en" field.

func (*CardTypeUpsertOne) SetNameJa

func (u *CardTypeUpsertOne) SetNameJa(v string) *CardTypeUpsertOne

SetNameJa sets the "name_ja" field.

func (*CardTypeUpsertOne) Update

func (u *CardTypeUpsertOne) Update(set func(*CardTypeUpsert)) *CardTypeUpsertOne

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

func (*CardTypeUpsertOne) UpdateNameEn

func (u *CardTypeUpsertOne) UpdateNameEn() *CardTypeUpsertOne

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

func (*CardTypeUpsertOne) UpdateNameJa

func (u *CardTypeUpsertOne) UpdateNameJa() *CardTypeUpsertOne

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

func (*CardTypeUpsertOne) UpdateNewValues

func (u *CardTypeUpsertOne) UpdateNewValues() *CardTypeUpsertOne

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

client.CardType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(cardtype.FieldID)
		}),
	).
	Exec(ctx)

type CardTypeWhereInput

type CardTypeWhereInput struct {
	Predicates []predicate.CardType  `json:"-"`
	Not        *CardTypeWhereInput   `json:"not,omitempty"`
	Or         []*CardTypeWhereInput `json:"or,omitempty"`
	And        []*CardTypeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "name_ja" field predicates.
	NameJa             *string  `json:"nameJa,omitempty"`
	NameJaNEQ          *string  `json:"nameJaNEQ,omitempty"`
	NameJaIn           []string `json:"nameJaIn,omitempty"`
	NameJaNotIn        []string `json:"nameJaNotIn,omitempty"`
	NameJaGT           *string  `json:"nameJaGT,omitempty"`
	NameJaGTE          *string  `json:"nameJaGTE,omitempty"`
	NameJaLT           *string  `json:"nameJaLT,omitempty"`
	NameJaLTE          *string  `json:"nameJaLTE,omitempty"`
	NameJaContains     *string  `json:"nameJaContains,omitempty"`
	NameJaHasPrefix    *string  `json:"nameJaHasPrefix,omitempty"`
	NameJaHasSuffix    *string  `json:"nameJaHasSuffix,omitempty"`
	NameJaIsNil        bool     `json:"nameJaIsNil,omitempty"`
	NameJaNotNil       bool     `json:"nameJaNotNil,omitempty"`
	NameJaEqualFold    *string  `json:"nameJaEqualFold,omitempty"`
	NameJaContainsFold *string  `json:"nameJaContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,omitempty"`

	// "cards" edge predicates.
	HasCards     *bool             `json:"hasCards,omitempty"`
	HasCardsWith []*CardWhereInput `json:"hasCardsWith,omitempty"`
}

CardTypeWhereInput represents a where input for filtering CardType queries.

func (*CardTypeWhereInput) AddPredicates

func (i *CardTypeWhereInput) AddPredicates(predicates ...predicate.CardType)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*CardTypeWhereInput) Filter

Filter applies the CardTypeWhereInput filter on the CardTypeQuery builder.

func (*CardTypeWhereInput) P

P returns a predicate for filtering cardtypes. An error is returned if the input is empty or invalid.

type CardTypes

type CardTypes []*CardType

CardTypes is a parsable slice of CardType.

type CardUpdate

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

CardUpdate is the builder for updating Card entities.

func (*CardUpdate) AddAncestorIDs

func (cu *CardUpdate) AddAncestorIDs(ids ...int) *CardUpdate

AddAncestorIDs adds the "ancestors" edge to the Card entity by IDs.

func (*CardUpdate) AddAncestors

func (cu *CardUpdate) AddAncestors(c ...*Card) *CardUpdate

AddAncestors adds the "ancestors" edges to the Card entity.

func (*CardUpdate) AddChildIDs

func (cu *CardUpdate) AddChildIDs(ids ...int) *CardUpdate

AddChildIDs adds the "children" edge to the Card entity by IDs.

func (*CardUpdate) AddChildren

func (cu *CardUpdate) AddChildren(c ...*Card) *CardUpdate

AddChildren adds the "children" edges to the Card entity.

func (*CardUpdate) AddMinPlayersNumber

func (cu *CardUpdate) AddMinPlayersNumber(i int) *CardUpdate

AddMinPlayersNumber adds i to the "min_players_number" field.

func (*CardUpdate) AddProductIDs

func (cu *CardUpdate) AddProductIDs(ids ...int) *CardUpdate

AddProductIDs adds the "products" edge to the Product entity by IDs.

func (*CardUpdate) AddProducts

func (cu *CardUpdate) AddProducts(p ...*Product) *CardUpdate

AddProducts adds the "products" edges to the Product entity.

func (*CardUpdate) AddVictoryPoint

func (cu *CardUpdate) AddVictoryPoint(i int) *CardUpdate

AddVictoryPoint adds i to the "victory_point" field.

func (*CardUpdate) ClearAncestors

func (cu *CardUpdate) ClearAncestors() *CardUpdate

ClearAncestors clears all "ancestors" edges to the Card entity.

func (*CardUpdate) ClearCardSpecialColor

func (cu *CardUpdate) ClearCardSpecialColor() *CardUpdate

ClearCardSpecialColor clears the "card_special_color" edge to the CardSpecialColor entity.

func (*CardUpdate) ClearCardSpecialColorID

func (cu *CardUpdate) ClearCardSpecialColorID() *CardUpdate

ClearCardSpecialColorID clears the value of the "card_special_color_id" field.

func (*CardUpdate) ClearCardType

func (cu *CardUpdate) ClearCardType() *CardUpdate

ClearCardType clears the "card_type" edge to the CardType entity.

func (*CardUpdate) ClearChildren

func (cu *CardUpdate) ClearChildren() *CardUpdate

ClearChildren clears all "children" edges to the Card entity.

func (*CardUpdate) ClearCost

func (cu *CardUpdate) ClearCost() *CardUpdate

ClearCost clears the value of the "cost" field.

func (*CardUpdate) ClearDeck

func (cu *CardUpdate) ClearDeck() *CardUpdate

ClearDeck clears the "deck" edge to the Deck entity.

func (*CardUpdate) ClearDeckID

func (cu *CardUpdate) ClearDeckID() *CardUpdate

ClearDeckID clears the value of the "deck_id" field.

func (*CardUpdate) ClearDescription

func (cu *CardUpdate) ClearDescription() *CardUpdate

ClearDescription clears the value of the "description" field.

func (*CardUpdate) ClearMinPlayersNumber

func (cu *CardUpdate) ClearMinPlayersNumber() *CardUpdate

ClearMinPlayersNumber clears the value of the "min_players_number" field.

func (*CardUpdate) ClearNameEn

func (cu *CardUpdate) ClearNameEn() *CardUpdate

ClearNameEn clears the value of the "name_en" field.

func (*CardUpdate) ClearNameJa

func (cu *CardUpdate) ClearNameJa() *CardUpdate

ClearNameJa clears the value of the "name_ja" field.

func (*CardUpdate) ClearNote

func (cu *CardUpdate) ClearNote() *CardUpdate

ClearNote clears the value of the "note" field.

func (*CardUpdate) ClearPlayAgricolaCardID

func (cu *CardUpdate) ClearPlayAgricolaCardID() *CardUpdate

ClearPlayAgricolaCardID clears the value of the "play_agricola_card_id" field.

func (*CardUpdate) ClearPrerequisite

func (cu *CardUpdate) ClearPrerequisite() *CardUpdate

ClearPrerequisite clears the value of the "prerequisite" field.

func (*CardUpdate) ClearPrintedID

func (cu *CardUpdate) ClearPrintedID() *CardUpdate

ClearPrintedID clears the value of the "printed_id" field.

func (*CardUpdate) ClearProducts

func (cu *CardUpdate) ClearProducts() *CardUpdate

ClearProducts clears all "products" edges to the Product entity.

func (*CardUpdate) ClearSpecialVictoryPoint

func (cu *CardUpdate) ClearSpecialVictoryPoint() *CardUpdate

ClearSpecialVictoryPoint clears the value of the "special_victory_point" field.

func (*CardUpdate) ClearVictoryPoint

func (cu *CardUpdate) ClearVictoryPoint() *CardUpdate

ClearVictoryPoint clears the value of the "victory_point" field.

func (*CardUpdate) Exec

func (cu *CardUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardUpdate) ExecContext

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

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

func (*CardUpdate) ExecX

func (cu *CardUpdate) ExecX(ctx context.Context)

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

func (*CardUpdate) Mutation

func (cu *CardUpdate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdate) QueryContext

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

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

func (*CardUpdate) RemoveAncestorIDs

func (cu *CardUpdate) RemoveAncestorIDs(ids ...int) *CardUpdate

RemoveAncestorIDs removes the "ancestors" edge to Card entities by IDs.

func (*CardUpdate) RemoveAncestors

func (cu *CardUpdate) RemoveAncestors(c ...*Card) *CardUpdate

RemoveAncestors removes "ancestors" edges to Card entities.

func (*CardUpdate) RemoveChildIDs

func (cu *CardUpdate) RemoveChildIDs(ids ...int) *CardUpdate

RemoveChildIDs removes the "children" edge to Card entities by IDs.

func (*CardUpdate) RemoveChildren

func (cu *CardUpdate) RemoveChildren(c ...*Card) *CardUpdate

RemoveChildren removes "children" edges to Card entities.

func (*CardUpdate) RemoveProductIDs

func (cu *CardUpdate) RemoveProductIDs(ids ...int) *CardUpdate

RemoveProductIDs removes the "products" edge to Product entities by IDs.

func (*CardUpdate) RemoveProducts

func (cu *CardUpdate) RemoveProducts(p ...*Product) *CardUpdate

RemoveProducts removes "products" edges to Product entities.

func (*CardUpdate) Save

func (cu *CardUpdate) Save(ctx context.Context) (int, error)

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

func (*CardUpdate) SaveX

func (cu *CardUpdate) SaveX(ctx context.Context) int

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

func (*CardUpdate) SetCardSpecialColor

func (cu *CardUpdate) SetCardSpecialColor(c *CardSpecialColor) *CardUpdate

SetCardSpecialColor sets the "card_special_color" edge to the CardSpecialColor entity.

func (*CardUpdate) SetCardSpecialColorID

func (cu *CardUpdate) SetCardSpecialColorID(i int) *CardUpdate

SetCardSpecialColorID sets the "card_special_color_id" field.

func (*CardUpdate) SetCardType

func (cu *CardUpdate) SetCardType(c *CardType) *CardUpdate

SetCardType sets the "card_type" edge to the CardType entity.

func (*CardUpdate) SetCardTypeID

func (cu *CardUpdate) SetCardTypeID(i int) *CardUpdate

SetCardTypeID sets the "card_type_id" field.

func (*CardUpdate) SetCost

func (cu *CardUpdate) SetCost(s string) *CardUpdate

SetCost sets the "cost" field.

func (*CardUpdate) SetDeck

func (cu *CardUpdate) SetDeck(d *Deck) *CardUpdate

SetDeck sets the "deck" edge to the Deck entity.

func (*CardUpdate) SetDeckID

func (cu *CardUpdate) SetDeckID(i int) *CardUpdate

SetDeckID sets the "deck_id" field.

func (*CardUpdate) SetDescription

func (cu *CardUpdate) SetDescription(s string) *CardUpdate

SetDescription sets the "description" field.

func (*CardUpdate) SetHasActionsBoosterIcon

func (cu *CardUpdate) SetHasActionsBoosterIcon(b bool) *CardUpdate

SetHasActionsBoosterIcon sets the "has_actions_booster_icon" field.

func (*CardUpdate) SetHasArrow

func (cu *CardUpdate) SetHasArrow(b bool) *CardUpdate

SetHasArrow sets the "has_arrow" field.

func (*CardUpdate) SetHasBonusPointIcon

func (cu *CardUpdate) SetHasBonusPointIcon(b bool) *CardUpdate

SetHasBonusPointIcon sets the "has_bonus_point_icon" field.

func (*CardUpdate) SetHasBreadIcon

func (cu *CardUpdate) SetHasBreadIcon(b bool) *CardUpdate

SetHasBreadIcon sets the "has_bread_icon" field.

func (*CardUpdate) SetHasBuildingResourceProviderIcon

func (cu *CardUpdate) SetHasBuildingResourceProviderIcon(b bool) *CardUpdate

SetHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field.

func (*CardUpdate) SetHasCropProviderIcon

func (cu *CardUpdate) SetHasCropProviderIcon(b bool) *CardUpdate

SetHasCropProviderIcon sets the "has_crop_provider_icon" field.

func (*CardUpdate) SetHasCutPeatIcon

func (cu *CardUpdate) SetHasCutPeatIcon(b bool) *CardUpdate

SetHasCutPeatIcon sets the "has_cut_peat_icon" field.

func (*CardUpdate) SetHasFarmPlannerIcon

func (cu *CardUpdate) SetHasFarmPlannerIcon(b bool) *CardUpdate

SetHasFarmPlannerIcon sets the "has_farm_planner_icon" field.

func (*CardUpdate) SetHasFellTreesIcon

func (cu *CardUpdate) SetHasFellTreesIcon(b bool) *CardUpdate

SetHasFellTreesIcon sets the "has_fell_trees_icon" field.

func (*CardUpdate) SetHasFoodProviderIcon

func (cu *CardUpdate) SetHasFoodProviderIcon(b bool) *CardUpdate

SetHasFoodProviderIcon sets the "has_food_provider_icon" field.

func (*CardUpdate) SetHasGoodsProviderIcon

func (cu *CardUpdate) SetHasGoodsProviderIcon(b bool) *CardUpdate

SetHasGoodsProviderIcon sets the "has_goods_provider_icon" field.

func (*CardUpdate) SetHasHiringFareIcon

func (cu *CardUpdate) SetHasHiringFareIcon(b bool) *CardUpdate

SetHasHiringFareIcon sets the "has_hiring_fare_icon" field.

func (*CardUpdate) SetHasLivestockProviderIcon

func (cu *CardUpdate) SetHasLivestockProviderIcon(b bool) *CardUpdate

SetHasLivestockProviderIcon sets the "has_livestock_provider_icon" field.

func (*CardUpdate) SetHasNegativeBonusPointIcon

func (cu *CardUpdate) SetHasNegativeBonusPointIcon(b bool) *CardUpdate

SetHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field.

func (*CardUpdate) SetHasPanIcon

func (cu *CardUpdate) SetHasPanIcon(b bool) *CardUpdate

SetHasPanIcon sets the "has_pan_icon" field.

func (*CardUpdate) SetHasPointsProviderIcon

func (cu *CardUpdate) SetHasPointsProviderIcon(b bool) *CardUpdate

SetHasPointsProviderIcon sets the "has_points_provider_icon" field.

func (*CardUpdate) SetHasSlashAndBurnIcon

func (cu *CardUpdate) SetHasSlashAndBurnIcon(b bool) *CardUpdate

SetHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field.

func (*CardUpdate) SetIsOfficialJa

func (cu *CardUpdate) SetIsOfficialJa(b bool) *CardUpdate

SetIsOfficialJa sets the "is_official_ja" field.

func (*CardUpdate) SetMinPlayersNumber

func (cu *CardUpdate) SetMinPlayersNumber(i int) *CardUpdate

SetMinPlayersNumber sets the "min_players_number" field.

func (*CardUpdate) SetNameEn

func (cu *CardUpdate) SetNameEn(s string) *CardUpdate

SetNameEn sets the "name_en" field.

func (*CardUpdate) SetNameJa

func (cu *CardUpdate) SetNameJa(s string) *CardUpdate

SetNameJa sets the "name_ja" field.

func (*CardUpdate) SetNillableCardSpecialColorID

func (cu *CardUpdate) SetNillableCardSpecialColorID(i *int) *CardUpdate

SetNillableCardSpecialColorID sets the "card_special_color_id" field if the given value is not nil.

func (*CardUpdate) SetNillableCardTypeID

func (cu *CardUpdate) SetNillableCardTypeID(i *int) *CardUpdate

SetNillableCardTypeID sets the "card_type_id" field if the given value is not nil.

func (*CardUpdate) SetNillableCost

func (cu *CardUpdate) SetNillableCost(s *string) *CardUpdate

SetNillableCost sets the "cost" field if the given value is not nil.

func (*CardUpdate) SetNillableDeckID

func (cu *CardUpdate) SetNillableDeckID(i *int) *CardUpdate

SetNillableDeckID sets the "deck_id" field if the given value is not nil.

func (*CardUpdate) SetNillableDescription

func (cu *CardUpdate) SetNillableDescription(s *string) *CardUpdate

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

func (*CardUpdate) SetNillableHasActionsBoosterIcon

func (cu *CardUpdate) SetNillableHasActionsBoosterIcon(b *bool) *CardUpdate

SetNillableHasActionsBoosterIcon sets the "has_actions_booster_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasArrow

func (cu *CardUpdate) SetNillableHasArrow(b *bool) *CardUpdate

SetNillableHasArrow sets the "has_arrow" field if the given value is not nil.

func (*CardUpdate) SetNillableHasBonusPointIcon

func (cu *CardUpdate) SetNillableHasBonusPointIcon(b *bool) *CardUpdate

SetNillableHasBonusPointIcon sets the "has_bonus_point_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasBreadIcon

func (cu *CardUpdate) SetNillableHasBreadIcon(b *bool) *CardUpdate

SetNillableHasBreadIcon sets the "has_bread_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasBuildingResourceProviderIcon

func (cu *CardUpdate) SetNillableHasBuildingResourceProviderIcon(b *bool) *CardUpdate

SetNillableHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasCropProviderIcon

func (cu *CardUpdate) SetNillableHasCropProviderIcon(b *bool) *CardUpdate

SetNillableHasCropProviderIcon sets the "has_crop_provider_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasCutPeatIcon

func (cu *CardUpdate) SetNillableHasCutPeatIcon(b *bool) *CardUpdate

SetNillableHasCutPeatIcon sets the "has_cut_peat_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasFarmPlannerIcon

func (cu *CardUpdate) SetNillableHasFarmPlannerIcon(b *bool) *CardUpdate

SetNillableHasFarmPlannerIcon sets the "has_farm_planner_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasFellTreesIcon

func (cu *CardUpdate) SetNillableHasFellTreesIcon(b *bool) *CardUpdate

SetNillableHasFellTreesIcon sets the "has_fell_trees_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasFoodProviderIcon

func (cu *CardUpdate) SetNillableHasFoodProviderIcon(b *bool) *CardUpdate

SetNillableHasFoodProviderIcon sets the "has_food_provider_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasGoodsProviderIcon

func (cu *CardUpdate) SetNillableHasGoodsProviderIcon(b *bool) *CardUpdate

SetNillableHasGoodsProviderIcon sets the "has_goods_provider_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasHiringFareIcon

func (cu *CardUpdate) SetNillableHasHiringFareIcon(b *bool) *CardUpdate

SetNillableHasHiringFareIcon sets the "has_hiring_fare_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasLivestockProviderIcon

func (cu *CardUpdate) SetNillableHasLivestockProviderIcon(b *bool) *CardUpdate

SetNillableHasLivestockProviderIcon sets the "has_livestock_provider_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasNegativeBonusPointIcon

func (cu *CardUpdate) SetNillableHasNegativeBonusPointIcon(b *bool) *CardUpdate

SetNillableHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasPanIcon

func (cu *CardUpdate) SetNillableHasPanIcon(b *bool) *CardUpdate

SetNillableHasPanIcon sets the "has_pan_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasPointsProviderIcon

func (cu *CardUpdate) SetNillableHasPointsProviderIcon(b *bool) *CardUpdate

SetNillableHasPointsProviderIcon sets the "has_points_provider_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableHasSlashAndBurnIcon

func (cu *CardUpdate) SetNillableHasSlashAndBurnIcon(b *bool) *CardUpdate

SetNillableHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field if the given value is not nil.

func (*CardUpdate) SetNillableIsOfficialJa

func (cu *CardUpdate) SetNillableIsOfficialJa(b *bool) *CardUpdate

SetNillableIsOfficialJa sets the "is_official_ja" field if the given value is not nil.

func (*CardUpdate) SetNillableMinPlayersNumber

func (cu *CardUpdate) SetNillableMinPlayersNumber(i *int) *CardUpdate

SetNillableMinPlayersNumber sets the "min_players_number" field if the given value is not nil.

func (*CardUpdate) SetNillableNameEn

func (cu *CardUpdate) SetNillableNameEn(s *string) *CardUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardUpdate) SetNillableNameJa

func (cu *CardUpdate) SetNillableNameJa(s *string) *CardUpdate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*CardUpdate) SetNillableNote

func (cu *CardUpdate) SetNillableNote(s *string) *CardUpdate

SetNillableNote sets the "note" field if the given value is not nil.

func (*CardUpdate) SetNillablePlayAgricolaCardID

func (cu *CardUpdate) SetNillablePlayAgricolaCardID(s *string) *CardUpdate

SetNillablePlayAgricolaCardID sets the "play_agricola_card_id" field if the given value is not nil.

func (*CardUpdate) SetNillablePrerequisite

func (cu *CardUpdate) SetNillablePrerequisite(s *string) *CardUpdate

SetNillablePrerequisite sets the "prerequisite" field if the given value is not nil.

func (*CardUpdate) SetNillablePrintedID

func (cu *CardUpdate) SetNillablePrintedID(s *string) *CardUpdate

SetNillablePrintedID sets the "printed_id" field if the given value is not nil.

func (*CardUpdate) SetNillableSpecialVictoryPoint

func (cu *CardUpdate) SetNillableSpecialVictoryPoint(s *string) *CardUpdate

SetNillableSpecialVictoryPoint sets the "special_victory_point" field if the given value is not nil.

func (*CardUpdate) SetNillableVictoryPoint

func (cu *CardUpdate) SetNillableVictoryPoint(i *int) *CardUpdate

SetNillableVictoryPoint sets the "victory_point" field if the given value is not nil.

func (*CardUpdate) SetNote

func (cu *CardUpdate) SetNote(s string) *CardUpdate

SetNote sets the "note" field.

func (*CardUpdate) SetPlayAgricolaCardID

func (cu *CardUpdate) SetPlayAgricolaCardID(s string) *CardUpdate

SetPlayAgricolaCardID sets the "play_agricola_card_id" field.

func (*CardUpdate) SetPrerequisite

func (cu *CardUpdate) SetPrerequisite(s string) *CardUpdate

SetPrerequisite sets the "prerequisite" field.

func (*CardUpdate) SetPrintedID

func (cu *CardUpdate) SetPrintedID(s string) *CardUpdate

SetPrintedID sets the "printed_id" field.

func (*CardUpdate) SetSpecialVictoryPoint

func (cu *CardUpdate) SetSpecialVictoryPoint(s string) *CardUpdate

SetSpecialVictoryPoint sets the "special_victory_point" field.

func (*CardUpdate) SetVictoryPoint

func (cu *CardUpdate) SetVictoryPoint(i int) *CardUpdate

SetVictoryPoint sets the "victory_point" field.

func (*CardUpdate) Where

func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate

Where appends a list predicates to the CardUpdate builder.

type CardUpdateOne

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

CardUpdateOne is the builder for updating a single Card entity.

func (*CardUpdateOne) AddAncestorIDs

func (cuo *CardUpdateOne) AddAncestorIDs(ids ...int) *CardUpdateOne

AddAncestorIDs adds the "ancestors" edge to the Card entity by IDs.

func (*CardUpdateOne) AddAncestors

func (cuo *CardUpdateOne) AddAncestors(c ...*Card) *CardUpdateOne

AddAncestors adds the "ancestors" edges to the Card entity.

func (*CardUpdateOne) AddChildIDs

func (cuo *CardUpdateOne) AddChildIDs(ids ...int) *CardUpdateOne

AddChildIDs adds the "children" edge to the Card entity by IDs.

func (*CardUpdateOne) AddChildren

func (cuo *CardUpdateOne) AddChildren(c ...*Card) *CardUpdateOne

AddChildren adds the "children" edges to the Card entity.

func (*CardUpdateOne) AddMinPlayersNumber

func (cuo *CardUpdateOne) AddMinPlayersNumber(i int) *CardUpdateOne

AddMinPlayersNumber adds i to the "min_players_number" field.

func (*CardUpdateOne) AddProductIDs

func (cuo *CardUpdateOne) AddProductIDs(ids ...int) *CardUpdateOne

AddProductIDs adds the "products" edge to the Product entity by IDs.

func (*CardUpdateOne) AddProducts

func (cuo *CardUpdateOne) AddProducts(p ...*Product) *CardUpdateOne

AddProducts adds the "products" edges to the Product entity.

func (*CardUpdateOne) AddVictoryPoint

func (cuo *CardUpdateOne) AddVictoryPoint(i int) *CardUpdateOne

AddVictoryPoint adds i to the "victory_point" field.

func (*CardUpdateOne) ClearAncestors

func (cuo *CardUpdateOne) ClearAncestors() *CardUpdateOne

ClearAncestors clears all "ancestors" edges to the Card entity.

func (*CardUpdateOne) ClearCardSpecialColor

func (cuo *CardUpdateOne) ClearCardSpecialColor() *CardUpdateOne

ClearCardSpecialColor clears the "card_special_color" edge to the CardSpecialColor entity.

func (*CardUpdateOne) ClearCardSpecialColorID

func (cuo *CardUpdateOne) ClearCardSpecialColorID() *CardUpdateOne

ClearCardSpecialColorID clears the value of the "card_special_color_id" field.

func (*CardUpdateOne) ClearCardType

func (cuo *CardUpdateOne) ClearCardType() *CardUpdateOne

ClearCardType clears the "card_type" edge to the CardType entity.

func (*CardUpdateOne) ClearChildren

func (cuo *CardUpdateOne) ClearChildren() *CardUpdateOne

ClearChildren clears all "children" edges to the Card entity.

func (*CardUpdateOne) ClearCost

func (cuo *CardUpdateOne) ClearCost() *CardUpdateOne

ClearCost clears the value of the "cost" field.

func (*CardUpdateOne) ClearDeck

func (cuo *CardUpdateOne) ClearDeck() *CardUpdateOne

ClearDeck clears the "deck" edge to the Deck entity.

func (*CardUpdateOne) ClearDeckID

func (cuo *CardUpdateOne) ClearDeckID() *CardUpdateOne

ClearDeckID clears the value of the "deck_id" field.

func (*CardUpdateOne) ClearDescription

func (cuo *CardUpdateOne) ClearDescription() *CardUpdateOne

ClearDescription clears the value of the "description" field.

func (*CardUpdateOne) ClearMinPlayersNumber

func (cuo *CardUpdateOne) ClearMinPlayersNumber() *CardUpdateOne

ClearMinPlayersNumber clears the value of the "min_players_number" field.

func (*CardUpdateOne) ClearNameEn

func (cuo *CardUpdateOne) ClearNameEn() *CardUpdateOne

ClearNameEn clears the value of the "name_en" field.

func (*CardUpdateOne) ClearNameJa

func (cuo *CardUpdateOne) ClearNameJa() *CardUpdateOne

ClearNameJa clears the value of the "name_ja" field.

func (*CardUpdateOne) ClearNote

func (cuo *CardUpdateOne) ClearNote() *CardUpdateOne

ClearNote clears the value of the "note" field.

func (*CardUpdateOne) ClearPlayAgricolaCardID

func (cuo *CardUpdateOne) ClearPlayAgricolaCardID() *CardUpdateOne

ClearPlayAgricolaCardID clears the value of the "play_agricola_card_id" field.

func (*CardUpdateOne) ClearPrerequisite

func (cuo *CardUpdateOne) ClearPrerequisite() *CardUpdateOne

ClearPrerequisite clears the value of the "prerequisite" field.

func (*CardUpdateOne) ClearPrintedID

func (cuo *CardUpdateOne) ClearPrintedID() *CardUpdateOne

ClearPrintedID clears the value of the "printed_id" field.

func (*CardUpdateOne) ClearProducts

func (cuo *CardUpdateOne) ClearProducts() *CardUpdateOne

ClearProducts clears all "products" edges to the Product entity.

func (*CardUpdateOne) ClearSpecialVictoryPoint

func (cuo *CardUpdateOne) ClearSpecialVictoryPoint() *CardUpdateOne

ClearSpecialVictoryPoint clears the value of the "special_victory_point" field.

func (*CardUpdateOne) ClearVictoryPoint

func (cuo *CardUpdateOne) ClearVictoryPoint() *CardUpdateOne

ClearVictoryPoint clears the value of the "victory_point" field.

func (*CardUpdateOne) Exec

func (cuo *CardUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CardUpdateOne) ExecContext

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

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

func (*CardUpdateOne) ExecX

func (cuo *CardUpdateOne) ExecX(ctx context.Context)

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

func (*CardUpdateOne) Mutation

func (cuo *CardUpdateOne) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdateOne) QueryContext

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

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

func (*CardUpdateOne) RemoveAncestorIDs

func (cuo *CardUpdateOne) RemoveAncestorIDs(ids ...int) *CardUpdateOne

RemoveAncestorIDs removes the "ancestors" edge to Card entities by IDs.

func (*CardUpdateOne) RemoveAncestors

func (cuo *CardUpdateOne) RemoveAncestors(c ...*Card) *CardUpdateOne

RemoveAncestors removes "ancestors" edges to Card entities.

func (*CardUpdateOne) RemoveChildIDs

func (cuo *CardUpdateOne) RemoveChildIDs(ids ...int) *CardUpdateOne

RemoveChildIDs removes the "children" edge to Card entities by IDs.

func (*CardUpdateOne) RemoveChildren

func (cuo *CardUpdateOne) RemoveChildren(c ...*Card) *CardUpdateOne

RemoveChildren removes "children" edges to Card entities.

func (*CardUpdateOne) RemoveProductIDs

func (cuo *CardUpdateOne) RemoveProductIDs(ids ...int) *CardUpdateOne

RemoveProductIDs removes the "products" edge to Product entities by IDs.

func (*CardUpdateOne) RemoveProducts

func (cuo *CardUpdateOne) RemoveProducts(p ...*Product) *CardUpdateOne

RemoveProducts removes "products" edges to Product entities.

func (*CardUpdateOne) Save

func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)

Save executes the query and returns the updated Card entity.

func (*CardUpdateOne) SaveX

func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card

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

func (*CardUpdateOne) Select

func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne

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

func (*CardUpdateOne) SetCardSpecialColor

func (cuo *CardUpdateOne) SetCardSpecialColor(c *CardSpecialColor) *CardUpdateOne

SetCardSpecialColor sets the "card_special_color" edge to the CardSpecialColor entity.

func (*CardUpdateOne) SetCardSpecialColorID

func (cuo *CardUpdateOne) SetCardSpecialColorID(i int) *CardUpdateOne

SetCardSpecialColorID sets the "card_special_color_id" field.

func (*CardUpdateOne) SetCardType

func (cuo *CardUpdateOne) SetCardType(c *CardType) *CardUpdateOne

SetCardType sets the "card_type" edge to the CardType entity.

func (*CardUpdateOne) SetCardTypeID

func (cuo *CardUpdateOne) SetCardTypeID(i int) *CardUpdateOne

SetCardTypeID sets the "card_type_id" field.

func (*CardUpdateOne) SetCost

func (cuo *CardUpdateOne) SetCost(s string) *CardUpdateOne

SetCost sets the "cost" field.

func (*CardUpdateOne) SetDeck

func (cuo *CardUpdateOne) SetDeck(d *Deck) *CardUpdateOne

SetDeck sets the "deck" edge to the Deck entity.

func (*CardUpdateOne) SetDeckID

func (cuo *CardUpdateOne) SetDeckID(i int) *CardUpdateOne

SetDeckID sets the "deck_id" field.

func (*CardUpdateOne) SetDescription

func (cuo *CardUpdateOne) SetDescription(s string) *CardUpdateOne

SetDescription sets the "description" field.

func (*CardUpdateOne) SetHasActionsBoosterIcon

func (cuo *CardUpdateOne) SetHasActionsBoosterIcon(b bool) *CardUpdateOne

SetHasActionsBoosterIcon sets the "has_actions_booster_icon" field.

func (*CardUpdateOne) SetHasArrow

func (cuo *CardUpdateOne) SetHasArrow(b bool) *CardUpdateOne

SetHasArrow sets the "has_arrow" field.

func (*CardUpdateOne) SetHasBonusPointIcon

func (cuo *CardUpdateOne) SetHasBonusPointIcon(b bool) *CardUpdateOne

SetHasBonusPointIcon sets the "has_bonus_point_icon" field.

func (*CardUpdateOne) SetHasBreadIcon

func (cuo *CardUpdateOne) SetHasBreadIcon(b bool) *CardUpdateOne

SetHasBreadIcon sets the "has_bread_icon" field.

func (*CardUpdateOne) SetHasBuildingResourceProviderIcon

func (cuo *CardUpdateOne) SetHasBuildingResourceProviderIcon(b bool) *CardUpdateOne

SetHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field.

func (*CardUpdateOne) SetHasCropProviderIcon

func (cuo *CardUpdateOne) SetHasCropProviderIcon(b bool) *CardUpdateOne

SetHasCropProviderIcon sets the "has_crop_provider_icon" field.

func (*CardUpdateOne) SetHasCutPeatIcon

func (cuo *CardUpdateOne) SetHasCutPeatIcon(b bool) *CardUpdateOne

SetHasCutPeatIcon sets the "has_cut_peat_icon" field.

func (*CardUpdateOne) SetHasFarmPlannerIcon

func (cuo *CardUpdateOne) SetHasFarmPlannerIcon(b bool) *CardUpdateOne

SetHasFarmPlannerIcon sets the "has_farm_planner_icon" field.

func (*CardUpdateOne) SetHasFellTreesIcon

func (cuo *CardUpdateOne) SetHasFellTreesIcon(b bool) *CardUpdateOne

SetHasFellTreesIcon sets the "has_fell_trees_icon" field.

func (*CardUpdateOne) SetHasFoodProviderIcon

func (cuo *CardUpdateOne) SetHasFoodProviderIcon(b bool) *CardUpdateOne

SetHasFoodProviderIcon sets the "has_food_provider_icon" field.

func (*CardUpdateOne) SetHasGoodsProviderIcon

func (cuo *CardUpdateOne) SetHasGoodsProviderIcon(b bool) *CardUpdateOne

SetHasGoodsProviderIcon sets the "has_goods_provider_icon" field.

func (*CardUpdateOne) SetHasHiringFareIcon

func (cuo *CardUpdateOne) SetHasHiringFareIcon(b bool) *CardUpdateOne

SetHasHiringFareIcon sets the "has_hiring_fare_icon" field.

func (*CardUpdateOne) SetHasLivestockProviderIcon

func (cuo *CardUpdateOne) SetHasLivestockProviderIcon(b bool) *CardUpdateOne

SetHasLivestockProviderIcon sets the "has_livestock_provider_icon" field.

func (*CardUpdateOne) SetHasNegativeBonusPointIcon

func (cuo *CardUpdateOne) SetHasNegativeBonusPointIcon(b bool) *CardUpdateOne

SetHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field.

func (*CardUpdateOne) SetHasPanIcon

func (cuo *CardUpdateOne) SetHasPanIcon(b bool) *CardUpdateOne

SetHasPanIcon sets the "has_pan_icon" field.

func (*CardUpdateOne) SetHasPointsProviderIcon

func (cuo *CardUpdateOne) SetHasPointsProviderIcon(b bool) *CardUpdateOne

SetHasPointsProviderIcon sets the "has_points_provider_icon" field.

func (*CardUpdateOne) SetHasSlashAndBurnIcon

func (cuo *CardUpdateOne) SetHasSlashAndBurnIcon(b bool) *CardUpdateOne

SetHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field.

func (*CardUpdateOne) SetIsOfficialJa

func (cuo *CardUpdateOne) SetIsOfficialJa(b bool) *CardUpdateOne

SetIsOfficialJa sets the "is_official_ja" field.

func (*CardUpdateOne) SetMinPlayersNumber

func (cuo *CardUpdateOne) SetMinPlayersNumber(i int) *CardUpdateOne

SetMinPlayersNumber sets the "min_players_number" field.

func (*CardUpdateOne) SetNameEn

func (cuo *CardUpdateOne) SetNameEn(s string) *CardUpdateOne

SetNameEn sets the "name_en" field.

func (*CardUpdateOne) SetNameJa

func (cuo *CardUpdateOne) SetNameJa(s string) *CardUpdateOne

SetNameJa sets the "name_ja" field.

func (*CardUpdateOne) SetNillableCardSpecialColorID

func (cuo *CardUpdateOne) SetNillableCardSpecialColorID(i *int) *CardUpdateOne

SetNillableCardSpecialColorID sets the "card_special_color_id" field if the given value is not nil.

func (*CardUpdateOne) SetNillableCardTypeID

func (cuo *CardUpdateOne) SetNillableCardTypeID(i *int) *CardUpdateOne

SetNillableCardTypeID sets the "card_type_id" field if the given value is not nil.

func (*CardUpdateOne) SetNillableCost

func (cuo *CardUpdateOne) SetNillableCost(s *string) *CardUpdateOne

SetNillableCost sets the "cost" field if the given value is not nil.

func (*CardUpdateOne) SetNillableDeckID

func (cuo *CardUpdateOne) SetNillableDeckID(i *int) *CardUpdateOne

SetNillableDeckID sets the "deck_id" field if the given value is not nil.

func (*CardUpdateOne) SetNillableDescription

func (cuo *CardUpdateOne) SetNillableDescription(s *string) *CardUpdateOne

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

func (*CardUpdateOne) SetNillableHasActionsBoosterIcon

func (cuo *CardUpdateOne) SetNillableHasActionsBoosterIcon(b *bool) *CardUpdateOne

SetNillableHasActionsBoosterIcon sets the "has_actions_booster_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasArrow

func (cuo *CardUpdateOne) SetNillableHasArrow(b *bool) *CardUpdateOne

SetNillableHasArrow sets the "has_arrow" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasBonusPointIcon

func (cuo *CardUpdateOne) SetNillableHasBonusPointIcon(b *bool) *CardUpdateOne

SetNillableHasBonusPointIcon sets the "has_bonus_point_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasBreadIcon

func (cuo *CardUpdateOne) SetNillableHasBreadIcon(b *bool) *CardUpdateOne

SetNillableHasBreadIcon sets the "has_bread_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasBuildingResourceProviderIcon

func (cuo *CardUpdateOne) SetNillableHasBuildingResourceProviderIcon(b *bool) *CardUpdateOne

SetNillableHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasCropProviderIcon

func (cuo *CardUpdateOne) SetNillableHasCropProviderIcon(b *bool) *CardUpdateOne

SetNillableHasCropProviderIcon sets the "has_crop_provider_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasCutPeatIcon

func (cuo *CardUpdateOne) SetNillableHasCutPeatIcon(b *bool) *CardUpdateOne

SetNillableHasCutPeatIcon sets the "has_cut_peat_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasFarmPlannerIcon

func (cuo *CardUpdateOne) SetNillableHasFarmPlannerIcon(b *bool) *CardUpdateOne

SetNillableHasFarmPlannerIcon sets the "has_farm_planner_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasFellTreesIcon

func (cuo *CardUpdateOne) SetNillableHasFellTreesIcon(b *bool) *CardUpdateOne

SetNillableHasFellTreesIcon sets the "has_fell_trees_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasFoodProviderIcon

func (cuo *CardUpdateOne) SetNillableHasFoodProviderIcon(b *bool) *CardUpdateOne

SetNillableHasFoodProviderIcon sets the "has_food_provider_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasGoodsProviderIcon

func (cuo *CardUpdateOne) SetNillableHasGoodsProviderIcon(b *bool) *CardUpdateOne

SetNillableHasGoodsProviderIcon sets the "has_goods_provider_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasHiringFareIcon

func (cuo *CardUpdateOne) SetNillableHasHiringFareIcon(b *bool) *CardUpdateOne

SetNillableHasHiringFareIcon sets the "has_hiring_fare_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasLivestockProviderIcon

func (cuo *CardUpdateOne) SetNillableHasLivestockProviderIcon(b *bool) *CardUpdateOne

SetNillableHasLivestockProviderIcon sets the "has_livestock_provider_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasNegativeBonusPointIcon

func (cuo *CardUpdateOne) SetNillableHasNegativeBonusPointIcon(b *bool) *CardUpdateOne

SetNillableHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasPanIcon

func (cuo *CardUpdateOne) SetNillableHasPanIcon(b *bool) *CardUpdateOne

SetNillableHasPanIcon sets the "has_pan_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasPointsProviderIcon

func (cuo *CardUpdateOne) SetNillableHasPointsProviderIcon(b *bool) *CardUpdateOne

SetNillableHasPointsProviderIcon sets the "has_points_provider_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableHasSlashAndBurnIcon

func (cuo *CardUpdateOne) SetNillableHasSlashAndBurnIcon(b *bool) *CardUpdateOne

SetNillableHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field if the given value is not nil.

func (*CardUpdateOne) SetNillableIsOfficialJa

func (cuo *CardUpdateOne) SetNillableIsOfficialJa(b *bool) *CardUpdateOne

SetNillableIsOfficialJa sets the "is_official_ja" field if the given value is not nil.

func (*CardUpdateOne) SetNillableMinPlayersNumber

func (cuo *CardUpdateOne) SetNillableMinPlayersNumber(i *int) *CardUpdateOne

SetNillableMinPlayersNumber sets the "min_players_number" field if the given value is not nil.

func (*CardUpdateOne) SetNillableNameEn

func (cuo *CardUpdateOne) SetNillableNameEn(s *string) *CardUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*CardUpdateOne) SetNillableNameJa

func (cuo *CardUpdateOne) SetNillableNameJa(s *string) *CardUpdateOne

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*CardUpdateOne) SetNillableNote

func (cuo *CardUpdateOne) SetNillableNote(s *string) *CardUpdateOne

SetNillableNote sets the "note" field if the given value is not nil.

func (*CardUpdateOne) SetNillablePlayAgricolaCardID

func (cuo *CardUpdateOne) SetNillablePlayAgricolaCardID(s *string) *CardUpdateOne

SetNillablePlayAgricolaCardID sets the "play_agricola_card_id" field if the given value is not nil.

func (*CardUpdateOne) SetNillablePrerequisite

func (cuo *CardUpdateOne) SetNillablePrerequisite(s *string) *CardUpdateOne

SetNillablePrerequisite sets the "prerequisite" field if the given value is not nil.

func (*CardUpdateOne) SetNillablePrintedID

func (cuo *CardUpdateOne) SetNillablePrintedID(s *string) *CardUpdateOne

SetNillablePrintedID sets the "printed_id" field if the given value is not nil.

func (*CardUpdateOne) SetNillableSpecialVictoryPoint

func (cuo *CardUpdateOne) SetNillableSpecialVictoryPoint(s *string) *CardUpdateOne

SetNillableSpecialVictoryPoint sets the "special_victory_point" field if the given value is not nil.

func (*CardUpdateOne) SetNillableVictoryPoint

func (cuo *CardUpdateOne) SetNillableVictoryPoint(i *int) *CardUpdateOne

SetNillableVictoryPoint sets the "victory_point" field if the given value is not nil.

func (*CardUpdateOne) SetNote

func (cuo *CardUpdateOne) SetNote(s string) *CardUpdateOne

SetNote sets the "note" field.

func (*CardUpdateOne) SetPlayAgricolaCardID

func (cuo *CardUpdateOne) SetPlayAgricolaCardID(s string) *CardUpdateOne

SetPlayAgricolaCardID sets the "play_agricola_card_id" field.

func (*CardUpdateOne) SetPrerequisite

func (cuo *CardUpdateOne) SetPrerequisite(s string) *CardUpdateOne

SetPrerequisite sets the "prerequisite" field.

func (*CardUpdateOne) SetPrintedID

func (cuo *CardUpdateOne) SetPrintedID(s string) *CardUpdateOne

SetPrintedID sets the "printed_id" field.

func (*CardUpdateOne) SetSpecialVictoryPoint

func (cuo *CardUpdateOne) SetSpecialVictoryPoint(s string) *CardUpdateOne

SetSpecialVictoryPoint sets the "special_victory_point" field.

func (*CardUpdateOne) SetVictoryPoint

func (cuo *CardUpdateOne) SetVictoryPoint(i int) *CardUpdateOne

SetVictoryPoint sets the "victory_point" field.

func (*CardUpdateOne) Where

func (cuo *CardUpdateOne) Where(ps ...predicate.Card) *CardUpdateOne

Where appends a list predicates to the CardUpdate builder.

type CardUpsert

type CardUpsert struct {
	*sql.UpdateSet
}

CardUpsert is the "OnConflict" setter.

func (*CardUpsert) AddMinPlayersNumber

func (u *CardUpsert) AddMinPlayersNumber(v int) *CardUpsert

AddMinPlayersNumber adds v to the "min_players_number" field.

func (*CardUpsert) AddVictoryPoint

func (u *CardUpsert) AddVictoryPoint(v int) *CardUpsert

AddVictoryPoint adds v to the "victory_point" field.

func (*CardUpsert) ClearCardSpecialColorID

func (u *CardUpsert) ClearCardSpecialColorID() *CardUpsert

ClearCardSpecialColorID clears the value of the "card_special_color_id" field.

func (*CardUpsert) ClearCost

func (u *CardUpsert) ClearCost() *CardUpsert

ClearCost clears the value of the "cost" field.

func (*CardUpsert) ClearDeckID

func (u *CardUpsert) ClearDeckID() *CardUpsert

ClearDeckID clears the value of the "deck_id" field.

func (*CardUpsert) ClearDescription

func (u *CardUpsert) ClearDescription() *CardUpsert

ClearDescription clears the value of the "description" field.

func (*CardUpsert) ClearMinPlayersNumber

func (u *CardUpsert) ClearMinPlayersNumber() *CardUpsert

ClearMinPlayersNumber clears the value of the "min_players_number" field.

func (*CardUpsert) ClearNameEn

func (u *CardUpsert) ClearNameEn() *CardUpsert

ClearNameEn clears the value of the "name_en" field.

func (*CardUpsert) ClearNameJa

func (u *CardUpsert) ClearNameJa() *CardUpsert

ClearNameJa clears the value of the "name_ja" field.

func (*CardUpsert) ClearNote

func (u *CardUpsert) ClearNote() *CardUpsert

ClearNote clears the value of the "note" field.

func (*CardUpsert) ClearPlayAgricolaCardID

func (u *CardUpsert) ClearPlayAgricolaCardID() *CardUpsert

ClearPlayAgricolaCardID clears the value of the "play_agricola_card_id" field.

func (*CardUpsert) ClearPrerequisite

func (u *CardUpsert) ClearPrerequisite() *CardUpsert

ClearPrerequisite clears the value of the "prerequisite" field.

func (*CardUpsert) ClearPrintedID

func (u *CardUpsert) ClearPrintedID() *CardUpsert

ClearPrintedID clears the value of the "printed_id" field.

func (*CardUpsert) ClearSpecialVictoryPoint

func (u *CardUpsert) ClearSpecialVictoryPoint() *CardUpsert

ClearSpecialVictoryPoint clears the value of the "special_victory_point" field.

func (*CardUpsert) ClearVictoryPoint

func (u *CardUpsert) ClearVictoryPoint() *CardUpsert

ClearVictoryPoint clears the value of the "victory_point" field.

func (*CardUpsert) SetCardSpecialColorID

func (u *CardUpsert) SetCardSpecialColorID(v int) *CardUpsert

SetCardSpecialColorID sets the "card_special_color_id" field.

func (*CardUpsert) SetCardTypeID

func (u *CardUpsert) SetCardTypeID(v int) *CardUpsert

SetCardTypeID sets the "card_type_id" field.

func (*CardUpsert) SetCost

func (u *CardUpsert) SetCost(v string) *CardUpsert

SetCost sets the "cost" field.

func (*CardUpsert) SetDeckID

func (u *CardUpsert) SetDeckID(v int) *CardUpsert

SetDeckID sets the "deck_id" field.

func (*CardUpsert) SetDescription

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

SetDescription sets the "description" field.

func (*CardUpsert) SetHasActionsBoosterIcon

func (u *CardUpsert) SetHasActionsBoosterIcon(v bool) *CardUpsert

SetHasActionsBoosterIcon sets the "has_actions_booster_icon" field.

func (*CardUpsert) SetHasArrow

func (u *CardUpsert) SetHasArrow(v bool) *CardUpsert

SetHasArrow sets the "has_arrow" field.

func (*CardUpsert) SetHasBonusPointIcon

func (u *CardUpsert) SetHasBonusPointIcon(v bool) *CardUpsert

SetHasBonusPointIcon sets the "has_bonus_point_icon" field.

func (*CardUpsert) SetHasBreadIcon

func (u *CardUpsert) SetHasBreadIcon(v bool) *CardUpsert

SetHasBreadIcon sets the "has_bread_icon" field.

func (*CardUpsert) SetHasBuildingResourceProviderIcon

func (u *CardUpsert) SetHasBuildingResourceProviderIcon(v bool) *CardUpsert

SetHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field.

func (*CardUpsert) SetHasCropProviderIcon

func (u *CardUpsert) SetHasCropProviderIcon(v bool) *CardUpsert

SetHasCropProviderIcon sets the "has_crop_provider_icon" field.

func (*CardUpsert) SetHasCutPeatIcon

func (u *CardUpsert) SetHasCutPeatIcon(v bool) *CardUpsert

SetHasCutPeatIcon sets the "has_cut_peat_icon" field.

func (*CardUpsert) SetHasFarmPlannerIcon

func (u *CardUpsert) SetHasFarmPlannerIcon(v bool) *CardUpsert

SetHasFarmPlannerIcon sets the "has_farm_planner_icon" field.

func (*CardUpsert) SetHasFellTreesIcon

func (u *CardUpsert) SetHasFellTreesIcon(v bool) *CardUpsert

SetHasFellTreesIcon sets the "has_fell_trees_icon" field.

func (*CardUpsert) SetHasFoodProviderIcon

func (u *CardUpsert) SetHasFoodProviderIcon(v bool) *CardUpsert

SetHasFoodProviderIcon sets the "has_food_provider_icon" field.

func (*CardUpsert) SetHasGoodsProviderIcon

func (u *CardUpsert) SetHasGoodsProviderIcon(v bool) *CardUpsert

SetHasGoodsProviderIcon sets the "has_goods_provider_icon" field.

func (*CardUpsert) SetHasHiringFareIcon

func (u *CardUpsert) SetHasHiringFareIcon(v bool) *CardUpsert

SetHasHiringFareIcon sets the "has_hiring_fare_icon" field.

func (*CardUpsert) SetHasLivestockProviderIcon

func (u *CardUpsert) SetHasLivestockProviderIcon(v bool) *CardUpsert

SetHasLivestockProviderIcon sets the "has_livestock_provider_icon" field.

func (*CardUpsert) SetHasNegativeBonusPointIcon

func (u *CardUpsert) SetHasNegativeBonusPointIcon(v bool) *CardUpsert

SetHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field.

func (*CardUpsert) SetHasPanIcon

func (u *CardUpsert) SetHasPanIcon(v bool) *CardUpsert

SetHasPanIcon sets the "has_pan_icon" field.

func (*CardUpsert) SetHasPointsProviderIcon

func (u *CardUpsert) SetHasPointsProviderIcon(v bool) *CardUpsert

SetHasPointsProviderIcon sets the "has_points_provider_icon" field.

func (*CardUpsert) SetHasSlashAndBurnIcon

func (u *CardUpsert) SetHasSlashAndBurnIcon(v bool) *CardUpsert

SetHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field.

func (*CardUpsert) SetIsOfficialJa

func (u *CardUpsert) SetIsOfficialJa(v bool) *CardUpsert

SetIsOfficialJa sets the "is_official_ja" field.

func (*CardUpsert) SetMinPlayersNumber

func (u *CardUpsert) SetMinPlayersNumber(v int) *CardUpsert

SetMinPlayersNumber sets the "min_players_number" field.

func (*CardUpsert) SetNameEn

func (u *CardUpsert) SetNameEn(v string) *CardUpsert

SetNameEn sets the "name_en" field.

func (*CardUpsert) SetNameJa

func (u *CardUpsert) SetNameJa(v string) *CardUpsert

SetNameJa sets the "name_ja" field.

func (*CardUpsert) SetNote

func (u *CardUpsert) SetNote(v string) *CardUpsert

SetNote sets the "note" field.

func (*CardUpsert) SetPlayAgricolaCardID

func (u *CardUpsert) SetPlayAgricolaCardID(v string) *CardUpsert

SetPlayAgricolaCardID sets the "play_agricola_card_id" field.

func (*CardUpsert) SetPrerequisite

func (u *CardUpsert) SetPrerequisite(v string) *CardUpsert

SetPrerequisite sets the "prerequisite" field.

func (*CardUpsert) SetPrintedID

func (u *CardUpsert) SetPrintedID(v string) *CardUpsert

SetPrintedID sets the "printed_id" field.

func (*CardUpsert) SetSpecialVictoryPoint

func (u *CardUpsert) SetSpecialVictoryPoint(v string) *CardUpsert

SetSpecialVictoryPoint sets the "special_victory_point" field.

func (*CardUpsert) SetVictoryPoint

func (u *CardUpsert) SetVictoryPoint(v int) *CardUpsert

SetVictoryPoint sets the "victory_point" field.

func (*CardUpsert) UpdateCardSpecialColorID

func (u *CardUpsert) UpdateCardSpecialColorID() *CardUpsert

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

func (*CardUpsert) UpdateCardTypeID

func (u *CardUpsert) UpdateCardTypeID() *CardUpsert

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

func (*CardUpsert) UpdateCost

func (u *CardUpsert) UpdateCost() *CardUpsert

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

func (*CardUpsert) UpdateDeckID

func (u *CardUpsert) UpdateDeckID() *CardUpsert

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

func (*CardUpsert) UpdateDescription

func (u *CardUpsert) UpdateDescription() *CardUpsert

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

func (*CardUpsert) UpdateHasActionsBoosterIcon

func (u *CardUpsert) UpdateHasActionsBoosterIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasArrow

func (u *CardUpsert) UpdateHasArrow() *CardUpsert

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

func (*CardUpsert) UpdateHasBonusPointIcon

func (u *CardUpsert) UpdateHasBonusPointIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasBreadIcon

func (u *CardUpsert) UpdateHasBreadIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasBuildingResourceProviderIcon

func (u *CardUpsert) UpdateHasBuildingResourceProviderIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasCropProviderIcon

func (u *CardUpsert) UpdateHasCropProviderIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasCutPeatIcon

func (u *CardUpsert) UpdateHasCutPeatIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasFarmPlannerIcon

func (u *CardUpsert) UpdateHasFarmPlannerIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasFellTreesIcon

func (u *CardUpsert) UpdateHasFellTreesIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasFoodProviderIcon

func (u *CardUpsert) UpdateHasFoodProviderIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasGoodsProviderIcon

func (u *CardUpsert) UpdateHasGoodsProviderIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasHiringFareIcon

func (u *CardUpsert) UpdateHasHiringFareIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasLivestockProviderIcon

func (u *CardUpsert) UpdateHasLivestockProviderIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasNegativeBonusPointIcon

func (u *CardUpsert) UpdateHasNegativeBonusPointIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasPanIcon

func (u *CardUpsert) UpdateHasPanIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasPointsProviderIcon

func (u *CardUpsert) UpdateHasPointsProviderIcon() *CardUpsert

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

func (*CardUpsert) UpdateHasSlashAndBurnIcon

func (u *CardUpsert) UpdateHasSlashAndBurnIcon() *CardUpsert

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

func (*CardUpsert) UpdateIsOfficialJa

func (u *CardUpsert) UpdateIsOfficialJa() *CardUpsert

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

func (*CardUpsert) UpdateMinPlayersNumber

func (u *CardUpsert) UpdateMinPlayersNumber() *CardUpsert

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

func (*CardUpsert) UpdateNameEn

func (u *CardUpsert) UpdateNameEn() *CardUpsert

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

func (*CardUpsert) UpdateNameJa

func (u *CardUpsert) UpdateNameJa() *CardUpsert

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

func (*CardUpsert) UpdateNote

func (u *CardUpsert) UpdateNote() *CardUpsert

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

func (*CardUpsert) UpdatePlayAgricolaCardID

func (u *CardUpsert) UpdatePlayAgricolaCardID() *CardUpsert

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

func (*CardUpsert) UpdatePrerequisite

func (u *CardUpsert) UpdatePrerequisite() *CardUpsert

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

func (*CardUpsert) UpdatePrintedID

func (u *CardUpsert) UpdatePrintedID() *CardUpsert

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

func (*CardUpsert) UpdateSpecialVictoryPoint

func (u *CardUpsert) UpdateSpecialVictoryPoint() *CardUpsert

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

func (*CardUpsert) UpdateVictoryPoint

func (u *CardUpsert) UpdateVictoryPoint() *CardUpsert

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

type CardUpsertBulk

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

CardUpsertBulk is the builder for "upsert"-ing a bulk of Card nodes.

func (*CardUpsertBulk) AddMinPlayersNumber

func (u *CardUpsertBulk) AddMinPlayersNumber(v int) *CardUpsertBulk

AddMinPlayersNumber adds v to the "min_players_number" field.

func (*CardUpsertBulk) AddVictoryPoint

func (u *CardUpsertBulk) AddVictoryPoint(v int) *CardUpsertBulk

AddVictoryPoint adds v to the "victory_point" field.

func (*CardUpsertBulk) ClearCardSpecialColorID

func (u *CardUpsertBulk) ClearCardSpecialColorID() *CardUpsertBulk

ClearCardSpecialColorID clears the value of the "card_special_color_id" field.

func (*CardUpsertBulk) ClearCost

func (u *CardUpsertBulk) ClearCost() *CardUpsertBulk

ClearCost clears the value of the "cost" field.

func (*CardUpsertBulk) ClearDeckID

func (u *CardUpsertBulk) ClearDeckID() *CardUpsertBulk

ClearDeckID clears the value of the "deck_id" field.

func (*CardUpsertBulk) ClearDescription

func (u *CardUpsertBulk) ClearDescription() *CardUpsertBulk

ClearDescription clears the value of the "description" field.

func (*CardUpsertBulk) ClearMinPlayersNumber

func (u *CardUpsertBulk) ClearMinPlayersNumber() *CardUpsertBulk

ClearMinPlayersNumber clears the value of the "min_players_number" field.

func (*CardUpsertBulk) ClearNameEn

func (u *CardUpsertBulk) ClearNameEn() *CardUpsertBulk

ClearNameEn clears the value of the "name_en" field.

func (*CardUpsertBulk) ClearNameJa

func (u *CardUpsertBulk) ClearNameJa() *CardUpsertBulk

ClearNameJa clears the value of the "name_ja" field.

func (*CardUpsertBulk) ClearNote

func (u *CardUpsertBulk) ClearNote() *CardUpsertBulk

ClearNote clears the value of the "note" field.

func (*CardUpsertBulk) ClearPlayAgricolaCardID

func (u *CardUpsertBulk) ClearPlayAgricolaCardID() *CardUpsertBulk

ClearPlayAgricolaCardID clears the value of the "play_agricola_card_id" field.

func (*CardUpsertBulk) ClearPrerequisite

func (u *CardUpsertBulk) ClearPrerequisite() *CardUpsertBulk

ClearPrerequisite clears the value of the "prerequisite" field.

func (*CardUpsertBulk) ClearPrintedID

func (u *CardUpsertBulk) ClearPrintedID() *CardUpsertBulk

ClearPrintedID clears the value of the "printed_id" field.

func (*CardUpsertBulk) ClearSpecialVictoryPoint

func (u *CardUpsertBulk) ClearSpecialVictoryPoint() *CardUpsertBulk

ClearSpecialVictoryPoint clears the value of the "special_victory_point" field.

func (*CardUpsertBulk) ClearVictoryPoint

func (u *CardUpsertBulk) ClearVictoryPoint() *CardUpsertBulk

ClearVictoryPoint clears the value of the "victory_point" field.

func (*CardUpsertBulk) DoNothing

func (u *CardUpsertBulk) DoNothing() *CardUpsertBulk

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

func (*CardUpsertBulk) Exec

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

Exec executes the query.

func (*CardUpsertBulk) ExecX

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

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

func (*CardUpsertBulk) Ignore

func (u *CardUpsertBulk) Ignore() *CardUpsertBulk

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

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

func (*CardUpsertBulk) SetCardSpecialColorID

func (u *CardUpsertBulk) SetCardSpecialColorID(v int) *CardUpsertBulk

SetCardSpecialColorID sets the "card_special_color_id" field.

func (*CardUpsertBulk) SetCardTypeID

func (u *CardUpsertBulk) SetCardTypeID(v int) *CardUpsertBulk

SetCardTypeID sets the "card_type_id" field.

func (*CardUpsertBulk) SetCost

func (u *CardUpsertBulk) SetCost(v string) *CardUpsertBulk

SetCost sets the "cost" field.

func (*CardUpsertBulk) SetDeckID

func (u *CardUpsertBulk) SetDeckID(v int) *CardUpsertBulk

SetDeckID sets the "deck_id" field.

func (*CardUpsertBulk) SetDescription

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

SetDescription sets the "description" field.

func (*CardUpsertBulk) SetHasActionsBoosterIcon

func (u *CardUpsertBulk) SetHasActionsBoosterIcon(v bool) *CardUpsertBulk

SetHasActionsBoosterIcon sets the "has_actions_booster_icon" field.

func (*CardUpsertBulk) SetHasArrow

func (u *CardUpsertBulk) SetHasArrow(v bool) *CardUpsertBulk

SetHasArrow sets the "has_arrow" field.

func (*CardUpsertBulk) SetHasBonusPointIcon

func (u *CardUpsertBulk) SetHasBonusPointIcon(v bool) *CardUpsertBulk

SetHasBonusPointIcon sets the "has_bonus_point_icon" field.

func (*CardUpsertBulk) SetHasBreadIcon

func (u *CardUpsertBulk) SetHasBreadIcon(v bool) *CardUpsertBulk

SetHasBreadIcon sets the "has_bread_icon" field.

func (*CardUpsertBulk) SetHasBuildingResourceProviderIcon

func (u *CardUpsertBulk) SetHasBuildingResourceProviderIcon(v bool) *CardUpsertBulk

SetHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field.

func (*CardUpsertBulk) SetHasCropProviderIcon

func (u *CardUpsertBulk) SetHasCropProviderIcon(v bool) *CardUpsertBulk

SetHasCropProviderIcon sets the "has_crop_provider_icon" field.

func (*CardUpsertBulk) SetHasCutPeatIcon

func (u *CardUpsertBulk) SetHasCutPeatIcon(v bool) *CardUpsertBulk

SetHasCutPeatIcon sets the "has_cut_peat_icon" field.

func (*CardUpsertBulk) SetHasFarmPlannerIcon

func (u *CardUpsertBulk) SetHasFarmPlannerIcon(v bool) *CardUpsertBulk

SetHasFarmPlannerIcon sets the "has_farm_planner_icon" field.

func (*CardUpsertBulk) SetHasFellTreesIcon

func (u *CardUpsertBulk) SetHasFellTreesIcon(v bool) *CardUpsertBulk

SetHasFellTreesIcon sets the "has_fell_trees_icon" field.

func (*CardUpsertBulk) SetHasFoodProviderIcon

func (u *CardUpsertBulk) SetHasFoodProviderIcon(v bool) *CardUpsertBulk

SetHasFoodProviderIcon sets the "has_food_provider_icon" field.

func (*CardUpsertBulk) SetHasGoodsProviderIcon

func (u *CardUpsertBulk) SetHasGoodsProviderIcon(v bool) *CardUpsertBulk

SetHasGoodsProviderIcon sets the "has_goods_provider_icon" field.

func (*CardUpsertBulk) SetHasHiringFareIcon

func (u *CardUpsertBulk) SetHasHiringFareIcon(v bool) *CardUpsertBulk

SetHasHiringFareIcon sets the "has_hiring_fare_icon" field.

func (*CardUpsertBulk) SetHasLivestockProviderIcon

func (u *CardUpsertBulk) SetHasLivestockProviderIcon(v bool) *CardUpsertBulk

SetHasLivestockProviderIcon sets the "has_livestock_provider_icon" field.

func (*CardUpsertBulk) SetHasNegativeBonusPointIcon

func (u *CardUpsertBulk) SetHasNegativeBonusPointIcon(v bool) *CardUpsertBulk

SetHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field.

func (*CardUpsertBulk) SetHasPanIcon

func (u *CardUpsertBulk) SetHasPanIcon(v bool) *CardUpsertBulk

SetHasPanIcon sets the "has_pan_icon" field.

func (*CardUpsertBulk) SetHasPointsProviderIcon

func (u *CardUpsertBulk) SetHasPointsProviderIcon(v bool) *CardUpsertBulk

SetHasPointsProviderIcon sets the "has_points_provider_icon" field.

func (*CardUpsertBulk) SetHasSlashAndBurnIcon

func (u *CardUpsertBulk) SetHasSlashAndBurnIcon(v bool) *CardUpsertBulk

SetHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field.

func (*CardUpsertBulk) SetIsOfficialJa

func (u *CardUpsertBulk) SetIsOfficialJa(v bool) *CardUpsertBulk

SetIsOfficialJa sets the "is_official_ja" field.

func (*CardUpsertBulk) SetMinPlayersNumber

func (u *CardUpsertBulk) SetMinPlayersNumber(v int) *CardUpsertBulk

SetMinPlayersNumber sets the "min_players_number" field.

func (*CardUpsertBulk) SetNameEn

func (u *CardUpsertBulk) SetNameEn(v string) *CardUpsertBulk

SetNameEn sets the "name_en" field.

func (*CardUpsertBulk) SetNameJa

func (u *CardUpsertBulk) SetNameJa(v string) *CardUpsertBulk

SetNameJa sets the "name_ja" field.

func (*CardUpsertBulk) SetNote

func (u *CardUpsertBulk) SetNote(v string) *CardUpsertBulk

SetNote sets the "note" field.

func (*CardUpsertBulk) SetPlayAgricolaCardID

func (u *CardUpsertBulk) SetPlayAgricolaCardID(v string) *CardUpsertBulk

SetPlayAgricolaCardID sets the "play_agricola_card_id" field.

func (*CardUpsertBulk) SetPrerequisite

func (u *CardUpsertBulk) SetPrerequisite(v string) *CardUpsertBulk

SetPrerequisite sets the "prerequisite" field.

func (*CardUpsertBulk) SetPrintedID

func (u *CardUpsertBulk) SetPrintedID(v string) *CardUpsertBulk

SetPrintedID sets the "printed_id" field.

func (*CardUpsertBulk) SetSpecialVictoryPoint

func (u *CardUpsertBulk) SetSpecialVictoryPoint(v string) *CardUpsertBulk

SetSpecialVictoryPoint sets the "special_victory_point" field.

func (*CardUpsertBulk) SetVictoryPoint

func (u *CardUpsertBulk) SetVictoryPoint(v int) *CardUpsertBulk

SetVictoryPoint sets the "victory_point" field.

func (*CardUpsertBulk) Update

func (u *CardUpsertBulk) Update(set func(*CardUpsert)) *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateCardSpecialColorID

func (u *CardUpsertBulk) UpdateCardSpecialColorID() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateCardTypeID

func (u *CardUpsertBulk) UpdateCardTypeID() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateCost

func (u *CardUpsertBulk) UpdateCost() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateDeckID

func (u *CardUpsertBulk) UpdateDeckID() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateDescription

func (u *CardUpsertBulk) UpdateDescription() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasActionsBoosterIcon

func (u *CardUpsertBulk) UpdateHasActionsBoosterIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasArrow

func (u *CardUpsertBulk) UpdateHasArrow() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasBonusPointIcon

func (u *CardUpsertBulk) UpdateHasBonusPointIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasBreadIcon

func (u *CardUpsertBulk) UpdateHasBreadIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasBuildingResourceProviderIcon

func (u *CardUpsertBulk) UpdateHasBuildingResourceProviderIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasCropProviderIcon

func (u *CardUpsertBulk) UpdateHasCropProviderIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasCutPeatIcon

func (u *CardUpsertBulk) UpdateHasCutPeatIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasFarmPlannerIcon

func (u *CardUpsertBulk) UpdateHasFarmPlannerIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasFellTreesIcon

func (u *CardUpsertBulk) UpdateHasFellTreesIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasFoodProviderIcon

func (u *CardUpsertBulk) UpdateHasFoodProviderIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasGoodsProviderIcon

func (u *CardUpsertBulk) UpdateHasGoodsProviderIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasHiringFareIcon

func (u *CardUpsertBulk) UpdateHasHiringFareIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasLivestockProviderIcon

func (u *CardUpsertBulk) UpdateHasLivestockProviderIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasNegativeBonusPointIcon

func (u *CardUpsertBulk) UpdateHasNegativeBonusPointIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasPanIcon

func (u *CardUpsertBulk) UpdateHasPanIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasPointsProviderIcon

func (u *CardUpsertBulk) UpdateHasPointsProviderIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateHasSlashAndBurnIcon

func (u *CardUpsertBulk) UpdateHasSlashAndBurnIcon() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateIsOfficialJa

func (u *CardUpsertBulk) UpdateIsOfficialJa() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateMinPlayersNumber

func (u *CardUpsertBulk) UpdateMinPlayersNumber() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateNameEn

func (u *CardUpsertBulk) UpdateNameEn() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateNameJa

func (u *CardUpsertBulk) UpdateNameJa() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateNewValues

func (u *CardUpsertBulk) UpdateNewValues() *CardUpsertBulk

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

client.Card.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(card.FieldID)
		}),
	).
	Exec(ctx)

func (*CardUpsertBulk) UpdateNote

func (u *CardUpsertBulk) UpdateNote() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdatePlayAgricolaCardID

func (u *CardUpsertBulk) UpdatePlayAgricolaCardID() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdatePrerequisite

func (u *CardUpsertBulk) UpdatePrerequisite() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdatePrintedID

func (u *CardUpsertBulk) UpdatePrintedID() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateSpecialVictoryPoint

func (u *CardUpsertBulk) UpdateSpecialVictoryPoint() *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateVictoryPoint

func (u *CardUpsertBulk) UpdateVictoryPoint() *CardUpsertBulk

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

type CardUpsertOne

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

CardUpsertOne is the builder for "upsert"-ing

one Card node.

func (*CardUpsertOne) AddMinPlayersNumber

func (u *CardUpsertOne) AddMinPlayersNumber(v int) *CardUpsertOne

AddMinPlayersNumber adds v to the "min_players_number" field.

func (*CardUpsertOne) AddVictoryPoint

func (u *CardUpsertOne) AddVictoryPoint(v int) *CardUpsertOne

AddVictoryPoint adds v to the "victory_point" field.

func (*CardUpsertOne) ClearCardSpecialColorID

func (u *CardUpsertOne) ClearCardSpecialColorID() *CardUpsertOne

ClearCardSpecialColorID clears the value of the "card_special_color_id" field.

func (*CardUpsertOne) ClearCost

func (u *CardUpsertOne) ClearCost() *CardUpsertOne

ClearCost clears the value of the "cost" field.

func (*CardUpsertOne) ClearDeckID

func (u *CardUpsertOne) ClearDeckID() *CardUpsertOne

ClearDeckID clears the value of the "deck_id" field.

func (*CardUpsertOne) ClearDescription

func (u *CardUpsertOne) ClearDescription() *CardUpsertOne

ClearDescription clears the value of the "description" field.

func (*CardUpsertOne) ClearMinPlayersNumber

func (u *CardUpsertOne) ClearMinPlayersNumber() *CardUpsertOne

ClearMinPlayersNumber clears the value of the "min_players_number" field.

func (*CardUpsertOne) ClearNameEn

func (u *CardUpsertOne) ClearNameEn() *CardUpsertOne

ClearNameEn clears the value of the "name_en" field.

func (*CardUpsertOne) ClearNameJa

func (u *CardUpsertOne) ClearNameJa() *CardUpsertOne

ClearNameJa clears the value of the "name_ja" field.

func (*CardUpsertOne) ClearNote

func (u *CardUpsertOne) ClearNote() *CardUpsertOne

ClearNote clears the value of the "note" field.

func (*CardUpsertOne) ClearPlayAgricolaCardID

func (u *CardUpsertOne) ClearPlayAgricolaCardID() *CardUpsertOne

ClearPlayAgricolaCardID clears the value of the "play_agricola_card_id" field.

func (*CardUpsertOne) ClearPrerequisite

func (u *CardUpsertOne) ClearPrerequisite() *CardUpsertOne

ClearPrerequisite clears the value of the "prerequisite" field.

func (*CardUpsertOne) ClearPrintedID

func (u *CardUpsertOne) ClearPrintedID() *CardUpsertOne

ClearPrintedID clears the value of the "printed_id" field.

func (*CardUpsertOne) ClearSpecialVictoryPoint

func (u *CardUpsertOne) ClearSpecialVictoryPoint() *CardUpsertOne

ClearSpecialVictoryPoint clears the value of the "special_victory_point" field.

func (*CardUpsertOne) ClearVictoryPoint

func (u *CardUpsertOne) ClearVictoryPoint() *CardUpsertOne

ClearVictoryPoint clears the value of the "victory_point" field.

func (*CardUpsertOne) DoNothing

func (u *CardUpsertOne) DoNothing() *CardUpsertOne

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

func (*CardUpsertOne) Exec

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

Exec executes the query.

func (*CardUpsertOne) ExecX

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

ExecX is like Exec, but panics if an error occurs.

func (*CardUpsertOne) ID

func (u *CardUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CardUpsertOne) IDX

func (u *CardUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*CardUpsertOne) Ignore

func (u *CardUpsertOne) Ignore() *CardUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Card.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CardUpsertOne) SetCardSpecialColorID

func (u *CardUpsertOne) SetCardSpecialColorID(v int) *CardUpsertOne

SetCardSpecialColorID sets the "card_special_color_id" field.

func (*CardUpsertOne) SetCardTypeID

func (u *CardUpsertOne) SetCardTypeID(v int) *CardUpsertOne

SetCardTypeID sets the "card_type_id" field.

func (*CardUpsertOne) SetCost

func (u *CardUpsertOne) SetCost(v string) *CardUpsertOne

SetCost sets the "cost" field.

func (*CardUpsertOne) SetDeckID

func (u *CardUpsertOne) SetDeckID(v int) *CardUpsertOne

SetDeckID sets the "deck_id" field.

func (*CardUpsertOne) SetDescription

func (u *CardUpsertOne) SetDescription(v string) *CardUpsertOne

SetDescription sets the "description" field.

func (*CardUpsertOne) SetHasActionsBoosterIcon

func (u *CardUpsertOne) SetHasActionsBoosterIcon(v bool) *CardUpsertOne

SetHasActionsBoosterIcon sets the "has_actions_booster_icon" field.

func (*CardUpsertOne) SetHasArrow

func (u *CardUpsertOne) SetHasArrow(v bool) *CardUpsertOne

SetHasArrow sets the "has_arrow" field.

func (*CardUpsertOne) SetHasBonusPointIcon

func (u *CardUpsertOne) SetHasBonusPointIcon(v bool) *CardUpsertOne

SetHasBonusPointIcon sets the "has_bonus_point_icon" field.

func (*CardUpsertOne) SetHasBreadIcon

func (u *CardUpsertOne) SetHasBreadIcon(v bool) *CardUpsertOne

SetHasBreadIcon sets the "has_bread_icon" field.

func (*CardUpsertOne) SetHasBuildingResourceProviderIcon

func (u *CardUpsertOne) SetHasBuildingResourceProviderIcon(v bool) *CardUpsertOne

SetHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field.

func (*CardUpsertOne) SetHasCropProviderIcon

func (u *CardUpsertOne) SetHasCropProviderIcon(v bool) *CardUpsertOne

SetHasCropProviderIcon sets the "has_crop_provider_icon" field.

func (*CardUpsertOne) SetHasCutPeatIcon

func (u *CardUpsertOne) SetHasCutPeatIcon(v bool) *CardUpsertOne

SetHasCutPeatIcon sets the "has_cut_peat_icon" field.

func (*CardUpsertOne) SetHasFarmPlannerIcon

func (u *CardUpsertOne) SetHasFarmPlannerIcon(v bool) *CardUpsertOne

SetHasFarmPlannerIcon sets the "has_farm_planner_icon" field.

func (*CardUpsertOne) SetHasFellTreesIcon

func (u *CardUpsertOne) SetHasFellTreesIcon(v bool) *CardUpsertOne

SetHasFellTreesIcon sets the "has_fell_trees_icon" field.

func (*CardUpsertOne) SetHasFoodProviderIcon

func (u *CardUpsertOne) SetHasFoodProviderIcon(v bool) *CardUpsertOne

SetHasFoodProviderIcon sets the "has_food_provider_icon" field.

func (*CardUpsertOne) SetHasGoodsProviderIcon

func (u *CardUpsertOne) SetHasGoodsProviderIcon(v bool) *CardUpsertOne

SetHasGoodsProviderIcon sets the "has_goods_provider_icon" field.

func (*CardUpsertOne) SetHasHiringFareIcon

func (u *CardUpsertOne) SetHasHiringFareIcon(v bool) *CardUpsertOne

SetHasHiringFareIcon sets the "has_hiring_fare_icon" field.

func (*CardUpsertOne) SetHasLivestockProviderIcon

func (u *CardUpsertOne) SetHasLivestockProviderIcon(v bool) *CardUpsertOne

SetHasLivestockProviderIcon sets the "has_livestock_provider_icon" field.

func (*CardUpsertOne) SetHasNegativeBonusPointIcon

func (u *CardUpsertOne) SetHasNegativeBonusPointIcon(v bool) *CardUpsertOne

SetHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field.

func (*CardUpsertOne) SetHasPanIcon

func (u *CardUpsertOne) SetHasPanIcon(v bool) *CardUpsertOne

SetHasPanIcon sets the "has_pan_icon" field.

func (*CardUpsertOne) SetHasPointsProviderIcon

func (u *CardUpsertOne) SetHasPointsProviderIcon(v bool) *CardUpsertOne

SetHasPointsProviderIcon sets the "has_points_provider_icon" field.

func (*CardUpsertOne) SetHasSlashAndBurnIcon

func (u *CardUpsertOne) SetHasSlashAndBurnIcon(v bool) *CardUpsertOne

SetHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field.

func (*CardUpsertOne) SetIsOfficialJa

func (u *CardUpsertOne) SetIsOfficialJa(v bool) *CardUpsertOne

SetIsOfficialJa sets the "is_official_ja" field.

func (*CardUpsertOne) SetMinPlayersNumber

func (u *CardUpsertOne) SetMinPlayersNumber(v int) *CardUpsertOne

SetMinPlayersNumber sets the "min_players_number" field.

func (*CardUpsertOne) SetNameEn

func (u *CardUpsertOne) SetNameEn(v string) *CardUpsertOne

SetNameEn sets the "name_en" field.

func (*CardUpsertOne) SetNameJa

func (u *CardUpsertOne) SetNameJa(v string) *CardUpsertOne

SetNameJa sets the "name_ja" field.

func (*CardUpsertOne) SetNote

func (u *CardUpsertOne) SetNote(v string) *CardUpsertOne

SetNote sets the "note" field.

func (*CardUpsertOne) SetPlayAgricolaCardID

func (u *CardUpsertOne) SetPlayAgricolaCardID(v string) *CardUpsertOne

SetPlayAgricolaCardID sets the "play_agricola_card_id" field.

func (*CardUpsertOne) SetPrerequisite

func (u *CardUpsertOne) SetPrerequisite(v string) *CardUpsertOne

SetPrerequisite sets the "prerequisite" field.

func (*CardUpsertOne) SetPrintedID

func (u *CardUpsertOne) SetPrintedID(v string) *CardUpsertOne

SetPrintedID sets the "printed_id" field.

func (*CardUpsertOne) SetSpecialVictoryPoint

func (u *CardUpsertOne) SetSpecialVictoryPoint(v string) *CardUpsertOne

SetSpecialVictoryPoint sets the "special_victory_point" field.

func (*CardUpsertOne) SetVictoryPoint

func (u *CardUpsertOne) SetVictoryPoint(v int) *CardUpsertOne

SetVictoryPoint sets the "victory_point" field.

func (*CardUpsertOne) Update

func (u *CardUpsertOne) Update(set func(*CardUpsert)) *CardUpsertOne

Update allows overriding fields `UPDATE` values. See the CardCreate.OnConflict documentation for more info.

func (*CardUpsertOne) UpdateCardSpecialColorID

func (u *CardUpsertOne) UpdateCardSpecialColorID() *CardUpsertOne

UpdateCardSpecialColorID sets the "card_special_color_id" field to the value that was provided on create.

func (*CardUpsertOne) UpdateCardTypeID

func (u *CardUpsertOne) UpdateCardTypeID() *CardUpsertOne

UpdateCardTypeID sets the "card_type_id" field to the value that was provided on create.

func (*CardUpsertOne) UpdateCost

func (u *CardUpsertOne) UpdateCost() *CardUpsertOne

UpdateCost sets the "cost" field to the value that was provided on create.

func (*CardUpsertOne) UpdateDeckID

func (u *CardUpsertOne) UpdateDeckID() *CardUpsertOne

UpdateDeckID sets the "deck_id" field to the value that was provided on create.

func (*CardUpsertOne) UpdateDescription

func (u *CardUpsertOne) UpdateDescription() *CardUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasActionsBoosterIcon

func (u *CardUpsertOne) UpdateHasActionsBoosterIcon() *CardUpsertOne

UpdateHasActionsBoosterIcon sets the "has_actions_booster_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasArrow

func (u *CardUpsertOne) UpdateHasArrow() *CardUpsertOne

UpdateHasArrow sets the "has_arrow" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasBonusPointIcon

func (u *CardUpsertOne) UpdateHasBonusPointIcon() *CardUpsertOne

UpdateHasBonusPointIcon sets the "has_bonus_point_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasBreadIcon

func (u *CardUpsertOne) UpdateHasBreadIcon() *CardUpsertOne

UpdateHasBreadIcon sets the "has_bread_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasBuildingResourceProviderIcon

func (u *CardUpsertOne) UpdateHasBuildingResourceProviderIcon() *CardUpsertOne

UpdateHasBuildingResourceProviderIcon sets the "has_building_resource_provider_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasCropProviderIcon

func (u *CardUpsertOne) UpdateHasCropProviderIcon() *CardUpsertOne

UpdateHasCropProviderIcon sets the "has_crop_provider_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasCutPeatIcon

func (u *CardUpsertOne) UpdateHasCutPeatIcon() *CardUpsertOne

UpdateHasCutPeatIcon sets the "has_cut_peat_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasFarmPlannerIcon

func (u *CardUpsertOne) UpdateHasFarmPlannerIcon() *CardUpsertOne

UpdateHasFarmPlannerIcon sets the "has_farm_planner_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasFellTreesIcon

func (u *CardUpsertOne) UpdateHasFellTreesIcon() *CardUpsertOne

UpdateHasFellTreesIcon sets the "has_fell_trees_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasFoodProviderIcon

func (u *CardUpsertOne) UpdateHasFoodProviderIcon() *CardUpsertOne

UpdateHasFoodProviderIcon sets the "has_food_provider_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasGoodsProviderIcon

func (u *CardUpsertOne) UpdateHasGoodsProviderIcon() *CardUpsertOne

UpdateHasGoodsProviderIcon sets the "has_goods_provider_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasHiringFareIcon

func (u *CardUpsertOne) UpdateHasHiringFareIcon() *CardUpsertOne

UpdateHasHiringFareIcon sets the "has_hiring_fare_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasLivestockProviderIcon

func (u *CardUpsertOne) UpdateHasLivestockProviderIcon() *CardUpsertOne

UpdateHasLivestockProviderIcon sets the "has_livestock_provider_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasNegativeBonusPointIcon

func (u *CardUpsertOne) UpdateHasNegativeBonusPointIcon() *CardUpsertOne

UpdateHasNegativeBonusPointIcon sets the "has_negative_bonus_point_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasPanIcon

func (u *CardUpsertOne) UpdateHasPanIcon() *CardUpsertOne

UpdateHasPanIcon sets the "has_pan_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasPointsProviderIcon

func (u *CardUpsertOne) UpdateHasPointsProviderIcon() *CardUpsertOne

UpdateHasPointsProviderIcon sets the "has_points_provider_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateHasSlashAndBurnIcon

func (u *CardUpsertOne) UpdateHasSlashAndBurnIcon() *CardUpsertOne

UpdateHasSlashAndBurnIcon sets the "has_slash_and_burn_icon" field to the value that was provided on create.

func (*CardUpsertOne) UpdateIsOfficialJa

func (u *CardUpsertOne) UpdateIsOfficialJa() *CardUpsertOne

UpdateIsOfficialJa sets the "is_official_ja" field to the value that was provided on create.

func (*CardUpsertOne) UpdateMinPlayersNumber

func (u *CardUpsertOne) UpdateMinPlayersNumber() *CardUpsertOne

UpdateMinPlayersNumber sets the "min_players_number" field to the value that was provided on create.

func (*CardUpsertOne) UpdateNameEn

func (u *CardUpsertOne) UpdateNameEn() *CardUpsertOne

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*CardUpsertOne) UpdateNameJa

func (u *CardUpsertOne) UpdateNameJa() *CardUpsertOne

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*CardUpsertOne) UpdateNewValues

func (u *CardUpsertOne) UpdateNewValues() *CardUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Card.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(card.FieldID)
		}),
	).
	Exec(ctx)

func (*CardUpsertOne) UpdateNote

func (u *CardUpsertOne) UpdateNote() *CardUpsertOne

UpdateNote sets the "note" field to the value that was provided on create.

func (*CardUpsertOne) UpdatePlayAgricolaCardID

func (u *CardUpsertOne) UpdatePlayAgricolaCardID() *CardUpsertOne

UpdatePlayAgricolaCardID sets the "play_agricola_card_id" field to the value that was provided on create.

func (*CardUpsertOne) UpdatePrerequisite

func (u *CardUpsertOne) UpdatePrerequisite() *CardUpsertOne

UpdatePrerequisite sets the "prerequisite" field to the value that was provided on create.

func (*CardUpsertOne) UpdatePrintedID

func (u *CardUpsertOne) UpdatePrintedID() *CardUpsertOne

UpdatePrintedID sets the "printed_id" field to the value that was provided on create.

func (*CardUpsertOne) UpdateSpecialVictoryPoint

func (u *CardUpsertOne) UpdateSpecialVictoryPoint() *CardUpsertOne

UpdateSpecialVictoryPoint sets the "special_victory_point" field to the value that was provided on create.

func (*CardUpsertOne) UpdateVictoryPoint

func (u *CardUpsertOne) UpdateVictoryPoint() *CardUpsertOne

UpdateVictoryPoint sets the "victory_point" field to the value that was provided on create.

type CardWhereInput

type CardWhereInput struct {
	Predicates []predicate.Card  `json:"-"`
	Not        *CardWhereInput   `json:"not,omitempty"`
	Or         []*CardWhereInput `json:"or,omitempty"`
	And        []*CardWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "literal_id" field predicates.
	LiteralID             *string  `json:"literalID,omitempty"`
	LiteralIDNEQ          *string  `json:"literalIDNEQ,omitempty"`
	LiteralIDIn           []string `json:"literalIDIn,omitempty"`
	LiteralIDNotIn        []string `json:"literalIDNotIn,omitempty"`
	LiteralIDGT           *string  `json:"literalIDGT,omitempty"`
	LiteralIDGTE          *string  `json:"literalIDGTE,omitempty"`
	LiteralIDLT           *string  `json:"literalIDLT,omitempty"`
	LiteralIDLTE          *string  `json:"literalIDLTE,omitempty"`
	LiteralIDContains     *string  `json:"literalIDContains,omitempty"`
	LiteralIDHasPrefix    *string  `json:"literalIDHasPrefix,omitempty"`
	LiteralIDHasSuffix    *string  `json:"literalIDHasSuffix,omitempty"`
	LiteralIDEqualFold    *string  `json:"literalIDEqualFold,omitempty"`
	LiteralIDContainsFold *string  `json:"literalIDContainsFold,omitempty"`

	// "revision_id" field predicates.
	RevisionID      *int  `json:"revisionID,omitempty"`
	RevisionIDNEQ   *int  `json:"revisionIDNEQ,omitempty"`
	RevisionIDIn    []int `json:"revisionIDIn,omitempty"`
	RevisionIDNotIn []int `json:"revisionIDNotIn,omitempty"`

	// "printed_id" field predicates.
	PrintedID             *string  `json:"printedID,omitempty"`
	PrintedIDNEQ          *string  `json:"printedIDNEQ,omitempty"`
	PrintedIDIn           []string `json:"printedIDIn,omitempty"`
	PrintedIDNotIn        []string `json:"printedIDNotIn,omitempty"`
	PrintedIDGT           *string  `json:"printedIDGT,omitempty"`
	PrintedIDGTE          *string  `json:"printedIDGTE,omitempty"`
	PrintedIDLT           *string  `json:"printedIDLT,omitempty"`
	PrintedIDLTE          *string  `json:"printedIDLTE,omitempty"`
	PrintedIDContains     *string  `json:"printedIDContains,omitempty"`
	PrintedIDHasPrefix    *string  `json:"printedIDHasPrefix,omitempty"`
	PrintedIDHasSuffix    *string  `json:"printedIDHasSuffix,omitempty"`
	PrintedIDIsNil        bool     `json:"printedIDIsNil,omitempty"`
	PrintedIDNotNil       bool     `json:"printedIDNotNil,omitempty"`
	PrintedIDEqualFold    *string  `json:"printedIDEqualFold,omitempty"`
	PrintedIDContainsFold *string  `json:"printedIDContainsFold,omitempty"`

	// "play_agricola_card_id" field predicates.
	PlayAgricolaCardID             *string  `json:"playAgricolaCardID,omitempty"`
	PlayAgricolaCardIDNEQ          *string  `json:"playAgricolaCardIDNEQ,omitempty"`
	PlayAgricolaCardIDIn           []string `json:"playAgricolaCardIDIn,omitempty"`
	PlayAgricolaCardIDNotIn        []string `json:"playAgricolaCardIDNotIn,omitempty"`
	PlayAgricolaCardIDGT           *string  `json:"playAgricolaCardIDGT,omitempty"`
	PlayAgricolaCardIDGTE          *string  `json:"playAgricolaCardIDGTE,omitempty"`
	PlayAgricolaCardIDLT           *string  `json:"playAgricolaCardIDLT,omitempty"`
	PlayAgricolaCardIDLTE          *string  `json:"playAgricolaCardIDLTE,omitempty"`
	PlayAgricolaCardIDContains     *string  `json:"playAgricolaCardIDContains,omitempty"`
	PlayAgricolaCardIDHasPrefix    *string  `json:"playAgricolaCardIDHasPrefix,omitempty"`
	PlayAgricolaCardIDHasSuffix    *string  `json:"playAgricolaCardIDHasSuffix,omitempty"`
	PlayAgricolaCardIDIsNil        bool     `json:"playAgricolaCardIDIsNil,omitempty"`
	PlayAgricolaCardIDNotNil       bool     `json:"playAgricolaCardIDNotNil,omitempty"`
	PlayAgricolaCardIDEqualFold    *string  `json:"playAgricolaCardIDEqualFold,omitempty"`
	PlayAgricolaCardIDContainsFold *string  `json:"playAgricolaCardIDContainsFold,omitempty"`

	// "deck_id" field predicates.
	DeckID       *int  `json:"deckID,omitempty"`
	DeckIDNEQ    *int  `json:"deckIDNEQ,omitempty"`
	DeckIDIn     []int `json:"deckIDIn,omitempty"`
	DeckIDNotIn  []int `json:"deckIDNotIn,omitempty"`
	DeckIDIsNil  bool  `json:"deckIDIsNil,omitempty"`
	DeckIDNotNil bool  `json:"deckIDNotNil,omitempty"`

	// "card_type_id" field predicates.
	CardTypeID      *int  `json:"cardTypeID,omitempty"`
	CardTypeIDNEQ   *int  `json:"cardTypeIDNEQ,omitempty"`
	CardTypeIDIn    []int `json:"cardTypeIDIn,omitempty"`
	CardTypeIDNotIn []int `json:"cardTypeIDNotIn,omitempty"`

	// "card_special_color_id" field predicates.
	CardSpecialColorID       *int  `json:"cardSpecialColorID,omitempty"`
	CardSpecialColorIDNEQ    *int  `json:"cardSpecialColorIDNEQ,omitempty"`
	CardSpecialColorIDIn     []int `json:"cardSpecialColorIDIn,omitempty"`
	CardSpecialColorIDNotIn  []int `json:"cardSpecialColorIDNotIn,omitempty"`
	CardSpecialColorIDIsNil  bool  `json:"cardSpecialColorIDIsNil,omitempty"`
	CardSpecialColorIDNotNil bool  `json:"cardSpecialColorIDNotNil,omitempty"`

	// "name_ja" field predicates.
	NameJa             *string  `json:"nameJa,omitempty"`
	NameJaNEQ          *string  `json:"nameJaNEQ,omitempty"`
	NameJaIn           []string `json:"nameJaIn,omitempty"`
	NameJaNotIn        []string `json:"nameJaNotIn,omitempty"`
	NameJaGT           *string  `json:"nameJaGT,omitempty"`
	NameJaGTE          *string  `json:"nameJaGTE,omitempty"`
	NameJaLT           *string  `json:"nameJaLT,omitempty"`
	NameJaLTE          *string  `json:"nameJaLTE,omitempty"`
	NameJaContains     *string  `json:"nameJaContains,omitempty"`
	NameJaHasPrefix    *string  `json:"nameJaHasPrefix,omitempty"`
	NameJaHasSuffix    *string  `json:"nameJaHasSuffix,omitempty"`
	NameJaIsNil        bool     `json:"nameJaIsNil,omitempty"`
	NameJaNotNil       bool     `json:"nameJaNotNil,omitempty"`
	NameJaEqualFold    *string  `json:"nameJaEqualFold,omitempty"`
	NameJaContainsFold *string  `json:"nameJaContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,omitempty"`

	// "min_players_number" field predicates.
	MinPlayersNumber       *int  `json:"minPlayersNumber,omitempty"`
	MinPlayersNumberNEQ    *int  `json:"minPlayersNumberNEQ,omitempty"`
	MinPlayersNumberIn     []int `json:"minPlayersNumberIn,omitempty"`
	MinPlayersNumberNotIn  []int `json:"minPlayersNumberNotIn,omitempty"`
	MinPlayersNumberGT     *int  `json:"minPlayersNumberGT,omitempty"`
	MinPlayersNumberGTE    *int  `json:"minPlayersNumberGTE,omitempty"`
	MinPlayersNumberLT     *int  `json:"minPlayersNumberLT,omitempty"`
	MinPlayersNumberLTE    *int  `json:"minPlayersNumberLTE,omitempty"`
	MinPlayersNumberIsNil  bool  `json:"minPlayersNumberIsNil,omitempty"`
	MinPlayersNumberNotNil bool  `json:"minPlayersNumberNotNil,omitempty"`

	// "prerequisite" field predicates.
	Prerequisite             *string  `json:"prerequisite,omitempty"`
	PrerequisiteNEQ          *string  `json:"prerequisiteNEQ,omitempty"`
	PrerequisiteIn           []string `json:"prerequisiteIn,omitempty"`
	PrerequisiteNotIn        []string `json:"prerequisiteNotIn,omitempty"`
	PrerequisiteGT           *string  `json:"prerequisiteGT,omitempty"`
	PrerequisiteGTE          *string  `json:"prerequisiteGTE,omitempty"`
	PrerequisiteLT           *string  `json:"prerequisiteLT,omitempty"`
	PrerequisiteLTE          *string  `json:"prerequisiteLTE,omitempty"`
	PrerequisiteContains     *string  `json:"prerequisiteContains,omitempty"`
	PrerequisiteHasPrefix    *string  `json:"prerequisiteHasPrefix,omitempty"`
	PrerequisiteHasSuffix    *string  `json:"prerequisiteHasSuffix,omitempty"`
	PrerequisiteIsNil        bool     `json:"prerequisiteIsNil,omitempty"`
	PrerequisiteNotNil       bool     `json:"prerequisiteNotNil,omitempty"`
	PrerequisiteEqualFold    *string  `json:"prerequisiteEqualFold,omitempty"`
	PrerequisiteContainsFold *string  `json:"prerequisiteContainsFold,omitempty"`

	// "cost" field predicates.
	Cost             *string  `json:"cost,omitempty"`
	CostNEQ          *string  `json:"costNEQ,omitempty"`
	CostIn           []string `json:"costIn,omitempty"`
	CostNotIn        []string `json:"costNotIn,omitempty"`
	CostGT           *string  `json:"costGT,omitempty"`
	CostGTE          *string  `json:"costGTE,omitempty"`
	CostLT           *string  `json:"costLT,omitempty"`
	CostLTE          *string  `json:"costLTE,omitempty"`
	CostContains     *string  `json:"costContains,omitempty"`
	CostHasPrefix    *string  `json:"costHasPrefix,omitempty"`
	CostHasSuffix    *string  `json:"costHasSuffix,omitempty"`
	CostIsNil        bool     `json:"costIsNil,omitempty"`
	CostNotNil       bool     `json:"costNotNil,omitempty"`
	CostEqualFold    *string  `json:"costEqualFold,omitempty"`
	CostContainsFold *string  `json:"costContainsFold,omitempty"`

	// "description" field predicates.
	Description             *string  `json:"description,omitempty"`
	DescriptionNEQ          *string  `json:"descriptionNEQ,omitempty"`
	DescriptionIn           []string `json:"descriptionIn,omitempty"`
	DescriptionNotIn        []string `json:"descriptionNotIn,omitempty"`
	DescriptionGT           *string  `json:"descriptionGT,omitempty"`
	DescriptionGTE          *string  `json:"descriptionGTE,omitempty"`
	DescriptionLT           *string  `json:"descriptionLT,omitempty"`
	DescriptionLTE          *string  `json:"descriptionLTE,omitempty"`
	DescriptionContains     *string  `json:"descriptionContains,omitempty"`
	DescriptionHasPrefix    *string  `json:"descriptionHasPrefix,omitempty"`
	DescriptionHasSuffix    *string  `json:"descriptionHasSuffix,omitempty"`
	DescriptionIsNil        bool     `json:"descriptionIsNil,omitempty"`
	DescriptionNotNil       bool     `json:"descriptionNotNil,omitempty"`
	DescriptionEqualFold    *string  `json:"descriptionEqualFold,omitempty"`
	DescriptionContainsFold *string  `json:"descriptionContainsFold,omitempty"`

	// "note" field predicates.
	Note             *string  `json:"note,omitempty"`
	NoteNEQ          *string  `json:"noteNEQ,omitempty"`
	NoteIn           []string `json:"noteIn,omitempty"`
	NoteNotIn        []string `json:"noteNotIn,omitempty"`
	NoteGT           *string  `json:"noteGT,omitempty"`
	NoteGTE          *string  `json:"noteGTE,omitempty"`
	NoteLT           *string  `json:"noteLT,omitempty"`
	NoteLTE          *string  `json:"noteLTE,omitempty"`
	NoteContains     *string  `json:"noteContains,omitempty"`
	NoteHasPrefix    *string  `json:"noteHasPrefix,omitempty"`
	NoteHasSuffix    *string  `json:"noteHasSuffix,omitempty"`
	NoteIsNil        bool     `json:"noteIsNil,omitempty"`
	NoteNotNil       bool     `json:"noteNotNil,omitempty"`
	NoteEqualFold    *string  `json:"noteEqualFold,omitempty"`
	NoteContainsFold *string  `json:"noteContainsFold,omitempty"`

	// "is_official_ja" field predicates.
	IsOfficialJa    *bool `json:"isOfficialJa,omitempty"`
	IsOfficialJaNEQ *bool `json:"isOfficialJaNEQ,omitempty"`

	// "victory_point" field predicates.
	VictoryPoint       *int  `json:"victoryPoint,omitempty"`
	VictoryPointNEQ    *int  `json:"victoryPointNEQ,omitempty"`
	VictoryPointIn     []int `json:"victoryPointIn,omitempty"`
	VictoryPointNotIn  []int `json:"victoryPointNotIn,omitempty"`
	VictoryPointGT     *int  `json:"victoryPointGT,omitempty"`
	VictoryPointGTE    *int  `json:"victoryPointGTE,omitempty"`
	VictoryPointLT     *int  `json:"victoryPointLT,omitempty"`
	VictoryPointLTE    *int  `json:"victoryPointLTE,omitempty"`
	VictoryPointIsNil  bool  `json:"victoryPointIsNil,omitempty"`
	VictoryPointNotNil bool  `json:"victoryPointNotNil,omitempty"`

	// "special_victory_point" field predicates.
	SpecialVictoryPoint             *string  `json:"specialVictoryPoint,omitempty"`
	SpecialVictoryPointNEQ          *string  `json:"specialVictoryPointNEQ,omitempty"`
	SpecialVictoryPointIn           []string `json:"specialVictoryPointIn,omitempty"`
	SpecialVictoryPointNotIn        []string `json:"specialVictoryPointNotIn,omitempty"`
	SpecialVictoryPointGT           *string  `json:"specialVictoryPointGT,omitempty"`
	SpecialVictoryPointGTE          *string  `json:"specialVictoryPointGTE,omitempty"`
	SpecialVictoryPointLT           *string  `json:"specialVictoryPointLT,omitempty"`
	SpecialVictoryPointLTE          *string  `json:"specialVictoryPointLTE,omitempty"`
	SpecialVictoryPointContains     *string  `json:"specialVictoryPointContains,omitempty"`
	SpecialVictoryPointHasPrefix    *string  `json:"specialVictoryPointHasPrefix,omitempty"`
	SpecialVictoryPointHasSuffix    *string  `json:"specialVictoryPointHasSuffix,omitempty"`
	SpecialVictoryPointIsNil        bool     `json:"specialVictoryPointIsNil,omitempty"`
	SpecialVictoryPointNotNil       bool     `json:"specialVictoryPointNotNil,omitempty"`
	SpecialVictoryPointEqualFold    *string  `json:"specialVictoryPointEqualFold,omitempty"`
	SpecialVictoryPointContainsFold *string  `json:"specialVictoryPointContainsFold,omitempty"`

	// "has_arrow" field predicates.
	HasArrow    *bool `json:"hasArrow,omitempty"`
	HasArrowNEQ *bool `json:"hasArrowNEQ,omitempty"`

	// "has_bonus_point_icon" field predicates.
	HasBonusPointIcon    *bool `json:"hasBonusPointIcon,omitempty"`
	HasBonusPointIconNEQ *bool `json:"hasBonusPointIconNEQ,omitempty"`

	// "has_negative_bonus_point_icon" field predicates.
	HasNegativeBonusPointIcon    *bool `json:"hasNegativeBonusPointIcon,omitempty"`
	HasNegativeBonusPointIconNEQ *bool `json:"hasNegativeBonusPointIconNEQ,omitempty"`

	// "has_pan_icon" field predicates.
	HasPanIcon    *bool `json:"hasPanIcon,omitempty"`
	HasPanIconNEQ *bool `json:"hasPanIconNEQ,omitempty"`

	// "has_bread_icon" field predicates.
	HasBreadIcon    *bool `json:"hasBreadIcon,omitempty"`
	HasBreadIconNEQ *bool `json:"hasBreadIconNEQ,omitempty"`

	// "has_farm_planner_icon" field predicates.
	HasFarmPlannerIcon    *bool `json:"hasFarmPlannerIcon,omitempty"`
	HasFarmPlannerIconNEQ *bool `json:"hasFarmPlannerIconNEQ,omitempty"`

	// "has_actions_booster_icon" field predicates.
	HasActionsBoosterIcon    *bool `json:"hasActionsBoosterIcon,omitempty"`
	HasActionsBoosterIconNEQ *bool `json:"hasActionsBoosterIconNEQ,omitempty"`

	// "has_points_provider_icon" field predicates.
	HasPointsProviderIcon    *bool `json:"hasPointsProviderIcon,omitempty"`
	HasPointsProviderIconNEQ *bool `json:"hasPointsProviderIconNEQ,omitempty"`

	// "has_goods_provider_icon" field predicates.
	HasGoodsProviderIcon    *bool `json:"hasGoodsProviderIcon,omitempty"`
	HasGoodsProviderIconNEQ *bool `json:"hasGoodsProviderIconNEQ,omitempty"`

	// "has_food_provider_icon" field predicates.
	HasFoodProviderIcon    *bool `json:"hasFoodProviderIcon,omitempty"`
	HasFoodProviderIconNEQ *bool `json:"hasFoodProviderIconNEQ,omitempty"`

	// "has_crop_provider_icon" field predicates.
	HasCropProviderIcon    *bool `json:"hasCropProviderIcon,omitempty"`
	HasCropProviderIconNEQ *bool `json:"hasCropProviderIconNEQ,omitempty"`

	// "has_building_resource_provider_icon" field predicates.
	HasBuildingResourceProviderIcon    *bool `json:"hasBuildingResourceProviderIcon,omitempty"`
	HasBuildingResourceProviderIconNEQ *bool `json:"hasBuildingResourceProviderIconNEQ,omitempty"`

	// "has_livestock_provider_icon" field predicates.
	HasLivestockProviderIcon    *bool `json:"hasLivestockProviderIcon,omitempty"`
	HasLivestockProviderIconNEQ *bool `json:"hasLivestockProviderIconNEQ,omitempty"`

	// "has_cut_peat_icon" field predicates.
	HasCutPeatIcon    *bool `json:"hasCutPeatIcon,omitempty"`
	HasCutPeatIconNEQ *bool `json:"hasCutPeatIconNEQ,omitempty"`

	// "has_fell_trees_icon" field predicates.
	HasFellTreesIcon    *bool `json:"hasFellTreesIcon,omitempty"`
	HasFellTreesIconNEQ *bool `json:"hasFellTreesIconNEQ,omitempty"`

	// "has_slash_and_burn_icon" field predicates.
	HasSlashAndBurnIcon    *bool `json:"hasSlashAndBurnIcon,omitempty"`
	HasSlashAndBurnIconNEQ *bool `json:"hasSlashAndBurnIconNEQ,omitempty"`

	// "has_hiring_fare_icon" field predicates.
	HasHiringFareIcon    *bool `json:"hasHiringFareIcon,omitempty"`
	HasHiringFareIconNEQ *bool `json:"hasHiringFareIconNEQ,omitempty"`

	// "revision" edge predicates.
	HasRevision     *bool                 `json:"hasRevision,omitempty"`
	HasRevisionWith []*RevisionWhereInput `json:"hasRevisionWith,omitempty"`

	// "products" edge predicates.
	HasProducts     *bool                `json:"hasProducts,omitempty"`
	HasProductsWith []*ProductWhereInput `json:"hasProductsWith,omitempty"`

	// "deck" edge predicates.
	HasDeck     *bool             `json:"hasDeck,omitempty"`
	HasDeckWith []*DeckWhereInput `json:"hasDeckWith,omitempty"`

	// "card_type" edge predicates.
	HasCardType     *bool                 `json:"hasCardType,omitempty"`
	HasCardTypeWith []*CardTypeWhereInput `json:"hasCardTypeWith,omitempty"`

	// "card_special_color" edge predicates.
	HasCardSpecialColor     *bool                         `json:"hasCardSpecialColor,omitempty"`
	HasCardSpecialColorWith []*CardSpecialColorWhereInput `json:"hasCardSpecialColorWith,omitempty"`

	// "children" edge predicates.
	HasChildren     *bool             `json:"hasChildren,omitempty"`
	HasChildrenWith []*CardWhereInput `json:"hasChildrenWith,omitempty"`

	// "ancestors" edge predicates.
	HasAncestors     *bool             `json:"hasAncestors,omitempty"`
	HasAncestorsWith []*CardWhereInput `json:"hasAncestorsWith,omitempty"`
}

CardWhereInput represents a where input for filtering Card queries.

func (*CardWhereInput) AddPredicates

func (i *CardWhereInput) AddPredicates(predicates ...predicate.Card)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*CardWhereInput) Filter

func (i *CardWhereInput) Filter(q *CardQuery) (*CardQuery, error)

Filter applies the CardWhereInput filter on the CardQuery builder.

func (*CardWhereInput) P

func (i *CardWhereInput) P() (predicate.Card, error)

P returns a predicate for filtering cards. An error is returned if the input is empty or invalid.

type Cards

type Cards []*Card

Cards is a parsable slice of Card.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Card is the client for interacting with the Card builders.
	Card *CardClient
	// CardSpecialColor is the client for interacting with the CardSpecialColor builders.
	CardSpecialColor *CardSpecialColorClient
	// CardType is the client for interacting with the CardType builders.
	CardType *CardTypeClient
	// Deck is the client for interacting with the Deck builders.
	Deck *DeckClient
	// Product is the client for interacting with the Product builders.
	Product *ProductClient
	// Revision is the client for interacting with the Revision builders.
	Revision *RevisionClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Card.
	Query().
	Count(ctx)

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) 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) QueryContext

func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Client) 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 Deck

type Deck struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// RevisionID holds the value of the "revision_id" field.
	RevisionID int `json:"revision_id,omitempty"`
	// NameJa holds the value of the "name_ja" field.
	NameJa string `json:"name_ja,omitempty"`
	// NameEn holds the value of the "name_en" field.
	NameEn string `json:"name_en,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DeckQuery when eager-loading is set.
	Edges DeckEdges `json:"edges"`
	// contains filtered or unexported fields
}

Deck is the model entity for the Deck schema.

func (*Deck) Cards

func (d *Deck) Cards(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *CardWhereInput,
) (*CardConnection, error)

func (*Deck) ExecContext

func (c *Deck) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Deck) IsNode

func (*Deck) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Deck) NamedCards

func (d *Deck) NamedCards(name string) ([]*Card, error)

NamedCards returns the Cards named value or an error if the edge was not loaded in eager-loading with this name.

func (*Deck) QueryCards

func (d *Deck) QueryCards() *CardQuery

QueryCards queries the "cards" edge of the Deck entity.

func (*Deck) QueryContext

func (c *Deck) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Deck) QueryRevision

func (d *Deck) QueryRevision() *RevisionQuery

QueryRevision queries the "revision" edge of the Deck entity.

func (*Deck) Revision

func (d *Deck) Revision(ctx context.Context) (*Revision, error)

func (*Deck) String

func (d *Deck) String() string

String implements the fmt.Stringer.

func (*Deck) ToEdge

func (d *Deck) ToEdge(order *DeckOrder) *DeckEdge

ToEdge converts Deck into DeckEdge.

func (*Deck) Unwrap

func (d *Deck) Unwrap() *Deck

Unwrap unwraps the Deck 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 (*Deck) Update

func (d *Deck) Update() *DeckUpdateOne

Update returns a builder for updating this Deck. Note that you need to call Deck.Unwrap() before calling this method if this Deck was returned from a transaction, and the transaction was committed or rolled back.

func (*Deck) Value

func (d *Deck) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Deck. This includes values selected through modifiers, order, etc.

type DeckClient

type DeckClient struct {
	// contains filtered or unexported fields
}

DeckClient is a client for the Deck schema.

func NewDeckClient

func NewDeckClient(c config) *DeckClient

NewDeckClient returns a client for the Deck from the given config.

func (*DeckClient) Create

func (c *DeckClient) Create() *DeckCreate

Create returns a builder for creating a Deck entity.

func (*DeckClient) CreateBulk

func (c *DeckClient) CreateBulk(builders ...*DeckCreate) *DeckCreateBulk

CreateBulk returns a builder for creating a bulk of Deck entities.

func (*DeckClient) Delete

func (c *DeckClient) Delete() *DeckDelete

Delete returns a delete builder for Deck.

func (*DeckClient) DeleteOne

func (c *DeckClient) DeleteOne(d *Deck) *DeckDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeckClient) DeleteOneID

func (c *DeckClient) DeleteOneID(id int) *DeckDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeckClient) ExecContext

func (c *DeckClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckClient) Get

func (c *DeckClient) Get(ctx context.Context, id int) (*Deck, error)

Get returns a Deck entity by its id.

func (*DeckClient) GetX

func (c *DeckClient) GetX(ctx context.Context, id int) *Deck

GetX is like Get, but panics if an error occurs.

func (*DeckClient) Hooks

func (c *DeckClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeckClient) Intercept

func (c *DeckClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deck.Intercept(f(g(h())))`.

func (*DeckClient) Interceptors

func (c *DeckClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeckClient) MapCreateBulk

func (c *DeckClient) MapCreateBulk(slice any, setFunc func(*DeckCreate, int)) *DeckCreateBulk

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 (*DeckClient) Query

func (c *DeckClient) Query() *DeckQuery

Query returns a query builder for Deck.

func (*DeckClient) QueryCards

func (c *DeckClient) QueryCards(d *Deck) *CardQuery

QueryCards queries the cards edge of a Deck.

func (*DeckClient) QueryContext

func (c *DeckClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckClient) QueryRevision

func (c *DeckClient) QueryRevision(d *Deck) *RevisionQuery

QueryRevision queries the revision edge of a Deck.

func (*DeckClient) Update

func (c *DeckClient) Update() *DeckUpdate

Update returns an update builder for Deck.

func (*DeckClient) UpdateOne

func (c *DeckClient) UpdateOne(d *Deck) *DeckUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeckClient) UpdateOneID

func (c *DeckClient) UpdateOneID(id int) *DeckUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeckClient) Use

func (c *DeckClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deck.Hooks(f(g(h())))`.

type DeckConnection

type DeckConnection struct {
	Edges      []*DeckEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

DeckConnection is the connection containing edges to Deck.

type DeckCreate

type DeckCreate struct {
	// contains filtered or unexported fields
}

DeckCreate is the builder for creating a Deck entity.

func (*DeckCreate) AddCardIDs

func (dc *DeckCreate) AddCardIDs(ids ...int) *DeckCreate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*DeckCreate) AddCards

func (dc *DeckCreate) AddCards(c ...*Card) *DeckCreate

AddCards adds the "cards" edges to the Card entity.

func (*DeckCreate) Exec

func (dc *DeckCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeckCreate) ExecContext

func (c *DeckCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckCreate) ExecX

func (dc *DeckCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeckCreate) Mutation

func (dc *DeckCreate) Mutation() *DeckMutation

Mutation returns the DeckMutation object of the builder.

func (*DeckCreate) OnConflict

func (dc *DeckCreate) OnConflict(opts ...sql.ConflictOption) *DeckUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Deck.Create().
	SetKey(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeckUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*DeckCreate) OnConflictColumns

func (dc *DeckCreate) OnConflictColumns(columns ...string) *DeckUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Deck.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeckCreate) QueryContext

func (c *DeckCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckCreate) Save

func (dc *DeckCreate) Save(ctx context.Context) (*Deck, error)

Save creates the Deck in the database.

func (*DeckCreate) SaveX

func (dc *DeckCreate) SaveX(ctx context.Context) *Deck

SaveX calls Save and panics if Save returns an error.

func (*DeckCreate) SetID

func (dc *DeckCreate) SetID(i int) *DeckCreate

SetID sets the "id" field.

func (*DeckCreate) SetKey

func (dc *DeckCreate) SetKey(s string) *DeckCreate

SetKey sets the "key" field.

func (*DeckCreate) SetNameEn

func (dc *DeckCreate) SetNameEn(s string) *DeckCreate

SetNameEn sets the "name_en" field.

func (*DeckCreate) SetNameJa

func (dc *DeckCreate) SetNameJa(s string) *DeckCreate

SetNameJa sets the "name_ja" field.

func (*DeckCreate) SetNillableNameEn

func (dc *DeckCreate) SetNillableNameEn(s *string) *DeckCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*DeckCreate) SetNillableNameJa

func (dc *DeckCreate) SetNillableNameJa(s *string) *DeckCreate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*DeckCreate) SetRevision

func (dc *DeckCreate) SetRevision(r *Revision) *DeckCreate

SetRevision sets the "revision" edge to the Revision entity.

func (*DeckCreate) SetRevisionID

func (dc *DeckCreate) SetRevisionID(i int) *DeckCreate

SetRevisionID sets the "revision_id" field.

type DeckCreateBulk

type DeckCreateBulk struct {
	// contains filtered or unexported fields
}

DeckCreateBulk is the builder for creating many Deck entities in bulk.

func (*DeckCreateBulk) Exec

func (dcb *DeckCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeckCreateBulk) ExecContext

func (c *DeckCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckCreateBulk) ExecX

func (dcb *DeckCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeckCreateBulk) OnConflict

func (dcb *DeckCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeckUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Deck.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.DeckUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*DeckCreateBulk) OnConflictColumns

func (dcb *DeckCreateBulk) OnConflictColumns(columns ...string) *DeckUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Deck.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeckCreateBulk) QueryContext

func (c *DeckCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckCreateBulk) Save

func (dcb *DeckCreateBulk) Save(ctx context.Context) ([]*Deck, error)

Save creates the Deck entities in the database.

func (*DeckCreateBulk) SaveX

func (dcb *DeckCreateBulk) SaveX(ctx context.Context) []*Deck

SaveX is like Save, but panics if an error occurs.

type DeckDelete

type DeckDelete struct {
	// contains filtered or unexported fields
}

DeckDelete is the builder for deleting a Deck entity.

func (*DeckDelete) Exec

func (dd *DeckDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeckDelete) ExecContext

func (c *DeckDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckDelete) ExecX

func (dd *DeckDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeckDelete) QueryContext

func (c *DeckDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckDelete) Where

func (dd *DeckDelete) Where(ps ...predicate.Deck) *DeckDelete

Where appends a list predicates to the DeckDelete builder.

type DeckDeleteOne

type DeckDeleteOne struct {
	// contains filtered or unexported fields
}

DeckDeleteOne is the builder for deleting a single Deck entity.

func (*DeckDeleteOne) Exec

func (ddo *DeckDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeckDeleteOne) ExecX

func (ddo *DeckDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeckDeleteOne) Where

func (ddo *DeckDeleteOne) Where(ps ...predicate.Deck) *DeckDeleteOne

Where appends a list predicates to the DeckDelete builder.

type DeckEdge

type DeckEdge struct {
	Node   *Deck  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

DeckEdge is the edge representation of Deck.

type DeckEdges

type DeckEdges struct {
	// Cards holds the value of the cards edge.
	Cards []*Card `json:"cards,omitempty"`
	// Revision holds the value of the revision edge.
	Revision *Revision `json:"revision,omitempty"`
	// contains filtered or unexported fields
}

DeckEdges holds the relations/edges for other nodes in the graph.

func (DeckEdges) CardsOrErr

func (e DeckEdges) CardsOrErr() ([]*Card, error)

CardsOrErr returns the Cards value or an error if the edge was not loaded in eager-loading.

func (DeckEdges) RevisionOrErr

func (e DeckEdges) RevisionOrErr() (*Revision, error)

RevisionOrErr returns the Revision value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DeckGroupBy

type DeckGroupBy struct {
	// contains filtered or unexported fields
}

DeckGroupBy is the group-by builder for Deck entities.

func (*DeckGroupBy) Aggregate

func (dgb *DeckGroupBy) Aggregate(fns ...AggregateFunc) *DeckGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DeckGroupBy) Bool

func (s *DeckGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) BoolX

func (s *DeckGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeckGroupBy) Bools

func (s *DeckGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) BoolsX

func (s *DeckGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeckGroupBy) Float64

func (s *DeckGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) Float64X

func (s *DeckGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeckGroupBy) Float64s

func (s *DeckGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) Float64sX

func (s *DeckGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeckGroupBy) Int

func (s *DeckGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) IntX

func (s *DeckGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeckGroupBy) Ints

func (s *DeckGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) IntsX

func (s *DeckGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeckGroupBy) Scan

func (dgb *DeckGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeckGroupBy) ScanX

func (s *DeckGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeckGroupBy) String

func (s *DeckGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) StringX

func (s *DeckGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeckGroupBy) Strings

func (s *DeckGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeckGroupBy) StringsX

func (s *DeckGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeckMutation

type DeckMutation struct {
	// contains filtered or unexported fields
}

DeckMutation represents an operation that mutates the Deck nodes in the graph.

func (*DeckMutation) AddCardIDs

func (m *DeckMutation) AddCardIDs(ids ...int)

AddCardIDs adds the "cards" edge to the Card entity by ids.

func (*DeckMutation) AddField

func (m *DeckMutation) 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 (*DeckMutation) AddedEdges

func (m *DeckMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeckMutation) AddedField

func (m *DeckMutation) 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 (*DeckMutation) AddedFields

func (m *DeckMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeckMutation) AddedIDs

func (m *DeckMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeckMutation) CardsCleared

func (m *DeckMutation) CardsCleared() bool

CardsCleared reports if the "cards" edge to the Card entity was cleared.

func (*DeckMutation) CardsIDs

func (m *DeckMutation) CardsIDs() (ids []int)

CardsIDs returns the "cards" edge IDs in the mutation.

func (*DeckMutation) ClearCards

func (m *DeckMutation) ClearCards()

ClearCards clears the "cards" edge to the Card entity.

func (*DeckMutation) ClearEdge

func (m *DeckMutation) 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 (*DeckMutation) ClearField

func (m *DeckMutation) 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 (*DeckMutation) ClearNameEn

func (m *DeckMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*DeckMutation) ClearNameJa

func (m *DeckMutation) ClearNameJa()

ClearNameJa clears the value of the "name_ja" field.

func (*DeckMutation) ClearRevision

func (m *DeckMutation) ClearRevision()

ClearRevision clears the "revision" edge to the Revision entity.

func (*DeckMutation) ClearedEdges

func (m *DeckMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeckMutation) ClearedFields

func (m *DeckMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeckMutation) Client

func (m DeckMutation) 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 (*DeckMutation) EdgeCleared

func (m *DeckMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeckMutation) ExecContext

func (c *DeckMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckMutation) Field

func (m *DeckMutation) 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 (*DeckMutation) FieldCleared

func (m *DeckMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeckMutation) Fields

func (m *DeckMutation) 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 (*DeckMutation) ID

func (m *DeckMutation) 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 (*DeckMutation) IDs

func (m *DeckMutation) 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 (*DeckMutation) Key

func (m *DeckMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*DeckMutation) NameEn

func (m *DeckMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*DeckMutation) NameEnCleared

func (m *DeckMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*DeckMutation) NameJa

func (m *DeckMutation) NameJa() (r string, exists bool)

NameJa returns the value of the "name_ja" field in the mutation.

func (*DeckMutation) NameJaCleared

func (m *DeckMutation) NameJaCleared() bool

NameJaCleared returns if the "name_ja" field was cleared in this mutation.

func (*DeckMutation) OldField

func (m *DeckMutation) 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 (*DeckMutation) OldKey

func (m *DeckMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the Deck entity. If the Deck 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 (*DeckMutation) OldNameEn

func (m *DeckMutation) OldNameEn(ctx context.Context) (v string, err error)

OldNameEn returns the old "name_en" field's value of the Deck entity. If the Deck 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 (*DeckMutation) OldNameJa

func (m *DeckMutation) OldNameJa(ctx context.Context) (v string, err error)

OldNameJa returns the old "name_ja" field's value of the Deck entity. If the Deck 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 (*DeckMutation) OldRevisionID

func (m *DeckMutation) OldRevisionID(ctx context.Context) (v int, err error)

OldRevisionID returns the old "revision_id" field's value of the Deck entity. If the Deck 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 (*DeckMutation) Op

func (m *DeckMutation) Op() Op

Op returns the operation name.

func (*DeckMutation) QueryContext

func (c *DeckMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckMutation) RemoveCardIDs

func (m *DeckMutation) RemoveCardIDs(ids ...int)

RemoveCardIDs removes the "cards" edge to the Card entity by IDs.

func (*DeckMutation) RemovedCardsIDs

func (m *DeckMutation) RemovedCardsIDs() (ids []int)

RemovedCards returns the removed IDs of the "cards" edge to the Card entity.

func (*DeckMutation) RemovedEdges

func (m *DeckMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeckMutation) RemovedIDs

func (m *DeckMutation) 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 (*DeckMutation) ResetCards

func (m *DeckMutation) ResetCards()

ResetCards resets all changes to the "cards" edge.

func (*DeckMutation) ResetEdge

func (m *DeckMutation) 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 (*DeckMutation) ResetField

func (m *DeckMutation) 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 (*DeckMutation) ResetKey

func (m *DeckMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*DeckMutation) ResetNameEn

func (m *DeckMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*DeckMutation) ResetNameJa

func (m *DeckMutation) ResetNameJa()

ResetNameJa resets all changes to the "name_ja" field.

func (*DeckMutation) ResetRevision

func (m *DeckMutation) ResetRevision()

ResetRevision resets all changes to the "revision" edge.

func (*DeckMutation) ResetRevisionID

func (m *DeckMutation) ResetRevisionID()

ResetRevisionID resets all changes to the "revision_id" field.

func (*DeckMutation) RevisionCleared

func (m *DeckMutation) RevisionCleared() bool

RevisionCleared reports if the "revision" edge to the Revision entity was cleared.

func (*DeckMutation) RevisionID

func (m *DeckMutation) RevisionID() (r int, exists bool)

RevisionID returns the value of the "revision_id" field in the mutation.

func (*DeckMutation) RevisionIDs

func (m *DeckMutation) RevisionIDs() (ids []int)

RevisionIDs returns the "revision" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RevisionID instead. It exists only for internal usage by the builders.

func (*DeckMutation) SetField

func (m *DeckMutation) 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 (*DeckMutation) SetID

func (m *DeckMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Deck entities.

func (*DeckMutation) SetKey

func (m *DeckMutation) SetKey(s string)

SetKey sets the "key" field.

func (*DeckMutation) SetNameEn

func (m *DeckMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*DeckMutation) SetNameJa

func (m *DeckMutation) SetNameJa(s string)

SetNameJa sets the "name_ja" field.

func (*DeckMutation) SetOp

func (m *DeckMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeckMutation) SetRevisionID

func (m *DeckMutation) SetRevisionID(i int)

SetRevisionID sets the "revision_id" field.

func (DeckMutation) Tx

func (m DeckMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeckMutation) Type

func (m *DeckMutation) Type() string

Type returns the node type of this mutation (Deck).

func (*DeckMutation) Where

func (m *DeckMutation) Where(ps ...predicate.Deck)

Where appends a list predicates to the DeckMutation builder.

func (*DeckMutation) WhereP

func (m *DeckMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeckMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeckOrder

type DeckOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *DeckOrderField `json:"field"`
}

DeckOrder defines the ordering of Deck.

type DeckOrderField

type DeckOrderField struct {
	// Value extracts the ordering value from the given Deck.
	Value func(*Deck) (ent.Value, error)
	// contains filtered or unexported fields
}

DeckOrderField defines the ordering field of Deck.

type DeckPaginateOption

type DeckPaginateOption func(*deckPager) error

DeckPaginateOption enables pagination customization.

func WithDeckFilter

func WithDeckFilter(filter func(*DeckQuery) (*DeckQuery, error)) DeckPaginateOption

WithDeckFilter configures pagination filter.

func WithDeckOrder

func WithDeckOrder(order *DeckOrder) DeckPaginateOption

WithDeckOrder configures pagination ordering.

type DeckQuery

type DeckQuery struct {
	// contains filtered or unexported fields
}

DeckQuery is the builder for querying Deck entities.

func (*DeckQuery) Aggregate

func (dq *DeckQuery) Aggregate(fns ...AggregateFunc) *DeckSelect

Aggregate returns a DeckSelect configured with the given aggregations.

func (*DeckQuery) All

func (dq *DeckQuery) All(ctx context.Context) ([]*Deck, error)

All executes the query and returns a list of Decks.

func (*DeckQuery) AllX

func (dq *DeckQuery) AllX(ctx context.Context) []*Deck

AllX is like All, but panics if an error occurs.

func (*DeckQuery) Clone

func (dq *DeckQuery) Clone() *DeckQuery

Clone returns a duplicate of the DeckQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeckQuery) CollectFields

func (d *DeckQuery) CollectFields(ctx context.Context, satisfies ...string) (*DeckQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*DeckQuery) Count

func (dq *DeckQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeckQuery) CountX

func (dq *DeckQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeckQuery) ExecContext

func (c *DeckQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckQuery) Exist

func (dq *DeckQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeckQuery) ExistX

func (dq *DeckQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeckQuery) First

func (dq *DeckQuery) First(ctx context.Context) (*Deck, error)

First returns the first Deck entity from the query. Returns a *NotFoundError when no Deck was found.

func (*DeckQuery) FirstID

func (dq *DeckQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Deck ID from the query. Returns a *NotFoundError when no Deck ID was found.

func (*DeckQuery) FirstIDX

func (dq *DeckQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeckQuery) FirstX

func (dq *DeckQuery) FirstX(ctx context.Context) *Deck

FirstX is like First, but panics if an error occurs.

func (*DeckQuery) GroupBy

func (dq *DeckQuery) GroupBy(field string, fields ...string) *DeckGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Deck.Query().
	GroupBy(deck.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeckQuery) IDs

func (dq *DeckQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Deck IDs.

func (*DeckQuery) IDsX

func (dq *DeckQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DeckQuery) Limit

func (dq *DeckQuery) Limit(limit int) *DeckQuery

Limit the number of records to be returned by this query.

func (*DeckQuery) Offset

func (dq *DeckQuery) Offset(offset int) *DeckQuery

Offset to start from.

func (*DeckQuery) Only

func (dq *DeckQuery) Only(ctx context.Context) (*Deck, error)

Only returns a single Deck entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Deck entity is found. Returns a *NotFoundError when no Deck entities are found.

func (*DeckQuery) OnlyID

func (dq *DeckQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Deck ID in the query. Returns a *NotSingularError when more than one Deck ID is found. Returns a *NotFoundError when no entities are found.

func (*DeckQuery) OnlyIDX

func (dq *DeckQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeckQuery) OnlyX

func (dq *DeckQuery) OnlyX(ctx context.Context) *Deck

OnlyX is like Only, but panics if an error occurs.

func (*DeckQuery) Order

func (dq *DeckQuery) Order(o ...deck.OrderOption) *DeckQuery

Order specifies how the records should be ordered.

func (*DeckQuery) Paginate

func (d *DeckQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...DeckPaginateOption,
) (*DeckConnection, error)

Paginate executes the query and returns a relay based cursor connection to Deck.

func (*DeckQuery) QueryCards

func (dq *DeckQuery) QueryCards() *CardQuery

QueryCards chains the current query on the "cards" edge.

func (*DeckQuery) QueryContext

func (c *DeckQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckQuery) QueryRevision

func (dq *DeckQuery) QueryRevision() *RevisionQuery

QueryRevision chains the current query on the "revision" edge.

func (*DeckQuery) Select

func (dq *DeckQuery) Select(fields ...string) *DeckSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
}

client.Deck.Query().
	Select(deck.FieldKey).
	Scan(ctx, &v)

func (*DeckQuery) Unique

func (dq *DeckQuery) Unique(unique bool) *DeckQuery

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 (*DeckQuery) Where

func (dq *DeckQuery) Where(ps ...predicate.Deck) *DeckQuery

Where adds a new predicate for the DeckQuery builder.

func (*DeckQuery) WithCards

func (dq *DeckQuery) WithCards(opts ...func(*CardQuery)) *DeckQuery

WithCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeckQuery) WithNamedCards

func (dq *DeckQuery) WithNamedCards(name string, opts ...func(*CardQuery)) *DeckQuery

WithNamedCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*DeckQuery) WithRevision

func (dq *DeckQuery) WithRevision(opts ...func(*RevisionQuery)) *DeckQuery

WithRevision tells the query-builder to eager-load the nodes that are connected to the "revision" edge. The optional arguments are used to configure the query builder of the edge.

type DeckSelect

type DeckSelect struct {
	*DeckQuery
	// contains filtered or unexported fields
}

DeckSelect is the builder for selecting fields of Deck entities.

func (*DeckSelect) Aggregate

func (ds *DeckSelect) Aggregate(fns ...AggregateFunc) *DeckSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeckSelect) Bool

func (s *DeckSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeckSelect) BoolX

func (s *DeckSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeckSelect) Bools

func (s *DeckSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeckSelect) BoolsX

func (s *DeckSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeckSelect) ExecContext

func (c DeckSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckSelect) Float64

func (s *DeckSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeckSelect) Float64X

func (s *DeckSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeckSelect) Float64s

func (s *DeckSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeckSelect) Float64sX

func (s *DeckSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeckSelect) Int

func (s *DeckSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeckSelect) IntX

func (s *DeckSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeckSelect) Ints

func (s *DeckSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeckSelect) IntsX

func (s *DeckSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (DeckSelect) QueryContext

func (c DeckSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckSelect) Scan

func (ds *DeckSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeckSelect) ScanX

func (s *DeckSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeckSelect) String

func (s *DeckSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeckSelect) StringX

func (s *DeckSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeckSelect) Strings

func (s *DeckSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeckSelect) StringsX

func (s *DeckSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeckUpdate

type DeckUpdate struct {
	// contains filtered or unexported fields
}

DeckUpdate is the builder for updating Deck entities.

func (*DeckUpdate) AddCardIDs

func (du *DeckUpdate) AddCardIDs(ids ...int) *DeckUpdate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*DeckUpdate) AddCards

func (du *DeckUpdate) AddCards(c ...*Card) *DeckUpdate

AddCards adds the "cards" edges to the Card entity.

func (*DeckUpdate) ClearCards

func (du *DeckUpdate) ClearCards() *DeckUpdate

ClearCards clears all "cards" edges to the Card entity.

func (*DeckUpdate) ClearNameEn

func (du *DeckUpdate) ClearNameEn() *DeckUpdate

ClearNameEn clears the value of the "name_en" field.

func (*DeckUpdate) ClearNameJa

func (du *DeckUpdate) ClearNameJa() *DeckUpdate

ClearNameJa clears the value of the "name_ja" field.

func (*DeckUpdate) Exec

func (du *DeckUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeckUpdate) ExecContext

func (c *DeckUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckUpdate) ExecX

func (du *DeckUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeckUpdate) Mutation

func (du *DeckUpdate) Mutation() *DeckMutation

Mutation returns the DeckMutation object of the builder.

func (*DeckUpdate) QueryContext

func (c *DeckUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckUpdate) RemoveCardIDs

func (du *DeckUpdate) RemoveCardIDs(ids ...int) *DeckUpdate

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*DeckUpdate) RemoveCards

func (du *DeckUpdate) RemoveCards(c ...*Card) *DeckUpdate

RemoveCards removes "cards" edges to Card entities.

func (*DeckUpdate) Save

func (du *DeckUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeckUpdate) SaveX

func (du *DeckUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeckUpdate) SetNameEn

func (du *DeckUpdate) SetNameEn(s string) *DeckUpdate

SetNameEn sets the "name_en" field.

func (*DeckUpdate) SetNameJa

func (du *DeckUpdate) SetNameJa(s string) *DeckUpdate

SetNameJa sets the "name_ja" field.

func (*DeckUpdate) SetNillableNameEn

func (du *DeckUpdate) SetNillableNameEn(s *string) *DeckUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*DeckUpdate) SetNillableNameJa

func (du *DeckUpdate) SetNillableNameJa(s *string) *DeckUpdate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*DeckUpdate) Where

func (du *DeckUpdate) Where(ps ...predicate.Deck) *DeckUpdate

Where appends a list predicates to the DeckUpdate builder.

type DeckUpdateOne

type DeckUpdateOne struct {
	// contains filtered or unexported fields
}

DeckUpdateOne is the builder for updating a single Deck entity.

func (*DeckUpdateOne) AddCardIDs

func (duo *DeckUpdateOne) AddCardIDs(ids ...int) *DeckUpdateOne

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*DeckUpdateOne) AddCards

func (duo *DeckUpdateOne) AddCards(c ...*Card) *DeckUpdateOne

AddCards adds the "cards" edges to the Card entity.

func (*DeckUpdateOne) ClearCards

func (duo *DeckUpdateOne) ClearCards() *DeckUpdateOne

ClearCards clears all "cards" edges to the Card entity.

func (*DeckUpdateOne) ClearNameEn

func (duo *DeckUpdateOne) ClearNameEn() *DeckUpdateOne

ClearNameEn clears the value of the "name_en" field.

func (*DeckUpdateOne) ClearNameJa

func (duo *DeckUpdateOne) ClearNameJa() *DeckUpdateOne

ClearNameJa clears the value of the "name_ja" field.

func (*DeckUpdateOne) Exec

func (duo *DeckUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeckUpdateOne) ExecContext

func (c *DeckUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeckUpdateOne) ExecX

func (duo *DeckUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeckUpdateOne) Mutation

func (duo *DeckUpdateOne) Mutation() *DeckMutation

Mutation returns the DeckMutation object of the builder.

func (*DeckUpdateOne) QueryContext

func (c *DeckUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeckUpdateOne) RemoveCardIDs

func (duo *DeckUpdateOne) RemoveCardIDs(ids ...int) *DeckUpdateOne

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*DeckUpdateOne) RemoveCards

func (duo *DeckUpdateOne) RemoveCards(c ...*Card) *DeckUpdateOne

RemoveCards removes "cards" edges to Card entities.

func (*DeckUpdateOne) Save

func (duo *DeckUpdateOne) Save(ctx context.Context) (*Deck, error)

Save executes the query and returns the updated Deck entity.

func (*DeckUpdateOne) SaveX

func (duo *DeckUpdateOne) SaveX(ctx context.Context) *Deck

SaveX is like Save, but panics if an error occurs.

func (*DeckUpdateOne) Select

func (duo *DeckUpdateOne) Select(field string, fields ...string) *DeckUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeckUpdateOne) SetNameEn

func (duo *DeckUpdateOne) SetNameEn(s string) *DeckUpdateOne

SetNameEn sets the "name_en" field.

func (*DeckUpdateOne) SetNameJa

func (duo *DeckUpdateOne) SetNameJa(s string) *DeckUpdateOne

SetNameJa sets the "name_ja" field.

func (*DeckUpdateOne) SetNillableNameEn

func (duo *DeckUpdateOne) SetNillableNameEn(s *string) *DeckUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*DeckUpdateOne) SetNillableNameJa

func (duo *DeckUpdateOne) SetNillableNameJa(s *string) *DeckUpdateOne

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*DeckUpdateOne) Where

func (duo *DeckUpdateOne) Where(ps ...predicate.Deck) *DeckUpdateOne

Where appends a list predicates to the DeckUpdate builder.

type DeckUpsert

type DeckUpsert struct {
	*sql.UpdateSet
}

DeckUpsert is the "OnConflict" setter.

func (*DeckUpsert) ClearNameEn

func (u *DeckUpsert) ClearNameEn() *DeckUpsert

ClearNameEn clears the value of the "name_en" field.

func (*DeckUpsert) ClearNameJa

func (u *DeckUpsert) ClearNameJa() *DeckUpsert

ClearNameJa clears the value of the "name_ja" field.

func (*DeckUpsert) SetNameEn

func (u *DeckUpsert) SetNameEn(v string) *DeckUpsert

SetNameEn sets the "name_en" field.

func (*DeckUpsert) SetNameJa

func (u *DeckUpsert) SetNameJa(v string) *DeckUpsert

SetNameJa sets the "name_ja" field.

func (*DeckUpsert) UpdateNameEn

func (u *DeckUpsert) UpdateNameEn() *DeckUpsert

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*DeckUpsert) UpdateNameJa

func (u *DeckUpsert) UpdateNameJa() *DeckUpsert

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

type DeckUpsertBulk

type DeckUpsertBulk struct {
	// contains filtered or unexported fields
}

DeckUpsertBulk is the builder for "upsert"-ing a bulk of Deck nodes.

func (*DeckUpsertBulk) ClearNameEn

func (u *DeckUpsertBulk) ClearNameEn() *DeckUpsertBulk

ClearNameEn clears the value of the "name_en" field.

func (*DeckUpsertBulk) ClearNameJa

func (u *DeckUpsertBulk) ClearNameJa() *DeckUpsertBulk

ClearNameJa clears the value of the "name_ja" field.

func (*DeckUpsertBulk) DoNothing

func (u *DeckUpsertBulk) DoNothing() *DeckUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeckUpsertBulk) Exec

func (u *DeckUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeckUpsertBulk) ExecX

func (u *DeckUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeckUpsertBulk) Ignore

func (u *DeckUpsertBulk) Ignore() *DeckUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Deck.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeckUpsertBulk) SetNameEn

func (u *DeckUpsertBulk) SetNameEn(v string) *DeckUpsertBulk

SetNameEn sets the "name_en" field.

func (*DeckUpsertBulk) SetNameJa

func (u *DeckUpsertBulk) SetNameJa(v string) *DeckUpsertBulk

SetNameJa sets the "name_ja" field.

func (*DeckUpsertBulk) Update

func (u *DeckUpsertBulk) Update(set func(*DeckUpsert)) *DeckUpsertBulk

Update allows overriding fields `UPDATE` values. See the DeckCreateBulk.OnConflict documentation for more info.

func (*DeckUpsertBulk) UpdateNameEn

func (u *DeckUpsertBulk) UpdateNameEn() *DeckUpsertBulk

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*DeckUpsertBulk) UpdateNameJa

func (u *DeckUpsertBulk) UpdateNameJa() *DeckUpsertBulk

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*DeckUpsertBulk) UpdateNewValues

func (u *DeckUpsertBulk) UpdateNewValues() *DeckUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Deck.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deck.FieldID)
		}),
	).
	Exec(ctx)

type DeckUpsertOne

type DeckUpsertOne struct {
	// contains filtered or unexported fields
}

DeckUpsertOne is the builder for "upsert"-ing

one Deck node.

func (*DeckUpsertOne) ClearNameEn

func (u *DeckUpsertOne) ClearNameEn() *DeckUpsertOne

ClearNameEn clears the value of the "name_en" field.

func (*DeckUpsertOne) ClearNameJa

func (u *DeckUpsertOne) ClearNameJa() *DeckUpsertOne

ClearNameJa clears the value of the "name_ja" field.

func (*DeckUpsertOne) DoNothing

func (u *DeckUpsertOne) DoNothing() *DeckUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeckUpsertOne) Exec

func (u *DeckUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*DeckUpsertOne) ExecX

func (u *DeckUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeckUpsertOne) ID

func (u *DeckUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeckUpsertOne) IDX

func (u *DeckUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*DeckUpsertOne) Ignore

func (u *DeckUpsertOne) Ignore() *DeckUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Deck.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeckUpsertOne) SetNameEn

func (u *DeckUpsertOne) SetNameEn(v string) *DeckUpsertOne

SetNameEn sets the "name_en" field.

func (*DeckUpsertOne) SetNameJa

func (u *DeckUpsertOne) SetNameJa(v string) *DeckUpsertOne

SetNameJa sets the "name_ja" field.

func (*DeckUpsertOne) Update

func (u *DeckUpsertOne) Update(set func(*DeckUpsert)) *DeckUpsertOne

Update allows overriding fields `UPDATE` values. See the DeckCreate.OnConflict documentation for more info.

func (*DeckUpsertOne) UpdateNameEn

func (u *DeckUpsertOne) UpdateNameEn() *DeckUpsertOne

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*DeckUpsertOne) UpdateNameJa

func (u *DeckUpsertOne) UpdateNameJa() *DeckUpsertOne

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*DeckUpsertOne) UpdateNewValues

func (u *DeckUpsertOne) UpdateNewValues() *DeckUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Deck.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deck.FieldID)
		}),
	).
	Exec(ctx)

type DeckWhereInput

type DeckWhereInput struct {
	Predicates []predicate.Deck  `json:"-"`
	Not        *DeckWhereInput   `json:"not,omitempty"`
	Or         []*DeckWhereInput `json:"or,omitempty"`
	And        []*DeckWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "revision_id" field predicates.
	RevisionID      *int  `json:"revisionID,omitempty"`
	RevisionIDNEQ   *int  `json:"revisionIDNEQ,omitempty"`
	RevisionIDIn    []int `json:"revisionIDIn,omitempty"`
	RevisionIDNotIn []int `json:"revisionIDNotIn,omitempty"`

	// "name_ja" field predicates.
	NameJa             *string  `json:"nameJa,omitempty"`
	NameJaNEQ          *string  `json:"nameJaNEQ,omitempty"`
	NameJaIn           []string `json:"nameJaIn,omitempty"`
	NameJaNotIn        []string `json:"nameJaNotIn,omitempty"`
	NameJaGT           *string  `json:"nameJaGT,omitempty"`
	NameJaGTE          *string  `json:"nameJaGTE,omitempty"`
	NameJaLT           *string  `json:"nameJaLT,omitempty"`
	NameJaLTE          *string  `json:"nameJaLTE,omitempty"`
	NameJaContains     *string  `json:"nameJaContains,omitempty"`
	NameJaHasPrefix    *string  `json:"nameJaHasPrefix,omitempty"`
	NameJaHasSuffix    *string  `json:"nameJaHasSuffix,omitempty"`
	NameJaIsNil        bool     `json:"nameJaIsNil,omitempty"`
	NameJaNotNil       bool     `json:"nameJaNotNil,omitempty"`
	NameJaEqualFold    *string  `json:"nameJaEqualFold,omitempty"`
	NameJaContainsFold *string  `json:"nameJaContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,omitempty"`

	// "cards" edge predicates.
	HasCards     *bool             `json:"hasCards,omitempty"`
	HasCardsWith []*CardWhereInput `json:"hasCardsWith,omitempty"`

	// "revision" edge predicates.
	HasRevision     *bool                 `json:"hasRevision,omitempty"`
	HasRevisionWith []*RevisionWhereInput `json:"hasRevisionWith,omitempty"`
}

DeckWhereInput represents a where input for filtering Deck queries.

func (*DeckWhereInput) AddPredicates

func (i *DeckWhereInput) AddPredicates(predicates ...predicate.Deck)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*DeckWhereInput) Filter

func (i *DeckWhereInput) Filter(q *DeckQuery) (*DeckQuery, error)

Filter applies the DeckWhereInput filter on the DeckQuery builder.

func (*DeckWhereInput) P

func (i *DeckWhereInput) P() (predicate.Deck, error)

P returns a predicate for filtering decks. An error is returned if the input is empty or invalid.

type Decks

type Decks []*Deck

Decks is a parsable slice of Deck.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type 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 Product

type Product struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// RevisionID holds the value of the "revision_id" field.
	RevisionID int `json:"revision_id,omitempty"`
	// IsOfficialJa holds the value of the "is_official_ja" field.
	IsOfficialJa bool `json:"is_official_ja,omitempty"`
	// NameJa holds the value of the "name_ja" field.
	NameJa string `json:"name_ja,omitempty"`
	// NameEn holds the value of the "name_en" field.
	NameEn string `json:"name_en,omitempty"`
	// PublishedYear holds the value of the "published_year" field.
	PublishedYear int `json:"published_year,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProductQuery when eager-loading is set.
	Edges ProductEdges `json:"edges"`
	// contains filtered or unexported fields
}

Product is the model entity for the Product schema.

func (*Product) Cards

func (pr *Product) Cards(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *CardWhereInput,
) (*CardConnection, error)

func (*Product) ExecContext

func (c *Product) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Product) IsNode

func (*Product) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Product) NamedCards

func (pr *Product) NamedCards(name string) ([]*Card, error)

NamedCards returns the Cards named value or an error if the edge was not loaded in eager-loading with this name.

func (*Product) QueryCards

func (pr *Product) QueryCards() *CardQuery

QueryCards queries the "cards" edge of the Product entity.

func (*Product) QueryContext

func (c *Product) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Product) QueryRevision

func (pr *Product) QueryRevision() *RevisionQuery

QueryRevision queries the "revision" edge of the Product entity.

func (*Product) Revision

func (pr *Product) Revision(ctx context.Context) (*Revision, error)

func (*Product) String

func (pr *Product) String() string

String implements the fmt.Stringer.

func (*Product) ToEdge

func (pr *Product) ToEdge(order *ProductOrder) *ProductEdge

ToEdge converts Product into ProductEdge.

func (*Product) Unwrap

func (pr *Product) Unwrap() *Product

Unwrap unwraps the Product 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 (*Product) Update

func (pr *Product) Update() *ProductUpdateOne

Update returns a builder for updating this Product. Note that you need to call Product.Unwrap() before calling this method if this Product was returned from a transaction, and the transaction was committed or rolled back.

func (*Product) Value

func (pr *Product) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Product. This includes values selected through modifiers, order, etc.

type ProductClient

type ProductClient struct {
	// contains filtered or unexported fields
}

ProductClient is a client for the Product schema.

func NewProductClient

func NewProductClient(c config) *ProductClient

NewProductClient returns a client for the Product from the given config.

func (*ProductClient) Create

func (c *ProductClient) Create() *ProductCreate

Create returns a builder for creating a Product entity.

func (*ProductClient) CreateBulk

func (c *ProductClient) CreateBulk(builders ...*ProductCreate) *ProductCreateBulk

CreateBulk returns a builder for creating a bulk of Product entities.

func (*ProductClient) Delete

func (c *ProductClient) Delete() *ProductDelete

Delete returns a delete builder for Product.

func (*ProductClient) DeleteOne

func (c *ProductClient) DeleteOne(pr *Product) *ProductDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProductClient) DeleteOneID

func (c *ProductClient) DeleteOneID(id int) *ProductDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProductClient) ExecContext

func (c *ProductClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductClient) Get

func (c *ProductClient) Get(ctx context.Context, id int) (*Product, error)

Get returns a Product entity by its id.

func (*ProductClient) GetX

func (c *ProductClient) GetX(ctx context.Context, id int) *Product

GetX is like Get, but panics if an error occurs.

func (*ProductClient) Hooks

func (c *ProductClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProductClient) Intercept

func (c *ProductClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `product.Intercept(f(g(h())))`.

func (*ProductClient) Interceptors

func (c *ProductClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProductClient) MapCreateBulk

func (c *ProductClient) MapCreateBulk(slice any, setFunc func(*ProductCreate, int)) *ProductCreateBulk

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 (*ProductClient) Query

func (c *ProductClient) Query() *ProductQuery

Query returns a query builder for Product.

func (*ProductClient) QueryCards

func (c *ProductClient) QueryCards(pr *Product) *CardQuery

QueryCards queries the cards edge of a Product.

func (*ProductClient) QueryContext

func (c *ProductClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductClient) QueryRevision

func (c *ProductClient) QueryRevision(pr *Product) *RevisionQuery

QueryRevision queries the revision edge of a Product.

func (*ProductClient) Update

func (c *ProductClient) Update() *ProductUpdate

Update returns an update builder for Product.

func (*ProductClient) UpdateOne

func (c *ProductClient) UpdateOne(pr *Product) *ProductUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProductClient) UpdateOneID

func (c *ProductClient) UpdateOneID(id int) *ProductUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProductClient) Use

func (c *ProductClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `product.Hooks(f(g(h())))`.

type ProductConnection

type ProductConnection struct {
	Edges      []*ProductEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

ProductConnection is the connection containing edges to Product.

type ProductCreate

type ProductCreate struct {
	// contains filtered or unexported fields
}

ProductCreate is the builder for creating a Product entity.

func (*ProductCreate) AddCardIDs

func (pc *ProductCreate) AddCardIDs(ids ...int) *ProductCreate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*ProductCreate) AddCards

func (pc *ProductCreate) AddCards(c ...*Card) *ProductCreate

AddCards adds the "cards" edges to the Card entity.

func (*ProductCreate) Exec

func (pc *ProductCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductCreate) ExecContext

func (c *ProductCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductCreate) ExecX

func (pc *ProductCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductCreate) Mutation

func (pc *ProductCreate) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductCreate) OnConflict

func (pc *ProductCreate) OnConflict(opts ...sql.ConflictOption) *ProductUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Product.Create().
	SetRevisionID(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.ProductUpsert) {
		SetRevisionID(v+v).
	}).
	Exec(ctx)

func (*ProductCreate) OnConflictColumns

func (pc *ProductCreate) OnConflictColumns(columns ...string) *ProductUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProductCreate) QueryContext

func (c *ProductCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductCreate) Save

func (pc *ProductCreate) Save(ctx context.Context) (*Product, error)

Save creates the Product in the database.

func (*ProductCreate) SaveX

func (pc *ProductCreate) SaveX(ctx context.Context) *Product

SaveX calls Save and panics if Save returns an error.

func (*ProductCreate) SetID

func (pc *ProductCreate) SetID(i int) *ProductCreate

SetID sets the "id" field.

func (*ProductCreate) SetIsOfficialJa

func (pc *ProductCreate) SetIsOfficialJa(b bool) *ProductCreate

SetIsOfficialJa sets the "is_official_ja" field.

func (*ProductCreate) SetNameEn

func (pc *ProductCreate) SetNameEn(s string) *ProductCreate

SetNameEn sets the "name_en" field.

func (*ProductCreate) SetNameJa

func (pc *ProductCreate) SetNameJa(s string) *ProductCreate

SetNameJa sets the "name_ja" field.

func (*ProductCreate) SetNillableNameEn

func (pc *ProductCreate) SetNillableNameEn(s *string) *ProductCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*ProductCreate) SetNillableNameJa

func (pc *ProductCreate) SetNillableNameJa(s *string) *ProductCreate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*ProductCreate) SetNillablePublishedYear

func (pc *ProductCreate) SetNillablePublishedYear(i *int) *ProductCreate

SetNillablePublishedYear sets the "published_year" field if the given value is not nil.

func (*ProductCreate) SetPublishedYear

func (pc *ProductCreate) SetPublishedYear(i int) *ProductCreate

SetPublishedYear sets the "published_year" field.

func (*ProductCreate) SetRevision

func (pc *ProductCreate) SetRevision(r *Revision) *ProductCreate

SetRevision sets the "revision" edge to the Revision entity.

func (*ProductCreate) SetRevisionID

func (pc *ProductCreate) SetRevisionID(i int) *ProductCreate

SetRevisionID sets the "revision_id" field.

type ProductCreateBulk

type ProductCreateBulk struct {
	// contains filtered or unexported fields
}

ProductCreateBulk is the builder for creating many Product entities in bulk.

func (*ProductCreateBulk) Exec

func (pcb *ProductCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductCreateBulk) ExecContext

func (c *ProductCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductCreateBulk) ExecX

func (pcb *ProductCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductCreateBulk) OnConflict

func (pcb *ProductCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProductUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Product.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.ProductUpsert) {
		SetRevisionID(v+v).
	}).
	Exec(ctx)

func (*ProductCreateBulk) OnConflictColumns

func (pcb *ProductCreateBulk) OnConflictColumns(columns ...string) *ProductUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProductCreateBulk) QueryContext

func (c *ProductCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductCreateBulk) Save

func (pcb *ProductCreateBulk) Save(ctx context.Context) ([]*Product, error)

Save creates the Product entities in the database.

func (*ProductCreateBulk) SaveX

func (pcb *ProductCreateBulk) SaveX(ctx context.Context) []*Product

SaveX is like Save, but panics if an error occurs.

type ProductDelete

type ProductDelete struct {
	// contains filtered or unexported fields
}

ProductDelete is the builder for deleting a Product entity.

func (*ProductDelete) Exec

func (pd *ProductDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProductDelete) ExecContext

func (c *ProductDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductDelete) ExecX

func (pd *ProductDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProductDelete) QueryContext

func (c *ProductDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductDelete) Where

func (pd *ProductDelete) Where(ps ...predicate.Product) *ProductDelete

Where appends a list predicates to the ProductDelete builder.

type ProductDeleteOne

type ProductDeleteOne struct {
	// contains filtered or unexported fields
}

ProductDeleteOne is the builder for deleting a single Product entity.

func (*ProductDeleteOne) Exec

func (pdo *ProductDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProductDeleteOne) ExecX

func (pdo *ProductDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductDeleteOne) Where

Where appends a list predicates to the ProductDelete builder.

type ProductEdge

type ProductEdge struct {
	Node   *Product `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

ProductEdge is the edge representation of Product.

type ProductEdges

type ProductEdges struct {
	// Cards holds the value of the cards edge.
	Cards []*Card `json:"cards,omitempty"`
	// Revision holds the value of the revision edge.
	Revision *Revision `json:"revision,omitempty"`
	// contains filtered or unexported fields
}

ProductEdges holds the relations/edges for other nodes in the graph.

func (ProductEdges) CardsOrErr

func (e ProductEdges) CardsOrErr() ([]*Card, error)

CardsOrErr returns the Cards value or an error if the edge was not loaded in eager-loading.

func (ProductEdges) RevisionOrErr

func (e ProductEdges) RevisionOrErr() (*Revision, error)

RevisionOrErr returns the Revision value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ProductGroupBy

type ProductGroupBy struct {
	// contains filtered or unexported fields
}

ProductGroupBy is the group-by builder for Product entities.

func (*ProductGroupBy) Aggregate

func (pgb *ProductGroupBy) Aggregate(fns ...AggregateFunc) *ProductGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProductGroupBy) Bool

func (s *ProductGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) BoolX

func (s *ProductGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProductGroupBy) Bools

func (s *ProductGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) BoolsX

func (s *ProductGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProductGroupBy) Float64

func (s *ProductGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) Float64X

func (s *ProductGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProductGroupBy) Float64s

func (s *ProductGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) Float64sX

func (s *ProductGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProductGroupBy) Int

func (s *ProductGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) IntX

func (s *ProductGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProductGroupBy) Ints

func (s *ProductGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) IntsX

func (s *ProductGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProductGroupBy) Scan

func (pgb *ProductGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProductGroupBy) ScanX

func (s *ProductGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProductGroupBy) String

func (s *ProductGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) StringX

func (s *ProductGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProductGroupBy) Strings

func (s *ProductGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProductGroupBy) StringsX

func (s *ProductGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProductMutation

type ProductMutation struct {
	// contains filtered or unexported fields
}

ProductMutation represents an operation that mutates the Product nodes in the graph.

func (*ProductMutation) AddCardIDs

func (m *ProductMutation) AddCardIDs(ids ...int)

AddCardIDs adds the "cards" edge to the Card entity by ids.

func (*ProductMutation) AddField

func (m *ProductMutation) 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 (*ProductMutation) AddPublishedYear

func (m *ProductMutation) AddPublishedYear(i int)

AddPublishedYear adds i to the "published_year" field.

func (*ProductMutation) AddedEdges

func (m *ProductMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProductMutation) AddedField

func (m *ProductMutation) 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 (*ProductMutation) AddedFields

func (m *ProductMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProductMutation) AddedIDs

func (m *ProductMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProductMutation) AddedPublishedYear

func (m *ProductMutation) AddedPublishedYear() (r int, exists bool)

AddedPublishedYear returns the value that was added to the "published_year" field in this mutation.

func (*ProductMutation) CardsCleared

func (m *ProductMutation) CardsCleared() bool

CardsCleared reports if the "cards" edge to the Card entity was cleared.

func (*ProductMutation) CardsIDs

func (m *ProductMutation) CardsIDs() (ids []int)

CardsIDs returns the "cards" edge IDs in the mutation.

func (*ProductMutation) ClearCards

func (m *ProductMutation) ClearCards()

ClearCards clears the "cards" edge to the Card entity.

func (*ProductMutation) ClearEdge

func (m *ProductMutation) 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 (*ProductMutation) ClearField

func (m *ProductMutation) 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 (*ProductMutation) ClearNameEn

func (m *ProductMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*ProductMutation) ClearNameJa

func (m *ProductMutation) ClearNameJa()

ClearNameJa clears the value of the "name_ja" field.

func (*ProductMutation) ClearPublishedYear

func (m *ProductMutation) ClearPublishedYear()

ClearPublishedYear clears the value of the "published_year" field.

func (*ProductMutation) ClearRevision

func (m *ProductMutation) ClearRevision()

ClearRevision clears the "revision" edge to the Revision entity.

func (*ProductMutation) ClearedEdges

func (m *ProductMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProductMutation) ClearedFields

func (m *ProductMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProductMutation) Client

func (m ProductMutation) 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 (*ProductMutation) EdgeCleared

func (m *ProductMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProductMutation) ExecContext

func (c *ProductMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductMutation) Field

func (m *ProductMutation) 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 (*ProductMutation) FieldCleared

func (m *ProductMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProductMutation) Fields

func (m *ProductMutation) 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 (*ProductMutation) ID

func (m *ProductMutation) 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 (*ProductMutation) IDs

func (m *ProductMutation) 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 (*ProductMutation) IsOfficialJa

func (m *ProductMutation) IsOfficialJa() (r bool, exists bool)

IsOfficialJa returns the value of the "is_official_ja" field in the mutation.

func (*ProductMutation) NameEn

func (m *ProductMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*ProductMutation) NameEnCleared

func (m *ProductMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*ProductMutation) NameJa

func (m *ProductMutation) NameJa() (r string, exists bool)

NameJa returns the value of the "name_ja" field in the mutation.

func (*ProductMutation) NameJaCleared

func (m *ProductMutation) NameJaCleared() bool

NameJaCleared returns if the "name_ja" field was cleared in this mutation.

func (*ProductMutation) OldField

func (m *ProductMutation) 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 (*ProductMutation) OldIsOfficialJa

func (m *ProductMutation) OldIsOfficialJa(ctx context.Context) (v bool, err error)

OldIsOfficialJa returns the old "is_official_ja" field's value of the Product entity. If the Product 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 (*ProductMutation) OldNameEn

func (m *ProductMutation) OldNameEn(ctx context.Context) (v string, err error)

OldNameEn returns the old "name_en" field's value of the Product entity. If the Product 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 (*ProductMutation) OldNameJa

func (m *ProductMutation) OldNameJa(ctx context.Context) (v string, err error)

OldNameJa returns the old "name_ja" field's value of the Product entity. If the Product 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 (*ProductMutation) OldPublishedYear

func (m *ProductMutation) OldPublishedYear(ctx context.Context) (v int, err error)

OldPublishedYear returns the old "published_year" field's value of the Product entity. If the Product 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 (*ProductMutation) OldRevisionID

func (m *ProductMutation) OldRevisionID(ctx context.Context) (v int, err error)

OldRevisionID returns the old "revision_id" field's value of the Product entity. If the Product 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 (*ProductMutation) Op

func (m *ProductMutation) Op() Op

Op returns the operation name.

func (*ProductMutation) PublishedYear

func (m *ProductMutation) PublishedYear() (r int, exists bool)

PublishedYear returns the value of the "published_year" field in the mutation.

func (*ProductMutation) PublishedYearCleared

func (m *ProductMutation) PublishedYearCleared() bool

PublishedYearCleared returns if the "published_year" field was cleared in this mutation.

func (*ProductMutation) QueryContext

func (c *ProductMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductMutation) RemoveCardIDs

func (m *ProductMutation) RemoveCardIDs(ids ...int)

RemoveCardIDs removes the "cards" edge to the Card entity by IDs.

func (*ProductMutation) RemovedCardsIDs

func (m *ProductMutation) RemovedCardsIDs() (ids []int)

RemovedCards returns the removed IDs of the "cards" edge to the Card entity.

func (*ProductMutation) RemovedEdges

func (m *ProductMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProductMutation) RemovedIDs

func (m *ProductMutation) 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 (*ProductMutation) ResetCards

func (m *ProductMutation) ResetCards()

ResetCards resets all changes to the "cards" edge.

func (*ProductMutation) ResetEdge

func (m *ProductMutation) 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 (*ProductMutation) ResetField

func (m *ProductMutation) 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 (*ProductMutation) ResetIsOfficialJa

func (m *ProductMutation) ResetIsOfficialJa()

ResetIsOfficialJa resets all changes to the "is_official_ja" field.

func (*ProductMutation) ResetNameEn

func (m *ProductMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*ProductMutation) ResetNameJa

func (m *ProductMutation) ResetNameJa()

ResetNameJa resets all changes to the "name_ja" field.

func (*ProductMutation) ResetPublishedYear

func (m *ProductMutation) ResetPublishedYear()

ResetPublishedYear resets all changes to the "published_year" field.

func (*ProductMutation) ResetRevision

func (m *ProductMutation) ResetRevision()

ResetRevision resets all changes to the "revision" edge.

func (*ProductMutation) ResetRevisionID

func (m *ProductMutation) ResetRevisionID()

ResetRevisionID resets all changes to the "revision_id" field.

func (*ProductMutation) RevisionCleared

func (m *ProductMutation) RevisionCleared() bool

RevisionCleared reports if the "revision" edge to the Revision entity was cleared.

func (*ProductMutation) RevisionID

func (m *ProductMutation) RevisionID() (r int, exists bool)

RevisionID returns the value of the "revision_id" field in the mutation.

func (*ProductMutation) RevisionIDs

func (m *ProductMutation) RevisionIDs() (ids []int)

RevisionIDs returns the "revision" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RevisionID instead. It exists only for internal usage by the builders.

func (*ProductMutation) SetField

func (m *ProductMutation) 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 (*ProductMutation) SetID

func (m *ProductMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Product entities.

func (*ProductMutation) SetIsOfficialJa

func (m *ProductMutation) SetIsOfficialJa(b bool)

SetIsOfficialJa sets the "is_official_ja" field.

func (*ProductMutation) SetNameEn

func (m *ProductMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*ProductMutation) SetNameJa

func (m *ProductMutation) SetNameJa(s string)

SetNameJa sets the "name_ja" field.

func (*ProductMutation) SetOp

func (m *ProductMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProductMutation) SetPublishedYear

func (m *ProductMutation) SetPublishedYear(i int)

SetPublishedYear sets the "published_year" field.

func (*ProductMutation) SetRevisionID

func (m *ProductMutation) SetRevisionID(i int)

SetRevisionID sets the "revision_id" field.

func (ProductMutation) Tx

func (m ProductMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProductMutation) Type

func (m *ProductMutation) Type() string

Type returns the node type of this mutation (Product).

func (*ProductMutation) Where

func (m *ProductMutation) Where(ps ...predicate.Product)

Where appends a list predicates to the ProductMutation builder.

func (*ProductMutation) WhereP

func (m *ProductMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProductMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProductOrder

type ProductOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *ProductOrderField `json:"field"`
}

ProductOrder defines the ordering of Product.

type ProductOrderField

type ProductOrderField struct {
	// Value extracts the ordering value from the given Product.
	Value func(*Product) (ent.Value, error)
	// contains filtered or unexported fields
}

ProductOrderField defines the ordering field of Product.

type ProductPaginateOption

type ProductPaginateOption func(*productPager) error

ProductPaginateOption enables pagination customization.

func WithProductFilter

func WithProductFilter(filter func(*ProductQuery) (*ProductQuery, error)) ProductPaginateOption

WithProductFilter configures pagination filter.

func WithProductOrder

func WithProductOrder(order *ProductOrder) ProductPaginateOption

WithProductOrder configures pagination ordering.

type ProductQuery

type ProductQuery struct {
	// contains filtered or unexported fields
}

ProductQuery is the builder for querying Product entities.

func (*ProductQuery) Aggregate

func (pq *ProductQuery) Aggregate(fns ...AggregateFunc) *ProductSelect

Aggregate returns a ProductSelect configured with the given aggregations.

func (*ProductQuery) All

func (pq *ProductQuery) All(ctx context.Context) ([]*Product, error)

All executes the query and returns a list of Products.

func (*ProductQuery) AllX

func (pq *ProductQuery) AllX(ctx context.Context) []*Product

AllX is like All, but panics if an error occurs.

func (*ProductQuery) Clone

func (pq *ProductQuery) Clone() *ProductQuery

Clone returns a duplicate of the ProductQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProductQuery) CollectFields

func (pr *ProductQuery) CollectFields(ctx context.Context, satisfies ...string) (*ProductQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*ProductQuery) Count

func (pq *ProductQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProductQuery) CountX

func (pq *ProductQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProductQuery) ExecContext

func (c *ProductQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductQuery) Exist

func (pq *ProductQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProductQuery) ExistX

func (pq *ProductQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProductQuery) First

func (pq *ProductQuery) First(ctx context.Context) (*Product, error)

First returns the first Product entity from the query. Returns a *NotFoundError when no Product was found.

func (*ProductQuery) FirstID

func (pq *ProductQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Product ID from the query. Returns a *NotFoundError when no Product ID was found.

func (*ProductQuery) FirstIDX

func (pq *ProductQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProductQuery) FirstX

func (pq *ProductQuery) FirstX(ctx context.Context) *Product

FirstX is like First, but panics if an error occurs.

func (*ProductQuery) GroupBy

func (pq *ProductQuery) GroupBy(field string, fields ...string) *ProductGroupBy

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 {
	RevisionID int `json:"revision_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Product.Query().
	GroupBy(product.FieldRevisionID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProductQuery) IDs

func (pq *ProductQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Product IDs.

func (*ProductQuery) IDsX

func (pq *ProductQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ProductQuery) Limit

func (pq *ProductQuery) Limit(limit int) *ProductQuery

Limit the number of records to be returned by this query.

func (*ProductQuery) Offset

func (pq *ProductQuery) Offset(offset int) *ProductQuery

Offset to start from.

func (*ProductQuery) Only

func (pq *ProductQuery) Only(ctx context.Context) (*Product, error)

Only returns a single Product entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Product entity is found. Returns a *NotFoundError when no Product entities are found.

func (*ProductQuery) OnlyID

func (pq *ProductQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Product ID in the query. Returns a *NotSingularError when more than one Product ID is found. Returns a *NotFoundError when no entities are found.

func (*ProductQuery) OnlyIDX

func (pq *ProductQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProductQuery) OnlyX

func (pq *ProductQuery) OnlyX(ctx context.Context) *Product

OnlyX is like Only, but panics if an error occurs.

func (*ProductQuery) Order

func (pq *ProductQuery) Order(o ...product.OrderOption) *ProductQuery

Order specifies how the records should be ordered.

func (*ProductQuery) Paginate

func (pr *ProductQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...ProductPaginateOption,
) (*ProductConnection, error)

Paginate executes the query and returns a relay based cursor connection to Product.

func (*ProductQuery) QueryCards

func (pq *ProductQuery) QueryCards() *CardQuery

QueryCards chains the current query on the "cards" edge.

func (*ProductQuery) QueryContext

func (c *ProductQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductQuery) QueryRevision

func (pq *ProductQuery) QueryRevision() *RevisionQuery

QueryRevision chains the current query on the "revision" edge.

func (*ProductQuery) Select

func (pq *ProductQuery) Select(fields ...string) *ProductSelect

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 {
	RevisionID int `json:"revision_id,omitempty"`
}

client.Product.Query().
	Select(product.FieldRevisionID).
	Scan(ctx, &v)

func (*ProductQuery) Unique

func (pq *ProductQuery) Unique(unique bool) *ProductQuery

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 (*ProductQuery) Where

func (pq *ProductQuery) Where(ps ...predicate.Product) *ProductQuery

Where adds a new predicate for the ProductQuery builder.

func (*ProductQuery) WithCards

func (pq *ProductQuery) WithCards(opts ...func(*CardQuery)) *ProductQuery

WithCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProductQuery) WithNamedCards

func (pq *ProductQuery) WithNamedCards(name string, opts ...func(*CardQuery)) *ProductQuery

WithNamedCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*ProductQuery) WithRevision

func (pq *ProductQuery) WithRevision(opts ...func(*RevisionQuery)) *ProductQuery

WithRevision tells the query-builder to eager-load the nodes that are connected to the "revision" edge. The optional arguments are used to configure the query builder of the edge.

type ProductSelect

type ProductSelect struct {
	*ProductQuery
	// contains filtered or unexported fields
}

ProductSelect is the builder for selecting fields of Product entities.

func (*ProductSelect) Aggregate

func (ps *ProductSelect) Aggregate(fns ...AggregateFunc) *ProductSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProductSelect) Bool

func (s *ProductSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProductSelect) BoolX

func (s *ProductSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProductSelect) Bools

func (s *ProductSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProductSelect) BoolsX

func (s *ProductSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ProductSelect) ExecContext

func (c ProductSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductSelect) Float64

func (s *ProductSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProductSelect) Float64X

func (s *ProductSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProductSelect) Float64s

func (s *ProductSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProductSelect) Float64sX

func (s *ProductSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProductSelect) Int

func (s *ProductSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProductSelect) IntX

func (s *ProductSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProductSelect) Ints

func (s *ProductSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProductSelect) IntsX

func (s *ProductSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (ProductSelect) QueryContext

func (c ProductSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductSelect) Scan

func (ps *ProductSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProductSelect) ScanX

func (s *ProductSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProductSelect) String

func (s *ProductSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProductSelect) StringX

func (s *ProductSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProductSelect) Strings

func (s *ProductSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProductSelect) StringsX

func (s *ProductSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProductUpdate

type ProductUpdate struct {
	// contains filtered or unexported fields
}

ProductUpdate is the builder for updating Product entities.

func (*ProductUpdate) AddCardIDs

func (pu *ProductUpdate) AddCardIDs(ids ...int) *ProductUpdate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*ProductUpdate) AddCards

func (pu *ProductUpdate) AddCards(c ...*Card) *ProductUpdate

AddCards adds the "cards" edges to the Card entity.

func (*ProductUpdate) AddPublishedYear

func (pu *ProductUpdate) AddPublishedYear(i int) *ProductUpdate

AddPublishedYear adds i to the "published_year" field.

func (*ProductUpdate) ClearCards

func (pu *ProductUpdate) ClearCards() *ProductUpdate

ClearCards clears all "cards" edges to the Card entity.

func (*ProductUpdate) ClearNameEn

func (pu *ProductUpdate) ClearNameEn() *ProductUpdate

ClearNameEn clears the value of the "name_en" field.

func (*ProductUpdate) ClearNameJa

func (pu *ProductUpdate) ClearNameJa() *ProductUpdate

ClearNameJa clears the value of the "name_ja" field.

func (*ProductUpdate) ClearPublishedYear

func (pu *ProductUpdate) ClearPublishedYear() *ProductUpdate

ClearPublishedYear clears the value of the "published_year" field.

func (*ProductUpdate) Exec

func (pu *ProductUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductUpdate) ExecContext

func (c *ProductUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductUpdate) ExecX

func (pu *ProductUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpdate) Mutation

func (pu *ProductUpdate) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductUpdate) QueryContext

func (c *ProductUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductUpdate) RemoveCardIDs

func (pu *ProductUpdate) RemoveCardIDs(ids ...int) *ProductUpdate

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*ProductUpdate) RemoveCards

func (pu *ProductUpdate) RemoveCards(c ...*Card) *ProductUpdate

RemoveCards removes "cards" edges to Card entities.

func (*ProductUpdate) Save

func (pu *ProductUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProductUpdate) SaveX

func (pu *ProductUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProductUpdate) SetIsOfficialJa

func (pu *ProductUpdate) SetIsOfficialJa(b bool) *ProductUpdate

SetIsOfficialJa sets the "is_official_ja" field.

func (*ProductUpdate) SetNameEn

func (pu *ProductUpdate) SetNameEn(s string) *ProductUpdate

SetNameEn sets the "name_en" field.

func (*ProductUpdate) SetNameJa

func (pu *ProductUpdate) SetNameJa(s string) *ProductUpdate

SetNameJa sets the "name_ja" field.

func (*ProductUpdate) SetNillableIsOfficialJa

func (pu *ProductUpdate) SetNillableIsOfficialJa(b *bool) *ProductUpdate

SetNillableIsOfficialJa sets the "is_official_ja" field if the given value is not nil.

func (*ProductUpdate) SetNillableNameEn

func (pu *ProductUpdate) SetNillableNameEn(s *string) *ProductUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*ProductUpdate) SetNillableNameJa

func (pu *ProductUpdate) SetNillableNameJa(s *string) *ProductUpdate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*ProductUpdate) SetNillablePublishedYear

func (pu *ProductUpdate) SetNillablePublishedYear(i *int) *ProductUpdate

SetNillablePublishedYear sets the "published_year" field if the given value is not nil.

func (*ProductUpdate) SetPublishedYear

func (pu *ProductUpdate) SetPublishedYear(i int) *ProductUpdate

SetPublishedYear sets the "published_year" field.

func (*ProductUpdate) Where

func (pu *ProductUpdate) Where(ps ...predicate.Product) *ProductUpdate

Where appends a list predicates to the ProductUpdate builder.

type ProductUpdateOne

type ProductUpdateOne struct {
	// contains filtered or unexported fields
}

ProductUpdateOne is the builder for updating a single Product entity.

func (*ProductUpdateOne) AddCardIDs

func (puo *ProductUpdateOne) AddCardIDs(ids ...int) *ProductUpdateOne

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*ProductUpdateOne) AddCards

func (puo *ProductUpdateOne) AddCards(c ...*Card) *ProductUpdateOne

AddCards adds the "cards" edges to the Card entity.

func (*ProductUpdateOne) AddPublishedYear

func (puo *ProductUpdateOne) AddPublishedYear(i int) *ProductUpdateOne

AddPublishedYear adds i to the "published_year" field.

func (*ProductUpdateOne) ClearCards

func (puo *ProductUpdateOne) ClearCards() *ProductUpdateOne

ClearCards clears all "cards" edges to the Card entity.

func (*ProductUpdateOne) ClearNameEn

func (puo *ProductUpdateOne) ClearNameEn() *ProductUpdateOne

ClearNameEn clears the value of the "name_en" field.

func (*ProductUpdateOne) ClearNameJa

func (puo *ProductUpdateOne) ClearNameJa() *ProductUpdateOne

ClearNameJa clears the value of the "name_ja" field.

func (*ProductUpdateOne) ClearPublishedYear

func (puo *ProductUpdateOne) ClearPublishedYear() *ProductUpdateOne

ClearPublishedYear clears the value of the "published_year" field.

func (*ProductUpdateOne) Exec

func (puo *ProductUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProductUpdateOne) ExecContext

func (c *ProductUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ProductUpdateOne) ExecX

func (puo *ProductUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpdateOne) Mutation

func (puo *ProductUpdateOne) Mutation() *ProductMutation

Mutation returns the ProductMutation object of the builder.

func (*ProductUpdateOne) QueryContext

func (c *ProductUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ProductUpdateOne) RemoveCardIDs

func (puo *ProductUpdateOne) RemoveCardIDs(ids ...int) *ProductUpdateOne

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*ProductUpdateOne) RemoveCards

func (puo *ProductUpdateOne) RemoveCards(c ...*Card) *ProductUpdateOne

RemoveCards removes "cards" edges to Card entities.

func (*ProductUpdateOne) Save

func (puo *ProductUpdateOne) Save(ctx context.Context) (*Product, error)

Save executes the query and returns the updated Product entity.

func (*ProductUpdateOne) SaveX

func (puo *ProductUpdateOne) SaveX(ctx context.Context) *Product

SaveX is like Save, but panics if an error occurs.

func (*ProductUpdateOne) Select

func (puo *ProductUpdateOne) Select(field string, fields ...string) *ProductUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProductUpdateOne) SetIsOfficialJa

func (puo *ProductUpdateOne) SetIsOfficialJa(b bool) *ProductUpdateOne

SetIsOfficialJa sets the "is_official_ja" field.

func (*ProductUpdateOne) SetNameEn

func (puo *ProductUpdateOne) SetNameEn(s string) *ProductUpdateOne

SetNameEn sets the "name_en" field.

func (*ProductUpdateOne) SetNameJa

func (puo *ProductUpdateOne) SetNameJa(s string) *ProductUpdateOne

SetNameJa sets the "name_ja" field.

func (*ProductUpdateOne) SetNillableIsOfficialJa

func (puo *ProductUpdateOne) SetNillableIsOfficialJa(b *bool) *ProductUpdateOne

SetNillableIsOfficialJa sets the "is_official_ja" field if the given value is not nil.

func (*ProductUpdateOne) SetNillableNameEn

func (puo *ProductUpdateOne) SetNillableNameEn(s *string) *ProductUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*ProductUpdateOne) SetNillableNameJa

func (puo *ProductUpdateOne) SetNillableNameJa(s *string) *ProductUpdateOne

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*ProductUpdateOne) SetNillablePublishedYear

func (puo *ProductUpdateOne) SetNillablePublishedYear(i *int) *ProductUpdateOne

SetNillablePublishedYear sets the "published_year" field if the given value is not nil.

func (*ProductUpdateOne) SetPublishedYear

func (puo *ProductUpdateOne) SetPublishedYear(i int) *ProductUpdateOne

SetPublishedYear sets the "published_year" field.

func (*ProductUpdateOne) Where

Where appends a list predicates to the ProductUpdate builder.

type ProductUpsert

type ProductUpsert struct {
	*sql.UpdateSet
}

ProductUpsert is the "OnConflict" setter.

func (*ProductUpsert) AddPublishedYear

func (u *ProductUpsert) AddPublishedYear(v int) *ProductUpsert

AddPublishedYear adds v to the "published_year" field.

func (*ProductUpsert) ClearNameEn

func (u *ProductUpsert) ClearNameEn() *ProductUpsert

ClearNameEn clears the value of the "name_en" field.

func (*ProductUpsert) ClearNameJa

func (u *ProductUpsert) ClearNameJa() *ProductUpsert

ClearNameJa clears the value of the "name_ja" field.

func (*ProductUpsert) ClearPublishedYear

func (u *ProductUpsert) ClearPublishedYear() *ProductUpsert

ClearPublishedYear clears the value of the "published_year" field.

func (*ProductUpsert) SetIsOfficialJa

func (u *ProductUpsert) SetIsOfficialJa(v bool) *ProductUpsert

SetIsOfficialJa sets the "is_official_ja" field.

func (*ProductUpsert) SetNameEn

func (u *ProductUpsert) SetNameEn(v string) *ProductUpsert

SetNameEn sets the "name_en" field.

func (*ProductUpsert) SetNameJa

func (u *ProductUpsert) SetNameJa(v string) *ProductUpsert

SetNameJa sets the "name_ja" field.

func (*ProductUpsert) SetPublishedYear

func (u *ProductUpsert) SetPublishedYear(v int) *ProductUpsert

SetPublishedYear sets the "published_year" field.

func (*ProductUpsert) UpdateIsOfficialJa

func (u *ProductUpsert) UpdateIsOfficialJa() *ProductUpsert

UpdateIsOfficialJa sets the "is_official_ja" field to the value that was provided on create.

func (*ProductUpsert) UpdateNameEn

func (u *ProductUpsert) UpdateNameEn() *ProductUpsert

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*ProductUpsert) UpdateNameJa

func (u *ProductUpsert) UpdateNameJa() *ProductUpsert

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*ProductUpsert) UpdatePublishedYear

func (u *ProductUpsert) UpdatePublishedYear() *ProductUpsert

UpdatePublishedYear sets the "published_year" field to the value that was provided on create.

type ProductUpsertBulk

type ProductUpsertBulk struct {
	// contains filtered or unexported fields
}

ProductUpsertBulk is the builder for "upsert"-ing a bulk of Product nodes.

func (*ProductUpsertBulk) AddPublishedYear

func (u *ProductUpsertBulk) AddPublishedYear(v int) *ProductUpsertBulk

AddPublishedYear adds v to the "published_year" field.

func (*ProductUpsertBulk) ClearNameEn

func (u *ProductUpsertBulk) ClearNameEn() *ProductUpsertBulk

ClearNameEn clears the value of the "name_en" field.

func (*ProductUpsertBulk) ClearNameJa

func (u *ProductUpsertBulk) ClearNameJa() *ProductUpsertBulk

ClearNameJa clears the value of the "name_ja" field.

func (*ProductUpsertBulk) ClearPublishedYear

func (u *ProductUpsertBulk) ClearPublishedYear() *ProductUpsertBulk

ClearPublishedYear clears the value of the "published_year" field.

func (*ProductUpsertBulk) DoNothing

func (u *ProductUpsertBulk) DoNothing() *ProductUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProductUpsertBulk) Exec

func (u *ProductUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductUpsertBulk) ExecX

func (u *ProductUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpsertBulk) Ignore

func (u *ProductUpsertBulk) Ignore() *ProductUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ProductUpsertBulk) SetIsOfficialJa

func (u *ProductUpsertBulk) SetIsOfficialJa(v bool) *ProductUpsertBulk

SetIsOfficialJa sets the "is_official_ja" field.

func (*ProductUpsertBulk) SetNameEn

func (u *ProductUpsertBulk) SetNameEn(v string) *ProductUpsertBulk

SetNameEn sets the "name_en" field.

func (*ProductUpsertBulk) SetNameJa

func (u *ProductUpsertBulk) SetNameJa(v string) *ProductUpsertBulk

SetNameJa sets the "name_ja" field.

func (*ProductUpsertBulk) SetPublishedYear

func (u *ProductUpsertBulk) SetPublishedYear(v int) *ProductUpsertBulk

SetPublishedYear sets the "published_year" field.

func (*ProductUpsertBulk) Update

func (u *ProductUpsertBulk) Update(set func(*ProductUpsert)) *ProductUpsertBulk

Update allows overriding fields `UPDATE` values. See the ProductCreateBulk.OnConflict documentation for more info.

func (*ProductUpsertBulk) UpdateIsOfficialJa

func (u *ProductUpsertBulk) UpdateIsOfficialJa() *ProductUpsertBulk

UpdateIsOfficialJa sets the "is_official_ja" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateNameEn

func (u *ProductUpsertBulk) UpdateNameEn() *ProductUpsertBulk

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateNameJa

func (u *ProductUpsertBulk) UpdateNameJa() *ProductUpsertBulk

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*ProductUpsertBulk) UpdateNewValues

func (u *ProductUpsertBulk) UpdateNewValues() *ProductUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(product.FieldID)
		}),
	).
	Exec(ctx)

func (*ProductUpsertBulk) UpdatePublishedYear

func (u *ProductUpsertBulk) UpdatePublishedYear() *ProductUpsertBulk

UpdatePublishedYear sets the "published_year" field to the value that was provided on create.

type ProductUpsertOne

type ProductUpsertOne struct {
	// contains filtered or unexported fields
}

ProductUpsertOne is the builder for "upsert"-ing

one Product node.

func (*ProductUpsertOne) AddPublishedYear

func (u *ProductUpsertOne) AddPublishedYear(v int) *ProductUpsertOne

AddPublishedYear adds v to the "published_year" field.

func (*ProductUpsertOne) ClearNameEn

func (u *ProductUpsertOne) ClearNameEn() *ProductUpsertOne

ClearNameEn clears the value of the "name_en" field.

func (*ProductUpsertOne) ClearNameJa

func (u *ProductUpsertOne) ClearNameJa() *ProductUpsertOne

ClearNameJa clears the value of the "name_ja" field.

func (*ProductUpsertOne) ClearPublishedYear

func (u *ProductUpsertOne) ClearPublishedYear() *ProductUpsertOne

ClearPublishedYear clears the value of the "published_year" field.

func (*ProductUpsertOne) DoNothing

func (u *ProductUpsertOne) DoNothing() *ProductUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProductUpsertOne) Exec

func (u *ProductUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ProductUpsertOne) ExecX

func (u *ProductUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProductUpsertOne) ID

func (u *ProductUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ProductUpsertOne) IDX

func (u *ProductUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*ProductUpsertOne) Ignore

func (u *ProductUpsertOne) Ignore() *ProductUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Product.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ProductUpsertOne) SetIsOfficialJa

func (u *ProductUpsertOne) SetIsOfficialJa(v bool) *ProductUpsertOne

SetIsOfficialJa sets the "is_official_ja" field.

func (*ProductUpsertOne) SetNameEn

func (u *ProductUpsertOne) SetNameEn(v string) *ProductUpsertOne

SetNameEn sets the "name_en" field.

func (*ProductUpsertOne) SetNameJa

func (u *ProductUpsertOne) SetNameJa(v string) *ProductUpsertOne

SetNameJa sets the "name_ja" field.

func (*ProductUpsertOne) SetPublishedYear

func (u *ProductUpsertOne) SetPublishedYear(v int) *ProductUpsertOne

SetPublishedYear sets the "published_year" field.

func (*ProductUpsertOne) Update

func (u *ProductUpsertOne) Update(set func(*ProductUpsert)) *ProductUpsertOne

Update allows overriding fields `UPDATE` values. See the ProductCreate.OnConflict documentation for more info.

func (*ProductUpsertOne) UpdateIsOfficialJa

func (u *ProductUpsertOne) UpdateIsOfficialJa() *ProductUpsertOne

UpdateIsOfficialJa sets the "is_official_ja" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateNameEn

func (u *ProductUpsertOne) UpdateNameEn() *ProductUpsertOne

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateNameJa

func (u *ProductUpsertOne) UpdateNameJa() *ProductUpsertOne

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*ProductUpsertOne) UpdateNewValues

func (u *ProductUpsertOne) UpdateNewValues() *ProductUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Product.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(product.FieldID)
		}),
	).
	Exec(ctx)

func (*ProductUpsertOne) UpdatePublishedYear

func (u *ProductUpsertOne) UpdatePublishedYear() *ProductUpsertOne

UpdatePublishedYear sets the "published_year" field to the value that was provided on create.

type ProductWhereInput

type ProductWhereInput struct {
	Predicates []predicate.Product  `json:"-"`
	Not        *ProductWhereInput   `json:"not,omitempty"`
	Or         []*ProductWhereInput `json:"or,omitempty"`
	And        []*ProductWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "revision_id" field predicates.
	RevisionID      *int  `json:"revisionID,omitempty"`
	RevisionIDNEQ   *int  `json:"revisionIDNEQ,omitempty"`
	RevisionIDIn    []int `json:"revisionIDIn,omitempty"`
	RevisionIDNotIn []int `json:"revisionIDNotIn,omitempty"`

	// "is_official_ja" field predicates.
	IsOfficialJa    *bool `json:"isOfficialJa,omitempty"`
	IsOfficialJaNEQ *bool `json:"isOfficialJaNEQ,omitempty"`

	// "name_ja" field predicates.
	NameJa             *string  `json:"nameJa,omitempty"`
	NameJaNEQ          *string  `json:"nameJaNEQ,omitempty"`
	NameJaIn           []string `json:"nameJaIn,omitempty"`
	NameJaNotIn        []string `json:"nameJaNotIn,omitempty"`
	NameJaGT           *string  `json:"nameJaGT,omitempty"`
	NameJaGTE          *string  `json:"nameJaGTE,omitempty"`
	NameJaLT           *string  `json:"nameJaLT,omitempty"`
	NameJaLTE          *string  `json:"nameJaLTE,omitempty"`
	NameJaContains     *string  `json:"nameJaContains,omitempty"`
	NameJaHasPrefix    *string  `json:"nameJaHasPrefix,omitempty"`
	NameJaHasSuffix    *string  `json:"nameJaHasSuffix,omitempty"`
	NameJaIsNil        bool     `json:"nameJaIsNil,omitempty"`
	NameJaNotNil       bool     `json:"nameJaNotNil,omitempty"`
	NameJaEqualFold    *string  `json:"nameJaEqualFold,omitempty"`
	NameJaContainsFold *string  `json:"nameJaContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,omitempty"`

	// "published_year" field predicates.
	PublishedYear       *int  `json:"publishedYear,omitempty"`
	PublishedYearNEQ    *int  `json:"publishedYearNEQ,omitempty"`
	PublishedYearIn     []int `json:"publishedYearIn,omitempty"`
	PublishedYearNotIn  []int `json:"publishedYearNotIn,omitempty"`
	PublishedYearGT     *int  `json:"publishedYearGT,omitempty"`
	PublishedYearGTE    *int  `json:"publishedYearGTE,omitempty"`
	PublishedYearLT     *int  `json:"publishedYearLT,omitempty"`
	PublishedYearLTE    *int  `json:"publishedYearLTE,omitempty"`
	PublishedYearIsNil  bool  `json:"publishedYearIsNil,omitempty"`
	PublishedYearNotNil bool  `json:"publishedYearNotNil,omitempty"`

	// "cards" edge predicates.
	HasCards     *bool             `json:"hasCards,omitempty"`
	HasCardsWith []*CardWhereInput `json:"hasCardsWith,omitempty"`

	// "revision" edge predicates.
	HasRevision     *bool                 `json:"hasRevision,omitempty"`
	HasRevisionWith []*RevisionWhereInput `json:"hasRevisionWith,omitempty"`
}

ProductWhereInput represents a where input for filtering Product queries.

func (*ProductWhereInput) AddPredicates

func (i *ProductWhereInput) AddPredicates(predicates ...predicate.Product)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*ProductWhereInput) Filter

Filter applies the ProductWhereInput filter on the ProductQuery builder.

func (*ProductWhereInput) P

P returns a predicate for filtering products. An error is returned if the input is empty or invalid.

type Products

type Products []*Product

Products is a parsable slice of Product.

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 Revision

type Revision struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// NameJa holds the value of the "name_ja" field.
	NameJa string `json:"name_ja,omitempty"`
	// NameEn holds the value of the "name_en" field.
	NameEn string `json:"name_en,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RevisionQuery when eager-loading is set.
	Edges RevisionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Revision is the model entity for the Revision schema.

func (*Revision) Cards

func (r *Revision) Cards(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, where *CardWhereInput,
) (*CardConnection, error)

func (*Revision) Decks

func (r *Revision) Decks(ctx context.Context) (result []*Deck, err error)

func (*Revision) ExecContext

func (c *Revision) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Revision) IsNode

func (*Revision) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Revision) NamedCards

func (r *Revision) NamedCards(name string) ([]*Card, error)

NamedCards returns the Cards named value or an error if the edge was not loaded in eager-loading with this name.

func (*Revision) NamedDecks

func (r *Revision) NamedDecks(name string) ([]*Deck, error)

NamedDecks returns the Decks named value or an error if the edge was not loaded in eager-loading with this name.

func (*Revision) NamedProducts

func (r *Revision) NamedProducts(name string) ([]*Product, error)

NamedProducts returns the Products named value or an error if the edge was not loaded in eager-loading with this name.

func (*Revision) Products

func (r *Revision) Products(ctx context.Context) (result []*Product, err error)

func (*Revision) QueryCards

func (r *Revision) QueryCards() *CardQuery

QueryCards queries the "cards" edge of the Revision entity.

func (*Revision) QueryContext

func (c *Revision) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Revision) QueryDecks

func (r *Revision) QueryDecks() *DeckQuery

QueryDecks queries the "decks" edge of the Revision entity.

func (*Revision) QueryProducts

func (r *Revision) QueryProducts() *ProductQuery

QueryProducts queries the "products" edge of the Revision entity.

func (*Revision) String

func (r *Revision) String() string

String implements the fmt.Stringer.

func (*Revision) ToEdge

func (r *Revision) ToEdge(order *RevisionOrder) *RevisionEdge

ToEdge converts Revision into RevisionEdge.

func (*Revision) Unwrap

func (r *Revision) Unwrap() *Revision

Unwrap unwraps the Revision 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 (*Revision) Update

func (r *Revision) Update() *RevisionUpdateOne

Update returns a builder for updating this Revision. Note that you need to call Revision.Unwrap() before calling this method if this Revision was returned from a transaction, and the transaction was committed or rolled back.

func (*Revision) Value

func (r *Revision) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Revision. This includes values selected through modifiers, order, etc.

type RevisionClient

type RevisionClient struct {
	// contains filtered or unexported fields
}

RevisionClient is a client for the Revision schema.

func NewRevisionClient

func NewRevisionClient(c config) *RevisionClient

NewRevisionClient returns a client for the Revision from the given config.

func (*RevisionClient) Create

func (c *RevisionClient) Create() *RevisionCreate

Create returns a builder for creating a Revision entity.

func (*RevisionClient) CreateBulk

func (c *RevisionClient) CreateBulk(builders ...*RevisionCreate) *RevisionCreateBulk

CreateBulk returns a builder for creating a bulk of Revision entities.

func (*RevisionClient) Delete

func (c *RevisionClient) Delete() *RevisionDelete

Delete returns a delete builder for Revision.

func (*RevisionClient) DeleteOne

func (c *RevisionClient) DeleteOne(r *Revision) *RevisionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RevisionClient) DeleteOneID

func (c *RevisionClient) DeleteOneID(id int) *RevisionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RevisionClient) ExecContext

func (c *RevisionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionClient) Get

func (c *RevisionClient) Get(ctx context.Context, id int) (*Revision, error)

Get returns a Revision entity by its id.

func (*RevisionClient) GetX

func (c *RevisionClient) GetX(ctx context.Context, id int) *Revision

GetX is like Get, but panics if an error occurs.

func (*RevisionClient) Hooks

func (c *RevisionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RevisionClient) Intercept

func (c *RevisionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `revision.Intercept(f(g(h())))`.

func (*RevisionClient) Interceptors

func (c *RevisionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RevisionClient) MapCreateBulk

func (c *RevisionClient) MapCreateBulk(slice any, setFunc func(*RevisionCreate, int)) *RevisionCreateBulk

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 (*RevisionClient) Query

func (c *RevisionClient) Query() *RevisionQuery

Query returns a query builder for Revision.

func (*RevisionClient) QueryCards

func (c *RevisionClient) QueryCards(r *Revision) *CardQuery

QueryCards queries the cards edge of a Revision.

func (*RevisionClient) QueryContext

func (c *RevisionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionClient) QueryDecks

func (c *RevisionClient) QueryDecks(r *Revision) *DeckQuery

QueryDecks queries the decks edge of a Revision.

func (*RevisionClient) QueryProducts

func (c *RevisionClient) QueryProducts(r *Revision) *ProductQuery

QueryProducts queries the products edge of a Revision.

func (*RevisionClient) Update

func (c *RevisionClient) Update() *RevisionUpdate

Update returns an update builder for Revision.

func (*RevisionClient) UpdateOne

func (c *RevisionClient) UpdateOne(r *Revision) *RevisionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RevisionClient) UpdateOneID

func (c *RevisionClient) UpdateOneID(id int) *RevisionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RevisionClient) Use

func (c *RevisionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `revision.Hooks(f(g(h())))`.

type RevisionConnection

type RevisionConnection struct {
	Edges      []*RevisionEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

RevisionConnection is the connection containing edges to Revision.

type RevisionCreate

type RevisionCreate struct {
	// contains filtered or unexported fields
}

RevisionCreate is the builder for creating a Revision entity.

func (*RevisionCreate) AddCardIDs

func (rc *RevisionCreate) AddCardIDs(ids ...int) *RevisionCreate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*RevisionCreate) AddCards

func (rc *RevisionCreate) AddCards(c ...*Card) *RevisionCreate

AddCards adds the "cards" edges to the Card entity.

func (*RevisionCreate) AddDeckIDs

func (rc *RevisionCreate) AddDeckIDs(ids ...int) *RevisionCreate

AddDeckIDs adds the "decks" edge to the Deck entity by IDs.

func (*RevisionCreate) AddDecks

func (rc *RevisionCreate) AddDecks(d ...*Deck) *RevisionCreate

AddDecks adds the "decks" edges to the Deck entity.

func (*RevisionCreate) AddProductIDs

func (rc *RevisionCreate) AddProductIDs(ids ...int) *RevisionCreate

AddProductIDs adds the "products" edge to the Product entity by IDs.

func (*RevisionCreate) AddProducts

func (rc *RevisionCreate) AddProducts(p ...*Product) *RevisionCreate

AddProducts adds the "products" edges to the Product entity.

func (*RevisionCreate) Exec

func (rc *RevisionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RevisionCreate) ExecContext

func (c *RevisionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionCreate) ExecX

func (rc *RevisionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RevisionCreate) Mutation

func (rc *RevisionCreate) Mutation() *RevisionMutation

Mutation returns the RevisionMutation object of the builder.

func (*RevisionCreate) OnConflict

func (rc *RevisionCreate) OnConflict(opts ...sql.ConflictOption) *RevisionUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Revision.Create().
	SetKey(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RevisionUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*RevisionCreate) OnConflictColumns

func (rc *RevisionCreate) OnConflictColumns(columns ...string) *RevisionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Revision.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RevisionCreate) QueryContext

func (c *RevisionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionCreate) Save

func (rc *RevisionCreate) Save(ctx context.Context) (*Revision, error)

Save creates the Revision in the database.

func (*RevisionCreate) SaveX

func (rc *RevisionCreate) SaveX(ctx context.Context) *Revision

SaveX calls Save and panics if Save returns an error.

func (*RevisionCreate) SetID

func (rc *RevisionCreate) SetID(i int) *RevisionCreate

SetID sets the "id" field.

func (*RevisionCreate) SetKey

func (rc *RevisionCreate) SetKey(s string) *RevisionCreate

SetKey sets the "key" field.

func (*RevisionCreate) SetNameEn

func (rc *RevisionCreate) SetNameEn(s string) *RevisionCreate

SetNameEn sets the "name_en" field.

func (*RevisionCreate) SetNameJa

func (rc *RevisionCreate) SetNameJa(s string) *RevisionCreate

SetNameJa sets the "name_ja" field.

func (*RevisionCreate) SetNillableNameEn

func (rc *RevisionCreate) SetNillableNameEn(s *string) *RevisionCreate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*RevisionCreate) SetNillableNameJa

func (rc *RevisionCreate) SetNillableNameJa(s *string) *RevisionCreate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

type RevisionCreateBulk

type RevisionCreateBulk struct {
	// contains filtered or unexported fields
}

RevisionCreateBulk is the builder for creating many Revision entities in bulk.

func (*RevisionCreateBulk) Exec

func (rcb *RevisionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RevisionCreateBulk) ExecContext

func (c *RevisionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionCreateBulk) ExecX

func (rcb *RevisionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RevisionCreateBulk) OnConflict

func (rcb *RevisionCreateBulk) OnConflict(opts ...sql.ConflictOption) *RevisionUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Revision.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.RevisionUpsert) {
		SetKey(v+v).
	}).
	Exec(ctx)

func (*RevisionCreateBulk) OnConflictColumns

func (rcb *RevisionCreateBulk) OnConflictColumns(columns ...string) *RevisionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Revision.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RevisionCreateBulk) QueryContext

func (c *RevisionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionCreateBulk) Save

func (rcb *RevisionCreateBulk) Save(ctx context.Context) ([]*Revision, error)

Save creates the Revision entities in the database.

func (*RevisionCreateBulk) SaveX

func (rcb *RevisionCreateBulk) SaveX(ctx context.Context) []*Revision

SaveX is like Save, but panics if an error occurs.

type RevisionDelete

type RevisionDelete struct {
	// contains filtered or unexported fields
}

RevisionDelete is the builder for deleting a Revision entity.

func (*RevisionDelete) Exec

func (rd *RevisionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RevisionDelete) ExecContext

func (c *RevisionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionDelete) ExecX

func (rd *RevisionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RevisionDelete) QueryContext

func (c *RevisionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionDelete) Where

func (rd *RevisionDelete) Where(ps ...predicate.Revision) *RevisionDelete

Where appends a list predicates to the RevisionDelete builder.

type RevisionDeleteOne

type RevisionDeleteOne struct {
	// contains filtered or unexported fields
}

RevisionDeleteOne is the builder for deleting a single Revision entity.

func (*RevisionDeleteOne) Exec

func (rdo *RevisionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RevisionDeleteOne) ExecX

func (rdo *RevisionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RevisionDeleteOne) Where

Where appends a list predicates to the RevisionDelete builder.

type RevisionEdge

type RevisionEdge struct {
	Node   *Revision `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

RevisionEdge is the edge representation of Revision.

type RevisionEdges

type RevisionEdges struct {
	// Cards holds the value of the cards edge.
	Cards []*Card `json:"cards,omitempty"`
	// Products holds the value of the products edge.
	Products []*Product `json:"products,omitempty"`
	// Decks holds the value of the decks edge.
	Decks []*Deck `json:"decks,omitempty"`
	// contains filtered or unexported fields
}

RevisionEdges holds the relations/edges for other nodes in the graph.

func (RevisionEdges) CardsOrErr

func (e RevisionEdges) CardsOrErr() ([]*Card, error)

CardsOrErr returns the Cards value or an error if the edge was not loaded in eager-loading.

func (RevisionEdges) DecksOrErr

func (e RevisionEdges) DecksOrErr() ([]*Deck, error)

DecksOrErr returns the Decks value or an error if the edge was not loaded in eager-loading.

func (RevisionEdges) ProductsOrErr

func (e RevisionEdges) ProductsOrErr() ([]*Product, error)

ProductsOrErr returns the Products value or an error if the edge was not loaded in eager-loading.

type RevisionGroupBy

type RevisionGroupBy struct {
	// contains filtered or unexported fields
}

RevisionGroupBy is the group-by builder for Revision entities.

func (*RevisionGroupBy) Aggregate

func (rgb *RevisionGroupBy) Aggregate(fns ...AggregateFunc) *RevisionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RevisionGroupBy) Bool

func (s *RevisionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) BoolX

func (s *RevisionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RevisionGroupBy) Bools

func (s *RevisionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) BoolsX

func (s *RevisionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RevisionGroupBy) Float64

func (s *RevisionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) Float64X

func (s *RevisionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RevisionGroupBy) Float64s

func (s *RevisionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) Float64sX

func (s *RevisionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RevisionGroupBy) Int

func (s *RevisionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) IntX

func (s *RevisionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RevisionGroupBy) Ints

func (s *RevisionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) IntsX

func (s *RevisionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RevisionGroupBy) Scan

func (rgb *RevisionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RevisionGroupBy) ScanX

func (s *RevisionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RevisionGroupBy) String

func (s *RevisionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) StringX

func (s *RevisionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RevisionGroupBy) Strings

func (s *RevisionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RevisionGroupBy) StringsX

func (s *RevisionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RevisionMutation

type RevisionMutation struct {
	// contains filtered or unexported fields
}

RevisionMutation represents an operation that mutates the Revision nodes in the graph.

func (*RevisionMutation) AddCardIDs

func (m *RevisionMutation) AddCardIDs(ids ...int)

AddCardIDs adds the "cards" edge to the Card entity by ids.

func (*RevisionMutation) AddDeckIDs

func (m *RevisionMutation) AddDeckIDs(ids ...int)

AddDeckIDs adds the "decks" edge to the Deck entity by ids.

func (*RevisionMutation) AddField

func (m *RevisionMutation) 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 (*RevisionMutation) AddProductIDs

func (m *RevisionMutation) AddProductIDs(ids ...int)

AddProductIDs adds the "products" edge to the Product entity by ids.

func (*RevisionMutation) AddedEdges

func (m *RevisionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RevisionMutation) AddedField

func (m *RevisionMutation) 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 (*RevisionMutation) AddedFields

func (m *RevisionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RevisionMutation) AddedIDs

func (m *RevisionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RevisionMutation) CardsCleared

func (m *RevisionMutation) CardsCleared() bool

CardsCleared reports if the "cards" edge to the Card entity was cleared.

func (*RevisionMutation) CardsIDs

func (m *RevisionMutation) CardsIDs() (ids []int)

CardsIDs returns the "cards" edge IDs in the mutation.

func (*RevisionMutation) ClearCards

func (m *RevisionMutation) ClearCards()

ClearCards clears the "cards" edge to the Card entity.

func (*RevisionMutation) ClearDecks

func (m *RevisionMutation) ClearDecks()

ClearDecks clears the "decks" edge to the Deck entity.

func (*RevisionMutation) ClearEdge

func (m *RevisionMutation) 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 (*RevisionMutation) ClearField

func (m *RevisionMutation) 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 (*RevisionMutation) ClearNameEn

func (m *RevisionMutation) ClearNameEn()

ClearNameEn clears the value of the "name_en" field.

func (*RevisionMutation) ClearNameJa

func (m *RevisionMutation) ClearNameJa()

ClearNameJa clears the value of the "name_ja" field.

func (*RevisionMutation) ClearProducts

func (m *RevisionMutation) ClearProducts()

ClearProducts clears the "products" edge to the Product entity.

func (*RevisionMutation) ClearedEdges

func (m *RevisionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RevisionMutation) ClearedFields

func (m *RevisionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RevisionMutation) Client

func (m RevisionMutation) 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 (*RevisionMutation) DecksCleared

func (m *RevisionMutation) DecksCleared() bool

DecksCleared reports if the "decks" edge to the Deck entity was cleared.

func (*RevisionMutation) DecksIDs

func (m *RevisionMutation) DecksIDs() (ids []int)

DecksIDs returns the "decks" edge IDs in the mutation.

func (*RevisionMutation) EdgeCleared

func (m *RevisionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RevisionMutation) ExecContext

func (c *RevisionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionMutation) Field

func (m *RevisionMutation) 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 (*RevisionMutation) FieldCleared

func (m *RevisionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RevisionMutation) Fields

func (m *RevisionMutation) 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 (*RevisionMutation) ID

func (m *RevisionMutation) 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 (*RevisionMutation) IDs

func (m *RevisionMutation) 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 (*RevisionMutation) Key

func (m *RevisionMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*RevisionMutation) NameEn

func (m *RevisionMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*RevisionMutation) NameEnCleared

func (m *RevisionMutation) NameEnCleared() bool

NameEnCleared returns if the "name_en" field was cleared in this mutation.

func (*RevisionMutation) NameJa

func (m *RevisionMutation) NameJa() (r string, exists bool)

NameJa returns the value of the "name_ja" field in the mutation.

func (*RevisionMutation) NameJaCleared

func (m *RevisionMutation) NameJaCleared() bool

NameJaCleared returns if the "name_ja" field was cleared in this mutation.

func (*RevisionMutation) OldField

func (m *RevisionMutation) 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 (*RevisionMutation) OldKey

func (m *RevisionMutation) OldKey(ctx context.Context) (v string, err error)

OldKey returns the old "key" field's value of the Revision entity. If the Revision 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 (*RevisionMutation) OldNameEn

func (m *RevisionMutation) OldNameEn(ctx context.Context) (v string, err error)

OldNameEn returns the old "name_en" field's value of the Revision entity. If the Revision 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 (*RevisionMutation) OldNameJa

func (m *RevisionMutation) OldNameJa(ctx context.Context) (v string, err error)

OldNameJa returns the old "name_ja" field's value of the Revision entity. If the Revision 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 (*RevisionMutation) Op

func (m *RevisionMutation) Op() Op

Op returns the operation name.

func (*RevisionMutation) ProductsCleared

func (m *RevisionMutation) ProductsCleared() bool

ProductsCleared reports if the "products" edge to the Product entity was cleared.

func (*RevisionMutation) ProductsIDs

func (m *RevisionMutation) ProductsIDs() (ids []int)

ProductsIDs returns the "products" edge IDs in the mutation.

func (*RevisionMutation) QueryContext

func (c *RevisionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionMutation) RemoveCardIDs

func (m *RevisionMutation) RemoveCardIDs(ids ...int)

RemoveCardIDs removes the "cards" edge to the Card entity by IDs.

func (*RevisionMutation) RemoveDeckIDs

func (m *RevisionMutation) RemoveDeckIDs(ids ...int)

RemoveDeckIDs removes the "decks" edge to the Deck entity by IDs.

func (*RevisionMutation) RemoveProductIDs

func (m *RevisionMutation) RemoveProductIDs(ids ...int)

RemoveProductIDs removes the "products" edge to the Product entity by IDs.

func (*RevisionMutation) RemovedCardsIDs

func (m *RevisionMutation) RemovedCardsIDs() (ids []int)

RemovedCards returns the removed IDs of the "cards" edge to the Card entity.

func (*RevisionMutation) RemovedDecksIDs

func (m *RevisionMutation) RemovedDecksIDs() (ids []int)

RemovedDecks returns the removed IDs of the "decks" edge to the Deck entity.

func (*RevisionMutation) RemovedEdges

func (m *RevisionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RevisionMutation) RemovedIDs

func (m *RevisionMutation) 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 (*RevisionMutation) RemovedProductsIDs

func (m *RevisionMutation) RemovedProductsIDs() (ids []int)

RemovedProducts returns the removed IDs of the "products" edge to the Product entity.

func (*RevisionMutation) ResetCards

func (m *RevisionMutation) ResetCards()

ResetCards resets all changes to the "cards" edge.

func (*RevisionMutation) ResetDecks

func (m *RevisionMutation) ResetDecks()

ResetDecks resets all changes to the "decks" edge.

func (*RevisionMutation) ResetEdge

func (m *RevisionMutation) 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 (*RevisionMutation) ResetField

func (m *RevisionMutation) 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 (*RevisionMutation) ResetKey

func (m *RevisionMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*RevisionMutation) ResetNameEn

func (m *RevisionMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*RevisionMutation) ResetNameJa

func (m *RevisionMutation) ResetNameJa()

ResetNameJa resets all changes to the "name_ja" field.

func (*RevisionMutation) ResetProducts

func (m *RevisionMutation) ResetProducts()

ResetProducts resets all changes to the "products" edge.

func (*RevisionMutation) SetField

func (m *RevisionMutation) 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 (*RevisionMutation) SetID

func (m *RevisionMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Revision entities.

func (*RevisionMutation) SetKey

func (m *RevisionMutation) SetKey(s string)

SetKey sets the "key" field.

func (*RevisionMutation) SetNameEn

func (m *RevisionMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*RevisionMutation) SetNameJa

func (m *RevisionMutation) SetNameJa(s string)

SetNameJa sets the "name_ja" field.

func (*RevisionMutation) SetOp

func (m *RevisionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (RevisionMutation) Tx

func (m RevisionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RevisionMutation) Type

func (m *RevisionMutation) Type() string

Type returns the node type of this mutation (Revision).

func (*RevisionMutation) Where

func (m *RevisionMutation) Where(ps ...predicate.Revision)

Where appends a list predicates to the RevisionMutation builder.

func (*RevisionMutation) WhereP

func (m *RevisionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RevisionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RevisionOrder

type RevisionOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *RevisionOrderField `json:"field"`
}

RevisionOrder defines the ordering of Revision.

type RevisionOrderField

type RevisionOrderField struct {
	// Value extracts the ordering value from the given Revision.
	Value func(*Revision) (ent.Value, error)
	// contains filtered or unexported fields
}

RevisionOrderField defines the ordering field of Revision.

type RevisionPaginateOption

type RevisionPaginateOption func(*revisionPager) error

RevisionPaginateOption enables pagination customization.

func WithRevisionFilter

func WithRevisionFilter(filter func(*RevisionQuery) (*RevisionQuery, error)) RevisionPaginateOption

WithRevisionFilter configures pagination filter.

func WithRevisionOrder

func WithRevisionOrder(order *RevisionOrder) RevisionPaginateOption

WithRevisionOrder configures pagination ordering.

type RevisionQuery

type RevisionQuery struct {
	// contains filtered or unexported fields
}

RevisionQuery is the builder for querying Revision entities.

func (*RevisionQuery) Aggregate

func (rq *RevisionQuery) Aggregate(fns ...AggregateFunc) *RevisionSelect

Aggregate returns a RevisionSelect configured with the given aggregations.

func (*RevisionQuery) All

func (rq *RevisionQuery) All(ctx context.Context) ([]*Revision, error)

All executes the query and returns a list of Revisions.

func (*RevisionQuery) AllX

func (rq *RevisionQuery) AllX(ctx context.Context) []*Revision

AllX is like All, but panics if an error occurs.

func (*RevisionQuery) Clone

func (rq *RevisionQuery) Clone() *RevisionQuery

Clone returns a duplicate of the RevisionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RevisionQuery) CollectFields

func (r *RevisionQuery) CollectFields(ctx context.Context, satisfies ...string) (*RevisionQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*RevisionQuery) Count

func (rq *RevisionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RevisionQuery) CountX

func (rq *RevisionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RevisionQuery) ExecContext

func (c *RevisionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionQuery) Exist

func (rq *RevisionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RevisionQuery) ExistX

func (rq *RevisionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RevisionQuery) First

func (rq *RevisionQuery) First(ctx context.Context) (*Revision, error)

First returns the first Revision entity from the query. Returns a *NotFoundError when no Revision was found.

func (*RevisionQuery) FirstID

func (rq *RevisionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Revision ID from the query. Returns a *NotFoundError when no Revision ID was found.

func (*RevisionQuery) FirstIDX

func (rq *RevisionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RevisionQuery) FirstX

func (rq *RevisionQuery) FirstX(ctx context.Context) *Revision

FirstX is like First, but panics if an error occurs.

func (*RevisionQuery) GroupBy

func (rq *RevisionQuery) GroupBy(field string, fields ...string) *RevisionGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Revision.Query().
	GroupBy(revision.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RevisionQuery) IDs

func (rq *RevisionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Revision IDs.

func (*RevisionQuery) IDsX

func (rq *RevisionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RevisionQuery) Limit

func (rq *RevisionQuery) Limit(limit int) *RevisionQuery

Limit the number of records to be returned by this query.

func (*RevisionQuery) Offset

func (rq *RevisionQuery) Offset(offset int) *RevisionQuery

Offset to start from.

func (*RevisionQuery) Only

func (rq *RevisionQuery) Only(ctx context.Context) (*Revision, error)

Only returns a single Revision entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Revision entity is found. Returns a *NotFoundError when no Revision entities are found.

func (*RevisionQuery) OnlyID

func (rq *RevisionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Revision ID in the query. Returns a *NotSingularError when more than one Revision ID is found. Returns a *NotFoundError when no entities are found.

func (*RevisionQuery) OnlyIDX

func (rq *RevisionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RevisionQuery) OnlyX

func (rq *RevisionQuery) OnlyX(ctx context.Context) *Revision

OnlyX is like Only, but panics if an error occurs.

func (*RevisionQuery) Order

Order specifies how the records should be ordered.

func (*RevisionQuery) Paginate

func (r *RevisionQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...RevisionPaginateOption,
) (*RevisionConnection, error)

Paginate executes the query and returns a relay based cursor connection to Revision.

func (*RevisionQuery) QueryCards

func (rq *RevisionQuery) QueryCards() *CardQuery

QueryCards chains the current query on the "cards" edge.

func (*RevisionQuery) QueryContext

func (c *RevisionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionQuery) QueryDecks

func (rq *RevisionQuery) QueryDecks() *DeckQuery

QueryDecks chains the current query on the "decks" edge.

func (*RevisionQuery) QueryProducts

func (rq *RevisionQuery) QueryProducts() *ProductQuery

QueryProducts chains the current query on the "products" edge.

func (*RevisionQuery) Select

func (rq *RevisionQuery) Select(fields ...string) *RevisionSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Key string `json:"key,omitempty"`
}

client.Revision.Query().
	Select(revision.FieldKey).
	Scan(ctx, &v)

func (*RevisionQuery) Unique

func (rq *RevisionQuery) Unique(unique bool) *RevisionQuery

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 (*RevisionQuery) Where

func (rq *RevisionQuery) Where(ps ...predicate.Revision) *RevisionQuery

Where adds a new predicate for the RevisionQuery builder.

func (*RevisionQuery) WithCards

func (rq *RevisionQuery) WithCards(opts ...func(*CardQuery)) *RevisionQuery

WithCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge. The optional arguments are used to configure the query builder of the edge.

func (*RevisionQuery) WithDecks

func (rq *RevisionQuery) WithDecks(opts ...func(*DeckQuery)) *RevisionQuery

WithDecks tells the query-builder to eager-load the nodes that are connected to the "decks" edge. The optional arguments are used to configure the query builder of the edge.

func (*RevisionQuery) WithNamedCards

func (rq *RevisionQuery) WithNamedCards(name string, opts ...func(*CardQuery)) *RevisionQuery

WithNamedCards tells the query-builder to eager-load the nodes that are connected to the "cards" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RevisionQuery) WithNamedDecks

func (rq *RevisionQuery) WithNamedDecks(name string, opts ...func(*DeckQuery)) *RevisionQuery

WithNamedDecks tells the query-builder to eager-load the nodes that are connected to the "decks" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RevisionQuery) WithNamedProducts

func (rq *RevisionQuery) WithNamedProducts(name string, opts ...func(*ProductQuery)) *RevisionQuery

WithNamedProducts tells the query-builder to eager-load the nodes that are connected to the "products" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*RevisionQuery) WithProducts

func (rq *RevisionQuery) WithProducts(opts ...func(*ProductQuery)) *RevisionQuery

WithProducts tells the query-builder to eager-load the nodes that are connected to the "products" edge. The optional arguments are used to configure the query builder of the edge.

type RevisionSelect

type RevisionSelect struct {
	*RevisionQuery
	// contains filtered or unexported fields
}

RevisionSelect is the builder for selecting fields of Revision entities.

func (*RevisionSelect) Aggregate

func (rs *RevisionSelect) Aggregate(fns ...AggregateFunc) *RevisionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RevisionSelect) Bool

func (s *RevisionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) BoolX

func (s *RevisionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RevisionSelect) Bools

func (s *RevisionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) BoolsX

func (s *RevisionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (RevisionSelect) ExecContext

func (c RevisionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionSelect) Float64

func (s *RevisionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) Float64X

func (s *RevisionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RevisionSelect) Float64s

func (s *RevisionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) Float64sX

func (s *RevisionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RevisionSelect) Int

func (s *RevisionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) IntX

func (s *RevisionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RevisionSelect) Ints

func (s *RevisionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) IntsX

func (s *RevisionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (RevisionSelect) QueryContext

func (c RevisionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionSelect) Scan

func (rs *RevisionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RevisionSelect) ScanX

func (s *RevisionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RevisionSelect) String

func (s *RevisionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) StringX

func (s *RevisionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RevisionSelect) Strings

func (s *RevisionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RevisionSelect) StringsX

func (s *RevisionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RevisionUpdate

type RevisionUpdate struct {
	// contains filtered or unexported fields
}

RevisionUpdate is the builder for updating Revision entities.

func (*RevisionUpdate) AddCardIDs

func (ru *RevisionUpdate) AddCardIDs(ids ...int) *RevisionUpdate

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*RevisionUpdate) AddCards

func (ru *RevisionUpdate) AddCards(c ...*Card) *RevisionUpdate

AddCards adds the "cards" edges to the Card entity.

func (*RevisionUpdate) AddDeckIDs

func (ru *RevisionUpdate) AddDeckIDs(ids ...int) *RevisionUpdate

AddDeckIDs adds the "decks" edge to the Deck entity by IDs.

func (*RevisionUpdate) AddDecks

func (ru *RevisionUpdate) AddDecks(d ...*Deck) *RevisionUpdate

AddDecks adds the "decks" edges to the Deck entity.

func (*RevisionUpdate) AddProductIDs

func (ru *RevisionUpdate) AddProductIDs(ids ...int) *RevisionUpdate

AddProductIDs adds the "products" edge to the Product entity by IDs.

func (*RevisionUpdate) AddProducts

func (ru *RevisionUpdate) AddProducts(p ...*Product) *RevisionUpdate

AddProducts adds the "products" edges to the Product entity.

func (*RevisionUpdate) ClearCards

func (ru *RevisionUpdate) ClearCards() *RevisionUpdate

ClearCards clears all "cards" edges to the Card entity.

func (*RevisionUpdate) ClearDecks

func (ru *RevisionUpdate) ClearDecks() *RevisionUpdate

ClearDecks clears all "decks" edges to the Deck entity.

func (*RevisionUpdate) ClearNameEn

func (ru *RevisionUpdate) ClearNameEn() *RevisionUpdate

ClearNameEn clears the value of the "name_en" field.

func (*RevisionUpdate) ClearNameJa

func (ru *RevisionUpdate) ClearNameJa() *RevisionUpdate

ClearNameJa clears the value of the "name_ja" field.

func (*RevisionUpdate) ClearProducts

func (ru *RevisionUpdate) ClearProducts() *RevisionUpdate

ClearProducts clears all "products" edges to the Product entity.

func (*RevisionUpdate) Exec

func (ru *RevisionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RevisionUpdate) ExecContext

func (c *RevisionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionUpdate) ExecX

func (ru *RevisionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RevisionUpdate) Mutation

func (ru *RevisionUpdate) Mutation() *RevisionMutation

Mutation returns the RevisionMutation object of the builder.

func (*RevisionUpdate) QueryContext

func (c *RevisionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionUpdate) RemoveCardIDs

func (ru *RevisionUpdate) RemoveCardIDs(ids ...int) *RevisionUpdate

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*RevisionUpdate) RemoveCards

func (ru *RevisionUpdate) RemoveCards(c ...*Card) *RevisionUpdate

RemoveCards removes "cards" edges to Card entities.

func (*RevisionUpdate) RemoveDeckIDs

func (ru *RevisionUpdate) RemoveDeckIDs(ids ...int) *RevisionUpdate

RemoveDeckIDs removes the "decks" edge to Deck entities by IDs.

func (*RevisionUpdate) RemoveDecks

func (ru *RevisionUpdate) RemoveDecks(d ...*Deck) *RevisionUpdate

RemoveDecks removes "decks" edges to Deck entities.

func (*RevisionUpdate) RemoveProductIDs

func (ru *RevisionUpdate) RemoveProductIDs(ids ...int) *RevisionUpdate

RemoveProductIDs removes the "products" edge to Product entities by IDs.

func (*RevisionUpdate) RemoveProducts

func (ru *RevisionUpdate) RemoveProducts(p ...*Product) *RevisionUpdate

RemoveProducts removes "products" edges to Product entities.

func (*RevisionUpdate) Save

func (ru *RevisionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RevisionUpdate) SaveX

func (ru *RevisionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RevisionUpdate) SetNameEn

func (ru *RevisionUpdate) SetNameEn(s string) *RevisionUpdate

SetNameEn sets the "name_en" field.

func (*RevisionUpdate) SetNameJa

func (ru *RevisionUpdate) SetNameJa(s string) *RevisionUpdate

SetNameJa sets the "name_ja" field.

func (*RevisionUpdate) SetNillableNameEn

func (ru *RevisionUpdate) SetNillableNameEn(s *string) *RevisionUpdate

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*RevisionUpdate) SetNillableNameJa

func (ru *RevisionUpdate) SetNillableNameJa(s *string) *RevisionUpdate

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*RevisionUpdate) Where

func (ru *RevisionUpdate) Where(ps ...predicate.Revision) *RevisionUpdate

Where appends a list predicates to the RevisionUpdate builder.

type RevisionUpdateOne

type RevisionUpdateOne struct {
	// contains filtered or unexported fields
}

RevisionUpdateOne is the builder for updating a single Revision entity.

func (*RevisionUpdateOne) AddCardIDs

func (ruo *RevisionUpdateOne) AddCardIDs(ids ...int) *RevisionUpdateOne

AddCardIDs adds the "cards" edge to the Card entity by IDs.

func (*RevisionUpdateOne) AddCards

func (ruo *RevisionUpdateOne) AddCards(c ...*Card) *RevisionUpdateOne

AddCards adds the "cards" edges to the Card entity.

func (*RevisionUpdateOne) AddDeckIDs

func (ruo *RevisionUpdateOne) AddDeckIDs(ids ...int) *RevisionUpdateOne

AddDeckIDs adds the "decks" edge to the Deck entity by IDs.

func (*RevisionUpdateOne) AddDecks

func (ruo *RevisionUpdateOne) AddDecks(d ...*Deck) *RevisionUpdateOne

AddDecks adds the "decks" edges to the Deck entity.

func (*RevisionUpdateOne) AddProductIDs

func (ruo *RevisionUpdateOne) AddProductIDs(ids ...int) *RevisionUpdateOne

AddProductIDs adds the "products" edge to the Product entity by IDs.

func (*RevisionUpdateOne) AddProducts

func (ruo *RevisionUpdateOne) AddProducts(p ...*Product) *RevisionUpdateOne

AddProducts adds the "products" edges to the Product entity.

func (*RevisionUpdateOne) ClearCards

func (ruo *RevisionUpdateOne) ClearCards() *RevisionUpdateOne

ClearCards clears all "cards" edges to the Card entity.

func (*RevisionUpdateOne) ClearDecks

func (ruo *RevisionUpdateOne) ClearDecks() *RevisionUpdateOne

ClearDecks clears all "decks" edges to the Deck entity.

func (*RevisionUpdateOne) ClearNameEn

func (ruo *RevisionUpdateOne) ClearNameEn() *RevisionUpdateOne

ClearNameEn clears the value of the "name_en" field.

func (*RevisionUpdateOne) ClearNameJa

func (ruo *RevisionUpdateOne) ClearNameJa() *RevisionUpdateOne

ClearNameJa clears the value of the "name_ja" field.

func (*RevisionUpdateOne) ClearProducts

func (ruo *RevisionUpdateOne) ClearProducts() *RevisionUpdateOne

ClearProducts clears all "products" edges to the Product entity.

func (*RevisionUpdateOne) Exec

func (ruo *RevisionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RevisionUpdateOne) ExecContext

func (c *RevisionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RevisionUpdateOne) ExecX

func (ruo *RevisionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RevisionUpdateOne) Mutation

func (ruo *RevisionUpdateOne) Mutation() *RevisionMutation

Mutation returns the RevisionMutation object of the builder.

func (*RevisionUpdateOne) QueryContext

func (c *RevisionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RevisionUpdateOne) RemoveCardIDs

func (ruo *RevisionUpdateOne) RemoveCardIDs(ids ...int) *RevisionUpdateOne

RemoveCardIDs removes the "cards" edge to Card entities by IDs.

func (*RevisionUpdateOne) RemoveCards

func (ruo *RevisionUpdateOne) RemoveCards(c ...*Card) *RevisionUpdateOne

RemoveCards removes "cards" edges to Card entities.

func (*RevisionUpdateOne) RemoveDeckIDs

func (ruo *RevisionUpdateOne) RemoveDeckIDs(ids ...int) *RevisionUpdateOne

RemoveDeckIDs removes the "decks" edge to Deck entities by IDs.

func (*RevisionUpdateOne) RemoveDecks

func (ruo *RevisionUpdateOne) RemoveDecks(d ...*Deck) *RevisionUpdateOne

RemoveDecks removes "decks" edges to Deck entities.

func (*RevisionUpdateOne) RemoveProductIDs

func (ruo *RevisionUpdateOne) RemoveProductIDs(ids ...int) *RevisionUpdateOne

RemoveProductIDs removes the "products" edge to Product entities by IDs.

func (*RevisionUpdateOne) RemoveProducts

func (ruo *RevisionUpdateOne) RemoveProducts(p ...*Product) *RevisionUpdateOne

RemoveProducts removes "products" edges to Product entities.

func (*RevisionUpdateOne) Save

func (ruo *RevisionUpdateOne) Save(ctx context.Context) (*Revision, error)

Save executes the query and returns the updated Revision entity.

func (*RevisionUpdateOne) SaveX

func (ruo *RevisionUpdateOne) SaveX(ctx context.Context) *Revision

SaveX is like Save, but panics if an error occurs.

func (*RevisionUpdateOne) Select

func (ruo *RevisionUpdateOne) Select(field string, fields ...string) *RevisionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RevisionUpdateOne) SetNameEn

func (ruo *RevisionUpdateOne) SetNameEn(s string) *RevisionUpdateOne

SetNameEn sets the "name_en" field.

func (*RevisionUpdateOne) SetNameJa

func (ruo *RevisionUpdateOne) SetNameJa(s string) *RevisionUpdateOne

SetNameJa sets the "name_ja" field.

func (*RevisionUpdateOne) SetNillableNameEn

func (ruo *RevisionUpdateOne) SetNillableNameEn(s *string) *RevisionUpdateOne

SetNillableNameEn sets the "name_en" field if the given value is not nil.

func (*RevisionUpdateOne) SetNillableNameJa

func (ruo *RevisionUpdateOne) SetNillableNameJa(s *string) *RevisionUpdateOne

SetNillableNameJa sets the "name_ja" field if the given value is not nil.

func (*RevisionUpdateOne) Where

Where appends a list predicates to the RevisionUpdate builder.

type RevisionUpsert

type RevisionUpsert struct {
	*sql.UpdateSet
}

RevisionUpsert is the "OnConflict" setter.

func (*RevisionUpsert) ClearNameEn

func (u *RevisionUpsert) ClearNameEn() *RevisionUpsert

ClearNameEn clears the value of the "name_en" field.

func (*RevisionUpsert) ClearNameJa

func (u *RevisionUpsert) ClearNameJa() *RevisionUpsert

ClearNameJa clears the value of the "name_ja" field.

func (*RevisionUpsert) SetNameEn

func (u *RevisionUpsert) SetNameEn(v string) *RevisionUpsert

SetNameEn sets the "name_en" field.

func (*RevisionUpsert) SetNameJa

func (u *RevisionUpsert) SetNameJa(v string) *RevisionUpsert

SetNameJa sets the "name_ja" field.

func (*RevisionUpsert) UpdateNameEn

func (u *RevisionUpsert) UpdateNameEn() *RevisionUpsert

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*RevisionUpsert) UpdateNameJa

func (u *RevisionUpsert) UpdateNameJa() *RevisionUpsert

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

type RevisionUpsertBulk

type RevisionUpsertBulk struct {
	// contains filtered or unexported fields
}

RevisionUpsertBulk is the builder for "upsert"-ing a bulk of Revision nodes.

func (*RevisionUpsertBulk) ClearNameEn

func (u *RevisionUpsertBulk) ClearNameEn() *RevisionUpsertBulk

ClearNameEn clears the value of the "name_en" field.

func (*RevisionUpsertBulk) ClearNameJa

func (u *RevisionUpsertBulk) ClearNameJa() *RevisionUpsertBulk

ClearNameJa clears the value of the "name_ja" field.

func (*RevisionUpsertBulk) DoNothing

func (u *RevisionUpsertBulk) DoNothing() *RevisionUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RevisionUpsertBulk) Exec

func (u *RevisionUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RevisionUpsertBulk) ExecX

func (u *RevisionUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RevisionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Revision.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RevisionUpsertBulk) SetNameEn

func (u *RevisionUpsertBulk) SetNameEn(v string) *RevisionUpsertBulk

SetNameEn sets the "name_en" field.

func (*RevisionUpsertBulk) SetNameJa

func (u *RevisionUpsertBulk) SetNameJa(v string) *RevisionUpsertBulk

SetNameJa sets the "name_ja" field.

func (*RevisionUpsertBulk) Update

func (u *RevisionUpsertBulk) Update(set func(*RevisionUpsert)) *RevisionUpsertBulk

Update allows overriding fields `UPDATE` values. See the RevisionCreateBulk.OnConflict documentation for more info.

func (*RevisionUpsertBulk) UpdateNameEn

func (u *RevisionUpsertBulk) UpdateNameEn() *RevisionUpsertBulk

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*RevisionUpsertBulk) UpdateNameJa

func (u *RevisionUpsertBulk) UpdateNameJa() *RevisionUpsertBulk

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*RevisionUpsertBulk) UpdateNewValues

func (u *RevisionUpsertBulk) UpdateNewValues() *RevisionUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Revision.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(revision.FieldID)
		}),
	).
	Exec(ctx)

type RevisionUpsertOne

type RevisionUpsertOne struct {
	// contains filtered or unexported fields
}

RevisionUpsertOne is the builder for "upsert"-ing

one Revision node.

func (*RevisionUpsertOne) ClearNameEn

func (u *RevisionUpsertOne) ClearNameEn() *RevisionUpsertOne

ClearNameEn clears the value of the "name_en" field.

func (*RevisionUpsertOne) ClearNameJa

func (u *RevisionUpsertOne) ClearNameJa() *RevisionUpsertOne

ClearNameJa clears the value of the "name_ja" field.

func (*RevisionUpsertOne) DoNothing

func (u *RevisionUpsertOne) DoNothing() *RevisionUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RevisionUpsertOne) Exec

func (u *RevisionUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*RevisionUpsertOne) ExecX

func (u *RevisionUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RevisionUpsertOne) ID

func (u *RevisionUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RevisionUpsertOne) IDX

func (u *RevisionUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*RevisionUpsertOne) Ignore

func (u *RevisionUpsertOne) Ignore() *RevisionUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Revision.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RevisionUpsertOne) SetNameEn

func (u *RevisionUpsertOne) SetNameEn(v string) *RevisionUpsertOne

SetNameEn sets the "name_en" field.

func (*RevisionUpsertOne) SetNameJa

func (u *RevisionUpsertOne) SetNameJa(v string) *RevisionUpsertOne

SetNameJa sets the "name_ja" field.

func (*RevisionUpsertOne) Update

func (u *RevisionUpsertOne) Update(set func(*RevisionUpsert)) *RevisionUpsertOne

Update allows overriding fields `UPDATE` values. See the RevisionCreate.OnConflict documentation for more info.

func (*RevisionUpsertOne) UpdateNameEn

func (u *RevisionUpsertOne) UpdateNameEn() *RevisionUpsertOne

UpdateNameEn sets the "name_en" field to the value that was provided on create.

func (*RevisionUpsertOne) UpdateNameJa

func (u *RevisionUpsertOne) UpdateNameJa() *RevisionUpsertOne

UpdateNameJa sets the "name_ja" field to the value that was provided on create.

func (*RevisionUpsertOne) UpdateNewValues

func (u *RevisionUpsertOne) UpdateNewValues() *RevisionUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Revision.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(revision.FieldID)
		}),
	).
	Exec(ctx)

type RevisionWhereInput

type RevisionWhereInput struct {
	Predicates []predicate.Revision  `json:"-"`
	Not        *RevisionWhereInput   `json:"not,omitempty"`
	Or         []*RevisionWhereInput `json:"or,omitempty"`
	And        []*RevisionWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "key" field predicates.
	Key             *string  `json:"key,omitempty"`
	KeyNEQ          *string  `json:"keyNEQ,omitempty"`
	KeyIn           []string `json:"keyIn,omitempty"`
	KeyNotIn        []string `json:"keyNotIn,omitempty"`
	KeyGT           *string  `json:"keyGT,omitempty"`
	KeyGTE          *string  `json:"keyGTE,omitempty"`
	KeyLT           *string  `json:"keyLT,omitempty"`
	KeyLTE          *string  `json:"keyLTE,omitempty"`
	KeyContains     *string  `json:"keyContains,omitempty"`
	KeyHasPrefix    *string  `json:"keyHasPrefix,omitempty"`
	KeyHasSuffix    *string  `json:"keyHasSuffix,omitempty"`
	KeyEqualFold    *string  `json:"keyEqualFold,omitempty"`
	KeyContainsFold *string  `json:"keyContainsFold,omitempty"`

	// "name_ja" field predicates.
	NameJa             *string  `json:"nameJa,omitempty"`
	NameJaNEQ          *string  `json:"nameJaNEQ,omitempty"`
	NameJaIn           []string `json:"nameJaIn,omitempty"`
	NameJaNotIn        []string `json:"nameJaNotIn,omitempty"`
	NameJaGT           *string  `json:"nameJaGT,omitempty"`
	NameJaGTE          *string  `json:"nameJaGTE,omitempty"`
	NameJaLT           *string  `json:"nameJaLT,omitempty"`
	NameJaLTE          *string  `json:"nameJaLTE,omitempty"`
	NameJaContains     *string  `json:"nameJaContains,omitempty"`
	NameJaHasPrefix    *string  `json:"nameJaHasPrefix,omitempty"`
	NameJaHasSuffix    *string  `json:"nameJaHasSuffix,omitempty"`
	NameJaIsNil        bool     `json:"nameJaIsNil,omitempty"`
	NameJaNotNil       bool     `json:"nameJaNotNil,omitempty"`
	NameJaEqualFold    *string  `json:"nameJaEqualFold,omitempty"`
	NameJaContainsFold *string  `json:"nameJaContainsFold,omitempty"`

	// "name_en" field predicates.
	NameEn             *string  `json:"nameEn,omitempty"`
	NameEnNEQ          *string  `json:"nameEnNEQ,omitempty"`
	NameEnIn           []string `json:"nameEnIn,omitempty"`
	NameEnNotIn        []string `json:"nameEnNotIn,omitempty"`
	NameEnGT           *string  `json:"nameEnGT,omitempty"`
	NameEnGTE          *string  `json:"nameEnGTE,omitempty"`
	NameEnLT           *string  `json:"nameEnLT,omitempty"`
	NameEnLTE          *string  `json:"nameEnLTE,omitempty"`
	NameEnContains     *string  `json:"nameEnContains,omitempty"`
	NameEnHasPrefix    *string  `json:"nameEnHasPrefix,omitempty"`
	NameEnHasSuffix    *string  `json:"nameEnHasSuffix,omitempty"`
	NameEnIsNil        bool     `json:"nameEnIsNil,omitempty"`
	NameEnNotNil       bool     `json:"nameEnNotNil,omitempty"`
	NameEnEqualFold    *string  `json:"nameEnEqualFold,omitempty"`
	NameEnContainsFold *string  `json:"nameEnContainsFold,omitempty"`

	// "cards" edge predicates.
	HasCards     *bool             `json:"hasCards,omitempty"`
	HasCardsWith []*CardWhereInput `json:"hasCardsWith,omitempty"`

	// "products" edge predicates.
	HasProducts     *bool                `json:"hasProducts,omitempty"`
	HasProductsWith []*ProductWhereInput `json:"hasProductsWith,omitempty"`

	// "decks" edge predicates.
	HasDecks     *bool             `json:"hasDecks,omitempty"`
	HasDecksWith []*DeckWhereInput `json:"hasDecksWith,omitempty"`
}

RevisionWhereInput represents a where input for filtering Revision queries.

func (*RevisionWhereInput) AddPredicates

func (i *RevisionWhereInput) AddPredicates(predicates ...predicate.Revision)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*RevisionWhereInput) Filter

Filter applies the RevisionWhereInput filter on the RevisionQuery builder.

func (*RevisionWhereInput) P

P returns a predicate for filtering revisions. An error is returned if the input is empty or invalid.

type Revisions

type Revisions []*Revision

Revisions is a parsable slice of Revision.

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 {

	// Card is the client for interacting with the Card builders.
	Card *CardClient
	// CardSpecialColor is the client for interacting with the CardSpecialColor builders.
	CardSpecialColor *CardSpecialColorClient
	// CardType is the client for interacting with the CardType builders.
	CardType *CardTypeClient
	// Deck is the client for interacting with the Deck builders.
	Deck *DeckClient
	// Product is the client for interacting with the Product builders.
	Product *ProductClient
	// Revision is the client for interacting with the Revision builders.
	Revision *RevisionClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type 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